/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 229);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = {
  modules: {},
  version: 1742263200058,
  mv3: true,
  browser: {},
  // debug: /gwdebug/.test(window ? window.location.href: ''),
  extend: function extend(obj) {
    for (var i in obj) {
      this[i] = obj[i];
    }
  }
};

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * jQuery JavaScript Library v1.11.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-04-28T16:19Z
 */

;(function( global, factory ) {

	if ( typeof module === "object" && typeof module.exports === "object" ) {
		// For CommonJS and CommonJS-like environments where a proper window is present,
		// execute the factory and get jQuery
		// For environments that do not inherently posses a window with a document
		// (such as Node.js), expose a jQuery-making factory as module.exports
		// This accentuates the need for the creation of a real window
		// e.g. var jQuery = require("jquery")(window);
		// See ticket #14549 for more info
		module.exports = global.document ?
			factory( global, true ) :
			function( w ) {
				if ( !w.document ) {
					throw new Error( "jQuery requires a window with a document" );
				}
				return factory( w );
			};
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Can't do this because several apps including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//

var deletedIds = [];

var slice = deletedIds.slice;

var concat = deletedIds.concat;

var push = deletedIds.push;

var indexOf = deletedIds.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var support = {};



var
	version = "1.11.3",

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {
		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	},

	// Support: Android<4.1, IE<9
	// Make sure we trim BOM and NBSP
	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

	// Matches dashed string for camelizing
	rmsPrefix = /^-ms-/,
	rdashAlpha = /-([\da-z])/gi,

	// Used by jQuery.camelCase as callback to replace()
	fcamelCase = function( all, letter ) {
		return letter.toUpperCase();
	};

jQuery.fn = jQuery.prototype = {
	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// Start with an empty selector
	selector: "",

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {
		return num != null ?

			// Return just the one element from the set
			( num < 0 ? this[ num + this.length ] : this[ num ] ) :

			// Return all the elements in a clean array
			slice.call( this );
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;
		ret.context = this.context;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	// (You can seed the arguments with an array of args, but this is
	// only used internally.)
	each: function( callback, args ) {
		return jQuery.each( this, callback, args );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map(this, function( elem, i ) {
			return callback.call( elem, i, elem );
		}));
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor(null);
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: deletedIds.sort,
	splice: deletedIds.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var src, copyIsArray, copy, name, options, clone,
		target = arguments[0] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
		target = {};
	}

	// extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {
		// Only deal with non-null/undefined values
		if ( (options = arguments[ i ]) != null ) {
			// Extend the base object
			for ( name in options ) {
				src = target[ name ];
				copy = options[ name ];

				// Prevent never-ending loop
				if ( target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
					if ( copyIsArray ) {
						copyIsArray = false;
						clone = src && jQuery.isArray(src) ? src : [];

					} else {
						clone = src && jQuery.isPlainObject(src) ? src : {};
					}

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend({
	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	// See test/unit/core.js for details concerning isFunction.
	// Since version 1.3, DOM methods and functions like alert
	// aren't supported. They return false on IE (#2968).
	isFunction: function( obj ) {
		return jQuery.type(obj) === "function";
	},

	isArray: Array.isArray || function( obj ) {
		return jQuery.type(obj) === "array";
	},

	isWindow: function( obj ) {
		/* jshint eqeqeq: false */
		return obj != null && obj == obj.window;
	},

	isNumeric: function( obj ) {
		// parseFloat NaNs numeric-cast false positives (null|true|false|"")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		// adding 1 corrects loss of precision from parseFloat (#15100)
		return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
	},

	isEmptyObject: function( obj ) {
		var name;
		for ( name in obj ) {
			return false;
		}
		return true;
	},

	isPlainObject: function( obj ) {
		var key;

		// Must be an Object.
		// Because of IE, we also have to check the presence of the constructor property.
		// Make sure that DOM nodes and window objects don't pass through, as well
		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
			return false;
		}

		try {
			// Not own constructor property must be Object
			if ( obj.constructor &&
				!hasOwn.call(obj, "constructor") &&
				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
				return false;
			}
		} catch ( e ) {
			// IE8,9 Will throw exceptions on certain host objects #9897
			return false;
		}

		// Support: IE<9
		// Handle iteration over inherited properties before own properties.
		if ( support.ownLast ) {
			for ( key in obj ) {
				return hasOwn.call( obj, key );
			}
		}

		// Own properties are enumerated firstly, so to speed up,
		// if last one is own, then all properties are own.
		for ( key in obj ) {}

		return key === undefined || hasOwn.call( obj, key );
	},

	type: function( obj ) {
		if ( obj == null ) {
			return obj + "";
		}
		return typeof obj === "object" || typeof obj === "function" ?
			class2type[ toString.call(obj) ] || "object" :
			typeof obj;
	},

	// Evaluates a script in a global context
	// Workarounds based on findings by Jim Driscoll
	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
	globalEval: function( data ) {
		if ( data && jQuery.trim( data ) ) {
			// We use execScript on Internet Explorer
			// We use an anonymous function so that context is window
			// rather than jQuery in Firefox
			( window.execScript || function( data ) {
				window[ "eval" ].call( window, data );
			} )( data );
		}
	},

	// Convert dashed to camelCase; used by the css and data modules
	// Microsoft forgot to hump their vendor prefix (#9572)
	camelCase: function( string ) {
		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
	},

	nodeName: function( elem, name ) {
		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
	},

	// args is for internal usage only
	each: function( obj, callback, args ) {
		var value,
			i = 0,
			length = obj.length,
			isArray = isArraylike( obj );

		if ( args ) {
			if ( isArray ) {
				for ( ; i < length; i++ ) {
					value = callback.apply( obj[ i ], args );

					if ( value === false ) {
						break;
					}
				}
			} else {
				for ( i in obj ) {
					value = callback.apply( obj[ i ], args );

					if ( value === false ) {
						break;
					}
				}
			}

		// A special, fast, case for the most common use of each
		} else {
			if ( isArray ) {
				for ( ; i < length; i++ ) {
					value = callback.call( obj[ i ], i, obj[ i ] );

					if ( value === false ) {
						break;
					}
				}
			} else {
				for ( i in obj ) {
					value = callback.call( obj[ i ], i, obj[ i ] );

					if ( value === false ) {
						break;
					}
				}
			}
		}

		return obj;
	},

	// Support: Android<4.1, IE<9
	trim: function( text ) {
		return text == null ?
			"" :
			( text + "" ).replace( rtrim, "" );
	},

	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArraylike( Object(arr) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
					[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		var len;

		if ( arr ) {
			if ( indexOf ) {
				return indexOf.call( arr, elem, i );
			}

			len = arr.length;
			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;

			for ( ; i < len; i++ ) {
				// Skip accessing in sparse arrays
				if ( i in arr && arr[ i ] === elem ) {
					return i;
				}
			}
		}

		return -1;
	},

	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		while ( j < len ) {
			first[ i++ ] = second[ j++ ];
		}

		// Support: IE<9
		// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
		if ( len !== len ) {
			while ( second[j] !== undefined ) {
				first[ i++ ] = second[ j++ ];
			}
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var value,
			i = 0,
			length = elems.length,
			isArray = isArraylike( elems ),
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArray ) {
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return concat.apply( [], ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// Bind a function to a context, optionally partially applying any
	// arguments.
	proxy: function( fn, context ) {
		var args, proxy, tmp;

		if ( typeof context === "string" ) {
			tmp = fn[ context ];
			context = fn;
			fn = tmp;
		}

		// Quick check to determine if target is callable, in the spec
		// this throws a TypeError, but we will just return undefined.
		if ( !jQuery.isFunction( fn ) ) {
			return undefined;
		}

		// Simulated bind
		args = slice.call( arguments, 2 );
		proxy = function() {
			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
		};

		// Set the guid of unique handler to the same of original handler, so it can be removed
		proxy.guid = fn.guid = fn.guid || jQuery.guid++;

		return proxy;
	},

	now: function() {
		return +( new Date() );
	},

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
});

// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
});

function isArraylike( obj ) {

	// Support: iOS 8.2 (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = "length" in obj && obj.length,
		type = jQuery.type( obj );

	if ( type === "function" || jQuery.isWindow( obj ) ) {
		return false;
	}

	if ( obj.nodeType === 1 && length ) {
		return true;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
 * Sizzle CSS Selector Engine v2.2.0-pre
 * http://sizzlejs.com/
 *
 * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2014-12-16
 */
(function( window ) {

var i,
	support,
	Expr,
	getText,
	isXML,
	tokenize,
	compile,
	select,
	outermostContext,
	sortInput,
	hasDuplicate,

	// Local document vars
	setDocument,
	document,
	docElem,
	documentIsHTML,
	rbuggyQSA,
	rbuggyMatches,
	matches,
	contains,

	// Instance-specific data
	expando = "sizzle" + 1 * new Date(),
	preferredDoc = window.document,
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	tokenCache = createCache(),
	compilerCache = createCache(),
	sortOrder = function( a, b ) {
		if ( a === b ) {
			hasDuplicate = true;
		}
		return 0;
	},

	// General-purpose constants
	MAX_NEGATIVE = 1 << 31,

	// Instance methods
	hasOwn = ({}).hasOwnProperty,
	arr = [],
	pop = arr.pop,
	push_native = arr.push,
	push = arr.push,
	slice = arr.slice,
	// Use a stripped-down indexOf as it's faster than native
	// http://jsperf.com/thor-indexof-vs-for/5
	indexOf = function( list, elem ) {
		var i = 0,
			len = list.length;
		for ( ; i < len; i++ ) {
			if ( list[i] === elem ) {
				return i;
			}
		}
		return -1;
	},

	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",

	// Regular expressions

	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
	whitespace = "[\\x20\\t\\r\\n\\f]",
	// http://www.w3.org/TR/css3-syntax/#characters
	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",

	// Loosely modeled on CSS identifier characters
	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
	identifier = characterEncoding.replace( "w", "w#" ),

	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +
		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
		"*\\]",

	pseudos = ":(" + characterEncoding + ")(?:\\((" +
		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),
	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),

	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),

	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),

	rpseudo = new RegExp( pseudos ),
	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = {
		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
		"ATTR": new RegExp( "^" + attributes ),
		"PSEUDO": new RegExp( "^" + pseudos ),
		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	},

	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	rnative = /^[^{]+\{\s*\[native \w/,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	rsibling = /[+~]/,
	rescape = /'|\\/g,

	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
	funescape = function( _, escaped, escapedWhitespace ) {
		var high = "0x" + escaped - 0x10000;
		// NaN means non-codepoint
		// Support: Firefox<24
		// Workaround erroneous numeric interpretation of +"0x"
		return high !== high || escapedWhitespace ?
			escaped :
			high < 0 ?
				// BMP codepoint
				String.fromCharCode( high + 0x10000 ) :
				// Supplemental Plane codepoint (surrogate pair)
				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	},

	// Used for iframes
	// See setDocument()
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE
	unloadHandler = function() {
		setDocument();
	};

// Optimize for push.apply( _, NodeList )
try {
	push.apply(
		(arr = slice.call( preferredDoc.childNodes )),
		preferredDoc.childNodes
	);
	// Support: Android<4.0
	// Detect silently failing push.apply
	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
	push = { apply: arr.length ?

		// Leverage slice if possible
		function( target, els ) {
			push_native.apply( target, slice.call(els) );
		} :

		// Support: IE<9
		// Otherwise append directly
		function( target, els ) {
			var j = target.length,
				i = 0;
			// Can't trust NodeList.length
			while ( (target[j++] = els[i++]) ) {}
			target.length = j - 1;
		}
	};
}

function Sizzle( selector, context, results, seed ) {
	var match, elem, m, nodeType,
		// QSA vars
		i, groups, old, nid, newContext, newSelector;

	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
		setDocument( context );
	}

	context = context || document;
	results = results || [];
	nodeType = context.nodeType;

	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	if ( !seed && documentIsHTML ) {

		// Try to shortcut find operations when possible (e.g., not under DocumentFragment)
		if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
			// Speed-up: Sizzle("#ID")
			if ( (m = match[1]) ) {
				if ( nodeType === 9 ) {
					elem = context.getElementById( m );
					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document (jQuery #6963)
					if ( elem && elem.parentNode ) {
						// Handle the case where IE, Opera, and Webkit return items
						// by name instead of ID
						if ( elem.id === m ) {
							results.push( elem );
							return results;
						}
					} else {
						return results;
					}
				} else {
					// Context is not a document
					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
						contains( context, elem ) && elem.id === m ) {
						results.push( elem );
						return results;
					}
				}

			// Speed-up: Sizzle("TAG")
			} else if ( match[2] ) {
				push.apply( results, context.getElementsByTagName( selector ) );
				return results;

			// Speed-up: Sizzle(".CLASS")
			} else if ( (m = match[3]) && support.getElementsByClassName ) {
				push.apply( results, context.getElementsByClassName( m ) );
				return results;
			}
		}

		// QSA path
		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
			nid = old = expando;
			newContext = context;
			newSelector = nodeType !== 1 && selector;

			// qSA works strangely on Element-rooted queries
			// We can work around this by specifying an extra ID on the root
			// and working up from there (Thanks to Andrew Dupont for the technique)
			// IE 8 doesn't work on object elements
			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
				groups = tokenize( selector );

				if ( (old = context.getAttribute("id")) ) {
					nid = old.replace( rescape, "\\$&" );
				} else {
					context.setAttribute( "id", nid );
				}
				nid = "[id='" + nid + "'] ";

				i = groups.length;
				while ( i-- ) {
					groups[i] = nid + toSelector( groups[i] );
				}
				newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
				newSelector = groups.join(",");
			}

			if ( newSelector ) {
				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch(qsaError) {
				} finally {
					if ( !old ) {
						context.removeAttribute("id");
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrim, "$1" ), context, results, seed );
}

/**
 * Create key-value caches of limited size
 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {
		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
		if ( keys.push( key + " " ) > Expr.cacheLength ) {
			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return (cache[ key + " " ] = value);
	}
	return cache;
}

/**
 * Mark a function for special use by Sizzle
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ expando ] = true;
	return fn;
}

/**
 * Support testing using an element
 * @param {Function} fn Passed the created div and expects a boolean result
 */
function assert( fn ) {
	var div = document.createElement("div");

	try {
		return !!fn( div );
	} catch (e) {
		return false;
	} finally {
		// Remove from its parent by default
		if ( div.parentNode ) {
			div.parentNode.removeChild( div );
		}
		// release memory in IE
		div = null;
	}
}

/**
 * Adds the same handler for all of the specified attrs
 * @param {String} attrs Pipe-separated list of attributes
 * @param {Function} handler The method that will be applied
 */
function addHandle( attrs, handler ) {
	var arr = attrs.split("|"),
		i = attrs.length;

	while ( i-- ) {
		Expr.attrHandle[ arr[i] ] = handler;
	}
}

/**
 * Checks document order of two siblings
 * @param {Element} a
 * @param {Element} b
 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
 */
function siblingCheck( a, b ) {
	var cur = b && a,
		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
			( ~b.sourceIndex || MAX_NEGATIVE ) -
			( ~a.sourceIndex || MAX_NEGATIVE );

	// Use IE sourceIndex if available on both nodes
	if ( diff ) {
		return diff;
	}

	// Check if b follows a
	if ( cur ) {
		while ( (cur = cur.nextSibling) ) {
			if ( cur === b ) {
				return -1;
			}
		}
	}

	return a ? 1 : -1;
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return name === "input" && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return (name === "input" || name === "button") && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction(function( argument ) {
		argument = +argument;
		return markFunction(function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ (j = matchIndexes[i]) ] ) {
					seed[j] = !(matches[j] = seed[j]);
				}
			}
		});
	});
}

/**
 * Checks a node for validity as a Sizzle context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

// Expose support vars for convenience
support = Sizzle.support = {};

/**
 * Detects XML nodes
 * @param {Element|Object} elem An element or a document
 * @returns {Boolean} True iff elem is a non-HTML XML node
 */
isXML = Sizzle.isXML = function( elem ) {
	// documentElement is verified for cases where it doesn't yet exist
	// (such as loading iframes in IE - #4833)
	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
	return documentElement ? documentElement.nodeName !== "HTML" : false;
};

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [doc] An element or document object to use to set the document
 * @returns {Object} Returns the current document
 */
setDocument = Sizzle.setDocument = function( node ) {
	var hasCompare, parent,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// If no document and documentElement is available, return
	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Set our document
	document = doc;
	docElem = doc.documentElement;
	parent = doc.defaultView;

	// Support: IE>8
	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
	// IE6-8 do not support the defaultView property so parent will be undefined
	if ( parent && parent !== parent.top ) {
		// IE11 does not have attachEvent, so all must suffer
		if ( parent.addEventListener ) {
			parent.addEventListener( "unload", unloadHandler, false );
		} else if ( parent.attachEvent ) {
			parent.attachEvent( "onunload", unloadHandler );
		}
	}

	/* Support tests
	---------------------------------------------------------------------- */
	documentIsHTML = !isXML( doc );

	/* Attributes
	---------------------------------------------------------------------- */

	// Support: IE<8
	// Verify that getAttribute really returns attributes and not properties
	// (excepting IE8 booleans)
	support.attributes = assert(function( div ) {
		div.className = "i";
		return !div.getAttribute("className");
	});

	/* getElement(s)By*
	---------------------------------------------------------------------- */

	// Check if getElementsByTagName("*") returns only elements
	support.getElementsByTagName = assert(function( div ) {
		div.appendChild( doc.createComment("") );
		return !div.getElementsByTagName("*").length;
	});

	// Support: IE<9
	support.getElementsByClassName = rnative.test( doc.getElementsByClassName );

	// Support: IE<10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert(function( div ) {
		docElem.appendChild( div ).id = expando;
		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
	});

	// ID find and filter
	if ( support.getById ) {
		Expr.find["ID"] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var m = context.getElementById( id );
				// Check parentNode to catch when Blackberry 4.6 returns
				// nodes that are no longer in the document #6963
				return m && m.parentNode ? [ m ] : [];
			}
		};
		Expr.filter["ID"] = function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				return elem.getAttribute("id") === attrId;
			};
		};
	} else {
		// Support: IE6/7
		// getElementById is not reliable as a find shortcut
		delete Expr.find["ID"];

		Expr.filter["ID"] =  function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
				return node && node.value === attrId;
			};
		};
	}

	// Tag
	Expr.find["TAG"] = support.getElementsByTagName ?
		function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

			// DocumentFragment nodes don't have gEBTN
			} else if ( support.qsa ) {
				return context.querySelectorAll( tag );
			}
		} :

		function( tag, context ) {
			var elem,
				tmp = [],
				i = 0,
				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
				results = context.getElementsByTagName( tag );

			// Filter out possible comments
			if ( tag === "*" ) {
				while ( (elem = results[i++]) ) {
					if ( elem.nodeType === 1 ) {
						tmp.push( elem );
					}
				}

				return tmp;
			}
			return results;
		};

	// Class
	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
		if ( documentIsHTML ) {
			return context.getElementsByClassName( className );
		}
	};

	/* QSA/matchesSelector
	---------------------------------------------------------------------- */

	// QSA and matchesSelector support

	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
	rbuggyMatches = [];

	// qSa(:focus) reports false when true (Chrome 21)
	// We allow this because of a bug in IE8/9 that throws an error
	// whenever `document.activeElement` is accessed on an iframe
	// So, we allow :focus to pass through QSA all the time to avoid the IE error
	// See http://bugs.jquery.com/ticket/13378
	rbuggyQSA = [];

	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
		// Build QSA regex
		// Regex strategy adopted from Diego Perini
		assert(function( div ) {
			// Select is set to empty string on purpose
			// This is to test IE's treatment of not explicitly
			// setting a boolean content attribute,
			// since its presence should be enough
			// http://bugs.jquery.com/ticket/12359
			docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
				"<select id='" + expando + "-\f]' msallowcapture=''>" +
				"<option selected=''></option></select>";

			// Support: IE8, Opera 11-12.16
			// Nothing should be selected when empty strings follow ^= or $= or *=
			// The test attribute must be unknown in Opera but "safe" for WinRT
			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
			if ( div.querySelectorAll("[msallowcapture^='']").length ) {
				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
			}

			// Support: IE8
			// Boolean attributes and "value" are not treated correctly
			if ( !div.querySelectorAll("[selected]").length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
			}

			// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
			if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
				rbuggyQSA.push("~=");
			}

			// Webkit/Opera - :checked should return selected option elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			// IE8 throws error here and will not see later tests
			if ( !div.querySelectorAll(":checked").length ) {
				rbuggyQSA.push(":checked");
			}

			// Support: Safari 8+, iOS 8+
			// https://bugs.webkit.org/show_bug.cgi?id=136851
			// In-page `selector#id sibing-combinator selector` fails
			if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
				rbuggyQSA.push(".#.+[+~]");
			}
		});

		assert(function( div ) {
			// Support: Windows 8 Native Apps
			// The type and name attributes are restricted during .innerHTML assignment
			var input = doc.createElement("input");
			input.setAttribute( "type", "hidden" );
			div.appendChild( input ).setAttribute( "name", "D" );

			// Support: IE8
			// Enforce case-sensitivity of name attribute
			if ( div.querySelectorAll("[name=d]").length ) {
				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
			}

			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
			// IE8 throws error here and will not see later tests
			if ( !div.querySelectorAll(":enabled").length ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Opera 10-11 does not throw on post-comma invalid pseudos
			div.querySelectorAll("*,:x");
			rbuggyQSA.push(",.*:");
		});
	}

	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
		docElem.webkitMatchesSelector ||
		docElem.mozMatchesSelector ||
		docElem.oMatchesSelector ||
		docElem.msMatchesSelector) )) ) {

		assert(function( div ) {
			// Check to see if it's possible to do matchesSelector
			// on a disconnected node (IE 9)
			support.disconnectedMatch = matches.call( div, "div" );

			// This should fail with an exception
			// Gecko does not error, returns false instead
			matches.call( div, "[s!='']:x" );
			rbuggyMatches.push( "!=", pseudos );
		});
	}

	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );

	/* Contains
	---------------------------------------------------------------------- */
	hasCompare = rnative.test( docElem.compareDocumentPosition );

	// Element contains another
	// Purposefully does not implement inclusive descendent
	// As in, an element does not contain itself
	contains = hasCompare || rnative.test( docElem.contains ) ?
		function( a, b ) {
			var adown = a.nodeType === 9 ? a.documentElement : a,
				bup = b && b.parentNode;
			return a === bup || !!( bup && bup.nodeType === 1 && (
				adown.contains ?
					adown.contains( bup ) :
					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
			));
		} :
		function( a, b ) {
			if ( b ) {
				while ( (b = b.parentNode) ) {
					if ( b === a ) {
						return true;
					}
				}
			}
			return false;
		};

	/* Sorting
	---------------------------------------------------------------------- */

	// Document order sorting
	sortOrder = hasCompare ?
	function( a, b ) {

		// Flag for duplicate removal
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		// Sort on method existence if only one input has compareDocumentPosition
		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
		if ( compare ) {
			return compare;
		}

		// Calculate position if both inputs belong to the same document
		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
			a.compareDocumentPosition( b ) :

			// Otherwise we know they are disconnected
			1;

		// Disconnected nodes
		if ( compare & 1 ||
			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {

			// Choose the first element that is related to our preferred document
			if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
				return -1;
			}
			if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;
		}

		return compare & 4 ? -1 : 1;
	} :
	function( a, b ) {
		// Exit early if the nodes are identical
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		var cur,
			i = 0,
			aup = a.parentNode,
			bup = b.parentNode,
			ap = [ a ],
			bp = [ b ];

		// Parentless nodes are either documents or disconnected
		if ( !aup || !bup ) {
			return a === doc ? -1 :
				b === doc ? 1 :
				aup ? -1 :
				bup ? 1 :
				sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;

		// If the nodes are siblings, we can do a quick check
		} else if ( aup === bup ) {
			return siblingCheck( a, b );
		}

		// Otherwise we need full lists of their ancestors for comparison
		cur = a;
		while ( (cur = cur.parentNode) ) {
			ap.unshift( cur );
		}
		cur = b;
		while ( (cur = cur.parentNode) ) {
			bp.unshift( cur );
		}

		// Walk down the tree looking for a discrepancy
		while ( ap[i] === bp[i] ) {
			i++;
		}

		return i ?
			// Do a sibling check if the nodes have a common ancestor
			siblingCheck( ap[i], bp[i] ) :

			// Otherwise nodes in our document sort first
			ap[i] === preferredDoc ? -1 :
			bp[i] === preferredDoc ? 1 :
			0;
	};

	return doc;
};

Sizzle.matches = function( expr, elements ) {
	return Sizzle( expr, null, null, elements );
};

Sizzle.matchesSelector = function( elem, expr ) {
	// Set document vars if needed
	if ( ( elem.ownerDocument || elem ) !== document ) {
		setDocument( elem );
	}

	// Make sure that attribute selectors are quoted
	expr = expr.replace( rattributeQuotes, "='$1']" );

	if ( support.matchesSelector && documentIsHTML &&
		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {

		try {
			var ret = matches.call( elem, expr );

			// IE 9's matchesSelector returns false on disconnected nodes
			if ( ret || support.disconnectedMatch ||
					// As well, disconnected nodes are said to be in a document
					// fragment in IE 9
					elem.document && elem.document.nodeType !== 11 ) {
				return ret;
			}
		} catch (e) {}
	}

	return Sizzle( expr, document, null, [ elem ] ).length > 0;
};

Sizzle.contains = function( context, elem ) {
	// Set document vars if needed
	if ( ( context.ownerDocument || context ) !== document ) {
		setDocument( context );
	}
	return contains( context, elem );
};

Sizzle.attr = function( elem, name ) {
	// Set document vars if needed
	if ( ( elem.ownerDocument || elem ) !== document ) {
		setDocument( elem );
	}

	var fn = Expr.attrHandle[ name.toLowerCase() ],
		// Don't get fooled by Object.prototype properties (jQuery #13807)
		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
			fn( elem, name, !documentIsHTML ) :
			undefined;

	return val !== undefined ?
		val :
		support.attributes || !documentIsHTML ?
			elem.getAttribute( name ) :
			(val = elem.getAttributeNode(name)) && val.specified ?
				val.value :
				null;
};

Sizzle.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
Sizzle.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	// Unless we *know* we can detect duplicates, assume their presence
	hasDuplicate = !support.detectDuplicates;
	sortInput = !support.sortStable && results.slice( 0 );
	results.sort( sortOrder );

	if ( hasDuplicate ) {
		while ( (elem = results[i++]) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			results.splice( duplicates[ j ], 1 );
		}
	}

	// Clear input after sorting to release objects
	// See https://github.com/jquery/sizzle/pull/225
	sortInput = null;

	return results;
};

/**
 * Utility function for retrieving the text value of an array of DOM nodes
 * @param {Array|Element} elem
 */
getText = Sizzle.getText = function( elem ) {
	var node,
		ret = "",
		i = 0,
		nodeType = elem.nodeType;

	if ( !nodeType ) {
		// If no nodeType, this is expected to be an array
		while ( (node = elem[i++]) ) {
			// Do not traverse comment nodes
			ret += getText( node );
		}
	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
		// Use textContent for elements
		// innerText usage removed for consistency of new lines (jQuery #11153)
		if ( typeof elem.textContent === "string" ) {
			return elem.textContent;
		} else {
			// Traverse its children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				ret += getText( elem );
			}
		}
	} else if ( nodeType === 3 || nodeType === 4 ) {
		return elem.nodeValue;
	}
	// Do not include comment or processing instruction nodes

	return ret;
};

Expr = Sizzle.selectors = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	attrHandle: {},

	find: {},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: {
		"ATTR": function( match ) {
			match[1] = match[1].replace( runescape, funescape );

			// Move the given value to match[3] whether quoted or unquoted
			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );

			if ( match[2] === "~=" ) {
				match[3] = " " + match[3] + " ";
			}

			return match.slice( 0, 4 );
		},

		"CHILD": function( match ) {
			/* matches from matchExpr["CHILD"]
				1 type (only|nth|...)
				2 what (child|of-type)
				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
				4 xn-component of xn+y argument ([+-]?\d*n|)
				5 sign of xn-component
				6 x of xn-component
				7 sign of y-component
				8 y of y-component
			*/
			match[1] = match[1].toLowerCase();

			if ( match[1].slice( 0, 3 ) === "nth" ) {
				// nth-* requires argument
				if ( !match[3] ) {
					Sizzle.error( match[0] );
				}

				// numeric x and y parameters for Expr.filter.CHILD
				// remember that false/true cast respectively to 0/1
				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );

			// other types prohibit arguments
			} else if ( match[3] ) {
				Sizzle.error( match[0] );
			}

			return match;
		},

		"PSEUDO": function( match ) {
			var excess,
				unquoted = !match[6] && match[2];

			if ( matchExpr["CHILD"].test( match[0] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[3] ) {
				match[2] = match[4] || match[5] || "";

			// Strip excess characters from unquoted arguments
			} else if ( unquoted && rpseudo.test( unquoted ) &&
				// Get excess from tokenize (recursively)
				(excess = tokenize( unquoted, true )) &&
				// advance to the next closing parenthesis
				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {

				// excess is a negative index
				match[0] = match[0].slice( 0, excess );
				match[2] = unquoted.slice( 0, excess );
			}

			// Return only captures needed by the pseudo filter method (type and argument)
			return match.slice( 0, 3 );
		}
	},

	filter: {

		"TAG": function( nodeNameSelector ) {
			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
			return nodeNameSelector === "*" ?
				function() { return true; } :
				function( elem ) {
					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
				};
		},

		"CLASS": function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
				classCache( className, function( elem ) {
					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
				});
		},

		"ATTR": function( name, operator, check ) {
			return function( elem ) {
				var result = Sizzle.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				return operator === "=" ? result === check :
					operator === "!=" ? result !== check :
					operator === "^=" ? check && result.indexOf( check ) === 0 :
					operator === "*=" ? check && result.indexOf( check ) > -1 :
					operator === "$=" ? check && result.slice( -check.length ) === check :
					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
					false;
			};
		},

		"CHILD": function( type, what, argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, context, xml ) {
					var cache, outerCache, node, diff, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( (node = node[ dir ]) ) {
									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
										return false;
									}
								}
								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {
							// Seek `elem` from a previously-cached index
							outerCache = parent[ expando ] || (parent[ expando ] = {});
							cache = outerCache[ type ] || [];
							nodeIndex = cache[0] === dirruns && cache[1];
							diff = cache[0] === dirruns && cache[2];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( (node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								(diff = nodeIndex = 0) || start.pop()) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						// Use previously-cached element index if available
						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
							diff = cache[1];

						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
						} else {
							// Use the same loop as above to seek `elem` from the start
							while ( (node = ++nodeIndex && node && node[ dir ] ||
								(diff = nodeIndex = 0) || start.pop()) ) {

								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
									// Cache the index of each encountered element
									if ( useCache ) {
										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
									}

									if ( node === elem ) {
										break;
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		"PSEUDO": function( pseudo, argument ) {
			// pseudo-class names are case-insensitive
			// http://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var args,
				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
					Sizzle.error( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as Sizzle does
			if ( fn[ expando ] ) {
				return fn( argument );
			}

			// But maintain support for old signatures
			if ( fn.length > 1 ) {
				args = [ pseudo, pseudo, "", argument ];
				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
					markFunction(function( seed, matches ) {
						var idx,
							matched = fn( seed, argument ),
							i = matched.length;
						while ( i-- ) {
							idx = indexOf( seed, matched[i] );
							seed[ idx ] = !( matches[ idx ] = matched[i] );
						}
					}) :
					function( elem ) {
						return fn( elem, 0, args );
					};
			}

			return fn;
		}
	},

	pseudos: {
		// Potentially complex pseudos
		"not": markFunction(function( selector ) {
			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrim, "$1" ) );

			return matcher[ expando ] ?
				markFunction(function( seed, matches, context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( (elem = unmatched[i]) ) {
							seed[i] = !(matches[i] = elem);
						}
					}
				}) :
				function( elem, context, xml ) {
					input[0] = elem;
					matcher( input, null, xml, results );
					// Don't keep the element (issue #299)
					input[0] = null;
					return !results.pop();
				};
		}),

		"has": markFunction(function( selector ) {
			return function( elem ) {
				return Sizzle( selector, elem ).length > 0;
			};
		}),

		"contains": markFunction(function( text ) {
			text = text.replace( runescape, funescape );
			return function( elem ) {
				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
			};
		}),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// http://www.w3.org/TR/selectors/#lang-pseudo
		"lang": markFunction( function( lang ) {
			// lang value must be a valid identifier
			if ( !ridentifier.test(lang || "") ) {
				Sizzle.error( "unsupported lang: " + lang );
			}
			lang = lang.replace( runescape, funescape ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( (elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
				return false;
			};
		}),

		// Miscellaneous
		"target": function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		"root": function( elem ) {
			return elem === docElem;
		},

		"focus": function( elem ) {
			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
		},

		// Boolean properties
		"enabled": function( elem ) {
			return elem.disabled === false;
		},

		"disabled": function( elem ) {
			return elem.disabled === true;
		},

		"checked": function( elem ) {
			// In CSS3, :checked should return both checked and selected elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			var nodeName = elem.nodeName.toLowerCase();
			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
		},

		"selected": function( elem ) {
			// Accessing this property makes selected-by-default
			// options in Safari work properly
			if ( elem.parentNode ) {
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		"empty": function( elem ) {
			// http://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		"parent": function( elem ) {
			return !Expr.pseudos["empty"]( elem );
		},

		// Element/input types
		"header": function( elem ) {
			return rheader.test( elem.nodeName );
		},

		"input": function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		"button": function( elem ) {
			var name = elem.nodeName.toLowerCase();
			return name === "input" && elem.type === "button" || name === "button";
		},

		"text": function( elem ) {
			var attr;
			return elem.nodeName.toLowerCase() === "input" &&
				elem.type === "text" &&

				// Support: IE<8
				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
		},

		// Position-in-collection
		"first": createPositionalPseudo(function() {
			return [ 0 ];
		}),

		"last": createPositionalPseudo(function( matchIndexes, length ) {
			return [ length - 1 ];
		}),

		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		}),

		"even": createPositionalPseudo(function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"odd": createPositionalPseudo(function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		})
	}
};

Expr.pseudos["nth"] = Expr.pseudos["eq"];

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = Expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || (match = rcomma.exec( soFar )) ) {
			if ( match ) {
				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[0].length ) || soFar;
			}
			groups.push( (tokens = []) );
		}

		matched = false;

		// Combinators
		if ( (match = rcombinators.exec( soFar )) ) {
			matched = match.shift();
			tokens.push({
				value: matched,
				// Cast descendant combinators to space
				type: match[0].replace( rtrim, " " )
			});
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in Expr.filter ) {
			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
				(match = preFilters[ type ]( match ))) ) {
				matched = match.shift();
				tokens.push({
					value: matched,
					type: type,
					matches: match
				});
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	return parseOnly ?
		soFar.length :
		soFar ?
			Sizzle.error( selector ) :
			// Cache the tokens
			tokenCache( selector, groups ).slice( 0 );
};

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[i].value;
	}
	return selector;
}

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		checkNonElements = base && dir === "parentNode",
		doneName = done++;

	return combinator.first ?
		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( (elem = elem[ dir ]) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
			if ( xml ) {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || (elem[ expando ] = {});
						if ( (oldCache = outerCache[ dir ]) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return (newCache[ 2 ] = oldCache[ 2 ]);
						} else {
							// Reuse newcache so results back-propagate to previous elements
							outerCache[ dir ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
								return true;
							}
						}
					}
				}
			}
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[i]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[0];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		Sizzle( selector, contexts[i], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( (elem = unmatched[i]) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction(function( seed, results, context, xml ) {
		var temp, i, elem,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems,

			matcherOut = matcher ?
				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

					// ...intermediate processing is necessary
					[] :

					// ...otherwise use results directly
					results :
				matcherIn;

		// Find primary matches
		if ( matcher ) {
			matcher( matcherIn, matcherOut, context, xml );
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( (elem = temp[i]) ) {
					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {
					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( (elem = matcherOut[i]) ) {
							// Restore matcherIn since elem is not yet a final match
							temp.push( (matcherIn[i] = elem) );
						}
					}
					postFinder( null, (matcherOut = []), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( (elem = matcherOut[i]) &&
						(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {

						seed[temp] = !(results[temp] = elem);
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	});
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = Expr.relative[ tokens[0].type ],
		implicitRelative = leadingRelative || Expr.relative[" "],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {
			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
				(checkContext = context).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );
			// Avoid hanging onto element (issue #299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
		} else {
			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ expando ] ) {
				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( Expr.relative[ tokens[j].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(
						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
					).replace( rtrim, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,
				// We must always have either seed elements or outermost context
				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
				len = elems.length;

			if ( outermost ) {
				outermostContext = context !== document && context;
			}

			// Add elements passing elementMatchers directly to results
			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
			// Support: IE<9, Safari
			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;
					while ( (matcher = elementMatchers[j++]) ) {
						if ( matcher( elem, context, xml ) ) {
							results.push( elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {
					// They will have gone through all possible matchers
					if ( (elem = !matcher && elem) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// Apply set filters to unmatched elements
			matchedCount += i;
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( (matcher = setMatchers[j++]) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {
					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !(unmatched[i] || setMatched[i]) ) {
								setMatched[i] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					Sizzle.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {
		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[i] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
};

/**
 * A low-level selection function that works with Sizzle's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with Sizzle.compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
select = Sizzle.select = function( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( (selector = compiled.selector || selector) );

	results = results || [];

	// Try to minimize operations if there is no seed and only one group
	if ( match.length === 1 ) {

		// Take a shortcut and set the context if the root selector is an ID
		tokens = match[0] = match[0].slice( 0 );
		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
				support.getById && context.nodeType === 9 && documentIsHTML &&
				Expr.relative[ tokens[1].type ] ) {

			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[i];

			// Abort if we hit a combinator
			if ( Expr.relative[ (type = token.type) ] ) {
				break;
			}
			if ( (find = Expr.find[ type ]) ) {
				// Search, expanding context for leading sibling combinators
				if ( (seed = find(
					token.matches[0].replace( runescape, funescape ),
					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
				)) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
};

// One-time assignments

// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;

// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;

// Initialize against the default document
setDocument();

// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( div1 ) {
	// Should return 1, but returns 4 (following)
	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
});

// Support: IE<8
// Prevent attribute/property "interpolation"
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( div ) {
	div.innerHTML = "<a href='#'></a>";
	return div.firstChild.getAttribute("href") === "#" ;
}) ) {
	addHandle( "type|href|height|width", function( elem, name, isXML ) {
		if ( !isXML ) {
			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
		}
	});
}

// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( div ) {
	div.innerHTML = "<input/>";
	div.firstChild.setAttribute( "value", "" );
	return div.firstChild.getAttribute( "value" ) === "";
}) ) {
	addHandle( "value", function( elem, name, isXML ) {
		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
			return elem.defaultValue;
		}
	});
}

// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( div ) {
	return div.getAttribute("disabled") == null;
}) ) {
	addHandle( booleans, function( elem, name, isXML ) {
		var val;
		if ( !isXML ) {
			return elem[ name ] === true ? name.toLowerCase() :
					(val = elem.getAttributeNode( name )) && val.specified ?
					val.value :
				null;
		}
	});
}

return Sizzle;

})( window );



jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;



var rneedsContext = jQuery.expr.match.needsContext;

var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);



var risSimple = /^.[^:#\[\.,]*$/;

// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( jQuery.isFunction( qualifier ) ) {
		return jQuery.grep( elements, function( elem, i ) {
			/* jshint -W018 */
			return !!qualifier.call( elem, i, elem ) !== not;
		});

	}

	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		});

	}

	if ( typeof qualifier === "string" ) {
		if ( risSimple.test( qualifier ) ) {
			return jQuery.filter( qualifier, elements, not );
		}

		qualifier = jQuery.filter( qualifier, elements );
	}

	return jQuery.grep( elements, function( elem ) {
		return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
	});
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	return elems.length === 1 && elem.nodeType === 1 ?
		jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
		jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
			return elem.nodeType === 1;
		}));
};

jQuery.fn.extend({
	find: function( selector ) {
		var i,
			ret = [],
			self = this,
			len = self.length;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter(function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			}) );
		}

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		// Needed because $( selector, context ) becomes $( context ).find( selector )
		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
		ret.selector = this.selector ? this.selector + " " + selector : selector;
		return ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow(this, selector || [], false) );
	},
	not: function( selector ) {
		return this.pushStack( winnow(this, selector || [], true) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
});


// Initialize a jQuery object


// A central reference to the root jQuery(document)
var rootjQuery,

	// Use the correct document accordingly with window argument (sandbox)
	document = window.document,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
	// Strict HTML recognition (#11290: must start with <)
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,

	init = jQuery.fn.init = function( selector, context ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && (match[1] || !context) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[1] ) {
					context = context instanceof jQuery ? context[0] : context;

					// scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[1],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {
							// Properties of context are called as methods if possible
							if ( jQuery.isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[2] );

					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document #6963
					if ( elem && elem.parentNode ) {
						// Handle the case where IE and Opera return items
						// by name instead of ID
						if ( elem.id !== match[2] ) {
							return rootjQuery.find( selector );
						}

						// Otherwise, we inject the element directly into the jQuery object
						this.length = 1;
						this[0] = elem;
					}

					this.context = document;
					this.selector = selector;
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || rootjQuery ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this.context = this[0] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( jQuery.isFunction( selector ) ) {
			return typeof rootjQuery.ready !== "undefined" ?
				rootjQuery.ready( selector ) :
				// Execute immediately if ready is not present
				selector( jQuery );
		}

		if ( selector.selector !== undefined ) {
			this.selector = selector.selector;
			this.context = selector.context;
		}

		return jQuery.makeArray( selector, this );
	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document );


var rparentsprev = /^(?:parents|prev(?:Until|All))/,
	// methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.extend({
	dir: function( elem, dir, until ) {
		var matched = [],
			cur = elem[ dir ];

		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
			if ( cur.nodeType === 1 ) {
				matched.push( cur );
			}
			cur = cur[dir];
		}
		return matched;
	},

	sibling: function( n, elem ) {
		var r = [];

		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType === 1 && n !== elem ) {
				r.push( n );
			}
		}

		return r;
	}
});

jQuery.fn.extend({
	has: function( target ) {
		var i,
			targets = jQuery( target, this ),
			len = targets.length;

		return this.filter(function() {
			for ( i = 0; i < len; i++ ) {
				if ( jQuery.contains( this, targets[i] ) ) {
					return true;
				}
			}
		});
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
				jQuery( selectors, context || this.context ) :
				0;

		for ( ; i < l; i++ ) {
			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
				// Always skip document fragments
				if ( cur.nodeType < 11 && (pos ?
					pos.index(cur) > -1 :

					// Don't pass non-elements to Sizzle
					cur.nodeType === 1 &&
						jQuery.find.matchesSelector(cur, selectors)) ) {

					matched.push( cur );
					break;
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
	},

	// Determine the position of an element within
	// the matched set of elements
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
		}

		// index in selector
		if ( typeof elem === "string" ) {
			return jQuery.inArray( this[0], jQuery( elem ) );
		}

		// Locate the position of the desired element
		return jQuery.inArray(
			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[0] : elem, this );
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.unique(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter(selector)
		);
	}
});

function sibling( cur, dir ) {
	do {
		cur = cur[ dir ];
	} while ( cur && cur.nodeType !== 1 );

	return cur;
}

jQuery.each({
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return jQuery.dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return jQuery.dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return jQuery.dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return jQuery.sibling( elem.firstChild );
	},
	contents: function( elem ) {
		return jQuery.nodeName( elem, "iframe" ) ?
			elem.contentDocument || elem.contentWindow.document :
			jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var ret = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			ret = jQuery.filter( selector, ret );
		}

		if ( this.length > 1 ) {
			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				ret = jQuery.unique( ret );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				ret = ret.reverse();
			}
		}

		return this.pushStack( ret );
	};
});
var rnotwhite = (/\S+/g);



// String to Object options format cache
var optionsCache = {};

// Convert String-formatted options into Object-formatted ones and store in cache
function createOptions( options ) {
	var object = optionsCache[ options ] = {};
	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	});
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		( optionsCache[ options ] || createOptions( options ) ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,
		// Last fire value (for non-forgettable lists)
		memory,
		// Flag to know if list was already fired
		fired,
		// End of the loop when firing
		firingLength,
		// Index of currently firing callback (modified by remove if needed)
		firingIndex,
		// First callback to fire (used internally by add and fireWith)
		firingStart,
		// Actual callback list
		list = [],
		// Stack of fire calls for repeatable lists
		stack = !options.once && [],
		// Fire callbacks
		fire = function( data ) {
			memory = options.memory && data;
			fired = true;
			firingIndex = firingStart || 0;
			firingStart = 0;
			firingLength = list.length;
			firing = true;
			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
					memory = false; // To prevent further calls using add
					break;
				}
			}
			firing = false;
			if ( list ) {
				if ( stack ) {
					if ( stack.length ) {
						fire( stack.shift() );
					}
				} else if ( memory ) {
					list = [];
				} else {
					self.disable();
				}
			}
		},
		// Actual Callbacks object
		self = {
			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {
					// First, we save the current length
					var start = list.length;
					(function add( args ) {
						jQuery.each( args, function( _, arg ) {
							var type = jQuery.type( arg );
							if ( type === "function" ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && type !== "string" ) {
								// Inspect recursively
								add( arg );
							}
						});
					})( arguments );
					// Do we need to add the callbacks to the
					// current firing batch?
					if ( firing ) {
						firingLength = list.length;
					// With memory, if we're not firing then
					// we should call right away
					} else if ( memory ) {
						firingStart = start;
						fire( memory );
					}
				}
				return this;
			},
			// Remove a callback from the list
			remove: function() {
				if ( list ) {
					jQuery.each( arguments, function( _, arg ) {
						var index;
						while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
							list.splice( index, 1 );
							// Handle firing indexes
							if ( firing ) {
								if ( index <= firingLength ) {
									firingLength--;
								}
								if ( index <= firingIndex ) {
									firingIndex--;
								}
							}
						}
					});
				}
				return this;
			},
			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
			},
			// Remove all callbacks from the list
			empty: function() {
				list = [];
				firingLength = 0;
				return this;
			},
			// Have the list do nothing anymore
			disable: function() {
				list = stack = memory = undefined;
				return this;
			},
			// Is it disabled?
			disabled: function() {
				return !list;
			},
			// Lock the list in its current state
			lock: function() {
				stack = undefined;
				if ( !memory ) {
					self.disable();
				}
				return this;
			},
			// Is it locked?
			locked: function() {
				return !stack;
			},
			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( list && ( !fired || stack ) ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					if ( firing ) {
						stack.push( args );
					} else {
						fire( args );
					}
				}
				return this;
			},
			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},
			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};


jQuery.extend({

	Deferred: function( func ) {
		var tuples = [
				// action, add listener, listener list, final state
				[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
				[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
				[ "notify", "progress", jQuery.Callbacks("memory") ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				then: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;
					return jQuery.Deferred(function( newDefer ) {
						jQuery.each( tuples, function( i, tuple ) {
							var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
							// deferred[ done | fail | progress ] for forwarding actions to newDefer
							deferred[ tuple[1] ](function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && jQuery.isFunction( returned.promise ) ) {
									returned.promise()
										.done( newDefer.resolve )
										.fail( newDefer.reject )
										.progress( newDefer.notify );
								} else {
									newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
								}
							});
						});
						fns = null;
					}).promise();
				},
				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Keep pipe for back-compat
		promise.pipe = promise.then;

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 3 ];

			// promise[ done | fail | progress ] = list.add
			promise[ tuple[1] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(function() {
					// state = [ resolved | rejected ]
					state = stateString;

				// [ reject_list | resolve_list ].disable; progress_list.lock
				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
			}

			// deferred[ resolve | reject | notify ]
			deferred[ tuple[0] ] = function() {
				deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
				return this;
			};
			deferred[ tuple[0] + "With" ] = list.fireWith;
		});

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( subordinate /* , ..., subordinateN */ ) {
		var i = 0,
			resolveValues = slice.call( arguments ),
			length = resolveValues.length,

			// the count of uncompleted subordinates
			remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,

			// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),

			// Update function for both resolve and progress values
			updateFunc = function( i, contexts, values ) {
				return function( value ) {
					contexts[ i ] = this;
					values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( values === progressValues ) {
						deferred.notifyWith( contexts, values );

					} else if ( !(--remaining) ) {
						deferred.resolveWith( contexts, values );
					}
				};
			},

			progressValues, progressContexts, resolveContexts;

		// add listeners to Deferred subordinates; treat others as resolved
		if ( length > 1 ) {
			progressValues = new Array( length );
			progressContexts = new Array( length );
			resolveContexts = new Array( length );
			for ( ; i < length; i++ ) {
				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
					resolveValues[ i ].promise()
						.done( updateFunc( i, resolveContexts, resolveValues ) )
						.fail( deferred.reject )
						.progress( updateFunc( i, progressContexts, progressValues ) );
				} else {
					--remaining;
				}
			}
		}

		// if we're not waiting on anything, resolve the master
		if ( !remaining ) {
			deferred.resolveWith( resolveContexts, resolveValues );
		}

		return deferred.promise();
	}
});


// The deferred used on DOM ready
var readyList;

jQuery.fn.ready = function( fn ) {
	// Add the callback
	jQuery.ready.promise().done( fn );

	return this;
};

jQuery.extend({
	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See #6781
	readyWait: 1,

	// Hold (or release) the ready event
	holdReady: function( hold ) {
		if ( hold ) {
			jQuery.readyWait++;
		} else {
			jQuery.ready( true );
		}
	},

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
		if ( !document.body ) {
			return setTimeout( jQuery.ready );
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document, [ jQuery ] );

		// Trigger any bound ready events
		if ( jQuery.fn.triggerHandler ) {
			jQuery( document ).triggerHandler( "ready" );
			jQuery( document ).off( "ready" );
		}
	}
});

/**
 * Clean-up method for dom ready events
 */
function detach() {
	if ( document.addEventListener ) {
		document.removeEventListener( "DOMContentLoaded", completed, false );
		window.removeEventListener( "load", completed, false );

	} else {
		document.detachEvent( "onreadystatechange", completed );
		window.detachEvent( "onload", completed );
	}
}

/**
 * The ready event handler and self cleanup method
 */
function completed() {
	// readyState === "complete" is good enough for us to call the dom ready in oldIE
	if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
		detach();
		jQuery.ready();
	}
}

jQuery.ready.promise = function( obj ) {
	if ( !readyList ) {

		readyList = jQuery.Deferred();

		// Catch cases where $(document).ready() is called after the browser event has already occurred.
		// we once tried to use readyState "interactive" here, but it caused issues like the one
		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
		if ( document.readyState === "complete" ) {
			// Handle it asynchronously to allow scripts the opportunity to delay ready
			setTimeout( jQuery.ready );

		// Standards-based browsers support DOMContentLoaded
		} else if ( document.addEventListener ) {
			// Use the handy event callback
			document.addEventListener( "DOMContentLoaded", completed, false );

			// A fallback to window.onload, that will always work
			window.addEventListener( "load", completed, false );

		// If IE event model is used
		} else {
			// Ensure firing before onload, maybe late but safe also for iframes
			document.attachEvent( "onreadystatechange", completed );

			// A fallback to window.onload, that will always work
			window.attachEvent( "onload", completed );

			// If IE and not a frame
			// continually check to see if the document is ready
			var top = false;

			try {
				top = window.frameElement == null && document.documentElement;
			} catch(e) {}

			if ( top && top.doScroll ) {
				(function doScrollCheck() {
					if ( !jQuery.isReady ) {

						try {
							// Use the trick by Diego Perini
							// http://javascript.nwbox.com/IEContentLoaded/
							top.doScroll("left");
						} catch(e) {
							return setTimeout( doScrollCheck, 50 );
						}

						// detach all dom ready events
						detach();

						// and execute any waiting functions
						jQuery.ready();
					}
				})();
			}
		}
	}
	return readyList.promise( obj );
};


var strundefined = typeof undefined;



// Support: IE<9
// Iteration over object's inherited properties before its own
var i;
for ( i in jQuery( support ) ) {
	break;
}
support.ownLast = i !== "0";

// Note: most support tests are defined in their respective modules.
// false until the test is run
support.inlineBlockNeedsLayout = false;

// Execute ASAP in case we need to set body.style.zoom
jQuery(function() {
	// Minified: var a,b,c,d
	var val, div, body, container;

	body = document.getElementsByTagName( "body" )[ 0 ];
	if ( !body || !body.style ) {
		// Return for frameset docs that don't have a body
		return;
	}

	// Setup
	div = document.createElement( "div" );
	container = document.createElement( "div" );
	container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
	body.appendChild( container ).appendChild( div );

	if ( typeof div.style.zoom !== strundefined ) {
		// Support: IE<8
		// Check if natively block-level elements act like inline-block
		// elements when setting their display to 'inline' and giving
		// them layout
		div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";

		support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
		if ( val ) {
			// Prevent IE 6 from affecting layout for positioned elements #11048
			// Prevent IE from shrinking the body in IE 7 mode #12869
			// Support: IE<8
			body.style.zoom = 1;
		}
	}

	body.removeChild( container );
});




(function() {
	var div = document.createElement( "div" );

	// Execute the test only if not already executed in another module.
	if (support.deleteExpando == null) {
		// Support: IE<9
		support.deleteExpando = true;
		try {
			delete div.test;
		} catch( e ) {
			support.deleteExpando = false;
		}
	}

	// Null elements to avoid leaks in IE.
	div = null;
})();


/**
 * Determines whether an object can have data
 */
jQuery.acceptData = function( elem ) {
	var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
		nodeType = +elem.nodeType || 1;

	// Do not set data on non-element DOM nodes because it will not be cleared (#8335).
	return nodeType !== 1 && nodeType !== 9 ?
		false :

		// Nodes accept data unless otherwise specified; rejection can be conditional
		!noData || noData !== true && elem.getAttribute("classid") === noData;
};


var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /([A-Z])/g;

function dataAttr( elem, key, data ) {
	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {

		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();

		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = data === "true" ? true :
					data === "false" ? false :
					data === "null" ? null :
					// Only convert to a number if it doesn't change the string
					+data + "" === data ? +data :
					rbrace.test( data ) ? jQuery.parseJSON( data ) :
					data;
			} catch( e ) {}

			// Make sure we set the data so it isn't changed later
			jQuery.data( elem, key, data );

		} else {
			data = undefined;
		}
	}

	return data;
}

// checks a cache object for emptiness
function isEmptyDataObject( obj ) {
	var name;
	for ( name in obj ) {

		// if the public data object is empty, the private is still empty
		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
			continue;
		}
		if ( name !== "toJSON" ) {
			return false;
		}
	}

	return true;
}

function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
	if ( !jQuery.acceptData( elem ) ) {
		return;
	}

	var ret, thisCache,
		internalKey = jQuery.expando,

		// We have to handle DOM nodes and JS objects differently because IE6-7
		// can't GC object references properly across the DOM-JS boundary
		isNode = elem.nodeType,

		// Only DOM nodes need the global jQuery cache; JS object data is
		// attached directly to the object so GC can occur automatically
		cache = isNode ? jQuery.cache : elem,

		// Only defining an ID for JS objects if its cache already exists allows
		// the code to shortcut on the same path as a DOM node with no cache
		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;

	// Avoid doing any more work than we need to when trying to get data on an
	// object that has no data at all
	if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
		return;
	}

	if ( !id ) {
		// Only DOM nodes need a new unique ID for each element since their data
		// ends up in the global cache
		if ( isNode ) {
			id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
		} else {
			id = internalKey;
		}
	}

	if ( !cache[ id ] ) {
		// Avoid exposing jQuery metadata on plain JS objects when the object
		// is serialized using JSON.stringify
		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
	}

	// An object can be passed to jQuery.data instead of a key/value pair; this gets
	// shallow copied over onto the existing cache
	if ( typeof name === "object" || typeof name === "function" ) {
		if ( pvt ) {
			cache[ id ] = jQuery.extend( cache[ id ], name );
		} else {
			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
		}
	}

	thisCache = cache[ id ];

	// jQuery data() is stored in a separate object inside the object's internal data
	// cache in order to avoid key collisions between internal data and user-defined
	// data.
	if ( !pvt ) {
		if ( !thisCache.data ) {
			thisCache.data = {};
		}

		thisCache = thisCache.data;
	}

	if ( data !== undefined ) {
		thisCache[ jQuery.camelCase( name ) ] = data;
	}

	// Check for both converted-to-camel and non-converted data property names
	// If a data property was specified
	if ( typeof name === "string" ) {

		// First Try to find as-is property data
		ret = thisCache[ name ];

		// Test for null|undefined property data
		if ( ret == null ) {

			// Try to find the camelCased property
			ret = thisCache[ jQuery.camelCase( name ) ];
		}
	} else {
		ret = thisCache;
	}

	return ret;
}

function internalRemoveData( elem, name, pvt ) {
	if ( !jQuery.acceptData( elem ) ) {
		return;
	}

	var thisCache, i,
		isNode = elem.nodeType,

		// See jQuery.data for more information
		cache = isNode ? jQuery.cache : elem,
		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;

	// If there is already no cache entry for this object, there is no
	// purpose in continuing
	if ( !cache[ id ] ) {
		return;
	}

	if ( name ) {

		thisCache = pvt ? cache[ id ] : cache[ id ].data;

		if ( thisCache ) {

			// Support array or space separated string names for data keys
			if ( !jQuery.isArray( name ) ) {

				// try the string as a key before any manipulation
				if ( name in thisCache ) {
					name = [ name ];
				} else {

					// split the camel cased version by spaces unless a key with the spaces exists
					name = jQuery.camelCase( name );
					if ( name in thisCache ) {
						name = [ name ];
					} else {
						name = name.split(" ");
					}
				}
			} else {
				// If "name" is an array of keys...
				// When data is initially created, via ("key", "val") signature,
				// keys will be converted to camelCase.
				// Since there is no way to tell _how_ a key was added, remove
				// both plain key and camelCase key. #12786
				// This will only penalize the array argument path.
				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
			}

			i = name.length;
			while ( i-- ) {
				delete thisCache[ name[i] ];
			}

			// If there is no data left in the cache, we want to continue
			// and let the cache object itself get destroyed
			if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
				return;
			}
		}
	}

	// See jQuery.data for more information
	if ( !pvt ) {
		delete cache[ id ].data;

		// Don't destroy the parent cache unless the internal data object
		// had been the only thing left in it
		if ( !isEmptyDataObject( cache[ id ] ) ) {
			return;
		}
	}

	// Destroy the cache
	if ( isNode ) {
		jQuery.cleanData( [ elem ], true );

	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
	/* jshint eqeqeq: false */
	} else if ( support.deleteExpando || cache != cache.window ) {
		/* jshint eqeqeq: true */
		delete cache[ id ];

	// When all else fails, null
	} else {
		cache[ id ] = null;
	}
}

jQuery.extend({
	cache: {},

	// The following elements (space-suffixed to avoid Object.prototype collisions)
	// throw uncatchable exceptions if you attempt to set expando properties
	noData: {
		"applet ": true,
		"embed ": true,
		// ...but Flash objects (which have this classid) *can* handle expandos
		"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
	},

	hasData: function( elem ) {
		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
		return !!elem && !isEmptyDataObject( elem );
	},

	data: function( elem, name, data ) {
		return internalData( elem, name, data );
	},

	removeData: function( elem, name ) {
		return internalRemoveData( elem, name );
	},

	// For internal use only.
	_data: function( elem, name, data ) {
		return internalData( elem, name, data, true );
	},

	_removeData: function( elem, name ) {
		return internalRemoveData( elem, name, true );
	}
});

jQuery.fn.extend({
	data: function( key, value ) {
		var i, name, data,
			elem = this[0],
			attrs = elem && elem.attributes;

		// Special expections of .data basically thwart jQuery.access,
		// so implement the relevant behavior ourselves

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = jQuery.data( elem );

				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE11+
						// The attrs elements can be null (#14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = jQuery.camelCase( name.slice(5) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					jQuery._data( elem, "parsedAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each(function() {
				jQuery.data( this, key );
			});
		}

		return arguments.length > 1 ?

			// Sets one value
			this.each(function() {
				jQuery.data( this, key, value );
			}) :

			// Gets one value
			// Try to fetch any internally stored data first
			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
	},

	removeData: function( key ) {
		return this.each(function() {
			jQuery.removeData( this, key );
		});
	}
});


jQuery.extend({
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = jQuery._data( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || jQuery.isArray(data) ) {
					queue = jQuery._data( elem, type, jQuery.makeArray(data) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// not intended for public consumption - generates a queueHooks object, or returns the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
			empty: jQuery.Callbacks("once memory").add(function() {
				jQuery._removeData( elem, type + "queue" );
				jQuery._removeData( elem, key );
			})
		});
	}
});

jQuery.fn.extend({
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[0], type );
		}

		return data === undefined ?
			this :
			this.each(function() {
				var queue = jQuery.queue( this, type, data );

				// ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[0] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			});
	},
	dequeue: function( type ) {
		return this.each(function() {
			jQuery.dequeue( this, type );
		});
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},
	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
});
var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;

var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var isHidden = function( elem, el ) {
		// isHidden might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;
		return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
	};



// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		length = elems.length,
		bulk = key == null;

	// Sets many values
	if ( jQuery.type( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( !jQuery.isFunction( value ) ) {
			raw = true;
		}

		if ( bulk ) {
			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < length; i++ ) {
				fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
			}
		}
	}

	return chainable ?
		elems :

		// Gets
		bulk ?
			fn.call( elems ) :
			length ? fn( elems[0], key ) : emptyGet;
};
var rcheckableType = (/^(?:checkbox|radio)$/i);



(function() {
	// Minified: var a,b,c
	var input = document.createElement( "input" ),
		div = document.createElement( "div" ),
		fragment = document.createDocumentFragment();

	// Setup
	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";

	// IE strips leading whitespace when .innerHTML is used
	support.leadingWhitespace = div.firstChild.nodeType === 3;

	// Make sure that tbody elements aren't automatically inserted
	// IE will insert them into empty tables
	support.tbody = !div.getElementsByTagName( "tbody" ).length;

	// Make sure that link elements get serialized correctly by innerHTML
	// This requires a wrapper element in IE
	support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;

	// Makes sure cloning an html5 element does not cause problems
	// Where outerHTML is undefined, this still works
	support.html5Clone =
		document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";

	// Check if a disconnected checkbox will retain its checked
	// value of true after appended to the DOM (IE6/7)
	input.type = "checkbox";
	input.checked = true;
	fragment.appendChild( input );
	support.appendChecked = input.checked;

	// Make sure textarea (and checkbox) defaultValue is properly cloned
	// Support: IE6-IE11+
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

	// #11217 - WebKit loses check when the name is after the checked attribute
	fragment.appendChild( div );
	div.innerHTML = "<input type='radio' checked='checked' name='t'/>";

	// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
	// old WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Support: IE<9
	// Opera does not clone events (and typeof div.attachEvent === undefined).
	// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
	support.noCloneEvent = true;
	if ( div.attachEvent ) {
		div.attachEvent( "onclick", function() {
			support.noCloneEvent = false;
		});

		div.cloneNode( true ).click();
	}

	// Execute the test only if not already executed in another module.
	if (support.deleteExpando == null) {
		// Support: IE<9
		support.deleteExpando = true;
		try {
			delete div.test;
		} catch( e ) {
			support.deleteExpando = false;
		}
	}
})();


(function() {
	var i, eventName,
		div = document.createElement( "div" );

	// Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event)
	for ( i in { submit: true, change: true, focusin: true }) {
		eventName = "on" + i;

		if ( !(support[ i + "Bubbles" ] = eventName in window) ) {
			// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
			div.setAttribute( eventName, "t" );
			support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false;
		}
	}

	// Null elements to avoid leaks in IE.
	div = null;
})();


var rformElems = /^(?:input|select|textarea)$/i,
	rkeyEvent = /^key/,
	rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	global: {},

	add: function( elem, types, handler, data, selector ) {
		var tmp, events, t, handleObjIn,
			special, eventHandle, handleObj,
			handlers, type, namespaces, origType,
			elemData = jQuery._data( elem );

		// Don't attach events to noData or text/comment nodes (but allow plain objects)
		if ( !elemData ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !(events = elemData.events) ) {
			events = elemData.events = {};
		}
		if ( !(eventHandle = elemData.handle) ) {
			eventHandle = elemData.handle = function( e ) {
				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
					undefined;
			};
			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
			eventHandle.elem = elem;
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnotwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[t] ) || [];
			type = origType = tmp[1];
			namespaces = ( tmp[2] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend({
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join(".")
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !(handlers = events[ type ]) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener/attachEvent if the special events handler returns false
				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
					// Bind the global event handler to the element
					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle, false );

					} else if ( elem.attachEvent ) {
						elem.attachEvent( "on" + type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}

			// Keep track of which events have ever been used, for event optimization
			jQuery.event.global[ type ] = true;
		}

		// Nullify elem to prevent memory leaks in IE
		elem = null;
	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {
		var j, handleObj, tmp,
			origCount, t, events,
			special, handlers, type,
			namespaces, origType,
			elemData = jQuery.hasData( elem ) && jQuery._data( elem );

		if ( !elemData || !(events = elemData.events) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnotwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[t] ) || [];
			type = origType = tmp[1];
			namespaces = ( tmp[2] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			delete elemData.handle;

			// removeData also checks for emptiness and clears the expando if empty
			// so use it instead of delete
			jQuery._removeData( elem, "events" );
		}
	},

	trigger: function( event, data, elem, onlyHandlers ) {
		var handle, ontype, cur,
			bubbleType, special, tmp, i,
			eventPath = [ elem || document ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];

		cur = tmp = elem = elem || document;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf(".") >= 0 ) {
			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split(".");
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf(":") < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join(".");
		event.namespace_re = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (#9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === (elem.ownerDocument || document) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {

			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
				jQuery.acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name name as the event.
				// Can't use an .isFunction() check here because IE6/7 fails that test.
				// Don't do default actions on window, that's where global variables be (#6170)
				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;
					try {
						elem[ type ]();
					} catch ( e ) {
						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
					}
					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	dispatch: function( event ) {

		// Make a writable jQuery.Event from the native event object
		event = jQuery.event.fix( event );

		var i, ret, handleObj, matched, j,
			handlerQueue = [],
			args = slice.call( arguments ),
			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[0] = event;
		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {

				// Triggered event must either 1) have no namespace, or
				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
				if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
							.apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( (event.result = ret) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var sel, handleObj, matches, i,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		// Black-hole SVG <use> instance trees (#13180)
		// Avoid non-left-click bubbling in Firefox (#3861)
		if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {

			/* jshint eqeqeq: false */
			for ( ; cur != this; cur = cur.parentNode || this ) {
				/* jshint eqeqeq: true */

				// Don't check non-elements (#13208)
				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
				if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
					matches = [];
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (#13203)
						sel = handleObj.selector + " ";

						if ( matches[ sel ] === undefined ) {
							matches[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) >= 0 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matches[ sel ] ) {
							matches.push( handleObj );
						}
					}
					if ( matches.length ) {
						handlerQueue.push({ elem: cur, handlers: matches });
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		if ( delegateCount < handlers.length ) {
			handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
		}

		return handlerQueue;
	},

	fix: function( event ) {
		if ( event[ jQuery.expando ] ) {
			return event;
		}

		// Create a writable copy of the event object and normalize some properties
		var i, prop, copy,
			type = event.type,
			originalEvent = event,
			fixHook = this.fixHooks[ type ];

		if ( !fixHook ) {
			this.fixHooks[ type ] = fixHook =
				rmouseEvent.test( type ) ? this.mouseHooks :
				rkeyEvent.test( type ) ? this.keyHooks :
				{};
		}
		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;

		event = new jQuery.Event( originalEvent );

		i = copy.length;
		while ( i-- ) {
			prop = copy[ i ];
			event[ prop ] = originalEvent[ prop ];
		}

		// Support: IE<9
		// Fix target property (#1925)
		if ( !event.target ) {
			event.target = originalEvent.srcElement || document;
		}

		// Support: Chrome 23+, Safari?
		// Target should not be a text node (#504, #13143)
		if ( event.target.nodeType === 3 ) {
			event.target = event.target.parentNode;
		}

		// Support: IE<9
		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
		event.metaKey = !!event.metaKey;

		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
	},

	// Includes some event props shared by KeyEvent and MouseEvent
	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),

	fixHooks: {},

	keyHooks: {
		props: "char charCode key keyCode".split(" "),
		filter: function( event, original ) {

			// Add which for key events
			if ( event.which == null ) {
				event.which = original.charCode != null ? original.charCode : original.keyCode;
			}

			return event;
		}
	},

	mouseHooks: {
		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
		filter: function( event, original ) {
			var body, eventDoc, doc,
				button = original.button,
				fromElement = original.fromElement;

			// Calculate pageX/Y if missing and clientX/Y available
			if ( event.pageX == null && original.clientX != null ) {
				eventDoc = event.target.ownerDocument || document;
				doc = eventDoc.documentElement;
				body = eventDoc.body;

				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
			}

			// Add relatedTarget, if necessary
			if ( !event.relatedTarget && fromElement ) {
				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
			}

			// Add which for click: 1 === left; 2 === middle; 3 === right
			// Note: button is not normalized, so don't use it
			if ( !event.which && button !== undefined ) {
				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
			}

			return event;
		}
	},

	special: {
		load: {
			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		focus: {
			// Fire native event if possible so blur/focus sequence is correct
			trigger: function() {
				if ( this !== safeActiveElement() && this.focus ) {
					try {
						this.focus();
						return false;
					} catch ( e ) {
						// Support: IE<9
						// If we error on focus to hidden element (#1486, #12518),
						// let .trigger() run the handlers
					}
				}
			},
			delegateType: "focusin"
		},
		blur: {
			trigger: function() {
				if ( this === safeActiveElement() && this.blur ) {
					this.blur();
					return false;
				}
			},
			delegateType: "focusout"
		},
		click: {
			// For checkbox, fire native event so checked state will be right
			trigger: function() {
				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
					this.click();
					return false;
				}
			},

			// For cross-browser consistency, don't fire native .click() on links
			_default: function( event ) {
				return jQuery.nodeName( event.target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {

				// Support: Firefox 20+
				// Firefox doesn't alert if the returnValue field is not set.
				if ( event.result !== undefined && event.originalEvent ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	},

	simulate: function( type, elem, event, bubble ) {
		// Piggyback on a donor event to simulate a different one.
		// Fake originalEvent to avoid donor's stopPropagation, but if the
		// simulated event prevents default then we do the same on the donor.
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true,
				originalEvent: {}
			}
		);
		if ( bubble ) {
			jQuery.event.trigger( e, null, elem );
		} else {
			jQuery.event.dispatch.call( elem, e );
		}
		if ( e.isDefaultPrevented() ) {
			event.preventDefault();
		}
	}
};

jQuery.removeEvent = document.removeEventListener ?
	function( elem, type, handle ) {
		if ( elem.removeEventListener ) {
			elem.removeEventListener( type, handle, false );
		}
	} :
	function( elem, type, handle ) {
		var name = "on" + type;

		if ( elem.detachEvent ) {

			// #8545, #7054, preventing memory leaks for custom events in IE6-8
			// detachEvent needed property on element, by name of that event, to properly expose it to GC
			if ( typeof elem[ name ] === strundefined ) {
				elem[ name ] = null;
			}

			elem.detachEvent( name, handle );
		}
	};

jQuery.Event = function( src, props ) {
	// Allow instantiation without the 'new' keyword
	if ( !(this instanceof jQuery.Event) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ||
				src.defaultPrevented === undefined &&
				// Support: IE < 9, Android < 4.0
				src.returnValue === false ?
			returnTrue :
			returnFalse;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || jQuery.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;
		if ( !e ) {
			return;
		}

		// If preventDefault exists, run it on the original event
		if ( e.preventDefault ) {
			e.preventDefault();

		// Support: IE
		// Otherwise set the returnValue property of the original event to false
		} else {
			e.returnValue = false;
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;
		if ( !e ) {
			return;
		}
		// If stopPropagation exists, run it on the original event
		if ( e.stopPropagation ) {
			e.stopPropagation();
		}

		// Support: IE
		// Set the cancelBubble property of the original event to true
		e.cancelBubble = true;
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && e.stopImmediatePropagation ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Create mouseenter/leave events using mouseover/out and event-time checks
jQuery.each({
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mousenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
});

// IE submit delegation
if ( !support.submitBubbles ) {

	jQuery.event.special.submit = {
		setup: function() {
			// Only need this for delegated form submit events
			if ( jQuery.nodeName( this, "form" ) ) {
				return false;
			}

			// Lazy-add a submit handler when a descendant form may potentially be submitted
			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
				// Node name check avoids a VML-related crash in IE (#9807)
				var elem = e.target,
					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
				if ( form && !jQuery._data( form, "submitBubbles" ) ) {
					jQuery.event.add( form, "submit._submit", function( event ) {
						event._submit_bubble = true;
					});
					jQuery._data( form, "submitBubbles", true );
				}
			});
			// return undefined since we don't need an event listener
		},

		postDispatch: function( event ) {
			// If form was submitted by the user, bubble the event up the tree
			if ( event._submit_bubble ) {
				delete event._submit_bubble;
				if ( this.parentNode && !event.isTrigger ) {
					jQuery.event.simulate( "submit", this.parentNode, event, true );
				}
			}
		},

		teardown: function() {
			// Only need this for delegated form submit events
			if ( jQuery.nodeName( this, "form" ) ) {
				return false;
			}

			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
			jQuery.event.remove( this, "._submit" );
		}
	};
}

// IE change delegation and checkbox/radio fix
if ( !support.changeBubbles ) {

	jQuery.event.special.change = {

		setup: function() {

			if ( rformElems.test( this.nodeName ) ) {
				// IE doesn't fire change on a check/radio until blur; trigger it on click
				// after a propertychange. Eat the blur-change in special.change.handle.
				// This still fires onchange a second time for check/radio after blur.
				if ( this.type === "checkbox" || this.type === "radio" ) {
					jQuery.event.add( this, "propertychange._change", function( event ) {
						if ( event.originalEvent.propertyName === "checked" ) {
							this._just_changed = true;
						}
					});
					jQuery.event.add( this, "click._change", function( event ) {
						if ( this._just_changed && !event.isTrigger ) {
							this._just_changed = false;
						}
						// Allow triggered, simulated change events (#11500)
						jQuery.event.simulate( "change", this, event, true );
					});
				}
				return false;
			}
			// Delegated event; lazy-add a change handler on descendant inputs
			jQuery.event.add( this, "beforeactivate._change", function( e ) {
				var elem = e.target;

				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
					jQuery.event.add( elem, "change._change", function( event ) {
						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
							jQuery.event.simulate( "change", this.parentNode, event, true );
						}
					});
					jQuery._data( elem, "changeBubbles", true );
				}
			});
		},

		handle: function( event ) {
			var elem = event.target;

			// Swallow native change events from checkbox/radio, we already triggered them above
			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
				return event.handleObj.handler.apply( this, arguments );
			}
		},

		teardown: function() {
			jQuery.event.remove( this, "._change" );

			return !rformElems.test( this.nodeName );
		}
	};
}

// Create "bubbling" focus and blur events
if ( !support.focusinBubbles ) {
	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {

		// Attach a single capturing handler on the document while someone wants focusin/focusout
		var handler = function( event ) {
				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
			};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = jQuery._data( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				jQuery._data( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = jQuery._data( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					jQuery._removeData( doc, fix );
				} else {
					jQuery._data( doc, fix, attaches );
				}
			}
		};
	});
}

jQuery.fn.extend({

	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
		var type, origFn;

		// Types can be a map of types/handlers
		if ( typeof types === "object" ) {
			// ( types-Object, selector, data )
			if ( typeof selector !== "string" ) {
				// ( types-Object, data )
				data = data || selector;
				selector = undefined;
			}
			for ( type in types ) {
				this.on( type, selector, data, types[ type ], one );
			}
			return this;
		}

		if ( data == null && fn == null ) {
			// ( types, fn )
			fn = selector;
			data = selector = undefined;
		} else if ( fn == null ) {
			if ( typeof selector === "string" ) {
				// ( types, selector, fn )
				fn = data;
				data = undefined;
			} else {
				// ( types, data, fn )
				fn = data;
				data = selector;
				selector = undefined;
			}
		}
		if ( fn === false ) {
			fn = returnFalse;
		} else if ( !fn ) {
			return this;
		}

		if ( one === 1 ) {
			origFn = fn;
			fn = function( event ) {
				// Can use an empty set, since event contains the info
				jQuery().off( event );
				return origFn.apply( this, arguments );
			};
			// Use same guid so caller can remove using origFn
			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
		}
		return this.each( function() {
			jQuery.event.add( this, types, fn, data, selector );
		});
	},
	one: function( types, selector, data, fn ) {
		return this.on( types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {
			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {
			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {
			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each(function() {
			jQuery.event.remove( this, types, fn, selector );
		});
	},

	trigger: function( type, data ) {
		return this.each(function() {
			jQuery.event.trigger( type, data, this );
		});
	},
	triggerHandler: function( type, data ) {
		var elem = this[0];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
});


function createSafeFragment( document ) {
	var list = nodeNames.split( "|" ),
		safeFrag = document.createDocumentFragment();

	if ( safeFrag.createElement ) {
		while ( list.length ) {
			safeFrag.createElement(
				list.pop()
			);
		}
	}
	return safeFrag;
}

var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
	rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
	rleadingWhitespace = /^\s+/,
	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
	rtagName = /<([\w:]+)/,
	rtbody = /<tbody/i,
	rhtml = /<|&#?\w+;/,
	rnoInnerhtml = /<(?:script|style|link)/i,
	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
	rscriptType = /^$|\/(?:java|ecma)script/i,
	rscriptTypeMasked = /^true\/(.*)/,
	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,

	// We have to close these tags to support XHTML (#13200)
	wrapMap = {
		option: [ 1, "<select multiple='multiple'>", "</select>" ],
		legend: [ 1, "<fieldset>", "</fieldset>" ],
		area: [ 1, "<map>", "</map>" ],
		param: [ 1, "<object>", "</object>" ],
		thead: [ 1, "<table>", "</table>" ],
		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

		// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
		// unless wrapped in a div with non-breaking characters in front of it.
		_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>"  ]
	},
	safeFragment = createSafeFragment( document ),
	fragmentDiv = safeFragment.appendChild( document.createElement("div") );

wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

function getAll( context, tag ) {
	var elems, elem,
		i = 0,
		found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
			typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
			undefined;

	if ( !found ) {
		for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
			if ( !tag || jQuery.nodeName( elem, tag ) ) {
				found.push( elem );
			} else {
				jQuery.merge( found, getAll( elem, tag ) );
			}
		}
	}

	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
		jQuery.merge( [ context ], found ) :
		found;
}

// Used in buildFragment, fixes the defaultChecked property
function fixDefaultChecked( elem ) {
	if ( rcheckableType.test( elem.type ) ) {
		elem.defaultChecked = elem.checked;
	}
}

// Support: IE<8
// Manipulating tables requires a tbody
function manipulationTarget( elem, content ) {
	return jQuery.nodeName( elem, "table" ) &&
		jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?

		elem.getElementsByTagName("tbody")[0] ||
			elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
		elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	var match = rscriptTypeMasked.exec( elem.type );
	if ( match ) {
		elem.type = match[1];
	} else {
		elem.removeAttribute("type");
	}
	return elem;
}

// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var elem,
		i = 0;
	for ( ; (elem = elems[i]) != null; i++ ) {
		jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
	}
}

function cloneCopyEvent( src, dest ) {

	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
		return;
	}

	var type, i, l,
		oldData = jQuery._data( src ),
		curData = jQuery._data( dest, oldData ),
		events = oldData.events;

	if ( events ) {
		delete curData.handle;
		curData.events = {};

		for ( type in events ) {
			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
				jQuery.event.add( dest, type, events[ type ][ i ] );
			}
		}
	}

	// make the cloned public data object a copy from the original
	if ( curData.data ) {
		curData.data = jQuery.extend( {}, curData.data );
	}
}

function fixCloneNodeIssues( src, dest ) {
	var nodeName, e, data;

	// We do not need to do anything for non-Elements
	if ( dest.nodeType !== 1 ) {
		return;
	}

	nodeName = dest.nodeName.toLowerCase();

	// IE6-8 copies events bound via attachEvent when using cloneNode.
	if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
		data = jQuery._data( dest );

		for ( e in data.events ) {
			jQuery.removeEvent( dest, e, data.handle );
		}

		// Event data gets referenced instead of copied if the expando gets copied too
		dest.removeAttribute( jQuery.expando );
	}

	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
	if ( nodeName === "script" && dest.text !== src.text ) {
		disableScript( dest ).text = src.text;
		restoreScript( dest );

	// IE6-10 improperly clones children of object elements using classid.
	// IE10 throws NoModificationAllowedError if parent is null, #12132.
	} else if ( nodeName === "object" ) {
		if ( dest.parentNode ) {
			dest.outerHTML = src.outerHTML;
		}

		// This path appears unavoidable for IE9. When cloning an object
		// element in IE9, the outerHTML strategy above is not sufficient.
		// If the src has innerHTML and the destination does not,
		// copy the src.innerHTML into the dest.innerHTML. #10324
		if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
			dest.innerHTML = src.innerHTML;
		}

	} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
		// IE6-8 fails to persist the checked state of a cloned checkbox
		// or radio button. Worse, IE6-7 fail to give the cloned element
		// a checked appearance if the defaultChecked value isn't also set

		dest.defaultChecked = dest.checked = src.checked;

		// IE6-7 get confused and end up setting the value of a cloned
		// checkbox/radio button to an empty string instead of "on"
		if ( dest.value !== src.value ) {
			dest.value = src.value;
		}

	// IE6-8 fails to return the selected option to the default selected
	// state when cloning options
	} else if ( nodeName === "option" ) {
		dest.defaultSelected = dest.selected = src.defaultSelected;

	// IE6-8 fails to set the defaultValue to the correct value when
	// cloning other types of input fields
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

jQuery.extend({
	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var destElements, node, clone, i, srcElements,
			inPage = jQuery.contains( elem.ownerDocument, elem );

		if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
			clone = elem.cloneNode( true );

		// IE<=8 does not properly clone detached, unknown element nodes
		} else {
			fragmentDiv.innerHTML = elem.outerHTML;
			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
		}

		if ( (!support.noCloneEvent || !support.noCloneChecked) &&
				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {

			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			// Fix all IE cloning issues
			for ( i = 0; (node = srcElements[i]) != null; ++i ) {
				// Ensure that the destination node is not null; Fixes #9587
				if ( destElements[i] ) {
					fixCloneNodeIssues( node, destElements[i] );
				}
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0; (node = srcElements[i]) != null; i++ ) {
					cloneCopyEvent( node, destElements[i] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		destElements = srcElements = node = null;

		// Return the cloned set
		return clone;
	},

	buildFragment: function( elems, context, scripts, selection ) {
		var j, elem, contains,
			tmp, tag, tbody, wrap,
			l = elems.length,

			// Ensure a safe fragment
			safe = createSafeFragment( context ),

			nodes = [],
			i = 0;

		for ( ; i < l; i++ ) {
			elem = elems[ i ];

			if ( elem || elem === 0 ) {

				// Add nodes directly
				if ( jQuery.type( elem ) === "object" ) {
					jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

				// Convert non-html into a text node
				} else if ( !rhtml.test( elem ) ) {
					nodes.push( context.createTextNode( elem ) );

				// Convert html into DOM nodes
				} else {
					tmp = tmp || safe.appendChild( context.createElement("div") );

					// Deserialize a standard representation
					tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase();
					wrap = wrapMap[ tag ] || wrapMap._default;

					tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];

					// Descend through wrappers to the right content
					j = wrap[0];
					while ( j-- ) {
						tmp = tmp.lastChild;
					}

					// Manually add leading whitespace removed by IE
					if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
						nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
					}

					// Remove IE's autoinserted <tbody> from table fragments
					if ( !support.tbody ) {

						// String was a <table>, *may* have spurious <tbody>
						elem = tag === "table" && !rtbody.test( elem ) ?
							tmp.firstChild :

							// String was a bare <thead> or <tfoot>
							wrap[1] === "<table>" && !rtbody.test( elem ) ?
								tmp :
								0;

						j = elem && elem.childNodes.length;
						while ( j-- ) {
							if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
								elem.removeChild( tbody );
							}
						}
					}

					jQuery.merge( nodes, tmp.childNodes );

					// Fix #12392 for WebKit and IE > 9
					tmp.textContent = "";

					// Fix #12392 for oldIE
					while ( tmp.firstChild ) {
						tmp.removeChild( tmp.firstChild );
					}

					// Remember the top-level container for proper cleanup
					tmp = safe.lastChild;
				}
			}
		}

		// Fix #11356: Clear elements from fragment
		if ( tmp ) {
			safe.removeChild( tmp );
		}

		// Reset defaultChecked for any radios and checkboxes
		// about to be appended to the DOM in IE 6/7 (#8060)
		if ( !support.appendChecked ) {
			jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
		}

		i = 0;
		while ( (elem = nodes[ i++ ]) ) {

			// #4087 - If origin and destination elements are the same, and this is
			// that element, do not do anything
			if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
				continue;
			}

			contains = jQuery.contains( elem.ownerDocument, elem );

			// Append to fragment
			tmp = getAll( safe.appendChild( elem ), "script" );

			// Preserve script evaluation history
			if ( contains ) {
				setGlobalEval( tmp );
			}

			// Capture executables
			if ( scripts ) {
				j = 0;
				while ( (elem = tmp[ j++ ]) ) {
					if ( rscriptType.test( elem.type || "" ) ) {
						scripts.push( elem );
					}
				}
			}
		}

		tmp = null;

		return safe;
	},

	cleanData: function( elems, /* internal */ acceptData ) {
		var elem, type, id, data,
			i = 0,
			internalKey = jQuery.expando,
			cache = jQuery.cache,
			deleteExpando = support.deleteExpando,
			special = jQuery.event.special;

		for ( ; (elem = elems[i]) != null; i++ ) {
			if ( acceptData || jQuery.acceptData( elem ) ) {

				id = elem[ internalKey ];
				data = id && cache[ id ];

				if ( data ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Remove cache only if it was not already removed by jQuery.event.remove
					if ( cache[ id ] ) {

						delete cache[ id ];

						// IE does not allow us to delete expando properties from nodes,
						// nor does it have a removeAttribute function on Document nodes;
						// we must handle all of these cases
						if ( deleteExpando ) {
							delete elem[ internalKey ];

						} else if ( typeof elem.removeAttribute !== strundefined ) {
							elem.removeAttribute( internalKey );

						} else {
							elem[ internalKey ] = null;
						}

						deletedIds.push( id );
					}
				}
			}
		}
	}
});

jQuery.fn.extend({
	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
		}, null, value, arguments.length );
	},

	append: function() {
		return this.domManip( arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		});
	},

	prepend: function() {
		return this.domManip( arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		});
	},

	before: function() {
		return this.domManip( arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		});
	},

	after: function() {
		return this.domManip( arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		});
	},

	remove: function( selector, keepData /* Internal Use Only */ ) {
		var elem,
			elems = selector ? jQuery.filter( selector, this ) : this,
			i = 0;

		for ( ; (elem = elems[i]) != null; i++ ) {

			if ( !keepData && elem.nodeType === 1 ) {
				jQuery.cleanData( getAll( elem ) );
			}

			if ( elem.parentNode ) {
				if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
					setGlobalEval( getAll( elem, "script" ) );
				}
				elem.parentNode.removeChild( elem );
			}
		}

		return this;
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; (elem = this[i]) != null; i++ ) {
			// Remove element nodes and prevent memory leaks
			if ( elem.nodeType === 1 ) {
				jQuery.cleanData( getAll( elem, false ) );
			}

			// Remove any remaining nodes
			while ( elem.firstChild ) {
				elem.removeChild( elem.firstChild );
			}

			// If this is a select, ensure that it displays empty (#12336)
			// Support: IE<9
			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
				elem.options.length = 0;
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map(function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		});
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined ) {
				return elem.nodeType === 1 ?
					elem.innerHTML.replace( rinlinejQuery, "" ) :
					undefined;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
				( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
				!wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {

				value = value.replace( rxhtmlTag, "<$1></$2>" );

				try {
					for (; i < l; i++ ) {
						// Remove element nodes and prevent memory leaks
						elem = this[i] || {};
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch(e) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var arg = arguments[ 0 ];

		// Make the changes, replacing each context element with the new content
		this.domManip( arguments, function( elem ) {
			arg = this.parentNode;

			jQuery.cleanData( getAll( this ) );

			if ( arg ) {
				arg.replaceChild( elem, this );
			}
		});

		// Force removal if there was no new content (e.g., from empty arguments)
		return arg && (arg.length || arg.nodeType) ? this : this.remove();
	},

	detach: function( selector ) {
		return this.remove( selector, true );
	},

	domManip: function( args, callback ) {

		// Flatten any nested arrays
		args = concat.apply( [], args );

		var first, node, hasScripts,
			scripts, doc, fragment,
			i = 0,
			l = this.length,
			set = this,
			iNoClone = l - 1,
			value = args[0],
			isFunction = jQuery.isFunction( value );

		// We can't cloneNode fragments that contain checked, in WebKit
		if ( isFunction ||
				( l > 1 && typeof value === "string" &&
					!support.checkClone && rchecked.test( value ) ) ) {
			return this.each(function( index ) {
				var self = set.eq( index );
				if ( isFunction ) {
					args[0] = value.call( this, index, self.html() );
				}
				self.domManip( args, callback );
			});
		}

		if ( l ) {
			fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
			first = fragment.firstChild;

			if ( fragment.childNodes.length === 1 ) {
				fragment = first;
			}

			if ( first ) {
				scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
				hasScripts = scripts.length;

				// Use the original fragment for the last item instead of the first because it can end up
				// being emptied incorrectly in certain situations (#8070).
				for ( ; i < l; i++ ) {
					node = fragment;

					if ( i !== iNoClone ) {
						node = jQuery.clone( node, true, true );

						// Keep references to cloned scripts for later restoration
						if ( hasScripts ) {
							jQuery.merge( scripts, getAll( node, "script" ) );
						}
					}

					callback.call( this[i], node, i );
				}

				if ( hasScripts ) {
					doc = scripts[ scripts.length - 1 ].ownerDocument;

					// Reenable scripts
					jQuery.map( scripts, restoreScript );

					// Evaluate executable scripts on first document insertion
					for ( i = 0; i < hasScripts; i++ ) {
						node = scripts[ i ];
						if ( rscriptType.test( node.type || "" ) &&
							!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {

							if ( node.src ) {
								// Optional AJAX dependency, but won't run scripts if not present
								if ( jQuery._evalUrl ) {
									jQuery._evalUrl( node.src );
								}
							} else {
								jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
							}
						}
					}
				}

				// Fix #11809: Avoid leaking memory
				fragment = first = null;
			}
		}

		return this;
	}
});

jQuery.each({
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			i = 0,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone(true);
			jQuery( insert[i] )[ original ]( elems );

			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
});


var iframe,
	elemdisplay = {};

/**
 * Retrieve the actual display of a element
 * @param {String} name nodeName of the element
 * @param {Object} doc Document object
 */
// Called only from within defaultDisplay
function actualDisplay( name, doc ) {
	var style,
		elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),

		// getDefaultComputedStyle might be reliably used only on attached element
		display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?

			// Use of this method is a temporary fix (more like optmization) until something better comes along,
			// since it was removed from specification and supported only in FF
			style.display : jQuery.css( elem[ 0 ], "display" );

	// We don't have any data stored on the element,
	// so use "detach" method as fast way to get rid of the element
	elem.detach();

	return display;
}

/**
 * Try to determine the default display value of an element
 * @param {String} nodeName
 */
function defaultDisplay( nodeName ) {
	var doc = document,
		display = elemdisplay[ nodeName ];

	if ( !display ) {
		display = actualDisplay( nodeName, doc );

		// If the simple way fails, read from inside an iframe
		if ( display === "none" || !display ) {

			// Use the already-created iframe if possible
			iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );

			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
			doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;

			// Support: IE
			doc.write();
			doc.close();

			display = actualDisplay( nodeName, doc );
			iframe.detach();
		}

		// Store the correct default display
		elemdisplay[ nodeName ] = display;
	}

	return display;
}


(function() {
	var shrinkWrapBlocksVal;

	support.shrinkWrapBlocks = function() {
		if ( shrinkWrapBlocksVal != null ) {
			return shrinkWrapBlocksVal;
		}

		// Will be changed later if needed.
		shrinkWrapBlocksVal = false;

		// Minified: var b,c,d
		var div, body, container;

		body = document.getElementsByTagName( "body" )[ 0 ];
		if ( !body || !body.style ) {
			// Test fired too early or in an unsupported environment, exit.
			return;
		}

		// Setup
		div = document.createElement( "div" );
		container = document.createElement( "div" );
		container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
		body.appendChild( container ).appendChild( div );

		// Support: IE6
		// Check if elements with layout shrink-wrap their children
		if ( typeof div.style.zoom !== strundefined ) {
			// Reset CSS: box-sizing; display; margin; border
			div.style.cssText =
				// Support: Firefox<29, Android 2.3
				// Vendor-prefix box-sizing
				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
				"box-sizing:content-box;display:block;margin:0;border:0;" +
				"padding:1px;width:1px;zoom:1";
			div.appendChild( document.createElement( "div" ) ).style.width = "5px";
			shrinkWrapBlocksVal = div.offsetWidth !== 3;
		}

		body.removeChild( container );

		return shrinkWrapBlocksVal;
	};

})();
var rmargin = (/^margin/);

var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );



var getStyles, curCSS,
	rposition = /^(top|right|bottom|left)$/;

if ( window.getComputedStyle ) {
	getStyles = function( elem ) {
		// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		if ( elem.ownerDocument.defaultView.opener ) {
			return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
		}

		return window.getComputedStyle( elem, null );
	};

	curCSS = function( elem, name, computed ) {
		var width, minWidth, maxWidth, ret,
			style = elem.style;

		computed = computed || getStyles( elem );

		// getPropertyValue is only needed for .css('filter') in IE9, see #12537
		ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;

		if ( computed ) {

			if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
				ret = jQuery.style( elem, name );
			}

			// A tribute to the "awesome hack by Dean Edwards"
			// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
			// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
			// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
			if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {

				// Remember the original values
				width = style.width;
				minWidth = style.minWidth;
				maxWidth = style.maxWidth;

				// Put in the new values to get a computed value out
				style.minWidth = style.maxWidth = style.width = ret;
				ret = computed.width;

				// Revert the changed values
				style.width = width;
				style.minWidth = minWidth;
				style.maxWidth = maxWidth;
			}
		}

		// Support: IE
		// IE returns zIndex value as an integer.
		return ret === undefined ?
			ret :
			ret + "";
	};
} else if ( document.documentElement.currentStyle ) {
	getStyles = function( elem ) {
		return elem.currentStyle;
	};

	curCSS = function( elem, name, computed ) {
		var left, rs, rsLeft, ret,
			style = elem.style;

		computed = computed || getStyles( elem );
		ret = computed ? computed[ name ] : undefined;

		// Avoid setting ret to empty string here
		// so we don't default to auto
		if ( ret == null && style && style[ name ] ) {
			ret = style[ name ];
		}

		// From the awesome hack by Dean Edwards
		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

		// If we're not dealing with a regular pixel number
		// but a number that has a weird ending, we need to convert it to pixels
		// but not position css attributes, as those are proportional to the parent element instead
		// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {

			// Remember the original values
			left = style.left;
			rs = elem.runtimeStyle;
			rsLeft = rs && rs.left;

			// Put in the new values to get a computed value out
			if ( rsLeft ) {
				rs.left = elem.currentStyle.left;
			}
			style.left = name === "fontSize" ? "1em" : ret;
			ret = style.pixelLeft + "px";

			// Revert the changed values
			style.left = left;
			if ( rsLeft ) {
				rs.left = rsLeft;
			}
		}

		// Support: IE
		// IE returns zIndex value as an integer.
		return ret === undefined ?
			ret :
			ret + "" || "auto";
	};
}




function addGetHookIf( conditionFn, hookFn ) {
	// Define the hook, we'll check on the first run if it's really needed.
	return {
		get: function() {
			var condition = conditionFn();

			if ( condition == null ) {
				// The test was not ready at this point; screw the hook this time
				// but check again when needed next time.
				return;
			}

			if ( condition ) {
				// Hook not needed (or it's not possible to use it due to missing dependency),
				// remove it.
				// Since there are no other hooks for marginRight, remove the whole object.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.

			return (this.get = hookFn).apply( this, arguments );
		}
	};
}


(function() {
	// Minified: var b,c,d,e,f,g, h,i
	var div, style, a, pixelPositionVal, boxSizingReliableVal,
		reliableHiddenOffsetsVal, reliableMarginRightVal;

	// Setup
	div = document.createElement( "div" );
	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
	a = div.getElementsByTagName( "a" )[ 0 ];
	style = a && a.style;

	// Finish early in limited (non-browser) environments
	if ( !style ) {
		return;
	}

	style.cssText = "float:left;opacity:.5";

	// Support: IE<9
	// Make sure that element opacity exists (as opposed to filter)
	support.opacity = style.opacity === "0.5";

	// Verify style float existence
	// (IE uses styleFloat instead of cssFloat)
	support.cssFloat = !!style.cssFloat;

	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	// Support: Firefox<29, Android 2.3
	// Vendor-prefix box-sizing
	support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
		style.WebkitBoxSizing === "";

	jQuery.extend(support, {
		reliableHiddenOffsets: function() {
			if ( reliableHiddenOffsetsVal == null ) {
				computeStyleTests();
			}
			return reliableHiddenOffsetsVal;
		},

		boxSizingReliable: function() {
			if ( boxSizingReliableVal == null ) {
				computeStyleTests();
			}
			return boxSizingReliableVal;
		},

		pixelPosition: function() {
			if ( pixelPositionVal == null ) {
				computeStyleTests();
			}
			return pixelPositionVal;
		},

		// Support: Android 2.3
		reliableMarginRight: function() {
			if ( reliableMarginRightVal == null ) {
				computeStyleTests();
			}
			return reliableMarginRightVal;
		}
	});

	function computeStyleTests() {
		// Minified: var b,c,d,j
		var div, body, container, contents;

		body = document.getElementsByTagName( "body" )[ 0 ];
		if ( !body || !body.style ) {
			// Test fired too early or in an unsupported environment, exit.
			return;
		}

		// Setup
		div = document.createElement( "div" );
		container = document.createElement( "div" );
		container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
		body.appendChild( container ).appendChild( div );

		div.style.cssText =
			// Support: Firefox<29, Android 2.3
			// Vendor-prefix box-sizing
			"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
			"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
			"border:1px;padding:1px;width:4px;position:absolute";

		// Support: IE<9
		// Assume reasonable values in the absence of getComputedStyle
		pixelPositionVal = boxSizingReliableVal = false;
		reliableMarginRightVal = true;

		// Check for getComputedStyle so that this code is not run in IE<9.
		if ( window.getComputedStyle ) {
			pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
			boxSizingReliableVal =
				( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";

			// Support: Android 2.3
			// Div with explicit width and no margin-right incorrectly
			// gets computed margin-right based on width of container (#3333)
			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
			contents = div.appendChild( document.createElement( "div" ) );

			// Reset CSS: box-sizing; display; margin; border; padding
			contents.style.cssText = div.style.cssText =
				// Support: Firefox<29, Android 2.3
				// Vendor-prefix box-sizing
				"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
				"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
			contents.style.marginRight = contents.style.width = "0";
			div.style.width = "1px";

			reliableMarginRightVal =
				!parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight );

			div.removeChild( contents );
		}

		// Support: IE8
		// Check if table cells still have offsetWidth/Height when they are set
		// to display:none and there are still other visible table cells in a
		// table row; if so, offsetWidth/Height are not reliable for use when
		// determining if an element has been hidden directly using
		// display:none (it is still safe to use offsets if a parent element is
		// hidden; don safety goggles and see bug #4512 for more information).
		div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
		contents = div.getElementsByTagName( "td" );
		contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none";
		reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
		if ( reliableHiddenOffsetsVal ) {
			contents[ 0 ].style.display = "";
			contents[ 1 ].style.display = "none";
			reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;
		}

		body.removeChild( container );
	}

})();


// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.apply( elem, args || [] );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
};


var
		ralpha = /alpha\([^)]*\)/i,
	ropacity = /opacity\s*=\s*([^)]*)/,

	// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
	// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
	rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
	rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),

	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	},

	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];


// return a css property mapped to a potentially vendor prefixed property
function vendorPropName( style, name ) {

	// shortcut for names that are not vendor prefixed
	if ( name in style ) {
		return name;
	}

	// check for vendor prefixed names
	var capName = name.charAt(0).toUpperCase() + name.slice(1),
		origName = name,
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in style ) {
			return name;
		}
	}

	return origName;
}

function showHide( elements, show ) {
	var display, elem, hidden,
		values = [],
		index = 0,
		length = elements.length;

	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		values[ index ] = jQuery._data( elem, "olddisplay" );
		display = elem.style.display;
		if ( show ) {
			// Reset the inline display of this element to learn if it is
			// being hidden by cascaded rules or not
			if ( !values[ index ] && display === "none" ) {
				elem.style.display = "";
			}

			// Set elements which have been overridden with display: none
			// in a stylesheet to whatever the default browser style is
			// for such an element
			if ( elem.style.display === "" && isHidden( elem ) ) {
				values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
			}
		} else {
			hidden = isHidden( elem );

			if ( display && display !== "none" || !hidden ) {
				jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
			}
		}
	}

	// Set the display of most of the elements in a second loop
	// to avoid the constant reflow
	for ( index = 0; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}
		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
			elem.style.display = show ? values[ index ] || "" : "none";
		}
	}

	return elements;
}

function setPositiveNumber( elem, value, subtract ) {
	var matches = rnumsplit.exec( value );
	return matches ?
		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
		value;
}

function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
	var i = extra === ( isBorderBox ? "border" : "content" ) ?
		// If we already have the right measurement, avoid augmentation
		4 :
		// Otherwise initialize for horizontal or vertical properties
		name === "width" ? 1 : 0,

		val = 0;

	for ( ; i < 4; i += 2 ) {
		// both box models exclude margin, so add it if we want it
		if ( extra === "margin" ) {
			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
		}

		if ( isBorderBox ) {
			// border-box includes padding, so remove it if we want content
			if ( extra === "content" ) {
				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// at this point, extra isn't border nor margin, so remove border
			if ( extra !== "margin" ) {
				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		} else {
			// at this point, extra isn't content, so add padding
			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// at this point, extra isn't content nor padding, so add border
			if ( extra !== "padding" ) {
				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	return val;
}

function getWidthOrHeight( elem, name, extra ) {

	// Start with offset property, which is equivalent to the border-box value
	var valueIsBorderBox = true,
		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
		styles = getStyles( elem ),
		isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

	// some non-html elements return undefined for offsetWidth, so check for null/undefined
	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
	if ( val <= 0 || val == null ) {
		// Fall back to computed then uncomputed css if necessary
		val = curCSS( elem, name, styles );
		if ( val < 0 || val == null ) {
			val = elem.style[ name ];
		}

		// Computed unit is not pixels. Stop here and return.
		if ( rnumnonpx.test(val) ) {
			return val;
		}

		// we need the check for style in case a browser which returns unreliable values
		// for getComputedStyle silently falls back to the reliable elem.style
		valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] );

		// Normalize "", auto, and prepare for extra
		val = parseFloat( val ) || 0;
	}

	// use the active box-sizing model to add/subtract irrelevant styles
	return ( val +
		augmentWidthOrHeight(
			elem,
			name,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles
		)
	) + "px";
}

jQuery.extend({
	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {
		opacity: {
			get: function( elem, computed ) {
				if ( computed ) {
					// We should always get a number back from opacity
					var ret = curCSS( elem, "opacity" );
					return ret === "" ? "1" : ret;
				}
			}
		}
	},

	// Don't automatically add "px" to these possibly-unitless properties
	cssNumber: {
		"columnCount": true,
		"fillOpacity": true,
		"flexGrow": true,
		"flexShrink": true,
		"fontWeight": true,
		"lineHeight": true,
		"opacity": true,
		"order": true,
		"orphans": true,
		"widows": true,
		"zIndex": true,
		"zoom": true
	},

	// Add in properties whose names you wish to fix before
	// setting or getting the value
	cssProps: {
		// normalize float css property
		"float": support.cssFloat ? "cssFloat" : "styleFloat"
	},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {
		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = jQuery.camelCase( name ),
			style = elem.style;

		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );

		// gets hook for the prefixed version
		// followed by the unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// convert relative number strings (+= or -=) to relative numbers. #7345
			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
				value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
				// Fixes bug #9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set. See: #7116
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add 'px' to the (except for certain CSS properties)
			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
				value += "px";
			}

			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
			// but it would mean to define eight (for every problematic property) identical functions
			if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {

				// Support: IE
				// Swallow errors from 'invalid' CSS values (#5509)
				try {
					style[ name ] = value;
				} catch(e) {}
			}

		} else {
			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var num, val, hooks,
			origName = jQuery.camelCase( name );

		// Make sure that we're working with the right name
		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );

		// gets hook for the prefixed version
		// followed by the unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		//convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Return, converting to number if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
		}
		return val;
	}
});

jQuery.each([ "height", "width" ], function( i, name ) {
	jQuery.cssHooks[ name ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {
				// certain elements can have dimension info if we invisibly show them
				// however, it must have a current display style that would benefit from this
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
					jQuery.swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, name, extra );
					}) :
					getWidthOrHeight( elem, name, extra );
			}
		},

		set: function( elem, value, extra ) {
			var styles = extra && getStyles( elem );
			return setPositiveNumber( elem, value, extra ?
				augmentWidthOrHeight(
					elem,
					name,
					extra,
					support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
					styles
				) : 0
			);
		}
	};
});

if ( !support.opacity ) {
	jQuery.cssHooks.opacity = {
		get: function( elem, computed ) {
			// IE uses filters for opacity
			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
				( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
				computed ? "1" : "";
		},

		set: function( elem, value ) {
			var style = elem.style,
				currentStyle = elem.currentStyle,
				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
				filter = currentStyle && currentStyle.filter || style.filter || "";

			// IE has trouble with opacity if it does not have layout
			// Force it by setting the zoom level
			style.zoom = 1;

			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
			// if value === "", then remove inline opacity #12685
			if ( ( value >= 1 || value === "" ) &&
					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
					style.removeAttribute ) {

				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
				// if "filter:" is present at all, clearType is disabled, we want to avoid this
				// style.removeAttribute is IE Only, but so apparently is this code path...
				style.removeAttribute( "filter" );

				// if there is no filter style applied in a css rule or unset inline opacity, we are done
				if ( value === "" || currentStyle && !currentStyle.filter ) {
					return;
				}
			}

			// otherwise, set new filter values
			style.filter = ralpha.test( filter ) ?
				filter.replace( ralpha, opacity ) :
				filter + " " + opacity;
		}
	};
}

jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
	function( elem, computed ) {
		if ( computed ) {
			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
			// Work around by temporarily setting element display to inline-block
			return jQuery.swap( elem, { "display": "inline-block" },
				curCSS, [ elem, "marginRight" ] );
		}
	}
);

// These hooks are used by animate to expand properties
jQuery.each({
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// assumes a single number if not a string
				parts = typeof value === "string" ? value.split(" ") : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( !rmargin.test( prefix ) ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
});

jQuery.fn.extend({
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( jQuery.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	},
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each(function() {
			if ( isHidden( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		});
	}
});


function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || "swing";
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			if ( tween.elem[ tween.prop ] != null &&
				(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
				return tween.elem[ tween.prop ];
			}

			// passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails
			// so, simple values such as "10px" are parsed to Float.
			// complex values such as "rotate(1rad)" are returned as is.
			result = jQuery.css( tween.elem, tween.prop, "" );
			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {
			// use step hook for back compat - use cssHook if its there - use .style if its
			// available and use plain properties where available
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

// Support: IE <=9
// Panic based approach to setting things on disconnected nodes

Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
	set: function( tween ) {
		if ( tween.elem.nodeType && tween.elem.parentNode ) {
			tween.elem[ tween.prop ] = tween.now;
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	}
};

jQuery.fx = Tween.prototype.init;

// Back Compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, timerId,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
	rrun = /queueHooks$/,
	animationPrefilters = [ defaultPrefilter ],
	tweeners = {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value ),
				target = tween.cur(),
				parts = rfxnum.exec( value ),
				unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

				// Starting value computation is required for potential unit mismatches
				start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
					rfxnum.exec( jQuery.css( tween.elem, prop ) ),
				scale = 1,
				maxIterations = 20;

			if ( start && start[ 3 ] !== unit ) {
				// Trust units reported by jQuery.css
				unit = unit || start[ 3 ];

				// Make sure we update the tween properties later on
				parts = parts || [];

				// Iteratively approximate from a nonzero starting point
				start = +target || 1;

				do {
					// If previous iteration zeroed out, double until we get *something*
					// Use a string for doubling factor so we don't accidentally see scale as unchanged below
					scale = scale || ".5";

					// Adjust and apply
					start = start / scale;
					jQuery.style( tween.elem, prop, start + unit );

				// Update scale, tolerating zero or NaN from tween.cur()
				// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
				} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
			}

			// Update tween properties
			if ( parts ) {
				start = tween.start = +start || +target || 0;
				tween.unit = unit;
				// If a +=/-= token was provided, we're doing a relative animation
				tween.end = parts[ 1 ] ?
					start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
					+parts[ 2 ];
			}

			return tween;
		} ]
	};

// Animations created synchronously will run synchronously
function createFxNow() {
	setTimeout(function() {
		fxNow = undefined;
	});
	return ( fxNow = jQuery.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		attrs = { height: type },
		i = 0;

	// if we include width, step value is 1 to do all cssExpand values,
	// if we don't include width, step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4 ; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( (tween = collection[ index ].call( animation, prop, value )) ) {

			// we're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	/* jshint validthis: true */
	var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHidden( elem ),
		dataShow = jQuery._data( elem, "fxshow" );

	// handle queue: false promises
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always(function() {
			// doing this makes sure that the complete handler will be called
			// before this completes
			anim.always(function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			});
		});
	}

	// height/width overflow pass
	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
		// Make sure that nothing sneaks out
		// Record all 3 overflow attributes because IE does not
		// change the overflow attribute when overflowX and
		// overflowY are set to the same value
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Set display property to inline-block for height/width
		// animations on inline elements that are having width/height animated
		display = jQuery.css( elem, "display" );

		// Test default display if display is currently "none"
		checkDisplay = display === "none" ?
			jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;

		if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {

			// inline-level elements accept inline-block;
			// block-level elements need to be inline with layout
			if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
				style.display = "inline-block";
			} else {
				style.zoom = 1;
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		if ( !support.shrinkWrapBlocks() ) {
			anim.always(function() {
				style.overflow = opts.overflow[ 0 ];
				style.overflowX = opts.overflow[ 1 ];
				style.overflowY = opts.overflow[ 2 ];
			});
		}
	}

	// show/hide pass
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.exec( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );

		// Any non-fx value stops us from restoring the original display value
		} else {
			display = undefined;
		}
	}

	if ( !jQuery.isEmptyObject( orig ) ) {
		if ( dataShow ) {
			if ( "hidden" in dataShow ) {
				hidden = dataShow.hidden;
			}
		} else {
			dataShow = jQuery._data( elem, "fxshow", {} );
		}

		// store state if its toggle - enables .stop().toggle() to "reverse"
		if ( toggle ) {
			dataShow.hidden = !hidden;
		}
		if ( hidden ) {
			jQuery( elem ).show();
		} else {
			anim.done(function() {
				jQuery( elem ).hide();
			});
		}
		anim.done(function() {
			var prop;
			jQuery._removeData( elem, "fxshow" );
			for ( prop in orig ) {
				jQuery.style( elem, prop, orig[ prop ] );
			}
		});
		for ( prop in orig ) {
			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );

			if ( !( prop in dataShow ) ) {
				dataShow[ prop ] = tween.start;
				if ( hidden ) {
					tween.end = tween.start;
					tween.start = prop === "width" || prop === "height" ? 1 : 0;
				}
			}
		}

	// If this is a noop like .hide().hide(), restore an overwritten display value
	} else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
		style.display = display;
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = jQuery.camelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( jQuery.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// not quite $.extend, this wont overwrite keys already present.
			// also - reusing 'index' from above because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = animationPrefilters.length,
		deferred = jQuery.Deferred().always( function() {
			// don't match elem in the :animated selector
			delete tick.elem;
		}),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
				// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
				temp = remaining / animation.duration || 0,
				percent = 1 - temp,
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length ; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ]);

			if ( percent < 1 && length ) {
				return remaining;
			} else {
				deferred.resolveWith( elem, [ animation ] );
				return false;
			}
		},
		animation = deferred.promise({
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, { specialEasing: {} }, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
						animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,
					// if we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length ; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// resolve when we played the last frame
				// otherwise, reject
				if ( gotoEnd ) {
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		}),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length ; index++ ) {
		result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( jQuery.isFunction( animation.opts.start ) ) {
		animation.opts.start.call( elem, animation );
	}

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		})
	);

	// attach callbacks from options
	return animation.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );
}

jQuery.Animation = jQuery.extend( Animation, {
	tweener: function( props, callback ) {
		if ( jQuery.isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.split(" ");
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length ; index++ ) {
			prop = props[ index ];
			tweeners[ prop ] = tweeners[ prop ] || [];
			tweeners[ prop ].unshift( callback );
		}
	},

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			animationPrefilters.unshift( callback );
		} else {
			animationPrefilters.push( callback );
		}
	}
});

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || !fn && easing ||
			jQuery.isFunction( speed ) && speed,
		duration: speed,
		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
	};

	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
		opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;

	// normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( jQuery.isFunction( opt.old ) ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend({
	fadeTo: function( speed, to, easing, callback ) {

		// show any hidden elements after setting opacity to 0
		return this.filter( isHidden ).css( "opacity", 0 ).show()

			// animate to the value specified
			.end().animate({ opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {
				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || jQuery._data( this, "finish" ) ) {
					anim.stop( true );
				}
			};
			doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue && type !== false ) {
			this.queue( type || "fx", [] );
		}

		return this.each(function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = jQuery._data( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// start the next in the queue if the last step wasn't forced
			// timers currently will call their complete callbacks, which will dequeue
			// but only if they were gotoEnd
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		});
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each(function() {
			var index,
				data = jQuery._data( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// enable finishing flag on private data
			data.finish = true;

			// empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// turn off finishing flag
			delete data.finish;
		});
	}
});

jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
});

// Generate shortcuts for custom animations
jQuery.each({
	slideDown: genFx("show"),
	slideUp: genFx("hide"),
	slideToggle: genFx("toggle"),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
});

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		timers = jQuery.timers,
		i = 0;

	fxNow = jQuery.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];
		// Checks the timer has not already been removed
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	if ( timer() ) {
		jQuery.fx.start();
	} else {
		jQuery.timers.pop();
	}
};

jQuery.fx.interval = 13;

jQuery.fx.start = function() {
	if ( !timerId ) {
		timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
	}
};

jQuery.fx.stop = function() {
	clearInterval( timerId );
	timerId = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,
	// Default speed
	_default: 400
};


// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = setTimeout( next, time );
		hooks.stop = function() {
			clearTimeout( timeout );
		};
	});
};


(function() {
	// Minified: var a,b,c,d,e
	var input, div, select, a, opt;

	// Setup
	div = document.createElement( "div" );
	div.setAttribute( "className", "t" );
	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
	a = div.getElementsByTagName("a")[ 0 ];

	// First batch of tests.
	select = document.createElement("select");
	opt = select.appendChild( document.createElement("option") );
	input = div.getElementsByTagName("input")[ 0 ];

	a.style.cssText = "top:1px";

	// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
	support.getSetAttribute = div.className !== "t";

	// Get the style information from getAttribute
	// (IE uses .cssText instead)
	support.style = /top/.test( a.getAttribute("style") );

	// Make sure that URLs aren't manipulated
	// (IE normalizes it by default)
	support.hrefNormalized = a.getAttribute("href") === "/a";

	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
	support.checkOn = !!input.value;

	// Make sure that a selected-by-default option has a working selected property.
	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
	support.optSelected = opt.selected;

	// Tests for enctype support on a form (#6743)
	support.enctype = !!document.createElement("form").enctype;

	// Make sure that the options inside disabled selects aren't marked as disabled
	// (WebKit marks them as disabled)
	select.disabled = true;
	support.optDisabled = !opt.disabled;

	// Support: IE8 only
	// Check if we can trust getAttribute("value")
	input = document.createElement( "input" );
	input.setAttribute( "value", "" );
	support.input = input.getAttribute( "value" ) === "";

	// Check if an input maintains its value after becoming a radio
	input.value = "t";
	input.setAttribute( "type", "radio" );
	support.radioValue = input.value === "t";
})();


var rreturn = /\r/g;

jQuery.fn.extend({
	val: function( value ) {
		var hooks, ret, isFunction,
			elem = this[0];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
					return ret;
				}

				ret = elem.value;

				return typeof ret === "string" ?
					// handle most common string cases
					ret.replace(rreturn, "") :
					// handle cases where value is null/undef or number
					ret == null ? "" : ret;
			}

			return;
		}

		isFunction = jQuery.isFunction( value );

		return this.each(function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( isFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";
			} else if ( typeof val === "number" ) {
				val += "";
			} else if ( jQuery.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				});
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		});
	}
});

jQuery.extend({
	valHooks: {
		option: {
			get: function( elem ) {
				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :
					// Support: IE10-11+
					// option.text throws exceptions (#14686, #14858)
					jQuery.trim( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one" || index < 0,
					values = one ? null : [],
					max = one ? index + 1 : options.length,
					i = index < 0 ?
						max :
						one ? index : 0;

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					// oldIE doesn't update selected after form reset (#2551)
					if ( ( option.selected || i === index ) &&
							// Don't return options that are disabled or in a disabled optgroup
							( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
							( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {

						// Support: IE6
						// When new option element is added to select box we need to
						// force reflow of newly added node in order to workaround delay
						// of initialization properties
						try {
							option.selected = optionSet = true;

						} catch ( _ ) {

							// Will be executed only in IE6
							option.scrollHeight;
						}

					} else {
						option.selected = false;
					}
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}

				return options;
			}
		}
	}
});

// Radios and checkboxes getter/setter
jQuery.each([ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( jQuery.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			// Support: Webkit
			// "" is returned instead of "on" if a value isn't specified
			return elem.getAttribute("value") === null ? "on" : elem.value;
		};
	}
});




var nodeHook, boolHook,
	attrHandle = jQuery.expr.attrHandle,
	ruseDefault = /^(?:checked|selected)$/i,
	getSetAttribute = support.getSetAttribute,
	getSetInput = support.input;

jQuery.fn.extend({
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each(function() {
			jQuery.removeAttr( this, name );
		});
	}
});

jQuery.extend({
	attr: function( elem, name, value ) {
		var hooks, ret,
			nType = elem.nodeType;

		// don't get/set attributes on text, comment and attribute nodes
		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === strundefined ) {
			return jQuery.prop( elem, name, value );
		}

		// All attributes are lowercase
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			name = name.toLowerCase();
			hooks = jQuery.attrHooks[ name ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
		}

		if ( value !== undefined ) {

			if ( value === null ) {
				jQuery.removeAttr( elem, name );

			} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
				return ret;

			} else {
				elem.setAttribute( name, value + "" );
				return value;
			}

		} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
			return ret;

		} else {
			ret = jQuery.find.attr( elem, name );

			// Non-existent attributes return null, we normalize to undefined
			return ret == null ?
				undefined :
				ret;
		}
	},

	removeAttr: function( elem, value ) {
		var name, propName,
			i = 0,
			attrNames = value && value.match( rnotwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( (name = attrNames[i++]) ) {
				propName = jQuery.propFix[ name ] || name;

				// Boolean attributes get special treatment (#10870)
				if ( jQuery.expr.match.bool.test( name ) ) {
					// Set corresponding property to false
					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
						elem[ propName ] = false;
					// Support: IE<9
					// Also clear defaultChecked/defaultSelected (if appropriate)
					} else {
						elem[ jQuery.camelCase( "default-" + name ) ] =
							elem[ propName ] = false;
					}

				// See #9699 for explanation of this approach (setting first, then removal)
				} else {
					jQuery.attr( elem, name, "" );
				}

				elem.removeAttribute( getSetAttribute ? name : propName );
			}
		}
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
					// Setting the type on a radio button after the value resets the value in IE6-9
					// Reset value to default in case type is set after value during creation
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	}
});

// Hook for boolean attributes
boolHook = {
	set: function( elem, value, name ) {
		if ( value === false ) {
			// Remove boolean attributes when set to false
			jQuery.removeAttr( elem, name );
		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
			// IE<8 needs the *property* name
			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );

		// Use defaultChecked and defaultSelected for oldIE
		} else {
			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
		}

		return name;
	}
};

// Retrieve booleans specially
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {

	var getter = attrHandle[ name ] || jQuery.find.attr;

	attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
		function( elem, name, isXML ) {
			var ret, handle;
			if ( !isXML ) {
				// Avoid an infinite loop by temporarily removing this function from the getter
				handle = attrHandle[ name ];
				attrHandle[ name ] = ret;
				ret = getter( elem, name, isXML ) != null ?
					name.toLowerCase() :
					null;
				attrHandle[ name ] = handle;
			}
			return ret;
		} :
		function( elem, name, isXML ) {
			if ( !isXML ) {
				return elem[ jQuery.camelCase( "default-" + name ) ] ?
					name.toLowerCase() :
					null;
			}
		};
});

// fix oldIE attroperties
if ( !getSetInput || !getSetAttribute ) {
	jQuery.attrHooks.value = {
		set: function( elem, value, name ) {
			if ( jQuery.nodeName( elem, "input" ) ) {
				// Does not return so that setAttribute is also used
				elem.defaultValue = value;
			} else {
				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
				return nodeHook && nodeHook.set( elem, value, name );
			}
		}
	};
}

// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {

	// Use this for any attribute in IE6/7
	// This fixes almost every IE6/7 issue
	nodeHook = {
		set: function( elem, value, name ) {
			// Set the existing or create a new attribute node
			var ret = elem.getAttributeNode( name );
			if ( !ret ) {
				elem.setAttributeNode(
					(ret = elem.ownerDocument.createAttribute( name ))
				);
			}

			ret.value = value += "";

			// Break association with cloned elements by also using setAttribute (#9646)
			if ( name === "value" || value === elem.getAttribute( name ) ) {
				return value;
			}
		}
	};

	// Some attributes are constructed with empty-string values when not defined
	attrHandle.id = attrHandle.name = attrHandle.coords =
		function( elem, name, isXML ) {
			var ret;
			if ( !isXML ) {
				return (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
					ret.value :
					null;
			}
		};

	// Fixing value retrieval on a button requires this module
	jQuery.valHooks.button = {
		get: function( elem, name ) {
			var ret = elem.getAttributeNode( name );
			if ( ret && ret.specified ) {
				return ret.value;
			}
		},
		set: nodeHook.set
	};

	// Set contenteditable to false on removals(#10429)
	// Setting to empty string throws an error as an invalid value
	jQuery.attrHooks.contenteditable = {
		set: function( elem, value, name ) {
			nodeHook.set( elem, value === "" ? false : value, name );
		}
	};

	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
	// This is for removals
	jQuery.each([ "width", "height" ], function( i, name ) {
		jQuery.attrHooks[ name ] = {
			set: function( elem, value ) {
				if ( value === "" ) {
					elem.setAttribute( name, "auto" );
					return value;
				}
			}
		};
	});
}

if ( !support.style ) {
	jQuery.attrHooks.style = {
		get: function( elem ) {
			// Return undefined in the case of empty string
			// Note: IE uppercases css property names, but if we were to .toLowerCase()
			// .cssText, that would destroy case senstitivity in URL's, like in "background"
			return elem.style.cssText || undefined;
		},
		set: function( elem, value ) {
			return ( elem.style.cssText = value + "" );
		}
	};
}




var rfocusable = /^(?:input|select|textarea|button|object)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend({
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		name = jQuery.propFix[ name ] || name;
		return this.each(function() {
			// try/catch handles cases where IE balks (such as removing a property on window)
			try {
				this[ name ] = undefined;
				delete this[ name ];
			} catch( e ) {}
		});
	}
});

jQuery.extend({
	propFix: {
		"for": "htmlFor",
		"class": "className"
	},

	prop: function( elem, name, value ) {
		var ret, hooks, notxml,
			nType = elem.nodeType;

		// don't get/set properties on text, comment and attribute nodes
		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );

		if ( notxml ) {
			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
				ret :
				( elem[ name ] = value );

		} else {
			return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
				ret :
				elem[ name ];
		}
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {
				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
				// Use proper attribute retrieval(#12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				return tabindex ?
					parseInt( tabindex, 10 ) :
					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
						0 :
						-1;
			}
		}
	}
});

// Some attributes require a special call on IE
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !support.hrefNormalized ) {
	// href/src property should get the full normalized URL (#10299/#12915)
	jQuery.each([ "href", "src" ], function( i, name ) {
		jQuery.propHooks[ name ] = {
			get: function( elem ) {
				return elem.getAttribute( name, 4 );
			}
		};
	});
}

// Support: Safari, IE9+
// mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {
			var parent = elem.parentNode;

			if ( parent ) {
				parent.selectedIndex;

				// Make sure that it also works with optgroups, see #5701
				if ( parent.parentNode ) {
					parent.parentNode.selectedIndex;
				}
			}
			return null;
		}
	};
}

jQuery.each([
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
});

// IE6/7 call enctype encoding
if ( !support.enctype ) {
	jQuery.propFix.enctype = "encoding";
}




var rclass = /[\t\r\n\f]/g;

jQuery.fn.extend({
	addClass: function( value ) {
		var classes, elem, cur, clazz, j, finalValue,
			i = 0,
			len = this.length,
			proceed = typeof value === "string" && value;

		if ( jQuery.isFunction( value ) ) {
			return this.each(function( j ) {
				jQuery( this ).addClass( value.call( this, j, this.className ) );
			});
		}

		if ( proceed ) {
			// The disjunction here is for better compressibility (see removeClass)
			classes = ( value || "" ).match( rnotwhite ) || [];

			for ( ; i < len; i++ ) {
				elem = this[ i ];
				cur = elem.nodeType === 1 && ( elem.className ?
					( " " + elem.className + " " ).replace( rclass, " " ) :
					" "
				);

				if ( cur ) {
					j = 0;
					while ( (clazz = classes[j++]) ) {
						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
							cur += clazz + " ";
						}
					}

					// only assign if different to avoid unneeded rendering.
					finalValue = jQuery.trim( cur );
					if ( elem.className !== finalValue ) {
						elem.className = finalValue;
					}
				}
			}
		}

		return this;
	},

	removeClass: function( value ) {
		var classes, elem, cur, clazz, j, finalValue,
			i = 0,
			len = this.length,
			proceed = arguments.length === 0 || typeof value === "string" && value;

		if ( jQuery.isFunction( value ) ) {
			return this.each(function( j ) {
				jQuery( this ).removeClass( value.call( this, j, this.className ) );
			});
		}
		if ( proceed ) {
			classes = ( value || "" ).match( rnotwhite ) || [];

			for ( ; i < len; i++ ) {
				elem = this[ i ];
				// This expression is here for better compressibility (see addClass)
				cur = elem.nodeType === 1 && ( elem.className ?
					( " " + elem.className + " " ).replace( rclass, " " ) :
					""
				);

				if ( cur ) {
					j = 0;
					while ( (clazz = classes[j++]) ) {
						// Remove *all* instances
						while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
							cur = cur.replace( " " + clazz + " ", " " );
						}
					}

					// only assign if different to avoid unneeded rendering.
					finalValue = value ? jQuery.trim( cur ) : "";
					if ( elem.className !== finalValue ) {
						elem.className = finalValue;
					}
				}
			}
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var type = typeof value;

		if ( typeof stateVal === "boolean" && type === "string" ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		if ( jQuery.isFunction( value ) ) {
			return this.each(function( i ) {
				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
			});
		}

		return this.each(function() {
			if ( type === "string" ) {
				// toggle individual class names
				var className,
					i = 0,
					self = jQuery( this ),
					classNames = value.match( rnotwhite ) || [];

				while ( (className = classNames[ i++ ]) ) {
					// check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}

			// Toggle whole class name
			} else if ( type === strundefined || type === "boolean" ) {
				if ( this.className ) {
					// store className if set
					jQuery._data( this, "__className__", this.className );
				}

				// If the element has a class name or if we're passed "false",
				// then remove the whole classname (if there was one, the above saved it).
				// Otherwise bring back whatever was previously saved (if anything),
				// falling back to the empty string if nothing was stored.
				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
			}
		});
	},

	hasClass: function( selector ) {
		var className = " " + selector + " ",
			i = 0,
			l = this.length;
		for ( ; i < l; i++ ) {
			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
				return true;
			}
		}

		return false;
	}
});




// Return jQuery for attributes-only inclusion


jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {

	// Handle event binding
	jQuery.fn[ name ] = function( data, fn ) {
		return arguments.length > 0 ?
			this.on( name, null, data, fn ) :
			this.trigger( name );
	};
});

jQuery.fn.extend({
	hover: function( fnOver, fnOut ) {
		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
	},

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {
		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
	}
});


var nonce = jQuery.now();

var rquery = (/\?/);



var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;

jQuery.parseJSON = function( data ) {
	// Attempt to parse using the native JSON parser first
	if ( window.JSON && window.JSON.parse ) {
		// Support: Android 2.3
		// Workaround failure to string-cast null input
		return window.JSON.parse( data + "" );
	}

	var requireNonComma,
		depth = null,
		str = jQuery.trim( data + "" );

	// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
	// after removing valid tokens
	return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {

		// Force termination if we see a misplaced comma
		if ( requireNonComma && comma ) {
			depth = 0;
		}

		// Perform no more replacements after returning to outermost depth
		if ( depth === 0 ) {
			return token;
		}

		// Commas must not follow "[", "{", or ","
		requireNonComma = open || comma;

		// Determine new depth
		// array/object open ("[" or "{"): depth += true - false (increment)
		// array/object close ("]" or "}"): depth += false - true (decrement)
		// other cases ("," or primitive): depth += true - true (numeric cast)
		depth += !close - !open;

		// Remove this token
		return "";
	}) ) ?
		( Function( "return " + str ) )() :
		jQuery.error( "Invalid JSON: " + data );
};


// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, tmp;
	if ( !data || typeof data !== "string" ) {
		return null;
	}
	try {
		if ( window.DOMParser ) { // Standard
			tmp = new DOMParser();
			xml = tmp.parseFromString( data, "text/xml" );
		} else { // IE
			xml = new ActiveXObject( "Microsoft.XMLDOM" );
			xml.async = "false";
			xml.loadXML( data );
		}
	} catch( e ) {
		xml = undefined;
	}
	if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};


var
	// Document location
	ajaxLocParts,
	ajaxLocation,

	rhash = /#.*$/,
	rts = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
	// #7653, #8125, #8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,
	rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
	allTypes = "*/".concat("*");

// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
	ajaxLocation = location.href;
} catch( e ) {
	// Use the href attribute of an A element
	// since IE will modify it given document.location
	ajaxLocation = document.createElement( "a" );
	ajaxLocation.href = "";
	ajaxLocation = ajaxLocation.href;
}

// Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];

		if ( jQuery.isFunction( func ) ) {
			// For each dataType in the dataTypeExpression
			while ( (dataType = dataTypes[i++]) ) {
				// Prepend if requested
				if ( dataType.charAt( 0 ) === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					(structure[ dataType ] = structure[ dataType ] || []).unshift( func );

				// Otherwise append
				} else {
					(structure[ dataType ] = structure[ dataType ] || []).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		});
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
	var deep, key,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {
	var firstDataType, ct, finalDataType, type,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {
		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}
		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},
		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {
								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s[ "throws" ] ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend({

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: ajaxLocation,
		type: "GET",
		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /xml/,
			html: /html/,
			json: /json/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": jQuery.parseJSON,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var // Cross-domain detection vars
			parts,
			// Loop variable
			i,
			// URL without anti-cache param
			cacheURL,
			// Response headers as string
			responseHeadersString,
			// timeout handle
			timeoutTimer,

			// To know if global events are to be dispatched
			fireGlobals,

			transport,
			// Response headers
			responseHeaders,
			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),
			// Callbacks context
			callbackContext = s.context || s,
			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
				jQuery( callbackContext ) :
				jQuery.event,
			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks("once memory"),
			// Status-dependent callbacks
			statusCode = s.statusCode || {},
			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},
			// The jqXHR state
			state = 0,
			// Default abort message
			strAbort = "canceled",
			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( state === 2 ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( (match = rheaders.exec( responseHeadersString )) ) {
								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
							}
						}
						match = responseHeaders[ key.toLowerCase() ];
					}
					return match == null ? null : match;
				},

				// Raw string
				getAllResponseHeaders: function() {
					return state === 2 ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					var lname = name.toLowerCase();
					if ( !state ) {
						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( !state ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( state < 2 ) {
							for ( code in map ) {
								// Lazy-add the new callback in a way that preserves old ones
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						} else {
							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR ).complete = completeDeferred.add;
		jqXHR.success = jqXHR.done;
		jqXHR.error = jqXHR.fail;

		// Remove hash character (#7531: and string promotion)
		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
		// Handle falsy url in the settings object (#10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );

		// Alias method option to type as per ticket #12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];

		// A cross-domain request is in order when we have a protocol:host:port mismatch
		if ( s.crossDomain == null ) {
			parts = rurl.exec( s.url.toLowerCase() );
			s.crossDomain = !!( parts &&
				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
			);
		}

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// If request was aborted inside a prefilter, stop there
		if ( state === 2 ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger("ajaxStart");
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		cacheURL = s.url;

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// If data is available, append data to url
			if ( s.data ) {
				cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
				// #9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add anti-cache in url if needed
			if ( s.cache === false ) {
				s.url = rts.test( cacheURL ) ?

					// If there is already a '_' parameter, set its value
					cacheURL.replace( rts, "$1_=" + nonce++ ) :

					// Otherwise add one to the end
					cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
			}
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
			// Abort if not done already and return
			return jqXHR.abort();
		}

		// aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		for ( i in { success: 1, error: 1, complete: 1 } ) {
			jqXHR[ i ]( s[ i ] );
		}

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}
			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = setTimeout(function() {
					jqXHR.abort("timeout");
				}, s.timeout );
			}

			try {
				state = 1;
				transport.send( requestHeaders, done );
			} catch ( e ) {
				// Propagate exception as error if not done
				if ( state < 2 ) {
					done( -1, e );
				// Simply rethrow otherwise
				} else {
					throw e;
				}
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Called once
			if ( state === 2 ) {
				return;
			}

			// State is "done" now
			state = 2;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader("Last-Modified");
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader("etag");
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {
				// We extract error from statusText
				// then normalize statusText and status for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger("ajaxStop");
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
});

jQuery.each( [ "get", "post" ], function( i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {
		// shift arguments if data argument was omitted
		if ( jQuery.isFunction( data ) ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		return jQuery.ajax({
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		});
	};
});


jQuery._evalUrl = function( url ) {
	return jQuery.ajax({
		url: url,
		type: "GET",
		dataType: "script",
		async: false,
		global: false,
		"throws": true
	});
};


jQuery.fn.extend({
	wrapAll: function( html ) {
		if ( jQuery.isFunction( html ) ) {
			return this.each(function(i) {
				jQuery(this).wrapAll( html.call(this, i) );
			});
		}

		if ( this[0] ) {
			// The elements to wrap the target around
			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);

			if ( this[0].parentNode ) {
				wrap.insertBefore( this[0] );
			}

			wrap.map(function() {
				var elem = this;

				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
					elem = elem.firstChild;
				}

				return elem;
			}).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( jQuery.isFunction( html ) ) {
			return this.each(function(i) {
				jQuery(this).wrapInner( html.call(this, i) );
			});
		}

		return this.each(function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		});
	},

	wrap: function( html ) {
		var isFunction = jQuery.isFunction( html );

		return this.each(function(i) {
			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
		});
	},

	unwrap: function() {
		return this.parent().each(function() {
			if ( !jQuery.nodeName( this, "body" ) ) {
				jQuery( this ).replaceWith( this.childNodes );
			}
		}).end();
	}
});


jQuery.expr.filters.hidden = function( elem ) {
	// Support: Opera <= 12.12
	// Opera reports offsetWidths and offsetHeights less than zero on some elements
	return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
		(!support.reliableHiddenOffsets() &&
			((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};

jQuery.expr.filters.visible = function( elem ) {
	return !jQuery.expr.filters.hidden( elem );
};




var r20 = /%20/g,
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( jQuery.isArray( obj ) ) {
		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {
				// Treat each array item as a scalar.
				add( prefix, v );

			} else {
				// Item is non-scalar (array or object), encode its numeric index.
				buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
			}
		});

	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {
		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, value ) {
			// If value is a function, invoke it and return its value
			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
		};

	// Set traditional to true for jQuery <= 1.3.2 behavior.
	if ( traditional === undefined ) {
		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		});

	} else {
		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" ).replace( r20, "+" );
};

jQuery.fn.extend({
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map(function() {
			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		})
		.filter(function() {
			var type = this.type;
			// Use .is(":disabled") so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		})
		.map(function( i, elem ) {
			var val = jQuery( this ).val();

			return val == null ?
				null :
				jQuery.isArray( val ) ?
					jQuery.map( val, function( val ) {
						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
					}) :
					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		}).get();
	}
});


// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
	// Support: IE6+
	function() {

		// XHR cannot access local files, always use ActiveX for that case
		return !this.isLocal &&

			// Support: IE7-8
			// oldIE XHR does not support non-RFC2616 methods (#13240)
			// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx
			// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
			// Although this check for six methods instead of eight
			// since IE also does not support "trace" and "connect"
			/^(get|post|head|put|delete|options)$/i.test( this.type ) &&

			createStandardXHR() || createActiveXHR();
	} :
	// For all other browsers, use the standard XMLHttpRequest object
	createStandardXHR;

var xhrId = 0,
	xhrCallbacks = {},
	xhrSupported = jQuery.ajaxSettings.xhr();

// Support: IE<10
// Open requests must be manually aborted on unload (#5280)
// See https://support.microsoft.com/kb/2856746 for more info
if ( window.attachEvent ) {
	window.attachEvent( "onunload", function() {
		for ( var key in xhrCallbacks ) {
			xhrCallbacks[ key ]( undefined, true );
		}
	});
}

// Determine support properties
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
xhrSupported = support.ajax = !!xhrSupported;

// Create transport if the browser can provide an xhr
if ( xhrSupported ) {

	jQuery.ajaxTransport(function( options ) {
		// Cross domain only allowed if supported through XMLHttpRequest
		if ( !options.crossDomain || support.cors ) {

			var callback;

			return {
				send: function( headers, complete ) {
					var i,
						xhr = options.xhr(),
						id = ++xhrId;

					// Open the socket
					xhr.open( options.type, options.url, options.async, options.username, options.password );

					// Apply custom fields if provided
					if ( options.xhrFields ) {
						for ( i in options.xhrFields ) {
							xhr[ i ] = options.xhrFields[ i ];
						}
					}

					// Override mime type if needed
					if ( options.mimeType && xhr.overrideMimeType ) {
						xhr.overrideMimeType( options.mimeType );
					}

					// X-Requested-With header
					// For cross-domain requests, seeing as conditions for a preflight are
					// akin to a jigsaw puzzle, we simply never set it to be sure.
					// (it can always be set on a per-request basis or even using ajaxSetup)
					// For same-domain requests, won't change header if already provided.
					if ( !options.crossDomain && !headers["X-Requested-With"] ) {
						headers["X-Requested-With"] = "XMLHttpRequest";
					}

					// Set headers
					for ( i in headers ) {
						// Support: IE<9
						// IE's ActiveXObject throws a 'Type Mismatch' exception when setting
						// request header to a null-value.
						//
						// To keep consistent with other XHR implementations, cast the value
						// to string and ignore `undefined`.
						if ( headers[ i ] !== undefined ) {
							xhr.setRequestHeader( i, headers[ i ] + "" );
						}
					}

					// Do send the request
					// This may raise an exception which is actually
					// handled in jQuery.ajax (so no try/catch here)
					xhr.send( ( options.hasContent && options.data ) || null );

					// Listener
					callback = function( _, isAbort ) {
						var status, statusText, responses;

						// Was never called and is aborted or complete
						if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
							// Clean up
							delete xhrCallbacks[ id ];
							callback = undefined;
							xhr.onreadystatechange = jQuery.noop;

							// Abort manually if needed
							if ( isAbort ) {
								if ( xhr.readyState !== 4 ) {
									xhr.abort();
								}
							} else {
								responses = {};
								status = xhr.status;

								// Support: IE<10
								// Accessing binary-data responseText throws an exception
								// (#11426)
								if ( typeof xhr.responseText === "string" ) {
									responses.text = xhr.responseText;
								}

								// Firefox throws an exception when accessing
								// statusText for faulty cross-domain requests
								try {
									statusText = xhr.statusText;
								} catch( e ) {
									// We normalize with Webkit giving an empty statusText
									statusText = "";
								}

								// Filter status for non standard behaviors

								// If the request is local and we have data: assume a success
								// (success with no data won't get notified, that's the best we
								// can do given current implementations)
								if ( !status && options.isLocal && !options.crossDomain ) {
									status = responses.text ? 200 : 404;
								// IE - #1450: sometimes returns 1223 when it should be 204
								} else if ( status === 1223 ) {
									status = 204;
								}
							}
						}

						// Call complete if needed
						if ( responses ) {
							complete( status, statusText, responses, xhr.getAllResponseHeaders() );
						}
					};

					if ( !options.async ) {
						// if we're in sync mode we fire the callback
						callback();
					} else if ( xhr.readyState === 4 ) {
						// (IE6 & IE7) if it's in cache and has been
						// retrieved directly we need to fire the callback
						setTimeout( callback );
					} else {
						// Add to the list of active xhr callbacks
						xhr.onreadystatechange = xhrCallbacks[ id ] = callback;
					}
				},

				abort: function() {
					if ( callback ) {
						callback( undefined, true );
					}
				}
			};
		}
	});
}

// Functions to create xhrs
function createStandardXHR() {
	try {
		return new window.XMLHttpRequest();
	} catch( e ) {}
}

function createActiveXHR() {
	try {
		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
	} catch( e ) {}
}




// Install script dataType
jQuery.ajaxSetup({
	accepts: {
		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /(?:java|ecma)script/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
});

// Handle cache's special case and global
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
		s.global = false;
	}
});

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function(s) {

	// This transport only deals with cross domain requests
	if ( s.crossDomain ) {

		var script,
			head = document.head || jQuery("head")[0] || document.documentElement;

		return {

			send: function( _, callback ) {

				script = document.createElement("script");

				script.async = true;

				if ( s.scriptCharset ) {
					script.charset = s.scriptCharset;
				}

				script.src = s.url;

				// Attach handlers for all browsers
				script.onload = script.onreadystatechange = function( _, isAbort ) {

					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {

						// Handle memory leak in IE
						script.onload = script.onreadystatechange = null;

						// Remove the script
						if ( script.parentNode ) {
							script.parentNode.removeChild( script );
						}

						// Dereference the script
						script = null;

						// Callback if not abort
						if ( !isAbort ) {
							callback( 200, "success" );
						}
					}
				};

				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
				// Use native DOM manipulation to avoid our domManip AJAX trickery
				head.insertBefore( script, head.firstChild );
			},

			abort: function() {
				if ( script ) {
					script.onload( undefined, true );
				}
			}
		};
	}
});




var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup({
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
		this[ callback ] = true;
		return callback;
	}
});

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
		);

	// Handle iff the expected data type is "jsonp" or we have a parameter to set
	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

		// Get callback name, remembering preexisting value associated with it
		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
			s.jsonpCallback() :
			s.jsonpCallback;

		// Insert callback into url or form data
		if ( jsonProp ) {
			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
		} else if ( s.jsonp !== false ) {
			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
		}

		// Use data converter to retrieve json after script execution
		s.converters["script json"] = function() {
			if ( !responseContainer ) {
				jQuery.error( callbackName + " was not called" );
			}
			return responseContainer[ 0 ];
		};

		// force json dataType
		s.dataTypes[ 0 ] = "json";

		// Install callback
		overwritten = window[ callbackName ];
		window[ callbackName ] = function() {
			responseContainer = arguments;
		};

		// Clean-up function (fires after converters)
		jqXHR.always(function() {
			// Restore preexisting value
			window[ callbackName ] = overwritten;

			// Save back as free
			if ( s[ callbackName ] ) {
				// make sure that re-using the options doesn't screw things around
				s.jsonpCallback = originalSettings.jsonpCallback;

				// save the callback name for future use
				oldCallbacks.push( callbackName );
			}

			// Call if it was a function and we have a response
			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
				overwritten( responseContainer[ 0 ] );
			}

			responseContainer = overwritten = undefined;
		});

		// Delegate to script
		return "script";
	}
});




// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( !data || typeof data !== "string" ) {
		return null;
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}
	context = context || document;

	var parsed = rsingleTag.exec( data ),
		scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[1] ) ];
	}

	parsed = jQuery.buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


// Keep a copy of the old load method
var _load = jQuery.fn.load;

/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	if ( typeof url !== "string" && _load ) {
		return _load.apply( this, arguments );
	}

	var selector, response, type,
		self = this,
		off = url.indexOf(" ");

	if ( off >= 0 ) {
		selector = jQuery.trim( url.slice( off, url.length ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( jQuery.isFunction( params ) ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax({
			url: url,

			// if "type" variable is undefined, then "GET" method will be used
			type: type,
			dataType: "html",
			data: params
		}).done(function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		}).complete( callback && function( jqXHR, status ) {
			self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
		});
	}

	return this;
};




// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
});




jQuery.expr.filters.animated = function( elem ) {
	return jQuery.grep(jQuery.timers, function( fn ) {
		return elem === fn.elem;
	}).length;
};





var docElem = window.document.documentElement;

/**
 * Gets a window from an element
 */
function getWindow( elem ) {
	return jQuery.isWindow( elem ) ?
		elem :
		elem.nodeType === 9 ?
			elem.defaultView || elem.parentWindow :
			false;
}

jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;

		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;
		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( jQuery.isFunction( options ) ) {
			options = options.call( elem, i, curOffset );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );
		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend({
	offset: function( options ) {
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each(function( i ) {
					jQuery.offset.setOffset( this, options, i );
				});
		}

		var docElem, win,
			box = { top: 0, left: 0 },
			elem = this[ 0 ],
			doc = elem && elem.ownerDocument;

		if ( !doc ) {
			return;
		}

		docElem = doc.documentElement;

		// Make sure it's not a disconnected DOM node
		if ( !jQuery.contains( docElem, elem ) ) {
			return box;
		}

		// If we don't have gBCR, just use 0,0 rather than error
		// BlackBerry 5, iOS 3 (original iPhone)
		if ( typeof elem.getBoundingClientRect !== strundefined ) {
			box = elem.getBoundingClientRect();
		}
		win = getWindow( doc );
		return {
			top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
			left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
		};
	},

	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset,
			parentOffset = { top: 0, left: 0 },
			elem = this[ 0 ];

		// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
		if ( jQuery.css( elem, "position" ) === "fixed" ) {
			// we assume that getBoundingClientRect is available when computed position is fixed
			offset = elem.getBoundingClientRect();
		} else {
			// Get *real* offsetParent
			offsetParent = this.offsetParent();

			// Get correct offsets
			offset = this.offset();
			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
				parentOffset = offsetParent.offset();
			}

			// Add offsetParent borders
			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
		}

		// Subtract parent offsets and element margins
		// note: when an element has margin: auto the offsetLeft and marginLeft
		// are the same in Safari causing offset.left to incorrectly be 0
		return {
			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
		};
	},

	offsetParent: function() {
		return this.map(function() {
			var offsetParent = this.offsetParent || docElem;

			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
				offsetParent = offsetParent.offsetParent;
			}
			return offsetParent || docElem;
		});
	}
});

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = /Y/.test( prop );

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {
			var win = getWindow( elem );

			if ( val === undefined ) {
				return win ? (prop in win) ? win[ prop ] :
					win.document.documentElement[ method ] :
					elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : jQuery( win ).scrollLeft(),
					top ? val : jQuery( win ).scrollTop()
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length, null );
	};
});

// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// getComputedStyle returns percent when specified for top/left/bottom/right
// rather than make the css module depend on the offset module, we just check for it here
jQuery.each( [ "top", "left" ], function( i, prop ) {
	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
		function( elem, computed ) {
			if ( computed ) {
				computed = curCSS( elem, prop );
				// if curCSS returns percentage, fallback to offset
				return rnumnonpx.test( computed ) ?
					jQuery( elem ).position()[ prop ] + "px" :
					computed;
			}
		}
	);
});


// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
		// margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( jQuery.isWindow( elem ) ) {
					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
					// isn't a whole lot we can do. See pull request at this URL for discussion:
					// https://github.com/jquery/jquery/pull/764
					return elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
					// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?
					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable, null );
		};
	});
});


// The number of elements contained in the matched element set
jQuery.fn.size = function() {
	return this.length;
};

jQuery.fn.andSelf = jQuery.fn.addBack;

//gwd
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
	return jQuery;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

return jQuery;

}));


/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = __webpack_require__(245);

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

var _this = this;

var $ = __webpack_require__(1);
var communicate = __webpack_require__(18);

Promise.prototype.done = function (onFulfilled, onRejected) {
    return this.then(onFulfilled, onRejected)['catch'](function (error) {
        setTimeout(function () {
            throw error;
        }, 0);
    });
};

Promise.prototype.fail = function (onFulfilled, onRejected) {
    this.then(onFulfilled, onRejected)['catch'](function (error) {
        setTimeout(function () {
            throw error;
        }, 0);
    });
};

var wrap = function wrap(url) {
    if (!url) throw new Error('url 不能为空');
    var start = '?';
    var callback = 'callback=?&';
    if (url.indexOf('?') > -1) {
        start = '&';
    }
    var extension_env;
    //format是历史接口兼容
    var format = 'format=jsonp&';
    if (G.chrome_extension || G.from_device === 'maxthon' || G.from_device === 'firefox' || G.from_device === 'chrome') {
        extension_env = true;
    }
    //extension_env = true
    if (G.allowBackgroundRequest) {
        extension_env = true;
    }
    if (extension_env) {
        callback = '';
        format = 'format=json&';
    }
    var fp = '';
    if (localStorage.getItem('gwdang-fp')) {
        fp = 'fp=' + localStorage.getItem('gwdang-fp') + '&dfp=' + localStorage.getItem('gwdang-dfp') + '&';
    }
    return '' + url + start + callback + format + fp;
};

module.exports.getCouponFromUrl = function (url) {
    var price = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];

    return new Promise(function (resolve, reject) {
        module.exports.get(G.server + '/extension/CouponHandler?op=get&rawApi=' + encodeURIComponent(url) + (price ? '&price=' + price : '')).then(function (res) {
            var defRes = {
                "handle": {
                    "self": ["\"coupon\":\"满(:<limit>\\d+)元减(:<coupon>\\d+)元\"[\\s\\S]*?\"link\":\"(:<link>.+?)\""]
                },
                "map": [{
                    "api": {
                        "raw": url,
                        "uri": "https:\/\/u.gwdang.com\/gyp\/taobao\/coupon?dp_id=627231499289&format=json&aid=a1002&s=tao&pure=1&rebate=1&price=" + price,
                        "tag": "self"
                    },
                    "is_api": 1
                }]
            };

            if (res.map && res.map.length > 0 && res.map[0].is_api && res.handle) {
                var _ret = (function () {
                    var escapeStringRegExp = function escapeStringRegExp(str) {
                        return str.replace(escapeStringRegExp.matchOperatorsRe, '\\$&');
                    };

                    var trueUrl = res.map[0].api.uri;
                    var tag = res.map[0].api.tag;
                    var NamedRe = __webpack_require__(234).named;
                    escapeStringRegExp.matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;

                    if (!res.handle[tag]) {
                        if (url.indexOf('open.lesiclub.cn') > -1) {
                            // module.exports.rawGet(url).then(res => {
                            //     resolve(res)
                            // })
                            //  console.warn('bad lesiclub')
                            resolve(false);
                            // reject()
                            return {
                                v: undefined
                            };
                        } else {
                            // module.exports.rawGet(url).then(res => {
                            //     resolve(res)
                            // })
                            res.handle = {
                                "sg.weitaoke": ['"coupon_click_url":"(:<link>.+?)"[\\s\\S]*?"coupon_info":"满(:<limit>\\d+)元减(:<coupon>\\d+)元"'],
                                "weitaoke": ['"coupon_click_url":"(:<link>.+?)"[\\s\\S]*?"coupon_info":"满(:<limit>\\d+)元减(:<coupon>\\d+)元"'],
                                "uc.weitaoke": ['"coupon_click_url":"(:<link>.+?)"[\\s\\S]*?"coupon_info":"满(:<limit>\\d+)元减(:<coupon>\\d+)元"'],
                                "edge.weitaoke": ['"coupon_click_url":"(:<link>.+?)"[\\s\\S]*?"coupon_info":"满(:<limit>\\d+)元减(:<coupon>\\d+)元"']
                            };
                        }
                    }

                    var re = NamedRe(new RegExp(res.handle[tag][0]));

                    //trueUrl = trueUrl.replace('http://q.weitaoke.net', 'https://q.apptimes.cn')

                    var r = undefined;
                    if (trueUrl.indexOf('open.lesiclub.cn') > -1) {
                        if (G.from_device === 'bijiago' || G.from_device === 'biyibi') {
                            (function () {
                                var runned = false;
                                r = new Promise(function (resolve) {
                                    $.get(url).done(function (res) {
                                        runned = true;
                                        resolve(res);
                                    });
                                    setTimeout(function () {
                                        if (!runned) {
                                            resolve(null);
                                        }
                                    }, 4000);
                                });
                            })();
                        } else {
                            r = module.exports.rawGet(trueUrl);
                        }
                    } else {
                        r = module.exports.rawGet(trueUrl);
                    }
                    r.then(function (data) {
                        if (!data || !data.data) {
                            __webpack_require__(6).log('u.gwdang.com no data', data);
                            resolve(null);
                            return;
                        }
                        try {
                            var cap = re.exec(JSON.stringify(data));
                            if (!cap) {
                                if (data && data.data.rebate) {
                                    resolve(data);
                                } else {
                                    resolve(null);
                                }
                                return;
                            }
                            var result = cap.captures;
                            resolve({
                                code: 200,
                                data: {
                                    click_url: result.link[0],
                                    tkl: result.tkl ? result.tkl[0] : '',
                                    coupon: {
                                        coupon_money: result.coupon[0],
                                        coupon_limit: result.limit[0]
                                    }
                                }
                            });
                        } catch (e) {
                            console.error(e);
                            if (data && data.data.rebate) {
                                resolve(data);
                            } else {
                                resolve(null);
                            }
                        }
                    })['catch'](function (err) {
                        console.error(err);
                        resolve(null);
                    });
                })();

                if (typeof _ret === 'object') return _ret.v;
            } else {
                console.warn('resolve 142');
                resolve(null);
            }
        })['catch'](function (e) {
            console.error(e);
            resolve(null);
        });
    });
};

module.exports.raw = function (url, isarg) {
    if (isarg) {
        url = url + '&union=' + G.union + '&version=' + G.version + '&from_device=' + G.from_device;
    }
    var _done;
    if (G.allowBackgroundRequest) {
        return new Promise(function (resolve) {
            communicate.trigger({
                type: 'proxyRequest',
                url: url
            });
            communicate.on(function (info) {
                if (info.type === 'proxyRequest' && info.id === url) {
                    resolve(JSON.stringify(info.value));
                }
            });
        });
    } else {
        var r = {
            done: function done(cb) {
                _done = cb;
            }
        };
        var xhr = new XMLHttpRequest();
        xhr.addEventListener('load', function () {
            if (_done) _done(xhr.responseText);
        });
        xhr.addEventListener('error', function () {
            if (_done) _done(xhr.responseText);
        });
        xhr.open("GET", url, true);
        xhr.send();
        return r;
    }
};

/**
 * 普通GET请求，不会加上多余的参数
 * @param urls
 * @returns {Promise<unknown>|*}
 */
module.exports.rawGet = function (url) {
    var allowCredentials = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
    var timeout = arguments.length <= 2 || arguments[2] === undefined ? 3000 : arguments[2];

    if (url.includes('/helper/qrcode?')) {
        url = __webpack_require__(20).appendTbInfoForUrl(url);
    }
    if (G.allowBackgroundRequest) {
        return new Promise(function (resolve, reject) {
            var resolved = false;
            communicate.trigger({
                type: 'proxyRequest',
                url: url,
                referer: location.href
            });
            communicate.on(function (info) {
                if (info.type === 'proxyRequest' && info.id === url) {
                    resolved = true;
                    resolve(info.value);
                }
            });
            setTimeout(function () {
                if (!resolved) {
                    __webpack_require__(6).warn('请求超时', url);
                    reject('timeout');
                }
            }, timeout);
        });
    } else {
        if (allowCredentials) {
            return module.exports.requestXHR(url, {});
        }
        return new Promise(function (resolve, reject) {
            $.get(url).then(function (res) {
                return resolve(res);
            }).fail(function (err) {
                return reject(err);
            });
        });
        // return $.get(url)
    }
};

// function request(url, callback, referer) {
//     var xmlhttp = new XMLHttpRequest();
//     xmlhttp.addEventListener('load', function() {
//         callback(xmlhttp.responseText)
//     })
//     xmlhttp.withCredentials = true
//     xmlhttp.open("GET", url, true);
//     // if (referer) {
//     //     xmlhttp.setRequestHeader('x-referer', referer)
//     // }
//     xmlhttp.send();
// };

/** 请求自己接口 */
module.exports.get = function (url) {
    var instanceId = G.instanceId;
    var from_type = "";
    if (G.from_type) {
        from_type = '&from_type=' + G.from_type;
    }
    url = wrap(url) + 'version=' + G.version + '&from_device=' + G.from_device + from_type;
    if (!url.includes('union=')) {
        url += '&union=' + G.union;
    }
    if (G.crc64) url += "&crc64=1";

    if (!Promise.prototype.done) {
        Promise.prototype.done = Promise.prototype.then;
        Promise.prototype.fail = Promise.prototype['catch'];
    }
    if (G.allowBackgroundRequest) {
        return new Promise(function (resolve) {
            communicate.trigger({
                type: 'proxyRequest',
                url: url,
                referer: location.href
            });
            communicate.on(function (info) {
                if (instanceId && instanceId !== G.instanceId && !location.href.startsWith('https://s.taobao.com')) {
                    // debugger
                    // require('common/extConsole').warn('instanceId不一致，不处理', instanceId, G.instanceId)
                    resolve(null);
                    return;
                }
                if (info.type === 'proxyRequest' && info.id === url) {
                    resolve(info.value);
                }
            });
        });
    } else {
        return new Promise(function (resolve, reject) {
            // request(url, function(res) {
            //     try {
            //         resolve(JSON.parse(res))
            //     } catch (e) {
            //         resolve(res)
            //     }
            // }, location.href)
            window.ts = $;
            $.ajax({
                beforeSend: function beforeSend(request) {
                    if (G.requestNeedToken) {
                        //request.setRequestHeader("x-bjg-token", G.requestNeedToken);
                    }
                },
                dataType: "json",
                url: url,
                success: function success(data) {
                    if (instanceId && instanceId !== G.instanceId) {
                        resolve(null);
                        return;
                    }
                    resolve(data);
                }
            });

            // $.getJSON(url).then(res => resolve(res))
            // console.log(url)
            // $.ajax(url, {
            //     xhrFields: {
            //         withCredentials: true
            //     },
            //     jsonp: false,
            //     jsonpCallback: ''
            // }).then(res => {
            //     resolve(res)
            // })
        });
    }
};

var requesting = {};
module.exports.getOnce = function (url) {
    var key = 'getOnce-' + url;
    return new Promise(function (resolve, reject) {
        if (requesting[url]) {
            __webpack_require__(4).met(key).then(function (res) {
                resolve(res);
            });
            return;
        } else {
            requesting[url] = true;
            module.exports.get(url).then(function (res) {
                resolve(res);
                __webpack_require__(4).setMet(key, res);
            });
        }
    });
};

var postingId = 0;

module.exports.urlContentToDataUri = function (url) {
    return fetch(url).then(function (response) {
        return response.blob();
    }).then(function (blob) {
        return new Promise(function (callback) {
            var reader = new FileReader();
            reader.onload = function () {
                callback(this.result);
            };
            reader.readAsDataURL(blob);
        });
    });
};

module.exports.imgUrlToDataUri = function (imgUrl) {
    return new Promise(function (resolve, reject) {
        var img = new Image();
        img.crossOrigin = 'Anonymous';
        img.onload = function () {
            var canvas = document.createElement('CANVAS');
            var ctx = canvas.getContext('2d');
            var dataURL = undefined;
            // canvas.height = this.naturalHeight;
            // canvas.width = this.naturalWidth;
            // ctx.drawImage(this, 0, 0);
            var naturalWidth = this.naturalWidth,
                naturalHeight = this.naturalHeight;
            if (naturalWidth > 400) {
                var r = naturalWidth / 400;
                canvas.width = 400;
                canvas.height = naturalHeight / r;
            } else {
                canvas.width = naturalWidth;
                canvas.height = naturalHeight;
            }
            ctx.drawImage(this, 0, 0, canvas.width, canvas.height);
            dataURL = canvas.toDataURL('image/jpeg');
            resolve(dataURL);
        };
        img.src = imgUrl;
    });
};

module.exports.makeUrl = function (host, path, query) {
    var noEncode = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];

    var url = host + path;
    if (query) {
        url += '?';
        for (var key in query) {
            url += key + '=' + (noEncode ? query[key] : encodeURIComponent(query[key])) + '&';
        }
        url = url.substring(0, url.length - 1);
    }
    return url;
};

module.exports.post = function (url, data) {
    var useForm = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
    var withCredentials = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3];

    var reqId = postingId;
    postingId++;
    if (G.allowBackgroundRequest) {
        return new Promise(function (resolve) {
            communicate.trigger({
                type: useForm ? useForm === 'www' ? 'proxyRequestPostWWWForm' : 'proxyRequestPostForm' : 'proxyRequestPost',
                url: url,
                payload: data,
                reqId: reqId,
                referer: location.href
            });
            communicate.on(function (info) {
                if (info.type.indexOf('proxyRequestPost') > -1 && info.id === reqId) {
                    resolve(info.value);
                }
            });
        });
    } else {
        return module.exports.requestXHRPost(url, data, useForm, withCredentials);
    }
};

/** 请求别人接口，隐藏痕迹 */
var getPure = function getPure(url) {
    //console.log('getPure ' + url)
    // 曾用于获取商品信息，现在不需要了
    if (url.indexOf('https://acs.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0') > -1) {
        //console.warn('interupt ' + url)
        return {
            done: function done(cb) {
                cb({ intercepted: true, msg: 'view request.js' });
            },
            then: function then(cb) {
                cb({ intercepted: true, msg: 'view request.js' });
            }
        };
    }
    url = wrap(url);
    return $.ajax({
        beforeSend: function beforeSend(request) {
            if (G.requestNeedToken) {
                //request.setRequestHeader("x-bjg-token", G.requestNeedToken);
            }
        },
        dataType: "json",
        url: url
    });
};

module.exports.getPure = getPure;

module.exports.requestXHR = function requestXHR(url) {
    var withCredentials = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
    var customHeaders = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];

    if (G.serviceWorker) {
        return fetch(url, {
            "credentials": withCredentials ? "include" : ''
        }).then(function (r) {
            return r.text();
        });
    }
    return new Promise(function (resolve) {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.addEventListener('load', function () {
            try {
                var res = JSON.parse(xmlhttp.responseText);
                resolve(res);
            } catch (e) {
                resolve(xmlhttp.responseText);
            }
        });
        xmlhttp.withCredentials = withCredentials;
        xmlhttp.open("GET", url, true);
        if (customHeaders) {
            Object.keys(customHeaders).forEach(function (key) {
                xmlhttp.setRequestHeader(key, customHeaders[key]);
            });
        }
        xmlhttp.send();
    });
};

module.exports.requestXHRPost = function requestXHR(url, data) {
    var form = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2];
    var withCredentials = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3];

    return new Promise(function (resolve) {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.addEventListener('load', function () {
            try {
                var res = JSON.parse(xmlhttp.responseText);
                resolve(res);
            } catch (e) {
                resolve(xmlhttp.responseText);
            }
        });
        xmlhttp.withCredentials = withCredentials;
        xmlhttp.open("POST", url, true);

        if (G.requestNeedToken) {
            //xmlhttp.setRequestHeader('x-bjg-token', G.requestNeedToken)
        }

        if (form) {
            (function () {
                var formData = new FormData();
                Object.keys(data).forEach(function (item) {
                    formData.append(item, data[item]);
                });
                xmlhttp.send(formData);
            })();
        } else {
            xmlhttp.setRequestHeader('Content-Type', 'text/plain');
            xmlhttp.send(data);
        }
    });
};

module.exports.jdRequest = function callee$0$0(id) {
    var gwdConfig, cat, t, shopId, vendorId, area, params, payload, payloadCopy, sign, host;
    return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
            case 0:
                context$1$0.next = 2;
                return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

            case 2:
                gwdConfig = context$1$0.sent;

                if (!(!gwdConfig.allowJdRequest || location.hostname.includes('.jd.hk'))) {
                    context$1$0.next = 5;
                    break;
                }

                return context$1$0.abrupt('return');

            case 5:
                cat = pageConfig.product.cat.join(','), t = Date.now(), shopId = pageConfig.product.shopId, vendorId = pageConfig.product.venderId;
                context$1$0.next = 8;
                return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                    return $('.ui-area-text').length;
                }));

            case 8:
                area = $('.ui-area-text').attr('data-id').replaceAll('-', '_');
                params = {
                    skuId: id,
                    cat: cat,
                    area: area,
                    shopId: shopId,
                    venderId: vendorId,
                    paramJson: pageConfig.product.paramJson,
                    num: pageConfig.product.countNum || '1'
                };
                payload = {
                    appid: 'pc-item-soa',
                    functionId: 'pc_detailpage_wareBusiness',
                    client: 'pc',
                    clientVersion: '1.0.0',
                    t: t,
                    body: JSON.stringify(params)
                };
                payloadCopy = Object.assign({}, payload);

                payloadCopy.body = SHA256(JSON.stringify(params)).toString();
                context$1$0.next = 15;
                return regeneratorRuntime.awrap(window.PSign.sign(payloadCopy));

            case 15:
                sign = context$1$0.sent;

                payload.h5st = encodeURI(sign.h5st);
                if (window.jdtRiskContext && window.jdtRiskContext.deviceInfo) {
                    payload['x-api-eid-token'] = jdtRiskContext.deviceInfo.jsToken;
                }

                if (!window.getJsToken) {
                    context$1$0.next = 22;
                    break;
                }

                context$1$0.next = 21;
                return regeneratorRuntime.awrap(new Promise(function (resolve) {
                    getJsToken(function (res) {
                        resolve(res.jsToken);
                    });
                }));

            case 21:
                payload['x-api-eid-token'] = context$1$0.sent;

            case 22:
                payload.loginType = '3';
                payload.uuid = window.getCookie('__jda');
                host = location.hostname.includes('.jkcsjd.com') ? 'https://color.jkcsjd.com' : 'https://api.m.jd.com';
                return context$1$0.abrupt('return', module.exports.requestXHR(host + '/?' + Object.keys(payload).map(function (key) {
                    return key + '=' + encodeURIComponent(payload[key]);
                }).join('&'), true, {
                    'x-referer-page': 'https://' + location.hostname + '/' + id + '.html',
                    'x-rp-client': 'h5_1.0.0'
                }));

            case 26:
            case 'end':
                return context$1$0.stop();
        }
    }, null, _this);
};

module.exports.buildUrl = function (url, payload) {
    return url + '?' + Object.keys(payload).map(function (key) {
        return key + '=' + encodeURIComponent(payload[key]);
    }).join('&');
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {// 有时需要等待条件满足再执行



var metConditions = [];

var waitList = {};
var dataList = {};

var globalCondition = {
    met: function met(condition) {
        var timeout = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
        var defaultValue = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];

        return new Promise(function (resolve) {
            if (metConditions.indexOf(condition) > -1) {
                resolve(dataList[condition]);
            } else {
                if (waitList[condition]) {
                    waitList[condition].push(resolve);
                } else {
                    waitList[condition] = [resolve];
                }
                if (timeout) {
                    setTimeout(function () {
                        resolve(defaultValue);
                    }, timeout);
                }
            }
        });
    },
    clearAll: function clearAll() {
        metConditions = metConditions.filter(function (x) {
            return x === 'GwdConfig';
        });
        waitList = {};
        dataList = {
            GwdConfig: dataList.GwdConfig
        };
    },
    clear: function clear(condition) {
        var idx = metConditions.indexOf(condition);
        if (idx > -1) {
            metConditions.splice(idx, 1);
            delete dataList[condition];
        }
    },
    setMet: function setMet(condition) {
        var data = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];

        if (metConditions.indexOf(condition) === -1) {
            metConditions.push(condition);
            dataList[condition] = data;
        }
        if (waitList[condition]) {
            waitList[condition].forEach(function (x) {
                return x(data);
            });
            waitList[condition] = [];
        }
    }
};

G.globalCondition = globalCondition;

module.exports = globalCondition;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

var runtime = (function (exports) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  function define(obj, key, value) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
    return obj[key];
  }
  try {
    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
    define({}, "");
  } catch (err) {
    define = function(obj, key, value) {
      return obj[key] = value;
    };
  }

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) });

    return generator;
  }
  exports.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  define(IteratorPrototype, iteratorSymbol, function () {
    return this;
  });

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = GeneratorFunctionPrototype;
  defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true });
  defineProperty(
    GeneratorFunctionPrototype,
    "constructor",
    { value: GeneratorFunction, configurable: true }
  );
  GeneratorFunction.displayName = define(
    GeneratorFunctionPrototype,
    toStringTagSymbol,
    "GeneratorFunction"
  );

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      define(prototype, method, function(arg) {
        return this._invoke(method, arg);
      });
    });
  }

  exports.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  exports.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      define(genFun, toStringTagSymbol, "GeneratorFunction");
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  exports.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator, PromiseImpl) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return PromiseImpl.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return PromiseImpl.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration.
          result.value = unwrapped;
          resolve(result);
        }, function(error) {
          // If a rejected Promise was yielded, throw the rejection back
          // into the async generator function so it can be handled there.
          return invoke("throw", error, resolve, reject);
        });
      }
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new PromiseImpl(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    defineProperty(this, "_invoke", { value: enqueue });
  }

  defineIteratorMethods(AsyncIterator.prototype);
  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
    return this;
  });
  exports.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
    if (PromiseImpl === void 0) PromiseImpl = Promise;

    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList),
      PromiseImpl
    );

    return exports.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var methodName = context.method;
    var method = delegate.iterator[methodName];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method, or a missing .next mehtod, always terminate the
      // yield* loop.
      context.delegate = null;

      // Note: ["return"] must be used for ES3 parsing compatibility.
      if (methodName === "throw" && delegate.iterator["return"]) {
        // If the delegate iterator has a return method, give it a
        // chance to clean up.
        context.method = "return";
        context.arg = undefined;
        maybeInvokeDelegate(delegate, context);

        if (context.method === "throw") {
          // If maybeInvokeDelegate(context) changed context.method from
          // "return" to "throw", let that override the TypeError below.
          return ContinueSentinel;
        }
      }
      if (methodName !== "return") {
        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a '" + methodName + "' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  define(Gp, toStringTagSymbol, "Generator");

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  define(Gp, iteratorSymbol, function() {
    return this;
  });

  define(Gp, "toString", function() {
    return "[object Generator]";
  });

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  exports.keys = function(val) {
    var object = Object(val);
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  exports.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };

  // Regardless of whether this script is executing as a CommonJS module
  // or not, return the runtime object so that we can declare the variable
  // regeneratorRuntime in the outer scope, which allows this module to be
  // injected easily by `bin/regenerator --include-runtime script.js`.
  return exports;

}(
  // If this script is executing as a CommonJS module, use module.exports
  // as the regeneratorRuntime namespace. Otherwise create a new empty
  // object. Either way, the resulting object will be used to initialize
  // the regeneratorRuntime variable at the top of this file.
   true ? module.exports : {}
));

try {
  regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
  // This module should not be running in strict mode, so the above
  // assignment should always work unless something is misconfigured. Just
  // in case runtime.js accidentally runs in strict mode, in modern engines
  // we can explicitly access globalThis. In older engines we can escape
  // strict mode using a global Function call. This could conceivably fail
  // if a Content Security Policy forbids using Function, but in that case
  // the proper solution is to fix the accidental strict mode problem. If
  // you've misconfigured your bundler to force strict mode and applied a
  // CSP to forbid Function, and you're not willing to fix either of those
  // problems, please detail your unique predicament in a GitHub issue.
  if (typeof globalThis === "object") {
    globalThis.regeneratorRuntime = runtime;
  } else {
    Function("r", "regeneratorRuntime = r")(runtime);
  }
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var debug = "production" === 'debug';

module.exports = {
  log: debug && console.log ? console.log : function (x) {},
  error: function error(e) {
    if (console.error && debug) {
      console.error(e);
    }
  },
  warn: debug ? console.warn : function (x) {}
};

/***/ }),
/* 7 */
/***/ (function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
	var list = [];

	// return the list of modules as css string
	list.toString = function toString() {
		var result = [];
		for(var i = 0; i < this.length; i++) {
			var item = this[i];
			if(item[2]) {
				result.push("@media " + item[2] + "{" + item[1] + "}");
			} else {
				result.push(item[1]);
			}
		}
		return result.join("");
	};

	// import a list of modules into the list
	list.i = function(modules, mediaQuery) {
		if(typeof modules === "string")
			modules = [[null, modules, ""]];
		var alreadyImportedModules = {};
		for(var i = 0; i < this.length; i++) {
			var id = this[i][0];
			if(typeof id === "number")
				alreadyImportedModules[id] = true;
		}
		for(i = 0; i < modules.length; i++) {
			var item = modules[i];
			// skip already imported module
			// this implementation is not 100% perfect for weird media query combinations
			//  when a module is imported multiple times with different media queries.
			//  I hope this will never occur (Hey this way we have smaller bundles)
			if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
				if(mediaQuery && !item[2]) {
					item[2] = mediaQuery;
				} else if(mediaQuery) {
					item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
				}
				list.push(item);
			}
		}
	};
	return list;
};


/***/ }),
/* 8 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (immutable) */ __webpack_exports__["default"] = addStylesClient;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listToStyles__ = __webpack_require__(294);
/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
  Modified by Evan You @yyx990803
*/



var hasDocument = typeof document !== 'undefined'

if (typeof DEBUG !== 'undefined' && DEBUG) {
  if (!hasDocument) {
    throw new Error(
    'vue-style-loader cannot be used in a non-browser environment. ' +
    "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  ) }
}

/*
type StyleObject = {
  id: number;
  parts: Array<StyleObjectPart>
}

type StyleObjectPart = {
  css: string;
  media: string;
  sourceMap: ?string
}
*/

var stylesInDom = {/*
  [id: number]: {
    id: number,
    refs: number,
    parts: Array<(obj?: StyleObjectPart) => void>
  }
*/}

var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
var singletonElement = null
var singletonCounter = 0
var isProduction = false
var noop = function () {}
var options = null
var ssrIdKey = 'data-vue-ssr-id'

// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())

function addStylesClient (parentId, list, _isProduction, _options) {
  isProduction = _isProduction

  options = _options || {}

  var styles = Object(__WEBPACK_IMPORTED_MODULE_0__listToStyles__["a" /* default */])(parentId, list)
  addStylesToDom(styles)

  return function update (newList) {
    var mayRemove = []
    for (var i = 0; i < styles.length; i++) {
      var item = styles[i]
      var domStyle = stylesInDom[item.id]
      domStyle.refs--
      mayRemove.push(domStyle)
    }
    if (newList) {
      styles = Object(__WEBPACK_IMPORTED_MODULE_0__listToStyles__["a" /* default */])(parentId, newList)
      addStylesToDom(styles)
    } else {
      styles = []
    }
    for (var i = 0; i < mayRemove.length; i++) {
      var domStyle = mayRemove[i]
      if (domStyle.refs === 0) {
        for (var j = 0; j < domStyle.parts.length; j++) {
          domStyle.parts[j]()
        }
        delete stylesInDom[domStyle.id]
      }
    }
  }
}

function addStylesToDom (styles /* Array<StyleObject> */) {
  for (var i = 0; i < styles.length; i++) {
    var item = styles[i]
    var domStyle = stylesInDom[item.id]
    if (domStyle) {
      domStyle.refs++
      for (var j = 0; j < domStyle.parts.length; j++) {
        domStyle.parts[j](item.parts[j])
      }
      for (; j < item.parts.length; j++) {
        domStyle.parts.push(addStyle(item.parts[j]))
      }
      if (domStyle.parts.length > item.parts.length) {
        domStyle.parts.length = item.parts.length
      }
    } else {
      var parts = []
      for (var j = 0; j < item.parts.length; j++) {
        parts.push(addStyle(item.parts[j]))
      }
      stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
    }
  }
}

function createStyleElement () {
  var styleElement = document.createElement('style')
  styleElement.type = 'text/css'
  head.appendChild(styleElement)
  return styleElement
}

function addStyle (obj /* StyleObjectPart */) {
  var update, remove
  var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')

  if (styleElement) {
    if (isProduction) {
      // has SSR styles and in production mode.
      // simply do nothing.
      return noop
    } else {
      // has SSR styles but in dev mode.
      // for some reason Chrome can't handle source map in server-rendered
      // style tags - source maps in <style> only works if the style tag is
      // created and inserted dynamically. So we remove the server rendered
      // styles and inject new ones.
      styleElement.parentNode.removeChild(styleElement)
    }
  }

  if (isOldIE) {
    // use singleton mode for IE9.
    var styleIndex = singletonCounter++
    styleElement = singletonElement || (singletonElement = createStyleElement())
    update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
    remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  } else {
    // use multi-style-tag mode in all other cases
    styleElement = createStyleElement()
    update = applyToTag.bind(null, styleElement)
    remove = function () {
      styleElement.parentNode.removeChild(styleElement)
    }
  }

  update(obj)

  return function updateStyle (newObj /* StyleObjectPart */) {
    if (newObj) {
      if (newObj.css === obj.css &&
          newObj.media === obj.media &&
          newObj.sourceMap === obj.sourceMap) {
        return
      }
      update(obj = newObj)
    } else {
      remove()
    }
  }
}

var replaceText = (function () {
  var textStore = []

  return function (index, replacement) {
    textStore[index] = replacement
    return textStore.filter(Boolean).join('\n')
  }
})()

function applyToSingletonTag (styleElement, index, remove, obj) {
  var css = remove ? '' : obj.css

  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = replaceText(index, css)
  } else {
    var cssNode = document.createTextNode(css)
    var childNodes = styleElement.childNodes
    if (childNodes[index]) styleElement.removeChild(childNodes[index])
    if (childNodes.length) {
      styleElement.insertBefore(cssNode, childNodes[index])
    } else {
      styleElement.appendChild(cssNode)
    }
  }
}

function applyToTag (styleElement, obj) {
  var css = obj.css
  var media = obj.media
  var sourceMap = obj.sourceMap

  if (media) {
    styleElement.setAttribute('media', media)
  }
  if (options.ssrId) {
    styleElement.setAttribute(ssrIdKey, obj.id)
  }

  if (sourceMap) {
    // https://developer.chrome.com/devtools/docs/javascript-debugging
    // this makes source maps inside style tags work properly in Chrome
    css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
    // http://stackoverflow.com/a/26603875
    css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  }

  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = css
  } else {
    while (styleElement.firstChild) {
      styleElement.removeChild(styleElement.firstChild)
    }
    styleElement.appendChild(document.createTextNode(css))
  }
}


/***/ }),
/* 9 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = normalizeComponent;
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }

module.exports.checkimg = function (url, imgObj, size, callback) {
  var sz = typeof size == 'undefined' || size == "" || size == null ? 90 : size;
  var val = url;
  var img = new Image();
  if (G.browser.msie && G.browser.version < 11) {
    img.onreadystatechange = function () {
      if (img.readyState == "complete" || img.readyState == "loaded") {
        if (img.width > 0 && img.height > 0) {
          var rate = sz / img.width < sz / img.height ? sz / img.width : sz / img.height;
          if (rate <= 1) {
            imgObj.css('width', img.width * rate);
            imgObj.css('height', img.height * rate);
          } else {
            imgObj.css('width', img.width);
            imgObj.css('height', img.height);
          }
        }
        imgObj.attr('src', url);
      }
    };
  } else {
    img.onload = function () {
      if (img.complete == true) {
        if (img.width > 0 && img.height > 0) {
          var rate = sz / img.width < sz / img.height ? sz / img.width : sz / img.height;
          if (rate <= 1) {
            imgObj.css('width', img.width * rate);
            imgObj.css('height', img.height * rate);
          } else {
            imgObj.css('width', img.width);
            imgObj.css('height', img.height);
          }
        }
        imgObj.attr('src', url);
        if (callback) {
          callback();
        }
      }
    };
  }
  img.onerror = function () {
    imgObj.attr('src', G.s_server + "/images/extensions/default_load_image.png").css('width', 90);
    imgObj.attr('data-original', G.s_server + "/images/extensions/default_load_image.png");
  };
  img.src = val;
};

module.exports.getParameterByName = function (name, url) {
  if (!url) {
    url = window.location.href;
  }
  if (URL) {
    var params = new URL(url).searchParams;
    return params.get(name);
  }
  name = name.replace(/[\[\]]/g, "\\$&");
  var regex = new RegExp("[?#&]" + name + "(=([^&#]*)|&|#|$)"),
      results = regex.exec(url);
  if (!results) return null;
  if (!results[2]) return '';
  return decodeURIComponent(results[2].replace(/\+/g, " "));
};

module.exports.sleep = function (time) {
  return new Promise(function (resolve) {
    setTimeout(function () {
      return resolve();
    }, time);
  });
};

module.exports.asyncForEach = function callee$0$0(array, callback) {
  var index;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        index = 0;

      case 1:
        if (!(index < array.length)) {
          context$1$0.next = 7;
          break;
        }

        context$1$0.next = 4;
        return regeneratorRuntime.awrap(callback(array[index], index, array));

      case 4:
        index++;
        context$1$0.next = 1;
        break;

      case 7:
      case "end":
        return context$1$0.stop();
    }
  }, null, this);
};

module.exports.getPageCookie = function () {
  return document.cookie.split('; ').reduce(function (prev, current) {
    var _current$split = current.split('=');

    var _current$split2 = _toArray(_current$split);

    var name = _current$split2[0];

    var value = _current$split2.slice(1);

    prev[name] = value.join('=');
    return prev;
  }, {});
};

// 通用数组去重
module.exports.arrayUnique = function (arr, valueFn) {
  var list = [];
  return arr.filter(function (x) {
    var val = valueFn(x);
    if (list.indexOf(val) === -1) {
      list.push(val);
      return true;
    }
    return false;
  });
};

module.exports.appendCss = function (cssText) {
  var s = document.createElement('STYLE');
  s.innerHTML = cssText;
  document.body.appendChild(s);
};

module.exports.debounce = function (func) {
  var timeout = arguments.length <= 1 || arguments[1] === undefined ? 300 : arguments[1];

  var timer = undefined;
  return function () {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    clearTimeout(timer);
    timer = setTimeout(function () {
      func.apply(undefined, args);
    }, timeout);
  };
};

module.exports.throttle = function (func) {
  var timeout = arguments.length <= 1 || arguments[1] === undefined ? 300 : arguments[1];

  var timer = undefined;
  return function () {
    for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
      args[_key2] = arguments[_key2];
    }

    if (!timer) {
      timer = setTimeout(function () {
        timer = null;func.apply(undefined, args);
      }, timeout);
    }
  };
};

module.exports.limit = function (func) {
  var timeout = arguments.length <= 1 || arguments[1] === undefined ? 300 : arguments[1];

  var lastExecTime = 0;
  return function () {
    for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
      args[_key3] = arguments[_key3];
    }

    var now = Date.now();
    if (now - lastExecTime > timeout) {
      lastExecTime = now;
      func.apply(undefined, args);
    }
  };
};

module.exports.arrayToObj = function (array, key) {
  var obj = {};
  array.forEach(function (item) {
    obj[item[key]] = item;
  });
  return obj;
};

module.exports.getBodyOffset = function (el) {
  if (typeof el === 'string') {
    el = document.querySelector(el);
  }
  if (!el) {
    return;
  }
  // el.style.display = 'block'
  var rect = el.getBoundingClientRect();
  return {
    left: rect.left + window.scrollX,
    top: rect.top + window.scrollY,
    width: el.clientWidth,
    height: rect.height
  };
};

module.exports.findStringFromSelectors = function (selectors) {
  for (var i = 0; i < selectors.length; i++) {
    if (document.querySelector(selectors[i])) {
      return document.querySelector(selectors[i]).innerText;
    }
  }
};

module.exports.checkButie = function (title) {
  if (title.includes('国补')) {
    return true;
  }
  if (!title.includes('补贴')) {
    return false;
  }
  if (title.includes('修')) {
    return false;
  }
  return true;
};

module.exports.urlFix = function (url) {
  if (url.includes('?')) {
    return url;
  }
  return url + '?';
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var communicate = __webpack_require__(18);
var deviceEncode = __webpack_require__(235);

module.exports.retry = function (wait, cb, times, time) {
  //@param function wait 等待的条件
  //@param function cb 条件满足后做的操作
  //@param number times  尝试的次数
  //@param number time  每次等待的时间
  var _times = 0;

  function _try() {
    if (_times >= times) return;
    if (wait()) cb();else {
      _times++;
      setTimeout(_try, time);
    }
  }
  _try();
};
module.exports.settings = function (op, key, value) {
  var request = __webpack_require__(3);
  request.get(G.server + '/brwext/permanent_id?' + ('version=2&op=' + op + '&' + key + '=' + value)).done(function (msg) {
    G[key] = value;
  });
};

module.exports.setLocal = function (key, value) {
  communicate.trigger({
    'type': 'setStorage',
    'key': key,
    'value': value
  });
};

module.exports.openTab = function () {
  if (!G.allowBackgroundRequest) {
    window.open(G.server + '/brwext/setting?from=' + deviceEncode(G.from_device) + '&btype=' + (G.btype ? G.btype : ''));
  }
  communicate.trigger({
    'type': 'opentab'
  });
};
// module.exports.addFavorCheck = () => {
//   communicate.trigger({
//     'type': 'addFavorCheck'
//   })
// }

module.exports.getTimeNumber = function (time, type) {
  // 1: xxxx-xx-xx 2.xx-xx 3.xx.xx 4. xxxx.xx.xx
  var dateObj = new Date(time);
  var y = dateObj.getFullYear();
  var m = dateObj.getMonth() + 1;
  var d = dateObj.getDate();
  if (m < 10) m = '0' + m;
  if (d < 10) d = '0' + d;
  var str = '';
  switch (type) {
    case "1":
      str = y + '-' + m + '-' + d;
      break;
    case "2":
      str = m + '-' + d;
      break;
    case "3":
      str = m + '.' + d;
      break;
    case "4":
      str = y + '.' + m + '.' + d;
      break;
    case "5":
      str = y + '/' + m + '/' + d;
      break;
    default:
      str = '(' + y + '.' + m + '.' + d + ')';
  }
  return str;
};

/**
 * 数组去重
 * @param array
 */
module.exports.arrayUnique = function (array) {
  var newArray = [];
  array.forEach(function (item) {
    if (newArray.indexOf(item) === -1) {
      newArray.push(item);
    }
  });
  return newArray;
};

module.exports.setSimplePagePos = function (dom, detail, detailW) {
  var mainW = $(window).width();
  var left = dom.offset().left;
  var domw = dom.outerWidth();
  var dleft = left + domw - detailW - 2;
  if (dleft < 0) dleft = 0;
  if (dleft + detailW > mainW) dleft = mainW - detailW - 2;
  detail.css('left', dleft + 'px');
};

module.exports.deepCopy = function (obj) {
  return $.extend(true, {}, obj);
};

module.exports.stringToNumber = function (text) {
  if (!text) {
    return 0;
  }
  var x = parseInt(text);
  if (text.includes('万')) {
    x = x * 10000;
  }
  return x;
};

module.exports.numberToString = function (number) {
  var digit = arguments.length <= 1 || arguments[1] === undefined ? 2 : arguments[1];

  if (typeof number === 'string' && number.includes('万')) {
    return number;
  }
  var x = parseInt(number);
  if (x > 10000) {
    x = x / 10000;
    x = x.toFixed(digit).replace('.' + '0'.repeat(digit), '') + '万';
  }
  return x;
};

module.exports.waitForConditionFn = function (conditionFn) {
  var checkInterval = arguments.length <= 1 || arguments[1] === undefined ? 300 : arguments[1];
  var maxTryTimes = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];

  return new Promise(function (resolve) {
    if (conditionFn()) {
      resolve(true);
      return;
    }
    var tryTimes = 0;
    var t = setInterval(function () {
      if (conditionFn()) {
        resolve(true);
        clearInterval(t);
      }
      tryTimes++;
      if (maxTryTimes && tryTimes > maxTryTimes) {
        clearInterval(t);
      }
    }, checkInterval);
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var tm = undefined;
var load = undefined;
var caches = undefined;
function addcnzz(c) {
  // var head = document.getElementsByTagName('head')
  // if(head && head[0]) head = head[0]
  // var script = document.createElement('script');
  // script.src = c;
  // script.async = true;
  // script.defer = true;
  // script.language = "JavaScript";
  // head.appendChild(script);
  // load = true
}

module.exports.init = function (cnzz) {
  if (cnzz) {
    addcnzz(cnzz);
  }
  setTimeout(function () {
    log('ChromeVersion', __webpack_require__(241).getChromeVersion());
  }, 1000);
  if (navigator.userAgent.toLowerCase().includes('edg')) {
    G.browser = 'edge';
  } else {
    G.browser = G.from_device;
  }
};

window.cnzzLogCount = 0;

var log = function log(category, action, label, value, nodeid) {
  window.cnzzLogCount++;
  if (!load) {
    return;
  };
  if (caches === category) {
    clearTimeout(tm);
    tm = setTimeout(function () {
      if (window._czc && window._czc.push) {
        action = action || '.';
        label = label || '';
        window._czc.push(["_trackEvent", category, action, label, value, nodeid]);
        caches = category;
      }
    }, 300);
  } else {
    if (window._czc && window._czc.push) {
      action = action || '.';
      label = label || '';
      window._czc.push(["_trackEvent", category, action, label, value, nodeid]);
      caches = category;
    }
  }
};

var logged = [];
var logOnce = function logOnce(category, action, label, value, nodeid) {
  // 同log，只记录一次
  var id = [category, action, label, value, nodeid].join('-');
  if (logged.indexOf(id) === -1) {
    log(category, action, label, value, nodeid);
    logged.push(id);
  }
};

module.exports.log = log;
module.exports.logOnce = logOnce;

// 记录某个元素的曝光和悬浮
module.exports.hoverLog = function (element, name) {
  setTimeout(function () {
    if ($(element).length) {
      log(name, '曝光');
    }
    $(element).hover(function () {
      logOnce(name, '悬浮');
    });
  }, 0);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

module.exports.compile = function(template) {
  if (typeof template === 'function') {
    return template
  }
  return function(options) {
    var el = document.createElement('DIV')

    // let cmp = new Vue({
    //   el: el,
    //   template: template,
    //   data: options
    // })

    el.class = 'fake'
    el.innerHTML = template
    __webpack_require__(6).log('bad template', template)
    return el
  }
}

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  var tm = undefined;
  var globalEvent = undefined;
  var userData = __webpack_require__(15);

  function goLog(event) {
    if (window.gwd_G) G = window.gwd_G;
    if (!G) return;
    var userid = __webpack_require__(239).getInfo('user_extension_id') || '';
    userid = userid || G.userid || window.gwd_G && window.gwd_G.userid;
    var t_server = G.tj_server;
    if (G.new_extension && !G.fdsMod) t_server = G.server;
    if (!event) event = "";
    event = encodeURIComponent(event);
    // if (navigator.userAgent.includes('Firefox') && !G.allowTracking) return;
    if (!t_server) t_server = G.server;
    var n = 'img_random' + Math.random();
    var img = window[n] = new Image();
    img.onload = img.onerror = function () {
      window[n] = null;
    };
    img.src = t_server + '/visit/?version=' + G.version + '&userid=' + userid + '&ext_v=' + G.ext_v + '&from_device=' + G.from_device + '&permanent_id=' + userData.get('p_id') + '&random=' + Math.random() + '&action=' + event + '&refer=' + encodeURIComponent(document.referrer) + '&url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title);
  }
  if (G.from_type === 'bjg_360') return;
  return function (event) {
    if (G.from_device === '360') return;
    if (globalEvent === event) {
      globalEvent = event;
      clearTimeout(tm);
      tm = setTimeout(function () {
        goLog(event);
      }, 500);
    } else {
      globalEvent = event;
      goLog(event);
    }
  };
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  var exports = {};
  var data = {};
  exports.get = function (key) {
    return data[key];
  };
  exports.data = data;
  exports.set = function (key, value) {
    if (value === undefined && key) {
      data = key;
    } else {
      data[key] = value;
    }
  };
  return exports;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var communicate = __webpack_require__(18);

module.exports = {
  get: function get(path, params, callback) {
    var reqId = parseInt(Math.random() * 10000).toString() + Date.now();
    return new Promise(function (resolve) {
      communicate.trigger({
        type: 'backgroundReq',
        reqId: reqId,
        path: path,
        params: typeof params === 'object' ? JSON.stringify(params) : '{}',
        referer: location.href
      });
      communicate.on(function (resp) {
        if (resp.type === 'backgroundResp' && resp.value.reqId === reqId) {
          if (!callback) {
            try {
              resolve(JSON.parse(resp.value.data));
            } catch (e) {
              // require('common/extConsole').error(e)
              __webpack_require__(6).warn('bg resp json fail', resp.value.data);
              resolve(resp.value.data);
            }
            return;
          }
          try {
            callback(JSON.parse(resp.value.data));
          } catch (e) {
            callback(resp.value.data);
          }
        }
      });
    });
  }
};

/***/ }),
/* 17 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EffectScope", function() { return EffectScope; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computed", function() { return computed; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customRef", function() { return customRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Vue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineAsyncComponent", function() { return defineAsyncComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineComponent", function() { return defineComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "del", function() { return del; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "effectScope", function() { return effectScope; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentInstance", function() { return getCurrentInstance; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentScope", function() { return getCurrentScope; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return h; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isProxy", function() { return isProxy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isReactive", function() { return isReactive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isReadonly", function() { return isReadonly; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRef", function() { return isRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isShallow", function() { return isShallow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markRaw", function() { return markRaw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeDefaults", function() { return mergeDefaults; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nextTick", function() { return nextTick; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onActivated", function() { return onActivated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onBeforeMount", function() { return onBeforeMount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onBeforeUnmount", function() { return onBeforeUnmount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onBeforeUpdate", function() { return onBeforeUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onDeactivated", function() { return onDeactivated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorCaptured", function() { return onErrorCaptured; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onMounted", function() { return onMounted; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRenderTracked", function() { return onRenderTracked; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRenderTriggered", function() { return onRenderTriggered; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onScopeDispose", function() { return onScopeDispose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onServerPrefetch", function() { return onServerPrefetch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnmounted", function() { return onUnmounted; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUpdated", function() { return onUpdated; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provide", function() { return provide; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "proxyRefs", function() { return proxyRefs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactive", function() { return reactive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readonly", function() { return readonly; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ref", function() { return ref$1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowReactive", function() { return shallowReactive; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowReadonly", function() { return shallowReadonly; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shallowRef", function() { return shallowRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toRaw", function() { return toRaw; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toRef", function() { return toRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toRefs", function() { return toRefs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triggerRef", function() { return triggerRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unref", function() { return unref; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useAttrs", function() { return useAttrs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useCssModule", function() { return useCssModule; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useCssVars", function() { return useCssVars; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useListeners", function() { return useListeners; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSlots", function() { return useSlots; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "watch", function() { return watch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "watchEffect", function() { return watchEffect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "watchPostEffect", function() { return watchPostEffect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "watchSyncEffect", function() { return watchSyncEffect; });
/*!
 * Vue.js v2.7.16
 * (c) 2014-2023 Evan You
 * Released under the MIT License.
 */
var emptyObject = Object.freeze({});
var isArray = Array.isArray;
// These helpers produce better VM code in JS engines due to their
// explicitness and function inlining.
function isUndef(v) {
    return v === undefined || v === null;
}
function isDef(v) {
    return v !== undefined && v !== null;
}
function isTrue(v) {
    return v === true;
}
function isFalse(v) {
    return v === false;
}
/**
 * Check if value is primitive.
 */
function isPrimitive(value) {
    return (typeof value === 'string' ||
        typeof value === 'number' ||
        // $flow-disable-line
        typeof value === 'symbol' ||
        typeof value === 'boolean');
}
function isFunction(value) {
    return typeof value === 'function';
}
/**
 * Quick object check - this is primarily used to tell
 * objects from primitive values when we know the value
 * is a JSON-compliant type.
 */
function isObject(obj) {
    return obj !== null && typeof obj === 'object';
}
/**
 * Get the raw type string of a value, e.g., [object Object].
 */
var _toString = Object.prototype.toString;
function toRawType(value) {
    return _toString.call(value).slice(8, -1);
}
/**
 * Strict object type check. Only returns true
 * for plain JavaScript objects.
 */
function isPlainObject(obj) {
    return _toString.call(obj) === '[object Object]';
}
function isRegExp(v) {
    return _toString.call(v) === '[object RegExp]';
}
/**
 * Check if val is a valid array index.
 */
function isValidArrayIndex(val) {
    var n = parseFloat(String(val));
    return n >= 0 && Math.floor(n) === n && isFinite(val);
}
function isPromise(val) {
    return (isDef(val) &&
        typeof val.then === 'function' &&
        typeof val.catch === 'function');
}
/**
 * Convert a value to a string that is actually rendered.
 */
function toString(val) {
    return val == null
        ? ''
        : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
            ? JSON.stringify(val, replacer, 2)
            : String(val);
}
function replacer(_key, val) {
    // avoid circular deps from v3
    if (val && val.__v_isRef) {
        return val.value;
    }
    return val;
}
/**
 * Convert an input value to a number for persistence.
 * If the conversion fails, return original string.
 */
function toNumber(val) {
    var n = parseFloat(val);
    return isNaN(n) ? val : n;
}
/**
 * Make a map and return a function for checking if a key
 * is in that map.
 */
function makeMap(str, expectsLowerCase) {
    var map = Object.create(null);
    var list = str.split(',');
    for (var i = 0; i < list.length; i++) {
        map[list[i]] = true;
    }
    return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };
}
/**
 * Check if a tag is a built-in tag.
 */
var isBuiltInTag = makeMap('slot,component', true);
/**
 * Check if an attribute is a reserved attribute.
 */
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
/**
 * Remove an item from an array.
 */
function remove$2(arr, item) {
    var len = arr.length;
    if (len) {
        // fast path for the only / last item
        if (item === arr[len - 1]) {
            arr.length = len - 1;
            return;
        }
        var index = arr.indexOf(item);
        if (index > -1) {
            return arr.splice(index, 1);
        }
    }
}
/**
 * Check whether an object has the property.
 */
var hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
    return hasOwnProperty.call(obj, key);
}
/**
 * Create a cached version of a pure function.
 */
function cached(fn) {
    var cache = Object.create(null);
    return function cachedFn(str) {
        var hit = cache[str];
        return hit || (cache[str] = fn(str));
    };
}
/**
 * Camelize a hyphen-delimited string.
 */
var camelizeRE = /-(\w)/g;
var camelize = cached(function (str) {
    return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });
});
/**
 * Capitalize a string.
 */
var capitalize = cached(function (str) {
    return str.charAt(0).toUpperCase() + str.slice(1);
});
/**
 * Hyphenate a camelCase string.
 */
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = cached(function (str) {
    return str.replace(hyphenateRE, '-$1').toLowerCase();
});
/**
 * Simple bind polyfill for environments that do not support it,
 * e.g., PhantomJS 1.x. Technically, we don't need this anymore
 * since native bind is now performant enough in most browsers.
 * But removing it would mean breaking code that was able to run in
 * PhantomJS 1.x, so this must be kept for backward compatibility.
 */
/* istanbul ignore next */
function polyfillBind(fn, ctx) {
    function boundFn(a) {
        var l = arguments.length;
        return l
            ? l > 1
                ? fn.apply(ctx, arguments)
                : fn.call(ctx, a)
            : fn.call(ctx);
    }
    boundFn._length = fn.length;
    return boundFn;
}
function nativeBind(fn, ctx) {
    return fn.bind(ctx);
}
// @ts-expect-error bind cannot be `undefined`
var bind = Function.prototype.bind ? nativeBind : polyfillBind;
/**
 * Convert an Array-like object to a real Array.
 */
function toArray(list, start) {
    start = start || 0;
    var i = list.length - start;
    var ret = new Array(i);
    while (i--) {
        ret[i] = list[i + start];
    }
    return ret;
}
/**
 * Mix properties into target object.
 */
function extend(to, _from) {
    for (var key in _from) {
        to[key] = _from[key];
    }
    return to;
}
/**
 * Merge an Array of Objects into a single Object.
 */
function toObject(arr) {
    var res = {};
    for (var i = 0; i < arr.length; i++) {
        if (arr[i]) {
            extend(res, arr[i]);
        }
    }
    return res;
}
/* eslint-disable no-unused-vars */
/**
 * Perform no operation.
 * Stubbing args to make Flow happy without leaving useless transpiled code
 * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
 */
function noop(a, b, c) { }
/**
 * Always return false.
 */
var no = function (a, b, c) { return false; };
/* eslint-enable no-unused-vars */
/**
 * Return the same value.
 */
var identity = function (_) { return _; };
/**
 * Check if two values are loosely equal - that is,
 * if they are plain objects, do they have the same shape?
 */
function looseEqual(a, b) {
    if (a === b)
        return true;
    var isObjectA = isObject(a);
    var isObjectB = isObject(b);
    if (isObjectA && isObjectB) {
        try {
            var isArrayA = Array.isArray(a);
            var isArrayB = Array.isArray(b);
            if (isArrayA && isArrayB) {
                return (a.length === b.length &&
                    a.every(function (e, i) {
                        return looseEqual(e, b[i]);
                    }));
            }
            else if (a instanceof Date && b instanceof Date) {
                return a.getTime() === b.getTime();
            }
            else if (!isArrayA && !isArrayB) {
                var keysA = Object.keys(a);
                var keysB = Object.keys(b);
                return (keysA.length === keysB.length &&
                    keysA.every(function (key) {
                        return looseEqual(a[key], b[key]);
                    }));
            }
            else {
                /* istanbul ignore next */
                return false;
            }
        }
        catch (e) {
            /* istanbul ignore next */
            return false;
        }
    }
    else if (!isObjectA && !isObjectB) {
        return String(a) === String(b);
    }
    else {
        return false;
    }
}
/**
 * Return the first index at which a loosely equal value can be
 * found in the array (if value is a plain object, the array must
 * contain an object of the same shape), or -1 if it is not present.
 */
function looseIndexOf(arr, val) {
    for (var i = 0; i < arr.length; i++) {
        if (looseEqual(arr[i], val))
            return i;
    }
    return -1;
}
/**
 * Ensure a function is called only once.
 */
function once(fn) {
    var called = false;
    return function () {
        if (!called) {
            called = true;
            fn.apply(this, arguments);
        }
    };
}
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill
function hasChanged(x, y) {
    if (x === y) {
        return x === 0 && 1 / x !== 1 / y;
    }
    else {
        return x === x || y === y;
    }
}

var SSR_ATTR = 'data-server-rendered';
var ASSET_TYPES = ['component', 'directive', 'filter'];
var LIFECYCLE_HOOKS = [
    'beforeCreate',
    'created',
    'beforeMount',
    'mounted',
    'beforeUpdate',
    'updated',
    'beforeDestroy',
    'destroyed',
    'activated',
    'deactivated',
    'errorCaptured',
    'serverPrefetch',
    'renderTracked',
    'renderTriggered'
];

var config = {
    /**
     * Option merge strategies (used in core/util/options)
     */
    // $flow-disable-line
    optionMergeStrategies: Object.create(null),
    /**
     * Whether to suppress warnings.
     */
    silent: false,
    /**
     * Show production mode tip message on boot?
     */
    productionTip: "production" !== 'production',
    /**
     * Whether to enable devtools
     */
    devtools: "production" !== 'production',
    /**
     * Whether to record perf
     */
    performance: false,
    /**
     * Error handler for watcher errors
     */
    errorHandler: null,
    /**
     * Warn handler for watcher warns
     */
    warnHandler: null,
    /**
     * Ignore certain custom elements
     */
    ignoredElements: [],
    /**
     * Custom user key aliases for v-on
     */
    // $flow-disable-line
    keyCodes: Object.create(null),
    /**
     * Check if a tag is reserved so that it cannot be registered as a
     * component. This is platform-dependent and may be overwritten.
     */
    isReservedTag: no,
    /**
     * Check if an attribute is reserved so that it cannot be used as a component
     * prop. This is platform-dependent and may be overwritten.
     */
    isReservedAttr: no,
    /**
     * Check if a tag is an unknown element.
     * Platform-dependent.
     */
    isUnknownElement: no,
    /**
     * Get the namespace of an element
     */
    getTagNamespace: noop,
    /**
     * Parse the real tag name for the specific platform.
     */
    parsePlatformTagName: identity,
    /**
     * Check if an attribute must be bound using property, e.g. value
     * Platform-dependent.
     */
    mustUseProp: no,
    /**
     * Perform updates asynchronously. Intended to be used by Vue Test Utils
     * This will significantly reduce performance if set to false.
     */
    async: true,
    /**
     * Exposed for legacy reasons
     */
    _lifecycleHooks: LIFECYCLE_HOOKS
};

/**
 * unicode letters used for parsing html tags, component names and property paths.
 * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
 * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
 */
var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
/**
 * Check if a string starts with $ or _
 */
function isReserved(str) {
    var c = (str + '').charCodeAt(0);
    return c === 0x24 || c === 0x5f;
}
/**
 * Define a property.
 */
function def(obj, key, val, enumerable) {
    Object.defineProperty(obj, key, {
        value: val,
        enumerable: !!enumerable,
        writable: true,
        configurable: true
    });
}
/**
 * Parse simple path.
 */
var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));
function parsePath(path) {
    if (bailRE.test(path)) {
        return;
    }
    var segments = path.split('.');
    return function (obj) {
        for (var i = 0; i < segments.length; i++) {
            if (!obj)
                return;
            obj = obj[segments[i]];
        }
        return obj;
    };
}

// can we use __proto__?
var hasProto = '__proto__' in {};
// Browser environment sniffing
var inBrowser = typeof window !== 'undefined';
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
var isIE = UA && /msie|trident/.test(UA);
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
var isEdge = UA && UA.indexOf('edge/') > 0;
UA && UA.indexOf('android') > 0;
var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
UA && /chrome\/\d+/.test(UA) && !isEdge;
UA && /phantomjs/.test(UA);
var isFF = UA && UA.match(/firefox\/(\d+)/);
// Firefox has a "watch" function on Object.prototype...
// @ts-expect-error firebox support
var nativeWatch = {}.watch;
var supportsPassive = false;
if (inBrowser) {
    try {
        var opts = {};
        Object.defineProperty(opts, 'passive', {
            get: function () {
                /* istanbul ignore next */
                supportsPassive = true;
            }
        }); // https://github.com/facebook/flow/issues/285
        window.addEventListener('test-passive', null, opts);
    }
    catch (e) { }
}
// this needs to be lazy-evaled because vue may be required before
// vue-server-renderer can set VUE_ENV
var _isServer;
var isServerRendering = function () {
    if (_isServer === undefined) {
        /* istanbul ignore if */
        if (!inBrowser && typeof global !== 'undefined') {
            // detect presence of vue-server-renderer and avoid
            // Webpack shimming the process
            _isServer =
                global['process'] && global['process'].env.VUE_ENV === 'server';
        }
        else {
            _isServer = false;
        }
    }
    return _isServer;
};
// detect devtools
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
/* istanbul ignore next */
function isNative(Ctor) {
    return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
}
var hasSymbol = typeof Symbol !== 'undefined' &&
    isNative(Symbol) &&
    typeof Reflect !== 'undefined' &&
    isNative(Reflect.ownKeys);
var _Set; // $flow-disable-line
/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
    // use native Set when available.
    _Set = Set;
}
else {
    // a non-standard Set polyfill that only works with primitive keys.
    _Set = /** @class */ (function () {
        function Set() {
            this.set = Object.create(null);
        }
        Set.prototype.has = function (key) {
            return this.set[key] === true;
        };
        Set.prototype.add = function (key) {
            this.set[key] = true;
        };
        Set.prototype.clear = function () {
            this.set = Object.create(null);
        };
        return Set;
    }());
}

var currentInstance = null;
/**
 * This is exposed for compatibility with v3 (e.g. some functions in VueUse
 * relies on it). Do not use this internally, just use `currentInstance`.
 *
 * @internal this function needs manual type declaration because it relies
 * on previously manually authored types from Vue 2
 */
function getCurrentInstance() {
    return currentInstance && { proxy: currentInstance };
}
/**
 * @internal
 */
function setCurrentInstance(vm) {
    if (vm === void 0) { vm = null; }
    if (!vm)
        currentInstance && currentInstance._scope.off();
    currentInstance = vm;
    vm && vm._scope.on();
}

/**
 * @internal
 */
var VNode = /** @class */ (function () {
    function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
        this.tag = tag;
        this.data = data;
        this.children = children;
        this.text = text;
        this.elm = elm;
        this.ns = undefined;
        this.context = context;
        this.fnContext = undefined;
        this.fnOptions = undefined;
        this.fnScopeId = undefined;
        this.key = data && data.key;
        this.componentOptions = componentOptions;
        this.componentInstance = undefined;
        this.parent = undefined;
        this.raw = false;
        this.isStatic = false;
        this.isRootInsert = true;
        this.isComment = false;
        this.isCloned = false;
        this.isOnce = false;
        this.asyncFactory = asyncFactory;
        this.asyncMeta = undefined;
        this.isAsyncPlaceholder = false;
    }
    Object.defineProperty(VNode.prototype, "child", {
        // DEPRECATED: alias for componentInstance for backwards compat.
        /* istanbul ignore next */
        get: function () {
            return this.componentInstance;
        },
        enumerable: false,
        configurable: true
    });
    return VNode;
}());
var createEmptyVNode = function (text) {
    if (text === void 0) { text = ''; }
    var node = new VNode();
    node.text = text;
    node.isComment = true;
    return node;
};
function createTextVNode(val) {
    return new VNode(undefined, undefined, undefined, String(val));
}
// optimized shallow clone
// used for static nodes and slot nodes because they may be reused across
// multiple renders, cloning them avoids errors when DOM manipulations rely
// on their elm reference.
function cloneVNode(vnode) {
    var cloned = new VNode(vnode.tag, vnode.data, 
    // #7975
    // clone children array to avoid mutating original in case of cloning
    // a child.
    vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
    cloned.ns = vnode.ns;
    cloned.isStatic = vnode.isStatic;
    cloned.key = vnode.key;
    cloned.isComment = vnode.isComment;
    cloned.fnContext = vnode.fnContext;
    cloned.fnOptions = vnode.fnOptions;
    cloned.fnScopeId = vnode.fnScopeId;
    cloned.asyncMeta = vnode.asyncMeta;
    cloned.isCloned = true;
    return cloned;
}

/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
    var e = new Error(message);
    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

var uid$2 = 0;
var pendingCleanupDeps = [];
var cleanupDeps = function () {
    for (var i = 0; i < pendingCleanupDeps.length; i++) {
        var dep = pendingCleanupDeps[i];
        dep.subs = dep.subs.filter(function (s) { return s; });
        dep._pending = false;
    }
    pendingCleanupDeps.length = 0;
};
/**
 * A dep is an observable that can have multiple
 * directives subscribing to it.
 * @internal
 */
var Dep = /** @class */ (function () {
    function Dep() {
        // pending subs cleanup
        this._pending = false;
        this.id = uid$2++;
        this.subs = [];
    }
    Dep.prototype.addSub = function (sub) {
        this.subs.push(sub);
    };
    Dep.prototype.removeSub = function (sub) {
        // #12696 deps with massive amount of subscribers are extremely slow to
        // clean up in Chromium
        // to workaround this, we unset the sub for now, and clear them on
        // next scheduler flush.
        this.subs[this.subs.indexOf(sub)] = null;
        if (!this._pending) {
            this._pending = true;
            pendingCleanupDeps.push(this);
        }
    };
    Dep.prototype.depend = function (info) {
        if (Dep.target) {
            Dep.target.addDep(this);
            if (false) {
                Dep.target.onTrack(__assign({ effect: Dep.target }, info));
            }
        }
    };
    Dep.prototype.notify = function (info) {
        // stabilize the subscriber list first
        var subs = this.subs.filter(function (s) { return s; });
        if (false) {
            // subs aren't sorted in scheduler if not running async
            // we need to sort them now to make sure they fire in correct
            // order
            subs.sort(function (a, b) { return a.id - b.id; });
        }
        for (var i = 0, l = subs.length; i < l; i++) {
            var sub = subs[i];
            if (false) {
                sub.onTrigger &&
                    sub.onTrigger(__assign({ effect: subs[i] }, info));
            }
            sub.update();
        }
    };
    return Dep;
}());
// The current target watcher being evaluated.
// This is globally unique because only one watcher
// can be evaluated at a time.
Dep.target = null;
var targetStack = [];
function pushTarget(target) {
    targetStack.push(target);
    Dep.target = target;
}
function popTarget() {
    targetStack.pop();
    Dep.target = targetStack[targetStack.length - 1];
}

/*
 * not type checking this file because flow doesn't play well with
 * dynamically accessing methods on Array prototype
 */
var arrayProto = Array.prototype;
var arrayMethods = Object.create(arrayProto);
var methodsToPatch = [
    'push',
    'pop',
    'shift',
    'unshift',
    'splice',
    'sort',
    'reverse'
];
/**
 * Intercept mutating methods and emit events
 */
methodsToPatch.forEach(function (method) {
    // cache original method
    var original = arrayProto[method];
    def(arrayMethods, method, function mutator() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var result = original.apply(this, args);
        var ob = this.__ob__;
        var inserted;
        switch (method) {
            case 'push':
            case 'unshift':
                inserted = args;
                break;
            case 'splice':
                inserted = args.slice(2);
                break;
        }
        if (inserted)
            ob.observeArray(inserted);
        // notify change
        if (false) {
            ob.dep.notify({
                type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,
                target: this,
                key: method
            });
        }
        else {
            ob.dep.notify();
        }
        return result;
    });
});

var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
var NO_INITIAL_VALUE = {};
/**
 * In some cases we may want to disable observation inside a component's
 * update computation.
 */
var shouldObserve = true;
function toggleObserving(value) {
    shouldObserve = value;
}
// ssr mock dep
var mockDep = {
    notify: noop,
    depend: noop,
    addSub: noop,
    removeSub: noop
};
/**
 * Observer class that is attached to each observed
 * object. Once attached, the observer converts the target
 * object's property keys into getter/setters that
 * collect dependencies and dispatch updates.
 */
var Observer = /** @class */ (function () {
    function Observer(value, shallow, mock) {
        if (shallow === void 0) { shallow = false; }
        if (mock === void 0) { mock = false; }
        this.value = value;
        this.shallow = shallow;
        this.mock = mock;
        // this.value = value
        this.dep = mock ? mockDep : new Dep();
        this.vmCount = 0;
        def(value, '__ob__', this);
        if (isArray(value)) {
            if (!mock) {
                if (hasProto) {
                    value.__proto__ = arrayMethods;
                    /* eslint-enable no-proto */
                }
                else {
                    for (var i = 0, l = arrayKeys.length; i < l; i++) {
                        var key = arrayKeys[i];
                        def(value, key, arrayMethods[key]);
                    }
                }
            }
            if (!shallow) {
                this.observeArray(value);
            }
        }
        else {
            /**
             * Walk through all properties and convert them into
             * getter/setters. This method should only be called when
             * value type is Object.
             */
            var keys = Object.keys(value);
            for (var i = 0; i < keys.length; i++) {
                var key = keys[i];
                defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock);
            }
        }
    }
    /**
     * Observe a list of Array items.
     */
    Observer.prototype.observeArray = function (value) {
        for (var i = 0, l = value.length; i < l; i++) {
            observe(value[i], false, this.mock);
        }
    };
    return Observer;
}());
// helpers
/**
 * Attempt to create an observer instance for a value,
 * returns the new observer if successfully observed,
 * or the existing observer if the value already has one.
 */
function observe(value, shallow, ssrMockReactivity) {
    if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
        return value.__ob__;
    }
    if (shouldObserve &&
        (ssrMockReactivity || !isServerRendering()) &&
        (isArray(value) || isPlainObject(value)) &&
        Object.isExtensible(value) &&
        !value.__v_skip /* ReactiveFlags.SKIP */ &&
        !isRef(value) &&
        !(value instanceof VNode)) {
        return new Observer(value, shallow, ssrMockReactivity);
    }
}
/**
 * Define a reactive property on an Object.
 */
function defineReactive(obj, key, val, customSetter, shallow, mock, observeEvenIfShallow) {
    if (observeEvenIfShallow === void 0) { observeEvenIfShallow = false; }
    var dep = new Dep();
    var property = Object.getOwnPropertyDescriptor(obj, key);
    if (property && property.configurable === false) {
        return;
    }
    // cater for pre-defined getter/setters
    var getter = property && property.get;
    var setter = property && property.set;
    if ((!getter || setter) &&
        (val === NO_INITIAL_VALUE || arguments.length === 2)) {
        val = obj[key];
    }
    var childOb = shallow ? val && val.__ob__ : observe(val, false, mock);
    Object.defineProperty(obj, key, {
        enumerable: true,
        configurable: true,
        get: function reactiveGetter() {
            var value = getter ? getter.call(obj) : val;
            if (Dep.target) {
                if (false) {
                    dep.depend({
                        target: obj,
                        type: "get" /* TrackOpTypes.GET */,
                        key: key
                    });
                }
                else {
                    dep.depend();
                }
                if (childOb) {
                    childOb.dep.depend();
                    if (isArray(value)) {
                        dependArray(value);
                    }
                }
            }
            return isRef(value) && !shallow ? value.value : value;
        },
        set: function reactiveSetter(newVal) {
            var value = getter ? getter.call(obj) : val;
            if (!hasChanged(value, newVal)) {
                return;
            }
            if (false) {
                customSetter();
            }
            if (setter) {
                setter.call(obj, newVal);
            }
            else if (getter) {
                // #7981: for accessor properties without setter
                return;
            }
            else if (!shallow && isRef(value) && !isRef(newVal)) {
                value.value = newVal;
                return;
            }
            else {
                val = newVal;
            }
            childOb = shallow ? newVal && newVal.__ob__ : observe(newVal, false, mock);
            if (false) {
                dep.notify({
                    type: "set" /* TriggerOpTypes.SET */,
                    target: obj,
                    key: key,
                    newValue: newVal,
                    oldValue: value
                });
            }
            else {
                dep.notify();
            }
        }
    });
    return dep;
}
function set(target, key, val) {
    if (false) {
        warn("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));
    }
    if (isReadonly(target)) {
        "production" !== 'production' && warn("Set operation on key \"".concat(key, "\" failed: target is readonly."));
        return;
    }
    var ob = target.__ob__;
    if (isArray(target) && isValidArrayIndex(key)) {
        target.length = Math.max(target.length, key);
        target.splice(key, 1, val);
        // when mocking for SSR, array methods are not hijacked
        if (ob && !ob.shallow && ob.mock) {
            observe(val, false, true);
        }
        return val;
    }
    if (key in target && !(key in Object.prototype)) {
        target[key] = val;
        return val;
    }
    if (target._isVue || (ob && ob.vmCount)) {
        "production" !== 'production' &&
            warn('Avoid adding reactive properties to a Vue instance or its root $data ' +
                'at runtime - declare it upfront in the data option.');
        return val;
    }
    if (!ob) {
        target[key] = val;
        return val;
    }
    defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);
    if (false) {
        ob.dep.notify({
            type: "add" /* TriggerOpTypes.ADD */,
            target: target,
            key: key,
            newValue: val,
            oldValue: undefined
        });
    }
    else {
        ob.dep.notify();
    }
    return val;
}
function del(target, key) {
    if (false) {
        warn("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target));
    }
    if (isArray(target) && isValidArrayIndex(key)) {
        target.splice(key, 1);
        return;
    }
    var ob = target.__ob__;
    if (target._isVue || (ob && ob.vmCount)) {
        "production" !== 'production' &&
            warn('Avoid deleting properties on a Vue instance or its root $data ' +
                '- just set it to null.');
        return;
    }
    if (isReadonly(target)) {
        "production" !== 'production' &&
            warn("Delete operation on key \"".concat(key, "\" failed: target is readonly."));
        return;
    }
    if (!hasOwn(target, key)) {
        return;
    }
    delete target[key];
    if (!ob) {
        return;
    }
    if (false) {
        ob.dep.notify({
            type: "delete" /* TriggerOpTypes.DELETE */,
            target: target,
            key: key
        });
    }
    else {
        ob.dep.notify();
    }
}
/**
 * Collect dependencies on array elements when the array is touched, since
 * we cannot intercept array element access like property getters.
 */
function dependArray(value) {
    for (var e = void 0, i = 0, l = value.length; i < l; i++) {
        e = value[i];
        if (e && e.__ob__) {
            e.__ob__.dep.depend();
        }
        if (isArray(e)) {
            dependArray(e);
        }
    }
}

function reactive(target) {
    makeReactive(target, false);
    return target;
}
/**
 * Return a shallowly-reactive copy of the original object, where only the root
 * level properties are reactive. It also does not auto-unwrap refs (even at the
 * root level).
 */
function shallowReactive(target) {
    makeReactive(target, true);
    def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
    return target;
}
function makeReactive(target, shallow) {
    // if trying to observe a readonly proxy, return the readonly version.
    if (!isReadonly(target)) {
        if (false) {
            if (isArray(target)) {
                warn("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));
            }
            var existingOb = target && target.__ob__;
            if (existingOb && existingOb.shallow !== shallow) {
                warn("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));
            }
        }
        var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
        if (false) {
            if (target == null || isPrimitive(target)) {
                warn("value cannot be made reactive: ".concat(String(target)));
            }
            if (isCollectionType(target)) {
                warn("Vue 2 does not support reactive collection types such as Map or Set.");
            }
        }
    }
}
function isReactive(value) {
    if (isReadonly(value)) {
        return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
    }
    return !!(value && value.__ob__);
}
function isShallow(value) {
    return !!(value && value.__v_isShallow);
}
function isReadonly(value) {
    return !!(value && value.__v_isReadonly);
}
function isProxy(value) {
    return isReactive(value) || isReadonly(value);
}
function toRaw(observed) {
    var raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
    return raw ? toRaw(raw) : observed;
}
function markRaw(value) {
    // non-extensible objects won't be observed anyway
    if (Object.isExtensible(value)) {
        def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
    }
    return value;
}
/**
 * @internal
 */
function isCollectionType(value) {
    var type = toRawType(value);
    return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
}

/**
 * @internal
 */
var RefFlag = "__v_isRef";
function isRef(r) {
    return !!(r && r.__v_isRef === true);
}
function ref$1(value) {
    return createRef(value, false);
}
function shallowRef(value) {
    return createRef(value, true);
}
function createRef(rawValue, shallow) {
    if (isRef(rawValue)) {
        return rawValue;
    }
    var ref = {};
    def(ref, RefFlag, true);
    def(ref, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, shallow);
    def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));
    return ref;
}
function triggerRef(ref) {
    if (false) {
        warn("received object is not a triggerable ref.");
    }
    if (false) {
        ref.dep &&
            ref.dep.notify({
                type: "set" /* TriggerOpTypes.SET */,
                target: ref,
                key: 'value'
            });
    }
    else {
        ref.dep && ref.dep.notify();
    }
}
function unref(ref) {
    return isRef(ref) ? ref.value : ref;
}
function proxyRefs(objectWithRefs) {
    if (isReactive(objectWithRefs)) {
        return objectWithRefs;
    }
    var proxy = {};
    var keys = Object.keys(objectWithRefs);
    for (var i = 0; i < keys.length; i++) {
        proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);
    }
    return proxy;
}
function proxyWithRefUnwrap(target, source, key) {
    Object.defineProperty(target, key, {
        enumerable: true,
        configurable: true,
        get: function () {
            var val = source[key];
            if (isRef(val)) {
                return val.value;
            }
            else {
                var ob = val && val.__ob__;
                if (ob)
                    ob.dep.depend();
                return val;
            }
        },
        set: function (value) {
            var oldValue = source[key];
            if (isRef(oldValue) && !isRef(value)) {
                oldValue.value = value;
            }
            else {
                source[key] = value;
            }
        }
    });
}
function customRef(factory) {
    var dep = new Dep();
    var _a = factory(function () {
        if (false) {
            dep.depend({
                target: ref,
                type: "get" /* TrackOpTypes.GET */,
                key: 'value'
            });
        }
        else {
            dep.depend();
        }
    }, function () {
        if (false) {
            dep.notify({
                target: ref,
                type: "set" /* TriggerOpTypes.SET */,
                key: 'value'
            });
        }
        else {
            dep.notify();
        }
    }), get = _a.get, set = _a.set;
    var ref = {
        get value() {
            return get();
        },
        set value(newVal) {
            set(newVal);
        }
    };
    def(ref, RefFlag, true);
    return ref;
}
function toRefs(object) {
    if (false) {
        warn("toRefs() expects a reactive object but received a plain one.");
    }
    var ret = isArray(object) ? new Array(object.length) : {};
    for (var key in object) {
        ret[key] = toRef(object, key);
    }
    return ret;
}
function toRef(object, key, defaultValue) {
    var val = object[key];
    if (isRef(val)) {
        return val;
    }
    var ref = {
        get value() {
            var val = object[key];
            return val === undefined ? defaultValue : val;
        },
        set value(newVal) {
            object[key] = newVal;
        }
    };
    def(ref, RefFlag, true);
    return ref;
}

var rawToReadonlyFlag = "__v_rawToReadonly";
var rawToShallowReadonlyFlag = "__v_rawToShallowReadonly";
function readonly(target) {
    return createReadonly(target, false);
}
function createReadonly(target, shallow) {
    if (!isPlainObject(target)) {
        if (false) {
            if (isArray(target)) {
                warn("Vue 2 does not support readonly arrays.");
            }
            else if (isCollectionType(target)) {
                warn("Vue 2 does not support readonly collection types such as Map or Set.");
            }
            else {
                warn("value cannot be made readonly: ".concat(typeof target));
            }
        }
        return target;
    }
    if (false) {
        warn("Vue 2 does not support creating readonly proxy for non-extensible object.");
    }
    // already a readonly object
    if (isReadonly(target)) {
        return target;
    }
    // already has a readonly proxy
    var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
    var existingProxy = target[existingFlag];
    if (existingProxy) {
        return existingProxy;
    }
    var proxy = Object.create(Object.getPrototypeOf(target));
    def(target, existingFlag, proxy);
    def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
    def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
    if (isRef(target)) {
        def(proxy, RefFlag, true);
    }
    if (shallow || isShallow(target)) {
        def(proxy, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
    }
    var keys = Object.keys(target);
    for (var i = 0; i < keys.length; i++) {
        defineReadonlyProperty(proxy, target, keys[i], shallow);
    }
    return proxy;
}
function defineReadonlyProperty(proxy, target, key, shallow) {
    Object.defineProperty(proxy, key, {
        enumerable: true,
        configurable: true,
        get: function () {
            var val = target[key];
            return shallow || !isPlainObject(val) ? val : readonly(val);
        },
        set: function () {
            "production" !== 'production' &&
                warn("Set operation on key \"".concat(key, "\" failed: target is readonly."));
        }
    });
}
/**
 * Returns a reactive-copy of the original object, where only the root level
 * properties are readonly, and does NOT unwrap refs nor recursively convert
 * returned properties.
 * This is used for creating the props proxy object for stateful components.
 */
function shallowReadonly(target) {
    return createReadonly(target, true);
}

function computed(getterOrOptions, debugOptions) {
    var getter;
    var setter;
    var onlyGetter = isFunction(getterOrOptions);
    if (onlyGetter) {
        getter = getterOrOptions;
        setter =  false
            ? function () {
                warn('Write operation failed: computed value is readonly');
            }
            : noop;
    }
    else {
        getter = getterOrOptions.get;
        setter = getterOrOptions.set;
    }
    var watcher = isServerRendering()
        ? null
        : new Watcher(currentInstance, getter, noop, { lazy: true });
    if (false) {
        watcher.onTrack = debugOptions.onTrack;
        watcher.onTrigger = debugOptions.onTrigger;
    }
    var ref = {
        // some libs rely on the presence effect for checking computed refs
        // from normal refs, but the implementation doesn't matter
        effect: watcher,
        get value() {
            if (watcher) {
                if (watcher.dirty) {
                    watcher.evaluate();
                }
                if (Dep.target) {
                    if (false) {
                        Dep.target.onTrack({
                            effect: Dep.target,
                            target: ref,
                            type: "get" /* TrackOpTypes.GET */,
                            key: 'value'
                        });
                    }
                    watcher.depend();
                }
                return watcher.value;
            }
            else {
                return getter();
            }
        },
        set value(newVal) {
            setter(newVal);
        }
    };
    def(ref, RefFlag, true);
    def(ref, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, onlyGetter);
    return ref;
}

var WATCHER = "watcher";
var WATCHER_CB = "".concat(WATCHER, " callback");
var WATCHER_GETTER = "".concat(WATCHER, " getter");
var WATCHER_CLEANUP = "".concat(WATCHER, " cleanup");
// Simple effect.
function watchEffect(effect, options) {
    return doWatch(effect, null, options);
}
function watchPostEffect(effect, options) {
    return doWatch(effect, null, ( false
        ? __assign(__assign({}, options), { flush: 'post' }) : { flush: 'post' }));
}
function watchSyncEffect(effect, options) {
    return doWatch(effect, null, ( false
        ? __assign(__assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));
}
// initial value for watchers to trigger on undefined initial values
var INITIAL_WATCHER_VALUE = {};
// implementation
function watch(source, cb, options) {
    if (false) {
        warn("`watch(fn, options?)` signature has been moved to a separate API. " +
            "Use `watchEffect(fn, options?)` instead. `watch` now only " +
            "supports `watch(source, cb, options?) signature.");
    }
    return doWatch(source, cb, options);
}
function doWatch(source, cb, _a) {
    var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;
    if (false) {
        if (immediate !== undefined) {
            warn("watch() \"immediate\" option is only respected when using the " +
                "watch(source, callback, options?) signature.");
        }
        if (deep !== undefined) {
            warn("watch() \"deep\" option is only respected when using the " +
                "watch(source, callback, options?) signature.");
        }
    }
    var warnInvalidSource = function (s) {
        warn("Invalid watch source: ".concat(s, ". A watch source can only be a getter/effect ") +
            "function, a ref, a reactive object, or an array of these types.");
    };
    var instance = currentInstance;
    var call = function (fn, type, args) {
        if (args === void 0) { args = null; }
        var res = invokeWithErrorHandling(fn, null, args, instance, type);
        if (deep && res && res.__ob__)
            res.__ob__.dep.depend();
        return res;
    };
    var getter;
    var forceTrigger = false;
    var isMultiSource = false;
    if (isRef(source)) {
        getter = function () { return source.value; };
        forceTrigger = isShallow(source);
    }
    else if (isReactive(source)) {
        getter = function () {
            source.__ob__.dep.depend();
            return source;
        };
        deep = true;
    }
    else if (isArray(source)) {
        isMultiSource = true;
        forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });
        getter = function () {
            return source.map(function (s) {
                if (isRef(s)) {
                    return s.value;
                }
                else if (isReactive(s)) {
                    s.__ob__.dep.depend();
                    return traverse(s);
                }
                else if (isFunction(s)) {
                    return call(s, WATCHER_GETTER);
                }
                else {
                    "production" !== 'production' && warnInvalidSource(s);
                }
            });
        };
    }
    else if (isFunction(source)) {
        if (cb) {
            // getter with cb
            getter = function () { return call(source, WATCHER_GETTER); };
        }
        else {
            // no cb -> simple effect
            getter = function () {
                if (instance && instance._isDestroyed) {
                    return;
                }
                if (cleanup) {
                    cleanup();
                }
                return call(source, WATCHER, [onCleanup]);
            };
        }
    }
    else {
        getter = noop;
        "production" !== 'production' && warnInvalidSource(source);
    }
    if (cb && deep) {
        var baseGetter_1 = getter;
        getter = function () { return traverse(baseGetter_1()); };
    }
    var cleanup;
    var onCleanup = function (fn) {
        cleanup = watcher.onStop = function () {
            call(fn, WATCHER_CLEANUP);
        };
    };
    // in SSR there is no need to setup an actual effect, and it should be noop
    // unless it's eager
    if (isServerRendering()) {
        // we will also not call the invalidate callback (+ runner is not set up)
        onCleanup = noop;
        if (!cb) {
            getter();
        }
        else if (immediate) {
            call(cb, WATCHER_CB, [
                getter(),
                isMultiSource ? [] : undefined,
                onCleanup
            ]);
        }
        return noop;
    }
    var watcher = new Watcher(currentInstance, getter, noop, {
        lazy: true
    });
    watcher.noRecurse = !cb;
    var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
    // overwrite default run
    watcher.run = function () {
        if (!watcher.active) {
            return;
        }
        if (cb) {
            // watch(source, cb)
            var newValue = watcher.get();
            if (deep ||
                forceTrigger ||
                (isMultiSource
                    ? newValue.some(function (v, i) {
                        return hasChanged(v, oldValue[i]);
                    })
                    : hasChanged(newValue, oldValue))) {
                // cleanup before running cb again
                if (cleanup) {
                    cleanup();
                }
                call(cb, WATCHER_CB, [
                    newValue,
                    // pass undefined as the old value when it's changed for the first time
                    oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
                    onCleanup
                ]);
                oldValue = newValue;
            }
        }
        else {
            // watchEffect
            watcher.get();
        }
    };
    if (flush === 'sync') {
        watcher.update = watcher.run;
    }
    else if (flush === 'post') {
        watcher.post = true;
        watcher.update = function () { return queueWatcher(watcher); };
    }
    else {
        // pre
        watcher.update = function () {
            if (instance && instance === currentInstance && !instance._isMounted) {
                // pre-watcher triggered before
                var buffer = instance._preWatchers || (instance._preWatchers = []);
                if (buffer.indexOf(watcher) < 0)
                    buffer.push(watcher);
            }
            else {
                queueWatcher(watcher);
            }
        };
    }
    if (false) {
        watcher.onTrack = onTrack;
        watcher.onTrigger = onTrigger;
    }
    // initial run
    if (cb) {
        if (immediate) {
            watcher.run();
        }
        else {
            oldValue = watcher.get();
        }
    }
    else if (flush === 'post' && instance) {
        instance.$once('hook:mounted', function () { return watcher.get(); });
    }
    else {
        watcher.get();
    }
    return function () {
        watcher.teardown();
    };
}

var activeEffectScope;
var EffectScope = /** @class */ (function () {
    function EffectScope(detached) {
        if (detached === void 0) { detached = false; }
        this.detached = detached;
        /**
         * @internal
         */
        this.active = true;
        /**
         * @internal
         */
        this.effects = [];
        /**
         * @internal
         */
        this.cleanups = [];
        this.parent = activeEffectScope;
        if (!detached && activeEffectScope) {
            this.index =
                (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
        }
    }
    EffectScope.prototype.run = function (fn) {
        if (this.active) {
            var currentEffectScope = activeEffectScope;
            try {
                activeEffectScope = this;
                return fn();
            }
            finally {
                activeEffectScope = currentEffectScope;
            }
        }
        else if (false) {
            warn("cannot run an inactive effect scope.");
        }
    };
    /**
     * This should only be called on non-detached scopes
     * @internal
     */
    EffectScope.prototype.on = function () {
        activeEffectScope = this;
    };
    /**
     * This should only be called on non-detached scopes
     * @internal
     */
    EffectScope.prototype.off = function () {
        activeEffectScope = this.parent;
    };
    EffectScope.prototype.stop = function (fromParent) {
        if (this.active) {
            var i = void 0, l = void 0;
            for (i = 0, l = this.effects.length; i < l; i++) {
                this.effects[i].teardown();
            }
            for (i = 0, l = this.cleanups.length; i < l; i++) {
                this.cleanups[i]();
            }
            if (this.scopes) {
                for (i = 0, l = this.scopes.length; i < l; i++) {
                    this.scopes[i].stop(true);
                }
            }
            // nested scope, dereference from parent to avoid memory leaks
            if (!this.detached && this.parent && !fromParent) {
                // optimized O(1) removal
                var last = this.parent.scopes.pop();
                if (last && last !== this) {
                    this.parent.scopes[this.index] = last;
                    last.index = this.index;
                }
            }
            this.parent = undefined;
            this.active = false;
        }
    };
    return EffectScope;
}());
function effectScope(detached) {
    return new EffectScope(detached);
}
/**
 * @internal
 */
function recordEffectScope(effect, scope) {
    if (scope === void 0) { scope = activeEffectScope; }
    if (scope && scope.active) {
        scope.effects.push(effect);
    }
}
function getCurrentScope() {
    return activeEffectScope;
}
function onScopeDispose(fn) {
    if (activeEffectScope) {
        activeEffectScope.cleanups.push(fn);
    }
    else if (false) {
        warn("onScopeDispose() is called when there is no active effect scope" +
            " to be associated with.");
    }
}

function provide(key, value) {
    if (!currentInstance) {
        if (false) {
            warn("provide() can only be used inside setup().");
        }
    }
    else {
        // TS doesn't allow symbol as index type
        resolveProvided(currentInstance)[key] = value;
    }
}
function resolveProvided(vm) {
    // by default an instance inherits its parent's provides object
    // but when it needs to provide values of its own, it creates its
    // own provides object using parent provides object as prototype.
    // this way in `inject` we can simply look up injections from direct
    // parent and let the prototype chain do the work.
    var existing = vm._provided;
    var parentProvides = vm.$parent && vm.$parent._provided;
    if (parentProvides === existing) {
        return (vm._provided = Object.create(parentProvides));
    }
    else {
        return existing;
    }
}
function inject(key, defaultValue, treatDefaultAsFactory) {
    if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }
    // fallback to `currentRenderingInstance` so that this can be called in
    // a functional component
    var instance = currentInstance;
    if (instance) {
        // #2400
        // to support `app.use` plugins,
        // fallback to appContext's `provides` if the instance is at root
        var provides = instance.$parent && instance.$parent._provided;
        if (provides && key in provides) {
            // TS doesn't allow symbol as index type
            return provides[key];
        }
        else if (arguments.length > 1) {
            return treatDefaultAsFactory && isFunction(defaultValue)
                ? defaultValue.call(instance)
                : defaultValue;
        }
        else if (false) {
            warn("injection \"".concat(String(key), "\" not found."));
        }
    }
    else if (false) {
        warn("inject() can only be used inside setup() or functional components.");
    }
}

var normalizeEvent = cached(function (name) {
    var passive = name.charAt(0) === '&';
    name = passive ? name.slice(1) : name;
    var once = name.charAt(0) === '~'; // Prefixed last, checked first
    name = once ? name.slice(1) : name;
    var capture = name.charAt(0) === '!';
    name = capture ? name.slice(1) : name;
    return {
        name: name,
        once: once,
        capture: capture,
        passive: passive
    };
});
function createFnInvoker(fns, vm) {
    function invoker() {
        var fns = invoker.fns;
        if (isArray(fns)) {
            var cloned = fns.slice();
            for (var i = 0; i < cloned.length; i++) {
                invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
            }
        }
        else {
            // return handler return value for single handlers
            return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
        }
    }
    invoker.fns = fns;
    return invoker;
}
function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {
    var name, cur, old, event;
    for (name in on) {
        cur = on[name];
        old = oldOn[name];
        event = normalizeEvent(name);
        if (isUndef(cur)) {
            "production" !== 'production' &&
                warn("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);
        }
        else if (isUndef(old)) {
            if (isUndef(cur.fns)) {
                cur = on[name] = createFnInvoker(cur, vm);
            }
            if (isTrue(event.once)) {
                cur = on[name] = createOnceHandler(event.name, cur, event.capture);
            }
            add(event.name, cur, event.capture, event.passive, event.params);
        }
        else if (cur !== old) {
            old.fns = cur;
            on[name] = old;
        }
    }
    for (name in oldOn) {
        if (isUndef(on[name])) {
            event = normalizeEvent(name);
            remove(event.name, oldOn[name], event.capture);
        }
    }
}

function mergeVNodeHook(def, hookKey, hook) {
    if (def instanceof VNode) {
        def = def.data.hook || (def.data.hook = {});
    }
    var invoker;
    var oldHook = def[hookKey];
    function wrappedHook() {
        hook.apply(this, arguments);
        // important: remove merged hook to ensure it's called only once
        // and prevent memory leak
        remove$2(invoker.fns, wrappedHook);
    }
    if (isUndef(oldHook)) {
        // no existing hook
        invoker = createFnInvoker([wrappedHook]);
    }
    else {
        /* istanbul ignore if */
        if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
            // already a merged invoker
            invoker = oldHook;
            invoker.fns.push(wrappedHook);
        }
        else {
            // existing plain hook
            invoker = createFnInvoker([oldHook, wrappedHook]);
        }
    }
    invoker.merged = true;
    def[hookKey] = invoker;
}

function extractPropsFromVNodeData(data, Ctor, tag) {
    // we are only extracting raw values here.
    // validation and default values are handled in the child
    // component itself.
    var propOptions = Ctor.options.props;
    if (isUndef(propOptions)) {
        return;
    }
    var res = {};
    var attrs = data.attrs, props = data.props;
    if (isDef(attrs) || isDef(props)) {
        for (var key in propOptions) {
            var altKey = hyphenate(key);
            if (false) {
                var keyInLowerCase = key.toLowerCase();
                if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
                    tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +
                        "".concat(formatComponentName(
                        // @ts-expect-error tag is string
                        tag || Ctor), ", but the declared prop name is") +
                        " \"".concat(key, "\". ") +
                        "Note that HTML attributes are case-insensitive and camelCased " +
                        "props need to use their kebab-case equivalents when using in-DOM " +
                        "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));
                }
            }
            checkProp(res, props, key, altKey, true) ||
                checkProp(res, attrs, key, altKey, false);
        }
    }
    return res;
}
function checkProp(res, hash, key, altKey, preserve) {
    if (isDef(hash)) {
        if (hasOwn(hash, key)) {
            res[key] = hash[key];
            if (!preserve) {
                delete hash[key];
            }
            return true;
        }
        else if (hasOwn(hash, altKey)) {
            res[key] = hash[altKey];
            if (!preserve) {
                delete hash[altKey];
            }
            return true;
        }
    }
    return false;
}

// The template compiler attempts to minimize the need for normalization by
// statically analyzing the template at compile time.
//
// For plain HTML markup, normalization can be completely skipped because the
// generated render function is guaranteed to return Array<VNode>. There are
// two cases where extra normalization is needed:
// 1. When the children contains components - because a functional component
// may return an Array instead of a single root. In this case, just a simple
// normalization is needed - if any child is an Array, we flatten the whole
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
// because functional components already normalize their own children.
function simpleNormalizeChildren(children) {
    for (var i = 0; i < children.length; i++) {
        if (isArray(children[i])) {
            return Array.prototype.concat.apply([], children);
        }
    }
    return children;
}
// 2. When the children contains constructs that always generated nested Arrays,
// e.g. <template>, <slot>, v-for, or when the children is provided by user
// with hand-written render functions / JSX. In such cases a full normalization
// is needed to cater to all possible types of children values.
function normalizeChildren(children) {
    return isPrimitive(children)
        ? [createTextVNode(children)]
        : isArray(children)
            ? normalizeArrayChildren(children)
            : undefined;
}
function isTextNode(node) {
    return isDef(node) && isDef(node.text) && isFalse(node.isComment);
}
function normalizeArrayChildren(children, nestedIndex) {
    var res = [];
    var i, c, lastIndex, last;
    for (i = 0; i < children.length; i++) {
        c = children[i];
        if (isUndef(c) || typeof c === 'boolean')
            continue;
        lastIndex = res.length - 1;
        last = res[lastIndex];
        //  nested
        if (isArray(c)) {
            if (c.length > 0) {
                c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));
                // merge adjacent text nodes
                if (isTextNode(c[0]) && isTextNode(last)) {
                    res[lastIndex] = createTextVNode(last.text + c[0].text);
                    c.shift();
                }
                res.push.apply(res, c);
            }
        }
        else if (isPrimitive(c)) {
            if (isTextNode(last)) {
                // merge adjacent text nodes
                // this is necessary for SSR hydration because text nodes are
                // essentially merged when rendered to HTML strings
                res[lastIndex] = createTextVNode(last.text + c);
            }
            else if (c !== '') {
                // convert primitive to vnode
                res.push(createTextVNode(c));
            }
        }
        else {
            if (isTextNode(c) && isTextNode(last)) {
                // merge adjacent text nodes
                res[lastIndex] = createTextVNode(last.text + c.text);
            }
            else {
                // default key for nested array children (likely generated by v-for)
                if (isTrue(children._isVList) &&
                    isDef(c.tag) &&
                    isUndef(c.key) &&
                    isDef(nestedIndex)) {
                    c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
                }
                res.push(c);
            }
        }
    }
    return res;
}

/**
 * Runtime helper for rendering v-for lists.
 */
function renderList(val, render) {
    var ret = null, i, l, keys, key;
    if (isArray(val) || typeof val === 'string') {
        ret = new Array(val.length);
        for (i = 0, l = val.length; i < l; i++) {
            ret[i] = render(val[i], i);
        }
    }
    else if (typeof val === 'number') {
        ret = new Array(val);
        for (i = 0; i < val; i++) {
            ret[i] = render(i + 1, i);
        }
    }
    else if (isObject(val)) {
        if (hasSymbol && val[Symbol.iterator]) {
            ret = [];
            var iterator = val[Symbol.iterator]();
            var result = iterator.next();
            while (!result.done) {
                ret.push(render(result.value, ret.length));
                result = iterator.next();
            }
        }
        else {
            keys = Object.keys(val);
            ret = new Array(keys.length);
            for (i = 0, l = keys.length; i < l; i++) {
                key = keys[i];
                ret[i] = render(val[key], key, i);
            }
        }
    }
    if (!isDef(ret)) {
        ret = [];
    }
    ret._isVList = true;
    return ret;
}

/**
 * Runtime helper for rendering <slot>
 */
function renderSlot(name, fallbackRender, props, bindObject) {
    var scopedSlotFn = this.$scopedSlots[name];
    var nodes;
    if (scopedSlotFn) {
        // scoped slot
        props = props || {};
        if (bindObject) {
            if (false) {
                warn('slot v-bind without argument expects an Object', this);
            }
            props = extend(extend({}, bindObject), props);
        }
        nodes =
            scopedSlotFn(props) ||
                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
    }
    else {
        nodes =
            this.$slots[name] ||
                (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
    }
    var target = props && props.slot;
    if (target) {
        return this.$createElement('template', { slot: target }, nodes);
    }
    else {
        return nodes;
    }
}

/**
 * Runtime helper for resolving filters
 */
function resolveFilter(id) {
    return resolveAsset(this.$options, 'filters', id, true) || identity;
}

function isKeyNotMatch(expect, actual) {
    if (isArray(expect)) {
        return expect.indexOf(actual) === -1;
    }
    else {
        return expect !== actual;
    }
}
/**
 * Runtime helper for checking keyCodes from config.
 * exposed as Vue.prototype._k
 * passing in eventKeyName as last argument separately for backwards compat
 */
function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
    var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
    if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
        return isKeyNotMatch(builtInKeyName, eventKeyName);
    }
    else if (mappedKeyCode) {
        return isKeyNotMatch(mappedKeyCode, eventKeyCode);
    }
    else if (eventKeyName) {
        return hyphenate(eventKeyName) !== key;
    }
    return eventKeyCode === undefined;
}

/**
 * Runtime helper for merging v-bind="object" into a VNode's data.
 */
function bindObjectProps(data, tag, value, asProp, isSync) {
    if (value) {
        if (!isObject(value)) {
            "production" !== 'production' &&
                warn('v-bind without argument expects an Object or Array value', this);
        }
        else {
            if (isArray(value)) {
                value = toObject(value);
            }
            var hash = void 0;
            var _loop_1 = function (key) {
                if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
                    hash = data;
                }
                else {
                    var type = data.attrs && data.attrs.type;
                    hash =
                        asProp || config.mustUseProp(tag, type, key)
                            ? data.domProps || (data.domProps = {})
                            : data.attrs || (data.attrs = {});
                }
                var camelizedKey = camelize(key);
                var hyphenatedKey = hyphenate(key);
                if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
                    hash[key] = value[key];
                    if (isSync) {
                        var on = data.on || (data.on = {});
                        on["update:".concat(key)] = function ($event) {
                            value[key] = $event;
                        };
                    }
                }
            };
            for (var key in value) {
                _loop_1(key);
            }
        }
    }
    return data;
}

/**
 * Runtime helper for rendering static trees.
 */
function renderStatic(index, isInFor) {
    var cached = this._staticTrees || (this._staticTrees = []);
    var tree = cached[index];
    // if has already-rendered static tree and not inside v-for,
    // we can reuse the same tree.
    if (tree && !isInFor) {
        return tree;
    }
    // otherwise, render a fresh tree.
    tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates
    );
    markStatic(tree, "__static__".concat(index), false);
    return tree;
}
/**
 * Runtime helper for v-once.
 * Effectively it means marking the node as static with a unique key.
 */
function markOnce(tree, index, key) {
    markStatic(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);
    return tree;
}
function markStatic(tree, key, isOnce) {
    if (isArray(tree)) {
        for (var i = 0; i < tree.length; i++) {
            if (tree[i] && typeof tree[i] !== 'string') {
                markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
            }
        }
    }
    else {
        markStaticNode(tree, key, isOnce);
    }
}
function markStaticNode(node, key, isOnce) {
    node.isStatic = true;
    node.key = key;
    node.isOnce = isOnce;
}

function bindObjectListeners(data, value) {
    if (value) {
        if (!isPlainObject(value)) {
            "production" !== 'production' && warn('v-on without argument expects an Object value', this);
        }
        else {
            var on = (data.on = data.on ? extend({}, data.on) : {});
            for (var key in value) {
                var existing = on[key];
                var ours = value[key];
                on[key] = existing ? [].concat(existing, ours) : ours;
            }
        }
    }
    return data;
}

function resolveScopedSlots(fns, res, 
// the following are added in 2.6
hasDynamicKeys, contentHashKey) {
    res = res || { $stable: !hasDynamicKeys };
    for (var i = 0; i < fns.length; i++) {
        var slot = fns[i];
        if (isArray(slot)) {
            resolveScopedSlots(slot, res, hasDynamicKeys);
        }
        else if (slot) {
            // marker for reverse proxying v-slot without scope on this.$slots
            // @ts-expect-error
            if (slot.proxy) {
                // @ts-expect-error
                slot.fn.proxy = true;
            }
            res[slot.key] = slot.fn;
        }
    }
    if (contentHashKey) {
        res.$key = contentHashKey;
    }
    return res;
}

// helper to process dynamic keys for dynamic arguments in v-bind and v-on.
function bindDynamicKeys(baseObj, values) {
    for (var i = 0; i < values.length; i += 2) {
        var key = values[i];
        if (typeof key === 'string' && key) {
            baseObj[values[i]] = values[i + 1];
        }
        else if (false) {
            // null is a special value for explicitly removing a binding
            warn("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
        }
    }
    return baseObj;
}
// helper to dynamically append modifier runtime markers to event names.
// ensure only append when value is already string, otherwise it will be cast
// to string and cause the type check to miss.
function prependModifier(value, symbol) {
    return typeof value === 'string' ? symbol + value : value;
}

function installRenderHelpers(target) {
    target._o = markOnce;
    target._n = toNumber;
    target._s = toString;
    target._l = renderList;
    target._t = renderSlot;
    target._q = looseEqual;
    target._i = looseIndexOf;
    target._m = renderStatic;
    target._f = resolveFilter;
    target._k = checkKeyCodes;
    target._b = bindObjectProps;
    target._v = createTextVNode;
    target._e = createEmptyVNode;
    target._u = resolveScopedSlots;
    target._g = bindObjectListeners;
    target._d = bindDynamicKeys;
    target._p = prependModifier;
}

/**
 * Runtime helper for resolving raw children VNodes into a slot object.
 */
function resolveSlots(children, context) {
    if (!children || !children.length) {
        return {};
    }
    var slots = {};
    for (var i = 0, l = children.length; i < l; i++) {
        var child = children[i];
        var data = child.data;
        // remove slot attribute if the node is resolved as a Vue slot node
        if (data && data.attrs && data.attrs.slot) {
            delete data.attrs.slot;
        }
        // named slots should only be respected if the vnode was rendered in the
        // same context.
        if ((child.context === context || child.fnContext === context) &&
            data &&
            data.slot != null) {
            var name_1 = data.slot;
            var slot = slots[name_1] || (slots[name_1] = []);
            if (child.tag === 'template') {
                slot.push.apply(slot, child.children || []);
            }
            else {
                slot.push(child);
            }
        }
        else {
            (slots.default || (slots.default = [])).push(child);
        }
    }
    // ignore slots that contains only whitespace
    for (var name_2 in slots) {
        if (slots[name_2].every(isWhitespace)) {
            delete slots[name_2];
        }
    }
    return slots;
}
function isWhitespace(node) {
    return (node.isComment && !node.asyncFactory) || node.text === ' ';
}

function isAsyncPlaceholder(node) {
    // @ts-expect-error not really boolean type
    return node.isComment && node.asyncFactory;
}

function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
    var res;
    var hasNormalSlots = Object.keys(normalSlots).length > 0;
    var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
    var key = scopedSlots && scopedSlots.$key;
    if (!scopedSlots) {
        res = {};
    }
    else if (scopedSlots._normalized) {
        // fast path 1: child component re-render only, parent did not change
        return scopedSlots._normalized;
    }
    else if (isStable &&
        prevScopedSlots &&
        prevScopedSlots !== emptyObject &&
        key === prevScopedSlots.$key &&
        !hasNormalSlots &&
        !prevScopedSlots.$hasNormal) {
        // fast path 2: stable scoped slots w/ no normal slots to proxy,
        // only need to normalize once
        return prevScopedSlots;
    }
    else {
        res = {};
        for (var key_1 in scopedSlots) {
            if (scopedSlots[key_1] && key_1[0] !== '$') {
                res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
            }
        }
    }
    // expose normal slots on scopedSlots
    for (var key_2 in normalSlots) {
        if (!(key_2 in res)) {
            res[key_2] = proxyNormalSlot(normalSlots, key_2);
        }
    }
    // avoriaz seems to mock a non-extensible $scopedSlots object
    // and when that is passed down this would cause an error
    if (scopedSlots && Object.isExtensible(scopedSlots)) {
        scopedSlots._normalized = res;
    }
    def(res, '$stable', isStable);
    def(res, '$key', key);
    def(res, '$hasNormal', hasNormalSlots);
    return res;
}
function normalizeScopedSlot(vm, normalSlots, key, fn) {
    var normalized = function () {
        var cur = currentInstance;
        setCurrentInstance(vm);
        var res = arguments.length ? fn.apply(null, arguments) : fn({});
        res =
            res && typeof res === 'object' && !isArray(res)
                ? [res] // single vnode
                : normalizeChildren(res);
        var vnode = res && res[0];
        setCurrentInstance(cur);
        return res &&
            (!vnode ||
                (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
            ? undefined
            : res;
    };
    // this is a slot using the new v-slot syntax without scope. although it is
    // compiled as a scoped slot, render fn users would expect it to be present
    // on this.$slots because the usage is semantically a normal slot.
    if (fn.proxy) {
        Object.defineProperty(normalSlots, key, {
            get: normalized,
            enumerable: true,
            configurable: true
        });
    }
    return normalized;
}
function proxyNormalSlot(slots, key) {
    return function () { return slots[key]; };
}

function initSetup(vm) {
    var options = vm.$options;
    var setup = options.setup;
    if (setup) {
        var ctx = (vm._setupContext = createSetupContext(vm));
        setCurrentInstance(vm);
        pushTarget();
        var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, "setup");
        popTarget();
        setCurrentInstance();
        if (isFunction(setupResult)) {
            // render function
            // @ts-ignore
            options.render = setupResult;
        }
        else if (isObject(setupResult)) {
            // bindings
            if (false) {
                warn("setup() should not return VNodes directly - " +
                    "return a render function instead.");
            }
            vm._setupState = setupResult;
            // __sfc indicates compiled bindings from <script setup>
            if (!setupResult.__sfc) {
                for (var key in setupResult) {
                    if (!isReserved(key)) {
                        proxyWithRefUnwrap(vm, setupResult, key);
                    }
                    else if (false) {
                        warn("Avoid using variables that start with _ or $ in setup().");
                    }
                }
            }
            else {
                // exposed for compiled render fn
                var proxy = (vm._setupProxy = {});
                for (var key in setupResult) {
                    if (key !== '__sfc') {
                        proxyWithRefUnwrap(proxy, setupResult, key);
                    }
                }
            }
        }
        else if (false) {
            warn("setup() should return an object. Received: ".concat(setupResult === null ? 'null' : typeof setupResult));
        }
    }
}
function createSetupContext(vm) {
    var exposeCalled = false;
    return {
        get attrs() {
            if (!vm._attrsProxy) {
                var proxy = (vm._attrsProxy = {});
                def(proxy, '_v_attr_proxy', true);
                syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');
            }
            return vm._attrsProxy;
        },
        get listeners() {
            if (!vm._listenersProxy) {
                var proxy = (vm._listenersProxy = {});
                syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');
            }
            return vm._listenersProxy;
        },
        get slots() {
            return initSlotsProxy(vm);
        },
        emit: bind(vm.$emit, vm),
        expose: function (exposed) {
            if (false) {
                if (exposeCalled) {
                    warn("expose() should be called only once per setup().", vm);
                }
                exposeCalled = true;
            }
            if (exposed) {
                Object.keys(exposed).forEach(function (key) {
                    return proxyWithRefUnwrap(vm, exposed, key);
                });
            }
        }
    };
}
function syncSetupProxy(to, from, prev, instance, type) {
    var changed = false;
    for (var key in from) {
        if (!(key in to)) {
            changed = true;
            defineProxyAttr(to, key, instance, type);
        }
        else if (from[key] !== prev[key]) {
            changed = true;
        }
    }
    for (var key in to) {
        if (!(key in from)) {
            changed = true;
            delete to[key];
        }
    }
    return changed;
}
function defineProxyAttr(proxy, key, instance, type) {
    Object.defineProperty(proxy, key, {
        enumerable: true,
        configurable: true,
        get: function () {
            return instance[type][key];
        }
    });
}
function initSlotsProxy(vm) {
    if (!vm._slotsProxy) {
        syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);
    }
    return vm._slotsProxy;
}
function syncSetupSlots(to, from) {
    for (var key in from) {
        to[key] = from[key];
    }
    for (var key in to) {
        if (!(key in from)) {
            delete to[key];
        }
    }
}
/**
 * @internal use manual type def because public setup context type relies on
 * legacy VNode types
 */
function useSlots() {
    return getContext().slots;
}
/**
 * @internal use manual type def because public setup context type relies on
 * legacy VNode types
 */
function useAttrs() {
    return getContext().attrs;
}
/**
 * Vue 2 only
 * @internal use manual type def because public setup context type relies on
 * legacy VNode types
 */
function useListeners() {
    return getContext().listeners;
}
function getContext() {
    if (false) {
        warn("useContext() called without active instance.");
    }
    var vm = currentInstance;
    return vm._setupContext || (vm._setupContext = createSetupContext(vm));
}
/**
 * Runtime helper for merging default declarations. Imported by compiled code
 * only.
 * @internal
 */
function mergeDefaults(raw, defaults) {
    var props = isArray(raw)
        ? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})
        : raw;
    for (var key in defaults) {
        var opt = props[key];
        if (opt) {
            if (isArray(opt) || isFunction(opt)) {
                props[key] = { type: opt, default: defaults[key] };
            }
            else {
                opt.default = defaults[key];
            }
        }
        else if (opt === null) {
            props[key] = { default: defaults[key] };
        }
        else if (false) {
            warn("props default key \"".concat(key, "\" has no corresponding declaration."));
        }
    }
    return props;
}

function initRender(vm) {
    vm._vnode = null; // the root of the child tree
    vm._staticTrees = null; // v-once cached trees
    var options = vm.$options;
    var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree
    var renderContext = parentVnode && parentVnode.context;
    vm.$slots = resolveSlots(options._renderChildren, renderContext);
    vm.$scopedSlots = parentVnode
        ? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)
        : emptyObject;
    // bind the createElement fn to this instance
    // so that we get proper render context inside it.
    // args order: tag, data, children, normalizationType, alwaysNormalize
    // internal version is used by render functions compiled from templates
    // @ts-expect-error
    vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };
    // normalization is always applied for the public version, used in
    // user-written render functions.
    // @ts-expect-error
    vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };
    // $attrs & $listeners are exposed for easier HOC creation.
    // they need to be reactive so that HOCs using them are always updated
    var parentData = parentVnode && parentVnode.data;
    /* istanbul ignore else */
    if (false) {
        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {
            !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
        }, true);
        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
            !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
        }, true);
    }
    else {
        defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, null, true);
        defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true);
    }
}
var currentRenderingInstance = null;
function renderMixin(Vue) {
    // install runtime convenience helpers
    installRenderHelpers(Vue.prototype);
    Vue.prototype.$nextTick = function (fn) {
        return nextTick(fn, this);
    };
    Vue.prototype._render = function () {
        var vm = this;
        var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;
        if (_parentVnode && vm._isMounted) {
            vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
            if (vm._slotsProxy) {
                syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);
            }
        }
        // set parent vnode. this allows render functions to have access
        // to the data on the placeholder node.
        vm.$vnode = _parentVnode;
        // render self
        var prevInst = currentInstance;
        var prevRenderInst = currentRenderingInstance;
        var vnode;
        try {
            setCurrentInstance(vm);
            currentRenderingInstance = vm;
            vnode = render.call(vm._renderProxy, vm.$createElement);
        }
        catch (e) {
            handleError(e, vm, "render");
            // return error render result,
            // or previous vnode to prevent render error causing blank component
            /* istanbul ignore else */
            if (false) {
                try {
                    vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
                }
                catch (e) {
                    handleError(e, vm, "renderError");
                    vnode = vm._vnode;
                }
            }
            else {
                vnode = vm._vnode;
            }
        }
        finally {
            currentRenderingInstance = prevRenderInst;
            setCurrentInstance(prevInst);
        }
        // if the returned array contains only a single node, allow it
        if (isArray(vnode) && vnode.length === 1) {
            vnode = vnode[0];
        }
        // return empty vnode in case the render function errored out
        if (!(vnode instanceof VNode)) {
            if (false) {
                warn('Multiple root nodes returned from render function. Render function ' +
                    'should return a single root node.', vm);
            }
            vnode = createEmptyVNode();
        }
        // set parent
        vnode.parent = _parentVnode;
        return vnode;
    };
}

function ensureCtor(comp, base) {
    if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {
        comp = comp.default;
    }
    return isObject(comp) ? base.extend(comp) : comp;
}
function createAsyncPlaceholder(factory, data, context, children, tag) {
    var node = createEmptyVNode();
    node.asyncFactory = factory;
    node.asyncMeta = { data: data, context: context, children: children, tag: tag };
    return node;
}
function resolveAsyncComponent(factory, baseCtor) {
    if (isTrue(factory.error) && isDef(factory.errorComp)) {
        return factory.errorComp;
    }
    if (isDef(factory.resolved)) {
        return factory.resolved;
    }
    var owner = currentRenderingInstance;
    if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
        // already pending
        factory.owners.push(owner);
    }
    if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
        return factory.loadingComp;
    }
    if (owner && !isDef(factory.owners)) {
        var owners_1 = (factory.owners = [owner]);
        var sync_1 = true;
        var timerLoading_1 = null;
        var timerTimeout_1 = null;
        owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });
        var forceRender_1 = function (renderCompleted) {
            for (var i = 0, l = owners_1.length; i < l; i++) {
                owners_1[i].$forceUpdate();
            }
            if (renderCompleted) {
                owners_1.length = 0;
                if (timerLoading_1 !== null) {
                    clearTimeout(timerLoading_1);
                    timerLoading_1 = null;
                }
                if (timerTimeout_1 !== null) {
                    clearTimeout(timerTimeout_1);
                    timerTimeout_1 = null;
                }
            }
        };
        var resolve = once(function (res) {
            // cache resolved
            factory.resolved = ensureCtor(res, baseCtor);
            // invoke callbacks only if this is not a synchronous resolve
            // (async resolves are shimmed as synchronous during SSR)
            if (!sync_1) {
                forceRender_1(true);
            }
            else {
                owners_1.length = 0;
            }
        });
        var reject_1 = once(function (reason) {
            "production" !== 'production' &&
                warn("Failed to resolve async component: ".concat(String(factory)) +
                    (reason ? "\nReason: ".concat(reason) : ''));
            if (isDef(factory.errorComp)) {
                factory.error = true;
                forceRender_1(true);
            }
        });
        var res_1 = factory(resolve, reject_1);
        if (isObject(res_1)) {
            if (isPromise(res_1)) {
                // () => Promise
                if (isUndef(factory.resolved)) {
                    res_1.then(resolve, reject_1);
                }
            }
            else if (isPromise(res_1.component)) {
                res_1.component.then(resolve, reject_1);
                if (isDef(res_1.error)) {
                    factory.errorComp = ensureCtor(res_1.error, baseCtor);
                }
                if (isDef(res_1.loading)) {
                    factory.loadingComp = ensureCtor(res_1.loading, baseCtor);
                    if (res_1.delay === 0) {
                        factory.loading = true;
                    }
                    else {
                        // @ts-expect-error NodeJS timeout type
                        timerLoading_1 = setTimeout(function () {
                            timerLoading_1 = null;
                            if (isUndef(factory.resolved) && isUndef(factory.error)) {
                                factory.loading = true;
                                forceRender_1(false);
                            }
                        }, res_1.delay || 200);
                    }
                }
                if (isDef(res_1.timeout)) {
                    // @ts-expect-error NodeJS timeout type
                    timerTimeout_1 = setTimeout(function () {
                        timerTimeout_1 = null;
                        if (isUndef(factory.resolved)) {
                            reject_1( false ? "timeout (".concat(res_1.timeout, "ms)") : null);
                        }
                    }, res_1.timeout);
                }
            }
        }
        sync_1 = false;
        // return in case resolved synchronously
        return factory.loading ? factory.loadingComp : factory.resolved;
    }
}

function getFirstComponentChild(children) {
    if (isArray(children)) {
        for (var i = 0; i < children.length; i++) {
            var c = children[i];
            if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
                return c;
            }
        }
    }
}

var SIMPLE_NORMALIZE = 1;
var ALWAYS_NORMALIZE = 2;
// wrapper function for providing a more flexible interface
// without getting yelled at by flow
function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {
    if (isArray(data) || isPrimitive(data)) {
        normalizationType = children;
        children = data;
        data = undefined;
    }
    if (isTrue(alwaysNormalize)) {
        normalizationType = ALWAYS_NORMALIZE;
    }
    return _createElement(context, tag, data, children, normalizationType);
}
function _createElement(context, tag, data, children, normalizationType) {
    if (isDef(data) && isDef(data.__ob__)) {
        "production" !== 'production' &&
            warn("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);
        return createEmptyVNode();
    }
    // object syntax in v-bind
    if (isDef(data) && isDef(data.is)) {
        tag = data.is;
    }
    if (!tag) {
        // in case of component :is set to falsy value
        return createEmptyVNode();
    }
    // warn against non-primitive key
    if (false) {
        warn('Avoid using non-primitive value as key, ' +
            'use string/number value instead.', context);
    }
    // support single function children as default scoped slot
    if (isArray(children) && isFunction(children[0])) {
        data = data || {};
        data.scopedSlots = { default: children[0] };
        children.length = 0;
    }
    if (normalizationType === ALWAYS_NORMALIZE) {
        children = normalizeChildren(children);
    }
    else if (normalizationType === SIMPLE_NORMALIZE) {
        children = simpleNormalizeChildren(children);
    }
    var vnode, ns;
    if (typeof tag === 'string') {
        var Ctor = void 0;
        ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
        if (config.isReservedTag(tag)) {
            // platform built-in elements
            if (false) {
                warn("The .native modifier for v-on is only valid on components but it was used on <".concat(tag, ">."), context);
            }
            vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
        }
        else if ((!data || !data.pre) &&
            isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {
            // component
            vnode = createComponent(Ctor, data, context, children, tag);
        }
        else {
            // unknown or unlisted namespaced elements
            // check at runtime because it may get assigned a namespace when its
            // parent normalizes children
            vnode = new VNode(tag, data, children, undefined, undefined, context);
        }
    }
    else {
        // direct component options / constructor
        vnode = createComponent(tag, data, context, children);
    }
    if (isArray(vnode)) {
        return vnode;
    }
    else if (isDef(vnode)) {
        if (isDef(ns))
            applyNS(vnode, ns);
        if (isDef(data))
            registerDeepBindings(data);
        return vnode;
    }
    else {
        return createEmptyVNode();
    }
}
function applyNS(vnode, ns, force) {
    vnode.ns = ns;
    if (vnode.tag === 'foreignObject') {
        // use default namespace inside foreignObject
        ns = undefined;
        force = true;
    }
    if (isDef(vnode.children)) {
        for (var i = 0, l = vnode.children.length; i < l; i++) {
            var child = vnode.children[i];
            if (isDef(child.tag) &&
                (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
                applyNS(child, ns, force);
            }
        }
    }
}
// ref #5318
// necessary to ensure parent re-render when deep bindings like :style and
// :class are used on slot nodes
function registerDeepBindings(data) {
    if (isObject(data.style)) {
        traverse(data.style);
    }
    if (isObject(data.class)) {
        traverse(data.class);
    }
}

/**
 * @internal this function needs manual public type declaration because it relies
 * on previously manually authored types from Vue 2
 */
function h(type, props, children) {
    if (!currentInstance) {
        "production" !== 'production' &&
            warn("globally imported h() can only be invoked when there is an active " +
                "component instance, e.g. synchronously in a component's render or setup function.");
    }
    return createElement$1(currentInstance, type, props, children, 2, true);
}

function handleError(err, vm, info) {
    // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
    // See: https://github.com/vuejs/vuex/issues/1505
    pushTarget();
    try {
        if (vm) {
            var cur = vm;
            while ((cur = cur.$parent)) {
                var hooks = cur.$options.errorCaptured;
                if (hooks) {
                    for (var i = 0; i < hooks.length; i++) {
                        try {
                            var capture = hooks[i].call(cur, err, vm, info) === false;
                            if (capture)
                                return;
                        }
                        catch (e) {
                            globalHandleError(e, cur, 'errorCaptured hook');
                        }
                    }
                }
            }
        }
        globalHandleError(err, vm, info);
    }
    finally {
        popTarget();
    }
}
function invokeWithErrorHandling(handler, context, args, vm, info) {
    var res;
    try {
        res = args ? handler.apply(context, args) : handler.call(context);
        if (res && !res._isVue && isPromise(res) && !res._handled) {
            res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
            res._handled = true;
        }
    }
    catch (e) {
        handleError(e, vm, info);
    }
    return res;
}
function globalHandleError(err, vm, info) {
    if (config.errorHandler) {
        try {
            return config.errorHandler.call(null, err, vm, info);
        }
        catch (e) {
            // if the user intentionally throws the original error in the handler,
            // do not log it twice
            if (e !== err) {
                logError(e, null, 'config.errorHandler');
            }
        }
    }
    logError(err, vm, info);
}
function logError(err, vm, info) {
    if (false) {
        warn("Error in ".concat(info, ": \"").concat(err.toString(), "\""), vm);
    }
    /* istanbul ignore else */
    if (inBrowser && typeof console !== 'undefined') {
        console.error(err);
    }
    else {
        throw err;
    }
}

/* globals MutationObserver */
var isUsingMicroTask = false;
var callbacks = [];
var pending = false;
function flushCallbacks() {
    pending = false;
    var copies = callbacks.slice(0);
    callbacks.length = 0;
    for (var i = 0; i < copies.length; i++) {
        copies[i]();
    }
}
// Here we have async deferring wrappers using microtasks.
// In 2.5 we used (macro) tasks (in combination with microtasks).
// However, it has subtle problems when state is changed right before repaint
// (e.g. #6813, out-in transitions).
// Also, using (macro) tasks in event handler would cause some weird behaviors
// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
// So we now use microtasks everywhere, again.
// A major drawback of this tradeoff is that there are some scenarios
// where microtasks have too high a priority and fire in between supposedly
// sequential events (e.g. #4521, #6690, which have workarounds)
// or even between bubbling of the same event (#6566).
var timerFunc;
// The nextTick behavior leverages the microtask queue, which can be accessed
// via either native Promise.then or MutationObserver.
// MutationObserver has wider support, however it is seriously bugged in
// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
// completely stops working after triggering a few times... so, if native
// Promise is available, we will use it:
/* istanbul ignore next, $flow-disable-line */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
    var p_1 = Promise.resolve();
    timerFunc = function () {
        p_1.then(flushCallbacks);
        // In problematic UIWebViews, Promise.then doesn't completely break, but
        // it can get stuck in a weird state where callbacks are pushed into the
        // microtask queue but the queue isn't being flushed, until the browser
        // needs to do some other work, e.g. handle a timer. Therefore we can
        // "force" the microtask queue to be flushed by adding an empty timer.
        if (isIOS)
            setTimeout(noop);
    };
    isUsingMicroTask = true;
}
else if (!isIE &&
    typeof MutationObserver !== 'undefined' &&
    (isNative(MutationObserver) ||
        // PhantomJS and iOS 7.x
        MutationObserver.toString() === '[object MutationObserverConstructor]')) {
    // Use MutationObserver where native Promise is not available,
    // e.g. PhantomJS, iOS7, Android 4.4
    // (#6466 MutationObserver is unreliable in IE11)
    var counter_1 = 1;
    var observer = new MutationObserver(flushCallbacks);
    var textNode_1 = document.createTextNode(String(counter_1));
    observer.observe(textNode_1, {
        characterData: true
    });
    timerFunc = function () {
        counter_1 = (counter_1 + 1) % 2;
        textNode_1.data = String(counter_1);
    };
    isUsingMicroTask = true;
}
else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
    // Fallback to setImmediate.
    // Technically it leverages the (macro) task queue,
    // but it is still a better choice than setTimeout.
    timerFunc = function () {
        setImmediate(flushCallbacks);
    };
}
else {
    // Fallback to setTimeout.
    timerFunc = function () {
        setTimeout(flushCallbacks, 0);
    };
}
/**
 * @internal
 */
function nextTick(cb, ctx) {
    var _resolve;
    callbacks.push(function () {
        if (cb) {
            try {
                cb.call(ctx);
            }
            catch (e) {
                handleError(e, ctx, 'nextTick');
            }
        }
        else if (_resolve) {
            _resolve(ctx);
        }
    });
    if (!pending) {
        pending = true;
        timerFunc();
    }
    // $flow-disable-line
    if (!cb && typeof Promise !== 'undefined') {
        return new Promise(function (resolve) {
            _resolve = resolve;
        });
    }
}

function useCssModule(name) {
    if (name === void 0) { name = '$style'; }
    /* istanbul ignore else */
    {
        if (!currentInstance) {
            "production" !== 'production' && warn("useCssModule must be called inside setup()");
            return emptyObject;
        }
        var mod = currentInstance[name];
        if (!mod) {
            "production" !== 'production' &&
                warn("Current instance does not have CSS module named \"".concat(name, "\"."));
            return emptyObject;
        }
        return mod;
    }
}

/**
 * Runtime helper for SFC's CSS variable injection feature.
 * @private
 */
function useCssVars(getter) {
    if (!inBrowser && !false)
        return;
    var instance = currentInstance;
    if (!instance) {
        "production" !== 'production' &&
            warn("useCssVars is called without current active component instance.");
        return;
    }
    watchPostEffect(function () {
        var el = instance.$el;
        var vars = getter(instance, instance._setupProxy);
        if (el && el.nodeType === 1) {
            var style = el.style;
            for (var key in vars) {
                style.setProperty("--".concat(key), vars[key]);
            }
        }
    });
}

/**
 * v3-compatible async component API.
 * @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts
 * because it relies on existing manual types
 */
function defineAsyncComponent(source) {
    if (isFunction(source)) {
        source = { loader: source };
    }
    var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out
    _b = source.suspensible, // undefined = never times out
    suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true
    userOnError = source.onError;
    if (false) {
        warn("The suspensible option for async components is not supported in Vue2. It is ignored.");
    }
    var pendingRequest = null;
    var retries = 0;
    var retry = function () {
        retries++;
        pendingRequest = null;
        return load();
    };
    var load = function () {
        var thisRequest;
        return (pendingRequest ||
            (thisRequest = pendingRequest =
                loader()
                    .catch(function (err) {
                    err = err instanceof Error ? err : new Error(String(err));
                    if (userOnError) {
                        return new Promise(function (resolve, reject) {
                            var userRetry = function () { return resolve(retry()); };
                            var userFail = function () { return reject(err); };
                            userOnError(err, userRetry, userFail, retries + 1);
                        });
                    }
                    else {
                        throw err;
                    }
                })
                    .then(function (comp) {
                    if (thisRequest !== pendingRequest && pendingRequest) {
                        return pendingRequest;
                    }
                    if (false) {
                        warn("Async component loader resolved to undefined. " +
                            "If you are using retry(), make sure to return its return value.");
                    }
                    // interop module default
                    if (comp &&
                        (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {
                        comp = comp.default;
                    }
                    if (false) {
                        throw new Error("Invalid async component load result: ".concat(comp));
                    }
                    return comp;
                })));
    };
    return function () {
        var component = load();
        return {
            component: component,
            delay: delay,
            timeout: timeout,
            error: errorComponent,
            loading: loadingComponent
        };
    };
}

function createLifeCycle(hookName) {
    return function (fn, target) {
        if (target === void 0) { target = currentInstance; }
        if (!target) {
            "production" !== 'production' &&
                warn("".concat(formatName(hookName), " is called when there is no active component instance to be ") +
                    "associated with. " +
                    "Lifecycle injection APIs can only be used during execution of setup().");
            return;
        }
        return injectHook(target, hookName, fn);
    };
}
function formatName(name) {
    if (name === 'beforeDestroy') {
        name = 'beforeUnmount';
    }
    else if (name === 'destroyed') {
        name = 'unmounted';
    }
    return "on".concat(name[0].toUpperCase() + name.slice(1));
}
function injectHook(instance, hookName, fn) {
    var options = instance.$options;
    options[hookName] = mergeLifecycleHook(options[hookName], fn);
}
var onBeforeMount = createLifeCycle('beforeMount');
var onMounted = createLifeCycle('mounted');
var onBeforeUpdate = createLifeCycle('beforeUpdate');
var onUpdated = createLifeCycle('updated');
var onBeforeUnmount = createLifeCycle('beforeDestroy');
var onUnmounted = createLifeCycle('destroyed');
var onActivated = createLifeCycle('activated');
var onDeactivated = createLifeCycle('deactivated');
var onServerPrefetch = createLifeCycle('serverPrefetch');
var onRenderTracked = createLifeCycle('renderTracked');
var onRenderTriggered = createLifeCycle('renderTriggered');
var injectErrorCapturedHook = createLifeCycle('errorCaptured');
function onErrorCaptured(hook, target) {
    if (target === void 0) { target = currentInstance; }
    injectErrorCapturedHook(hook, target);
}

/**
 * Note: also update dist/vue.runtime.mjs when adding new exports to this file.
 */
var version = '2.7.16';
/**
 * @internal type is manually declared in <root>/types/v3-define-component.d.ts
 */
function defineComponent(options) {
    return options;
}

var seenObjects = new _Set();
/**
 * Recursively traverse an object to evoke all converted
 * getters, so that every nested property inside the object
 * is collected as a "deep" dependency.
 */
function traverse(val) {
    _traverse(val, seenObjects);
    seenObjects.clear();
    return val;
}
function _traverse(val, seen) {
    var i, keys;
    var isA = isArray(val);
    if ((!isA && !isObject(val)) ||
        val.__v_skip /* ReactiveFlags.SKIP */ ||
        Object.isFrozen(val) ||
        val instanceof VNode) {
        return;
    }
    if (val.__ob__) {
        var depId = val.__ob__.dep.id;
        if (seen.has(depId)) {
            return;
        }
        seen.add(depId);
    }
    if (isA) {
        i = val.length;
        while (i--)
            _traverse(val[i], seen);
    }
    else if (isRef(val)) {
        _traverse(val.value, seen);
    }
    else {
        keys = Object.keys(val);
        i = keys.length;
        while (i--)
            _traverse(val[keys[i]], seen);
    }
}

var uid$1 = 0;
/**
 * A watcher parses an expression, collects dependencies,
 * and fires callback when the expression value changes.
 * This is used for both the $watch() api and directives.
 * @internal
 */
var Watcher = /** @class */ (function () {
    function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {
        recordEffectScope(this, 
        // if the active effect scope is manually created (not a component scope),
        // prioritize it
        activeEffectScope && !activeEffectScope._vm
            ? activeEffectScope
            : vm
                ? vm._scope
                : undefined);
        if ((this.vm = vm) && isRenderWatcher) {
            vm._watcher = this;
        }
        // options
        if (options) {
            this.deep = !!options.deep;
            this.user = !!options.user;
            this.lazy = !!options.lazy;
            this.sync = !!options.sync;
            this.before = options.before;
            if (false) {
                this.onTrack = options.onTrack;
                this.onTrigger = options.onTrigger;
            }
        }
        else {
            this.deep = this.user = this.lazy = this.sync = false;
        }
        this.cb = cb;
        this.id = ++uid$1; // uid for batching
        this.active = true;
        this.post = false;
        this.dirty = this.lazy; // for lazy watchers
        this.deps = [];
        this.newDeps = [];
        this.depIds = new _Set();
        this.newDepIds = new _Set();
        this.expression =  false ? expOrFn.toString() : '';
        // parse expression for getter
        if (isFunction(expOrFn)) {
            this.getter = expOrFn;
        }
        else {
            this.getter = parsePath(expOrFn);
            if (!this.getter) {
                this.getter = noop;
                "production" !== 'production' &&
                    warn("Failed watching path: \"".concat(expOrFn, "\" ") +
                        'Watcher only accepts simple dot-delimited paths. ' +
                        'For full control, use a function instead.', vm);
            }
        }
        this.value = this.lazy ? undefined : this.get();
    }
    /**
     * Evaluate the getter, and re-collect dependencies.
     */
    Watcher.prototype.get = function () {
        pushTarget(this);
        var value;
        var vm = this.vm;
        try {
            value = this.getter.call(vm, vm);
        }
        catch (e) {
            if (this.user) {
                handleError(e, vm, "getter for watcher \"".concat(this.expression, "\""));
            }
            else {
                throw e;
            }
        }
        finally {
            // "touch" every property so they are all tracked as
            // dependencies for deep watching
            if (this.deep) {
                traverse(value);
            }
            popTarget();
            this.cleanupDeps();
        }
        return value;
    };
    /**
     * Add a dependency to this directive.
     */
    Watcher.prototype.addDep = function (dep) {
        var id = dep.id;
        if (!this.newDepIds.has(id)) {
            this.newDepIds.add(id);
            this.newDeps.push(dep);
            if (!this.depIds.has(id)) {
                dep.addSub(this);
            }
        }
    };
    /**
     * Clean up for dependency collection.
     */
    Watcher.prototype.cleanupDeps = function () {
        var i = this.deps.length;
        while (i--) {
            var dep = this.deps[i];
            if (!this.newDepIds.has(dep.id)) {
                dep.removeSub(this);
            }
        }
        var tmp = this.depIds;
        this.depIds = this.newDepIds;
        this.newDepIds = tmp;
        this.newDepIds.clear();
        tmp = this.deps;
        this.deps = this.newDeps;
        this.newDeps = tmp;
        this.newDeps.length = 0;
    };
    /**
     * Subscriber interface.
     * Will be called when a dependency changes.
     */
    Watcher.prototype.update = function () {
        /* istanbul ignore else */
        if (this.lazy) {
            this.dirty = true;
        }
        else if (this.sync) {
            this.run();
        }
        else {
            queueWatcher(this);
        }
    };
    /**
     * Scheduler job interface.
     * Will be called by the scheduler.
     */
    Watcher.prototype.run = function () {
        if (this.active) {
            var value = this.get();
            if (value !== this.value ||
                // Deep watchers and watchers on Object/Arrays should fire even
                // when the value is the same, because the value may
                // have mutated.
                isObject(value) ||
                this.deep) {
                // set new value
                var oldValue = this.value;
                this.value = value;
                if (this.user) {
                    var info = "callback for watcher \"".concat(this.expression, "\"");
                    invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
                }
                else {
                    this.cb.call(this.vm, value, oldValue);
                }
            }
        }
    };
    /**
     * Evaluate the value of the watcher.
     * This only gets called for lazy watchers.
     */
    Watcher.prototype.evaluate = function () {
        this.value = this.get();
        this.dirty = false;
    };
    /**
     * Depend on all deps collected by this watcher.
     */
    Watcher.prototype.depend = function () {
        var i = this.deps.length;
        while (i--) {
            this.deps[i].depend();
        }
    };
    /**
     * Remove self from all dependencies' subscriber list.
     */
    Watcher.prototype.teardown = function () {
        if (this.vm && !this.vm._isBeingDestroyed) {
            remove$2(this.vm._scope.effects, this);
        }
        if (this.active) {
            var i = this.deps.length;
            while (i--) {
                this.deps[i].removeSub(this);
            }
            this.active = false;
            if (this.onStop) {
                this.onStop();
            }
        }
    };
    return Watcher;
}());

var mark;
var measure;
if (false) {
    var perf_1 = inBrowser && window.performance;
    /* istanbul ignore if */
    if (perf_1 &&
        // @ts-ignore
        perf_1.mark &&
        // @ts-ignore
        perf_1.measure &&
        // @ts-ignore
        perf_1.clearMarks &&
        // @ts-ignore
        perf_1.clearMeasures) {
        mark = function (tag) { return perf_1.mark(tag); };
        measure = function (name, startTag, endTag) {
            perf_1.measure(name, startTag, endTag);
            perf_1.clearMarks(startTag);
            perf_1.clearMarks(endTag);
            // perf.clearMeasures(name)
        };
    }
}

function initEvents(vm) {
    vm._events = Object.create(null);
    vm._hasHookEvent = false;
    // init parent attached events
    var listeners = vm.$options._parentListeners;
    if (listeners) {
        updateComponentListeners(vm, listeners);
    }
}
var target$1;
function add$1(event, fn) {
    target$1.$on(event, fn);
}
function remove$1(event, fn) {
    target$1.$off(event, fn);
}
function createOnceHandler$1(event, fn) {
    var _target = target$1;
    return function onceHandler() {
        var res = fn.apply(null, arguments);
        if (res !== null) {
            _target.$off(event, onceHandler);
        }
    };
}
function updateComponentListeners(vm, listeners, oldListeners) {
    target$1 = vm;
    updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);
    target$1 = undefined;
}
function eventsMixin(Vue) {
    var hookRE = /^hook:/;
    Vue.prototype.$on = function (event, fn) {
        var vm = this;
        if (isArray(event)) {
            for (var i = 0, l = event.length; i < l; i++) {
                vm.$on(event[i], fn);
            }
        }
        else {
            (vm._events[event] || (vm._events[event] = [])).push(fn);
            // optimize hook:event cost by using a boolean flag marked at registration
            // instead of a hash lookup
            if (hookRE.test(event)) {
                vm._hasHookEvent = true;
            }
        }
        return vm;
    };
    Vue.prototype.$once = function (event, fn) {
        var vm = this;
        function on() {
            vm.$off(event, on);
            fn.apply(vm, arguments);
        }
        on.fn = fn;
        vm.$on(event, on);
        return vm;
    };
    Vue.prototype.$off = function (event, fn) {
        var vm = this;
        // all
        if (!arguments.length) {
            vm._events = Object.create(null);
            return vm;
        }
        // array of events
        if (isArray(event)) {
            for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {
                vm.$off(event[i_1], fn);
            }
            return vm;
        }
        // specific event
        var cbs = vm._events[event];
        if (!cbs) {
            return vm;
        }
        if (!fn) {
            vm._events[event] = null;
            return vm;
        }
        // specific handler
        var cb;
        var i = cbs.length;
        while (i--) {
            cb = cbs[i];
            if (cb === fn || cb.fn === fn) {
                cbs.splice(i, 1);
                break;
            }
        }
        return vm;
    };
    Vue.prototype.$emit = function (event) {
        var vm = this;
        if (false) {
            var lowerCaseEvent = event.toLowerCase();
            if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
                tip("Event \"".concat(lowerCaseEvent, "\" is emitted in component ") +
                    "".concat(formatComponentName(vm), " but the handler is registered for \"").concat(event, "\". ") +
                    "Note that HTML attributes are case-insensitive and you cannot use " +
                    "v-on to listen to camelCase events when using in-DOM templates. " +
                    "You should probably use \"".concat(hyphenate(event), "\" instead of \"").concat(event, "\"."));
            }
        }
        var cbs = vm._events[event];
        if (cbs) {
            cbs = cbs.length > 1 ? toArray(cbs) : cbs;
            var args = toArray(arguments, 1);
            var info = "event handler for \"".concat(event, "\"");
            for (var i = 0, l = cbs.length; i < l; i++) {
                invokeWithErrorHandling(cbs[i], vm, args, vm, info);
            }
        }
        return vm;
    };
}

var activeInstance = null;
var isUpdatingChildComponent = false;
function setActiveInstance(vm) {
    var prevActiveInstance = activeInstance;
    activeInstance = vm;
    return function () {
        activeInstance = prevActiveInstance;
    };
}
function initLifecycle(vm) {
    var options = vm.$options;
    // locate first non-abstract parent
    var parent = options.parent;
    if (parent && !options.abstract) {
        while (parent.$options.abstract && parent.$parent) {
            parent = parent.$parent;
        }
        parent.$children.push(vm);
    }
    vm.$parent = parent;
    vm.$root = parent ? parent.$root : vm;
    vm.$children = [];
    vm.$refs = {};
    vm._provided = parent ? parent._provided : Object.create(null);
    vm._watcher = null;
    vm._inactive = null;
    vm._directInactive = false;
    vm._isMounted = false;
    vm._isDestroyed = false;
    vm._isBeingDestroyed = false;
}
function lifecycleMixin(Vue) {
    Vue.prototype._update = function (vnode, hydrating) {
        var vm = this;
        var prevEl = vm.$el;
        var prevVnode = vm._vnode;
        var restoreActiveInstance = setActiveInstance(vm);
        vm._vnode = vnode;
        // Vue.prototype.__patch__ is injected in entry points
        // based on the rendering backend used.
        if (!prevVnode) {
            // initial render
            vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
        }
        else {
            // updates
            vm.$el = vm.__patch__(prevVnode, vnode);
        }
        restoreActiveInstance();
        // update __vue__ reference
        if (prevEl) {
            prevEl.__vue__ = null;
        }
        if (vm.$el) {
            vm.$el.__vue__ = vm;
        }
        // if parent is an HOC, update its $el as well
        var wrapper = vm;
        while (wrapper &&
            wrapper.$vnode &&
            wrapper.$parent &&
            wrapper.$vnode === wrapper.$parent._vnode) {
            wrapper.$parent.$el = wrapper.$el;
            wrapper = wrapper.$parent;
        }
        // updated hook is called by the scheduler to ensure that children are
        // updated in a parent's updated hook.
    };
    Vue.prototype.$forceUpdate = function () {
        var vm = this;
        if (vm._watcher) {
            vm._watcher.update();
        }
    };
    Vue.prototype.$destroy = function () {
        var vm = this;
        if (vm._isBeingDestroyed) {
            return;
        }
        callHook$1(vm, 'beforeDestroy');
        vm._isBeingDestroyed = true;
        // remove self from parent
        var parent = vm.$parent;
        if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
            remove$2(parent.$children, vm);
        }
        // teardown scope. this includes both the render watcher and other
        // watchers created
        vm._scope.stop();
        // remove reference from data ob
        // frozen object may not have observer.
        if (vm._data.__ob__) {
            vm._data.__ob__.vmCount--;
        }
        // call the last hook...
        vm._isDestroyed = true;
        // invoke destroy hooks on current rendered tree
        vm.__patch__(vm._vnode, null);
        // fire destroyed hook
        callHook$1(vm, 'destroyed');
        // turn off all instance listeners.
        vm.$off();
        // remove __vue__ reference
        if (vm.$el) {
            vm.$el.__vue__ = null;
        }
        // release circular reference (#6759)
        if (vm.$vnode) {
            vm.$vnode.parent = null;
        }
    };
}
function mountComponent(vm, el, hydrating) {
    vm.$el = el;
    if (!vm.$options.render) {
        // @ts-expect-error invalid type
        vm.$options.render = createEmptyVNode;
        if (false) {
            /* istanbul ignore if */
            if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
                vm.$options.el ||
                el) {
                warn('You are using the runtime-only build of Vue where the template ' +
                    'compiler is not available. Either pre-compile the templates into ' +
                    'render functions, or use the compiler-included build.', vm);
            }
            else {
                warn('Failed to mount component: template or render function not defined.', vm);
            }
        }
    }
    callHook$1(vm, 'beforeMount');
    var updateComponent;
    /* istanbul ignore if */
    if (false) {
        updateComponent = function () {
            var name = vm._name;
            var id = vm._uid;
            var startTag = "vue-perf-start:".concat(id);
            var endTag = "vue-perf-end:".concat(id);
            mark(startTag);
            var vnode = vm._render();
            mark(endTag);
            measure("vue ".concat(name, " render"), startTag, endTag);
            mark(startTag);
            vm._update(vnode, hydrating);
            mark(endTag);
            measure("vue ".concat(name, " patch"), startTag, endTag);
        };
    }
    else {
        updateComponent = function () {
            vm._update(vm._render(), hydrating);
        };
    }
    var watcherOptions = {
        before: function () {
            if (vm._isMounted && !vm._isDestroyed) {
                callHook$1(vm, 'beforeUpdate');
            }
        }
    };
    if (false) {
        watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };
        watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };
    }
    // we set this to vm._watcher inside the watcher's constructor
    // since the watcher's initial patch may call $forceUpdate (e.g. inside child
    // component's mounted hook), which relies on vm._watcher being already defined
    new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);
    hydrating = false;
    // flush buffer for flush: "pre" watchers queued in setup()
    var preWatchers = vm._preWatchers;
    if (preWatchers) {
        for (var i = 0; i < preWatchers.length; i++) {
            preWatchers[i].run();
        }
    }
    // manually mounted instance, call mounted on self
    // mounted is called for render-created child components in its inserted hook
    if (vm.$vnode == null) {
        vm._isMounted = true;
        callHook$1(vm, 'mounted');
    }
    return vm;
}
function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
    if (false) {
        isUpdatingChildComponent = true;
    }
    // determine whether component has slot children
    // we need to do this before overwriting $options._renderChildren.
    // check if there are dynamic scopedSlots (hand-written or compiled but with
    // dynamic slot names). Static scoped slots compiled from template has the
    // "$stable" marker.
    var newScopedSlots = parentVnode.data.scopedSlots;
    var oldScopedSlots = vm.$scopedSlots;
    var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||
        (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
        (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
        (!newScopedSlots && vm.$scopedSlots.$key));
    // Any static slot children from the parent may have changed during parent's
    // update. Dynamic scoped slots may also have changed. In such cases, a forced
    // update is necessary to ensure correctness.
    var needsForceUpdate = !!(renderChildren || // has new static slots
        vm.$options._renderChildren || // has old static slots
        hasDynamicScopedSlot);
    var prevVNode = vm.$vnode;
    vm.$options._parentVnode = parentVnode;
    vm.$vnode = parentVnode; // update vm's placeholder node without re-render
    if (vm._vnode) {
        // update child tree's parent
        vm._vnode.parent = parentVnode;
    }
    vm.$options._renderChildren = renderChildren;
    // update $attrs and $listeners hash
    // these are also reactive so they may trigger child update if the child
    // used them during render
    var attrs = parentVnode.data.attrs || emptyObject;
    if (vm._attrsProxy) {
        // force update if attrs are accessed and has changed since it may be
        // passed to a child component.
        if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {
            needsForceUpdate = true;
        }
    }
    vm.$attrs = attrs;
    // update listeners
    listeners = listeners || emptyObject;
    var prevListeners = vm.$options._parentListeners;
    if (vm._listenersProxy) {
        syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');
    }
    vm.$listeners = vm.$options._parentListeners = listeners;
    updateComponentListeners(vm, listeners, prevListeners);
    // update props
    if (propsData && vm.$options.props) {
        toggleObserving(false);
        var props = vm._props;
        var propKeys = vm.$options._propKeys || [];
        for (var i = 0; i < propKeys.length; i++) {
            var key = propKeys[i];
            var propOptions = vm.$options.props; // wtf flow?
            props[key] = validateProp(key, propOptions, propsData, vm);
        }
        toggleObserving(true);
        // keep a copy of raw propsData
        vm.$options.propsData = propsData;
    }
    // resolve slots + force update if has children
    if (needsForceUpdate) {
        vm.$slots = resolveSlots(renderChildren, parentVnode.context);
        vm.$forceUpdate();
    }
    if (false) {
        isUpdatingChildComponent = false;
    }
}
function isInInactiveTree(vm) {
    while (vm && (vm = vm.$parent)) {
        if (vm._inactive)
            return true;
    }
    return false;
}
function activateChildComponent(vm, direct) {
    if (direct) {
        vm._directInactive = false;
        if (isInInactiveTree(vm)) {
            return;
        }
    }
    else if (vm._directInactive) {
        return;
    }
    if (vm._inactive || vm._inactive === null) {
        vm._inactive = false;
        for (var i = 0; i < vm.$children.length; i++) {
            activateChildComponent(vm.$children[i]);
        }
        callHook$1(vm, 'activated');
    }
}
function deactivateChildComponent(vm, direct) {
    if (direct) {
        vm._directInactive = true;
        if (isInInactiveTree(vm)) {
            return;
        }
    }
    if (!vm._inactive) {
        vm._inactive = true;
        for (var i = 0; i < vm.$children.length; i++) {
            deactivateChildComponent(vm.$children[i]);
        }
        callHook$1(vm, 'deactivated');
    }
}
function callHook$1(vm, hook, args, setContext) {
    if (setContext === void 0) { setContext = true; }
    // #7573 disable dep collection when invoking lifecycle hooks
    pushTarget();
    var prevInst = currentInstance;
    var prevScope = getCurrentScope();
    setContext && setCurrentInstance(vm);
    var handlers = vm.$options[hook];
    var info = "".concat(hook, " hook");
    if (handlers) {
        for (var i = 0, j = handlers.length; i < j; i++) {
            invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);
        }
    }
    if (vm._hasHookEvent) {
        vm.$emit('hook:' + hook);
    }
    if (setContext) {
        setCurrentInstance(prevInst);
        prevScope && prevScope.on();
    }
    popTarget();
}

var MAX_UPDATE_COUNT = 100;
var queue = [];
var activatedChildren = [];
var has = {};
var circular = {};
var waiting = false;
var flushing = false;
var index = 0;
/**
 * Reset the scheduler's state.
 */
function resetSchedulerState() {
    index = queue.length = activatedChildren.length = 0;
    has = {};
    if (false) {
        circular = {};
    }
    waiting = flushing = false;
}
// Async edge case #6566 requires saving the timestamp when event listeners are
// attached. However, calling performance.now() has a perf overhead especially
// if the page has thousands of event listeners. Instead, we take a timestamp
// every time the scheduler flushes and use that for all event listeners
// attached during that flush.
var currentFlushTimestamp = 0;
// Async edge case fix requires storing an event listener's attach timestamp.
var getNow = Date.now;
// Determine what event timestamp the browser is using. Annoyingly, the
// timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp.
// All IE versions use low-res event timestamps, and have problematic clock
// implementations (#9632)
if (inBrowser && !isIE) {
    var performance_1 = window.performance;
    if (performance_1 &&
        typeof performance_1.now === 'function' &&
        getNow() > document.createEvent('Event').timeStamp) {
        // if the event timestamp, although evaluated AFTER the Date.now(), is
        // smaller than it, it means the event is using a hi-res timestamp,
        // and we need to use the hi-res version for event listener timestamps as
        // well.
        getNow = function () { return performance_1.now(); };
    }
}
var sortCompareFn = function (a, b) {
    if (a.post) {
        if (!b.post)
            return 1;
    }
    else if (b.post) {
        return -1;
    }
    return a.id - b.id;
};
/**
 * Flush both queues and run the watchers.
 */
function flushSchedulerQueue() {
    currentFlushTimestamp = getNow();
    flushing = true;
    var watcher, id;
    // Sort queue before flush.
    // This ensures that:
    // 1. Components are updated from parent to child. (because parent is always
    //    created before the child)
    // 2. A component's user watchers are run before its render watcher (because
    //    user watchers are created before the render watcher)
    // 3. If a component is destroyed during a parent component's watcher run,
    //    its watchers can be skipped.
    queue.sort(sortCompareFn);
    // do not cache length because more watchers might be pushed
    // as we run existing watchers
    for (index = 0; index < queue.length; index++) {
        watcher = queue[index];
        if (watcher.before) {
            watcher.before();
        }
        id = watcher.id;
        has[id] = null;
        watcher.run();
        // in dev build, check and stop circular updates.
        if (false) {
            circular[id] = (circular[id] || 0) + 1;
            if (circular[id] > MAX_UPDATE_COUNT) {
                warn('You may have an infinite update loop ' +
                    (watcher.user
                        ? "in watcher with expression \"".concat(watcher.expression, "\"")
                        : "in a component render function."), watcher.vm);
                break;
            }
        }
    }
    // keep copies of post queues before resetting state
    var activatedQueue = activatedChildren.slice();
    var updatedQueue = queue.slice();
    resetSchedulerState();
    // call component updated and activated hooks
    callActivatedHooks(activatedQueue);
    callUpdatedHooks(updatedQueue);
    cleanupDeps();
    // devtool hook
    /* istanbul ignore if */
    if (devtools && config.devtools) {
        devtools.emit('flush');
    }
}
function callUpdatedHooks(queue) {
    var i = queue.length;
    while (i--) {
        var watcher = queue[i];
        var vm = watcher.vm;
        if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
            callHook$1(vm, 'updated');
        }
    }
}
/**
 * Queue a kept-alive component that was activated during patch.
 * The queue will be processed after the entire tree has been patched.
 */
function queueActivatedComponent(vm) {
    // setting _inactive to false here so that a render function can
    // rely on checking whether it's in an inactive tree (e.g. router-view)
    vm._inactive = false;
    activatedChildren.push(vm);
}
function callActivatedHooks(queue) {
    for (var i = 0; i < queue.length; i++) {
        queue[i]._inactive = true;
        activateChildComponent(queue[i], true /* true */);
    }
}
/**
 * Push a watcher into the watcher queue.
 * Jobs with duplicate IDs will be skipped unless it's
 * pushed when the queue is being flushed.
 */
function queueWatcher(watcher) {
    var id = watcher.id;
    if (has[id] != null) {
        return;
    }
    if (watcher === Dep.target && watcher.noRecurse) {
        return;
    }
    has[id] = true;
    if (!flushing) {
        queue.push(watcher);
    }
    else {
        // if already flushing, splice the watcher based on its id
        // if already past its id, it will be run next immediately.
        var i = queue.length - 1;
        while (i > index && queue[i].id > watcher.id) {
            i--;
        }
        queue.splice(i + 1, 0, watcher);
    }
    // queue the flush
    if (!waiting) {
        waiting = true;
        if (false) {
            flushSchedulerQueue();
            return;
        }
        nextTick(flushSchedulerQueue);
    }
}

function initProvide(vm) {
    var provideOption = vm.$options.provide;
    if (provideOption) {
        var provided = isFunction(provideOption)
            ? provideOption.call(vm)
            : provideOption;
        if (!isObject(provided)) {
            return;
        }
        var source = resolveProvided(vm);
        // IE9 doesn't support Object.getOwnPropertyDescriptors so we have to
        // iterate the keys ourselves.
        var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);
        for (var i = 0; i < keys.length; i++) {
            var key = keys[i];
            Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));
        }
    }
}
function initInjections(vm) {
    var result = resolveInject(vm.$options.inject, vm);
    if (result) {
        toggleObserving(false);
        Object.keys(result).forEach(function (key) {
            /* istanbul ignore else */
            if (false) {
                defineReactive(vm, key, result[key], function () {
                    warn("Avoid mutating an injected value directly since the changes will be " +
                        "overwritten whenever the provided component re-renders. " +
                        "injection being mutated: \"".concat(key, "\""), vm);
                });
            }
            else {
                defineReactive(vm, key, result[key]);
            }
        });
        toggleObserving(true);
    }
}
function resolveInject(inject, vm) {
    if (inject) {
        // inject is :any because flow is not smart enough to figure out cached
        var result = Object.create(null);
        var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
        for (var i = 0; i < keys.length; i++) {
            var key = keys[i];
            // #6574 in case the inject object is observed...
            if (key === '__ob__')
                continue;
            var provideKey = inject[key].from;
            if (provideKey in vm._provided) {
                result[key] = vm._provided[provideKey];
            }
            else if ('default' in inject[key]) {
                var provideDefault = inject[key].default;
                result[key] = isFunction(provideDefault)
                    ? provideDefault.call(vm)
                    : provideDefault;
            }
            else if (false) {
                warn("Injection \"".concat(key, "\" not found"), vm);
            }
        }
        return result;
    }
}

function FunctionalRenderContext(data, props, children, parent, Ctor) {
    var _this = this;
    var options = Ctor.options;
    // ensure the createElement function in functional components
    // gets a unique context - this is necessary for correct named slot check
    var contextVm;
    if (hasOwn(parent, '_uid')) {
        contextVm = Object.create(parent);
        contextVm._original = parent;
    }
    else {
        // the context vm passed in is a functional context as well.
        // in this case we want to make sure we are able to get a hold to the
        // real context instance.
        contextVm = parent;
        // @ts-ignore
        parent = parent._original;
    }
    var isCompiled = isTrue(options._compiled);
    var needNormalization = !isCompiled;
    this.data = data;
    this.props = props;
    this.children = children;
    this.parent = parent;
    this.listeners = data.on || emptyObject;
    this.injections = resolveInject(options.inject, parent);
    this.slots = function () {
        if (!_this.$slots) {
            normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));
        }
        return _this.$slots;
    };
    Object.defineProperty(this, 'scopedSlots', {
        enumerable: true,
        get: function () {
            return normalizeScopedSlots(parent, data.scopedSlots, this.slots());
        }
    });
    // support for compiled functional template
    if (isCompiled) {
        // exposing $options for renderStatic()
        this.$options = options;
        // pre-resolve slots for renderSlot()
        this.$slots = this.slots();
        this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);
    }
    if (options._scopeId) {
        this._c = function (a, b, c, d) {
            var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);
            if (vnode && !isArray(vnode)) {
                vnode.fnScopeId = options._scopeId;
                vnode.fnContext = parent;
            }
            return vnode;
        };
    }
    else {
        this._c = function (a, b, c, d) {
            return createElement$1(contextVm, a, b, c, d, needNormalization);
        };
    }
}
installRenderHelpers(FunctionalRenderContext.prototype);
function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
    var options = Ctor.options;
    var props = {};
    var propOptions = options.props;
    if (isDef(propOptions)) {
        for (var key in propOptions) {
            props[key] = validateProp(key, propOptions, propsData || emptyObject);
        }
    }
    else {
        if (isDef(data.attrs))
            mergeProps(props, data.attrs);
        if (isDef(data.props))
            mergeProps(props, data.props);
    }
    var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
    var vnode = options.render.call(null, renderContext._c, renderContext);
    if (vnode instanceof VNode) {
        return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
    }
    else if (isArray(vnode)) {
        var vnodes = normalizeChildren(vnode) || [];
        var res = new Array(vnodes.length);
        for (var i = 0; i < vnodes.length; i++) {
            res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
        }
        return res;
    }
}
function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
    // #7817 clone node before setting fnContext, otherwise if the node is reused
    // (e.g. it was from a cached normal slot) the fnContext causes named slots
    // that should not be matched to match.
    var clone = cloneVNode(vnode);
    clone.fnContext = contextVm;
    clone.fnOptions = options;
    if (false) {
        (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =
            renderContext;
    }
    if (data.slot) {
        (clone.data || (clone.data = {})).slot = data.slot;
    }
    return clone;
}
function mergeProps(to, from) {
    for (var key in from) {
        to[camelize(key)] = from[key];
    }
}

function getComponentName(options) {
    return options.name || options.__name || options._componentTag;
}
// inline hooks to be invoked on component VNodes during patch
var componentVNodeHooks = {
    init: function (vnode, hydrating) {
        if (vnode.componentInstance &&
            !vnode.componentInstance._isDestroyed &&
            vnode.data.keepAlive) {
            // kept-alive components, treat as a patch
            var mountedNode = vnode; // work around flow
            componentVNodeHooks.prepatch(mountedNode, mountedNode);
        }
        else {
            var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));
            child.$mount(hydrating ? vnode.elm : undefined, hydrating);
        }
    },
    prepatch: function (oldVnode, vnode) {
        var options = vnode.componentOptions;
        var child = (vnode.componentInstance = oldVnode.componentInstance);
        updateChildComponent(child, options.propsData, // updated props
        options.listeners, // updated listeners
        vnode, // new parent vnode
        options.children // new children
        );
    },
    insert: function (vnode) {
        var context = vnode.context, componentInstance = vnode.componentInstance;
        if (!componentInstance._isMounted) {
            componentInstance._isMounted = true;
            callHook$1(componentInstance, 'mounted');
        }
        if (vnode.data.keepAlive) {
            if (context._isMounted) {
                // vue-router#1212
                // During updates, a kept-alive component's child components may
                // change, so directly walking the tree here may call activated hooks
                // on incorrect children. Instead we push them into a queue which will
                // be processed after the whole patch process ended.
                queueActivatedComponent(componentInstance);
            }
            else {
                activateChildComponent(componentInstance, true /* direct */);
            }
        }
    },
    destroy: function (vnode) {
        var componentInstance = vnode.componentInstance;
        if (!componentInstance._isDestroyed) {
            if (!vnode.data.keepAlive) {
                componentInstance.$destroy();
            }
            else {
                deactivateChildComponent(componentInstance, true /* direct */);
            }
        }
    }
};
var hooksToMerge = Object.keys(componentVNodeHooks);
function createComponent(Ctor, data, context, children, tag) {
    if (isUndef(Ctor)) {
        return;
    }
    var baseCtor = context.$options._base;
    // plain options object: turn it into a constructor
    if (isObject(Ctor)) {
        Ctor = baseCtor.extend(Ctor);
    }
    // if at this stage it's not a constructor or an async component factory,
    // reject.
    if (typeof Ctor !== 'function') {
        if (false) {
            warn("Invalid Component definition: ".concat(String(Ctor)), context);
        }
        return;
    }
    // async component
    var asyncFactory;
    // @ts-expect-error
    if (isUndef(Ctor.cid)) {
        asyncFactory = Ctor;
        Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
        if (Ctor === undefined) {
            // return a placeholder node for async component, which is rendered
            // as a comment node but preserves all the raw information for the node.
            // the information will be used for async server-rendering and hydration.
            return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
        }
    }
    data = data || {};
    // resolve constructor options in case global mixins are applied after
    // component constructor creation
    resolveConstructorOptions(Ctor);
    // transform component v-model data into props & events
    if (isDef(data.model)) {
        // @ts-expect-error
        transformModel(Ctor.options, data);
    }
    // extract props
    // @ts-expect-error
    var propsData = extractPropsFromVNodeData(data, Ctor, tag);
    // functional component
    // @ts-expect-error
    if (isTrue(Ctor.options.functional)) {
        return createFunctionalComponent(Ctor, propsData, data, context, children);
    }
    // extract listeners, since these needs to be treated as
    // child component listeners instead of DOM listeners
    var listeners = data.on;
    // replace with listeners with .native modifier
    // so it gets processed during parent component patch.
    data.on = data.nativeOn;
    // @ts-expect-error
    if (isTrue(Ctor.options.abstract)) {
        // abstract components do not keep anything
        // other than props & listeners & slot
        // work around flow
        var slot = data.slot;
        data = {};
        if (slot) {
            data.slot = slot;
        }
    }
    // install component management hooks onto the placeholder node
    installComponentHooks(data);
    // return a placeholder vnode
    // @ts-expect-error
    var name = getComponentName(Ctor.options) || tag;
    var vnode = new VNode(
    // @ts-expect-error
    "vue-component-".concat(Ctor.cid).concat(name ? "-".concat(name) : ''), data, undefined, undefined, undefined, context, 
    // @ts-expect-error
    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);
    return vnode;
}
function createComponentInstanceForVnode(
// we know it's MountedComponentVNode but flow doesn't
vnode, 
// activeInstance in lifecycle state
parent) {
    var options = {
        _isComponent: true,
        _parentVnode: vnode,
        parent: parent
    };
    // check inline-template render functions
    var inlineTemplate = vnode.data.inlineTemplate;
    if (isDef(inlineTemplate)) {
        options.render = inlineTemplate.render;
        options.staticRenderFns = inlineTemplate.staticRenderFns;
    }
    return new vnode.componentOptions.Ctor(options);
}
function installComponentHooks(data) {
    var hooks = data.hook || (data.hook = {});
    for (var i = 0; i < hooksToMerge.length; i++) {
        var key = hooksToMerge[i];
        var existing = hooks[key];
        var toMerge = componentVNodeHooks[key];
        // @ts-expect-error
        if (existing !== toMerge && !(existing && existing._merged)) {
            hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;
        }
    }
}
function mergeHook(f1, f2) {
    var merged = function (a, b) {
        // flow complains about extra args which is why we use any
        f1(a, b);
        f2(a, b);
    };
    merged._merged = true;
    return merged;
}
// transform component v-model info (value and callback) into
// prop and event handler respectively.
function transformModel(options, data) {
    var prop = (options.model && options.model.prop) || 'value';
    var event = (options.model && options.model.event) || 'input';
    (data.attrs || (data.attrs = {}))[prop] = data.model.value;
    var on = data.on || (data.on = {});
    var existing = on[event];
    var callback = data.model.callback;
    if (isDef(existing)) {
        if (isArray(existing)
            ? existing.indexOf(callback) === -1
            : existing !== callback) {
            on[event] = [callback].concat(existing);
        }
    }
    else {
        on[event] = callback;
    }
}

var warn = noop;
var tip = noop;
var generateComponentTrace; // work around flow check
var formatComponentName;
if (false) {
    var hasConsole_1 = typeof console !== 'undefined';
    var classifyRE_1 = /(?:^|[-_])(\w)/g;
    var classify_1 = function (str) {
        return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');
    };
    warn = function (msg, vm) {
        if (vm === void 0) { vm = currentInstance; }
        var trace = vm ? generateComponentTrace(vm) : '';
        if (config.warnHandler) {
            config.warnHandler.call(null, msg, vm, trace);
        }
        else if (hasConsole_1 && !config.silent) {
            console.error("[Vue warn]: ".concat(msg).concat(trace));
        }
    };
    tip = function (msg, vm) {
        if (hasConsole_1 && !config.silent) {
            console.warn("[Vue tip]: ".concat(msg) + (vm ? generateComponentTrace(vm) : ''));
        }
    };
    formatComponentName = function (vm, includeFile) {
        if (vm.$root === vm) {
            return '<Root>';
        }
        var options = isFunction(vm) && vm.cid != null
            ? vm.options
            : vm._isVue
                ? vm.$options || vm.constructor.options
                : vm;
        var name = getComponentName(options);
        var file = options.__file;
        if (!name && file) {
            var match = file.match(/([^/\\]+)\.vue$/);
            name = match && match[1];
        }
        return ((name ? "<".concat(classify_1(name), ">") : "<Anonymous>") +
            (file && includeFile !== false ? " at ".concat(file) : ''));
    };
    var repeat_1 = function (str, n) {
        var res = '';
        while (n) {
            if (n % 2 === 1)
                res += str;
            if (n > 1)
                str += str;
            n >>= 1;
        }
        return res;
    };
    generateComponentTrace = function (vm) {
        if (vm._isVue && vm.$parent) {
            var tree = [];
            var currentRecursiveSequence = 0;
            while (vm) {
                if (tree.length > 0) {
                    var last = tree[tree.length - 1];
                    if (last.constructor === vm.constructor) {
                        currentRecursiveSequence++;
                        vm = vm.$parent;
                        continue;
                    }
                    else if (currentRecursiveSequence > 0) {
                        tree[tree.length - 1] = [last, currentRecursiveSequence];
                        currentRecursiveSequence = 0;
                    }
                }
                tree.push(vm);
                vm = vm.$parent;
            }
            return ('\n\nfound in\n\n' +
                tree
                    .map(function (vm, i) {
                    return "".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)
                        ? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)")
                        : formatComponentName(vm));
                })
                    .join('\n'));
        }
        else {
            return "\n\n(found in ".concat(formatComponentName(vm), ")");
        }
    };
}

/**
 * Option overwriting strategies are functions that handle
 * how to merge a parent option value and a child option
 * value into the final value.
 */
var strats = config.optionMergeStrategies;
/**
 * Options with restrictions
 */
if (false) {
    strats.el = strats.propsData = function (parent, child, vm, key) {
        if (!vm) {
            warn("option \"".concat(key, "\" can only be used during instance ") +
                'creation with the `new` keyword.');
        }
        return defaultStrat(parent, child);
    };
}
/**
 * Helper that recursively merges two data objects together.
 */
function mergeData(to, from, recursive) {
    if (recursive === void 0) { recursive = true; }
    if (!from)
        return to;
    var key, toVal, fromVal;
    var keys = hasSymbol
        ? Reflect.ownKeys(from)
        : Object.keys(from);
    for (var i = 0; i < keys.length; i++) {
        key = keys[i];
        // in case the object is already observed...
        if (key === '__ob__')
            continue;
        toVal = to[key];
        fromVal = from[key];
        if (!recursive || !hasOwn(to, key)) {
            set(to, key, fromVal);
        }
        else if (toVal !== fromVal &&
            isPlainObject(toVal) &&
            isPlainObject(fromVal)) {
            mergeData(toVal, fromVal);
        }
    }
    return to;
}
/**
 * Data
 */
function mergeDataOrFn(parentVal, childVal, vm) {
    if (!vm) {
        // in a Vue.extend merge, both should be functions
        if (!childVal) {
            return parentVal;
        }
        if (!parentVal) {
            return childVal;
        }
        // when parentVal & childVal are both present,
        // we need to return a function that returns the
        // merged result of both functions... no need to
        // check if parentVal is a function here because
        // it has to be a function to pass previous merges.
        return function mergedDataFn() {
            return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);
        };
    }
    else {
        return function mergedInstanceDataFn() {
            // instance merge
            var instanceData = isFunction(childVal)
                ? childVal.call(vm, vm)
                : childVal;
            var defaultData = isFunction(parentVal)
                ? parentVal.call(vm, vm)
                : parentVal;
            if (instanceData) {
                return mergeData(instanceData, defaultData);
            }
            else {
                return defaultData;
            }
        };
    }
}
strats.data = function (parentVal, childVal, vm) {
    if (!vm) {
        if (childVal && typeof childVal !== 'function') {
            "production" !== 'production' &&
                warn('The "data" option should be a function ' +
                    'that returns a per-instance value in component ' +
                    'definitions.', vm);
            return parentVal;
        }
        return mergeDataOrFn(parentVal, childVal);
    }
    return mergeDataOrFn(parentVal, childVal, vm);
};
/**
 * Hooks and props are merged as arrays.
 */
function mergeLifecycleHook(parentVal, childVal) {
    var res = childVal
        ? parentVal
            ? parentVal.concat(childVal)
            : isArray(childVal)
                ? childVal
                : [childVal]
        : parentVal;
    return res ? dedupeHooks(res) : res;
}
function dedupeHooks(hooks) {
    var res = [];
    for (var i = 0; i < hooks.length; i++) {
        if (res.indexOf(hooks[i]) === -1) {
            res.push(hooks[i]);
        }
    }
    return res;
}
LIFECYCLE_HOOKS.forEach(function (hook) {
    strats[hook] = mergeLifecycleHook;
});
/**
 * Assets
 *
 * When a vm is present (instance creation), we need to do
 * a three-way merge between constructor options, instance
 * options and parent options.
 */
function mergeAssets(parentVal, childVal, vm, key) {
    var res = Object.create(parentVal || null);
    if (childVal) {
        "production" !== 'production' && assertObjectType(key, childVal, vm);
        return extend(res, childVal);
    }
    else {
        return res;
    }
}
ASSET_TYPES.forEach(function (type) {
    strats[type + 's'] = mergeAssets;
});
/**
 * Watchers.
 *
 * Watchers hashes should not overwrite one
 * another, so we merge them as arrays.
 */
strats.watch = function (parentVal, childVal, vm, key) {
    // work around Firefox's Object.prototype.watch...
    //@ts-expect-error work around
    if (parentVal === nativeWatch)
        parentVal = undefined;
    //@ts-expect-error work around
    if (childVal === nativeWatch)
        childVal = undefined;
    /* istanbul ignore if */
    if (!childVal)
        return Object.create(parentVal || null);
    if (false) {
        assertObjectType(key, childVal, vm);
    }
    if (!parentVal)
        return childVal;
    var ret = {};
    extend(ret, parentVal);
    for (var key_1 in childVal) {
        var parent_1 = ret[key_1];
        var child = childVal[key_1];
        if (parent_1 && !isArray(parent_1)) {
            parent_1 = [parent_1];
        }
        ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];
    }
    return ret;
};
/**
 * Other object hashes.
 */
strats.props =
    strats.methods =
        strats.inject =
            strats.computed =
                function (parentVal, childVal, vm, key) {
                    if (childVal && "production" !== 'production') {
                        assertObjectType(key, childVal, vm);
                    }
                    if (!parentVal)
                        return childVal;
                    var ret = Object.create(null);
                    extend(ret, parentVal);
                    if (childVal)
                        extend(ret, childVal);
                    return ret;
                };
strats.provide = function (parentVal, childVal) {
    if (!parentVal)
        return childVal;
    return function () {
        var ret = Object.create(null);
        mergeData(ret, isFunction(parentVal) ? parentVal.call(this) : parentVal);
        if (childVal) {
            mergeData(ret, isFunction(childVal) ? childVal.call(this) : childVal, false // non-recursive
            );
        }
        return ret;
    };
};
/**
 * Default strategy.
 */
var defaultStrat = function (parentVal, childVal) {
    return childVal === undefined ? parentVal : childVal;
};
/**
 * Validate component names
 */
function checkComponents(options) {
    for (var key in options.components) {
        validateComponentName(key);
    }
}
function validateComponentName(name) {
    if (!new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(unicodeRegExp.source, "]*$")).test(name)) {
        warn('Invalid component name: "' +
            name +
            '". Component names ' +
            'should conform to valid custom element name in html5 specification.');
    }
    if (isBuiltInTag(name) || config.isReservedTag(name)) {
        warn('Do not use built-in or reserved HTML elements as component ' +
            'id: ' +
            name);
    }
}
/**
 * Ensure all props option syntax are normalized into the
 * Object-based format.
 */
function normalizeProps(options, vm) {
    var props = options.props;
    if (!props)
        return;
    var res = {};
    var i, val, name;
    if (isArray(props)) {
        i = props.length;
        while (i--) {
            val = props[i];
            if (typeof val === 'string') {
                name = camelize(val);
                res[name] = { type: null };
            }
            else if (false) {
                warn('props must be strings when using array syntax.');
            }
        }
    }
    else if (isPlainObject(props)) {
        for (var key in props) {
            val = props[key];
            name = camelize(key);
            res[name] = isPlainObject(val) ? val : { type: val };
        }
    }
    else if (false) {
        warn("Invalid value for option \"props\": expected an Array or an Object, " +
            "but got ".concat(toRawType(props), "."), vm);
    }
    options.props = res;
}
/**
 * Normalize all injections into Object-based format
 */
function normalizeInject(options, vm) {
    var inject = options.inject;
    if (!inject)
        return;
    var normalized = (options.inject = {});
    if (isArray(inject)) {
        for (var i = 0; i < inject.length; i++) {
            normalized[inject[i]] = { from: inject[i] };
        }
    }
    else if (isPlainObject(inject)) {
        for (var key in inject) {
            var val = inject[key];
            normalized[key] = isPlainObject(val)
                ? extend({ from: key }, val)
                : { from: val };
        }
    }
    else if (false) {
        warn("Invalid value for option \"inject\": expected an Array or an Object, " +
            "but got ".concat(toRawType(inject), "."), vm);
    }
}
/**
 * Normalize raw function directives into object format.
 */
function normalizeDirectives$1(options) {
    var dirs = options.directives;
    if (dirs) {
        for (var key in dirs) {
            var def = dirs[key];
            if (isFunction(def)) {
                dirs[key] = { bind: def, update: def };
            }
        }
    }
}
function assertObjectType(name, value, vm) {
    if (!isPlainObject(value)) {
        warn("Invalid value for option \"".concat(name, "\": expected an Object, ") +
            "but got ".concat(toRawType(value), "."), vm);
    }
}
/**
 * Merge two option objects into a new one.
 * Core utility used in both instantiation and inheritance.
 */
function mergeOptions(parent, child, vm) {
    if (false) {
        checkComponents(child);
    }
    if (isFunction(child)) {
        // @ts-expect-error
        child = child.options;
    }
    normalizeProps(child, vm);
    normalizeInject(child, vm);
    normalizeDirectives$1(child);
    // Apply extends and mixins on the child options,
    // but only if it is a raw options object that isn't
    // the result of another mergeOptions call.
    // Only merged options has the _base property.
    if (!child._base) {
        if (child.extends) {
            parent = mergeOptions(parent, child.extends, vm);
        }
        if (child.mixins) {
            for (var i = 0, l = child.mixins.length; i < l; i++) {
                parent = mergeOptions(parent, child.mixins[i], vm);
            }
        }
    }
    var options = {};
    var key;
    for (key in parent) {
        mergeField(key);
    }
    for (key in child) {
        if (!hasOwn(parent, key)) {
            mergeField(key);
        }
    }
    function mergeField(key) {
        var strat = strats[key] || defaultStrat;
        options[key] = strat(parent[key], child[key], vm, key);
    }
    return options;
}
/**
 * Resolve an asset.
 * This function is used because child instances need access
 * to assets defined in its ancestor chain.
 */
function resolveAsset(options, type, id, warnMissing) {
    /* istanbul ignore if */
    if (typeof id !== 'string') {
        return;
    }
    var assets = options[type];
    // check local registration variations first
    if (hasOwn(assets, id))
        return assets[id];
    var camelizedId = camelize(id);
    if (hasOwn(assets, camelizedId))
        return assets[camelizedId];
    var PascalCaseId = capitalize(camelizedId);
    if (hasOwn(assets, PascalCaseId))
        return assets[PascalCaseId];
    // fallback to prototype chain
    var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
    if (false) {
        warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id);
    }
    return res;
}

function validateProp(key, propOptions, propsData, vm) {
    var prop = propOptions[key];
    var absent = !hasOwn(propsData, key);
    var value = propsData[key];
    // boolean casting
    var booleanIndex = getTypeIndex(Boolean, prop.type);
    if (booleanIndex > -1) {
        if (absent && !hasOwn(prop, 'default')) {
            value = false;
        }
        else if (value === '' || value === hyphenate(key)) {
            // only cast empty string / same name to boolean if
            // boolean has higher priority
            var stringIndex = getTypeIndex(String, prop.type);
            if (stringIndex < 0 || booleanIndex < stringIndex) {
                value = true;
            }
        }
    }
    // check default value
    if (value === undefined) {
        value = getPropDefaultValue(vm, prop, key);
        // since the default value is a fresh copy,
        // make sure to observe it.
        var prevShouldObserve = shouldObserve;
        toggleObserving(true);
        observe(value);
        toggleObserving(prevShouldObserve);
    }
    if (false) {
        assertProp(prop, key, value, vm, absent);
    }
    return value;
}
/**
 * Get the default value of a prop.
 */
function getPropDefaultValue(vm, prop, key) {
    // no default, return undefined
    if (!hasOwn(prop, 'default')) {
        return undefined;
    }
    var def = prop.default;
    // warn against non-factory defaults for Object & Array
    if (false) {
        warn('Invalid default value for prop "' +
            key +
            '": ' +
            'Props with type Object/Array must use a factory function ' +
            'to return the default value.', vm);
    }
    // the raw prop value was also undefined from previous render,
    // return previous default value to avoid unnecessary watcher trigger
    if (vm &&
        vm.$options.propsData &&
        vm.$options.propsData[key] === undefined &&
        vm._props[key] !== undefined) {
        return vm._props[key];
    }
    // call factory function for non-Function types
    // a value is Function if its prototype is function even across different execution context
    return isFunction(def) && getType(prop.type) !== 'Function'
        ? def.call(vm)
        : def;
}
/**
 * Assert whether a prop is valid.
 */
function assertProp(prop, name, value, vm, absent) {
    if (prop.required && absent) {
        warn('Missing required prop: "' + name + '"', vm);
        return;
    }
    if (value == null && !prop.required) {
        return;
    }
    var type = prop.type;
    var valid = !type || type === true;
    var expectedTypes = [];
    if (type) {
        if (!isArray(type)) {
            type = [type];
        }
        for (var i = 0; i < type.length && !valid; i++) {
            var assertedType = assertType(value, type[i], vm);
            expectedTypes.push(assertedType.expectedType || '');
            valid = assertedType.valid;
        }
    }
    var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
    if (!valid && haveExpectedTypes) {
        warn(getInvalidTypeMessage(name, value, expectedTypes), vm);
        return;
    }
    var validator = prop.validator;
    if (validator) {
        if (!validator(value)) {
            warn('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
        }
    }
}
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
function assertType(value, type, vm) {
    var valid;
    var expectedType = getType(type);
    if (simpleCheckRE.test(expectedType)) {
        var t = typeof value;
        valid = t === expectedType.toLowerCase();
        // for primitive wrapper objects
        if (!valid && t === 'object') {
            valid = value instanceof type;
        }
    }
    else if (expectedType === 'Object') {
        valid = isPlainObject(value);
    }
    else if (expectedType === 'Array') {
        valid = isArray(value);
    }
    else {
        try {
            valid = value instanceof type;
        }
        catch (e) {
            warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
            valid = false;
        }
    }
    return {
        valid: valid,
        expectedType: expectedType
    };
}
var functionTypeCheckRE = /^\s*function (\w+)/;
/**
 * Use function string name to check built-in types,
 * because a simple equality check will fail when running
 * across different vms / iframes.
 */
function getType(fn) {
    var match = fn && fn.toString().match(functionTypeCheckRE);
    return match ? match[1] : '';
}
function isSameType(a, b) {
    return getType(a) === getType(b);
}
function getTypeIndex(type, expectedTypes) {
    if (!isArray(expectedTypes)) {
        return isSameType(expectedTypes, type) ? 0 : -1;
    }
    for (var i = 0, len = expectedTypes.length; i < len; i++) {
        if (isSameType(expectedTypes[i], type)) {
            return i;
        }
    }
    return -1;
}
function getInvalidTypeMessage(name, value, expectedTypes) {
    var message = "Invalid prop: type check failed for prop \"".concat(name, "\".") +
        " Expected ".concat(expectedTypes.map(capitalize).join(', '));
    var expectedType = expectedTypes[0];
    var receivedType = toRawType(value);
    // check if we need to specify expected value
    if (expectedTypes.length === 1 &&
        isExplicable(expectedType) &&
        isExplicable(typeof value) &&
        !isBoolean(expectedType, receivedType)) {
        message += " with value ".concat(styleValue(value, expectedType));
    }
    message += ", got ".concat(receivedType, " ");
    // check if we need to specify received value
    if (isExplicable(receivedType)) {
        message += "with value ".concat(styleValue(value, receivedType), ".");
    }
    return message;
}
function styleValue(value, type) {
    if (type === 'String') {
        return "\"".concat(value, "\"");
    }
    else if (type === 'Number') {
        return "".concat(Number(value));
    }
    else {
        return "".concat(value);
    }
}
var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
function isExplicable(value) {
    return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });
}
function isBoolean() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });
}

/* not type checking this file because flow doesn't play well with Proxy */
var initProxy;
if (false) {
    var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +
        'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
        'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
        'require' // for Webpack/Browserify
    );
    var warnNonPresent_1 = function (target, key) {
        warn("Property or method \"".concat(key, "\" is not defined on the instance but ") +
            'referenced during render. Make sure that this property is reactive, ' +
            'either in the data option, or for class-based components, by ' +
            'initializing the property. ' +
            'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);
    };
    var warnReservedPrefix_1 = function (target, key) {
        warn("Property \"".concat(key, "\" must be accessed with \"$data.").concat(key, "\" because ") +
            'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
            'prevent conflicts with Vue internals. ' +
            'See: https://v2.vuejs.org/v2/api/#data', target);
    };
    var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);
    if (hasProxy_1) {
        var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
        config.keyCodes = new Proxy(config.keyCodes, {
            set: function (target, key, value) {
                if (isBuiltInModifier_1(key)) {
                    warn("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));
                    return false;
                }
                else {
                    target[key] = value;
                    return true;
                }
            }
        });
    }
    var hasHandler_1 = {
        has: function (target, key) {
            var has = key in target;
            var isAllowed = allowedGlobals_1(key) ||
                (typeof key === 'string' &&
                    key.charAt(0) === '_' &&
                    !(key in target.$data));
            if (!has && !isAllowed) {
                if (key in target.$data)
                    warnReservedPrefix_1(target, key);
                else
                    warnNonPresent_1(target, key);
            }
            return has || !isAllowed;
        }
    };
    var getHandler_1 = {
        get: function (target, key) {
            if (typeof key === 'string' && !(key in target)) {
                if (key in target.$data)
                    warnReservedPrefix_1(target, key);
                else
                    warnNonPresent_1(target, key);
            }
            return target[key];
        }
    };
    initProxy = function initProxy(vm) {
        if (hasProxy_1) {
            // determine which proxy handler to use
            var options = vm.$options;
            var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;
            vm._renderProxy = new Proxy(vm, handlers);
        }
        else {
            vm._renderProxy = vm;
        }
    };
}

var sharedPropertyDefinition = {
    enumerable: true,
    configurable: true,
    get: noop,
    set: noop
};
function proxy(target, sourceKey, key) {
    sharedPropertyDefinition.get = function proxyGetter() {
        return this[sourceKey][key];
    };
    sharedPropertyDefinition.set = function proxySetter(val) {
        this[sourceKey][key] = val;
    };
    Object.defineProperty(target, key, sharedPropertyDefinition);
}
function initState(vm) {
    var opts = vm.$options;
    if (opts.props)
        initProps$1(vm, opts.props);
    // Composition API
    initSetup(vm);
    if (opts.methods)
        initMethods(vm, opts.methods);
    if (opts.data) {
        initData(vm);
    }
    else {
        var ob = observe((vm._data = {}));
        ob && ob.vmCount++;
    }
    if (opts.computed)
        initComputed$1(vm, opts.computed);
    if (opts.watch && opts.watch !== nativeWatch) {
        initWatch(vm, opts.watch);
    }
}
function initProps$1(vm, propsOptions) {
    var propsData = vm.$options.propsData || {};
    var props = (vm._props = shallowReactive({}));
    // cache prop keys so that future props updates can iterate using Array
    // instead of dynamic object key enumeration.
    var keys = (vm.$options._propKeys = []);
    var isRoot = !vm.$parent;
    // root instance props should be converted
    if (!isRoot) {
        toggleObserving(false);
    }
    var _loop_1 = function (key) {
        keys.push(key);
        var value = validateProp(key, propsOptions, propsData, vm);
        /* istanbul ignore else */
        if (false) {
            var hyphenatedKey = hyphenate(key);
            if (isReservedAttribute(hyphenatedKey) ||
                config.isReservedAttr(hyphenatedKey)) {
                warn("\"".concat(hyphenatedKey, "\" is a reserved attribute and cannot be used as component prop."), vm);
            }
            defineReactive(props, key, value, function () {
                if (!isRoot && !isUpdatingChildComponent) {
                    warn("Avoid mutating a prop directly since the value will be " +
                        "overwritten whenever the parent component re-renders. " +
                        "Instead, use a data or computed property based on the prop's " +
                        "value. Prop being mutated: \"".concat(key, "\""), vm);
                }
            }, true /* shallow */);
        }
        else {
            defineReactive(props, key, value, undefined, true /* shallow */);
        }
        // static props are already proxied on the component's prototype
        // during Vue.extend(). We only need to proxy props defined at
        // instantiation here.
        if (!(key in vm)) {
            proxy(vm, "_props", key);
        }
    };
    for (var key in propsOptions) {
        _loop_1(key);
    }
    toggleObserving(true);
}
function initData(vm) {
    var data = vm.$options.data;
    data = vm._data = isFunction(data) ? getData(data, vm) : data || {};
    if (!isPlainObject(data)) {
        data = {};
        "production" !== 'production' &&
            warn('data functions should return an object:\n' +
                'https://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);
    }
    // proxy data on instance
    var keys = Object.keys(data);
    var props = vm.$options.props;
    var methods = vm.$options.methods;
    var i = keys.length;
    while (i--) {
        var key = keys[i];
        if (false) {
            if (methods && hasOwn(methods, key)) {
                warn("Method \"".concat(key, "\" has already been defined as a data property."), vm);
            }
        }
        if (props && hasOwn(props, key)) {
            "production" !== 'production' &&
                warn("The data property \"".concat(key, "\" is already declared as a prop. ") +
                    "Use prop default value instead.", vm);
        }
        else if (!isReserved(key)) {
            proxy(vm, "_data", key);
        }
    }
    // observe data
    var ob = observe(data);
    ob && ob.vmCount++;
}
function getData(data, vm) {
    // #7573 disable dep collection when invoking data getters
    pushTarget();
    try {
        return data.call(vm, vm);
    }
    catch (e) {
        handleError(e, vm, "data()");
        return {};
    }
    finally {
        popTarget();
    }
}
var computedWatcherOptions = { lazy: true };
function initComputed$1(vm, computed) {
    // $flow-disable-line
    var watchers = (vm._computedWatchers = Object.create(null));
    // computed properties are just getters during SSR
    var isSSR = isServerRendering();
    for (var key in computed) {
        var userDef = computed[key];
        var getter = isFunction(userDef) ? userDef : userDef.get;
        if (false) {
            warn("Getter is missing for computed property \"".concat(key, "\"."), vm);
        }
        if (!isSSR) {
            // create internal watcher for the computed property.
            watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);
        }
        // component-defined computed properties are already defined on the
        // component prototype. We only need to define computed properties defined
        // at instantiation here.
        if (!(key in vm)) {
            defineComputed(vm, key, userDef);
        }
        else if (false) {
            if (key in vm.$data) {
                warn("The computed property \"".concat(key, "\" is already defined in data."), vm);
            }
            else if (vm.$options.props && key in vm.$options.props) {
                warn("The computed property \"".concat(key, "\" is already defined as a prop."), vm);
            }
            else if (vm.$options.methods && key in vm.$options.methods) {
                warn("The computed property \"".concat(key, "\" is already defined as a method."), vm);
            }
        }
    }
}
function defineComputed(target, key, userDef) {
    var shouldCache = !isServerRendering();
    if (isFunction(userDef)) {
        sharedPropertyDefinition.get = shouldCache
            ? createComputedGetter(key)
            : createGetterInvoker(userDef);
        sharedPropertyDefinition.set = noop;
    }
    else {
        sharedPropertyDefinition.get = userDef.get
            ? shouldCache && userDef.cache !== false
                ? createComputedGetter(key)
                : createGetterInvoker(userDef.get)
            : noop;
        sharedPropertyDefinition.set = userDef.set || noop;
    }
    if (false) {
        sharedPropertyDefinition.set = function () {
            warn("Computed property \"".concat(key, "\" was assigned to but it has no setter."), this);
        };
    }
    Object.defineProperty(target, key, sharedPropertyDefinition);
}
function createComputedGetter(key) {
    return function computedGetter() {
        var watcher = this._computedWatchers && this._computedWatchers[key];
        if (watcher) {
            if (watcher.dirty) {
                watcher.evaluate();
            }
            if (Dep.target) {
                if (false) {
                    Dep.target.onTrack({
                        effect: Dep.target,
                        target: this,
                        type: "get" /* TrackOpTypes.GET */,
                        key: key
                    });
                }
                watcher.depend();
            }
            return watcher.value;
        }
    };
}
function createGetterInvoker(fn) {
    return function computedGetter() {
        return fn.call(this, this);
    };
}
function initMethods(vm, methods) {
    var props = vm.$options.props;
    for (var key in methods) {
        if (false) {
            if (typeof methods[key] !== 'function') {
                warn("Method \"".concat(key, "\" has type \"").concat(typeof methods[key], "\" in the component definition. ") +
                    "Did you reference the function correctly?", vm);
            }
            if (props && hasOwn(props, key)) {
                warn("Method \"".concat(key, "\" has already been defined as a prop."), vm);
            }
            if (key in vm && isReserved(key)) {
                warn("Method \"".concat(key, "\" conflicts with an existing Vue instance method. ") +
                    "Avoid defining component methods that start with _ or $.");
            }
        }
        vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
    }
}
function initWatch(vm, watch) {
    for (var key in watch) {
        var handler = watch[key];
        if (isArray(handler)) {
            for (var i = 0; i < handler.length; i++) {
                createWatcher(vm, key, handler[i]);
            }
        }
        else {
            createWatcher(vm, key, handler);
        }
    }
}
function createWatcher(vm, expOrFn, handler, options) {
    if (isPlainObject(handler)) {
        options = handler;
        handler = handler.handler;
    }
    if (typeof handler === 'string') {
        handler = vm[handler];
    }
    return vm.$watch(expOrFn, handler, options);
}
function stateMixin(Vue) {
    // flow somehow has problems with directly declared definition object
    // when using Object.defineProperty, so we have to procedurally build up
    // the object here.
    var dataDef = {};
    dataDef.get = function () {
        return this._data;
    };
    var propsDef = {};
    propsDef.get = function () {
        return this._props;
    };
    if (false) {
        dataDef.set = function () {
            warn('Avoid replacing instance root $data. ' +
                'Use nested data properties instead.', this);
        };
        propsDef.set = function () {
            warn("$props is readonly.", this);
        };
    }
    Object.defineProperty(Vue.prototype, '$data', dataDef);
    Object.defineProperty(Vue.prototype, '$props', propsDef);
    Vue.prototype.$set = set;
    Vue.prototype.$delete = del;
    Vue.prototype.$watch = function (expOrFn, cb, options) {
        var vm = this;
        if (isPlainObject(cb)) {
            return createWatcher(vm, expOrFn, cb, options);
        }
        options = options || {};
        options.user = true;
        var watcher = new Watcher(vm, expOrFn, cb, options);
        if (options.immediate) {
            var info = "callback for immediate watcher \"".concat(watcher.expression, "\"");
            pushTarget();
            invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
            popTarget();
        }
        return function unwatchFn() {
            watcher.teardown();
        };
    };
}

var uid = 0;
function initMixin$1(Vue) {
    Vue.prototype._init = function (options) {
        var vm = this;
        // a uid
        vm._uid = uid++;
        var startTag, endTag;
        /* istanbul ignore if */
        if (false) {
            startTag = "vue-perf-start:".concat(vm._uid);
            endTag = "vue-perf-end:".concat(vm._uid);
            mark(startTag);
        }
        // a flag to mark this as a Vue instance without having to do instanceof
        // check
        vm._isVue = true;
        // avoid instances from being observed
        vm.__v_skip = true;
        // effect scope
        vm._scope = new EffectScope(true /* detached */);
        // #13134 edge case where a child component is manually created during the
        // render of a parent component
        vm._scope.parent = undefined;
        vm._scope._vm = true;
        // merge options
        if (options && options._isComponent) {
            // optimize internal component instantiation
            // since dynamic options merging is pretty slow, and none of the
            // internal component options needs special treatment.
            initInternalComponent(vm, options);
        }
        else {
            vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);
        }
        /* istanbul ignore else */
        if (false) {
            initProxy(vm);
        }
        else {
            vm._renderProxy = vm;
        }
        // expose real self
        vm._self = vm;
        initLifecycle(vm);
        initEvents(vm);
        initRender(vm);
        callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);
        initInjections(vm); // resolve injections before data/props
        initState(vm);
        initProvide(vm); // resolve provide after data/props
        callHook$1(vm, 'created');
        /* istanbul ignore if */
        if (false) {
            vm._name = formatComponentName(vm, false);
            mark(endTag);
            measure("vue ".concat(vm._name, " init"), startTag, endTag);
        }
        if (vm.$options.el) {
            vm.$mount(vm.$options.el);
        }
    };
}
function initInternalComponent(vm, options) {
    var opts = (vm.$options = Object.create(vm.constructor.options));
    // doing this because it's faster than dynamic enumeration.
    var parentVnode = options._parentVnode;
    opts.parent = options.parent;
    opts._parentVnode = parentVnode;
    var vnodeComponentOptions = parentVnode.componentOptions;
    opts.propsData = vnodeComponentOptions.propsData;
    opts._parentListeners = vnodeComponentOptions.listeners;
    opts._renderChildren = vnodeComponentOptions.children;
    opts._componentTag = vnodeComponentOptions.tag;
    if (options.render) {
        opts.render = options.render;
        opts.staticRenderFns = options.staticRenderFns;
    }
}
function resolveConstructorOptions(Ctor) {
    var options = Ctor.options;
    if (Ctor.super) {
        var superOptions = resolveConstructorOptions(Ctor.super);
        var cachedSuperOptions = Ctor.superOptions;
        if (superOptions !== cachedSuperOptions) {
            // super option changed,
            // need to resolve new options.
            Ctor.superOptions = superOptions;
            // check if there are any late-modified/attached options (#4976)
            var modifiedOptions = resolveModifiedOptions(Ctor);
            // update base extend options
            if (modifiedOptions) {
                extend(Ctor.extendOptions, modifiedOptions);
            }
            options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
            if (options.name) {
                options.components[options.name] = Ctor;
            }
        }
    }
    return options;
}
function resolveModifiedOptions(Ctor) {
    var modified;
    var latest = Ctor.options;
    var sealed = Ctor.sealedOptions;
    for (var key in latest) {
        if (latest[key] !== sealed[key]) {
            if (!modified)
                modified = {};
            modified[key] = latest[key];
        }
    }
    return modified;
}

function Vue(options) {
    if (false) {
        warn('Vue is a constructor and should be called with the `new` keyword');
    }
    this._init(options);
}
//@ts-expect-error Vue has function type
initMixin$1(Vue);
//@ts-expect-error Vue has function type
stateMixin(Vue);
//@ts-expect-error Vue has function type
eventsMixin(Vue);
//@ts-expect-error Vue has function type
lifecycleMixin(Vue);
//@ts-expect-error Vue has function type
renderMixin(Vue);

function initUse(Vue) {
    Vue.use = function (plugin) {
        var installedPlugins = this._installedPlugins || (this._installedPlugins = []);
        if (installedPlugins.indexOf(plugin) > -1) {
            return this;
        }
        // additional parameters
        var args = toArray(arguments, 1);
        args.unshift(this);
        if (isFunction(plugin.install)) {
            plugin.install.apply(plugin, args);
        }
        else if (isFunction(plugin)) {
            plugin.apply(null, args);
        }
        installedPlugins.push(plugin);
        return this;
    };
}

function initMixin(Vue) {
    Vue.mixin = function (mixin) {
        this.options = mergeOptions(this.options, mixin);
        return this;
    };
}

function initExtend(Vue) {
    /**
     * Each instance constructor, including Vue, has a unique
     * cid. This enables us to create wrapped "child
     * constructors" for prototypal inheritance and cache them.
     */
    Vue.cid = 0;
    var cid = 1;
    /**
     * Class inheritance
     */
    Vue.extend = function (extendOptions) {
        extendOptions = extendOptions || {};
        var Super = this;
        var SuperId = Super.cid;
        var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
        if (cachedCtors[SuperId]) {
            return cachedCtors[SuperId];
        }
        var name = getComponentName(extendOptions) || getComponentName(Super.options);
        if (false) {
            validateComponentName(name);
        }
        var Sub = function VueComponent(options) {
            this._init(options);
        };
        Sub.prototype = Object.create(Super.prototype);
        Sub.prototype.constructor = Sub;
        Sub.cid = cid++;
        Sub.options = mergeOptions(Super.options, extendOptions);
        Sub['super'] = Super;
        // For props and computed properties, we define the proxy getters on
        // the Vue instances at extension time, on the extended prototype. This
        // avoids Object.defineProperty calls for each instance created.
        if (Sub.options.props) {
            initProps(Sub);
        }
        if (Sub.options.computed) {
            initComputed(Sub);
        }
        // allow further extension/mixin/plugin usage
        Sub.extend = Super.extend;
        Sub.mixin = Super.mixin;
        Sub.use = Super.use;
        // create asset registers, so extended classes
        // can have their private assets too.
        ASSET_TYPES.forEach(function (type) {
            Sub[type] = Super[type];
        });
        // enable recursive self-lookup
        if (name) {
            Sub.options.components[name] = Sub;
        }
        // keep a reference to the super options at extension time.
        // later at instantiation we can check if Super's options have
        // been updated.
        Sub.superOptions = Super.options;
        Sub.extendOptions = extendOptions;
        Sub.sealedOptions = extend({}, Sub.options);
        // cache constructor
        cachedCtors[SuperId] = Sub;
        return Sub;
    };
}
function initProps(Comp) {
    var props = Comp.options.props;
    for (var key in props) {
        proxy(Comp.prototype, "_props", key);
    }
}
function initComputed(Comp) {
    var computed = Comp.options.computed;
    for (var key in computed) {
        defineComputed(Comp.prototype, key, computed[key]);
    }
}

function initAssetRegisters(Vue) {
    /**
     * Create asset registration methods.
     */
    ASSET_TYPES.forEach(function (type) {
        // @ts-expect-error function is not exact same type
        Vue[type] = function (id, definition) {
            if (!definition) {
                return this.options[type + 's'][id];
            }
            else {
                /* istanbul ignore if */
                if (false) {
                    validateComponentName(id);
                }
                if (type === 'component' && isPlainObject(definition)) {
                    // @ts-expect-error
                    definition.name = definition.name || id;
                    definition = this.options._base.extend(definition);
                }
                if (type === 'directive' && isFunction(definition)) {
                    definition = { bind: definition, update: definition };
                }
                this.options[type + 's'][id] = definition;
                return definition;
            }
        };
    });
}

function _getComponentName(opts) {
    return opts && (getComponentName(opts.Ctor.options) || opts.tag);
}
function matches(pattern, name) {
    if (isArray(pattern)) {
        return pattern.indexOf(name) > -1;
    }
    else if (typeof pattern === 'string') {
        return pattern.split(',').indexOf(name) > -1;
    }
    else if (isRegExp(pattern)) {
        return pattern.test(name);
    }
    /* istanbul ignore next */
    return false;
}
function pruneCache(keepAliveInstance, filter) {
    var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode, $vnode = keepAliveInstance.$vnode;
    for (var key in cache) {
        var entry = cache[key];
        if (entry) {
            var name_1 = entry.name;
            if (name_1 && !filter(name_1)) {
                pruneCacheEntry(cache, key, keys, _vnode);
            }
        }
    }
    $vnode.componentOptions.children = undefined;
}
function pruneCacheEntry(cache, key, keys, current) {
    var entry = cache[key];
    if (entry && (!current || entry.tag !== current.tag)) {
        // @ts-expect-error can be undefined
        entry.componentInstance.$destroy();
    }
    cache[key] = null;
    remove$2(keys, key);
}
var patternTypes = [String, RegExp, Array];
// TODO defineComponent
var KeepAlive = {
    name: 'keep-alive',
    abstract: true,
    props: {
        include: patternTypes,
        exclude: patternTypes,
        max: [String, Number]
    },
    methods: {
        cacheVNode: function () {
            var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;
            if (vnodeToCache) {
                var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;
                cache[keyToCache] = {
                    name: _getComponentName(componentOptions),
                    tag: tag,
                    componentInstance: componentInstance
                };
                keys.push(keyToCache);
                // prune oldest entry
                if (this.max && keys.length > parseInt(this.max)) {
                    pruneCacheEntry(cache, keys[0], keys, this._vnode);
                }
                this.vnodeToCache = null;
            }
        }
    },
    created: function () {
        this.cache = Object.create(null);
        this.keys = [];
    },
    destroyed: function () {
        for (var key in this.cache) {
            pruneCacheEntry(this.cache, key, this.keys);
        }
    },
    mounted: function () {
        var _this = this;
        this.cacheVNode();
        this.$watch('include', function (val) {
            pruneCache(_this, function (name) { return matches(val, name); });
        });
        this.$watch('exclude', function (val) {
            pruneCache(_this, function (name) { return !matches(val, name); });
        });
    },
    updated: function () {
        this.cacheVNode();
    },
    render: function () {
        var slot = this.$slots.default;
        var vnode = getFirstComponentChild(slot);
        var componentOptions = vnode && vnode.componentOptions;
        if (componentOptions) {
            // check pattern
            var name_2 = _getComponentName(componentOptions);
            var _a = this, include = _a.include, exclude = _a.exclude;
            if (
            // not included
            (include && (!name_2 || !matches(include, name_2))) ||
                // excluded
                (exclude && name_2 && matches(exclude, name_2))) {
                return vnode;
            }
            var _b = this, cache = _b.cache, keys = _b.keys;
            var key = vnode.key == null
                ? // same constructor may get registered as different local components
                    // so cid alone is not enough (#3269)
                    componentOptions.Ctor.cid +
                        (componentOptions.tag ? "::".concat(componentOptions.tag) : '')
                : vnode.key;
            if (cache[key]) {
                vnode.componentInstance = cache[key].componentInstance;
                // make current key freshest
                remove$2(keys, key);
                keys.push(key);
            }
            else {
                // delay setting the cache until update
                this.vnodeToCache = vnode;
                this.keyToCache = key;
            }
            // @ts-expect-error can vnode.data can be undefined
            vnode.data.keepAlive = true;
        }
        return vnode || (slot && slot[0]);
    }
};

var builtInComponents = {
    KeepAlive: KeepAlive
};

function initGlobalAPI(Vue) {
    // config
    var configDef = {};
    configDef.get = function () { return config; };
    if (false) {
        configDef.set = function () {
            warn('Do not replace the Vue.config object, set individual fields instead.');
        };
    }
    Object.defineProperty(Vue, 'config', configDef);
    // exposed util methods.
    // NOTE: these are not considered part of the public API - avoid relying on
    // them unless you are aware of the risk.
    Vue.util = {
        warn: warn,
        extend: extend,
        mergeOptions: mergeOptions,
        defineReactive: defineReactive
    };
    Vue.set = set;
    Vue.delete = del;
    Vue.nextTick = nextTick;
    // 2.6 explicit observable API
    Vue.observable = function (obj) {
        observe(obj);
        return obj;
    };
    Vue.options = Object.create(null);
    ASSET_TYPES.forEach(function (type) {
        Vue.options[type + 's'] = Object.create(null);
    });
    // this is used to identify the "base" constructor to extend all plain-object
    // components with in Weex's multi-instance scenarios.
    Vue.options._base = Vue;
    extend(Vue.options.components, builtInComponents);
    initUse(Vue);
    initMixin(Vue);
    initExtend(Vue);
    initAssetRegisters(Vue);
}

initGlobalAPI(Vue);
Object.defineProperty(Vue.prototype, '$isServer', {
    get: isServerRendering
});
Object.defineProperty(Vue.prototype, '$ssrContext', {
    get: function () {
        /* istanbul ignore next */
        return this.$vnode && this.$vnode.ssrContext;
    }
});
// expose FunctionalRenderContext for ssr runtime helper installation
Object.defineProperty(Vue, 'FunctionalRenderContext', {
    value: FunctionalRenderContext
});
Vue.version = version;

// these are reserved for web because they are directly compiled away
// during template compilation
var isReservedAttr = makeMap('style,class');
// attributes that should be using props for binding
var acceptValue = makeMap('input,textarea,option,select,progress');
var mustUseProp = function (tag, type, attr) {
    return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
        (attr === 'selected' && tag === 'option') ||
        (attr === 'checked' && tag === 'input') ||
        (attr === 'muted' && tag === 'video'));
};
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
var convertEnumeratedValue = function (key, value) {
    return isFalsyAttrValue(value) || value === 'false'
        ? 'false'
        : // allow arbitrary string value for contenteditable
            key === 'contenteditable' && isValidContentEditableValue(value)
                ? value
                : 'true';
};
var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
    'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
    'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
    'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
    'required,reversed,scoped,seamless,selected,sortable,' +
    'truespeed,typemustmatch,visible');
var xlinkNS = 'http://www.w3.org/1999/xlink';
var isXlink = function (name) {
    return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';
};
var getXlinkProp = function (name) {
    return isXlink(name) ? name.slice(6, name.length) : '';
};
var isFalsyAttrValue = function (val) {
    return val == null || val === false;
};

function genClassForVnode(vnode) {
    var data = vnode.data;
    var parentNode = vnode;
    var childNode = vnode;
    while (isDef(childNode.componentInstance)) {
        childNode = childNode.componentInstance._vnode;
        if (childNode && childNode.data) {
            data = mergeClassData(childNode.data, data);
        }
    }
    // @ts-expect-error parentNode.parent not VNodeWithData
    while (isDef((parentNode = parentNode.parent))) {
        if (parentNode && parentNode.data) {
            data = mergeClassData(data, parentNode.data);
        }
    }
    return renderClass(data.staticClass, data.class);
}
function mergeClassData(child, parent) {
    return {
        staticClass: concat(child.staticClass, parent.staticClass),
        class: isDef(child.class) ? [child.class, parent.class] : parent.class
    };
}
function renderClass(staticClass, dynamicClass) {
    if (isDef(staticClass) || isDef(dynamicClass)) {
        return concat(staticClass, stringifyClass(dynamicClass));
    }
    /* istanbul ignore next */
    return '';
}
function concat(a, b) {
    return a ? (b ? a + ' ' + b : a) : b || '';
}
function stringifyClass(value) {
    if (Array.isArray(value)) {
        return stringifyArray(value);
    }
    if (isObject(value)) {
        return stringifyObject(value);
    }
    if (typeof value === 'string') {
        return value;
    }
    /* istanbul ignore next */
    return '';
}
function stringifyArray(value) {
    var res = '';
    var stringified;
    for (var i = 0, l = value.length; i < l; i++) {
        if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {
            if (res)
                res += ' ';
            res += stringified;
        }
    }
    return res;
}
function stringifyObject(value) {
    var res = '';
    for (var key in value) {
        if (value[key]) {
            if (res)
                res += ' ';
            res += key;
        }
    }
    return res;
}

var namespaceMap = {
    svg: 'http://www.w3.org/2000/svg',
    math: 'http://www.w3.org/1998/Math/MathML'
};
var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +
    'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
    'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
    'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
    's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
    'embed,object,param,source,canvas,script,noscript,del,ins,' +
    'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
    'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
    'output,progress,select,textarea,' +
    'details,dialog,menu,menuitem,summary,' +
    'content,element,shadow,template,blockquote,iframe,tfoot');
// this map is intentionally selective, only covering SVG elements that may
// contain child elements.
var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
    'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
    'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);
var isReservedTag = function (tag) {
    return isHTMLTag(tag) || isSVG(tag);
};
function getTagNamespace(tag) {
    if (isSVG(tag)) {
        return 'svg';
    }
    // basic support for MathML
    // note it doesn't support other MathML elements being component roots
    if (tag === 'math') {
        return 'math';
    }
}
var unknownElementCache = Object.create(null);
function isUnknownElement(tag) {
    /* istanbul ignore if */
    if (!inBrowser) {
        return true;
    }
    if (isReservedTag(tag)) {
        return false;
    }
    tag = tag.toLowerCase();
    /* istanbul ignore if */
    if (unknownElementCache[tag] != null) {
        return unknownElementCache[tag];
    }
    var el = document.createElement(tag);
    if (tag.indexOf('-') > -1) {
        // https://stackoverflow.com/a/28210364/1070244
        return (unknownElementCache[tag] =
            el.constructor === window.HTMLUnknownElement ||
                el.constructor === window.HTMLElement);
    }
    else {
        return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));
    }
}
var isTextInputType = makeMap('text,number,password,search,email,tel,url');

/**
 * Query an element selector if it's not an element already.
 */
function query(el) {
    if (typeof el === 'string') {
        var selected = document.querySelector(el);
        if (!selected) {
            "production" !== 'production' && warn('Cannot find element: ' + el);
            return document.createElement('div');
        }
        return selected;
    }
    else {
        return el;
    }
}

function createElement(tagName, vnode) {
    var elm = document.createElement(tagName);
    if (tagName !== 'select') {
        return elm;
    }
    // false or null will remove the attribute but undefined will not
    if (vnode.data &&
        vnode.data.attrs &&
        vnode.data.attrs.multiple !== undefined) {
        elm.setAttribute('multiple', 'multiple');
    }
    return elm;
}
function createElementNS(namespace, tagName) {
    return document.createElementNS(namespaceMap[namespace], tagName);
}
function createTextNode(text) {
    return document.createTextNode(text);
}
function createComment(text) {
    return document.createComment(text);
}
function insertBefore(parentNode, newNode, referenceNode) {
    parentNode.insertBefore(newNode, referenceNode);
}
function removeChild(node, child) {
    node.removeChild(child);
}
function appendChild(node, child) {
    node.appendChild(child);
}
function parentNode(node) {
    return node.parentNode;
}
function nextSibling(node) {
    return node.nextSibling;
}
function tagName(node) {
    return node.tagName;
}
function setTextContent(node, text) {
    node.textContent = text;
}
function setStyleScope(node, scopeId) {
    node.setAttribute(scopeId, '');
}

var nodeOps = /*#__PURE__*/Object.freeze({
  __proto__: null,
  createElement: createElement,
  createElementNS: createElementNS,
  createTextNode: createTextNode,
  createComment: createComment,
  insertBefore: insertBefore,
  removeChild: removeChild,
  appendChild: appendChild,
  parentNode: parentNode,
  nextSibling: nextSibling,
  tagName: tagName,
  setTextContent: setTextContent,
  setStyleScope: setStyleScope
});

var ref = {
    create: function (_, vnode) {
        registerRef(vnode);
    },
    update: function (oldVnode, vnode) {
        if (oldVnode.data.ref !== vnode.data.ref) {
            registerRef(oldVnode, true);
            registerRef(vnode);
        }
    },
    destroy: function (vnode) {
        registerRef(vnode, true);
    }
};
function registerRef(vnode, isRemoval) {
    var ref = vnode.data.ref;
    if (!isDef(ref))
        return;
    var vm = vnode.context;
    var refValue = vnode.componentInstance || vnode.elm;
    var value = isRemoval ? null : refValue;
    var $refsValue = isRemoval ? undefined : refValue;
    if (isFunction(ref)) {
        invokeWithErrorHandling(ref, vm, [value], vm, "template ref function");
        return;
    }
    var isFor = vnode.data.refInFor;
    var _isString = typeof ref === 'string' || typeof ref === 'number';
    var _isRef = isRef(ref);
    var refs = vm.$refs;
    if (_isString || _isRef) {
        if (isFor) {
            var existing = _isString ? refs[ref] : ref.value;
            if (isRemoval) {
                isArray(existing) && remove$2(existing, refValue);
            }
            else {
                if (!isArray(existing)) {
                    if (_isString) {
                        refs[ref] = [refValue];
                        setSetupRef(vm, ref, refs[ref]);
                    }
                    else {
                        ref.value = [refValue];
                    }
                }
                else if (!existing.includes(refValue)) {
                    existing.push(refValue);
                }
            }
        }
        else if (_isString) {
            if (isRemoval && refs[ref] !== refValue) {
                return;
            }
            refs[ref] = $refsValue;
            setSetupRef(vm, ref, value);
        }
        else if (_isRef) {
            if (isRemoval && ref.value !== refValue) {
                return;
            }
            ref.value = value;
        }
        else if (false) {
            warn("Invalid template ref type: ".concat(typeof ref));
        }
    }
}
function setSetupRef(_a, key, val) {
    var _setupState = _a._setupState;
    if (_setupState && hasOwn(_setupState, key)) {
        if (isRef(_setupState[key])) {
            _setupState[key].value = val;
        }
        else {
            _setupState[key] = val;
        }
    }
}

/**
 * Virtual DOM patching algorithm based on Snabbdom by
 * Simon Friis Vindum (@paldepind)
 * Licensed under the MIT License
 * https://github.com/paldepind/snabbdom/blob/master/LICENSE
 *
 * modified by Evan You (@yyx990803)
 *
 * Not type-checking this because this file is perf-critical and the cost
 * of making flow understand it is not worth it.
 */
var emptyNode = new VNode('', {}, []);
var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
function sameVnode(a, b) {
    return (a.key === b.key &&
        a.asyncFactory === b.asyncFactory &&
        ((a.tag === b.tag &&
            a.isComment === b.isComment &&
            isDef(a.data) === isDef(b.data) &&
            sameInputType(a, b)) ||
            (isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));
}
function sameInputType(a, b) {
    if (a.tag !== 'input')
        return true;
    var i;
    var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;
    var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;
    return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));
}
function createKeyToOldIdx(children, beginIdx, endIdx) {
    var i, key;
    var map = {};
    for (i = beginIdx; i <= endIdx; ++i) {
        key = children[i].key;
        if (isDef(key))
            map[key] = i;
    }
    return map;
}
function createPatchFunction(backend) {
    var i, j;
    var cbs = {};
    var modules = backend.modules, nodeOps = backend.nodeOps;
    for (i = 0; i < hooks.length; ++i) {
        cbs[hooks[i]] = [];
        for (j = 0; j < modules.length; ++j) {
            if (isDef(modules[j][hooks[i]])) {
                cbs[hooks[i]].push(modules[j][hooks[i]]);
            }
        }
    }
    function emptyNodeAt(elm) {
        return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);
    }
    function createRmCb(childElm, listeners) {
        function remove() {
            if (--remove.listeners === 0) {
                removeNode(childElm);
            }
        }
        remove.listeners = listeners;
        return remove;
    }
    function removeNode(el) {
        var parent = nodeOps.parentNode(el);
        // element may have already been removed due to v-html / v-text
        if (isDef(parent)) {
            nodeOps.removeChild(parent, el);
        }
    }
    function isUnknownElement(vnode, inVPre) {
        return (!inVPre &&
            !vnode.ns &&
            !(config.ignoredElements.length &&
                config.ignoredElements.some(function (ignore) {
                    return isRegExp(ignore)
                        ? ignore.test(vnode.tag)
                        : ignore === vnode.tag;
                })) &&
            config.isUnknownElement(vnode.tag));
    }
    var creatingElmInVPre = 0;
    function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {
        if (isDef(vnode.elm) && isDef(ownerArray)) {
            // This vnode was used in a previous render!
            // now it's used as a new node, overwriting its elm would cause
            // potential patch errors down the road when it's used as an insertion
            // reference node. Instead, we clone the node on-demand before creating
            // associated DOM element for it.
            vnode = ownerArray[index] = cloneVNode(vnode);
        }
        vnode.isRootInsert = !nested; // for transition enter check
        if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
            return;
        }
        var data = vnode.data;
        var children = vnode.children;
        var tag = vnode.tag;
        if (isDef(tag)) {
            if (false) {
                if (data && data.pre) {
                    creatingElmInVPre++;
                }
                if (isUnknownElement(vnode, creatingElmInVPre)) {
                    warn('Unknown custom element: <' +
                        tag +
                        '> - did you ' +
                        'register the component correctly? For recursive components, ' +
                        'make sure to provide the "name" option.', vnode.context);
                }
            }
            vnode.elm = vnode.ns
                ? nodeOps.createElementNS(vnode.ns, tag)
                : nodeOps.createElement(tag, vnode);
            setScope(vnode);
            createChildren(vnode, children, insertedVnodeQueue);
            if (isDef(data)) {
                invokeCreateHooks(vnode, insertedVnodeQueue);
            }
            insert(parentElm, vnode.elm, refElm);
            if (false) {
                creatingElmInVPre--;
            }
        }
        else if (isTrue(vnode.isComment)) {
            vnode.elm = nodeOps.createComment(vnode.text);
            insert(parentElm, vnode.elm, refElm);
        }
        else {
            vnode.elm = nodeOps.createTextNode(vnode.text);
            insert(parentElm, vnode.elm, refElm);
        }
    }
    function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
        var i = vnode.data;
        if (isDef(i)) {
            var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
            if (isDef((i = i.hook)) && isDef((i = i.init))) {
                i(vnode, false /* hydrating */);
            }
            // after calling the init hook, if the vnode is a child component
            // it should've created a child instance and mounted it. the child
            // component also has set the placeholder vnode's elm.
            // in that case we can just return the element and be done.
            if (isDef(vnode.componentInstance)) {
                initComponent(vnode, insertedVnodeQueue);
                insert(parentElm, vnode.elm, refElm);
                if (isTrue(isReactivated)) {
                    reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
                }
                return true;
            }
        }
    }
    function initComponent(vnode, insertedVnodeQueue) {
        if (isDef(vnode.data.pendingInsert)) {
            insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
            vnode.data.pendingInsert = null;
        }
        vnode.elm = vnode.componentInstance.$el;
        if (isPatchable(vnode)) {
            invokeCreateHooks(vnode, insertedVnodeQueue);
            setScope(vnode);
        }
        else {
            // empty component root.
            // skip all element-related modules except for ref (#3455)
            registerRef(vnode);
            // make sure to invoke the insert hook
            insertedVnodeQueue.push(vnode);
        }
    }
    function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {
        var i;
        // hack for #4339: a reactivated component with inner transition
        // does not trigger because the inner node's created hooks are not called
        // again. It's not ideal to involve module-specific logic in here but
        // there doesn't seem to be a better way to do it.
        var innerNode = vnode;
        while (innerNode.componentInstance) {
            innerNode = innerNode.componentInstance._vnode;
            if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {
                for (i = 0; i < cbs.activate.length; ++i) {
                    cbs.activate[i](emptyNode, innerNode);
                }
                insertedVnodeQueue.push(innerNode);
                break;
            }
        }
        // unlike a newly created component,
        // a reactivated keep-alive component doesn't insert itself
        insert(parentElm, vnode.elm, refElm);
    }
    function insert(parent, elm, ref) {
        if (isDef(parent)) {
            if (isDef(ref)) {
                if (nodeOps.parentNode(ref) === parent) {
                    nodeOps.insertBefore(parent, elm, ref);
                }
            }
            else {
                nodeOps.appendChild(parent, elm);
            }
        }
    }
    function createChildren(vnode, children, insertedVnodeQueue) {
        if (isArray(children)) {
            if (false) {
                checkDuplicateKeys(children);
            }
            for (var i_1 = 0; i_1 < children.length; ++i_1) {
                createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);
            }
        }
        else if (isPrimitive(vnode.text)) {
            nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
        }
    }
    function isPatchable(vnode) {
        while (vnode.componentInstance) {
            vnode = vnode.componentInstance._vnode;
        }
        return isDef(vnode.tag);
    }
    function invokeCreateHooks(vnode, insertedVnodeQueue) {
        for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {
            cbs.create[i_2](emptyNode, vnode);
        }
        i = vnode.data.hook; // Reuse variable
        if (isDef(i)) {
            if (isDef(i.create))
                i.create(emptyNode, vnode);
            if (isDef(i.insert))
                insertedVnodeQueue.push(vnode);
        }
    }
    // set scope id attribute for scoped CSS.
    // this is implemented as a special case to avoid the overhead
    // of going through the normal attribute patching process.
    function setScope(vnode) {
        var i;
        if (isDef((i = vnode.fnScopeId))) {
            nodeOps.setStyleScope(vnode.elm, i);
        }
        else {
            var ancestor = vnode;
            while (ancestor) {
                if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {
                    nodeOps.setStyleScope(vnode.elm, i);
                }
                ancestor = ancestor.parent;
            }
        }
        // for slot content they should also get the scopeId from the host instance.
        if (isDef((i = activeInstance)) &&
            i !== vnode.context &&
            i !== vnode.fnContext &&
            isDef((i = i.$options._scopeId))) {
            nodeOps.setStyleScope(vnode.elm, i);
        }
    }
    function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
        for (; startIdx <= endIdx; ++startIdx) {
            createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
        }
    }
    function invokeDestroyHook(vnode) {
        var i, j;
        var data = vnode.data;
        if (isDef(data)) {
            if (isDef((i = data.hook)) && isDef((i = i.destroy)))
                i(vnode);
            for (i = 0; i < cbs.destroy.length; ++i)
                cbs.destroy[i](vnode);
        }
        if (isDef((i = vnode.children))) {
            for (j = 0; j < vnode.children.length; ++j) {
                invokeDestroyHook(vnode.children[j]);
            }
        }
    }
    function removeVnodes(vnodes, startIdx, endIdx) {
        for (; startIdx <= endIdx; ++startIdx) {
            var ch = vnodes[startIdx];
            if (isDef(ch)) {
                if (isDef(ch.tag)) {
                    removeAndInvokeRemoveHook(ch);
                    invokeDestroyHook(ch);
                }
                else {
                    // Text node
                    removeNode(ch.elm);
                }
            }
        }
    }
    function removeAndInvokeRemoveHook(vnode, rm) {
        if (isDef(rm) || isDef(vnode.data)) {
            var i_3;
            var listeners = cbs.remove.length + 1;
            if (isDef(rm)) {
                // we have a recursively passed down rm callback
                // increase the listeners count
                rm.listeners += listeners;
            }
            else {
                // directly removing
                rm = createRmCb(vnode.elm, listeners);
            }
            // recursively invoke hooks on child component root node
            if (isDef((i_3 = vnode.componentInstance)) &&
                isDef((i_3 = i_3._vnode)) &&
                isDef(i_3.data)) {
                removeAndInvokeRemoveHook(i_3, rm);
            }
            for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {
                cbs.remove[i_3](vnode, rm);
            }
            if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {
                i_3(vnode, rm);
            }
            else {
                rm();
            }
        }
        else {
            removeNode(vnode.elm);
        }
    }
    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
        var oldStartIdx = 0;
        var newStartIdx = 0;
        var oldEndIdx = oldCh.length - 1;
        var oldStartVnode = oldCh[0];
        var oldEndVnode = oldCh[oldEndIdx];
        var newEndIdx = newCh.length - 1;
        var newStartVnode = newCh[0];
        var newEndVnode = newCh[newEndIdx];
        var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
        // removeOnly is a special flag used only by <transition-group>
        // to ensure removed elements stay in correct relative positions
        // during leaving transitions
        var canMove = !removeOnly;
        if (false) {
            checkDuplicateKeys(newCh);
        }
        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
            if (isUndef(oldStartVnode)) {
                oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
            }
            else if (isUndef(oldEndVnode)) {
                oldEndVnode = oldCh[--oldEndIdx];
            }
            else if (sameVnode(oldStartVnode, newStartVnode)) {
                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
                oldStartVnode = oldCh[++oldStartIdx];
                newStartVnode = newCh[++newStartIdx];
            }
            else if (sameVnode(oldEndVnode, newEndVnode)) {
                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
                oldEndVnode = oldCh[--oldEndIdx];
                newEndVnode = newCh[--newEndIdx];
            }
            else if (sameVnode(oldStartVnode, newEndVnode)) {
                // Vnode moved right
                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
                canMove &&
                    nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
                oldStartVnode = oldCh[++oldStartIdx];
                newEndVnode = newCh[--newEndIdx];
            }
            else if (sameVnode(oldEndVnode, newStartVnode)) {
                // Vnode moved left
                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
                canMove &&
                    nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
                oldEndVnode = oldCh[--oldEndIdx];
                newStartVnode = newCh[++newStartIdx];
            }
            else {
                if (isUndef(oldKeyToIdx))
                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
                idxInOld = isDef(newStartVnode.key)
                    ? oldKeyToIdx[newStartVnode.key]
                    : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
                if (isUndef(idxInOld)) {
                    // New element
                    createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
                }
                else {
                    vnodeToMove = oldCh[idxInOld];
                    if (sameVnode(vnodeToMove, newStartVnode)) {
                        patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
                        oldCh[idxInOld] = undefined;
                        canMove &&
                            nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
                    }
                    else {
                        // same key but different element. treat as new element
                        createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
                    }
                }
                newStartVnode = newCh[++newStartIdx];
            }
        }
        if (oldStartIdx > oldEndIdx) {
            refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
            addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
        }
        else if (newStartIdx > newEndIdx) {
            removeVnodes(oldCh, oldStartIdx, oldEndIdx);
        }
    }
    function checkDuplicateKeys(children) {
        var seenKeys = {};
        for (var i_4 = 0; i_4 < children.length; i_4++) {
            var vnode = children[i_4];
            var key = vnode.key;
            if (isDef(key)) {
                if (seenKeys[key]) {
                    warn("Duplicate keys detected: '".concat(key, "'. This may cause an update error."), vnode.context);
                }
                else {
                    seenKeys[key] = true;
                }
            }
        }
    }
    function findIdxInOld(node, oldCh, start, end) {
        for (var i_5 = start; i_5 < end; i_5++) {
            var c = oldCh[i_5];
            if (isDef(c) && sameVnode(node, c))
                return i_5;
        }
    }
    function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {
        if (oldVnode === vnode) {
            return;
        }
        if (isDef(vnode.elm) && isDef(ownerArray)) {
            // clone reused vnode
            vnode = ownerArray[index] = cloneVNode(vnode);
        }
        var elm = (vnode.elm = oldVnode.elm);
        if (isTrue(oldVnode.isAsyncPlaceholder)) {
            if (isDef(vnode.asyncFactory.resolved)) {
                hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
            }
            else {
                vnode.isAsyncPlaceholder = true;
            }
            return;
        }
        // reuse element for static trees.
        // note we only do this if the vnode is cloned -
        // if the new node is not cloned it means the render functions have been
        // reset by the hot-reload-api and we need to do a proper re-render.
        if (isTrue(vnode.isStatic) &&
            isTrue(oldVnode.isStatic) &&
            vnode.key === oldVnode.key &&
            (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
            vnode.componentInstance = oldVnode.componentInstance;
            return;
        }
        var i;
        var data = vnode.data;
        if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {
            i(oldVnode, vnode);
        }
        var oldCh = oldVnode.children;
        var ch = vnode.children;
        if (isDef(data) && isPatchable(vnode)) {
            for (i = 0; i < cbs.update.length; ++i)
                cbs.update[i](oldVnode, vnode);
            if (isDef((i = data.hook)) && isDef((i = i.update)))
                i(oldVnode, vnode);
        }
        if (isUndef(vnode.text)) {
            if (isDef(oldCh) && isDef(ch)) {
                if (oldCh !== ch)
                    updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);
            }
            else if (isDef(ch)) {
                if (false) {
                    checkDuplicateKeys(ch);
                }
                if (isDef(oldVnode.text))
                    nodeOps.setTextContent(elm, '');
                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
            }
            else if (isDef(oldCh)) {
                removeVnodes(oldCh, 0, oldCh.length - 1);
            }
            else if (isDef(oldVnode.text)) {
                nodeOps.setTextContent(elm, '');
            }
        }
        else if (oldVnode.text !== vnode.text) {
            nodeOps.setTextContent(elm, vnode.text);
        }
        if (isDef(data)) {
            if (isDef((i = data.hook)) && isDef((i = i.postpatch)))
                i(oldVnode, vnode);
        }
    }
    function invokeInsertHook(vnode, queue, initial) {
        // delay insert hooks for component root nodes, invoke them after the
        // element is really inserted
        if (isTrue(initial) && isDef(vnode.parent)) {
            vnode.parent.data.pendingInsert = queue;
        }
        else {
            for (var i_6 = 0; i_6 < queue.length; ++i_6) {
                queue[i_6].data.hook.insert(queue[i_6]);
            }
        }
    }
    var hydrationBailed = false;
    // list of modules that can skip create hook during hydration because they
    // are already rendered on the client or has no need for initialization
    // Note: style is excluded because it relies on initial clone for future
    // deep updates (#7063).
    var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
    // Note: this is a browser-only function so we can assume elms are DOM nodes.
    function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {
        var i;
        var tag = vnode.tag, data = vnode.data, children = vnode.children;
        inVPre = inVPre || (data && data.pre);
        vnode.elm = elm;
        if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
            vnode.isAsyncPlaceholder = true;
            return true;
        }
        // assert node match
        if (false) {
            if (!assertNodeMatch(elm, vnode, inVPre)) {
                return false;
            }
        }
        if (isDef(data)) {
            if (isDef((i = data.hook)) && isDef((i = i.init)))
                i(vnode, true /* hydrating */);
            if (isDef((i = vnode.componentInstance))) {
                // child component. it should have hydrated its own tree.
                initComponent(vnode, insertedVnodeQueue);
                return true;
            }
        }
        if (isDef(tag)) {
            if (isDef(children)) {
                // empty element, allow client to pick up and populate children
                if (!elm.hasChildNodes()) {
                    createChildren(vnode, children, insertedVnodeQueue);
                }
                else {
                    // v-html and domProps: innerHTML
                    if (isDef((i = data)) &&
                        isDef((i = i.domProps)) &&
                        isDef((i = i.innerHTML))) {
                        if (i !== elm.innerHTML) {
                            /* istanbul ignore if */
                            if (false) {
                                hydrationBailed = true;
                                console.warn('Parent: ', elm);
                                console.warn('server innerHTML: ', i);
                                console.warn('client innerHTML: ', elm.innerHTML);
                            }
                            return false;
                        }
                    }
                    else {
                        // iterate and compare children lists
                        var childrenMatch = true;
                        var childNode = elm.firstChild;
                        for (var i_7 = 0; i_7 < children.length; i_7++) {
                            if (!childNode ||
                                !hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {
                                childrenMatch = false;
                                break;
                            }
                            childNode = childNode.nextSibling;
                        }
                        // if childNode is not null, it means the actual childNodes list is
                        // longer than the virtual children list.
                        if (!childrenMatch || childNode) {
                            /* istanbul ignore if */
                            if (false) {
                                hydrationBailed = true;
                                console.warn('Parent: ', elm);
                                console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
                            }
                            return false;
                        }
                    }
                }
            }
            if (isDef(data)) {
                var fullInvoke = false;
                for (var key in data) {
                    if (!isRenderedModule(key)) {
                        fullInvoke = true;
                        invokeCreateHooks(vnode, insertedVnodeQueue);
                        break;
                    }
                }
                if (!fullInvoke && data['class']) {
                    // ensure collecting deps for deep class bindings for future updates
                    traverse(data['class']);
                }
            }
        }
        else if (elm.data !== vnode.text) {
            elm.data = vnode.text;
        }
        return true;
    }
    function assertNodeMatch(node, vnode, inVPre) {
        if (isDef(vnode.tag)) {
            return (vnode.tag.indexOf('vue-component') === 0 ||
                (!isUnknownElement(vnode, inVPre) &&
                    vnode.tag.toLowerCase() ===
                        (node.tagName && node.tagName.toLowerCase())));
        }
        else {
            return node.nodeType === (vnode.isComment ? 8 : 3);
        }
    }
    return function patch(oldVnode, vnode, hydrating, removeOnly) {
        if (isUndef(vnode)) {
            if (isDef(oldVnode))
                invokeDestroyHook(oldVnode);
            return;
        }
        var isInitialPatch = false;
        var insertedVnodeQueue = [];
        if (isUndef(oldVnode)) {
            // empty mount (likely as component), create new root element
            isInitialPatch = true;
            createElm(vnode, insertedVnodeQueue);
        }
        else {
            var isRealElement = isDef(oldVnode.nodeType);
            if (!isRealElement && sameVnode(oldVnode, vnode)) {
                // patch existing root node
                patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
            }
            else {
                if (isRealElement) {
                    // mounting to a real element
                    // check if this is server-rendered content and if we can perform
                    // a successful hydration.
                    if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
                        oldVnode.removeAttribute(SSR_ATTR);
                        hydrating = true;
                    }
                    if (isTrue(hydrating)) {
                        if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
                            invokeInsertHook(vnode, insertedVnodeQueue, true);
                            return oldVnode;
                        }
                        else if (false) {
                            warn('The client-side rendered virtual DOM tree is not matching ' +
                                'server-rendered content. This is likely caused by incorrect ' +
                                'HTML markup, for example nesting block-level elements inside ' +
                                '<p>, or missing <tbody>. Bailing hydration and performing ' +
                                'full client-side render.');
                        }
                    }
                    // either not server-rendered, or hydration failed.
                    // create an empty node and replace it
                    oldVnode = emptyNodeAt(oldVnode);
                }
                // replacing existing element
                var oldElm = oldVnode.elm;
                var parentElm = nodeOps.parentNode(oldElm);
                // create new node
                createElm(vnode, insertedVnodeQueue, 
                // extremely rare edge case: do not insert if old element is in a
                // leaving transition. Only happens when combining transition +
                // keep-alive + HOCs. (#4590)
                oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));
                // update parent placeholder node element, recursively
                if (isDef(vnode.parent)) {
                    var ancestor = vnode.parent;
                    var patchable = isPatchable(vnode);
                    while (ancestor) {
                        for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {
                            cbs.destroy[i_8](ancestor);
                        }
                        ancestor.elm = vnode.elm;
                        if (patchable) {
                            for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {
                                cbs.create[i_9](emptyNode, ancestor);
                            }
                            // #6513
                            // invoke insert hooks that may have been merged by create hooks.
                            // e.g. for directives that uses the "inserted" hook.
                            var insert_1 = ancestor.data.hook.insert;
                            if (insert_1.merged) {
                                // start at index 1 to avoid re-invoking component mounted hook
                                // clone insert hooks to avoid being mutated during iteration.
                                // e.g. for customed directives under transition group.
                                var cloned = insert_1.fns.slice(1);
                                for (var i_10 = 0; i_10 < cloned.length; i_10++) {
                                    cloned[i_10]();
                                }
                            }
                        }
                        else {
                            registerRef(ancestor);
                        }
                        ancestor = ancestor.parent;
                    }
                }
                // destroy old node
                if (isDef(parentElm)) {
                    removeVnodes([oldVnode], 0, 0);
                }
                else if (isDef(oldVnode.tag)) {
                    invokeDestroyHook(oldVnode);
                }
            }
        }
        invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
        return vnode.elm;
    };
}

var directives = {
    create: updateDirectives,
    update: updateDirectives,
    destroy: function unbindDirectives(vnode) {
        // @ts-expect-error emptyNode is not VNodeWithData
        updateDirectives(vnode, emptyNode);
    }
};
function updateDirectives(oldVnode, vnode) {
    if (oldVnode.data.directives || vnode.data.directives) {
        _update(oldVnode, vnode);
    }
}
function _update(oldVnode, vnode) {
    var isCreate = oldVnode === emptyNode;
    var isDestroy = vnode === emptyNode;
    var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);
    var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);
    var dirsWithInsert = [];
    var dirsWithPostpatch = [];
    var key, oldDir, dir;
    for (key in newDirs) {
        oldDir = oldDirs[key];
        dir = newDirs[key];
        if (!oldDir) {
            // new directive, bind
            callHook(dir, 'bind', vnode, oldVnode);
            if (dir.def && dir.def.inserted) {
                dirsWithInsert.push(dir);
            }
        }
        else {
            // existing directive, update
            dir.oldValue = oldDir.value;
            dir.oldArg = oldDir.arg;
            callHook(dir, 'update', vnode, oldVnode);
            if (dir.def && dir.def.componentUpdated) {
                dirsWithPostpatch.push(dir);
            }
        }
    }
    if (dirsWithInsert.length) {
        var callInsert = function () {
            for (var i = 0; i < dirsWithInsert.length; i++) {
                callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);
            }
        };
        if (isCreate) {
            mergeVNodeHook(vnode, 'insert', callInsert);
        }
        else {
            callInsert();
        }
    }
    if (dirsWithPostpatch.length) {
        mergeVNodeHook(vnode, 'postpatch', function () {
            for (var i = 0; i < dirsWithPostpatch.length; i++) {
                callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
            }
        });
    }
    if (!isCreate) {
        for (key in oldDirs) {
            if (!newDirs[key]) {
                // no longer present, unbind
                callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
            }
        }
    }
}
var emptyModifiers = Object.create(null);
function normalizeDirectives(dirs, vm) {
    var res = Object.create(null);
    if (!dirs) {
        // $flow-disable-line
        return res;
    }
    var i, dir;
    for (i = 0; i < dirs.length; i++) {
        dir = dirs[i];
        if (!dir.modifiers) {
            // $flow-disable-line
            dir.modifiers = emptyModifiers;
        }
        res[getRawDirName(dir)] = dir;
        if (vm._setupState && vm._setupState.__sfc) {
            var setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);
            if (typeof setupDef === 'function') {
                dir.def = {
                    bind: setupDef,
                    update: setupDef,
                };
            }
            else {
                dir.def = setupDef;
            }
        }
        dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);
    }
    // $flow-disable-line
    return res;
}
function getRawDirName(dir) {
    return (dir.rawName || "".concat(dir.name, ".").concat(Object.keys(dir.modifiers || {}).join('.')));
}
function callHook(dir, hook, vnode, oldVnode, isDestroy) {
    var fn = dir.def && dir.def[hook];
    if (fn) {
        try {
            fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
        }
        catch (e) {
            handleError(e, vnode.context, "directive ".concat(dir.name, " ").concat(hook, " hook"));
        }
    }
}

var baseModules = [ref, directives];

function updateAttrs(oldVnode, vnode) {
    var opts = vnode.componentOptions;
    if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
        return;
    }
    if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
        return;
    }
    var key, cur, old;
    var elm = vnode.elm;
    var oldAttrs = oldVnode.data.attrs || {};
    var attrs = vnode.data.attrs || {};
    // clone observed objects, as the user probably wants to mutate it
    if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {
        attrs = vnode.data.attrs = extend({}, attrs);
    }
    for (key in attrs) {
        cur = attrs[key];
        old = oldAttrs[key];
        if (old !== cur) {
            setAttr(elm, key, cur, vnode.data.pre);
        }
    }
    // #4391: in IE9, setting type can reset value for input[type=radio]
    // #6666: IE/Edge forces progress value down to 1 before setting a max
    /* istanbul ignore if */
    if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
        setAttr(elm, 'value', attrs.value);
    }
    for (key in oldAttrs) {
        if (isUndef(attrs[key])) {
            if (isXlink(key)) {
                elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
            }
            else if (!isEnumeratedAttr(key)) {
                elm.removeAttribute(key);
            }
        }
    }
}
function setAttr(el, key, value, isInPre) {
    if (isInPre || el.tagName.indexOf('-') > -1) {
        baseSetAttr(el, key, value);
    }
    else if (isBooleanAttr(key)) {
        // set attribute for blank value
        // e.g. <option disabled>Select one</option>
        if (isFalsyAttrValue(value)) {
            el.removeAttribute(key);
        }
        else {
            // technically allowfullscreen is a boolean attribute for <iframe>,
            // but Flash expects a value of "true" when used on <embed> tag
            value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;
            el.setAttribute(key, value);
        }
    }
    else if (isEnumeratedAttr(key)) {
        el.setAttribute(key, convertEnumeratedValue(key, value));
    }
    else if (isXlink(key)) {
        if (isFalsyAttrValue(value)) {
            el.removeAttributeNS(xlinkNS, getXlinkProp(key));
        }
        else {
            el.setAttributeNS(xlinkNS, key, value);
        }
    }
    else {
        baseSetAttr(el, key, value);
    }
}
function baseSetAttr(el, key, value) {
    if (isFalsyAttrValue(value)) {
        el.removeAttribute(key);
    }
    else {
        // #7138: IE10 & 11 fires input event when setting placeholder on
        // <textarea>... block the first input event and remove the blocker
        // immediately.
        /* istanbul ignore if */
        if (isIE &&
            !isIE9 &&
            el.tagName === 'TEXTAREA' &&
            key === 'placeholder' &&
            value !== '' &&
            !el.__ieph) {
            var blocker_1 = function (e) {
                e.stopImmediatePropagation();
                el.removeEventListener('input', blocker_1);
            };
            el.addEventListener('input', blocker_1);
            // $flow-disable-line
            el.__ieph = true; /* IE placeholder patched */
        }
        el.setAttribute(key, value);
    }
}
var attrs = {
    create: updateAttrs,
    update: updateAttrs
};

function updateClass(oldVnode, vnode) {
    var el = vnode.elm;
    var data = vnode.data;
    var oldData = oldVnode.data;
    if (isUndef(data.staticClass) &&
        isUndef(data.class) &&
        (isUndef(oldData) ||
            (isUndef(oldData.staticClass) && isUndef(oldData.class)))) {
        return;
    }
    var cls = genClassForVnode(vnode);
    // handle transition classes
    var transitionClass = el._transitionClasses;
    if (isDef(transitionClass)) {
        cls = concat(cls, stringifyClass(transitionClass));
    }
    // set the class
    if (cls !== el._prevClass) {
        el.setAttribute('class', cls);
        el._prevClass = cls;
    }
}
var klass = {
    create: updateClass,
    update: updateClass
};

// in some cases, the event used has to be determined at runtime
// so we used some reserved tokens during compile.
var RANGE_TOKEN = '__r';
var CHECKBOX_RADIO_TOKEN = '__c';

// normalize v-model event tokens that can only be determined at runtime.
// it's important to place the event as the first in the array because
// the whole point is ensuring the v-model callback gets called before
// user-attached handlers.
function normalizeEvents(on) {
    /* istanbul ignore if */
    if (isDef(on[RANGE_TOKEN])) {
        // IE input[type=range] only supports `change` event
        var event_1 = isIE ? 'change' : 'input';
        on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);
        delete on[RANGE_TOKEN];
    }
    // This was originally intended to fix #4521 but no longer necessary
    // after 2.5. Keeping it for backwards compat with generated code from < 2.4
    /* istanbul ignore if */
    if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
        on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
        delete on[CHECKBOX_RADIO_TOKEN];
    }
}
var target;
function createOnceHandler(event, handler, capture) {
    var _target = target; // save current target element in closure
    return function onceHandler() {
        var res = handler.apply(null, arguments);
        if (res !== null) {
            remove(event, onceHandler, capture, _target);
        }
    };
}
// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
// implementation and does not fire microtasks in between event propagation, so
// safe to exclude.
var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
function add(name, handler, capture, passive) {
    // async edge case #6566: inner click event triggers patch, event handler
    // attached to outer element during patch, and triggered again. This
    // happens because browsers fire microtask ticks between event propagation.
    // the solution is simple: we save the timestamp when a handler is attached,
    // and the handler would only fire if the event passed to it was fired
    // AFTER it was attached.
    if (useMicrotaskFix) {
        var attachedTimestamp_1 = currentFlushTimestamp;
        var original_1 = handler;
        //@ts-expect-error
        handler = original_1._wrapper = function (e) {
            if (
            // no bubbling, should always fire.
            // this is just a safety net in case event.timeStamp is unreliable in
            // certain weird environments...
            e.target === e.currentTarget ||
                // event is fired after handler attachment
                e.timeStamp >= attachedTimestamp_1 ||
                // bail for environments that have buggy event.timeStamp implementations
                // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
                // #9681 QtWebEngine event.timeStamp is negative value
                e.timeStamp <= 0 ||
                // #9448 bail if event is fired in another document in a multi-page
                // electron/nw.js app, since event.timeStamp will be using a different
                // starting reference
                e.target.ownerDocument !== document) {
                return original_1.apply(this, arguments);
            }
        };
    }
    target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);
}
function remove(name, handler, capture, _target) {
    (_target || target).removeEventListener(name, 
    //@ts-expect-error
    handler._wrapper || handler, capture);
}
function updateDOMListeners(oldVnode, vnode) {
    if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
        return;
    }
    var on = vnode.data.on || {};
    var oldOn = oldVnode.data.on || {};
    // vnode is empty when removing all listeners,
    // and use old vnode dom element
    target = vnode.elm || oldVnode.elm;
    normalizeEvents(on);
    updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);
    target = undefined;
}
var events = {
    create: updateDOMListeners,
    update: updateDOMListeners,
    // @ts-expect-error emptyNode has actually data
    destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }
};

var svgContainer;
function updateDOMProps(oldVnode, vnode) {
    if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
        return;
    }
    var key, cur;
    var elm = vnode.elm;
    var oldProps = oldVnode.data.domProps || {};
    var props = vnode.data.domProps || {};
    // clone observed objects, as the user probably wants to mutate it
    if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {
        props = vnode.data.domProps = extend({}, props);
    }
    for (key in oldProps) {
        if (!(key in props)) {
            elm[key] = '';
        }
    }
    for (key in props) {
        cur = props[key];
        // ignore children if the node has textContent or innerHTML,
        // as these will throw away existing DOM nodes and cause removal errors
        // on subsequent patches (#3360)
        if (key === 'textContent' || key === 'innerHTML') {
            if (vnode.children)
                vnode.children.length = 0;
            if (cur === oldProps[key])
                continue;
            // #6601 work around Chrome version <= 55 bug where single textNode
            // replaced by innerHTML/textContent retains its parentNode property
            if (elm.childNodes.length === 1) {
                elm.removeChild(elm.childNodes[0]);
            }
        }
        if (key === 'value' && elm.tagName !== 'PROGRESS') {
            // store value as _value as well since
            // non-string values will be stringified
            elm._value = cur;
            // avoid resetting cursor position when value is the same
            var strCur = isUndef(cur) ? '' : String(cur);
            if (shouldUpdateValue(elm, strCur)) {
                elm.value = strCur;
            }
        }
        else if (key === 'innerHTML' &&
            isSVG(elm.tagName) &&
            isUndef(elm.innerHTML)) {
            // IE doesn't support innerHTML for SVG elements
            svgContainer = svgContainer || document.createElement('div');
            svgContainer.innerHTML = "<svg>".concat(cur, "</svg>");
            var svg = svgContainer.firstChild;
            while (elm.firstChild) {
                elm.removeChild(elm.firstChild);
            }
            while (svg.firstChild) {
                elm.appendChild(svg.firstChild);
            }
        }
        else if (
        // skip the update if old and new VDOM state is the same.
        // `value` is handled separately because the DOM value may be temporarily
        // out of sync with VDOM state due to focus, composition and modifiers.
        // This  #4521 by skipping the unnecessary `checked` update.
        cur !== oldProps[key]) {
            // some property updates can throw
            // e.g. `value` on <progress> w/ non-finite value
            try {
                elm[key] = cur;
            }
            catch (e) { }
        }
    }
}
function shouldUpdateValue(elm, checkVal) {
    return (
    //@ts-expect-error
    !elm.composing &&
        (elm.tagName === 'OPTION' ||
            isNotInFocusAndDirty(elm, checkVal) ||
            isDirtyWithModifiers(elm, checkVal)));
}
function isNotInFocusAndDirty(elm, checkVal) {
    // return true when textbox (.number and .trim) loses focus and its value is
    // not equal to the updated value
    var notInFocus = true;
    // #6157
    // work around IE bug when accessing document.activeElement in an iframe
    try {
        notInFocus = document.activeElement !== elm;
    }
    catch (e) { }
    return notInFocus && elm.value !== checkVal;
}
function isDirtyWithModifiers(elm, newVal) {
    var value = elm.value;
    var modifiers = elm._vModifiers; // injected by v-model runtime
    if (isDef(modifiers)) {
        if (modifiers.number) {
            return toNumber(value) !== toNumber(newVal);
        }
        if (modifiers.trim) {
            return value.trim() !== newVal.trim();
        }
    }
    return value !== newVal;
}
var domProps = {
    create: updateDOMProps,
    update: updateDOMProps
};

var parseStyleText = cached(function (cssText) {
    var res = {};
    var listDelimiter = /;(?![^(]*\))/g;
    var propertyDelimiter = /:(.+)/;
    cssText.split(listDelimiter).forEach(function (item) {
        if (item) {
            var tmp = item.split(propertyDelimiter);
            tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
        }
    });
    return res;
});
// merge static and dynamic style data on the same vnode
function normalizeStyleData(data) {
    var style = normalizeStyleBinding(data.style);
    // static style is pre-processed into an object during compilation
    // and is always a fresh object, so it's safe to merge into it
    return data.staticStyle ? extend(data.staticStyle, style) : style;
}
// normalize possible array / string values into Object
function normalizeStyleBinding(bindingStyle) {
    if (Array.isArray(bindingStyle)) {
        return toObject(bindingStyle);
    }
    if (typeof bindingStyle === 'string') {
        return parseStyleText(bindingStyle);
    }
    return bindingStyle;
}
/**
 * parent component style should be after child's
 * so that parent component's style could override it
 */
function getStyle(vnode, checkChild) {
    var res = {};
    var styleData;
    if (checkChild) {
        var childNode = vnode;
        while (childNode.componentInstance) {
            childNode = childNode.componentInstance._vnode;
            if (childNode &&
                childNode.data &&
                (styleData = normalizeStyleData(childNode.data))) {
                extend(res, styleData);
            }
        }
    }
    if ((styleData = normalizeStyleData(vnode.data))) {
        extend(res, styleData);
    }
    var parentNode = vnode;
    // @ts-expect-error parentNode.parent not VNodeWithData
    while ((parentNode = parentNode.parent)) {
        if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
            extend(res, styleData);
        }
    }
    return res;
}

var cssVarRE = /^--/;
var importantRE = /\s*!important$/;
var setProp = function (el, name, val) {
    /* istanbul ignore if */
    if (cssVarRE.test(name)) {
        el.style.setProperty(name, val);
    }
    else if (importantRE.test(val)) {
        el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
    }
    else {
        var normalizedName = normalize(name);
        if (Array.isArray(val)) {
            // Support values array created by autoprefixer, e.g.
            // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
            // Set them one by one, and the browser will only set those it can recognize
            for (var i = 0, len = val.length; i < len; i++) {
                el.style[normalizedName] = val[i];
            }
        }
        else {
            el.style[normalizedName] = val;
        }
    }
};
var vendorNames = ['Webkit', 'Moz', 'ms'];
var emptyStyle;
var normalize = cached(function (prop) {
    emptyStyle = emptyStyle || document.createElement('div').style;
    prop = camelize(prop);
    if (prop !== 'filter' && prop in emptyStyle) {
        return prop;
    }
    var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
    for (var i = 0; i < vendorNames.length; i++) {
        var name_1 = vendorNames[i] + capName;
        if (name_1 in emptyStyle) {
            return name_1;
        }
    }
});
function updateStyle(oldVnode, vnode) {
    var data = vnode.data;
    var oldData = oldVnode.data;
    if (isUndef(data.staticStyle) &&
        isUndef(data.style) &&
        isUndef(oldData.staticStyle) &&
        isUndef(oldData.style)) {
        return;
    }
    var cur, name;
    var el = vnode.elm;
    var oldStaticStyle = oldData.staticStyle;
    var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
    // if static style exists, stylebinding already merged into it when doing normalizeStyleData
    var oldStyle = oldStaticStyle || oldStyleBinding;
    var style = normalizeStyleBinding(vnode.data.style) || {};
    // store normalized style under a different key for next diff
    // make sure to clone it if it's reactive, since the user likely wants
    // to mutate it.
    vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;
    var newStyle = getStyle(vnode, true);
    for (name in oldStyle) {
        if (isUndef(newStyle[name])) {
            setProp(el, name, '');
        }
    }
    for (name in newStyle) {
        cur = newStyle[name];
        // ie9 setting to null has no effect, must use empty string
        setProp(el, name, cur == null ? '' : cur);
    }
}
var style = {
    create: updateStyle,
    update: updateStyle
};

var whitespaceRE = /\s+/;
/**
 * Add class with compatibility for SVG since classList is not supported on
 * SVG elements in IE
 */
function addClass(el, cls) {
    /* istanbul ignore if */
    if (!cls || !(cls = cls.trim())) {
        return;
    }
    /* istanbul ignore else */
    if (el.classList) {
        if (cls.indexOf(' ') > -1) {
            cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
        }
        else {
            el.classList.add(cls);
        }
    }
    else {
        var cur = " ".concat(el.getAttribute('class') || '', " ");
        if (cur.indexOf(' ' + cls + ' ') < 0) {
            el.setAttribute('class', (cur + cls).trim());
        }
    }
}
/**
 * Remove class with compatibility for SVG since classList is not supported on
 * SVG elements in IE
 */
function removeClass(el, cls) {
    /* istanbul ignore if */
    if (!cls || !(cls = cls.trim())) {
        return;
    }
    /* istanbul ignore else */
    if (el.classList) {
        if (cls.indexOf(' ') > -1) {
            cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
        }
        else {
            el.classList.remove(cls);
        }
        if (!el.classList.length) {
            el.removeAttribute('class');
        }
    }
    else {
        var cur = " ".concat(el.getAttribute('class') || '', " ");
        var tar = ' ' + cls + ' ';
        while (cur.indexOf(tar) >= 0) {
            cur = cur.replace(tar, ' ');
        }
        cur = cur.trim();
        if (cur) {
            el.setAttribute('class', cur);
        }
        else {
            el.removeAttribute('class');
        }
    }
}

function resolveTransition(def) {
    if (!def) {
        return;
    }
    /* istanbul ignore else */
    if (typeof def === 'object') {
        var res = {};
        if (def.css !== false) {
            extend(res, autoCssTransition(def.name || 'v'));
        }
        extend(res, def);
        return res;
    }
    else if (typeof def === 'string') {
        return autoCssTransition(def);
    }
}
var autoCssTransition = cached(function (name) {
    return {
        enterClass: "".concat(name, "-enter"),
        enterToClass: "".concat(name, "-enter-to"),
        enterActiveClass: "".concat(name, "-enter-active"),
        leaveClass: "".concat(name, "-leave"),
        leaveToClass: "".concat(name, "-leave-to"),
        leaveActiveClass: "".concat(name, "-leave-active")
    };
});
var hasTransition = inBrowser && !isIE9;
var TRANSITION = 'transition';
var ANIMATION = 'animation';
// Transition property/event sniffing
var transitionProp = 'transition';
var transitionEndEvent = 'transitionend';
var animationProp = 'animation';
var animationEndEvent = 'animationend';
if (hasTransition) {
    /* istanbul ignore if */
    if (window.ontransitionend === undefined &&
        window.onwebkittransitionend !== undefined) {
        transitionProp = 'WebkitTransition';
        transitionEndEvent = 'webkitTransitionEnd';
    }
    if (window.onanimationend === undefined &&
        window.onwebkitanimationend !== undefined) {
        animationProp = 'WebkitAnimation';
        animationEndEvent = 'webkitAnimationEnd';
    }
}
// binding to window is necessary to make hot reload work in IE in strict mode
var raf = inBrowser
    ? window.requestAnimationFrame
        ? window.requestAnimationFrame.bind(window)
        : setTimeout
    : /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };
function nextFrame(fn) {
    raf(function () {
        // @ts-expect-error
        raf(fn);
    });
}
function addTransitionClass(el, cls) {
    var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
    if (transitionClasses.indexOf(cls) < 0) {
        transitionClasses.push(cls);
        addClass(el, cls);
    }
}
function removeTransitionClass(el, cls) {
    if (el._transitionClasses) {
        remove$2(el._transitionClasses, cls);
    }
    removeClass(el, cls);
}
function whenTransitionEnds(el, expectedType, cb) {
    var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
    if (!type)
        return cb();
    var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
    var ended = 0;
    var end = function () {
        el.removeEventListener(event, onEnd);
        cb();
    };
    var onEnd = function (e) {
        if (e.target === el) {
            if (++ended >= propCount) {
                end();
            }
        }
    };
    setTimeout(function () {
        if (ended < propCount) {
            end();
        }
    }, timeout + 1);
    el.addEventListener(event, onEnd);
}
var transformRE = /\b(transform|all)(,|$)/;
function getTransitionInfo(el, expectedType) {
    var styles = window.getComputedStyle(el);
    // JSDOM may return undefined for transition properties
    var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
    var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
    var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
    var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
    var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
    var animationTimeout = getTimeout(animationDelays, animationDurations);
    var type;
    var timeout = 0;
    var propCount = 0;
    /* istanbul ignore if */
    if (expectedType === TRANSITION) {
        if (transitionTimeout > 0) {
            type = TRANSITION;
            timeout = transitionTimeout;
            propCount = transitionDurations.length;
        }
    }
    else if (expectedType === ANIMATION) {
        if (animationTimeout > 0) {
            type = ANIMATION;
            timeout = animationTimeout;
            propCount = animationDurations.length;
        }
    }
    else {
        timeout = Math.max(transitionTimeout, animationTimeout);
        type =
            timeout > 0
                ? transitionTimeout > animationTimeout
                    ? TRANSITION
                    : ANIMATION
                : null;
        propCount = type
            ? type === TRANSITION
                ? transitionDurations.length
                : animationDurations.length
            : 0;
    }
    var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);
    return {
        type: type,
        timeout: timeout,
        propCount: propCount,
        hasTransform: hasTransform
    };
}
function getTimeout(delays, durations) {
    /* istanbul ignore next */
    while (delays.length < durations.length) {
        delays = delays.concat(delays);
    }
    return Math.max.apply(null, durations.map(function (d, i) {
        return toMs(d) + toMs(delays[i]);
    }));
}
// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
// in a locale-dependent way, using a comma instead of a dot.
// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
// as a floor function) causing unexpected behaviors
function toMs(s) {
    return Number(s.slice(0, -1).replace(',', '.')) * 1000;
}

function enter(vnode, toggleDisplay) {
    var el = vnode.elm;
    // call leave callback now
    if (isDef(el._leaveCb)) {
        el._leaveCb.cancelled = true;
        el._leaveCb();
    }
    var data = resolveTransition(vnode.data.transition);
    if (isUndef(data)) {
        return;
    }
    /* istanbul ignore if */
    if (isDef(el._enterCb) || el.nodeType !== 1) {
        return;
    }
    var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
    // activeInstance will always be the <transition> component managing this
    // transition. One edge case to check is when the <transition> is placed
    // as the root node of a child component. In that case we need to check
    // <transition>'s parent for appear check.
    var context = activeInstance;
    var transitionNode = activeInstance.$vnode;
    while (transitionNode && transitionNode.parent) {
        context = transitionNode.context;
        transitionNode = transitionNode.parent;
    }
    var isAppear = !context._isMounted || !vnode.isRootInsert;
    if (isAppear && !appear && appear !== '') {
        return;
    }
    var startClass = isAppear && appearClass ? appearClass : enterClass;
    var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
    var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
    var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
    var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;
    var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
    var enterCancelledHook = isAppear
        ? appearCancelled || enterCancelled
        : enterCancelled;
    var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
    if (false) {
        checkDuration(explicitEnterDuration, 'enter', vnode);
    }
    var expectsCSS = css !== false && !isIE9;
    var userWantsControl = getHookArgumentsLength(enterHook);
    var cb = (el._enterCb = once(function () {
        if (expectsCSS) {
            removeTransitionClass(el, toClass);
            removeTransitionClass(el, activeClass);
        }
        // @ts-expect-error
        if (cb.cancelled) {
            if (expectsCSS) {
                removeTransitionClass(el, startClass);
            }
            enterCancelledHook && enterCancelledHook(el);
        }
        else {
            afterEnterHook && afterEnterHook(el);
        }
        el._enterCb = null;
    }));
    if (!vnode.data.show) {
        // remove pending leave element on enter by injecting an insert hook
        mergeVNodeHook(vnode, 'insert', function () {
            var parent = el.parentNode;
            var pendingNode = parent && parent._pending && parent._pending[vnode.key];
            if (pendingNode &&
                pendingNode.tag === vnode.tag &&
                pendingNode.elm._leaveCb) {
                pendingNode.elm._leaveCb();
            }
            enterHook && enterHook(el, cb);
        });
    }
    // start enter transition
    beforeEnterHook && beforeEnterHook(el);
    if (expectsCSS) {
        addTransitionClass(el, startClass);
        addTransitionClass(el, activeClass);
        nextFrame(function () {
            removeTransitionClass(el, startClass);
            // @ts-expect-error
            if (!cb.cancelled) {
                addTransitionClass(el, toClass);
                if (!userWantsControl) {
                    if (isValidDuration(explicitEnterDuration)) {
                        setTimeout(cb, explicitEnterDuration);
                    }
                    else {
                        whenTransitionEnds(el, type, cb);
                    }
                }
            }
        });
    }
    if (vnode.data.show) {
        toggleDisplay && toggleDisplay();
        enterHook && enterHook(el, cb);
    }
    if (!expectsCSS && !userWantsControl) {
        cb();
    }
}
function leave(vnode, rm) {
    var el = vnode.elm;
    // call enter callback now
    if (isDef(el._enterCb)) {
        el._enterCb.cancelled = true;
        el._enterCb();
    }
    var data = resolveTransition(vnode.data.transition);
    if (isUndef(data) || el.nodeType !== 1) {
        return rm();
    }
    /* istanbul ignore if */
    if (isDef(el._leaveCb)) {
        return;
    }
    var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
    var expectsCSS = css !== false && !isIE9;
    var userWantsControl = getHookArgumentsLength(leave);
    var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
    if (false) {
        checkDuration(explicitLeaveDuration, 'leave', vnode);
    }
    var cb = (el._leaveCb = once(function () {
        if (el.parentNode && el.parentNode._pending) {
            el.parentNode._pending[vnode.key] = null;
        }
        if (expectsCSS) {
            removeTransitionClass(el, leaveToClass);
            removeTransitionClass(el, leaveActiveClass);
        }
        // @ts-expect-error
        if (cb.cancelled) {
            if (expectsCSS) {
                removeTransitionClass(el, leaveClass);
            }
            leaveCancelled && leaveCancelled(el);
        }
        else {
            rm();
            afterLeave && afterLeave(el);
        }
        el._leaveCb = null;
    }));
    if (delayLeave) {
        delayLeave(performLeave);
    }
    else {
        performLeave();
    }
    function performLeave() {
        // the delayed leave may have already been cancelled
        // @ts-expect-error
        if (cb.cancelled) {
            return;
        }
        // record leaving element
        if (!vnode.data.show && el.parentNode) {
            (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =
                vnode;
        }
        beforeLeave && beforeLeave(el);
        if (expectsCSS) {
            addTransitionClass(el, leaveClass);
            addTransitionClass(el, leaveActiveClass);
            nextFrame(function () {
                removeTransitionClass(el, leaveClass);
                // @ts-expect-error
                if (!cb.cancelled) {
                    addTransitionClass(el, leaveToClass);
                    if (!userWantsControl) {
                        if (isValidDuration(explicitLeaveDuration)) {
                            setTimeout(cb, explicitLeaveDuration);
                        }
                        else {
                            whenTransitionEnds(el, type, cb);
                        }
                    }
                }
            });
        }
        leave && leave(el, cb);
        if (!expectsCSS && !userWantsControl) {
            cb();
        }
    }
}
// only used in dev mode
function checkDuration(val, name, vnode) {
    if (typeof val !== 'number') {
        warn("<transition> explicit ".concat(name, " duration is not a valid number - ") +
            "got ".concat(JSON.stringify(val), "."), vnode.context);
    }
    else if (isNaN(val)) {
        warn("<transition> explicit ".concat(name, " duration is NaN - ") +
            'the duration expression might be incorrect.', vnode.context);
    }
}
function isValidDuration(val) {
    return typeof val === 'number' && !isNaN(val);
}
/**
 * Normalize a transition hook's argument length. The hook may be:
 * - a merged hook (invoker) with the original in .fns
 * - a wrapped component method (check ._length)
 * - a plain function (.length)
 */
function getHookArgumentsLength(fn) {
    if (isUndef(fn)) {
        return false;
    }
    // @ts-expect-error
    var invokerFns = fn.fns;
    if (isDef(invokerFns)) {
        // invoker
        return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
    }
    else {
        // @ts-expect-error
        return (fn._length || fn.length) > 1;
    }
}
function _enter(_, vnode) {
    if (vnode.data.show !== true) {
        enter(vnode);
    }
}
var transition = inBrowser
    ? {
        create: _enter,
        activate: _enter,
        remove: function (vnode, rm) {
            /* istanbul ignore else */
            if (vnode.data.show !== true) {
                // @ts-expect-error
                leave(vnode, rm);
            }
            else {
                rm();
            }
        }
    }
    : {};

var platformModules = [attrs, klass, events, domProps, style, transition];

// the directive module should be applied last, after all
// built-in modules have been applied.
var modules = platformModules.concat(baseModules);
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });

/**
 * Not type checking this file because flow doesn't like attaching
 * properties to Elements.
 */
/* istanbul ignore if */
if (isIE9) {
    // http://www.matts411.com/post/internet-explorer-9-oninput/
    document.addEventListener('selectionchange', function () {
        var el = document.activeElement;
        // @ts-expect-error
        if (el && el.vmodel) {
            trigger(el, 'input');
        }
    });
}
var directive = {
    inserted: function (el, binding, vnode, oldVnode) {
        if (vnode.tag === 'select') {
            // #6903
            if (oldVnode.elm && !oldVnode.elm._vOptions) {
                mergeVNodeHook(vnode, 'postpatch', function () {
                    directive.componentUpdated(el, binding, vnode);
                });
            }
            else {
                setSelected(el, binding, vnode.context);
            }
            el._vOptions = [].map.call(el.options, getValue);
        }
        else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
            el._vModifiers = binding.modifiers;
            if (!binding.modifiers.lazy) {
                el.addEventListener('compositionstart', onCompositionStart);
                el.addEventListener('compositionend', onCompositionEnd);
                // Safari < 10.2 & UIWebView doesn't fire compositionend when
                // switching focus before confirming composition choice
                // this also fixes the issue where some browsers e.g. iOS Chrome
                // fires "change" instead of "input" on autocomplete.
                el.addEventListener('change', onCompositionEnd);
                /* istanbul ignore if */
                if (isIE9) {
                    el.vmodel = true;
                }
            }
        }
    },
    componentUpdated: function (el, binding, vnode) {
        if (vnode.tag === 'select') {
            setSelected(el, binding, vnode.context);
            // in case the options rendered by v-for have changed,
            // it's possible that the value is out-of-sync with the rendered options.
            // detect such cases and filter out values that no longer has a matching
            // option in the DOM.
            var prevOptions_1 = el._vOptions;
            var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
            if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
                // trigger change event if
                // no matching option found for at least one value
                var needReset = el.multiple
                    ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
                    : binding.value !== binding.oldValue &&
                        hasNoMatchingOption(binding.value, curOptions_1);
                if (needReset) {
                    trigger(el, 'change');
                }
            }
        }
    }
};
function setSelected(el, binding, vm) {
    actuallySetSelected(el, binding, vm);
    /* istanbul ignore if */
    if (isIE || isEdge) {
        setTimeout(function () {
            actuallySetSelected(el, binding, vm);
        }, 0);
    }
}
function actuallySetSelected(el, binding, vm) {
    var value = binding.value;
    var isMultiple = el.multiple;
    if (isMultiple && !Array.isArray(value)) {
        "production" !== 'production' &&
            warn("<select multiple v-model=\"".concat(binding.expression, "\"> ") +
                "expects an Array value for its binding, but got ".concat(Object.prototype.toString
                    .call(value)
                    .slice(8, -1)), vm);
        return;
    }
    var selected, option;
    for (var i = 0, l = el.options.length; i < l; i++) {
        option = el.options[i];
        if (isMultiple) {
            selected = looseIndexOf(value, getValue(option)) > -1;
            if (option.selected !== selected) {
                option.selected = selected;
            }
        }
        else {
            if (looseEqual(getValue(option), value)) {
                if (el.selectedIndex !== i) {
                    el.selectedIndex = i;
                }
                return;
            }
        }
    }
    if (!isMultiple) {
        el.selectedIndex = -1;
    }
}
function hasNoMatchingOption(value, options) {
    return options.every(function (o) { return !looseEqual(o, value); });
}
function getValue(option) {
    return '_value' in option ? option._value : option.value;
}
function onCompositionStart(e) {
    e.target.composing = true;
}
function onCompositionEnd(e) {
    // prevent triggering an input event for no reason
    if (!e.target.composing)
        return;
    e.target.composing = false;
    trigger(e.target, 'input');
}
function trigger(el, type) {
    var e = document.createEvent('HTMLEvents');
    e.initEvent(type, true, true);
    el.dispatchEvent(e);
}

// recursively search for possible transition defined inside the component root
function locateNode(vnode) {
    // @ts-expect-error
    return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
        ? locateNode(vnode.componentInstance._vnode)
        : vnode;
}
var show = {
    bind: function (el, _a, vnode) {
        var value = _a.value;
        vnode = locateNode(vnode);
        var transition = vnode.data && vnode.data.transition;
        var originalDisplay = (el.__vOriginalDisplay =
            el.style.display === 'none' ? '' : el.style.display);
        if (value && transition) {
            vnode.data.show = true;
            enter(vnode, function () {
                el.style.display = originalDisplay;
            });
        }
        else {
            el.style.display = value ? originalDisplay : 'none';
        }
    },
    update: function (el, _a, vnode) {
        var value = _a.value, oldValue = _a.oldValue;
        /* istanbul ignore if */
        if (!value === !oldValue)
            return;
        vnode = locateNode(vnode);
        var transition = vnode.data && vnode.data.transition;
        if (transition) {
            vnode.data.show = true;
            if (value) {
                enter(vnode, function () {
                    el.style.display = el.__vOriginalDisplay;
                });
            }
            else {
                leave(vnode, function () {
                    el.style.display = 'none';
                });
            }
        }
        else {
            el.style.display = value ? el.__vOriginalDisplay : 'none';
        }
    },
    unbind: function (el, binding, vnode, oldVnode, isDestroy) {
        if (!isDestroy) {
            el.style.display = el.__vOriginalDisplay;
        }
    }
};

var platformDirectives = {
    model: directive,
    show: show
};

// Provides transition support for a single element/component.
var transitionProps = {
    name: String,
    appear: Boolean,
    css: Boolean,
    mode: String,
    type: String,
    enterClass: String,
    leaveClass: String,
    enterToClass: String,
    leaveToClass: String,
    enterActiveClass: String,
    leaveActiveClass: String,
    appearClass: String,
    appearActiveClass: String,
    appearToClass: String,
    duration: [Number, String, Object]
};
// in case the child is also an abstract component, e.g. <keep-alive>
// we want to recursively retrieve the real component to be rendered
function getRealChild(vnode) {
    var compOptions = vnode && vnode.componentOptions;
    if (compOptions && compOptions.Ctor.options.abstract) {
        return getRealChild(getFirstComponentChild(compOptions.children));
    }
    else {
        return vnode;
    }
}
function extractTransitionData(comp) {
    var data = {};
    var options = comp.$options;
    // props
    for (var key in options.propsData) {
        data[key] = comp[key];
    }
    // events.
    // extract listeners and pass them directly to the transition methods
    var listeners = options._parentListeners;
    for (var key in listeners) {
        data[camelize(key)] = listeners[key];
    }
    return data;
}
function placeholder(h, rawChild) {
    // @ts-expect-error
    if (/\d-keep-alive$/.test(rawChild.tag)) {
        return h('keep-alive', {
            props: rawChild.componentOptions.propsData
        });
    }
}
function hasParentTransition(vnode) {
    while ((vnode = vnode.parent)) {
        if (vnode.data.transition) {
            return true;
        }
    }
}
function isSameChild(child, oldChild) {
    return oldChild.key === child.key && oldChild.tag === child.tag;
}
var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
var isVShowDirective = function (d) { return d.name === 'show'; };
var Transition = {
    name: 'transition',
    props: transitionProps,
    abstract: true,
    render: function (h) {
        var _this = this;
        var children = this.$slots.default;
        if (!children) {
            return;
        }
        // filter out text nodes (possible whitespaces)
        children = children.filter(isNotTextNode);
        /* istanbul ignore if */
        if (!children.length) {
            return;
        }
        // warn multiple elements
        if (false) {
            warn('<transition> can only be used on a single element. Use ' +
                '<transition-group> for lists.', this.$parent);
        }
        var mode = this.mode;
        // warn invalid mode
        if (false) {
            warn('invalid <transition> mode: ' + mode, this.$parent);
        }
        var rawChild = children[0];
        // if this is a component root node and the component's
        // parent container node also has transition, skip.
        if (hasParentTransition(this.$vnode)) {
            return rawChild;
        }
        // apply transition data to child
        // use getRealChild() to ignore abstract components e.g. keep-alive
        var child = getRealChild(rawChild);
        /* istanbul ignore if */
        if (!child) {
            return rawChild;
        }
        if (this._leaving) {
            return placeholder(h, rawChild);
        }
        // ensure a key that is unique to the vnode type and to this transition
        // component instance. This key will be used to remove pending leaving nodes
        // during entering.
        var id = "__transition-".concat(this._uid, "-");
        child.key =
            child.key == null
                ? child.isComment
                    ? id + 'comment'
                    : id + child.tag
                : isPrimitive(child.key)
                    ? String(child.key).indexOf(id) === 0
                        ? child.key
                        : id + child.key
                    : child.key;
        var data = ((child.data || (child.data = {})).transition =
            extractTransitionData(this));
        var oldRawChild = this._vnode;
        var oldChild = getRealChild(oldRawChild);
        // mark v-show
        // so that the transition module can hand over the control to the directive
        if (child.data.directives && child.data.directives.some(isVShowDirective)) {
            child.data.show = true;
        }
        if (oldChild &&
            oldChild.data &&
            !isSameChild(child, oldChild) &&
            !isAsyncPlaceholder(oldChild) &&
            // #6687 component root is a comment node
            !(oldChild.componentInstance &&
                oldChild.componentInstance._vnode.isComment)) {
            // replace old child transition data with fresh one
            // important for dynamic transitions!
            var oldData = (oldChild.data.transition = extend({}, data));
            // handle transition mode
            if (mode === 'out-in') {
                // return placeholder node and queue update when leave finishes
                this._leaving = true;
                mergeVNodeHook(oldData, 'afterLeave', function () {
                    _this._leaving = false;
                    _this.$forceUpdate();
                });
                return placeholder(h, rawChild);
            }
            else if (mode === 'in-out') {
                if (isAsyncPlaceholder(child)) {
                    return oldRawChild;
                }
                var delayedLeave_1;
                var performLeave = function () {
                    delayedLeave_1();
                };
                mergeVNodeHook(data, 'afterEnter', performLeave);
                mergeVNodeHook(data, 'enterCancelled', performLeave);
                mergeVNodeHook(oldData, 'delayLeave', function (leave) {
                    delayedLeave_1 = leave;
                });
            }
        }
        return rawChild;
    }
};

// Provides transition support for list items.
var props = extend({
    tag: String,
    moveClass: String
}, transitionProps);
delete props.mode;
var TransitionGroup = {
    props: props,
    beforeMount: function () {
        var _this = this;
        var update = this._update;
        this._update = function (vnode, hydrating) {
            var restoreActiveInstance = setActiveInstance(_this);
            // force removing pass
            _this.__patch__(_this._vnode, _this.kept, false, // hydrating
            true // removeOnly (!important, avoids unnecessary moves)
            );
            _this._vnode = _this.kept;
            restoreActiveInstance();
            update.call(_this, vnode, hydrating);
        };
    },
    render: function (h) {
        var tag = this.tag || this.$vnode.data.tag || 'span';
        var map = Object.create(null);
        var prevChildren = (this.prevChildren = this.children);
        var rawChildren = this.$slots.default || [];
        var children = (this.children = []);
        var transitionData = extractTransitionData(this);
        for (var i = 0; i < rawChildren.length; i++) {
            var c = rawChildren[i];
            if (c.tag) {
                if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
                    children.push(c);
                    map[c.key] = c;
                    (c.data || (c.data = {})).transition = transitionData;
                }
                else if (false) {
                    var opts = c.componentOptions;
                    var name_1 = opts
                        ? getComponentName(opts.Ctor.options) || opts.tag || ''
                        : c.tag;
                    warn("<transition-group> children must be keyed: <".concat(name_1, ">"));
                }
            }
        }
        if (prevChildren) {
            var kept = [];
            var removed = [];
            for (var i = 0; i < prevChildren.length; i++) {
                var c = prevChildren[i];
                c.data.transition = transitionData;
                // @ts-expect-error .getBoundingClientRect is not typed in Node
                c.data.pos = c.elm.getBoundingClientRect();
                if (map[c.key]) {
                    kept.push(c);
                }
                else {
                    removed.push(c);
                }
            }
            this.kept = h(tag, null, kept);
            this.removed = removed;
        }
        return h(tag, null, children);
    },
    updated: function () {
        var children = this.prevChildren;
        var moveClass = this.moveClass || (this.name || 'v') + '-move';
        if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
            return;
        }
        // we divide the work into three loops to avoid mixing DOM reads and writes
        // in each iteration - which helps prevent layout thrashing.
        children.forEach(callPendingCbs);
        children.forEach(recordPosition);
        children.forEach(applyTranslation);
        // force reflow to put everything in position
        // assign to this to avoid being removed in tree-shaking
        // $flow-disable-line
        this._reflow = document.body.offsetHeight;
        children.forEach(function (c) {
            if (c.data.moved) {
                var el_1 = c.elm;
                var s = el_1.style;
                addTransitionClass(el_1, moveClass);
                s.transform = s.WebkitTransform = s.transitionDuration = '';
                el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {
                    if (e && e.target !== el_1) {
                        return;
                    }
                    if (!e || /transform$/.test(e.propertyName)) {
                        el_1.removeEventListener(transitionEndEvent, cb);
                        el_1._moveCb = null;
                        removeTransitionClass(el_1, moveClass);
                    }
                }));
            }
        });
    },
    methods: {
        hasMove: function (el, moveClass) {
            /* istanbul ignore if */
            if (!hasTransition) {
                return false;
            }
            /* istanbul ignore if */
            if (this._hasMove) {
                return this._hasMove;
            }
            // Detect whether an element with the move class applied has
            // CSS transitions. Since the element may be inside an entering
            // transition at this very moment, we make a clone of it and remove
            // all other transition classes applied to ensure only the move class
            // is applied.
            var clone = el.cloneNode();
            if (el._transitionClasses) {
                el._transitionClasses.forEach(function (cls) {
                    removeClass(clone, cls);
                });
            }
            addClass(clone, moveClass);
            clone.style.display = 'none';
            this.$el.appendChild(clone);
            var info = getTransitionInfo(clone);
            this.$el.removeChild(clone);
            return (this._hasMove = info.hasTransform);
        }
    }
};
function callPendingCbs(c) {
    /* istanbul ignore if */
    if (c.elm._moveCb) {
        c.elm._moveCb();
    }
    /* istanbul ignore if */
    if (c.elm._enterCb) {
        c.elm._enterCb();
    }
}
function recordPosition(c) {
    c.data.newPos = c.elm.getBoundingClientRect();
}
function applyTranslation(c) {
    var oldPos = c.data.pos;
    var newPos = c.data.newPos;
    var dx = oldPos.left - newPos.left;
    var dy = oldPos.top - newPos.top;
    if (dx || dy) {
        c.data.moved = true;
        var s = c.elm.style;
        s.transform = s.WebkitTransform = "translate(".concat(dx, "px,").concat(dy, "px)");
        s.transitionDuration = '0s';
    }
}

var platformComponents = {
    Transition: Transition,
    TransitionGroup: TransitionGroup
};

// install platform specific utils
Vue.config.mustUseProp = mustUseProp;
Vue.config.isReservedTag = isReservedTag;
Vue.config.isReservedAttr = isReservedAttr;
Vue.config.getTagNamespace = getTagNamespace;
Vue.config.isUnknownElement = isUnknownElement;
// install platform runtime directives & components
extend(Vue.options.directives, platformDirectives);
extend(Vue.options.components, platformComponents);
// install platform patch function
Vue.prototype.__patch__ = inBrowser ? patch : noop;
// public mount method
Vue.prototype.$mount = function (el, hydrating) {
    el = el && inBrowser ? query(el) : undefined;
    return mountComponent(this, el, hydrating);
};
// devtools global hook
/* istanbul ignore next */
if (inBrowser) {
    setTimeout(function () {
        if (config.devtools) {
            if (devtools) {
                devtools.emit('init', Vue);
            }
            else if (false) {
                // @ts-expect-error
                console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' +
                    'https://github.com/vuejs/vue-devtools');
            }
        }
        if (false) {
            // @ts-expect-error
            console[console.info ? 'info' : 'log']("You are running Vue in development mode.\n" +
                "Make sure to turn on production mode when deploying for production.\n" +
                "See more tips at https://vuejs.org/guide/deployment.html");
        }
    }, 0);
}




/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {//content-env 与  extension-env 通信


module.exports.trigger = function (data) {
  if (document.createEvent) {
    var evt = document.createEvent('CustomEvent');
    data.evt_from = G.from_device || 'externalJS';
    evt.initCustomEvent('gwd_extension', true, true, data);
    document.dispatchEvent(evt);
  }
};

module.exports.on = function (cb) {
  if (document.addEventListener) {
    document.addEventListener('gwd_content', function (e) {
      if (navigator.userAgent.indexOf('Firefox') > -1) {
        cb(JSON.parse(e.detail));
      } else {
        cb(e.detail);
      }
    });
  } else {
    document.attachEvent('gwd_content', function (e) {
      cb(e.detail);
    });
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var request = __webpack_require__(3);
var communicate = __webpack_require__(18);

var sendtj = function sendtj(src) {
  var img = new Image();
  img.src = src;
};

function deepCopy(obj) {
  return $.extend(true, {}, obj);
}
module.exports.deepCopy = deepCopy;
module.exports.settings = function (key, value) {
  communicate.trigger({
    'type': 'setStorage',
    'key': key,
    'value': value
  });
};

module.exports.setStorage = function (key, value) {
  communicate.trigger({
    'type': 'setStorageChrome',
    'key': key,
    'value': value
  });
};

module.exports.getStorage = function (key) {
  return new Promise(function (resolve) {
    var id = Date.now();
    communicate.trigger({
      'type': 'getStorage',
      'key': key,
      'id': id
    });
    communicate.on(function (info) {
      if (info.type === 'getStorage' + id) {
        resolve(info.value ? info.value[key] : null);
      }
    });
  });
};

module.exports.getParameterByName = function (name, url) {
  if (!url) {
    url = window.location.href;
  }
  name = name.replace(/[\[\]]/g, "\\$&");
  var regex = new RegExp("[?#&]" + name + "(=([^&#]*)|&|#|$)"),
      results = regex.exec(url);
  if (!results) return null;
  if (!results[2]) return '';
  return decodeURIComponent(results[2].replace(/\+/g, " "));
};

module.exports.getDicts = function (callback) {
  var url = G.server + '/brwext/permanent_id';
  request.get(url).done(function (data) {
    if (data && data.force) G.force = data.force;
    callback();
  });
};
var run = undefined;
module.exports.getPermanent = function (callback) {
  var url = G.server + '/extension?ac=bdextPermanent';
  __webpack_require__(6).log('before');
  request.get(url).done(function (data) {
    __webpack_require__(6).log('after');
    for (var pattern in data) {
      G[pattern] = data[pattern];
    }
    if (!run) {
      callback();
      run = true;
    }
  });
};
module.exports.clearRun = function () {
  run = false;
};
module.exports.setPermanent = function (op, key, value) {
  var request = __webpack_require__(3);
  request.get(G.server + '/extension?ac=bdextPermanent&op=' + op + '&' + key + '=' + value).done(function (msg) {
    G[key] = value;
  });
};
module.exports.tongjiLog = function (k) {
  var userid = G.userid;
  if (G.from_type === 'bjg_360') return;
  if (G.from_type === 'bjg_chm') return;
  if (G.site && (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1)) return;
  G.site = G.site || '';
  var url = G.server + '/visit/?userid=' + userid + '&from_device=' + G.from_device + '&action=' + k + '&refer=' + encodeURIComponent(document.referrer) + '&site=' + G.site;
  sendtj(url);
};
module.exports.formatPrice = function (price) {
  if (!price) return '';
  price = price.toString();
  price = price.replace(/[￥¥,]+/, '');
  price = Number(price);
  if (price < 50000) {
    price = price.toFixed(2);
  }
  return price;
};
module.exports.tongji = function (mod, k, url) {
  var l2411 = '0',
      l2412 = '0';
  var tts = '';
  url = url || '';

  var pageurl = location.href;
  var title = document.title;
  var obj = {
    '2401': pageurl,
    '2402': mod,
    '2403': title
  };
  if (url) {
    obj['url'] = url;
  }
  if (k === 'show') {
    obj['2411'] = '1';
  } else if (k === 'click') {
    obj['2412'] = '1';
  }

  communicate.trigger({
    'type': 'tongji',
    'value': JSON.stringify(obj)
  });
};

module.exports.getTimeNumber = function (time, type) {
  // 1: xxxx-xx-xx 2.xx-xx 3.xx.xx 4. xxxx.xx.xx
  var dateObj = new Date(time);
  var y = dateObj.getFullYear();
  var m = dateObj.getMonth() + 1;
  var d = dateObj.getDate();
  var f = function f(x) {
    return x < 10 ? '0' + x : x;
  };
  var h = f(dateObj.getHours());
  var min = f(dateObj.getMinutes());
  var s = f(dateObj.getSeconds());

  if (m < 10) m = '0' + m;
  if (d < 10) d = '0' + d;
  var str = '';
  switch (type) {
    case "1":
      str = y + '-' + m + '-' + d;
      break;
    case "2":
      str = m + '-' + d;
      break;
    case "3":
      str = m + '.' + d;
      break;
    case "4":
      str = y + '.' + m + '.' + d;
      break;
    case "5":
      str = y + '/' + m + '/' + d;
      break;
    case "6":
      str = y + '-' + m + '-' + d + ' ' + h + ':' + min + ':' + s;
      break;
    default:
      str = '(' + y + '.' + m + '.' + d + ')';
  }
  return str;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {/*
 * 商品信息提取模块，
 * 用来提取商品标题/ISBN等基本信息
 * @version:1.0
 * @author:mllong(mllong0925@gmail.com)
 * @since:2013-06-17
 */


var _this = this;

var siteInfo = __webpack_require__(35);
var priceParser = __webpack_require__(36);
var detect = __webpack_require__(44);
var isbnTran = __webpack_require__(237);
var parseprice = __webpack_require__(21);
var util = __webpack_require__(10);
//返回单品页的标题信息
var getProductInfo = function getProductInfo() {
  return {
    name: $('title').html(),
    price: 0,
    isbn: '',
    url: window.location.href
  };
};

var getPrice = function getPrice(selector) {
  if ($(selector).length) {
    var text = $(selector).eq(0).text().trim();
    if (text.includes('定金') || text.includes('首付') || text.includes('尾款') || text.includes('?')) {
      return '';
    }
    // get only number part
    text = text.replace(/[^0-9.]/g, '');
    if (!isNaN(parseFloat(text))) {
      return text;
    }
  }
  return '';
};

var tbInfoFix = function tbInfoFix(info) {
  if (!info) return {};
  var shopName = $('.tb-shop-name a').text();
  if (!shopName) {
    shopName = $('[class^=ShopHeader--title]').text();
  }
  if (!shopName) {
    shopName = $('.slogo-shopname strong').text();
  }
  if (!shopName) {
    shopName = $('.shop-name-link').attr('title');
  }
  if (!shopName) {
    shopName = $('.shop-name-link').text();
  }
  if (!shopName) {
    shopName = $('[class^=ShopHeader--shopName--]').text();
  }
  if (!shopName) {
    shopName = $('[class^=ShopHeaderNew--shopName--]').text();
  }
  if (!shopName) {
    shopName = $('[class^=shopName--]').text();
  }
  info.shopName = (shopName || '').trim();

  var shopAmount = $('#J_SellCounter').text();
  if (!shopAmount) {
    shopAmount = $('[class^=ItemHeader--salesDesc]').text();
  }
  if (!shopAmount) {
    shopAmount = $('[class^=salesDesc]').text();
  }
  if (!shopAmount) {
    shopAmount = $('[class^=subTitleInnerWrap--]').text().replace('已售', '');
  }
  info.shopAmount = (shopAmount || '').trim();
  var pageTitle = __webpack_require__(10).findStringFromSelectors(['[class^=ItemTitle--root--] h1', '[class^=ItemTitle--] h1']);
  if (pageTitle) {
    info.name = pageTitle;
  }

  if (!info.price) {
    var toCheck = ['[class^=extraPrice--]', '[class^=originPrice--]', '.text--Mdqy24Ex', '.priceText--YZzF3UMh', '[class^=highlightPrice--]'];
    for (var i = 0; i < toCheck.length; i++) {
      info.price = getPrice(toCheck[i]);
      if (info.price) break;
    }
  }

  var secPrice = $('[class^=SecurityPrice--text--]').text();
  if (secPrice) {
    info.price = secPrice;
  }
  if (!info.img && G.GwdConfig) {
    var imgCfg = G.GwdConfig.aliImgSelector;
    if (imgCfg) {
      for (var i = 0; i < imgCfg.length; i++) {
        var img = $(imgCfg[i].img).attr('src');
        if (img) {
          info.img = img;
          info.pic = img;
          break;
        }
      }
    }
  }
  return info;
};

//提取第三方评测导购网站中的商品信息
var getArticleInfo = function getArticleInfo(className, childPos, newSiteName) {
  var dp = getProductInfo();
  G.site = newSiteName;
  try {
    var a = $(className).eq(childPos);
    dp.name = a.text();
    G.href = G.makeUrl(G.href, a.attr('href'));
    dp.url = G.href;
    if (typeof G.href == 'undefined' || G.href == "") {
      dp.useless = true;
    } else {
      var check = siteInfo.isProductPage();
      if (!check) {
        dp.useless = true;
      }
    }
  } catch (e) {

    dp.useless = true;
  }
  return dp;
};
var getArticleInfoNew = function getArticleInfoNew(className, childPos, attr, newSiteName) {
  var dp = getProductInfo();
  G.site = newSiteName;
  if (G.crc64) return dp;
  try {
    var a = $(className).eq(childPos);
    G.href = a.attr(attr);
    dp.url = a.attr(attr);
    if (a.attr(attr)) dp.url = a.attr(attr);
    if (typeof G.href == 'undefined' || G.href == "") {
      G.href = window.location.href;
    }
  } catch (e) {}
  return dp;
};
//商品信息提取模板
var productPattern = {
  'oneplus': function oneplus() {
    var dp = getProductInfo();
    dp.price = $('.price .num').text();
    return dp;
  },
  'wjike': function wjike() {
    return {
      name: $('.pb_tl').eq(0).text(),
      price: $('.pr2 .pc i').eq(0).text()
    };
  },
  'kinhom': function kinhom() {
    return {
      name: $('.item-title').text(),
      price: $('#J_itemActivePrice').text()
    };
  },
  'hpstore': function hpstore() {
    return {
      price: $('.price-box .price').eq(0).text()
    };
  },
  'tthigo': function tthigo() {
    return {
      name: $('.item-title').text(),
      price: $('.item-price-current').text()
    };
  },
  'yoox': function yoox() {
    return {
      name: $('#yoox').text(),
      price: $('#item-price .font-bold').text()
    };
  },
  'feiniu': function feiniu() {
    return {
      name: $('#main_info_guidance_title').text(),
      price: $('.info-price>.JS-control-price').text()
    };
  },
  'suanjuzi': function suanjuzi() {
    return {
      name: $('.product-titles h2').text(),
      price: $('.action-pro_price').text()
    };
  },
  'ikjtao': function ikjtao() {
    return {
      name: $('#sidebar .title').text(),
      price: $('#goodsPrice').text()
    };
  },
  'meizu': function meizu() {
    return {
      name: $('#property .property-hd h1').text(),
      price: $('#J_price').text()
    };
  },
  'kaluli': function kaluli() {
    return {
      name: $('.pro-detail > h1').text(),
      price: $('#kaluliPrice').text()
    };
  },
  'opposhop': function opposhop() {
    return {
      name: 'oppo   ' + $('.product-title').text(),
      price: $('.buying-price .price').text()
    };
  },
  'yao123': function yao123() {
    return {
      name: $('.inner>h1').text(),
      price: $('#opr').text()
    };
  },
  'baobeigezi': function baobeigezi() {
    return {
      name: $('#itemInfo>.name>h1').text(),
      price: $('#bb_price').text()
    };
  },
  'to8to': function to8to() {
    return {
      name: $('#p_name').text(),
      price: $('span[name=goods_real_price]').eq(0).text()
    };
  },
  'yangkeduo': function yangkeduo() {
    return {
      name: $('.enable-select').text(),
      price: $('._15NyfC_w').text()
    };
  },
  'shangpin': function shangpin() {
    var brandName = $('.spDetail_price_box > h2 > a').text();
    if (!brandName) {
      brandName = $('.spDetail_price_box > h3 > a').text();
    }
    var result = {
      name: brandName + ' ' + $('.commodity_title').text(),
      price: $('.spDetail_spPriceBigRed > i').text(),
      img: $('#spDetail_bigImg > img').attr('src')
    };
    if (!result.price) {
      result.price = $('.spDetail_spPriceBig > i').text();
    }
    if (!result.price) {
      result.price = $('em.font_18').text();
    }
    return result;
  },
  'zhongjiu': function zhongjiu() {
    var name = $('.info > h1').text();
    var price = $('.pri > b').text();
    if (!name) {
      name = $('.c_t_list > li > span').text();
      price = $('.buy_pri').text();
    }
    var result = {
      name: name,
      price: price
    };
    return result;
  },
  'lemall': function lemall() {
    var name = $('.pro_name').eq(0).text();
    var price = $('#all_price').text();
    if (price == '') price = $('.section_text .red .font48').eq(0).text();
    if (name == '') name = $('.product_info_attribute .title').text();
    return {
      name: "乐视" + name,
      price: price
    };
  },
  'juanpi': function juanpi() {
    return {
      name: $('.deal-wrap h1').text(),
      price: $('.price .current').text()
    };
  },
  'hisense': function hisense() {
    return {
      name: $('.detail_info h3').text(),
      price: $('#salePriceId').text()
    };
  },
  'purcotton': function purcotton() {
    return {
      name: $('.goods-tite h5').eq(0).text(),
      price: $('.price').eq(0).text()
    };
  },
  'wstx': function wstx() {
    return {
      name: $('.itemInfo .title').text(),
      price: $('.itemInfo .price b').text()
    };
  },
  'royyoungchemist': function royyoungchemist() {
    return {
      name: $('.product-name').eq(0).text()
    };
  },
  'medihealshop': function medihealshop() {
    return {
      name: $('.product-name').eq(0).text(),
      price: $('.rmb-price').eq(0).text()
    };
  },
  '1-163': function _() {
    return {
      name: $('.m-detail-main-title h1').text()
    };
  },
  '1001pharmacies': function pharmacies() {
    return {
      name: $('.product-name h1').eq(0).text(),
      price: $('.rmb-price').eq(0).text()
    };
  },
  'lookfantastic-cn': function lookfantasticCn() {
    return {
      name: $('.product-title').eq(0).text(),
      price: $('.product-price .price').eq(0).text()
    };
  },
  'guojimami': function guojimami() {
    return {
      name: $('#ECS_FORMBUY .name').text(),
      price: $('#ECS_SHOPPRICE').text(),
      img: $('#demo li img').eq(0).attr('src')
    };
  },
  'jinxiang': function jinxiang() {
    return {
      name: $('.name').eq(0).text(),
      price: $('.jxPrice').eq(0).text()
    };
  },
  'you163': function you163() {
    return {
      name: $('.info .name').eq(0).text(),
      price: $('.j-retail-price').eq(0).text()
    };
  },
  'bl': function bl() {
    return {
      name: $('.goods-name h1').eq(0).text().replace('百联自营', '').trim(),
      price: $('#FlashPrice').text()
    };
  },
  'bestinfoods': function bestinfoods() {
    return {
      name: $('.goodsname').eq(0).text(),
      price: $('.price1').eq(0).text()
    };
  },
  'axmall': function axmall() {
    return {
      name: $('.goods-intro .name').text(),
      price: $('#sku_vip_price').text()
    };
  },
  'bftv': function bftv() {
    return {
      name: $('.title h2').text(),
      price: $('.price').text()
    };
  },
  'wangjiu': function wangjiu() {
    return {
      name: $('.part_line01').text(),
      price: $('.part_line04 .spare02 span').text()
    };
  },
  '189': function _() {
    var title = $('#articleshorttitle').text();
    var price = $('#mall_price').text();
    var brand_string = '';
    if (title == '') title = $('.ph-title h1').eq(0).text().replace('仅限江西省用户', '');
    if (title.toLowerCase().indexOf('iphone') > -1) brand_string = "苹果";
    if (price == '') price = $('#assprice').text();
    return {
      name: brand_string + title,
      price: price,
      brand_string: brand_string
    };
  },
  'taqu': function taqu() {
    return {
      name: $('.details-name').eq(0).text(),
      price: $('#details-price').text()
    };
  },
  'bestcake': function bestcake() {
    return {
      name: $('.info-right-li p').eq(0).text(),
      price: $('.info-right-li .s4').eq(0).text()
    };
  },
  'gomehigo': function gomehigo() {
    return {
      name: $('#gm-prd-main li.prdtit').text(),
      price: $('#prdPrice').text()
    };
  },
  'lovo': function lovo() {
    return {
      name: $('#goodsNameStrong').text(),
      price: $('#actMsgS big').text()
    };
  },
  'zhe800': function zhe800() {
    return {
      name: $('#detail .detailmeta .clear h1').text(),
      price: $('.price .js_price_st').text()
    };
  },
  'hua': function hua() {
    return {
      name: $('.product-r .title h3.product-title').text(),
      price: $('#fjr .price-sell .price-num').text()
    };
  },
  'mei': function mei() {
    return {
      name: $('.Product_title').text() + ' ' + $('.product_name h1').text(),
      price: $('#productRMB').text()
    };
  },
  'benlai': function benlai() {
    var price = $('#intro_price .price')[0].firstChild.nodeValue;
    if (price == '' || !price) price = $('#intro_price .price').text();
    return {
      'price': price,
      'name': $('#Product_ProductDetailsName').text()
    };
  },
  'vsigo': function vsigo() {
    return {
      name: $('h1').text(),
      price: $('.detail-price').text()
    };
  },
  'fengqu': function fengqu() {
    return {
      name: $('h1').text(),
      price: $('.goods-price .goods-price-r1 strong').text()
    };
  },
  'vmei': function vmei() {
    var price = $('#currPrice').text();
    if (price.indexOf('-') > -1) price = price.split('-')[0];
    return {
      name: $('.product_detail_title h1').text(),
      price: price
    };
  },
  'easeeyes': function easeeyes() {
    return {
      name: $('.main div.goods_name_tr span').text(),
      price: $('.main p.color9 span.fs20.fontArial').text()
    };
  },
  'staples': function staples() {
    return {
      'name': $('.productInfo h3 span').text(),
      'price': $('.nowPrice').text()
    };
  },
  'efotile': function efotile() {
    return {
      'name': $('.item-title').text(),
      'price': $('.item-actPrice b').text()
    };
  },
  'jgb': function jgb() {
    return {
      name: $('.h_des_title').text(),
      price: $('.h_des_price .J_rmb_price').text()
    };
  },
  '51din': function din() {
    return {
      name: $('.product_title > div').eq(0).text(),
      price: $('.price_rmb').text()
    };
  },
  'aidai': function aidai() {
    return {
      name: $('.pro-det h3').text(),
      price: $('#_thisfp').text()
    };
  },
  'boqii': function boqii() {
    return {
      name: $('.shop_name').text(),
      price: $('#bqPrice').text()
    };
  },
  'spider': function spider() {
    return {
      name: $('.gdName h1').text(),
      price: $('#m12priceSpan').text()
    };
  },
  'taobao-xianyu': function taobaoXianyu() {
    return {
      name: $('h1.title').text(),
      price: $('.price-block .price em').text()
    };
  },
  'ai-taobao': function aiTaobao() {
    var price = undefined;
    if (!G.chrome_extension) {
      price = window.pageconfig.promoPrice;
      if (!price) {
        price = window.ENV_DATA && window.ENV_DATA.compList && window.ENV_DATA.compList.item_detail && window.ENV_DATA.compList.item_detail.data && window.ENV_DATA.compList.item_detail.data.data1[0].price;
      }
      return {
        name: $('h3.item-title a').text(),
        price: price,
        url: window.pageconfig.itemId ? 'http://item.taobao.com/item.htm?id=' + window.pageconfig.itemId : null
      };
    }
    var pageconfig = $('.aitaobao-edetail-header script').text();
    var itemId = /itemId":"(\d+)"/.exec(pageconfig);
    if (itemId) itemId = itemId[1];
    price = /promoPrice":"([\d\.]+)"/.exec(pageconfig);
    if (price) price = price[1];
    return {
      name: $('h3.item-title a').text(),
      price: price,
      url: itemId ? 'http://item.taobao.com/item.htm?id=' + itemId : null
    };
  },
  'm6go': function m6go() {
    return {
      name: $('.goodsName h1').text(),
      price: $('#SGoodsPrice').text().replace(/[\s]+/g, '')
    };
  },
  'logitech': function logitech() {
    return {
      name: $('h1.product-title').text()
    };
  },
  'kjt': function kjt() {
    return {
      name: $('.prodetailtitle h1').text(),
      price: $('li.priceinfop span:first').text()
    };
  },
  'test': function test() {
    return {
      url: $('#url').text()
    };
  },
  'philips': function philips() {
    return {
      name: $('h1.sku-name').text()
    };
  },
  'tcl': function tcl() {
    return {
      name: $('.p_name').text()
    };
  },
  'changhong': function changhong() {
    return {
      name: $('.pc_name').text()
    };
  },
  'konka': function konka() {
    return {
      name: $('.g_title h1').text()
    };
  },
  'ineigo': function ineigo() {
    return {
      name: $('h5.ProName').text()
    };
  },
  'skg': function skg() {
    return {
      name: $('.product-titles').text()
    };
  },

  'k-touch': function kTouch() {
    return {
      name: $('.pro_title').text()
    };
  },
  'gionee': function gionee() {
    return {
      name: $('#goodName').text()
    };
  },
  '51buy': function buy() {
    var dp = getProductInfo();
    dp.price = $('.mod_price[itemprop="lowPrice"]').text().replace(/[￥¥\s]+/g, '');
    if (dp.price == '') dp.price = window.itemInfo && window.itemInfo.price / 100;
    if (dp.price == '') dp.price = $('.xbase_item  .mod_price ').text();
    dp.name = window.itemInfo && window.itemInfo.name;
    dp.brand_string = window.itemInfo && window.itemInfo.brand_name;
    return dp;
  },
  'vivo': function vivo() {
    return {
      name: document.title,
      price: $('.now-price').text()
    };
  },
  'taobao-95095': function taobao95095() {
    var dp = getProductInfo();
    dp.price = $('#J_PromoPrice .tm-price').text();
    dp.name = $('#J_DetailMeta .tb-detail-hd h1').text();
    if (!dp.price) dp.price = $('#J_StrPriceModBox .tm-price').text();
    return dp;
  },
  'walmart': function walmart() {
    var dp = getProductInfo();
    dp.name = $('.js-product-heading span').text();
    dp.price = $('.js-price-display').text();
    dp.img = $('.js-product-media .slick-track li a img').eq(0) && $('.js-product-media .slick-track li a img').eq(0).attr('src');
    return dp;
  },
  'kongfz': function kongfz() {
    var dp = getProductInfo();
    var isbn = $('.item:contains("ISBN") .text-value').text();
    if (!isbn) {
      isbn = $('li:contains("ISBN") > span:eq(1)').text().trim();
    }
    dp.isbn = isbn;
    dp.name = isbn;
    return dp;
  },
  'haituncun': function haituncun() {
    var dp = getProductInfo();
    dp.name = $('.product-name h1').text();
    dp.price = $('.rmb-price').text();
    dp.img = $('.product-img-box li img').eq(0) && $('.product-img-box li img').eq(0).attr('src');
    return dp;
  },
  'ebay': function ebay() {
    return {
      name: $('#itemTitle').text().replace(/^Details about/ig, ''),
      price: $('#prcIsum').attr('content'),
      img: $('#vi_main_img_fs ul li img').eq(0).attr('src')
    };
  },
  'wy163': function wy163() {
    return {
      name: $('.PInfo dt').eq(0).text() || $('.mv_name').text()
    };
  },
  'dianping': function dianping() {
    return {
      name: $('.deal-title h1,h1.title').text().replace(/\[.*\]/ig, '')
    };
  },
  'nuomi': function nuomi() {
    var pdetails = $('.details p.dp') && $('.details p.dp').text() || '';
    var name = '';
    try {
      name = $('.details h1').text().replace(/^\u3010.+\u3011/i, '');
    } catch (e) {}
    name = name + pdetails;
    return {
      'name': name
    };
  },
  'meituan': function meituan() {
    return {
      name: $('.deal-component-title').text(),
      isbn: ''
    };
  },
  'meilishuo': function meilishuo() {
    var name = $('.goods-title').eq(0).text();
    var price = $('#J_NowPrice').text();
    if (name == '') name = $('h3.s_tle').text();
    return {
      name: name,
      price: price
    };
  },
  'sfht': function sfht() {
    var dp = getProductInfo();
    dp.name = $('#titleInfo h1').text();
    dp.price = $('#itemPrice .goods-price-r1 strong').text();
    return dp;
  },
  'meici': function meici() {
    var dp = getProductInfo();
    dp.name = $('#subpro .relative span').text();
    var isprice = $('.pro_price .price').text().match(/[0-9.]+/);
    if (isprice) dp.price = isprice[0];
    return dp;
  },
  'jianke': function jianke() {
    var dp = getProductInfo();
    dp.name = $('.det_title h1').text();
    var pri = $('.Price_info .bigPrice dd em').text().match(/[0-9.]+/);
    if (pri) dp.price = pri[0];
    return dp;
  },
  'gome-home': function gomeHome() {
    var dp = getProductInfo();
    dp.name = $('.prdmain .prdtit').text();
    var price = $('#prdPrice').text().replace(/\s/g, '').match(/[0-9.]+/);
    if (price) dp.price = price[0];
    return dp;
  },
  'nike': function nike() {
    var dp = getProductInfo();
    dp.name = $('.product-title-text').text();
    dp.price = $('.product-price').text();
    return dp;
  },
  '360kad': function kad() {
    var dp = getProductInfo();
    dp.name = $('.YIrd_l li').eq(0).text().replace("商品名称：", "");
    dp.price = $('#pricenumber').text();
    var arr = dp.url.split('/');
    var url = arr[0] + '//';
    var html = arr[arr.length - 1].split('.');
    for (var i = 2; i < arr.length - 1; i++) {
      url = url + arr[i] + '/';
    }
    var productId = $("div.Ydrug_info dl:first dd").text();
    if (productId) {
      dp.url = url + $("div.Ydrug_info dl:first dd").text() + '.' + html[1];
    } else {
      dp.url = location.href;
    }

    return dp;
  },
  'lbxcn': function lbxcn() {
    var dp = getProductInfo();
    dp.name = $('.detailPas').text().replace(/\s/g, "");
    dp.price = $('#lblPrice').text();
    return dp;
  },
  'mogujie': function mogujie() {
    var dp = getProductInfo();
    dp.name = "";
    dp.name = $('.goods-title').text();
    if (dp.name == "") {
      dp.name = $('div.shoptitle').text();
    }
    if (dp.name == "") {
      dp.name = $('.goodstitle').text();
    }
    return dp;
  },
  'coolpad': function coolpad() {
    return {
      name: $('.good_name h1').text()
    };
  },
  'ztedevice': function ztedevice() {
    return {
      name: $('.znproducts h3').text()
    };
  },
  'lenovo': function lenovo() {
    var dp = getProductInfo();
    dp.price = $('#gprice').text();
    if (dp.price == '') dp.price = window.price;
    dp.name = $('.goodsname').text();
    if (dp.name == '') dp.name = $('.de_proname').text();
    if (!dp.price) {
      dp.price = $('.price-show').text();
    }
    return dp;
  },
  'showjoy': function showjoy() {
    var dp = getProductInfo();
    dp.name = $('.choose-hd').text().replace(/\s/g, '');
    dp.price = $('#J_MainPrice .sj-price-text').text();
    return dp;
  },
  'ocj': function ocj() {
    var dp = getProductInfo();
    dp.name = $('.pv_shop_detail_title h1').text();
    dp.price = $('.info_box .val .price').text();
    return dp;
  },
  'ocj-tuan': function ocjTuan() {
    var dp = getProductInfo();
    dp.name = $('.product-info > h1').text().replace(/\s/g, '');
    var price = $('.product_price_cont .p1').html().match(/\/span\>([0-9.]+)\</);
    if (price) dp.price = price[1];
    if (dp.price == '') dp.price = $('.product_price_cont .p1').text();
    if (dp.name == '') dp.name = $('.product-info  h1 .title').text();
    return dp;
  },
  'ocj-kr': function ocjKr() {
    var dp = getProductInfo();
    dp.name = $('.pv1_li_table_wrap th:contains("品名")+td').text();
    dp.price = $('.pricekorea').text();
    return dp;
  },
  'gjw': function gjw() {
    return {
      'name': $('.silder_column_name span').text(),
      'isbn': ''
    };
  },
  'apple': function apple() {
    var dp = getProductInfo();
    dp.price = $('.price-point-fullPrice span').eq(0).text();
    return dp;
  },
  'jumei': function jumei() {
    var dp = getProductInfo();
    dp.name = $('h1.pop_detail_tit').text();
    if (dp.name == "") {
      dp.name = $("title").html();
      var title_arr = $("title").html().split("-");
      title_arr.pop();
      title_arr.pop();
      try {
        dp.name = title_arr.join('-');
      } catch (err) {}
    }
    dp.price = $('#mall_price_detail .price_num').text();
    if (dp.price == '') {
      dp.price = $('#stream_id').attr('price');
    }
    return dp;
  },
  'jumeiglobal': function jumeiglobal() {
    var dp = getProductInfo();
    try {
      dp.price = $('.jumei_price').text().match(/[0-9.]+/)[0];
      dp.name = $('.deal_con_content td:contains("商品名称")').parent().find('td').eq(1).text();
    } catch (e) {}
    if (dp.price == '') {
      dp.price = $('#stream_id').attr('price');
    }
    return dp;
  },
  'yunhou': function yunhou() {
    var dp = getProductInfo();
    dp.name = $('.goods-name h1').text();
    dp.price = $('#jPriceNormal').text();
    dp.img = $('.pic-pager .pic-list a img').eq(0) && $('.pic-pager .pic-list a img').eq(0).attr('src');
    if (dp.price == '') dp.price = $('.jFirstPrice').text();
    return dp;
  },
  'boohee': function boohee() {
    var dp = getProductInfo();
    dp.name = $('.widget-goods-primary .row-des h1').text();
    dp.price = $('.col-price b').text().match(/[0-9.]+/)[0];
    return dp;
  },
  'moonbasa': function moonbasa() {
    var name = '';
    try {
      name = $('.p_info h2').html().replace(/<[^>]*[\s\S]*[^<]*>/ig, '');
      name = $.trim(name);
    } catch (e) {}
    return {
      'name': name
    };
  },
  'homevv': function homevv() {
    var dp = getProductInfo();
    dp.name = $('.shop_name p[class="hdr_1"]').text();
    dp.name = dp.name.replace(/<div[^>]*[\s\S]*[^<]*\/div>/ig, '');
    dp.name = dp.name.replace(/<span[^>]*[\s\S]*[^<]*\/span>/ig, '');
    dp.name = dp.name.replace(/&nbsp;/ig, '');
    dp.name = $.trim(dp.name);
    return dp;
  },
  'paixie-faxian': function paixieFaxian() {
    var dp = getProductInfo();
    dp.name = $('.find-info-product a p').eq(0).text();
    dp.price = $('.find-info-product a span').eq(0).text().match(/[0-9.]+/)[0];
    return dp;
  },
  'xiaomi': function xiaomi() {
    var dp = getProductInfo();
    dp.price = $('#J_goodsInfoBlock .J_mi_goodsPrice').text();
    dp.name = $('.name').eq(0).text();
    if (!dp.name) {
      dp.name = $('.product-con h2').text();
    }
    if (dp.price == '') {
      try {
        dp.price = $('.J_proPrice')[0].childNodes[0].nodeValue;
      } catch (e) {
        var price = $('.J_proPrice').text().match(/[0-9.]+/);
        if (price) dp.price = price[0];
      }
    }
    return dp;
  },
  "youpin-mi": function youpinMi() {
    return {
      'name': $('.sku-container .good-name').text(),
      'price': $('.price .value').text()
    };
  },
  'ihush': function ihush() {
    return {
      'name': $('h1.title').text()
    };
  },
  '1688': function _() {
    G.site = "1688";
    var sattrs = new Array();
    var brand = $('.de-feature:contains(\"品牌\")').text();
    if (brand) {
      sattrs.push(brand);
    }
    var no = $('.de-feature:contains(\"系列\")').length > 0 ? $('.de-feature:contains(\"系列\")').text() : null;
    no = !no ? $('.de-feature:contains(\"货号\")').length > 0 ? $('.de-feature:contains(\"货号\")').text() : null : no;
    no = !no ? $('.de-feature:contains(\"型号\")').length > 0 ? $('.de-feature:contains(\"型号\")').text() : null : no;
    if (no) {
      sattrs.push(no);
    }
    var isbn = $('.de-feature:contains(\"书号\")').length > 0 ? $('.de-feature:contains(\"书号\")').text() : null;
    isbn = isbn ? isbn.substr(isbn.indexOf('：') + 1) : null;
    if (isbn) {
      sattrs.push('ISBN：' + isbn);
    }
    sattrs = sattrs.join("|");
    return {
      'name': $('#mod-detail-hd h1').text(),
      'isbn': '',
      'skeyword': sattrs
    };
  },
  'womai-related': function womaiRelated() {
    // return getArticleInfo(".detail_goods_cont a", 0, "womai");
    return {
      name: $('.pro_tit_top_forcombi').text(),
      price: $('#combiProductMarketPrice').text()
    };
  },
  '139shop-article': function shopArticle() {
    return getArticleInfo(".rginfo dt a", 0, "139shop");
  },
  'zol-article': function zolArticle() {
    return getArticleInfo(".nav-header>a ", 1, "zol");
  },
  'pconline-article': function pconlineArticle() {
    return getArticleInfo(".navProWrap h3 a", 0, "pconline");
  },
  'yesky-article': function yeskyArticle() {
    return getArticleInfo(".artitle h3 a", 0, "yesky");
  },
  'it168-article': function it168Article() {
    return getArticleInfo(".bj980 .bj1 div>a", 0, "it168");
  },
  'pcpop-article': function pcpopArticle() {
    return getArticleInfo(".bj980 .bj1 a", 0, "pcpop");
  },
  'pchome-article': function pchomeArticle() {
    return getArticleInfo(".navProWrap h3 a", 0, "pchome");
  },
  'newegg': function newegg() {
    var dp = getProductInfo();
    dp.name = $('#proCtner .proHeader h1').text();
    dp.price = $('#omHiddenPrice').val();
    dp.url = $(".proHeader h1 a").attr('href');
    dp.brand_string = $('.goods_info .goods_info_name:contains("牌")+.godds_info_data').text().replace(/\s/g, '');
    return dp;
  },
  'newegg-zhadan': function neweggZhadan() {
    var dp = getProductInfo();
    dp.name = $('.proHeader h1 a').text();
    dp.url = $('.proHeader h1 a').attr('href');
    return dp;
  },
  'yiwugou': function yiwugou() {
    var dp = getProductInfo();
    dp.name = $('li.fontbold.tit').text();
    dp.price = parseFloat($('#punitprice').text().replace(/\s/g, ''));
    return dp;
  },
  'zhiwo': function zhiwo() {
    var dp = getProductInfo();
    dp.name = $('.mall_detail_prd_info .title').text();
    return dp;
  },
  'zhiwo-tuan': function zhiwoTuan() {
    var dp = getProductInfo();
    dp.name = $(".carousel li p").eq(0).text();
    return dp;
  },
  'zol': function zol() {
    var dp = getProductInfo();
    var merchant_price = [];
    var prices = $('.product-merchant-price em').text();
    if (prices != '' && prices.match(/[0-9]+/) && prices.indexOf('至') > -1) merchant_price = prices.replace(/[ ]/g, "").split('至');
    dp.name = $('.product-name h3').text();
    if (dp.name == "") {
      dp.name = $('.ptitle').text();
    }
    if (dp.name == "") {
      dp.name = $('.page-title.clearfix h1').text();
    }
    if (merchant_price.length > 0) {
      dp.min_price = merchant_price[0].substr(1);
      dp.max_price = merchant_price[1].substr(1);
    }
    dp.price = $('.price-type').text();
    if (dp.price.indexOf('万') > -1) {
      var p = dp.price.match(/[0-9.]+/);
      if (p) dp.price = p[0] * 10000;
    }
    dp.cat_name = $('.breadcrumb a').eq(1).text();
    dp.brand_string = $('.breadcrumb a').eq(2).text();
    return dp;
  },
  'vmall': function vmall() {
    var dp = getProductInfo();
    dp.name = $('#pro-name').text();
    return dp;
  },
  'daling': function daling() {
    var dp = getProductInfo();
    dp.name = $('.goods-data h1.clearfix').text().replace(/\s/g, '');
    dp.price = $('.goods-price .clearfix .fl .bold').text();
    return dp;
  },
  'fclub': function fclub() {
    var dp = getProductInfo();
    dp.name = $('.goods_introduce').text();
    dp.name = dp.name.replace(/(?:\t|\n)/ig, '');
    dp.name = dp.name.replace(/(?:\ \ |&nbsp;)/ig, ' ');
    if (dp.name == '') {
      dp.name = $('.tdleft:contains("商品名称")+.tdright').text().replace(/(\s)/g, '');
      dp.price = $('#priceFont').text();
    }
    return dp;
  },
  'taoshu': function taoshu() {
    var dp = getProductInfo();
    dp.isbn = $('.book_detailed span:contains("ISBN")').length > 0 ? $('.book_detailed span:contains("ISBN")').text().substr(5) : "";

    return dp;
  },
  'amazon': function amazon() {
    var dp = getProductInfo();
    var isbn_str = '';
    var isbn_str1 = $('li:contains("ISBN")').text();
    var isbn_str2 = $('li:contains("条形码")').text();
    //var isbn_str3 = $('li:contains("ASIN")').text();
    var isbn_str3 = $('li b:contains("ASIN")').parent('li').text();
    isbn_str1 = isbn_str1 ? isbn_str1.substr(5) : '';
    isbn_str2 = isbn_str2 ? isbn_str2.substr(4) : '';
    isbn_str3 = isbn_str3 ? isbn_str3.substr(5) : '';
    if (isbn_str1 == '') {
      isbn_str = isbn_str2;
    } else if (isbn_str2 == '') {
      isbn_str = isbn_str1;
    } else {
      if (isbn_str1.length > isbn_str2.length) {
        isbn_str = isbn_str2;
      } else {
        isbn_str = isbn_str1;
      }
    }

    isbn_str = isbn_str || isbn_str3;
    isbn_str = isbn_str.replace(/(\s)/g, "");
    dp.name = $('#btAsinTitle span').eq(0).text().replace(/(.*)<span.*/i, "$1");

    dp.name = $('#productTitle').text().trim();
    dp.isbn = isbn_str;
    dp.brand_string = $('#brand').text().trim();
    try {
      dp.price = $('#priceblock_dealprice').text().replace(/[￥¥]+/, '');
    } catch (e) {}
    if (dp.price == '') {
      dp.price = $('span.a-size-large.a-color-price').is(':visible') && $('span.a-size-large.a-color-price').text();
      if (dp.price && dp.price.indexOf('-') > -1) {
        dp.price = '';
      }
    }
    if (dp.price == '') {
      dp.price = $('#apex_desktop .a-price span[aria-hidden=true]:eq(0)').text();
      __webpack_require__(6).log('dp.price', dp.price);
    }
    if (dp.price == '') dp.price = $('#priceblock_ourprice').text();
    if (dp.price == '') dp.price = $('#priceblock_saleprice').text();
    if (dp.price == '') dp.price = $('.offer-price:eq(0)').text();
    if (dp.price == '') dp.price = $('#olp_feature_div .a-color-price').text();
    if (dp.price == '') dp.price = $('.a-color-price:eq(0)').text();
    if (dp.price == '') dp.price = $('#priceblock_saleprice').text();
    if (dp.price == '') dp.price = $('#price_feature_div .a-color-price').text();
    if (dp.price.indexOf('€') > -1) {
      dp.price = dp.price.replace(',', '.');
    }
    var url = location.href;
    var host = location.host;
    dp.itemId = (function () {
      var match = location.href.match(/\/dp\/([0-9A-Za-z]+)/);
      if (match) {
        return match[1];
      }
      match = location.href.match(/\/gp\/([0-9A-Za-z]+)/);
      if (match) {
        return match[1];
      }
      return '';
    })();
    try {
      dp.cat_id = (function () {
        var e,
            t,
            a = "";
        return document.querySelector(".a-breadcrumb li:nth-child(7) a") ? t = document.querySelector(".a-breadcrumb li:nth-child(7) a").getAttribute("href") : document.querySelector(".a-breadcrumb li:nth-child(5) a") ? t = document.querySelector(".a-breadcrumb li:nth-child(5) a").getAttribute("href") : document.querySelector(".a-breadcrumb li:nth-child(3) a") && (t = document.querySelector(".a-breadcrumb li:nth-child(3) a").getAttribute("href")), e = t.split("?")[1], e && e.split("&").forEach(function (e) {
          e.match(/node=.*/) && (a = e.match(/node=(.*)/)[1]);
        }), a;
      })();
    } catch (e) {
      dp.cat_id = "";
    }
    dp.url2 = url.replace(host, 'www.amazon.cn');
    var catdom = $('#wayfinding-breadcrumbs_feature_div .a-unordered-list li a');
    var catlen = catdom.length;
    var cat_name = [];
    for (var i = 0; i < catlen; i++) {
      cat_name.push(catdom.eq(i).text().trim());
    }
    dp.cat_name = cat_name.join('#');
    dp.website = 'amazon';
    dp.pic = $('#altImages li img').eq(0).attr('src');
    if (!dp.pic) {
      dp.pic = $('#landingImage').eq(0).attr('src');
    }
    dp.img = dp.pic;
    dp.sku = $('#addToCart #ASIN').val();
    dp.category = $('#wayfinding-breadcrumbs_feature_div a').text();
    var brandhref = $('#brand').attr('href');
    var brand = brandhref && brandhref.match(/field-lbr_brands_browse-bin=(.*)$/) && brandhref.match(/field-lbr_brands_browse-bin=(.*)$/)[1];
    dp.brand = dp.brand_string ? dp.brand_string : brand;
    return dp;
  },
  'muyingzhijia': function muyingzhijia() {
    var dp = getProductInfo();
    dp.name = $('#name h1').text();
    dp.price = $('#summary-price .p-price').text();
    return dp;
  },
  'dangdang': function dangdang() {
    var prodSpuInfo = window.prodSpuInfo;
    var dp = getProductInfo();
    var isbn = $('.book_detailed span:contains("I S B N")').text().substr(8);
    if (isbn == '') {
      isbn = $('.intro span:contains("I S B N")').text().substr(8);
    }
    if (isbn == '') {
      isbn = $('.book_messbox .show_info_left:contains("ＩＳＢＮ")').next('.show_info_right').text();
    }
    if (isbn == '') {
      isbn = $('.book_messbox .show_info_left:contains("I S R C")').next('.show_info_right').text();
    }
    if (isbn == '') {
      var dom = $('.book_messbox span:contains("I S R C")');
      isbn = dom && dom.parent().text().substr(7);
    }
    if (isbn == '') {
      var isbn = $('#detail_describe li:contains("ISBN")').text().match(/[0-9]+/);
      if (isbn) isbn = isbn[0];
    }
    dp.price = $('#dd-price').text();
    dp.isbn = isbn;
    dp.pic = $('#main-img-slider li img').eq(0).attr('src');
    dp.website = "dangdang";
    dp.itemId = location.href.match(/dangdang\.com\/(\d+)/)[1];
    dp.brand_string = $('.mall_goods_foursort_style_frame:contains("品牌")').text().replace('品牌：', '');
    if (dp.brand_string == '') dp.brand_string = window.google_tag_params && window.google_tag_params.ecomm_pbrand;
    if (!dp.price) dp.price = $('#salePriceTag').text();
    dp.name = $('.name_info h1').text().trim();
    dp.cat_id = prodSpuInfo && prodSpuInfo.categoryId;
    return dp;
  },
  '360buy-paimai': function buyPaimai() {
    var dp = getProductInfo();
    dp.price = $('#priceDiv').text().match(/[0-9.]+/)[0];
    dp.name = $('.intro_detail .name').attr('title');
    return dp;
  },
  '360buy-book': function buyBook() {
    var name = $('title').text(),
        isbn = "";
    isbn = $('#summary-isbn .dd').text();
    name = $('#name h1').html();
    if (name.indexOf('<') > 0) {
      name = name.substr(0, name.indexOf('<'));
    }
    isbn = isbn || $('li div:contains("ＩＳＢＮ")').text().substr(5);
    name = name || $('#name h2').html().replace(/(.*)<font.*/i, "$1");
    return {
      'name': name,
      'isbn': isbn
    };
  },
  '360buy-tuan': function buyTuan() {
    var dp = getProductInfo();
    dp.name = dp.name.replace(" - 京品惠团购", "");
    G.site = "360buy";
    dp.id = $("#PshowSkuid").val();
    //默认是从title里获取的信息，如果发现 能从网页中获取的关键字 长度比 title中获取的更长，就替换掉原来的title
    var tuan_dp_name = $(".e-content h2").text();
    if (tuan_dp_name.length > dp.name.length) {
      dp.name = tuan_dp_name;
    }

    //新增
    var jdTuanA = $('.e-extra .p-img a');
    if (jdTuanA.length > 0 && !/^javascript:/.test(jdTuanA.attr('href'))) {
      dp.href = jdTuanA.attr('href');
    } else {
      if (typeof $('#PshowSkuid').val() != "undefined") {
        dp.href = 'http://item.jd.com/' + $('#PshowSkuid').val() + '.html';
      }
    }
    dp.url = $(".e-extra a").eq(0).attr("href");
    if (dp.url.indexOf("javascript") > -1) {
      dp.url = $(".img-info a").eq(0).attr("href");
    }
    return dp;
  },
  '360buy-bigimage': function buyBigimage() {
    var url = "";
    if (url == "") {
      url = $('.o-m-1 h1 a').attr("href");
    }
    var name = $('.o-m-1 h1 a').eq(0).text();
    return {
      'url': url,
      'name': name,
      'isbn': ''
    };
  },
  '360buy-club': function buyClub() {
    var url = "";
    if (url == "") {
      url = $('.p-name a').attr("href");
    }
    var name = $('.p-name a').eq(0).text();
    return {
      'url': url,
      'name': name,
      'isbn': ''
    };
  },
  '360buy': function buy() {
    var dp = getProductInfo();
    var name = $('#name h1').text(),
        isbn = "";
    if (!name) name = $('.itemInfo-wrap .sku-name').eq(0).text();
    if (name && name.indexOf('<') > 0) {
      name = name.substr(0, name.indexOf('<'));
    }

    isbn = $('#summary-isbn .dd').text();
    if (!isbn) {
      isbn = $("td:contains('ISBN号：')").text().match(/\d+/);
      if (isbn) isbn = isbn[0];
    }
    if (!isbn) {
      isbn = $("#product-detail li:contains('ISBN：')").text().match(/\d+/);
      if (isbn) isbn = isbn[0];
    }
    if (!isbn) {
      isbn = $("td:contains('ISBN号：')").text().substr(7);
    }
    if (!isbn) {
      var isbntxt = $('.parameter2 li:contains("ISBN")').text();
      isbn = isbntxt.replace(/(?:ISBN|isbn)(?:\:|：)/, '');
    }
    if (!isbn) {
      var isbntxt = $('#parameter2 li:contains("ISBN")').text();
      isbn = isbntxt.replace(/(?:ISBN|isbn)(?:\:|：)/, '');
    }
    dp.name = $.trim(name);
    dp.isbn = isbn;
    var ab = window.pageConfig && window.pageConfig.product && window.pageConfig.product.brand;
    if (ab != 0) {
      dp.brand_string = $('#root-nav a[href*="' + ab + '"]').text();
      if (!dp.brand_string) dp.brand_string = $('#crumb-wrap .crumb .item a[href*="' + ab + '"]').eq(0).text();
    }
    // dp.price = $('#J_FinalPrice .price').text().replace(/[￥¥]+/, '');
    if (!dp.price) {
      dp.price = $('#jd-price').text().replace(/[￥¥]+/, '');
    }
    var new_cat_array = [];
    var cat_array = $("body").attr("class").match(/cat\-\d\-([0-9]+)/g) || [];
    for (var i = 0; i < cat_array.length; i++) {
      new_cat_array.push(cat_array[i].match(/\d\-([0-9]+)/)[1]);
    }
    if (new_cat_array.legnth === 0) {
      new_cat_array = window.pageConfig && window.pageConfig.product && window.pageConfig.product.cat;
    }
    if (window.pageConfig && window.pageConfig.product) {
      var pageConfig_pd = window.pageConfig.product;
      dp.shopId = pageConfig_pd.shopId;
      dp.venderId = pageConfig_pd.venderId;
    }
    dp.cat_id = new_cat_array.join("-");
    if (!dp.price) {
      dp.price = $('.p-price:not(.dj-price):eq(0)').text();
    }
    dp.plus_price = $('.p-price-plus .price').text().replace(/[￥¥]+/, '');
    dp.fans_price = $('.fans-price .p-price-fans span').text().replace(/[￥¥]+/, '');
    if (!dp.price) dp.price = $('.summary-price .p-price:not(.dj-price) .price').eq(0).text();
    try {
      dp.pic = 'https:' + $('#spec-img').eq(0).attr('data-origin').replace('/n5/', '/n1/');
    } catch (e) {}
    if (!dp.pic) {
      dp.pic = $('#spec-img').eq(0).attr('src').replace('/n5/', '/n1/');
    }
    if (!dp.pic) {
      dp.pic = $('.spec-items ul li img').eq(0).attr('src');
    }
    if (dp.pic && dp.pic.indexOf('http') === -1) dp.pic = 'http:' + dp.pic.replace(/\d+x\d+/, '160x160');
    dp.img = dp.pic;
    dp.itemId = location.href.match(/(\d+)\.html/)[1];
    dp.name = dp.name && dp.name.replace('【京东超市】', '');
    dp.website = 'jd.com';
    dp.cat_name = Array.prototype.map.call(document.querySelectorAll('#crumb-wrap .crumb a'), function (d) {
      return d.textContent;
    }).slice(0, 3).join('#');
    if (dp.price) {
      // change to number
      dp.price = dp.price.replace(/[^0-9.]/g, '');
    }

    dp.shopName = $('.shieldShopInfo .name:eq(1) a').text();
    if (!dp.shopName && location.host === 'npcitem.jd.hk') {
      dp.shopName = $('#crumb-wrap .contact .name a').text();
    }
    if (!dp.shopName) {
      dp.shopName = '京东';
    }

    var handler = {
      set: function set(target, prop, value) {
        if (prop === 'price' && value > 16.9) {}
        // console.log('dp price set', value)
        // if (!value && window.setBjgDebugger) {
        //   debugger
        // }

        // if (!target[prop]) {
        //   target[prop] = value
        // }
        target[prop] = value;
        return true;
      },
      get: function get(target, prop) {
        // console.log(`dp get prop `, prop, target[prop])
        return target[prop];
      }
    };
    var dpProxy = new Proxy(dp, handler);
    return dpProxy;
  },
  '360buy-re': function buyRe() {
    var dp = getProductInfo();
    dp.name = $('.shop_intro>h2>a').text();
    dp.price = $('.shop_intro_a .price a').text();
    return dp;
  },
  '360buy-auction': function buyAuction() {
    var dp = getProductInfo();
    dp.name = $('#product-intro .p-info h1').text();
    dp.price = $('#cur_price').text().match(/[0-9.]+/)[0];
    return dp;
  },
  'fglady': function fglady() {
    return {
      'name': $('.pd-content-left table tbody').children('tr').eq(1).children('td').eq(0).children('div').eq(0).text(),
      'isbn': ''
    };
  },
  'ouku': function ouku() {
    var dp = getProductInfo();
    dp.name = $('.prod-info-title h1').text();
    dp.brand_string = $('.specTitle .strong-title:contains("品牌")+.inline span').text();
    dp.price = $('.sale-price').text().replace(/[￥¥\s]+/g, '');
    return dp;
  },
  '6pm': function pm() {
    var dp = getProductInfo();
    dp.name = $('#productStage .title').text();
    dp.brand_string = $('#productStage .title .brand').text();
    dp.price = $('#priceSlot .price').text().replace('$', '');
    dp.img = $('#productImages ul li img').eq(0).attr('src');
    dp.sku = $('input[name="productId"]').val();
    dp.category = $('#breadcrumbs a').text();
    dp.source = $('#thumbnailImages').next().next().next().text();
    dp.brand = $('a[itemprop="brand"]').text();
    if (!dp.price) dp.price = $('._3r_Ou').eq(0).text().replace('$', '');
    return dp;
  },
  'kimiss': function kimiss() {
    var name = "";
    name = $('.preview_title h1 a').text();
    var price = $('.preview_brief em').text();
    if (price.indexOf('-') > -1) {
      price = price.split('-')[0];
    }
    var pinfo = $('.preview_brief').text().match(/产品规格：(.*)/);
    if (pinfo) pinfo = pinfo[1];
    if (pinfo.indexOf('-') > -1) pinfo = pinfo.split('-')[0];
    name = name + pinfo;
    if (name == "") {
      name = $('.title h1').text();
    }
    return {
      'name': name,
      'price': price,
      'isbn': ''
    };
  },
  'redbaby': function redbaby() {
    return {
      'name': $('#pName').text(),
      'isbn': ''
    };
  },
  'm18': function m18() {
    return {
      'name': $('.goods_detail .name').text(),
      'isbn': ''
    };
  },
  'babyhaven': function babyhaven() {
    var d = getProductInfo();
    d.name = $('.product-name').text();
    return d;
  },
  'w1': function w1() {
    return {
      'name': $('.title h1').text(),
      'isbn': ''
    };
  },
  'sephoracps': function sephoracps() {
    var price = $('.proPrice>span:eq(1)').text();
    return {
      'name': $('.sdTitleL h1').text(),
      'isbn': '',
      'price': price
    };
  },
  'bookuu': function bookuu() {
    var dp = getProductInfo();
    dp.name = $('.shop-text-info h2').text();
    dp.price = $('.wj-meta span:contains("博库价")~strong').text();
    var meta = $("meta[name=keywords]")[0].getAttribute("content");
    dp.isbn = /ISBN：(\d+)/.exec(meta) && /ISBN：(\d+)/.exec(meta)[1];
    return dp;
  },
  'secoo': function secoo() {
    var dp = getProductInfo();
    dp.price = $('.Dprice').text().replace(/(¥|,)/g, '');
    dp.name = $('.proName h2').text();
    return dp;
  },
  'lafaso': function lafaso() {
    var name = $('#pname').text();
    if (typeof name == 'undefined' || name == '') {
      name = $('title').html();
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  's': function s() {
    return {
      'name': $('.goodsname').text(),
      'isbn': ''
    };
  },
  'letao': function letao() {
    return {
      'name': $('#buyinfo h1').text(),
      'isbn': ''
    };
  },
  'buy007': function buy007() {
    return {
      'name': $('#info_right table tbody').children('tr').eq(0).children('td').eq(0).children('h1').eq(0).text(),
      'isbn': ''
    };
  },
  'taoxie': function taoxie() {
    return {
      'name': $('.detail').children('div').eq(0).children('h2').eq(0).text(),
      'isbn': ''
    };
  },
  'suning': function suning() {
    var dp = getArticleInfoNew('input[name=returnURL]', 0, "value", "suning");
    var name = $('#itemDisplayName').text().trim();
    var isbn;
    if (!isbn) {
      isbn = $('#total dt:contains("I")').next().eq(0).text();
      isbn = isbn.match(/(?:\d{13}|\d{10}|\d{8})/ig);
      if (isbn) isbn = isbn[0];
    }
    if (!isbn) {
      isbn = $('.book-info span:contains("I")').next().eq(0).text();
      isbn = isbn.match(/(?:\d{13}|\d{10}|\d{8})/ig);
      if (isbn) isbn = isbn[0];
    }
    if (!isbn) {
      isbn = $('#bookParameterField dl:contains("ISBN")').text().match(/[0-9]+/);
      if (isbn) isbn = isbn[0];
    }
    dp.url = location.href;
    var labelList = $('.w3').toArray();
    labelList = labelList.map(function (i) {
      return i.innerHTML;
    });
    var tgPrice = undefined;
    if (labelList.indexOf('团购价') > -1 || labelList.indexOf('预售价') > -1) {
      tgPrice = $('span.small-price').text();
    }
    var promotionPrice = $('#promotionPrice.mainprice').text();
    var mainPrice = $('.mainprice').text();
    dp.name = name;
    dp.isbn = isbn;
    dp.brand_string = window.sn && window.sn.brandName || '';
    dp.price = window.sn && window.sn.promotionPrice || 0;
    if (mainPrice) {
      dp.price = mainPrice;
    }
    if (promotionPrice) {
      dp.price = promotionPrice;
    }
    if (tgPrice) {
      dp.price = tgPrice;
    }
    dp.itemId = location.href.match(/(\d+\/\d+)\.html/)[1];
    var catdom = $(".breadcrumb .dropdown:nth-last-of-type(3) a");
    var cathref = catdom && catdom.attr('href');
    dp.cat_id = cathref.match(/(\d-\d{0,}-\d)\.html/) ? cathref.match(/(\d-\d{0,}-\d)\.html/)[1] : "";
    dp.website = "suning";
    dp.pic = $('#bigImage img').attr('src');
    if (dp.pic) dp.pic = $('#bigImg img').attr('src');
    if (!dp.name) dp.name = window.sn && window.sn.itemDisplayName;
    dp.name = dp.name && dp.name.replace('【苏宁易购超市】', '');
    if ($('#mainPrice').text().indexOf('定金') > -1) {
      G.noRealPrice = true;
    }
    return dp;
  },
  'suning-ju': function suningJu() {
    var dp = {};
    dp.url = 'http://www.suning.com/emall/prd_10052_10051_-7_' + $("#itemId").attr("value") + '_.html';
    if (G.crc64) dp.url = undefined;
    dp.name = $("h1 a").text();
    return dp;
  },
  'suning-book-new': function suningBookNew() {
    var dp = getArticleInfoNew('input[name=returnURL]', 0, "value", "suning");
    var name = $('title').html();
    var isbn = "";
    isbn = $('#total dt:contains("I")').next().eq(0).text();
    var matches = isbn.match(/(?:\d{13}|\d{10}|\d{8})/ig);
    if (matches != null) {
      isbn = matches[0];
    } else {
      isbn = "";
    }

    if (isbn == '') {
      isbn = $('.book-info span:contains("I")').next().eq(0).text();
      var matches = isbn.match(/(?:\d{13}|\d{10}|\d{8})/ig);
      if (matches != null) {
        isbn = matches[0];
      } else {
        isbn = "";
      }
    }
    dp.name = name;
    dp.isbn = isbn;
    return dp;
  },
  'suning-snbook': function suningSnbook() {
    var dp = getArticleInfoNew('input[name=returnURL]', 0, "value", "suning");
    dp.name = $('.brief-info h1 strong').text();
    dp.isbn = $('.parm-isbn span.attr-v').text();
    return dp;
  },
  'suning-dgf': function suningDgf() {
    var that = this;
    var dp = that.getProductInfo();
    var a = $('.detail-first h1.title a').eq(0);
    dp.name = $('.detail-first h1.title a span strong').text();
    G.href = a.attr('href');
    G.site = "suning";
    if (typeof G.href == 'undefined' || G.href == "") {
      dp.useless = true;
    } else {
      var check = siteInfo.isProductPage();
      if (!check) {
        dp.useless = true;
      }
    }
    return dp;
  },
  'suning-qiang': function suningQiang() {

    var dp = getArticleInfo(".product-main-title h1 a", 0, "suning");
    var suningQiangProId = $('#catentry').val();
    if (suningQiangProId) {
      G.href = 'http://www.suning.com/emall/prd_10052_10051_-7_' + suningQiangProId + '_.html';
    }

    return dp;
  },
  'suning-pai': function suningPai() {
    var dp = getArticleInfoNew('input[name=returnURL]', 0, "value", "suning");
    var name = $('.fb-main-title a').text();
    var isbn = "";
    var url = "";
    url = $('.fb-main-title a').attr('href');

    isbn = $('#total dt:contains("I")').next().eq(0).text();
    var matches = isbn.match(/(?:\d{13}|\d{10}|\d{8})/ig);
    if (matches != null) {
      isbn = matches[0];
    } else {
      isbn = "";
    }

    dp.name = name;
    dp.isbn = isbn;
    dp.url = url;
    return dp;
  },
  'coo8': function coo8() {
    return {
      'name': $('#productname h1').children('strong').eq(0).text(),
      'isbn': ''
    };
  },
  'lusen': function lusen() {
    return {
      'url': 'http://www.lusen.com/Product/ProductInfo.aspx?id=' + $("#ProductId").val(),
      'name': $('h1.goodsname').text(),
      'isbn': ''
    };
  },
  'gome-rushbuy': function gomeRushbuy() {
    var url = "";
    url = $(".pic a").eq(0).attr("href");
    return {
      'name': $('.product-info .name').text(),
      'isbn': '',
      'url': url
    };
  },
  'gomehone': function gomehone() {
    var dp = getProductInfo();
    dp.price = $('#prdPrice').text().match(/[0-9.]+/)[0];
    dp.name = $('.prdmain .prdtit').text();
    return dp;
  },
  'gome': function gome() {
    var prdInfo = window.prdInfo;
    var dp = getProductInfo();
    var isbn = "";
    var name = $('title').html();
    name = $('.prdtit h1').text();
    dp.name = name;
    dp.isbn = isbn;
    dp.price = $('#prdPrice').text();
    if (name == '') dp.name = prdInfo && prdInfo.prdName;
    if (dp.price == '') dp.price = prdInfo && prdInfo.price;
    dp.brand_string = prdInfo && prdInfo.breadName;
    dp.itemId = location.href.match(/gome\.com\.cn\/([A-Z0-9]+)-/)[1];
    dp.cat_id = prdInfo && prdInfo.catId;
    dp.website = 'gome';
    dp.pic = $('.pic-small ul li img').eq(0).attr('src');
    if (!dp.cat_id) {
      var dom = $('.local a').eq(3).attr('href');

      dp.cat_id = dom.match(/cat\d+/) && dom.match(/cat\d+/)[0];
    }
    return dp;
  },
  'gome-q': function gomeQ() {
    var dp = getProductInfo();
    dp.name = $('h1.title').text();
    dp.url = $('.pro_link')[0].href;
    return dp;
  },
  'gome-tao': function gomeTao() {
    var dp = getProductInfo();
    dp.name = $('.prdtit').text();
    dp.price = parseInt($('#prdPrice').text().match(/[0-9]+/)[0]);
    return dp;
  },
  'gome-tuan': function gomeTuan() {
    var dp = getProductInfo();
    dp.url = $(".compare-link").attr("href");
    dp.name = $('title').html();
    dp.price = $('#salePrice').text();
    return dp;
  },
  'yihaodian': function yihaodian() {
    var dp = getProductInfo();
    var id = "";
    if ($('#productId').length) {
      id = $('#productId').val();
    } else if ($('#productCode').length) {
      id = parseInt($('#productCode').text().slice(0, -1));
    } else if ($('#mainProductId').length) {
      id = $('#mainProductId').val();
    }
    // 名品特卖
    else if ($('.specific_detail p span').length) {
        id = parseInt($('.specific_detail p span').text().match(/\d+$/)[0].slice(0, -1));
      }

    var name = $('#productMainName').text();
    var sp = name.indexOf('<');
    if (sp > 0) {
      name = name.substr(0, sp);
    }

    if (name == '') {
      name = $('.main_info_con p.price').prev().eq(0).text();
    };
    if (name == '') {
      name = $('.pro_tit').text();
    }
    var isbn = $('#prodDetailCotentDiv dd:contains("ISBN")').text().substr(5);
    isbn = $.trim(isbn);

    var itemId = location.href.match(/item\/([0-9]{5,9})/);
    dp.itemId = itemId && itemId[1];
    dp.img = $('#jsproCrumb .mBox b img').eq(0).attr('src');
    dp.brand_string = $('#brandName').val();
    dp.price = $('#current_price').text().replace(/[￥¥]+/, '');
    dp.cat_id = $('#categoryId').val();
    dp.isbn = isbn;
    dp.name = name;
    dp.id = id;
    dp.pic = dp.img;
    dp.website = 'yhd';
    return dp;
  },
  'yihaodian-tuan': function yihaodianTuan() {
    var name = '';
    var id = '';
    var url = "";
    name = $('#detailDiv h2').eq(0).text();
    id = $('#productId').val();

    if (id == '') {
      id = $('#mainProductId').val();
    }

    if (name == '') {
      name = $("title").text().replace(/.{2}团购_1号团_1号店官网/, "");
    }
    var price = $('#pricenow').text();
    url = 'http://item.yhd.com/item/' + $('#productMercantId').val();
    return {
      'name': name,
      'isbn': '',
      'id': id,
      'url': url,
      'price': price
    };
  },
  'womai': function womai() {
    var dp = getProductInfo();
    dp.name = "";
    var matches = $(".main_detail").eq(0).html().match(/var _title = "([^"]+)"/);
    dp.name = matches[1];

    dp.price = $('.buyPrice').text();
    if (dp.name == "") {
      dp.name = $('.WrapTit').text();
    }

    dp.name = window.rtTag.data.ecom_view.prod[0].p_name;
    dp.price = window.rtTag.data.ecom_view.prod[0].p_price;
    dp.brand_string = window.rtTag.data.ecom_view.prod[0].p_brand;

    return dp;
  },
  'coocaa': function coocaa() {
    return {
      'name': "酷开 " + $(".proHeader h1").text()
    };
  },
  'leyou': function leyou() {
    var dp = getProductInfo();
    dp.name = $('#baseInfoDiv h3').text();
    dp.price = $('.item_rmb .font_num').text();
    return dp;
  },
  'shopin': function shopin() {
    var crumbs = $.trim($('.crumbs').text());
    var title = $.trim($('.product-list h2').text());
    crumbs = crumbs.replace(/(?:\u5f53\u524d\u4f4d\u7f6e|\u9996\u9875|-)/, "", crumbs);
    return {
      'name': crumbs + " " + title,
      'isbn': ''
    };
  },
  'xiu': function xiu() {
    var name = "";
    name = $('.p_title span h1').text();

    return {
      'name': name,
      'isbn': ''
    };
  },
  'xiu-tuan': function xiuTuan() {
    return {
      'name': $('.xit_xqzgong h2').text(),
      'isbn': ''
    };
  },
  'vjia': function vjia() {
    return {
      'name': $('.sp-singleName .title').text(),
      'isbn': ''
    };
  },
  '7cv': function cv() {
    return {
      'name': $('.main_right_top').text(),
      'isbn': ''
    };
  },
  'x': function x() {
    return {
      'name': $('p.top_name').text(),
      'isbn': ''
    };
  },
  'guopi': function guopi() {
    return {
      'name': $('#p_name').text(),
      'isbn': ''
    };
  },
  'no5': function no5() {
    var name = $('.part01 .p01_r h2').html();
    if (name.indexOf('<') > 0) {
      name = name.substr(0, name.indexOf('<'));
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  'sasa': function sasa() {
    var name = $('.product-titles').text();
    var price = $('#product_information .action-pric').text();
    return {
      'name': name,
      'price': price,
      'isbn': ''
    };
  },
  'dhc': function dhc() {
    return {
      'name': $('head title').text(),
      'isbn': ''
    };
  },
  '9dadao': function dadao() {
    return {
      'name': $('.pra h2').text(),
      'isbn': ''
    };
  },
  'metao': function metao() {
    return {
      name: $(".pib_title_detail").text()
    };
  },
  'kzj365': function kzj365() {
    var content = $("title").text();
    var i = content.indexOf("_");
    return {
      name: content.slice(0, i)
    };
  },
  'nubia': function nubia() {
    var title = '';
    if (title == '') {
      title = $('#subNav .sub-logo').eq(0).text();
    }
    var price = $('.price').text();
    return {
      name: title,
      price: price
    };
  },
  'gnc': function gnc() {
    return {
      name: $('#product-title').text(),
      price: $('.price-regular').text().match(/[0-9.]+/) && $('.price-regular').text().match(/[0-9.]+/)[0]
    };
  },
  'ymatou': function ymatou() {
    var content = $("meta[name=description]").attr("content");
    var i = content.indexOf('”');
    return {
      name: content.slice(1, i)
    };
  },
  'kaola': function kaola() {
    return {
      name: $(".product-title").text(),
      price: $('.currentPrice').text()
    };
  },
  '360kxr': function kxr() {
    var name = $('.right-intro h2').html();
    name = name.indexOf('<') > 0 ? name.substr(0, name.indexOf('<')) : name;
    return {
      'name': name,
      'isbn': ''
    };
  },
  'likeface': function likeface() {
    return {
      'name': $('.tCtn h1').text(),
      'isbn': ''
    };
  },
  'qxian': function qxian() {
    return {
      'name': $('.product_body1_right_title h1').text(),
      'isbn': ''
    };
  },
  'didamall': function didamall() {
    return {
      'name': $('.product-name').text(),
      'isbn': ''
    };
  },
  'yaodian100': function yaodian100() {
    return {
      'name': $('.infoboxheader h1').text(),
      'isbn': ''
    };
  },
  'lijiababy': function lijiababy() {
    var name = $('#txtproname').text();
    if (typeof name == 'undefined' || name == '') {
      name = $('#lbl_proname').text();
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  '99read': function read() {
    var dp = getProductInfo();
    dp.isbn = $('li:contains("产品条码")').html();
    if (dp.isbn == null || typeof dp.isbn == 'undefined' || dp.isbn == '') {
      dp.isbn = '';
    } else {
      dp.isbn = dp.isbn.substr(7);
    }
    return dp;
  },
  'china-pub': function chinaPub() {
    return {
      'name': $('h1.black15c').text(),
      'isbn': $('li:contains("ISBN")').children('strong').eq(0).html()
    };
  },
  'bookschina': function bookschina() {
    var dp = getProductInfo();
    dp.name = $('.this-pic').prev().text();
    dp.name = $.trim(dp.name);

    dp.isbn = $('tr:contains(\"出版时间：\")').children().eq(1).text();
    dp.isbn = $.trim(dp.isbn);

    return dp;
  },
  'bookschina-tuan': function bookschinaTuan() {
    var dp = getProductInfo();
    dp.name = $('.titword').text().match(/《([^》]+)/)[1];
    dp.price = $('.pricetime .pright .Mbig').text();

    dp.isbn = $('.comments:contains("ISBN")').text().match(/ISBN：([0-9]+)/)[1];

    if (dp.isbn == '') {
      dp.isbn = $('.comments').text().match(/[0-9]{13}/) && $('.comments').text().match(/[0-9]{13}/)[0];
    }

    return dp;
  },
  'efeihu': function efeihu() {
    var dp = getProductInfo();
    dp.name = $('.share_title em').text();
    var p = $('.box_wrap .price .a p').text().match(/[0-9]+/);
    if (p) dp.price = p[0];
    return dp;
  },
  'yintai': function yintai() {
    return {
      'name': $('.p-tit').text(),
      'isbn': '',
      'price': $('.qd-num').text()
    };
  },
  'urcosme': function urcosme() {
    return {
      'name': $('.productInformationText h1').text(),
      'isbn': ''
    };
  },
  'strawberrynet': function strawberrynet() {
    return {
      'name': $('.product-frame h1').text() + $('.product-frame h2').text(),
      'isbn': ''
    };
  },
  'luce': function luce() {
    return {
      'name': $('.Product_Detail ul').children('li').eq(0).children('p').eq(0).text(),
      'isbn': ''
    };
  },
  'k121': function k121() {
    return {
      'name': $('.newproductname0').text(),
      'isbn': ''
    };
  },
  'happigo': function happigo() {
    return {
      'name': $('.detail_top .detail_tit ').text(),
      'price': $('.price_now').text()
    };
  },
  'gap': function gap() {
    return {
      'name': $('.product-name h1').text(),
      'isbn': ''
    };
  },
  'misslele': function misslele() {
    return {
      'name': $('#goods_name').text(),
      'isbn': ''
    };
  },
  'all3c': function all3c() {
    return {
      'name': $('.buyinfo h1').text(),
      'isbn': ''
    };
  },
  'idaphne': function idaphne() {
    return {
      'name': $('.title').text(),
      'isbn': ''
    };
  },
  'binggo': function binggo() {
    var name = $('#pName h1').html();
    var len = name.length;
    var i = 0;
    for (; i < len; i++) {
      if (name[i] == '<') {
        break;
      }
    }
    return {
      'name': name.substr(0, i),
      'isbn': ''
    };
  },
  'taobao-ju': function taobaoJu() {
    var info = getProductInfo();
    var id = /item_id=(\d+)/ig.exec(location.href);
    info.id = id && id.length == 2 && id[1];
    info.name = $.trim($('.main-box h2').text());
    info.url = 'https://detail.tmall.com/item.htm?id=' + info.id;
    info.itemId = location.href.match(/item_id=(\d+)/)[1];
    info.price = $('.currentPrice .J_actPrice').eq(0).text();
    return info;
  },
  'tmall': function tmall() {
    var info = getProductInfo();
    var attrs = $(".attributes-list ul").html();
    var sattrs = '';
    var userid = "";
    if (attrs == null) {
      attrs = $(".attributes-list").html();
    }
    if (attrs) {
      attrs = attrs.replace(/(?:<\!\-\-[^\-]*\-\->|<li[^>]*>|\ \ )/ig, '');
      attrs = attrs.replace(/&nbsp;/ig, ' ');
      attrs = attrs.replace(/<\/li[^>]*>/ig, '|');
      attrs = attrs.replace(/\n/ig, '');
      var brand = attrs.match(new RegExp(/\|(\u54c1\u724c(?:\:|\uff1a)[^\|]+)/ig));
      if (brand) {
        for (var i = 0; i < brand.length; i++) {
          sattrs += brand[i] + '|';
        }
      }
      var no = attrs.match(new RegExp(/((?:\u7cfb\u5217|\u8d27\u53f7|\u578b\u53f7|\u6b3e\u53f7)(?:\:|\uff1a)[^\|]+)/ig));
      if (no) {
        for (var i = 0; i < no.length; i++) {
          sattrs += no[i] + '|';
        }
      }
      var isbn = attrs.match(new RegExp(/(ISBN[^\:\uff1a]*(?:\:|\uff1a)[^\|]+)/ig));
      if (isbn) {
        for (var i = 0; i < isbn.length; i++) {
          sattrs += isbn[i] + '|';
        }
      }
      info.skeyword = sattrs;
    }
    //提取分类信息
    info.cat_id = "";
    var cat_id = $('#tb-beacon-aplus').attr('exparams');
    cat_id = cat_id && cat_id.match(/category=item%5f(\d+)&/);
    cat_id = cat_id && cat_id[1];
    info.cat_id = cat_id;
    if (info.cat_id == "") {
      var cat_id = $('#detail-recommend-viewed').attr('data-catid');
      info.cat_id = cat_id;
    }
    info.root_id = $('#J_FrmBid input[name="rootCatId"]').val();
    //提取图片信息
    info.pic = $('#J_ImgBooth').attr('src');
    if (!info.pic) {
      var el = $('img[class^=PicGallery--mainPic--]');
      info.pic = el.attr('src');
    }
    if (!info.pic) {
      var el = $('[class^=PicGallery--thumbnailPic]');
      info.pic = el.attr('src');
    }
    if (info.pic && info.pic.indexOf('https:') !== 0) info.pic = 'https:' + info.pic;
    var itemid = location.href.match(/[?&]id=(\d+)/);
    itemid = itemid && itemid[1];
    //获取用户的id
    var doms = $("meta[name='microscope-data']").attr('content');
    var matches = doms && doms.match(/userid=(\d+)/);
    if (matches) {
      userid = matches[1];
    }
    var price = $('#J_PromoBox .tb-wrTuan-num').text();
    if (!price) price = $('#J_Price').text();
    if (!price) price = $('#J_StrPrice').text();
    if (!price) price = $('.tm-promo-price .tm-price').text();
    if (!price) price = $('#J_StrPriceModBox .tm-price').text();
    if (!price) price = $('.tm-price').text();
    if (!price) {
      price = $('[class^=Price--priceText]:eq(0)').text();
      var detailText = $('[class^=Price--originPrice]:eq(0)').text();
      var extraPriceText = $('[class^=Price--extraPrice]:eq(0)').text();
      if (extraPriceText) {
        detailText += '--' + extraPriceText;
      }
      G.priceTextCollectedFromPage = detailText;
      if (detailText.indexOf('折后') > -1 || detailText.indexOf('券后') > -1) {
        // console.log('dp price info bad', price)
        info.ori_price = price;
        price = '';
      }
    }

    var promoPrice = getPrice('[class^=Price--extraPrice] span[class^=Price--priceText]');
    if (promoPrice) {
      price = promoPrice;
    }

    if ($('[class^=SecurityPrice--priceText]').length) {
      price = $('[class^=SecurityPrice--priceText]').text();
    }

    info.shop_name = $('.shopkeeper .right a').text();
    info.shop_addres = $('.locus .right').text().replace(/(?:\t|\n|\s)/ig, '');
    info.price = price;
    // console.log('dp price info', price)
    info.userid = userid;
    info.img = info.pic;
    info.name = $('#J_DetailMeta .tb-detail-hd h1').text().replace(/\n/g, '').trim();
    if (!info.name) {
      info.name = $('[class^=ItemHeader--mainTitle]').text();
    }
    info.itemId = itemid;
    var url = location.href;
    // if (url.indexOf('detail.tmall.com') > -1 && url.indexOf('skuId') > -1) {
    //   let skuId = require('common/commonUtil').getParameterByName('skuId', location.href)
    //   let dp = require('common/commonUtil').getParameterByName('id', location.href)
    //   url = `https://sku-taobao.com/item.htm?id=${dp}-${skuId}`
    // }
    info.url = url;
    var handler = {
      set: function set(target, prop, value) {
        if (prop === 'price') {
          // console.log('dp price set', value)
          if (!value && window.setBjgDebugger) {
            debugger;
          }
        }
        if (!target[prop]) {
          target[prop] = value;
        }
        return true;
      },
      get: function get(target, prop) {
        // console.log(`dp get prop `, prop, target[prop])
        return target[prop];
      }
    };

    info.onPagePrice = info.price;

    info = tbInfoFix(info);

    var infoAlter = new Proxy(info, handler);
    return infoAlter;
  },
  'mi': function mi() {
    var info = getProductInfo();
    info.name = $('.product-con h1').text();
    return info;
  },
  'taobao': function taobao() {
    var info = getProductInfo();
    var attrs = $(".attributes-list ul").html();
    var sattrs = '';
    var userid = "";
    if (attrs == null) {
      attrs = $(".attributes-list").html();
    }

    if (attrs) {
      attrs = attrs.replace(/(?:<\!\-\-[^\-]*\-\->|<li[^>]*>|\ \ )/ig, '');
      attrs = attrs.replace(/&nbsp;/ig, ' ');
      attrs = attrs.replace(/<\/li[^>]*>/ig, '|');
      attrs = attrs.replace(/\n/ig, '');

      var brand = attrs.match(new RegExp(/\|(\u54c1\u724c(?:\:|\uff1a)[^\|]+)/ig));
      if (brand) {
        for (var i = 0; i < brand.length; i++) {
          sattrs += brand[i] + '|';
        }
      }

      var no = attrs.match(new RegExp(/((?:\u7cfb\u5217|\u8d27\u53f7|\u578b\u53f7|\u6b3e\u53f7)(?:\:|\uff1a)[^\|]+)/ig));
      if (no) {
        for (var i = 0; i < no.length; i++) {
          sattrs += no[i] + '|';
        }
      }
      var isbn = attrs.match(new RegExp(/(ISBN[^\:\uff1a]*(?:\:|\uff1a)[^\|]+)/ig));
      if (isbn) {
        for (var i = 0; i < isbn.length; i++) {
          sattrs += isbn[i] + '|';
        }
      }
      info.skeyword = sattrs;
    }

    //提取分类信息
    info.cat_id = $('#J_Pine').attr('data-catid');
    info.root_id = $('#J_Pine').attr('data-rootid');
    //提取图片信息
    info.pic = $('#J_ImgBooth').attr('src');
    if (!info.pic) {
      var el = $('img[class^=PicGallery--mainPic--]');
      info.pic = el.attr('src');
    }
    if (!info.pic) {
      var el = $('[class^=PicGallery--thumbnailPic]');
      info.pic = el.attr('src');
    }
    if (info.pic && info.pic.indexOf('https:') !== 0) info.pic = 'https:' + info.pic;
    info.img = info.pic;

    //获取用户的id
    var doms = $("meta[name='microscope-data']").attr('content');
    var matches = doms && doms.match(/userid=(\d+)/);
    userid = matches && matches[1];
    var price = $('#J_Price').text();
    if (!price) {
      price = $('[class^=Price--priceText]:eq(0)').text();
      var detailText = $('[class^=Price--originPrice]:eq(0)').text();
      var extraPriceText = $('[class^=Price--extraPrice]:eq(0)').text();
      if (extraPriceText) {
        detailText += '--' + extraPriceText;
      }
      G.priceTextCollectedFromPage = detailText;
      if (detailText.indexOf('折后') > -1 || detailText.indexOf('券后') > -1) {
        // console.log('dp price info bad', price)
        info.ori_price = price;
        price = '';
      }
    }

    var promoPrice = getPrice('[class^=Price--extraPrice] span[class^=Price--priceText]');
    if (promoPrice) {
      price = promoPrice;
    }

    if ($('[class^=SecurityPrice--priceText]').length) {
      price = $('[class^=SecurityPrice--priceText]').text();
    }
    info.shop_name = $('.shopkeeper .right a').text();
    info.shop_addres = $('.locus .right').text().replace(/(?:\t|\n|\s)/ig, '');
    info.nnid = location.href.match(/[?&]id=([0-9]+)/) && location.href.match(/[?&]id=([0-9]+)/)[1];
    info.price = price;
    info.onPagePrice = price;
    info.newtitle = $('#J_Title .tb-main-title').text().trim();
    info.itemId = info.nnid;
    info.userid = userid;

    if (info.img && info.img.indexOf('//') === 0) {
      info.img = 'https:' + info.img;
    }

    info = tbInfoFix(info);
    return info;
  },
  'taobao-spu': function taobaoSpu() {
    return {
      'name': $('#detail .detail-hd h3').text(),
      'isbn': ''
    };
  },
  'xijie': function xijie() {
    return {
      'name': $('.detail_sh_right h1').text(),
      'isbn': ''
    };
  },
  'caomeipai': function caomeipai() {
    return {
      'name': $('#pro_name h2').text(),
      'isbn': ''
    };
  },
  'dahuozhan': function dahuozhan() {
    return {
      'name': $('.property h2').text(),
      'isbn': ''
    };
  },
  'huolida': function huolida() {
    return {
      'name': $('.h1_title h1').text(),
      'isbn': ''
    };
  },
  '12dian': function dian() {
    return {
      'name': $('.goodstitle').text(),
      'isbn': ''
    };
  },
  '111': function _() {
    var dp = getProductInfo();
    dp.name = $('.detailnav span').last().text();
    dp.price = window._BFD.BFD_INFO.price;
    return dp;
  },
  'daoyao': function daoyao() {
    return {
      'name': $('.product_1_4 .d_table_3 .font_01').text(),
      'isbn': ''
    };
  },
  'douban': function douban() {
    var tmp_isbn = $('#info').html();
    var isbn = '';
    var start = tmp_isbn.indexOf('ISBN:');
    var length = tmp_isbn.length;

    start += 12;
    for (; start < length; start++) {
      if (tmp_isbn[start] >= '0' && tmp_isbn[start] <= '9') {
        isbn += tmp_isbn[start];
      }
    }
    if (isbn === '') {
      var t = $('#content .indent').eq(1).text().match(/isbn: (\d+)/);
      if (t) {
        isbn = t[1];
        isbn = isbnTran(isbn);
      }
    }
    var href = window.location.href.toString();
    var matches = href.match(/gwd_isbn=(\d+)/);
    if (isbn == "" && matches) {
      isbn = matches[1];
    }

    var info = getProductInfo();
    info.isbn = isbn;
    return info;
  },
  'douban-dongxi': function doubanDongxi() {
    var info = getProductInfo();
    info.title = $('.commodity-name a').text();
    return info;
  },
  'it168': function it168() {
    return {
      'name': $('.title100 h1').text(),
      'isbn': ''
    };
  },
  'pconline': function pconline() {
    return {
      'name': $('.pro-tit .name').text(),
      'isbn': ''
    };
  },
  'pcpop': function pcpop() {
    return {
      'name': $('.tit1 h1').text(),
      'isbn': ''
    };
  },
  'yoka': function yoka() {
    return {
      'name': $('.pInfo_c2_lu h2').text(),
      'isbn': ''
    };
  },
  '55bbs': function bbs() {
    return {
      'name': $('.cpjsright_name h1').text(),
      'isbn': ''
    };
  },
  'onlylady': function onlylady() {
    return {
      'name': $('.bnnaer_text').text(),
      'isbn': ''
    };
  },
  '24dq': function dq() {
    return {
      'name': $('.goodsname').text(),
      'isbn': ''
    };
  },
  'lingshi': function lingshi() {
    return {
      'name': $('#detail_bb h3').text(),
      'isbn': ''
    };
  },
  'onlyts': function onlyts() {
    return {
      'name': $('#bread .last').eq(1).text(),
      'isbn': ''
    };
  },
  'winxuan': function winxuan() {
    var isbn = '';
    isbn = $('li:contains("I S B N：")').text().substr(8);
    var title = '';
    title = $("meta[name='keywords']").attr("content");
    return {
      'name': title,
      'isbn': isbn
    };
  },
  /*'new7' : function(){
   return {
   'name': $('.mainR h1 strong').text(),
   'isbn': ''
   }
   },*/
  'beifabook': function beifabook() {
    var isbn = $('#LabelISBN').text();
    isbn = isbn.replace(/-/g, "");
    return {
      'name': $('#LabelTitle').text(),
      'isbn': isbn
    };
  },
  'sina-tech': function sinaTech() {
    var name = $('.zcblk02 h2').html();
    if (typeof name == 'undefined' || name == '' || name == null) {
      name = $('.PartATitle h2').html();
      if (typeof name == 'undefined' || name == '' || name == null) {
        name = $('.Info h2').html();
        if (typeof name == 'undefined' || name == '' || name == null) {
          name = $('.product-name h1').html();
          if (typeof name == 'undefined' || name == '' || name == null) {
            name = $('title').html().substr(0, $('title').html().indexOf('_'));
          }
        }
      }
    }
    if (name.indexOf('<') > 0) {
      name = name.substr(0, name.indexOf('<'));
    }
    name = name.replace("&nbsp;", "");
    return {
      'name': name,
      'isbn': ''
    };
  },
  'sina-baby': function sinaBaby() {
    return {
      'name': $('.dp_info_title').text(),
      'isbn': ''
    };
  },
  'sina-eladies': function sinaEladies() {
    return {
      'name': $('.blk01 h1').text(),
      'isbn': ''
    };
  },
  'sohu-it': function sohuIt() {
    return {
      'name': $('.til h2').text(),
      'isbn': ''
    };
  },
  'sohu-women': function sohuWomen() {
    return {
      'name': $('.r h2 span').text(),
      'isbn': ''
    };
  },
  '163-digi': function digi() {
    var name = $('.colA h3').text();
    if (typeof name == 'undefined' || name == null || name == '') {
      name = $('.colA h1').text();
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  '163-lady': function lady() {
    return {
      'name': $('.detailbox-main h1').text(),
      'isbn': ''
    };
  },
  'qq-digi': function qqDigi() {
    var name = $('.top_hd h2').text();
    if (typeof name == 'undefined' || name == '' || name == null) {
      name = $('.font0751 span').text();
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  'qq-hea': function qqHea() {
    var name = $('#pdShow h1').text();
    if (typeof name == 'undefined' || name == '' || name == null) {
      name = $('#pdShow .longName').text();
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  'qq-lady': function qqLady() {
    var name = $('.pro_info .title').text();
    return {
      'name': name,
      'isbn': ''
    };
  },
  'vipshop': function vipshop() {
    var getCatgory = function getCatgory() {
      var result;
      if (window.O_viewed) {
        return {
          cat_id: window.O_viewed.category_id,
          cat_name: window.O_viewed.category_name
        };
      } else {
        // for chrome
        var s = $('#J-bottom-adCode').next().text();
        if (!s) s = $('#J_topbar_pop_template').next().text();
        s = /var O_viewed = {([\s\S]*?)}/.exec(s);
        if (s) s = s[1];
        var cat_id = /'category_id' : '(\d+)'/.exec(s);
        if (cat_id) cat_id = cat_id[1];
        var cat_name = /'category_name' : '(.*?)'/.exec(s);
        if (cat_name) cat_name = cat_name[1];
        return {
          cat_name: cat_name,
          cat_id: cat_id
        };
      }
    };
    var cat = getCatgory();
    var name = "";
    name = $(".bt_layout li:contains('商品名称') .bt_lt_par_p").text();
    if (name == "") {
      name = $.trim($('.pro_info .goods_protit').text());
    }
    if (name == "") {
      name = $('.bt_title').text().replace(/(?:\n|\t|\s)/ig, '');
    }
    if (name == "") {
      name = $.trim($('.pib-title-detail').text());
    }
    return {
      'price': $('.pi-price-box .sp-price').text(),
      'name': name,
      'isbn': '',
      'cat_id': cat.cat_id,
      'cat_name': cat.cat_name,
      'img': $('.J-mer-bigImgZoom').attr('href'),
      'brand_string': $('.pib-title-class a').text()
    };
  },
  'j1': function j1() {
    return {
      'name': $('.productarea-right-1 H1').text(),
      'isbn': ''
    };
  },
  'yougou': function yougou() {
    var dp = getProductInfo();
    dp.name = $('.goodsCon  .f16').text();
    if (dp.name == '') dp.name = $('.goodsCon h1').text().replace(/\s/g, '');
    if ($('#yitianPrice')) {
      dp.price = $('#yitianPrice').text();
    }
    return dp;
  },
  'jxdyf': function jxdyf() {
    return {
      'name': $('.product .pro_name').text(),
      'isbn': ''
    };
  },
  'yaofang': function yaofang() {
    var name = $('.pro_title').html();
    if (name.indexOf('<') > 0) {
      name = name.substr(0, name.indexOf('<'));
    }
    return {
      'name': name,
      'isbn': ''
    };
  },
  'tiantian': function tiantian() {
    return {
      'name': $('.detail_mbx .c_ed').text(),
      'isbn': ''
    };
  },
  'tiantian-tuan': function tiantianTuan() {
    var dp = getProductInfo();
    dp.name = $('td:contains("商品名称")+td span').text();
    dp.price = $('.buy_pri').text();
    return dp;
  },
  'yiguo': function yiguo() {
    return {
      'name': $.trim($('.main .cpname h1').text()),
      'isbn': ''
    };
  },
  'jiuxian': function jiuxian() {
    var dp = getProductInfo();
    dp.name = $('.dmainBox .detail-depict .depict-name h1').text();
    if (dp.name == '') dp.name = $('.detailName h2').text().replace('(私人定制)', '');
    dp.price = $('#_nowPriceStr').text();
    return dp;
  },
  'meilele-tuan': function meileleTuan() {
    var dp = getProductInfo();
    dp.name = $('#JS_tg_goods_name').text();
    var p = $('#JS_bnr_state').text().match(/[0-9]+/);
    if (p) dp.price = p[0];
    return dp;
  },
  'ehaier': function ehaier() {
    var dp = getProductInfo();
    dp.name = $('.a-product-title').text();
    dp.price = $('.pricetag .cur-price').text().match(/[0-9]+/)[0];
    return dp;
  },
  'ule': function ule() {
    var dp = getProductInfo();
    dp.name = $('.productInfo h1').text();
    dp.price = $('.productPrice .price strong').text();
    return dp;
  },
  'esprit': function esprit() {
    var dp = getProductInfo();
    dp.name = $('#itemName').text().replace(/\s/g, '');
    dp.price = $('#pdpPrice').text().replace(/[￥¥]+/, '');
    return dp;
  },
  'lining': function lining() {
    var dp = getProductInfo();
    dp.name = $('#product_name').text().replace(/\s/g, '');
    dp.price = $('#offerPrice .v').text().replace(/[\s￥¥]/g, '');
    return dp;
  },
  'oyeah': function oyeah() {
    var name = "";
    name = $("meta[name='Keywords']").attr("content");
    return {
      'name': name,
      'isbn': ''
    };
  },
  'lvyoumall': function lvyoumall() {
    return {
      'name': $("meta[name='keywords']").attr("content"),
      'isbn': ''
    };
  },
  'lefeng': function lefeng() {
    var name = "";
    var url = "";
    name = $.trim($(".path").text().split('/').pop());
    url = "http://product.lefeng.com/product/" + $("#productId").val() + ".html";
    var result = {
      'url': url,
      'name': name,
      'isbn': ''
    };
    if (!G.dp.price) {
      result['price'] = $('.dity-price-c').text();
    }
    return result;
  },
  'wbiao': function wbiao() {
    var dp = getProductInfo();
    dp.name = $('#info_on_sale h1').text();
    dp.price = $('#price').text();
    return dp;
  },
  'banggo': function banggo() {
    var dp = getProductInfo();
    dp.name = $('.goods-name').text();
    dp.price = $('#salePriceText').text();
    return dp;
  },
  'yohobuy': function yohobuy() {
    var dp = getProductInfo();
    dp.price = $('.promotion-price .price').text();
    if (!dp.price) dp.price = $('.product-detail-page .main .price').text();
    dp.name = $('.product-detail-page .main .name').text();
    return dp;
  },
  'sundan': function sundan() {
    return {
      name: $('#buy_form div.box>div.ng-info>h2').text(),
      price: $('#buy_form div.box>div.ng-size span.price').text()
    };
  },
  'adidas-us': function adidasUs() {
    return {
      name: $('.pdp-title h3').text(),
      price: $('.pdp-title .goods-price').text()
    };
  },
  'jiae': function jiae() {
    return {
      name: $('#content div.item-intro>div.property>h1').text(),
      price: $('#content div.item-intro>div.property .itemDetail-itemPrice span.j-item-now-price').text()
    };
  },
  'zazhipu': function zazhipu() {
    return {
      name: $('.ic_content div.grid_m div.xbase_row1>h1').text(),
      price: $('.ic_content div.grid_m div.xbase_row2 span.mod_price').text().split('￥')[2].split('.')[0]
    };
  },
  'microsoftstore': function microsoftstore() {
    var name = $('#inner div.pdpContent>div.pdpInfo>.pdp_module_info>div.title>h1').text() || $('#inner div.content-block .right h2.title').text();
    var price = $('#inner div.pdpContent>div.pdpInfo>.pdp_module_info>.priceAndRank>div.price>span.current').text() || $('#selectVariantProduct span.price').text();
    return {
      name: name,
      price: price
    };
  },
  'xgdq': function xgdq() {
    return {
      name: $('.product-main .product-titles>h2').text(),
      price: $('.product-main .product-concerns li:first .action-price').text()
    };
  },
  'xtep': function xtep() {
    var name = $('.goodsDetailsBox .goodsPrice>dt').text();
    var price = $('.goodsDetailsBox .goodsPrice dd>ul>li>div:first>span').text();
    if (!name || !price) {
      name = $('.wrapper .groupTittle').text();
      price = $('.wrapper .groupPriceBox>a>span').text();
    }
    return {
      name: name,
      price: price
    };
  },
  'midea': function midea() {
    return {
      name: $('.product_wrap>.product_right>h1').text(),
      price: $('.product_wrap>.product_right .price').text()
    };
  }
};
module.exports.productPattern = productPattern;

var reTry = undefined;

var retryCount = 0;
var startTime = Date.now();
var delayConditions = {
  'tmall': function tmall() {
    if ($('[class^=Price--root]').length) {
      return $('[class^=Price--priceText]:eq(0)').text();
    }
    if (Date.now() - startTime > 5000) {
      return true;
    }
    if (G.GwdConfig) {
      return true;
    }
    retryCount++;
    return retryCount > 10;
  },
  'taobao': function taobao() {
    if ($('#J_ImgBooth').attr('src')) {
      return true;
    }
    if (Date.now() - startTime > 5000) {
      return true;
    }
    if (G.GwdConfig) {
      return true;
    }
    retryCount++;
    return retryCount > 10;
  },
  'amazon': function amazon() {
    if ($('#apex_desktop .a-price span[aria-hidden=true]').length) {
      return true;
    }
    retryCount++;
    if (retryCount > 10) {
      console.warn('amazon not met');
    }
    return retryCount > 10;
  },
  '360buy': function buy() {
    return $('.p-price').text() || Date.now() - startTime > 3000;
  }
};

//获取商品信息的统一入口
var get = function get(callback) {
  var dp, href, delayLoadList, siteName, siteId;
  return regeneratorRuntime.async(function get$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(G.pageInfo.type === 1)) {
          context$1$0.next = 3;
          break;
        }

        callback();
        return context$1$0.abrupt('return');

      case 3:
        if (!delayConditions[G.site]) {
          context$1$0.next = 6;
          break;
        }

        context$1$0.next = 6;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(delayConditions[G.site]));

      case 6:
        dp = undefined;

        siteName = G.pageInfo.siteName;
        href = window.location.href;

        try {
          if (siteName && siteName.indexOf('amazon') > -1) siteName = 'amazon';
          if (siteName === 'taobao' && $('[class^=Item--main--]').length) {
            siteName = 'tmall';
          }
          dp = productPattern[siteName]();
          dp.oldPrice = dp.price;
          if (dp.price && dp.price.match(/(?:\?|\？)/)) dp.activePrice = true;
          if (typeof parseprice === 'function') {
            dp.price = parseprice(dp.price);
            dp.oldPrice = parseprice.getPriceBeforeExchangeRate(dp.oldPrice);
          }
          dp.site = siteName;
          if (dp.url == null) {
            if (dp.href != null) {
              dp.url = dp.href;
            } else {
              dp.url = href;
            }
          }
        } catch (e) {
          /*eslint-disable */
          G.debug = true;
          if (G.debug) {
            console.error(e);
          }
          /*eslint-enable */
          dp = getProductInfo();
          dp.site = siteName;
          dp.url = href;
        }

        if (!(typeof dp.useless != 'undefined' && dp.useless)) {
          context$1$0.next = 12;
          break;
        }

        return context$1$0.abrupt('return', null);

      case 12:
        dp.icon = dp.url.replace(/^http[s]?\:\/\//g, "");
        dp.icon = dp.icon.replace(/\/.*?$/g, "");
        dp.icon += '/favicon.ico';
        if (typeof dp.id == 'undefined' || dp.id == null) {
          dp.id = "";
        }
        if (typeof dp.keyword == 'undefined' || dp.keyword == null) {
          dp.keyword = '';
        }
        if (typeof dp.skeyword == 'undefined' || dp.skeyword == null) {
          dp.skeyword = '';
        }
        if (typeof dp.isbn == 'undefined' || dp.isbn == null) {
          dp.isbn = '';
        }
        delayLoadList = ['youpin-mi', 'oneplus', 'lenovo', 'vipshop', 'amazon'];

        if (!(delayLoadList.indexOf(G.site) > -1 && !dp.price && !dp.name && !reTry)) {
          context$1$0.next = 24;
          break;
        }

        reTry = true;
        setTimeout(function () {
          get(callback);
        }, 2000);
        return context$1$0.abrupt('return');

      case 24:
        G.dp = dp;
        if (!dp.price) {
          siteName = G.site;
          siteId = detect.getSiteId(siteName);

          if (!siteId) siteId = 9999;
          priceParser.init(siteId, function (price) {
            if (price && price > 0) {
              dp.oldPrice = price;
              dp.price = price;
            }
            if (callback) callback();
          });
        } else {
          if (typeof dp.name == 'undefined' || dp.name == '') {
            dp.name = $('title').text();
          }
          if (callback) callback();
        }
        __webpack_require__(4).setMet('productInfoReady');
        return context$1$0.abrupt('return', dp);

      case 28:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.get = get;
module.exports.tbInfoFix = tbInfoFix;
module.exports.appendTbInfoForUrl = function (url) {
  if (!G.aliSite) return url;
  if (!G.dp) return url;
  G.dp = tbInfoFix(G.dp);
  if (G.dp.pic && G.dp.pic[0] === '/') {
    G.dp.pic = 'https:' + G.dp.pic;
  }
  var util = __webpack_require__(10);
  var urlDpId = util.getParameterByName('dp_id', url);
  if (urlDpId && urlDpId !== G.dp.dpId) {
    return url;
  }

  return '' + url + (url.includes('?') ? '' : '?') + '&title=' + encodeURIComponent(G.dp.name) + '&img=' + encodeURIComponent(G.dp.pic) + '&price=' + (G.dp.price ? G.dp.price : G.dp.ori_price) + '&shopName=' + encodeURIComponent(G.dp.shopName.trim()) + '&sellAmount=' + encodeURIComponent(G.dp.shopAmount) + (G.lang === 'zh-tr' ? '&lang=zh-tr' : '');
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var userData = __webpack_require__(15);
var request = __webpack_require__(3);
var countryConfig = __webpack_require__(26);
var communicate = __webpack_require__(18);
var globalCurrency = {};

var unitConfig = [{
  unitName: '千',
  times: 1000
}, {
  unitName: '万',
  times: 10000
}];
var unit = 1;

var getPriceBeforeExchangeRate = function getPriceBeforeExchangeRate(price, type) {
  if (!price) return;
  price = price.toString();
  unit = 1;
  if (Array.prototype.forEach) {
    unitConfig.forEach(function (i) {
      if (price.indexOf(i.unitName) > -1) {
        unit = i.times;
      }
    });
  }
  price = price.replace(/^[^\d]+/ig, '');
  price = price.replace(/[￥\$]/ig, '');
  price = price.match(/[0-9.,]+/) && price.match(/[0-9.,]+/)[0];
  if (!price) return price;
  price = priceFormat(price, type);
  price = price.replace(/,/ig, '');
  price = $.trim(price);
  var range_left = price.indexOf('-');
  if (range_left > 0) {
    price = price.substr(0, range_left);
  }
  //修正价格提取出现的小数部分不准确问题（如一号店）
  price = price.replace(/^(\d+\.)\<.+\>(\d{0,2})\<\/.+\>/ig, "$1$2");
  return price;
};

module.exports = function (price, type) {
  price = getPriceBeforeExchangeRate(price, type);
  //fix end
  price = exchangeRate(price, type);
  if (parseFloat(price) > 0) {
    price = parseFloat(price);
    if (unit) price = price * unit;
    return price;
  } else return 0;
};

module.exports.getPriceBeforeExchangeRate = getPriceBeforeExchangeRate;

var exchangeRate = function exchangeRate(price, type) {
  var exRate = undefined;
  if (type) {
    exRate = globalCurrency[type] || 1;
  } else {
    exRate = userData.get('currency') || G.currency || 1;
  }
  return parseFloat((Number(price) * exRate).toFixed(2));
};

var priceFormat = function priceFormat(price, type) {
  if (type) return price;
  if (G.pageInfo.type == 1) return price;
  var host = location.host;
  var euroAmazonConfig = {
    'www.amazon.de': 'prime',
    'www.amazon.fr': 'premium'
  };
  if (euroAmazonConfig[host] && $('#nav-logo .nav-logo-tagline').text().replace(/\s/g, '').trim().toLowerCase().indexOf(euroAmazonConfig[host]) > -1) price = price.replace('.', '').replace(',', '.');
  return price;
};
var storeRate = function storeRate(currency) {
  communicate.trigger({
    type: 'setStoreRate',
    info: JSON.stringify(currency)
  });
};
var getStoreRate = function getStoreRate() {
  communicate.on(function (info) {
    if (info && info.type == 'getStoreRate') {
      try {
        var currency = info.value.currency;
        var newInfo = JSON.parse(currency);
        globalCurrency = newInfo.elsecurr;
        G.currency = newInfo.currency;
      } catch (e) {}
    }
  });
  communicate.trigger({
    type: 'getStoreRate'
  });
};
var readyGet = function readyGet() {
  if (location.host === 'www.amazon.cn') return;
  if (location.host.indexOf('amazon') > -1 || location.host.indexOf('6pm') > -1) {
    getStoreRate();
  }
};
readyGet();

module.exports.getExRate = function (type) {
  return parseFloat(globalCurrency[type] | 1);
};

module.exports.getRate = function (callback) {
  __webpack_require__(6).log('getRate');
  var site = G.logsite;
  var moneyInfo = countryConfig.getMoneyInfo(site);
  if (moneyInfo && moneyInfo[0] !== '¥') {
    var url = G.server + '/extension?ac=currency&url=' + encodeURIComponent(location.href);
    request.get(url).then(function (data) {
      if (data && data.currency) {
        userData.set('currency', data.currency);
        globalCurrency = data.elsecurr;
        G.currency = data.currency;
        storeRate(data);
      }
      callback();
    })['catch'](function () {
      callback();
    });
  } else {
    callback();
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G) {

var _this3 = this;

var request = __webpack_require__(3);
var host = 'https://i.bijiago.com';
var communicate = __webpack_require__(18);
var util = __webpack_require__(19);
var store = __webpack_require__(72);
var client = __webpack_require__(16);

var loginCache = undefined;
var dpCache = undefined;

module.exports = {
  hasUserToken: function hasUserToken() {
    var _this = this;

    return new Promise(function callee$1$0(resolve) {
      var resolved, dpId;
      return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
        while (1) switch (context$2$0.prev = context$2$0.next) {
          case 0:
            resolved = false;

            communicate.trigger({
              type: 'checkUserTokenBjg'
            });
            communicate.on(function (data) {
              if (typeof data === 'string') {
                data = JSON.parse(data);
              }
              if (data.type === 'checkUserTokenBjg') {
                resolved = true;
                resolve(data.value);
              }
            });

            if (!(navigator.userAgent.toLowerCase().indexOf('metasr') > -1 || !G.allowBackgroundRequest)) {
              context$2$0.next = 11;
              break;
            }

            if (!(loginCache !== undefined)) {
              context$2$0.next = 7;
              break;
            }

            resolve(loginCache);
            return context$2$0.abrupt('return');

          case 7:
            context$2$0.next = 9;
            return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

          case 9:
            dpId = context$2$0.sent;

            request.requestXHR(host + '/UserCollection/Check?dp_id=' + dpId + '&app_platform=ext').then(function (res) {
              if (res.code !== -3) {
                loginCache = true;
                resolve(true);
                dpCache = res;
              } else {
                loginCache = false;
                resolve(false);
              }
            });

          case 11:
          case 'end':
            return context$2$0.stop();
        }
      }, null, _this);
    });
  },
  goLogin: function goLogin() {
    var forceOpen = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];

    if (G.bgVer > 1) {
      location.href = 'https://www.bijiago.com/login?to=' + encodeURIComponent(location.href + (forceOpen ? '#forceOpen' : ''));
    } else {
      location.href = 'https://i.bijiago.com/UserUnion/Authorize?utype=2&app_platform=ext&_referer=' + encodeURIComponent(location.href + (forceOpen ? '#forceOpen' : ''));
    }
  },
  del: function del(dp_id) {
    return request.post(host + '/UserCollection/Delete?app_platform=ext', {
      collection_id: dp_id
    }, true);
  },
  getList: function getList(pg) {
    var tab = arguments.length <= 1 || arguments[1] === undefined ? 'default' : arguments[1];

    return request.get(host + '/UserCollection/List?tab=' + tab + '&pg=' + pg + '&app_platform=ext&union=' + G.union);
  },
  collect: function collect(dp_id) {
    var payload = {
      dp_id: dp_id,
      //price: G.dp.price * 100,
      url: location.href,
      title: G.dp.name ? G.dp.name : document.title,
      img: G.dp.img ? G.dp.img : G.dp.pic ? G.dp.pic : ''
    };
    console.log('dp price collect', G.dp.price);
    if (G.dp.price) {
      payload.price = G.dp.price * 100;
    } else {
      payload.price = 0;
    }
    if (__webpack_require__(27).isHaitao()) {
      payload.price = G.dp.oldPrice * 100;
    }
    return request.post(host + '/UserCollection/Add?app_platform=ext', payload, true);
  },
  sendCartLog: function sendCartLog(payload) {
    return request.requestXHRPost(host + '/UserExtend/WorthOrderUpload?app_platform=ext', payload, false);
  },
  hasWx: function hasWx() {
    return new Promise(function (resolve) {
      var t = util.getStorage('userHasWx');
      if (t) {
        resolve(true);
      } else {
        request.requestXHR(host + '/UserUnion/hasWx').then(function (res) {
          if (res.data.hasWx) {
            util.setStorage('userHasWx', true);
            resolve(true);
          }
        });
      }
    });
  },
  checked: function checked(dp_id) {
    if (G.productChecked) {
      return new Promise(function (resolve) {
        return resolve(G.productChecked);
      });
    } else {
      return new Promise(function (resolve) {
        if (dpCache) {
          resolve(dpCache);
        }
        request.get(host + '/UserCollection/Check?dp_id=' + dp_id + '&app_platform=ext').then(function (res) {
          resolve(res);
        });
      });
    }
  }
};

var inited = false;

module.exports.init = function callee$0$0() {
  var user;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    var _this2 = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!inited) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return', true);

      case 2:
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(module.exports.hasUserToken());

      case 4:
        user = context$1$0.sent;

        store.commit('user/setState', {
          userLogin: user
        });

        if (user) {
          context$1$0.next = 9;
          break;
        }

        context$1$0.next = 9;
        return regeneratorRuntime.awrap(client.get('/clearUserName', {}));

      case 9:

        if (G.allowBackgroundRequest) {
          client.get('/getUserName', {}, function callee$1$0(data) {
            return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  store.commit('user/setState', {
                    userName: data
                  });
                  context$2$0.next = 3;
                  return regeneratorRuntime.awrap(module.exports.hasWx());

                case 3:
                  if (!context$2$0.sent) {
                    context$2$0.next = 5;
                    break;
                  }

                  store.commit('user/setState', {
                    userHasWx: true
                  });

                case 5:
                case 'end':
                  return context$2$0.stop();
              }
            }, null, _this2);
          });
        }

        inited = true;
        return context$1$0.abrupt('return', true);

      case 12:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this3);
};

//if (true) {
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G) {

var _this = this;

var cnzz = __webpack_require__(12);
var QRCode = __webpack_require__(331);

/**获取二维码
 *
 * @param obj
 * @param url
 * @param callback
 * @param useOriTitle 使用原始标题
 * @param noReplace 直接生成二维码，不请求接口
 */
module.exports = function callee$0$0(obj, url, callback) {
    var useOriTitle = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
    var noReplace = arguments.length <= 4 || arguments[4] === undefined ? false : arguments[4];
    var id;
    return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
            case 0:

                obj.couponUrl = url;
                if (obj.title.length === 0 && !useOriTitle) {
                    obj.title = 'x';
                }
                id = obj.id;

                obj = JSON.stringify(obj);
                // let xml = new XMLHttpRequest()
                // xml.open('POST', `${G.server}/extension/CouponQrCode?w=150`)
                // xml.addEventListener('load', function() {
                //     try {
                //         let data = JSON.parse(xml.response);
                //         callback(data)
                //     } catch (e) {}
                // })
                // xml.send(obj);

                if (!noReplace) {
                    context$1$0.next = 7;
                    break;
                }

                QRCode.toDataURL(url, { errorCorrectionLevel: 'L' }, function (err, url) {
                    if (err) {
                        //require('common/extConsole').error(err)
                        return;
                    }
                    callback([{
                        imgSrc: url
                    }]);
                });
                return context$1$0.abrupt('return');

            case 7:
                if (!(G.ss_name === 'priceDog' && G.aliSite)) {
                    context$1$0.next = 10;
                    break;
                }

                __webpack_require__(3).get(G.u_server + '/helper/qrcode?event=appQrcode&dp_id=' + id + '&union=' + G.union).then(function (res) {
                    if (res.code === 1 && res.data && res.data.qrImgStr) {
                        callback([{
                            imgSrc: res.data.qrImgStr
                        }]);
                    } else {
                        callback([{ etag: 0 }]);
                    }
                });
                return context$1$0.abrupt('return');

            case 10:
                __webpack_require__(3).post(G.server + '/extension/CouponQrCode?union=' + G.union + '&w=150&from_device=' + G.from_device + '&rand=' + parseInt(Math.random() * 1000), obj, false, false).then(function (data) {
                    try {
                        data = JSON.parse(data);
                        callback(data);
                    } catch (e) {
                        callback(data);
                        //require('common/extConsole').error(e)
                    }
                });
                cnzz.log("实时抓取发送请求");

            case 12:
            case 'end':
                return context$1$0.stop();
        }
    }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 24 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLogger", function() { return createLogger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
/*!
 * vuex v3.6.2
 * (c) 2021 Evan You
 * @license MIT
 */
function applyMixin (Vue) {
  var version = Number(Vue.version.split('.')[0]);

  if (version >= 2) {
    Vue.mixin({ beforeCreate: vuexInit });
  } else {
    // override init and inject vuex init procedure
    // for 1.x backwards compatibility.
    var _init = Vue.prototype._init;
    Vue.prototype._init = function (options) {
      if ( options === void 0 ) options = {};

      options.init = options.init
        ? [vuexInit].concat(options.init)
        : vuexInit;
      _init.call(this, options);
    };
  }

  /**
   * Vuex init hook, injected into each instances init hooks list.
   */

  function vuexInit () {
    var options = this.$options;
    // store injection
    if (options.store) {
      this.$store = typeof options.store === 'function'
        ? options.store()
        : options.store;
    } else if (options.parent && options.parent.$store) {
      this.$store = options.parent.$store;
    }
  }
}

var target = typeof window !== 'undefined'
  ? window
  : typeof global !== 'undefined'
    ? global
    : {};
var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;

function devtoolPlugin (store) {
  if (!devtoolHook) { return }

  store._devtoolHook = devtoolHook;

  devtoolHook.emit('vuex:init', store);

  devtoolHook.on('vuex:travel-to-state', function (targetState) {
    store.replaceState(targetState);
  });

  store.subscribe(function (mutation, state) {
    devtoolHook.emit('vuex:mutation', mutation, state);
  }, { prepend: true });

  store.subscribeAction(function (action, state) {
    devtoolHook.emit('vuex:action', action, state);
  }, { prepend: true });
}

/**
 * Get the first item that pass the test
 * by second argument function
 *
 * @param {Array} list
 * @param {Function} f
 * @return {*}
 */
function find (list, f) {
  return list.filter(f)[0]
}

/**
 * Deep copy the given object considering circular structure.
 * This function caches all nested objects and its copies.
 * If it detects circular structure, use cached copy to avoid infinite loop.
 *
 * @param {*} obj
 * @param {Array<Object>} cache
 * @return {*}
 */
function deepCopy (obj, cache) {
  if ( cache === void 0 ) cache = [];

  // just return if obj is immutable value
  if (obj === null || typeof obj !== 'object') {
    return obj
  }

  // if obj is hit, it is in circular structure
  var hit = find(cache, function (c) { return c.original === obj; });
  if (hit) {
    return hit.copy
  }

  var copy = Array.isArray(obj) ? [] : {};
  // put the copy into cache at first
  // because we want to refer it in recursive deepCopy
  cache.push({
    original: obj,
    copy: copy
  });

  Object.keys(obj).forEach(function (key) {
    copy[key] = deepCopy(obj[key], cache);
  });

  return copy
}

/**
 * forEach for object
 */
function forEachValue (obj, fn) {
  Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
}

function isObject (obj) {
  return obj !== null && typeof obj === 'object'
}

function isPromise (val) {
  return val && typeof val.then === 'function'
}

function assert (condition, msg) {
  if (!condition) { throw new Error(("[vuex] " + msg)) }
}

function partial (fn, arg) {
  return function () {
    return fn(arg)
  }
}

// Base data struct for store's module, package with some attribute and method
var Module = function Module (rawModule, runtime) {
  this.runtime = runtime;
  // Store some children item
  this._children = Object.create(null);
  // Store the origin module object which passed by programmer
  this._rawModule = rawModule;
  var rawState = rawModule.state;

  // Store the origin module's state
  this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
};

var prototypeAccessors = { namespaced: { configurable: true } };

prototypeAccessors.namespaced.get = function () {
  return !!this._rawModule.namespaced
};

Module.prototype.addChild = function addChild (key, module) {
  this._children[key] = module;
};

Module.prototype.removeChild = function removeChild (key) {
  delete this._children[key];
};

Module.prototype.getChild = function getChild (key) {
  return this._children[key]
};

Module.prototype.hasChild = function hasChild (key) {
  return key in this._children
};

Module.prototype.update = function update (rawModule) {
  this._rawModule.namespaced = rawModule.namespaced;
  if (rawModule.actions) {
    this._rawModule.actions = rawModule.actions;
  }
  if (rawModule.mutations) {
    this._rawModule.mutations = rawModule.mutations;
  }
  if (rawModule.getters) {
    this._rawModule.getters = rawModule.getters;
  }
};

Module.prototype.forEachChild = function forEachChild (fn) {
  forEachValue(this._children, fn);
};

Module.prototype.forEachGetter = function forEachGetter (fn) {
  if (this._rawModule.getters) {
    forEachValue(this._rawModule.getters, fn);
  }
};

Module.prototype.forEachAction = function forEachAction (fn) {
  if (this._rawModule.actions) {
    forEachValue(this._rawModule.actions, fn);
  }
};

Module.prototype.forEachMutation = function forEachMutation (fn) {
  if (this._rawModule.mutations) {
    forEachValue(this._rawModule.mutations, fn);
  }
};

Object.defineProperties( Module.prototype, prototypeAccessors );

var ModuleCollection = function ModuleCollection (rawRootModule) {
  // register root module (Vuex.Store options)
  this.register([], rawRootModule, false);
};

ModuleCollection.prototype.get = function get (path) {
  return path.reduce(function (module, key) {
    return module.getChild(key)
  }, this.root)
};

ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  var module = this.root;
  return path.reduce(function (namespace, key) {
    module = module.getChild(key);
    return namespace + (module.namespaced ? key + '/' : '')
  }, '')
};

ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  update([], this.root, rawRootModule);
};

ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
    var this$1 = this;
    if ( runtime === void 0 ) runtime = true;

  if ((false)) {
    assertRawModule(path, rawModule);
  }

  var newModule = new Module(rawModule, runtime);
  if (path.length === 0) {
    this.root = newModule;
  } else {
    var parent = this.get(path.slice(0, -1));
    parent.addChild(path[path.length - 1], newModule);
  }

  // register nested modules
  if (rawModule.modules) {
    forEachValue(rawModule.modules, function (rawChildModule, key) {
      this$1.register(path.concat(key), rawChildModule, runtime);
    });
  }
};

ModuleCollection.prototype.unregister = function unregister (path) {
  var parent = this.get(path.slice(0, -1));
  var key = path[path.length - 1];
  var child = parent.getChild(key);

  if (!child) {
    if ((false)) {
      console.warn(
        "[vuex] trying to unregister module '" + key + "', which is " +
        "not registered"
      );
    }
    return
  }

  if (!child.runtime) {
    return
  }

  parent.removeChild(key);
};

ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  var parent = this.get(path.slice(0, -1));
  var key = path[path.length - 1];

  if (parent) {
    return parent.hasChild(key)
  }

  return false
};

function update (path, targetModule, newModule) {
  if ((false)) {
    assertRawModule(path, newModule);
  }

  // update target module
  targetModule.update(newModule);

  // update nested modules
  if (newModule.modules) {
    for (var key in newModule.modules) {
      if (!targetModule.getChild(key)) {
        if ((false)) {
          console.warn(
            "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
            'manual reload is needed'
          );
        }
        return
      }
      update(
        path.concat(key),
        targetModule.getChild(key),
        newModule.modules[key]
      );
    }
  }
}

var functionAssert = {
  assert: function (value) { return typeof value === 'function'; },
  expected: 'function'
};

var objectAssert = {
  assert: function (value) { return typeof value === 'function' ||
    (typeof value === 'object' && typeof value.handler === 'function'); },
  expected: 'function or object with "handler" function'
};

var assertTypes = {
  getters: functionAssert,
  mutations: functionAssert,
  actions: objectAssert
};

function assertRawModule (path, rawModule) {
  Object.keys(assertTypes).forEach(function (key) {
    if (!rawModule[key]) { return }

    var assertOptions = assertTypes[key];

    forEachValue(rawModule[key], function (value, type) {
      assert(
        assertOptions.assert(value),
        makeAssertionMessage(path, key, type, value, assertOptions.expected)
      );
    });
  });
}

function makeAssertionMessage (path, key, type, value, expected) {
  var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  if (path.length > 0) {
    buf += " in module \"" + (path.join('.')) + "\"";
  }
  buf += " is " + (JSON.stringify(value)) + ".";
  return buf
}

var Vue; // bind on install

var Store = function Store (options) {
  var this$1 = this;
  if ( options === void 0 ) options = {};

  // Auto install if it is not done yet and `window` has `Vue`.
  // To allow users to avoid auto-installation in some cases,
  // this code should be placed here. See #731
  if (!Vue && typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
  }

  if ((false)) {
    assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
    assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
    assert(this instanceof Store, "store must be called with the new operator.");
  }

  var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  var strict = options.strict; if ( strict === void 0 ) strict = false;

  // store internal state
  this._committing = false;
  this._actions = Object.create(null);
  this._actionSubscribers = [];
  this._mutations = Object.create(null);
  this._wrappedGetters = Object.create(null);
  this._modules = new ModuleCollection(options);
  this._modulesNamespaceMap = Object.create(null);
  this._subscribers = [];
  this._watcherVM = new Vue();
  this._makeLocalGettersCache = Object.create(null);

  // bind commit and dispatch to self
  var store = this;
  var ref = this;
  var dispatch = ref.dispatch;
  var commit = ref.commit;
  this.dispatch = function boundDispatch (type, payload) {
    return dispatch.call(store, type, payload)
  };
  this.commit = function boundCommit (type, payload, options) {
    return commit.call(store, type, payload, options)
  };

  // strict mode
  this.strict = strict;

  var state = this._modules.root.state;

  // init root module.
  // this also recursively registers all sub-modules
  // and collects all module getters inside this._wrappedGetters
  installModule(this, state, [], this._modules.root);

  // initialize the store vm, which is responsible for the reactivity
  // (also registers _wrappedGetters as computed properties)
  resetStoreVM(this, state);

  // apply plugins
  plugins.forEach(function (plugin) { return plugin(this$1); });

  var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  if (useDevtools) {
    devtoolPlugin(this);
  }
};

var prototypeAccessors$1 = { state: { configurable: true } };

prototypeAccessors$1.state.get = function () {
  return this._vm._data.$$state
};

prototypeAccessors$1.state.set = function (v) {
  if ((false)) {
    assert(false, "use store.replaceState() to explicit replace store state.");
  }
};

Store.prototype.commit = function commit (_type, _payload, _options) {
    var this$1 = this;

  // check object-style commit
  var ref = unifyObjectStyle(_type, _payload, _options);
    var type = ref.type;
    var payload = ref.payload;
    var options = ref.options;

  var mutation = { type: type, payload: payload };
  var entry = this._mutations[type];
  if (!entry) {
    if ((false)) {
      console.error(("[vuex] unknown mutation type: " + type));
    }
    return
  }
  this._withCommit(function () {
    entry.forEach(function commitIterator (handler) {
      handler(payload);
    });
  });

  this._subscribers
    .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
    .forEach(function (sub) { return sub(mutation, this$1.state); });

  if (
    false
  ) {
    console.warn(
      "[vuex] mutation type: " + type + ". Silent option has been removed. " +
      'Use the filter functionality in the vue-devtools'
    );
  }
};

Store.prototype.dispatch = function dispatch (_type, _payload) {
    var this$1 = this;

  // check object-style dispatch
  var ref = unifyObjectStyle(_type, _payload);
    var type = ref.type;
    var payload = ref.payload;

  var action = { type: type, payload: payload };
  var entry = this._actions[type];
  if (!entry) {
    if ((false)) {
      console.error(("[vuex] unknown action type: " + type));
    }
    return
  }

  try {
    this._actionSubscribers
      .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
      .filter(function (sub) { return sub.before; })
      .forEach(function (sub) { return sub.before(action, this$1.state); });
  } catch (e) {
    if ((false)) {
      console.warn("[vuex] error in before action subscribers: ");
      console.error(e);
    }
  }

  var result = entry.length > 1
    ? Promise.all(entry.map(function (handler) { return handler(payload); }))
    : entry[0](payload);

  return new Promise(function (resolve, reject) {
    result.then(function (res) {
      try {
        this$1._actionSubscribers
          .filter(function (sub) { return sub.after; })
          .forEach(function (sub) { return sub.after(action, this$1.state); });
      } catch (e) {
        if ((false)) {
          console.warn("[vuex] error in after action subscribers: ");
          console.error(e);
        }
      }
      resolve(res);
    }, function (error) {
      try {
        this$1._actionSubscribers
          .filter(function (sub) { return sub.error; })
          .forEach(function (sub) { return sub.error(action, this$1.state, error); });
      } catch (e) {
        if ((false)) {
          console.warn("[vuex] error in error action subscribers: ");
          console.error(e);
        }
      }
      reject(error);
    });
  })
};

Store.prototype.subscribe = function subscribe (fn, options) {
  return genericSubscribe(fn, this._subscribers, options)
};

Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  var subs = typeof fn === 'function' ? { before: fn } : fn;
  return genericSubscribe(subs, this._actionSubscribers, options)
};

Store.prototype.watch = function watch (getter, cb, options) {
    var this$1 = this;

  if ((false)) {
    assert(typeof getter === 'function', "store.watch only accepts a function.");
  }
  return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
};

Store.prototype.replaceState = function replaceState (state) {
    var this$1 = this;

  this._withCommit(function () {
    this$1._vm._data.$$state = state;
  });
};

Store.prototype.registerModule = function registerModule (path, rawModule, options) {
    if ( options === void 0 ) options = {};

  if (typeof path === 'string') { path = [path]; }

  if ((false)) {
    assert(Array.isArray(path), "module path must be a string or an Array.");
    assert(path.length > 0, 'cannot register the root module by using registerModule.');
  }

  this._modules.register(path, rawModule);
  installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  // reset store to update getters...
  resetStoreVM(this, this.state);
};

Store.prototype.unregisterModule = function unregisterModule (path) {
    var this$1 = this;

  if (typeof path === 'string') { path = [path]; }

  if ((false)) {
    assert(Array.isArray(path), "module path must be a string or an Array.");
  }

  this._modules.unregister(path);
  this._withCommit(function () {
    var parentState = getNestedState(this$1.state, path.slice(0, -1));
    Vue.delete(parentState, path[path.length - 1]);
  });
  resetStore(this);
};

Store.prototype.hasModule = function hasModule (path) {
  if (typeof path === 'string') { path = [path]; }

  if ((false)) {
    assert(Array.isArray(path), "module path must be a string or an Array.");
  }

  return this._modules.isRegistered(path)
};

Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  this._modules.update(newOptions);
  resetStore(this, true);
};

Store.prototype._withCommit = function _withCommit (fn) {
  var committing = this._committing;
  this._committing = true;
  fn();
  this._committing = committing;
};

Object.defineProperties( Store.prototype, prototypeAccessors$1 );

function genericSubscribe (fn, subs, options) {
  if (subs.indexOf(fn) < 0) {
    options && options.prepend
      ? subs.unshift(fn)
      : subs.push(fn);
  }
  return function () {
    var i = subs.indexOf(fn);
    if (i > -1) {
      subs.splice(i, 1);
    }
  }
}

function resetStore (store, hot) {
  store._actions = Object.create(null);
  store._mutations = Object.create(null);
  store._wrappedGetters = Object.create(null);
  store._modulesNamespaceMap = Object.create(null);
  var state = store.state;
  // init all modules
  installModule(store, state, [], store._modules.root, true);
  // reset vm
  resetStoreVM(store, state, hot);
}

function resetStoreVM (store, state, hot) {
  var oldVm = store._vm;

  // bind store public getters
  store.getters = {};
  // reset local getters cache
  store._makeLocalGettersCache = Object.create(null);
  var wrappedGetters = store._wrappedGetters;
  var computed = {};
  forEachValue(wrappedGetters, function (fn, key) {
    // use computed to leverage its lazy-caching mechanism
    // direct inline function use will lead to closure preserving oldVm.
    // using partial to return function with only arguments preserved in closure environment.
    computed[key] = partial(fn, store);
    Object.defineProperty(store.getters, key, {
      get: function () { return store._vm[key]; },
      enumerable: true // for local getters
    });
  });

  // use a Vue instance to store the state tree
  // suppress warnings just in case the user has added
  // some funky global mixins
  var silent = Vue.config.silent;
  Vue.config.silent = true;
  store._vm = new Vue({
    data: {
      $$state: state
    },
    computed: computed
  });
  Vue.config.silent = silent;

  // enable strict mode for new vm
  if (store.strict) {
    enableStrictMode(store);
  }

  if (oldVm) {
    if (hot) {
      // dispatch changes in all subscribed watchers
      // to force getter re-evaluation for hot reloading.
      store._withCommit(function () {
        oldVm._data.$$state = null;
      });
    }
    Vue.nextTick(function () { return oldVm.$destroy(); });
  }
}

function installModule (store, rootState, path, module, hot) {
  var isRoot = !path.length;
  var namespace = store._modules.getNamespace(path);

  // register in namespace map
  if (module.namespaced) {
    if (store._modulesNamespaceMap[namespace] && ("production" !== 'production')) {
      console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
    }
    store._modulesNamespaceMap[namespace] = module;
  }

  // set state
  if (!isRoot && !hot) {
    var parentState = getNestedState(rootState, path.slice(0, -1));
    var moduleName = path[path.length - 1];
    store._withCommit(function () {
      if ((false)) {
        if (moduleName in parentState) {
          console.warn(
            ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
          );
        }
      }
      Vue.set(parentState, moduleName, module.state);
    });
  }

  var local = module.context = makeLocalContext(store, namespace, path);

  module.forEachMutation(function (mutation, key) {
    var namespacedType = namespace + key;
    registerMutation(store, namespacedType, mutation, local);
  });

  module.forEachAction(function (action, key) {
    var type = action.root ? key : namespace + key;
    var handler = action.handler || action;
    registerAction(store, type, handler, local);
  });

  module.forEachGetter(function (getter, key) {
    var namespacedType = namespace + key;
    registerGetter(store, namespacedType, getter, local);
  });

  module.forEachChild(function (child, key) {
    installModule(store, rootState, path.concat(key), child, hot);
  });
}

/**
 * make localized dispatch, commit, getters and state
 * if there is no namespace, just use root ones
 */
function makeLocalContext (store, namespace, path) {
  var noNamespace = namespace === '';

  var local = {
    dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
      var args = unifyObjectStyle(_type, _payload, _options);
      var payload = args.payload;
      var options = args.options;
      var type = args.type;

      if (!options || !options.root) {
        type = namespace + type;
        if (false) {
          console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
          return
        }
      }

      return store.dispatch(type, payload)
    },

    commit: noNamespace ? store.commit : function (_type, _payload, _options) {
      var args = unifyObjectStyle(_type, _payload, _options);
      var payload = args.payload;
      var options = args.options;
      var type = args.type;

      if (!options || !options.root) {
        type = namespace + type;
        if (false) {
          console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
          return
        }
      }

      store.commit(type, payload, options);
    }
  };

  // getters and state object must be gotten lazily
  // because they will be changed by vm update
  Object.defineProperties(local, {
    getters: {
      get: noNamespace
        ? function () { return store.getters; }
        : function () { return makeLocalGetters(store, namespace); }
    },
    state: {
      get: function () { return getNestedState(store.state, path); }
    }
  });

  return local
}

function makeLocalGetters (store, namespace) {
  if (!store._makeLocalGettersCache[namespace]) {
    var gettersProxy = {};
    var splitPos = namespace.length;
    Object.keys(store.getters).forEach(function (type) {
      // skip if the target getter is not match this namespace
      if (type.slice(0, splitPos) !== namespace) { return }

      // extract local getter type
      var localType = type.slice(splitPos);

      // Add a port to the getters proxy.
      // Define as getter property because
      // we do not want to evaluate the getters in this time.
      Object.defineProperty(gettersProxy, localType, {
        get: function () { return store.getters[type]; },
        enumerable: true
      });
    });
    store._makeLocalGettersCache[namespace] = gettersProxy;
  }

  return store._makeLocalGettersCache[namespace]
}

function registerMutation (store, type, handler, local) {
  var entry = store._mutations[type] || (store._mutations[type] = []);
  entry.push(function wrappedMutationHandler (payload) {
    handler.call(store, local.state, payload);
  });
}

function registerAction (store, type, handler, local) {
  var entry = store._actions[type] || (store._actions[type] = []);
  entry.push(function wrappedActionHandler (payload) {
    var res = handler.call(store, {
      dispatch: local.dispatch,
      commit: local.commit,
      getters: local.getters,
      state: local.state,
      rootGetters: store.getters,
      rootState: store.state
    }, payload);
    if (!isPromise(res)) {
      res = Promise.resolve(res);
    }
    if (store._devtoolHook) {
      return res.catch(function (err) {
        store._devtoolHook.emit('vuex:error', err);
        throw err
      })
    } else {
      return res
    }
  });
}

function registerGetter (store, type, rawGetter, local) {
  if (store._wrappedGetters[type]) {
    if ((false)) {
      console.error(("[vuex] duplicate getter key: " + type));
    }
    return
  }
  store._wrappedGetters[type] = function wrappedGetter (store) {
    return rawGetter(
      local.state, // local state
      local.getters, // local getters
      store.state, // root state
      store.getters // root getters
    )
  };
}

function enableStrictMode (store) {
  store._vm.$watch(function () { return this._data.$$state }, function () {
    if ((false)) {
      assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
    }
  }, { deep: true, sync: true });
}

function getNestedState (state, path) {
  return path.reduce(function (state, key) { return state[key]; }, state)
}

function unifyObjectStyle (type, payload, options) {
  if (isObject(type) && type.type) {
    options = payload;
    payload = type;
    type = type.type;
  }

  if ((false)) {
    assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  }

  return { type: type, payload: payload, options: options }
}

function install (_Vue) {
  if (Vue && _Vue === Vue) {
    if ((false)) {
      console.error(
        '[vuex] already installed. Vue.use(Vuex) should be called only once.'
      );
    }
    return
  }
  Vue = _Vue;
  applyMixin(Vue);
}

/**
 * Reduce the code which written in Vue.js for getting the state.
 * @param {String} [namespace] - Module's namespace
 * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
 * @param {Object}
 */
var mapState = normalizeNamespace(function (namespace, states) {
  var res = {};
  if (false) {
    console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  }
  normalizeMap(states).forEach(function (ref) {
    var key = ref.key;
    var val = ref.val;

    res[key] = function mappedState () {
      var state = this.$store.state;
      var getters = this.$store.getters;
      if (namespace) {
        var module = getModuleByNamespace(this.$store, 'mapState', namespace);
        if (!module) {
          return
        }
        state = module.context.state;
        getters = module.context.getters;
      }
      return typeof val === 'function'
        ? val.call(this, state, getters)
        : state[val]
    };
    // mark vuex getter for devtools
    res[key].vuex = true;
  });
  return res
});

/**
 * Reduce the code which written in Vue.js for committing the mutation
 * @param {String} [namespace] - Module's namespace
 * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
 * @return {Object}
 */
var mapMutations = normalizeNamespace(function (namespace, mutations) {
  var res = {};
  if (false) {
    console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  }
  normalizeMap(mutations).forEach(function (ref) {
    var key = ref.key;
    var val = ref.val;

    res[key] = function mappedMutation () {
      var args = [], len = arguments.length;
      while ( len-- ) args[ len ] = arguments[ len ];

      // Get the commit method from store
      var commit = this.$store.commit;
      if (namespace) {
        var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
        if (!module) {
          return
        }
        commit = module.context.commit;
      }
      return typeof val === 'function'
        ? val.apply(this, [commit].concat(args))
        : commit.apply(this.$store, [val].concat(args))
    };
  });
  return res
});

/**
 * Reduce the code which written in Vue.js for getting the getters
 * @param {String} [namespace] - Module's namespace
 * @param {Object|Array} getters
 * @return {Object}
 */
var mapGetters = normalizeNamespace(function (namespace, getters) {
  var res = {};
  if (false) {
    console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  }
  normalizeMap(getters).forEach(function (ref) {
    var key = ref.key;
    var val = ref.val;

    // The namespace has been mutated by normalizeNamespace
    val = namespace + val;
    res[key] = function mappedGetter () {
      if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
        return
      }
      if (false) {
        console.error(("[vuex] unknown getter: " + val));
        return
      }
      return this.$store.getters[val]
    };
    // mark vuex getter for devtools
    res[key].vuex = true;
  });
  return res
});

/**
 * Reduce the code which written in Vue.js for dispatch the action
 * @param {String} [namespace] - Module's namespace
 * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
 * @return {Object}
 */
var mapActions = normalizeNamespace(function (namespace, actions) {
  var res = {};
  if (false) {
    console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  }
  normalizeMap(actions).forEach(function (ref) {
    var key = ref.key;
    var val = ref.val;

    res[key] = function mappedAction () {
      var args = [], len = arguments.length;
      while ( len-- ) args[ len ] = arguments[ len ];

      // get dispatch function from store
      var dispatch = this.$store.dispatch;
      if (namespace) {
        var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
        if (!module) {
          return
        }
        dispatch = module.context.dispatch;
      }
      return typeof val === 'function'
        ? val.apply(this, [dispatch].concat(args))
        : dispatch.apply(this.$store, [val].concat(args))
    };
  });
  return res
});

/**
 * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
 * @param {String} namespace
 * @return {Object}
 */
var createNamespacedHelpers = function (namespace) { return ({
  mapState: mapState.bind(null, namespace),
  mapGetters: mapGetters.bind(null, namespace),
  mapMutations: mapMutations.bind(null, namespace),
  mapActions: mapActions.bind(null, namespace)
}); };

/**
 * Normalize the map
 * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
 * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
 * @param {Array|Object} map
 * @return {Object}
 */
function normalizeMap (map) {
  if (!isValidMap(map)) {
    return []
  }
  return Array.isArray(map)
    ? map.map(function (key) { return ({ key: key, val: key }); })
    : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
}

/**
 * Validate whether given map is valid or not
 * @param {*} map
 * @return {Boolean}
 */
function isValidMap (map) {
  return Array.isArray(map) || isObject(map)
}

/**
 * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
 * @param {Function} fn
 * @return {Function}
 */
function normalizeNamespace (fn) {
  return function (namespace, map) {
    if (typeof namespace !== 'string') {
      map = namespace;
      namespace = '';
    } else if (namespace.charAt(namespace.length - 1) !== '/') {
      namespace += '/';
    }
    return fn(namespace, map)
  }
}

/**
 * Search a special module from store by namespace. if module not exist, print error message.
 * @param {Object} store
 * @param {String} helper
 * @param {String} namespace
 * @return {Object}
 */
function getModuleByNamespace (store, helper, namespace) {
  var module = store._modulesNamespaceMap[namespace];
  if (false) {
    console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  }
  return module
}

// Credits: borrowed code from fcomb/redux-logger

function createLogger (ref) {
  if ( ref === void 0 ) ref = {};
  var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  var logger = ref.logger; if ( logger === void 0 ) logger = console;

  return function (store) {
    var prevState = deepCopy(store.state);

    if (typeof logger === 'undefined') {
      return
    }

    if (logMutations) {
      store.subscribe(function (mutation, state) {
        var nextState = deepCopy(state);

        if (filter(mutation, prevState, nextState)) {
          var formattedTime = getFormattedTime();
          var formattedMutation = mutationTransformer(mutation);
          var message = "mutation " + (mutation.type) + formattedTime;

          startMessage(logger, message, collapsed);
          logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
          logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
          logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
          endMessage(logger);
        }

        prevState = nextState;
      });
    }

    if (logActions) {
      store.subscribeAction(function (action, state) {
        if (actionFilter(action, state)) {
          var formattedTime = getFormattedTime();
          var formattedAction = actionTransformer(action);
          var message = "action " + (action.type) + formattedTime;

          startMessage(logger, message, collapsed);
          logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
          endMessage(logger);
        }
      });
    }
  }
}

function startMessage (logger, message, collapsed) {
  var startMessage = collapsed
    ? logger.groupCollapsed
    : logger.group;

  // render
  try {
    startMessage.call(logger, message);
  } catch (e) {
    logger.log(message);
  }
}

function endMessage (logger) {
  try {
    logger.groupEnd();
  } catch (e) {
    logger.log('—— log end ——');
  }
}

function getFormattedTime () {
  var time = new Date();
  return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
}

function repeat (str, times) {
  return (new Array(times + 1)).join(str)
}

function pad (num, maxLength) {
  return repeat('0', maxLength - num.toString().length) + num
}

var index = {
  Store: Store,
  install: install,
  version: '3.6.2',
  mapState: mapState,
  mapMutations: mapMutations,
  mapGetters: mapGetters,
  mapActions: mapActions,
  createNamespacedHelpers: createNamespacedHelpers,
  createLogger: createLogger
};

/* harmony default export */ __webpack_exports__["default"] = (index);



/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";



var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
                (typeof Uint16Array !== 'undefined') &&
                (typeof Int32Array !== 'undefined');

function _has(obj, key) {
  return Object.prototype.hasOwnProperty.call(obj, key);
}

exports.assign = function (obj /*from1, from2, from3, ...*/) {
  var sources = Array.prototype.slice.call(arguments, 1);
  while (sources.length) {
    var source = sources.shift();
    if (!source) { continue; }

    if (typeof source !== 'object') {
      throw new TypeError(source + 'must be non-object');
    }

    for (var p in source) {
      if (_has(source, p)) {
        obj[p] = source[p];
      }
    }
  }

  return obj;
};


// reduce buffer size, avoiding mem copy
exports.shrinkBuf = function (buf, size) {
  if (buf.length === size) { return buf; }
  if (buf.subarray) { return buf.subarray(0, size); }
  buf.length = size;
  return buf;
};


var fnTyped = {
  arraySet: function (dest, src, src_offs, len, dest_offs) {
    if (src.subarray && dest.subarray) {
      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
      return;
    }
    // Fallback to ordinary array
    for (var i = 0; i < len; i++) {
      dest[dest_offs + i] = src[src_offs + i];
    }
  },
  // Join array of chunks to single array.
  flattenChunks: function (chunks) {
    var i, l, len, pos, chunk, result;

    // calculate data length
    len = 0;
    for (i = 0, l = chunks.length; i < l; i++) {
      len += chunks[i].length;
    }

    // join chunks
    result = new Uint8Array(len);
    pos = 0;
    for (i = 0, l = chunks.length; i < l; i++) {
      chunk = chunks[i];
      result.set(chunk, pos);
      pos += chunk.length;
    }

    return result;
  }
};

var fnUntyped = {
  arraySet: function (dest, src, src_offs, len, dest_offs) {
    for (var i = 0; i < len; i++) {
      dest[dest_offs + i] = src[src_offs + i];
    }
  },
  // Join array of chunks to single array.
  flattenChunks: function (chunks) {
    return [].concat.apply([], chunks);
  }
};


// Enable/Disable typed arrays use, for testing
//
exports.setTyped = function (on) {
  if (on) {
    exports.Buf8  = Uint8Array;
    exports.Buf16 = Uint16Array;
    exports.Buf32 = Int32Array;
    exports.assign(exports, fnTyped);
  } else {
    exports.Buf8  = Array;
    exports.Buf16 = Array;
    exports.Buf32 = Array;
    exports.assign(exports, fnUntyped);
  }
};

exports.setTyped(TYPED_OK);


/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var money = {
  'us': ['$', '美元', 'USD'],
  'Europe': ['€', '欧元', 'EUR'],
  'Japan': ['JP¥', '日元', 'JPY'],
  'Europe2': ['€', '欧元', 'EUR'],
  'UK': ['£', '英镑', 'GBP'],
  'Australlia': ['AU$', '澳元', 'AUD'],
  'HK': ['HK$', '港元', 'HKD'],
  'New-Zealand': ['NZ$', '新元', 'NZD'],
  'Canada': ['CDN$', '加元', 'CAD'],
  'zh-tw': ['NT$', '新台币', 'NT$']
};
var countrys = {
  'wemakeprice': 'us',
  'dod': 'Europe',
  'apo': 'Europe',
  'ansgo': 'Australlia',
  'perfumesclub': 'Europe',
  'net-a-porter': 'us',
  'kidsroom': 'Europe',
  'getthelabel': 'UK',
  'babyhaven': 'us',
  'danielwellington': 'us',
  'dewaren': 'Europe',
  'bose': 'us',
  'takeya': 'Japan',
  'bienmanger': 'Europe2',
  'tlcpharmacy': 'UK',
  'petit-bateau': 'us',
  'esteelauder': 'us',
  '51taouk': 'UK',
  'amcal': 'Australlia',
  'joesnewbalanceoutlet': 'us',
  'gnc': 'us',
  'royyoungchemist': 'Australlia',
  'kohls': 'us',
  'bodybuilding': 'us',
  'newbalance': 'us',
  'newegg-us': 'us',
  'pharmacy4less': 'Australlia',
  'beautybay': 'us',
  'katespade': 'UK',
  'carters': 'us',
  'discount-apotheke': 'Europe2',
  'pharmacyonline': 'Australlia',
  'skinstore': 'us',
  'feelunique': 'UK',
  'x0061': 'Australlia',
  'bonjourhk': 'HK',
  'ba': 'Europe2',
  'chemistdirect': 'Australlia',
  'target': 'us',
  'ashford-zh': 'us',
  'forever21': 'UK',
  'holland-at-home': 'Europe2',
  'kiehls': 'us',
  'pharmacydirect': 'New-Zealand',
  'shoes': 'us',
  'shopbop': 'us',
  'windeln': 'Europe2',
  'bhphotovideo': 'us',
  'lookfantastic': 'UK',
  'hqhair': 'UK',
  'amazon-com': 'us',
  'amazon-jp': 'Japan',
  'amazon-fr': 'Europe',
  'amazon-de': 'Europe',
  'amazon-it': 'Europe',
  'amazon-uk': 'UK',
  'amazon-ca': 'Canada',
  'amazon-es': 'Europe',
  'amazon-au': 'Australlia',
  // 'iherb': 'us',
  '6pm': 'us',
  'aliexpress': 'us',
  '821': 'Europe',
  'shopee': 'zh-tw',
  'momoshop': 'zh-tw',
  'rakuten': 'zh-tw',
  'books': 'zh-tw',
  'pchometw': 'zh-tw',
  'twbuyyahoo': 'zh-tw'
};

module.exports.getSymbol = function (name) {
  var v = Object.values(money);
  var tgt = v.filter(function (x) {
    return x[2] === name || x[1] === name;
  });
  if (tgt.length) {
    return tgt[0];
  }
};

module.exports.getMoneyInfo = function (site) {
  if (countrys[site] && money[countrys[site]]) {
    return countrys[site] && money[countrys[site]];
  }
  return ['¥', '元', 'CNY'];
};

/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var parseprice = __webpack_require__(21);
var request = __webpack_require__(3);
var log = __webpack_require__(14);
var cnzz = __webpack_require__(12);
var gwd_protocol = 'https:';
var timer, timer2, weight;
var HOST;
var noSale;
var HT = {};
var htX, htY, mouseDownX;
var country = 'us';

var cateDict, transDict;
/*转换成厘对应比例*/
var sizeDict = {
  '米': 3000,
  '厘米': 30,
  '毫米': 3,
  '英尺': 914.4,
  '英寸': 76.2,
  '码': 2743.2,
  '尺': 1000,
  '寸': 100,
  '分': 10,
  '厘': 1
};
var weightDict = {
  'g': 1,
  'kg': 1000,
  'ounces': 28.35,
  'pounds': 453.60
};
var clothesDict = {
  'shangyi': {
    'us': {
      'man': ['us_man_sz.jpg', 'us_man_sz2.jpg'],
      'woman': ['us_woman_sz.jpg', 'us_woman_sz2.jpg']
    },
    'uk': {
      'man': ['uk_man_sz.jpg', 'uk_man_sz2.jpg'],
      'woman': ['uk_woman_sz.jpg', 'uk_woman_sz2.jpg']
    },
    'jp': {
      'man': ['jp_man_sz.jpg', 'jp_man_sz2.jpg'],
      'woman': ['jp_woman_sz.jpg', 'jp_woman_sz2.jpg']
    }
  },
  'xiazhuang': {
    'us': {
      'man': ['us_man_xz.jpg', 'us_man_xz2.jpg'],
      'woman': ['us_woman_xz.jpg', 'us_woman_xz2.jpg']
    },
    'uk': {
      'man': ['uk_man_xz.jpg', 'uk_man_xz2.jpg'],
      'woman': ['uk_woman_xz.jpg', 'uk_woman_xz2.jpg']
    },
    'jp': {
      'man': ['jp_man_xz.jpg', 'jp_man_xz2.jpg'],
      'woman': ['jp_woman_xz.jpg', 'jp_woman_xz2.png']
    }
  },
  'kidscloth': {
    'us': ['us_kids.jpg', 'us_kids2_0.jpg', 'us_kids2_4.jpg'],
    'uk': ['uk_kids.jpg', 'uk_kids2_0.jpg', 'uk_kids2_4.jpg'],
    'jp': ['jp_kids.jpg', 'jp_kids2_4.jpg', 'jp_kids2_4.jpg']
  },
  'shoes': {
    'man': ['woman_shoes_1.jpg', 'man_shoes2.jpg'],
    'woman': ['woman_shoes_1.jpg', 'woman_shoes2.jpg'],
    'kids': ['kids_shoes.jpg', 'kids_shoes2_0.jpg', 'kids_shoes2_4.jpg']
  }
};
var sitePattern = {
  'www.amazon.com': {
    'coun': 'us',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.co.jp': {
    'coun': 'jp',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.de': {
    'coun': 'uk',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.com.au': {
    'coun': 'au',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.co.uk': {
    'coun': 'uk',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.fr': {
    'coun': 'fr',
    'dom': ['#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.6pm.com': {
    'coun': 'us',
    'dom': ['.mGIQz'],
    'position': 'before'
  }
};

var categoryDict1 = {
  'coffee': '咖啡',
  'snack': '饮料/保健品/其他食品',
  'nut': '饮料/保健品/其他食品',
  'pistachio': '饮料/保健品/其他食品',
  'almond': '饮料/保健品/其他食品',
  'chestnuts': '饮料/保健品/其他食品',
  'walnut': '饮料/保健品/其他食品',
  'hazelnut': '饮料/保健品/其他食品',
  'pecan': '饮料/保健品/其他食品',
  'cashew': '饮料/保健品/其他食品',
  'peanut': '饮料/保健品/其他食品',
  'chocolates': '饮料/保健品/其他食品',
  'pastry': '饮料/保健品/其他食品',
  'candy': '饮料/保健品/其他食品',
  'condiment': '饮料/保健品/其他食品',
  'ketchup': '饮料/保健品/其他食品',
  'beverage': '饮料/保健品/其他食品',
  'tea': '茶叶',
  'coats': '外衣/衣服/冲锋衣',
  'clothes': '外衣/衣服/冲锋衣',
  'shirt': '外裤/裤子/衬衫/衬衣/T恤',
  'sweaters': '外裤/裤子/衬衫/衬衣/T恤',
  'lingerie': '内衣/内裤',
  'tankinis': '内衣/内裤',
  'bikinis': '内衣/内裤',
  'loungewear': '内衣/内裤',
  'underwear': '内衣/内裤',
  'briefs': '内衣/内裤',
  'swimsuit': '内衣/内裤',
  'scarves': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'hats': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'scarf': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'tie': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'belt': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'gloves': '配饰（帽子/围巾/头巾/丝巾/领带/腰带/手套）',
  'bedding': '毛毯/被子/床罩/睡袋',
  'quilt': '毛毯/被子/床罩/睡袋',
  'bedspread ': '毛毯/被子/床罩/睡袋',
  'leather': '皮鞋',
  'boots': '皮靴/靴子',
  'outdoor': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'athletic': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'sports': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'wading': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'climbing': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'running': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'sandals': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'slippers': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'insoles': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'shoelaces': '运动鞋/徒步鞋/涉水鞋/登山鞋/远足鞋',
  'suitcases': '箱/行李箱/旅行箱/手提箱',
  'luggage': '箱/行李箱/旅行箱/手提箱',
  'briefcases': '箱/行李箱/旅行箱/手提箱',
  'travel': '箱/行李箱/旅行箱/手提箱',
  'backpacks': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'satchel': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'bags': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'cases': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'handbags': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'clutches': '挎包/背包/邮差包/背包/单肩包/双肩包',
  'wallet': '钱包/钥匙包',
  'money': '钱包/钥匙包',
  'key': '钱包/钥匙包',
  'watches': '机械表',
  'wrist': '机械表',
  'dishwashers': '餐具/刀具',
  'hoods': '餐具/刀具',
  'drawers': '餐具/刀具',
  'dath': '餐具/刀具',
  'cutlery': '餐具/刀具',
  'flatware': '餐具/刀具',
  'kitchen & dining': '餐具/刀具',
  'dining': '餐具/刀具',
  'knife': '餐具/刀具',
  'pot': '炊具/锅',
  'cookware': '炊具/锅',
  'kitchenware': '炊具/锅',
  'cooktops': '炊具/锅',
  'purifier': '净水器（含滤芯）',
  'steamers': '电饭煲',
  'ovens': '微波炉',
  'juicer': '电动榨汁机',
  'coffeemachine': '咖啡机',
  'vacuums': '吸尘器',
  'ceiling ': '电风扇',
  'irons': '电熨斗',
  'humidifiers': '增/除湿机/増除湿一体机',
  'sewing': '电动缝纫机',
  'refrigerators': '家电',
  'freezers': '家电',
  'compactors': '家电',
  'washers': '家电',
  'bulbs': '家电',
  'shaver': '电动剃须刀',
  'blood': '血压计/血糖计',
  'glucose': '血压计/血糖计',
  'dryer': '电吹风机',
  'toothbrush': '电动牙刷',
  'sunscreen': '防晒露/防晒霜/防嗮乳液',
  'lotions': '防晒露/防晒霜/防嗮乳液',
  'scream': '护手霜',
  'lipstick': '唇膏',
  'perfume': '香水',
  'masks': '面膜',
  'toner': '爽肤水',
  'phones': '触屏式手机',
  'cameras': '数码相机/卡片机/DC',
  'canon': '数码相机/卡片机/DC',
  'joystick': '游戏机遥控器/控制器/手柄/摇杆/方向盘',
  'controller': '游戏机遥控器/控制器/手柄/摇杆/方向盘',
  'recorder': '录音笔/录音机/收音机',
  'radios': '录音笔/录音机/收音机',
  'echo': '音箱（音响设备）',
  'stereos': '音箱（音响设备）',
  'laptop': '笔记本电脑/含平板电脑',
  'memory': '内存条4G以上',
  'cards': '功能卡/显卡/声卡等',
  'card': '功能卡/显卡/声卡等',
  'mice': '鼠标',
  'keyboards': '键盘',
  'input': '键盘',
  'scanner': '投影仪',
  'screens': '投影仪',
  'disk': '移动硬盘1TB-2TB(含2TB)',
  'toys': '玩具',
  'mp3 players': 'MP3播放器',
  'diapering': '婴儿用品'
};

var categoryDict2 = {
  'food': {
    'tle': '食品',
    'cate': 'cate1'
  },
  'clothing': {
    'tle': '服饰',
    'cate': 'cate2'
  },
  'packs': {
    'tle': '鞋、箱包',
    'cate': 'cate3'
  },
  'shoes': {
    'tle': '鞋、箱包',
    'cate': 'cate3'
  },
  'bags': {
    'tle': '鞋、箱包',
    'cate': 'cate3'
  },
  'kitchen & dining': {
    'tle': '厨房、餐厅',
    'cate': 'cate4'
  },
  'home & kitchen': {
    'tle': '家电',
    'cate': 'cate6'
  },
  'health & personal': {
    'tle': '个人护理',
    'cate': 'cate7'
  },
  'beauty ': {
    'tle': '美容',
    'cate': 'cate8'
  },
  'camera & photo ': {
    'tle': '照相机、摄像机',
    'cate': 'cate11'
  },
  'electronics': {
    'tle': '电子数码',
    'cate': 'cate12'
  },
  'cumputers': {
    'tle': '个人电脑',
    'cate': 'cate15'
  },
  'diapering': {
    'tle': '婴儿用品',
    'cate': 'cate18'
  }
};

var searchCateDict = ['#wayfinding-breadcrumbs_feature_div .a-list-item .a-link-normal', '#SalesRank .zg_hrsr_ladder a'];

var weightDom = {
  'www.amazon.com': ['#detailBullets_feature_div .a-list-item .a-text-bold:contains(Weight) + span', '#technical-details-table td:contains(Weight)+td', '#detail-bullets ul li:contains(Weight)', '#technical-details_feature_div table.a-keyvalue th.a-nowrap:contains("Shipping Weight")+td'],
  'www.amazon.de': ['#detail_bullets_id ul li:contains(Produktgewicht)', '#prodDetails .shipping-weight .value'],
  'www.amazon.co.jp': ['#detail_bullets_id ul li:contains(発送重量)', '.shipping-weight .value'],
  'www.6pm.com': ['#prdInfoText .measurements li:contains(Weight)']
};

/*初始化*/
function init() {
  if (G.IE6 || G.IE7 || G.IE8 || G.IE9) return;
  if (!isHaitaoPage()) return;
  getCountry();
  getMessage(function () {
    insertHtml();
    if ($('#gwd_ht_main').length == 0) return;
    render_size_detail();
    render_trans_detail();
    insertShop();
    insertSize(clothesDict['shangyi'][country]['man'][0], clothesDict['shangyi'][country]['man'][1]);
    addEvent();
    addSizeEvent();
    fixPageCss();
    getSelect();
    searchCate();
    showTransport();
    changePrice();
    listenPrice();
    if (G.email) {
      check_favor();
    } else {
      $(document).on('checkfavor', function () {
        check_favor();
      });
    }
    checkRemove();
  });
}
var checkTime = 0;
var checkRemove = function checkRemove() {
  if (checkTime > 10) {
    clearTimeout(tt);
    return;
  }
  var tt = setTimeout(function () {
    if ($('#gwd_ht_main .ht_head .gwd_site_icon').length === 0) {
      $('#gwd_ht_main').remove();
      init();
    } else {
      checkTime++;
      checkRemove();
    }
  }, 4000);
};

function editCurrent(arr) {
  /*配置文件有一些不是人民币，需要转换*/
  if (!arr) return [];
  /*参加活动的转运商家随机排序， 其他的放后面*/
  var looparr = [],
      elsearr = [];
  for (var i = 0; i < arr.length; i++) {
    if (arr[i]['current'] && !arr[i]['asce']) {
      if (arr[i]['type']) {
        arr[i].firstW[1] = parseprice(arr[i].firstW[1], arr[i]['type']);
        arr[i].nextW[1] = parseprice(arr[i].nextW[1], arr[i]['type']);
      } else {
        arr[i].firstW[1] = parseprice(arr[i].firstW[1]);
        arr[i].nextW[1] = parseprice(arr[i].nextW[1]);
      }
    }
    if (arr[i].sale_tle) noSale = true;
    if (arr[i].cooper) looparr.push(arr[i]);else elsearr.push(arr[i]);
    /*有一些转运商家使用货币和当前网页使用的汇率不一致，需要再请求一次汇率*/
  }
  arr = looparr.sort(function () {
    return Math.random() - 0.5;
  }).concat(elsearr);
  return arr;
}

function getMessage(callback) {
  var url = gwd_protocol + '//browser.' + G.extName + '.com/extension?ac=haitaoInfo';
  request.get(url).done(function (data) {
    if (data && data.cate && data.trans) {
      cateDict = data.cate;
      transDict = data.trans;
      transDict[country] = editCurrent(transDict[country]);
      callback();
    }
  });
}

function isHaitaoPage() {
  /*判断是否是海淘页面*/
  var host = location.host;
  var twSites = ['shopee.tw', 'momoshop', 'rakuten', 'books.com.tw', '24h.pchome.com.tw', '.yahoo.com'];
  if (twSites.some(function (item) {
    return host.includes(item);
  })) {
    return true;
  }
  for (var pattern in sitePattern) {
    if (host == pattern) return true;
  }
  return false;
}

function setTariff(t) {
  /*自动设置关税 --- 2级分类*/
  $('.ht_tariff_btn span').text(t.slice(0, 5));
  $('.ht_tariff_btn span').attr('title', t);
  $('#cate_small').val(t);
  $('.ht_tariff_cate').text(t);
  replaceStr('#cate_small');
  replaceStr('.ht_tariff_cate', 'text', 4);
  for (var pattern in cateDict) {
    var len = cateDict[pattern].length;
    for (var i = 0; i < len; i++) {
      if (cateDict[pattern][i][1] == t) {
        var txt = $('#big_xiala a[cate="' + pattern + '"]').text();
        $('#cate_big').val(txt);
        replaceStr('#cate_big');
        insertCate(cateDict[pattern]);
        $('.ht_tariff .ht_tariff_num em').text(cateDict[pattern][i][0]);
      }
    }
  }
}

function setTariff2(p) {
  /*自动设置关税 --- 1级分类*/
  var t = categoryDict2[p].tle;
  var cate = categoryDict2[p].cate;
  $('.ht_tariff_btn span').text(t.slice(0, 5));
  $('.ht_tariff_btn span').attr('title', t);
  $('#cate_big').val(t);
  replaceStr('#cate_big');
  $('#cate_small').val(cateDict[cate][cateDict[cate].length - 1][1]);
  $('.ht_tariff_cate').text(cateDict[cate][cateDict[cate].length - 1][1]);
  replaceStr('#cate_small');
  replaceStr('.ht_tariff_cate', 'text', 4);
  insertCate(cateDict[cate]);
  $('.ht_tariff .ht_tariff_num em').text(cateDict[cate][cateDict[cate].length - 1][0]);
}

function matchCate(t) {
  /*匹配2级分类*/
  for (var pattern in categoryDict1) {
    if (t.indexOf(pattern) > -1) {
      return categoryDict1[pattern];
    }
  }

  /*二级分类未匹配到，匹配一级分类*/
  for (var pattern in categoryDict2) {
    if (t.indexOf(pattern) > -1) {
      setTariff2(pattern);
      return;
    }
  }
  return false;
}

function getClothes(t, c) {
  switch (t) {
    case '男装':
      return clothesDict['shangyi'][c]['man'];
    case '女装':
      return clothesDict['shangyi'][c]['woman'];
    case '童装':
      return clothesDict['kidscloth'][c];
    case '男鞋':
      return clothesDict['shoes']['man'];
    case '女鞋':
      return clothesDict['shoes']['woman'];
    case '童鞋':
      return clothesDict['shoes']['kids'];
  }
}

function searchCate() {
  /*查找分类关键词*/
  for (var j = 0; j < searchCateDict.length; j++) {
    var dom = searchCateDict[j];
    var len = $(dom).length;
    for (var i = len - 1; i >= 0; i--) {
      var txt = $(dom).eq(i).text().toLowerCase();
      var m = matchCate(txt);
      if (m) {
        setTariff(m);
        return;
      }
    }
  }
}

function fixPageCss() {
  if (navigator.userAgent.toLowerCase().indexOf('chrome') == -1) {
    $('#gwd_ht_main').addClass('ie_hack');
    $('#transport_detail').addClass('ie_hack');
    $('#size_detail').addClass('ie_hack');
  }
  if (HOST == 'www.6pm.com') {
    var width = $('#gwd_ht_main').parent().outerWidth();
    var newwidth = width - 355;
    $('#gwd_ht_main').css('margin-left', newwidth / 2 + 'px');
  }
}

function isZiying() {
  if (HOST == 'www.6pm.com') return 'ziying';
  if ($('#merchant-info').length > 0) {
    if (HOST == 'www.amazon.com') {
      if ($('#merchant-info').text().indexOf('sold by Amazon') > -1) return 'ziying';else return 'sanfang';
    }
    if (HOST == 'www.amazon.co.jp') {
      if ($('#merchant-info').text().indexOf('jp が販売') > -1) return 'ziying';else return 'sanfang';
    }
    if (HOST == 'www.amazon.de') {
      if ($('#merchant-info').text().indexOf('Verkauf und Versand durch Amazon') > -1) return 'ziying';else if ($('#merchant-info').text().indexOf('Dispatched from and sold by Amazon') > -1) return 'ziying';else return 'sanfang';
    }
  } else return 'sanfang';
}

function isZhiyou() {
  if (HOST == 'www.amazon.de') {
    if ($('#ddmShippingMessage').text().indexOf('Dieser Artikel kann nach') > -1 && $('#ddmInlineAddressInfo').text().indexOf('China') > -1) return 'zhiyou';else return 'feizhiyou';
  }
  if ($('#detail-bullets .content ul li:contains("International Shipping")').length > 0) return 'zhiyou';
  if ($('.shipping-restrictions .label:contains("International")').length > 0) return 'zhiyou';else return 'feizhiyou';
}

function insertHtml() {
  /*插入主界面*/
  __webpack_require__(242);
  var html = __webpack_require__(244);
  var t = template.compile(html)({
    data: {
      'pageclass': addPageclass(),
      'getprice': calPrice(),
      'unit_price': getPrice(),
      'protype': isZiying(),
      'mailtype': isZhiyou(),
      'he_weight': getWeight(),
      'hosts': HOST,
      'site': G.site == '6pm' ? '6PM' : '亚马逊',
      c_server: G.c_server
    }
  });
  var dom, arr;
  arr = sitePattern[HOST]['dom'];
  for (var i = 0; i < arr.length; i++) {
    if ($(arr[i]).length > 0) dom = arr[i];
  }
  if (!dom) return;
  switch (sitePattern[HOST]['position']) {
    case 'before':
      $(dom).before(t);
      break;
    case 'after':
      $(dom).after(t);
      break;
  }
  log('track:haitao:main');
  cnzz.log('显示海淘主界面');
}

function addPageclass() {
  var s = 'ht_' + HOST.split('.')[1];
  return s;
}

function getCountry() {
  /*获取页面所属地区*/
  var host = location.host;
  for (var pattern in sitePattern) {
    if (pattern == host) {
      country = sitePattern[pattern]['coun'];
      HOST = pattern;
    }
  }
}

function getWeightNum(t) {
  var p = t.match(/[0-9]+(?:\.|\,|)(?:[0-9]+|)/);
  if (p) p = p[0];
  if (HOST == 'www.amazon.de') p = p.toString().replace(',', '.');
  return p;
}

function getWeightType(t) {
  switch (HOST) {
    case 'www.amazon.com':
      if (t.indexOf('pounds') > -1) return 'pounds';
      if (t.indexOf('ounces') > -1) return 'ounces';
      break;
    case 'www.amazon.de':
      if (t.indexOf('Kg') > -1) return 'kg';
      if (t.indexOf('g') > -1) return 'g';
      break;
    case 'www.amazon.co.jp':
      if (t.indexOf('Kg') > -1) return 'kg';
      if (t.indexOf('g') > -1) return 'g';
      break;
    case 'www.6pm.com':
      if (t.indexOf('lb') > -1 && t.indexOf('oz') > -1) return 'lb_oz';
      if (t.indexOf('lb') > -1) return 'pounds';
      if (t.indexOf('oz') > -1) return 'ounces';
      break;
  }
}

function getWeight(noCache) {
  if (HT.weight && !noCache) return HT.weight;
  var weight_1 = 0;
  var domarr = weightDom[HOST];
  var len = domarr.length;
  for (var i = 0; i < len; i++) {
    var w = $(domarr[i]).text();
    if (w != '') {
      var type = getWeightType(w);
      if (type == 'lb_oz') {
        var m = w.match(/[0-9]+/g);
        weight_1 = Math.round((weightDict['pounds'] / 1000 * parseInt(m[0]) + weightDict['ounces'] / 1000 * parseInt(m[1])) * 100) / 100;
        HT.weight = weight_1;
        return weight_1;
      }
      if (type != '') {
        weight_1 = Math.round(weightDict[type] / 1000 * getWeightNum(w) * 100) / 100;
        if (weight_1 !== 0 && !weight_1) weight_1 = 0;
        HT.weight = weight_1;
        return weight_1;
      }
    }
  }
}

function showTransport(noCache) {
  var weight_2 = getWeight(noCache);
  if (!weight_2 || weight_2 == 0) return;
  /*nocache为true时候，说明重量更新，需要重新设置重量*/
  if (noCache) $('.ht_weight_num').val(weight_2);
  var minT = changeTransPrice(weight_2);
  var title = $('#trans_list li .trans_com').eq(minT.minindex).text();
  if (title == '') return;
  if (minT.minprice == 99999999) return;
  $('.ht_freight_num').text('¥' + minT.minprice);
  $('.ht_transport_btn span').text(title);
}

function getPrice() {
  return G.dp.price || '0';
}

function calPrice(p) {
  /*计算价格*/
  var price = 0;
  if (p) price = p;else price = getPrice();
  var transP = $('.ht_freight_num').text().match(/[0-9.]+/);
  if (transP) transP = transP[0];
  var tariffP = $('.ht_tariff .ht_tariff_num em').text().match(/[0-9.]+/);
  if (tariffP) tariffP = tariffP[0];
  if ($('.ht_tariff .ht_tariff_num') && $('.ht_tariff .ht_tariff_num').attr('data-price') == "0") {
    tariffP = 0;
  }
  if (!tariffP) tariffP = 0;
  if (!transP) transP = 0;
  price = Number((Number(price) + Number(transP) + Number(tariffP)).toLocaleString().replace(/,/g, ''));
  if (price.toString().match(/\.\d{3}/)) {
    price = price.toString().replace(/(\.\d{2})\d+/, '$1');
  }
  return price;
}

function changeZiying() {
  /*价格变化可能是否是自营也会变化*/
  setTimeout(function () {
    var ziying = isZiying();
    $('.pro_type em').attr('class', ziying);
    if (ziying == 'ziying') {
      $('.pro_type .pro_t_tle').text('自营');
      $('.pro_type_detail').text((G.site == '6pm' ? '6PM' : '亚马逊') + '直接销售。');
    } else {
      $('.pro_type .pro_t_tle').text('第三方');
      $('.pro_type_detail').text((G.site == '6pm' ? '6PM' : '亚马逊') + '第三方商家销售。');
    }
  }, 1000);
}

function listenPrice() {
  /*监听价格变化*/
  var priceDom = '#priceblock_ourprice';
  var subdom = 'price_feature_div';
  if (G.site == '6pm') {
    priceDom = '#priceSlot .price';
    subdom = "productForm";
  }
  var oldprice = $(priceDom).text();
  var dom = document.getElementById(subdom);
  if (dom && dom.addEventListener) {
    dom.addEventListener('DOMSubtreeModified', function () {
      var pageprice = $(priceDom).text();
      if (pageprice != oldprice && pageprice) {
        oldprice = pageprice;
        pageprice = parseprice(pageprice);
        $('.ht_content .price_num').text('¥' + pageprice);
        /*价格发生变化，说明用户改变了一些信息，重量 自营也会跟着改变*/
        changePrice(pageprice);
        changeZiying();
        setTimeout(function () {
          showTransport(true);
        }, 800);
      }
    }, false);
  }
}

function changePrice(p) {
  var price = '¥' + calPrice(p);
  $('.ht_getprice_num').text(price);
}

function calDetailPos() {
  var wWeight = ($(window).width() - 595) / 2;
  var wHeight = ($(window).height() - 420) / 2;
  return {
    'posx': wWeight,
    'posy': wHeight
  };
}

function render_size_detail() {
  var html = __webpack_require__(246);
  $('body').append(template.compile(html)({
    pos: calDetailPos()
  }));
}

function render_trans_detail() {
  var html = __webpack_require__(247);
  $('body').append(template.compile(html)({
    pos: calDetailPos(),
    'ht_weight': getWeight(),
    c_server: G.c_server
  }));
}

function insertSize(headimg, itemimg) {
  /*插入尺码帮助内容*/
  var Html = '<img src="http://s1.' + G.extName + '.com/images/extensions/{{imgurl}}">';
  $('.size_s').empty().append(template.compile(Html)({
    'imgurl': headimg
  }));
  $('.size_item_img').empty().append(template.compile(Html)({
    'imgurl': itemimg
  }));
}

function findShop(name) {
  if (!transDict) return null;
  var transdata = transDict[country];
  for (var i = 0; i < transdata.length; i++) {
    if (name === transdata[i].shopId && transdata[i]['asce']) {
      var ascearr = transdata[i]['ascearr'];
      var current = transdata[i]['current'];
      return {
        'ascearr': ascearr,
        'current': current
      };
    }
  }
}
/*改变运费值*/
function changeTransPrice(weight) {
  var minprice = 99999999;
  var minindex = 0;
  var dom = $('#trans_list li .trans_pr');
  var len = $(dom).length;
  for (var i = 0; i < len; i++) {
    var fp = Number($(dom).eq(i).attr('data-fp'));
    var fw = Number($(dom).eq(i).attr('data-fw'));
    var sw = Number($(dom).eq(i).attr('data-sw'));
    var sp = Number($(dom).eq(i).attr('data-sp'));
    var name = $(dom).eq(i).attr('data-shopname');
    if (name) {
      var shopInfo = findShop(name);
      if (!shopInfo) return;
      var price = calTrans2(weight, shopInfo['ascearr'], shopInfo['current']);
    } else {
      var price = calTrans(weight, [fp, fw, sp, sw]);
    }
    /*因为不考虑最便宜逻辑，随机选择，因为排列的随机的，所以这里就选择第一个*/
    if (i == 0) {
      minprice = price;
    }

    $(dom).eq(i).text('￥' + price);
  }
  return {
    'minindex': minindex,
    'minprice': minprice
  };
}

function conversionSize() {
  /*尺码转换*/
  var first = $('.first_xiala').val();
  var second = $('.second_xiala').val();
  var num = $('#first_size').val();
  if (num) num = Number(num);
  var n1 = sizeDict[first];
  var n2 = sizeDict[second];
  var n3 = num * n1 / n2;
  if (n3.toString().indexOf('.') > -1) n3 = n3.toFixed(2);
  $('#second_size').val(n3);
}

/*计算运费*/
function calTrans(weight, arr) {
  /*fp：首重价格  fw 首重的重量   sp 续重价格   sp 续重重量*/
  var fp = arr[0],
      fw = arr[1],
      sp = arr[2],
      sw = arr[3];
  var price;
  var pow = 1;
  if (sw.toString().indexOf('.') > -1) pow = sw.toString().match(/\.(\d+)/)[1].length;
  if (fp == "0") {
    price = weight / sw * sp;
  } else if (weight <= fw) {
    price = fp;
  } else {
    var weight2 = weight - fw;
    var weight3 = 0;
    if (weight2 * Math.pow(10, pow) % (sw * Math.pow(10, pow)) == 0) weight3 = weight2 / sw;else weight3 = parseInt(weight2 / sw) + 1;
    var price = fp + weight3 * sp;
  }
  return Number(price).toFixed(2);
}
/*针对梯度增长计费的转运公司计算运费*/
function calTrans2(weight, arr, rmb) {
  weight = Number(weight);
  for (var i = 0; i < arr.length; i++) {
    if (arr[i][0] > weight) {
      if (i == 0) i = 1; //如果是第一个就用第一个的数据
      else if (arr[i - 1][0] < weight) i = i + 1; //如果大于前面一个重量， 说明在两者之间， 应该选择当前，所以+1
      if (!rmb) {
        return Number(arr[i - 1][1]).toFixed(2);
      } else {
        return parseprice(arr[i - 1][1]).toFixed(2);
      }
    }
  }
  if (weight > arr[arr.length - 1][0]) {
    if (!rmb) {
      return Number(arr[arr.length - 1][1]).toFixed(2);
    } else {
      return parseprice(arr[arr.length - 1][1]).toFixed(2);
    }
  }
}

function changeFreight() {
  /*改变运费*/
  var weight = Number($('.ht_weight .ht_weight_num').val()) || 0;
  var transShop = $('.ht_transport_btn span').attr('data-title');
  var tsdata = transDict[country];
  var first, next, asce, asceArr, current; //asce 判断是否为递增的运费计算方式
  for (var i = 0; i < tsdata.length; i++) {
    if (tsdata[i]['shopname'] == transShop) {
      first = tsdata[i]['firstW'];
      next = tsdata[i]['nextW'];
      asce = tsdata[i]['asce'];
      asceArr = tsdata[i]['ascearr'];
      current = tsdata[i]['current'];
    }
  }
  if (asce) {
    var price = '¥' + calTrans2(weight, asceArr, current);
  } else {
    var price = '¥' + calTrans(weight, [first[1], first[0], next[1], next[0]]);
  }

  $('.ht_freight_num').text(price);
}

function insertShop() {
  /*插入转运商家*/
  var trans = transDict[country];
  var html = '{{each data}}\n              <li class="{{if $index%2==1}}l_odd{{/if}}">\n                <a class="trans_com" target="_blank" href="{{$value.shop_url}}" >{{$value.shopname}}</a>\n                <span class="lo_center">{{$value.warehouse}}</span>\n                <span class="trans_pr" {{if $value.asce}}data-shopname="{{$value.shopId}}" {{/if}} data-fw="{{$value.firstW[0]}}" data-sw="{{$value.nextW[0]}}" data-sp="{{$value.nextW[1]}}" data-fp="{{$value.firstW[1]}}">{{$value.firstW[1]==0?"无首重":("￥"+$value.firstW[1])}}</span>\n                {{if $value.cooper}}<span class="sale_tle"><a  href="{{$value.url}}" target="_blank">{{$value.sale_tle}}</a></span>{{/if}}\n              </li>\n            {{/each}}';
  $('#trans_list').append(template.compile(html)({
    data: trans
  }));
  changefirstW();
  if (!noSale) $('#transport_detail').addClass('no_sale');
}

function changefirstW() {
  var trans = transDict[country];
  $('#trans_list li .trans_pr').each(function (index, e) {
    if ($(e).text() == "无首重") {
      for (var i = 0; i < trans.length; i++) {
        if (trans[i].shopId === $(e).attr('data-shopname')) {
          if (trans[i].current) $(e).text('￥' + Number(parseprice(trans[i].ascearr[0][1])).toFixed(2));else $(e).text('￥' + Number(trans[i].ascearr[0][1]).toFixed(2));
        }
      }
    } else {
      var price = $(e).text().replace('￥', '');
      price = '￥' + Number(price).toFixed(2);
      $(e).text(price);
    }
  });
}

function transWeight(type, w) {
  if (type == 'LB') {
    w = Number(w) * 0.4536;
  }
  return w;
}

function addShopEvent() {
  /*重量输入框焦点事件*/
  $('.trans_w input').on('keyup', function () {
    var txt = Number($(this).val());
    var weight_type = $('.trans_w input+.weight_type').text();
    var weight = transWeight(weight_type, txt);
    if (txt === 0) return;else if (!txt) {
      /*eslint-disable */
      alert('请输入数字！');
      /*eslint-enable */
    } else {
        changeTransPrice(weight);
      }
  });
  $('#trans_list li .sale_tle a').on('click', function () {
    log('click:haitao:sale_tle');
    cnzz.log('海淘转运商家优惠政策点击情况');
  });
  $('#trans_list li .trans_com').on('click', function () {
    log('click:haitao:trans_com');
    cnzz.log('海淘转运商家网站点击情况');
  });
  $('#trans_list li .lo_center, #trans_list li .trans_pr').on('click', function () {
    var txt = $(this).parent().find('.trans_com').text();
    $('.ht_transport_btn span').text(txt.slice(0, 5));
    $('.ht_transport_btn span').attr('data-title', txt);
    changeFreight();
    changePrice();
    $('#transport_detail').hide();
  });
}

function addSizeEvent() {
  /*添加尺码部分事件*/
  $('.clothes_nav li').on('click', function () {
    $('.clothes_nav li').removeClass('select');
    $(this).addClass('select');
    var txt = $(this).text();
    var c = getClothes(txt, country);
    if (txt.indexOf('鞋') > -1) {
      $('.unit_cm').css('display', 'none');
      $('.unit_mm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shoes').css('display', 'inline-block');
      if (txt.indexOf('男鞋') > -1) {
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes man_foot');
        $('.detail_left .shoes').text(txt);
      } else if (txt.indexOf('女鞋') > -1) {
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes woman_foot');
        $('.detail_left .shoes').text(txt);
      } else {
        $('#size_detail .shoes').hide();
        $('.cloth_icon').css('display', 'inline-block');
        $('.tongxie').css('display', 'inline-block');
        $('.tongxie0').addClass('size_hover');
        $('.tongxie4').removeClass('size_hover');
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes kids_foot');
      }
    } else if (txt.indexOf('童装') > -1) {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('#size_detail .tongzhuang').css('display', 'inline-block');
      $('.cloth_icon').css('display', 'inline-block');
      $('.cloth_icon').attr('class', '').addClass('cloth_icon kid0');
      $('.tongzhuang0').addClass('size_hover');
      $('.tongzhuang4').removeClass('size_hover');
    } else if (txt.indexOf('男装') > -1) {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shangyi').show();
      $('#size_detail .xiazhuang').show();
      $('.xiazhuang').removeClass('size_hover');
      $('.shangyi').addClass('size_hover');
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');
    } else {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shangyi').show();
      $('#size_detail .xiazhuang').show();
      $('.xiazhuang').removeClass('size_hover');
      $('.shangyi').addClass('size_hover');
      if (txt.indexOf('男装') > -1) $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');else $('.cloth_icon').attr('class', '').addClass('cloth_icon womanshangzhuang');
    }

    insertSize(c[0], c[1]);
  });

  $('.shangyi').on('click', function () {
    if ($(this).attr('class').indexOf('size_hover') > -1) return;
    var txt = $('.clothes_nav li[class="select"]').text();
    if (txt == "童装") return;
    if (txt == "男装") {
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');
    }
    if (txt == "女装") {
      $('.cloth_icon').attr('class', '').addClass('cloth_icon womanshangzhuang');
    }
    var c = getClothes(txt, country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.xiazhuang').removeClass('size_hover');
  });
  $('.xiazhuang').on('click', function () {
    if ($(this).attr('class').indexOf('size_hover') > -1) return;
    var txt = $('.clothes_nav li[class="select"]').text();
    if (txt == "童装") return;
    if (txt == "男装") {
      var c = clothesDict['xiazhuang'][country]['man'];
      insertSize(c[0], c[1]);
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manxiazhuang');
    }
    if (txt == "女装") {
      var c = clothesDict['xiazhuang'][country]['woman'];
      insertSize(c[0], c[1]);
      $('.cloth_icon').attr('class', '').addClass('cloth_icon womanxiazhuang');
    }
    $(this).addClass('size_hover');
    $('.shangyi').removeClass('size_hover');
  });
  $('.tongzhuang0').on('click', function () {
    var c = getClothes('童装', country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.tongzhuang4').removeClass('size_hover');
    $('.cloth_icon').attr('class', '').addClass('cloth_icon kid0');
  });
  $('.tongzhuang4').on('click', function () {
    var c = getClothes('童装', country);
    insertSize(c[0], c[2]);
    $(this).addClass('size_hover');
    $('.tongzhuang0').removeClass('size_hover');
    $('.cloth_icon').attr('class', '').addClass('cloth_icon kid4');
  });
  $('.tongxie0').on('click', function () {
    var c = getClothes('童鞋', country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.tongxie4').removeClass('size_hover');
  });
  $('.tongxie4').on('click', function () {
    var c = getClothes('童鞋', country);
    insertSize(c[0], c[2]);
    $(this).addClass('size_hover');
    $('.tongxie0').removeClass('size_hover');
  });
}

var reqCollect = function reqCollect(url, callback) {
  request.get(url).done(function (data) {
    callback(data);
  }).fail(function () {
    $('#ht_addcollect').text('添加失败');
    $('#ht_addcollect').removeClass('c_adding');
    $('#ht_addcollect').addClass('c_added');
  });
};
var check_favor = function check_favor() {
  var id = userData.get('other_info').now.dp_id;
  if (!G.email || !id) return;
  var url = G.c_server + '/brwext/check_collected?email=' + G.email + '&dp_id=' + id;
  request.get(url).done(function (data) {
    if (data && data.msg === true) {
      $('#ht_addcollect').text('已添加');
      $('#ht_addcollect').addClass('c_added');
    }
  });
};

function addCollect() {
  var pagedp = G.dp;
  var oinfo = userData.get('other_info');
  var dp = oinfo.now;
  if (!dp.dp_id) {
    $('#ht_addcollect').text('暂不支持');
    $('#ht_addcollect').unbind('click');
    return;
  }
  $('#ht_addcollect').text('正在添加');
  $('#ht_addcollect').addClass('c_adding');

  dp.price = pagedp.oldPrice || oinfo['code-server'] && oinfo['code-server'].price;
  dp.title = pagedp.name || $('title').html();
  dp.url = dp.url || location.href;
  dp.img = dp.img || pagedp.img;
  var url = G.c_server + '/collect/aj_add?dp_id= ' + dp.dp_id + '&url=' + encodeURIComponent(dp.url || G.dp.url) + '&img=' + encodeURIComponent(dp.img || G.dp.img) + '&title=' + encodeURIComponent(dp.title) + '&price=' + dp.price + '&site_id=' + dp.site_id + '&cat_id=' + G.dp.cat_id;
  reqCollect(url, function (data) {
    if (data.code == 100 || data.code <= 0) {
      var href = window.location.href.toString();
      //这里进行特殊处理，标记来源的url，在页面返回的时候，自动收藏商品
      if (href.indexOf('?') > -1) {
        href += '&gwd_add_favor_unique=true';
      } else {
        href += "?gwd_add_favor_unique=true";
      }
      window.location.href = G.c_server + "/user/login?from_url=" + encodeURIComponent(href);
    } else if (data.code == 1) {
      $('#ht_addcollect').text('已添加');
      $('#ht_addcollect').removeClass('c_adding');
      $('#ht_addcollect').addClass('c_added');
      $("#ht_addcollect").unbind('click');
    } else if (data.code == 2) {
      $('#ht_addcollect').text('添加过了');
      $('#ht_addcollect').removeClass('c_adding');
      $('#ht_addcollect').addClass('c_added');
      $("#ht_addcollect").unbind('click');
    }
  });
}

function contentEvent() {
  /*主窗口事件*/

  $('.ht_head .ht_getprice').on('mouseenter', function () {
    var dom = $('#ht_content_info');
    if (!dom.is(':visible')) {
      $('.content_default').hide();
      dom.show();
    }
  });
  /*关闭弹窗框*/
  $('.closebar').on('click', function () {
    $(this).parent().hide();
  });

  /*添加划词翻译直邮第三方信息提示*/
  $('.content_default_left .ht_tariff .del_line').on('mouseenter', function () {
    $('.tariff_remind_detail').show();
  });
  $('.content_default_left .ht_tariff .del_line').on('mouseleave', function () {
    $('.tariff_remind_detail').hide();
  });
  $('.ht_translate').on('mouseenter', function () {
    $('.translate_detail').show();
  });
  $('.ht_translate').on('mouseleave', function () {
    $('.translate_detail').hide();
  });

  $('.pro_type').on('mouseenter', function () {
    $('.pro_type_detail').show();
  }).on('mouseleave', function () {
    $('.pro_type_detail').hide();
  });
  $('.mail_type').on('mouseenter', function () {
    $('.mail_type_detail').show();
  }).on('mouseleave', function () {
    $('.mail_type_detail').hide();
  });
  $('.ht_transport_btn, .size_help, .ht_tariff_btn, #ht_addcollect').on('mouseenter', function () {
    $(this).find('.div_detail').show();
  }).on('mouseleave', function () {
    $(this).find('.div_detail').hide();
  });
  $('.weight_type').on('mouseenter', function () {
    $('.weight_type_detail').show();
  }).on('mouseleave', function () {
    $('.weight_type_detail').hide();
  });

  // 添加降价提醒
  $('#ht_addcollect').on('click', function (event) {
    var dom = $('#altImages li img').eq(0);
    if (dom) G.collectInfo.img = dom.attr('src');
    event.preventDefault();
    addCollect();
  });

  // 重量单位选择
  $('.ht_weight .weight_type').on('click', function () {
    var t = $(this).text();
    if (t === 'LB') {
      weight = $('.ht_weight_num').val();
      $(this).text('KG');
      $('.ht_weight_num').val(Math.round(Number(weight) * 0.4535924 * 100) / 100);
    } else {
      $(this).text('LB');
      if (weight) $('.ht_weight_num').val(weight);
    }
  });
  // 是否选取关税
  $('.del_line').on('click', function () {
    if ($(this).attr('data-del') === '1') {
      $(this).find('.ht_tariff_num').css('text-decoration', 'none');
      $(this).attr('data-del', '0');
      $(this).find('span').attr('data-price', $(this).find('span').text());
      changePrice();
    } else {
      $(this).find('.ht_tariff_num').css('text-decoration', 'line-through');
      $(this).attr('data-del', '1');
      $(this).find('span').attr('data-price', 0);
      changePrice();
    }
  });

  // 转运中国弹窗框
  $('.ht_transport_btn').on('click', function () {
    $('#transport_detail').show();
    log('click:haitao:transport');
    cnzz.log('海淘转运商家点击情况');
  });

  /*尺寸转换*/
  $('.size_help').on('click', function () {
    $('#size_detail').show();
    log('click:haitao:size_help');
    cnzz.log('点击尺码帮助');
  });
  $('.size_xiala').on('mouseenter', function () {
    $(this).next('.size_xialabox').show();
    $(this).addClass('msHover');
  });
  $('.size_xiala').on('mouseleave', function () {
    var that = this;
    timer = setTimeout(function () {
      $(that).next('.size_xialabox').hide();
      $(that).removeClass('msHover');
    }, 100);
  });
  $('.size_xialabox').on('mouseenter', function () {
    clearTimeout(timer);
  });
  $('.size_xialabox').on('mouseleave', function () {
    $(this).hide();
  });
  $('.size_xialabox a').on('click', function () {
    var txt = $(this).text();
    var c = $(this).parent().attr('data-size');
    $('.' + c).val(txt);
    $(this).parent().hide();
    conversionSize();
  });

  $('#first_size').on('keyup', function () {
    conversionSize();
  });
}

// function otherPageEvent() {
//   let arr = ['#variation_size_name', '#variation_configuration', '#variation_color_name', '#variation_style_name']
//   let dom = '';
//   for (let i=0; i<arr.length; i++ ) {
//     if ( $(arr[i]).length >0 && $(arr[i]).find('li').length > 0)
//       dom = arr[i]
//   }
//   $(dom).find('li').each(function() {
//     $(this).on('click', function() {
//       let txt = $(this).find('.a-size-mini').eq(0).text()
//       if (txt == '' || !txt) return;
//       let price = parseprice(txt)
//       $('.ht_content .price_num').text('¥' + price)
//       $('.ht_getprice_num').text('¥' + calPrice(price));
//     })
//   })
// }

function addEvent() {
  contentEvent();
  cateEvent();
  addShopEvent();
  // otherPageEvent()
}

function insertCate(c) {
  /*插入二级分类*/
  var html = '{{each data}}<a href="javascript:void(0);" title="{{$value[1]}}" tariff="{{$value[0]}}">{{$value[1]}}</a>{{/each}}';
  $('#cate_small').next('.xialabox').empty().append(template.compile(html)({
    data: c
  }));
  /*插入数据之后修改input框样式*/
  $('#cate_small').removeClass('sel_info');
  addSmallCateEvent();
}

function addSmallCateEvent() {
  /*添加二级分类事件*/
  $('#small_xiala a').on('click', function () {
    var txt = $(this).text();
    $('#cate_small').val(txt);
    $('.ht_tariff_cate').text(txt);
    $('.ht_tariff .ht_tariff_num em').text($(this).attr('tariff'));
    $('#tariff_detail .ht_tariff_num').text($(this).attr('tariff'));
    $('.ht_tariff_btn span').text($(this).text().slice(0, 5));
    $('.ht_tariff_btn span').attr('title', $(this).text());
    $('#small_xiala').hide();
    replaceStr('#cate_small');
    replaceStr('.ht_tariff_cate', 'text', 4);
  });

  $('#select_btn').on('click', function () {
    changePrice();
    $('#tariff_detail').hide();
  });
}

function replaceStr(obj, type, num) {
  /*字符串很长的做一下替换*/
  num = num || 6;
  var txt;
  var l = 0;
  if (type == 'text') txt = $(obj).text();else txt = $(obj).val();
  for (var i = 0; i < txt.length; i++) {
    var t = new RegExp('[a-z0-9/]').test(txt[i]);
    if (t) l += 0.5;else l += 1;
    if (l > num) {
      txt = txt.slice(0, i) + '...';
      if (type == 'text') $(obj).text(txt);else $(obj).val(txt);
      return;
    }
  }
}

function cateEvent() {
  /*关税框弹出事件*/
  $('.ht_tariff_btn').on('click', function () {
    $('#tariff_detail').show();
    log('click:haitao:tariff');
    cnzz.log('海淘关税点击');
  });
  /*分类选择*/
  $('#cate_select_box input').on('mouseenter', function () {
    if ($(this).next('.xialabox').find('a').length > 0) {
      $(this).next('.xialabox').show();
      $(this).parent().addClass('select_hover');
      $(this).addClass('input_hover');
    }
  });
  $('#cate_select_box input').on('mouseleave', function () {
    var that = this;
    timer = setTimeout(function () {
      $(that).next('.xialabox').hide();
      $(that).parent().removeClass('select_hover');
      $(that).removeClass('input_hover');
    }, 100);
  });

  /*下拉列表*/
  $('.xialabox').on('mouseenter', function () {
    clearTimeout(timer);
  }).on('mouseleave', function () {
    $(this).hide();
    $(this).parent().removeClass('select_hover');
    $(this).parent().find('input').removeClass('input_hover');
  });

  /*二级分类事件*/
  addSmallCateEvent();
  /*一级分类选项点击事件*/
  $('#big_xiala a').on('click', function () {
    var txt = $(this).text();
    $('#cate_big').val(txt);
    $('.ht_tariff_cate').text(txt);
    var cate = $(this).attr('cate');
    insertCate(cateDict[cate]);
    $('#big_xiala').hide();
    replaceStr('#cate_big');
    replaceStr('.ht_tariff_cate', 'text', 4);
  });
}

function baidufanyi(t, callback) {
  /*百度翻译接口*/
  var url = location.protocol + ('//browser.' + G.extName + '.com/extension?ac=fanyi&string=') + t;
  request.get(url).done(function (data) {
    if (data.trans_result && !data.error_code) {
      var trans = [];
      for (var i = 0; i < data.trans_result.length; i++) {
        trans.push(data.trans_result[i].dst);
      }
      callback(trans);
    } else {
      callback([t]);
    }
  });
}

function requestFanyi(t, callback) {
  /*请求翻译接口*/
  baidufanyi(t, callback);
  log('request:haitao:fanyi');
  cnzz.log('请求划词翻译');
}

// function youdaofanyi(t, callback) {
//   /*有道翻译接口*/
//   let doctype = 'jsonp';
//   if (G.chrome_extension)
//     doctype = 'json'
//   var url = "https://fanyi.youdao.com/openapi.do?keyfrom=chrome&key=1361128838&type=data&doctype=" + doctype + "&version=1.1&q="+t;
//     request.getPure(url).done(function(data){
//       if (data.basic && data.basic.explains && data.basic.explains.length >0)
//         callback(data.basic.explains)
//       else if( data.translation)
//         callback(data.translation)
//       else
//         callback([t])
//     })
// }

function insertFanyi(data) {
  /*插入翻译内容*/
  data = data.join('');
  $('.ht_fanyi').remove();
  var html = '<div class="ht_fanyi" style="top:{{hty}};left:{{htx}}"><span id="ht_top"></span>{{data}}</div>';
  var t = template.compile(html)({
    data: data,
    'htx': calPosition() + 'px',
    'hty': htY + 'px'
  });
  $('body').append(t);
  addFanyiEvent();
}

function calPosition() {
  /*计算插入位置*/
  var pos = 0;
  if (htX > mouseDownX) pos = htX - (htX - mouseDownX) / 2 - 65;else pos = htX + (mouseDownX - htX) / 2 - 65;
  return pos;
}

function editTxt(t) {
  requestFanyi(t, insertFanyi);
}

function addFanyiEvent() {
  $('.ht_fanyi').siblings().on('click', function () {
    $('.ht_fanyi').remove();
  });
}

function getSelect() {
  $('body').on('mousedown', function (e) {
    clearTimeout(timer2);
    mouseDownX = e.pageX;
  });
  $('body').on('mouseup', function (e) {
    timer2 = setTimeout(function () {
      var txt = '';
      htX = e.pageX;
      htY = e.pageY + 20;
      if (window.getSelection) {
        txt = window.getSelection().toString();
      } else if (document.selection) {
        txt = document.selection.createRange().text;
      }
      if (txt == '') return;else editTxt(txt);
    }, 100);
  });
}

module.exports._init = function () {
  var permanent = userData.get('permanent');
  if (permanent && permanent.sethaitao === "0") return;
  init();
};

module.exports.isHaitao = isHaitaoPage;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

module.exports = function (obj) {
  if (G.from_device === '360' || G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    if (G.from_device === 'bijiago' && G.ss_name !== 'priceDog' || G.cooperation) {
      obj.sitename = 'taobao';
    } else {
      if (obj.source) {
        var url = obj.pureUrl || obj.url;
        url = url + (url.indexOf('?') > -1 ? '&' : '?') + 'source=' + obj.source;
        // if (!G.forbidCoupon) {
        //   url = `${G.server}/extension/RedirectInTb?id=${obj.id}&format=&site=taobao`
        // }

        return url;
      }
    }
  }
  var source = '';
  var site = obj.sitename || '';
  if (obj.source) source = obj.source;
  // if (G.ss_name === 'priceDog' && G.aliSite) {
  //   debugger
  //   return `https://tb.pricedog.com/extension/qrpage?dp_id=${obj.id}&tag=9_chrome&discount=${data.coupon.coupon_money}`
  // }
  if (true) return G.u_server + '/redirect/tao?id=' + obj.id + '&site=' + site + '&source=' + source + '&from_device=' + G.from_device + '&union=' + G.union;
};

var makeUrl = function makeUrl(item, site) {
  if (G.from_device === 'biyibi') {
    return 'https://item.taobao.com/item.htm?id=' + item.num_iid;
  }
  return __webpack_require__(3).makeUrl(G.tb_server, '/extension/qrpage', {
    dp_id: item.num_iid + '-' + site,
    directLink: 1,
    position: 'extSame',
    title: item.title,
    img: item.pic_url,
    price: item.price,
    shopName: item.nick,
    sellAmount: item.volume,
    union: G.union
  });
};

module.exports.buildCommon = function (data) {
  // 针对淘宝客接口tbres 返回的数据  没有优惠券的部分做链接转换。
  if (!(data.tmall instanceof Array)) {
    for (var i = 0; i < data.tmall.product.length; i++) {
      var item = data.tmall.product[i];
      var obj = {
        'source': 'common',
        'img_url': item.pic_url,
        'title': item.title,
        'price': item.price,
        'shop_name': item.nick,
        'sales': item.volume || '0',
        'id': item.num_iid,
        'url': item.url,
        'discuss': item.comment_count || '0',
        'istaobao': '0',
        'pureUrl': "https://detail.tmall.com/item.htm?id=" + item.num_iid,
        'dp_id': G.now_dp_id,
        'site_id': G.site_id
      };
      if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
        if ((G.from_device === 'bijiago' || G.cooperation) && !G.forbidCoupon) {
          item.url = module.exports(obj);
        } else {
          item.url = makeUrl(item, 83);
        }
      } else {
        item.url = module.exports(obj);
      }
    }
  }
  if (!(data.taobao instanceof Array)) {
    for (var i = 0; i < data.taobao.product.length; i++) {
      var item = data.taobao.product[i];
      var obj = {
        'source': 'common',
        'img_url': item.pic_url,
        'title': item.title,
        'price': item.price,
        'shop_name': '',
        'sales': item.volume || '0',
        'id': item.num_iid,
        'url': item.url,
        'discuss': item.comment_count || '0',
        'istaobao': '1',
        'pureUrl': "https://item.taobao.com/item.htm?id=" + item.num_iid,
        'dp_id': G.now_dp_id,
        'site_id': G.site_id
      };
      if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
        if ((G.from_device === 'bijiago' || G.cooperation) && !G.forbidCoupon) {
          item.url = module.exports(obj);
        } else {
          item.url = makeUrl(item, 123);
        }
      } else {
        item.url = module.exports(obj);
      }
    }
  }
  return data;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 29 */
/***/ (function(module, exports) {

let toSJISFunction
const CODEWORDS_COUNT = [
  0, // Not used
  26, 44, 70, 100, 134, 172, 196, 242, 292, 346,
  404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,
  1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,
  2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
]

/**
 * Returns the QR Code size for the specified version
 *
 * @param  {Number} version QR Code version
 * @return {Number}         size of QR code
 */
exports.getSymbolSize = function getSymbolSize (version) {
  if (!version) throw new Error('"version" cannot be null or undefined')
  if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40')
  return version * 4 + 17
}

/**
 * Returns the total number of codewords used to store data and EC information.
 *
 * @param  {Number} version QR Code version
 * @return {Number}         Data length in bits
 */
exports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {
  return CODEWORDS_COUNT[version]
}

/**
 * Encode data with Bose-Chaudhuri-Hocquenghem
 *
 * @param  {Number} data Value to encode
 * @return {Number}      Encoded value
 */
exports.getBCHDigit = function (data) {
  let digit = 0

  while (data !== 0) {
    digit++
    data >>>= 1
  }

  return digit
}

exports.setToSJISFunction = function setToSJISFunction (f) {
  if (typeof f !== 'function') {
    throw new Error('"toSJISFunc" is not a valid function.')
  }

  toSJISFunction = f
}

exports.isKanjiModeEnabled = function () {
  return typeof toSJISFunction !== 'undefined'
}

exports.toSJIS = function toSJIS (kanji) {
  return toSJISFunction(kanji)
}


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

const VersionCheck = __webpack_require__(99)
const Regex = __webpack_require__(100)

/**
 * Numeric mode encodes data from the decimal digit set (0 - 9)
 * (byte values 30HEX to 39HEX).
 * Normally, 3 data characters are represented by 10 bits.
 *
 * @type {Object}
 */
exports.NUMERIC = {
  id: 'Numeric',
  bit: 1 << 0,
  ccBits: [10, 12, 14]
}

/**
 * Alphanumeric mode encodes data from a set of 45 characters,
 * i.e. 10 numeric digits (0 - 9),
 *      26 alphabetic characters (A - Z),
 *   and 9 symbols (SP, $, %, *, +, -, ., /, :).
 * Normally, two input characters are represented by 11 bits.
 *
 * @type {Object}
 */
exports.ALPHANUMERIC = {
  id: 'Alphanumeric',
  bit: 1 << 1,
  ccBits: [9, 11, 13]
}

/**
 * In byte mode, data is encoded at 8 bits per character.
 *
 * @type {Object}
 */
exports.BYTE = {
  id: 'Byte',
  bit: 1 << 2,
  ccBits: [8, 16, 16]
}

/**
 * The Kanji mode efficiently encodes Kanji characters in accordance with
 * the Shift JIS system based on JIS X 0208.
 * The Shift JIS values are shifted from the JIS X 0208 values.
 * JIS X 0208 gives details of the shift coded representation.
 * Each two-byte character value is compacted to a 13-bit binary codeword.
 *
 * @type {Object}
 */
exports.KANJI = {
  id: 'Kanji',
  bit: 1 << 3,
  ccBits: [8, 10, 12]
}

/**
 * Mixed mode will contain a sequences of data in a combination of any of
 * the modes described above
 *
 * @type {Object}
 */
exports.MIXED = {
  bit: -1
}

/**
 * Returns the number of bits needed to store the data length
 * according to QR Code specifications.
 *
 * @param  {Mode}   mode    Data mode
 * @param  {Number} version QR Code version
 * @return {Number}         Number of bits
 */
exports.getCharCountIndicator = function getCharCountIndicator (mode, version) {
  if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)

  if (!VersionCheck.isValid(version)) {
    throw new Error('Invalid version: ' + version)
  }

  if (version >= 1 && version < 10) return mode.ccBits[0]
  else if (version < 27) return mode.ccBits[1]
  return mode.ccBits[2]
}

/**
 * Returns the most efficient mode to store the specified data
 *
 * @param  {String} dataStr Input data string
 * @return {Mode}           Best mode
 */
exports.getBestModeForData = function getBestModeForData (dataStr) {
  if (Regex.testNumeric(dataStr)) return exports.NUMERIC
  else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC
  else if (Regex.testKanji(dataStr)) return exports.KANJI
  else return exports.BYTE
}

/**
 * Return mode name as string
 *
 * @param {Mode} mode Mode object
 * @returns {String}  Mode name
 */
exports.toString = function toString (mode) {
  if (mode && mode.id) return mode.id
  throw new Error('Invalid mode')
}

/**
 * Check if input param is a valid mode object
 *
 * @param   {Mode}    mode Mode object
 * @returns {Boolean} True if valid mode, false otherwise
 */
exports.isValid = function isValid (mode) {
  return mode && mode.bit && mode.ccBits
}

/**
 * Get mode object from its name
 *
 * @param   {String} string Mode name
 * @returns {Mode}          Mode object
 */
function fromString (string) {
  if (typeof string !== 'string') {
    throw new Error('Param is not a string')
  }

  const lcStr = string.toLowerCase()

  switch (lcStr) {
    case 'numeric':
      return exports.NUMERIC
    case 'alphanumeric':
      return exports.ALPHANUMERIC
    case 'kanji':
      return exports.KANJI
    case 'byte':
      return exports.BYTE
    default:
      throw new Error('Unknown mode: ' + string)
  }
}

/**
 * Returns mode from a value.
 * If value is not a valid mode, returns defaultValue
 *
 * @param  {Mode|String} value        Encoding mode
 * @param  {Mode}        defaultValue Fallback value
 * @return {Mode}                     Encoding mode
 */
exports.from = function from (value, defaultValue) {
  if (exports.isValid(value)) {
    return value
  }

  try {
    return fromString(value)
  } catch (e) {
    return defaultValue
  }
}


/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var request = __webpack_require__(3);
var md5 = __webpack_require__(49);
var host = 'i.gwdang.com';
var userData = __webpack_require__(15);
var communicate = __webpack_require__(18);

var getUserToken = function getUserToken() {
  var resolved = false;
  return new Promise(function (resolve) {
    communicate.trigger({
      type: 'checkUserToken'
    });
    communicate.on(function (data) {
      if (typeof data === 'string') {
        data = JSON.parse(data);
      }
      if (data.type === 'checkUserToken') {
        resolved = true;
        resolve(data.value);
      }
    });
  });
};

var signParams = function signParams(params) {
  var query = Object.keys(params).sort(function (a, b) {
    return a.localeCompare(b);
  }).map(function (x) {
    return x + params[x];
  }).join('');
  var first = md5(query) + params.ac;
  var res = md5(first);
  return res;
};

var post = function post(url, params, data) {
  var hidePrice = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];

  if (!data.price && !hidePrice) {
    data.price = '0';
  }
  params.platform = 'ext';
  params.t = parseInt(new Date().getTime() / 1000);
  var toSign = _extends({}, params, data, { ac: url.toLowerCase().replace('/', '').replace(/\//g, '.') });
  params.sign = signParams(toSign);
  var query = Object.keys(params).map(function (x) {
    return x + '=' + encodeURIComponent(params[x]);
  }).join('&');

  return request.post('https://' + host + url + '?' + query, data, true, true);
};

function requestXHR(url, callback, referer) {
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.addEventListener('load', function () {
    callback(xmlhttp.responseText);
  });
  xmlhttp.withCredentials = true;
  xmlhttp.open("GET", url, true);
  // if (referer) {
  //     xmlhttp.setRequestHeader('x-referer', referer)
  // }
  xmlhttp.send();
};

var get = function get(url, params) {
  params.platform = 'ext';
  if (!params.t) {
    params.t = parseInt(new Date().getTime() / 1000);
  }
  // let cb = 'cb' + parseInt(Math.random() * 10000)
  // if (!G.allowBackgroundRequest) {
  //   params.callback = cb
  // }
  params.sign = signParams(_extends({}, params, {
    ac: url.toLowerCase().replace('/', '').replace(/\//g, '.')
  }));
  var query = Object.keys(params).map(function (x) {
    return x + '=' + encodeURIComponent(params[x]);
  }).join('&');
  if (G.allowBackgroundRequest && G.canUseLocalLoginCheck) {
    return request.rawGet('https://' + host + url + '?' + query);
  } else {
    return new Promise(function (resolve) {
      var cancel = true;
      requestXHR('https://' + host + url + '?' + query, function (res) {
        cancel = false;
        try {
          var r = JSON.parse(res);
          resolve(r);
        } catch (e) {
          resolve(res);
        }
      });
      setTimeout(function () {
        if (cancel) {
          resolve({ code: 0 });
        }
      }, 4000);
      // $.get(`https://${host}${url}?${query}`).then(res => {
      //   try {
      //     let r = JSON.parse(res)
      //     resolve(r)
      //   } catch (e) {
      //     resolve(res)
      //   }
      // })
      // $.ajax({
      //   url: `https://${host}${url}?${query}`,
      //   dataType: 'jsonp',
      //   jsonp: '',
      //   jsonpCallback: cb,
      //   success: function(data){
      //     resolve(data)
      //   }
      // });
    });
  }
};

var getQueryString = function getQueryString(url, params) {
  params.platform = 'ext';
  params.t = parseInt(new Date().getTime() / 1000);
  params.sign = signParams(_extends({}, params, {
    ac: url.toLowerCase().replace('/', '').replace(/\//g, '.')
  }));
  var query = Object.keys(params).map(function (x) {
    return x + '=' + encodeURIComponent(params[x]);
  }).join('&');
  return 'https://' + host + url + '?' + query;
};

var current = null;

var currentCollectId = null;

var getDetail = function getDetail(dp_id) {
  return new Promise(function (resolve, reject) {
    if (!G.productChecked || !G.productChecked.collected) {
      resolve({});
      return;
    }
    if (current) {
      resolve(current);
    } else {
      get('/UserCollection/Detail', {
        dp_id: dp_id
      }).then(function (res) {
        try {
          if (typeof res === 'string') {
            res = JSON.parse(res);
          }
          current = res;
          resolve(res);
        } catch (e) {
          resolve({});
        }
      });
    }
  });
};

module.exports = {
  reset: function reset() {
    current = null;
    currentCollectId = null;
  },
  /**
   * 登录
   * @param username
   * @param password
   * @param remember
   * @returns {*}
   */
  login: function login(username, password, remember) {
    return post('/User/Login', {}, {
      account: username,
      passwd: password,
      remember_me: remember
    });
  },
  /**
   * 退出登录
   */
  logout: function logout() {
    return get('/User/Logout', {});
  },
  /**
   * 发送短信
   * @param {string} phone - 电话号码
   * @returns Promise
   */
  sendSms: function sendSms(phone) {
    return post('/UserHelper/SmsCode', {}, {
      phone: phone,
      tag: 'login'
    });
  },

  /**
   * 检查某个商品是否被收藏
   * @param dp_id
   * @returns {*}
   */
  checked: function checked(dp_id) {
    var token;
    return regeneratorRuntime.async(function checked$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!G.canUseLocalLoginCheck) {
            context$1$0.next = 6;
            break;
          }

          context$1$0.next = 3;
          return regeneratorRuntime.awrap(getUserToken());

        case 3:
          token = context$1$0.sent;

          if (token) {
            context$1$0.next = 6;
            break;
          }

          return context$1$0.abrupt('return', new Promise(function (resolve) {
            return resolve({
              code: 0
            });
          }));

        case 6:
          return context$1$0.abrupt('return', get('/UserCollection/Checked', {
            dp_id: dp_id
          }));

        case 7:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  },

  /**
   * 收藏详情
   * @param dp_id
   */
  detail: function detail(dp_id) {
    return getDetail(dp_id);
  },

  /**
   * 获取收藏列表
   * @param tab
   * @param pg
   * @param ps
   * @returns {*}
   */
  getList: function getList(tab, pg) {
    if (tab === undefined) tab = 'default';
    var ps = arguments.length <= 2 || arguments[2] === undefined ? 30 : arguments[2];

    return get('/UserCollection/List', { ps: ps, tab: tab });
  },
  /**
   * 添加商品收藏
   * @param settingPrice
   * @param type
   * @returns {*}
   */
  add: function add(settingPrice, type) {
    var mode = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
    var mPromo = arguments.length <= 3 || arguments[3] === undefined ? 1 : arguments[3];
    var blackClass = arguments.length <= 4 || arguments[4] === undefined ? 0 : arguments[4];
    var payload, price, oinfo;
    return regeneratorRuntime.async(function add$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!(current && current.data)) {
            context$1$0.next = 5;
            break;
          }

          payload = {
            collection_id: current.data.id,
            notifier_site: type,
            notifier_threshold: settingPrice
          };

          if (G.showMPromo) {
            payload.notifier_mpromo = mPromo ? 1 : 0;
          }
          if (G._pp) {
            payload._pp = G._pp;
          }
          return context$1$0.abrupt('return', post('/UserCollection/Modify', {}, payload));

        case 5:
          price = G.dp.price;

          if (G.dp.storeInfo && G.dp.storeInfo.length) {
            if (G.dp.storeInfo[0].currency) {
              price = G.dp.oldPrice;
            }
          }
          if (isNaN(parseFloat(price))) {
            price = 0;
          }
          oinfo = userData.get('other_info');

          if (!price) {
            if (oinfo && oinfo['code-server'] && oinfo['code-server']['price']) {
              price = oinfo['code-server']['price'];
            }
          }

          if (price) {
            context$1$0.next = 14;
            break;
          }

          context$1$0.next = 13;
          return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

        case 13:
          price = context$1$0.sent;

        case 14:
          if (!price) {
            price = 0;
          }
          return context$1$0.abrupt('return', new Promise(function (resolve) {
            var payload = {
              dp_id: G.dp.dpId,
              title: (G.dp.name ? G.dp.name : document.title).trim(),
              url: location.href,
              img: G.dp.img ? G.dp.img : '',
              price: price,
              promo_price: G.dp.promoPrice ? G.dp.promoPrice : 0,
              notifier_site: type,
              notifier_threshold: settingPrice,
              is_black_class: blackClass
            };
            if (G.showMPromo) {
              payload.notifier_mpromo = mPromo ? 1 : 0;
            }
            if (G._pp) {
              payload._pp = G._pp;
            }
            post('/UserCollection/Add', {}, payload).then(function (res) {
              if (typeof res === 'string') {
                res = JSON.parse(res);
              }
              if (res.data) {
                current = res;
              }
              resolve(res);
            });
          }));

        case 16:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  },
  /**
   * 删除商品收藏
   * @returns {*}
   * @param collectionId
   */
  'delete': function _delete() {
    var collectionId = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];

    var id = collectionId ? collectionId : current && current.data ? current.data.id : '';
    if (current && current.data && id === current.data.id) {
      current = {};
    }
    return post('/UserCollection/Delete', {}, {
      collection_ids: id
    });
  },
  clearCurrent: function clearCurrent() {
    current = null;
  },
  checkLoginStatus: function checkLoginStatus() {
    return post('/User/Detail', {}, {});
  },
  /**
   * 降价数量
   * @param time
   */
  checkFavor: function checkFavor(time) {
    return get('/UserCollection/Tip', {
      t: time / 1000
    });
  },
  getQueryString: getQueryString,
  reportMonitorEvent: function reportMonitorEvent(dpId, title, img, url, price, buy_cnt, create_time, days) {
    return post('/UserExtend/ReportMonitorEvent', {
      dp_id: dpId,
      title: title,
      img: img,
      url: url
    }, {
      price: price,
      buy_cnt: buy_cnt,
      create_time: create_time,
      days: days
    });
  },
  getShaiDanList: function getShaiDanList(dkey, skuMap) {
    var payload = {};
    if (G.site === '360buy') {
      payload.skuMap = skuMap;
    }
    return post('/UserExtendOrder/ShowList', {
      dkey: dkey
    }, payload, true);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var missingText = {};

var trMap = {
  "淘宝": "淘寶",
  "京东": "京東",
  "相似度": "相似度",
  "价格从低到高": "價格從低到高",
  "销量从高到低": "銷量從高到低",
  "点击查看结果": "點擊查看結果",
  "图片": "圖片",
  "找同款": "找同款",
  "排序": "排序",
  "评论数从高到低": "評論數從高到低",
  "评论": "評論",
  "已售": "已售",
  "自营": "自營",
  "一键分享到微信/QQ": "一鍵分享到微信/QQ",
  "复制成功": "複製成功",
  "点击复制": "點擊複製",
  "淘口令": "淘口令",
  "第一次使用时需要先同意授权": "第一次使用時需要先同意授權",
  "请先访问": "請先訪問",
  "首页": "首頁",
  "，重新": "，重新",
  "登录帐号": "登錄帳號",
  "登录": "登錄",
  "帐号": "帳號",
  "，然后回来重试。": "，然後回來重試。",
  "请先去【": "請先去【",
  "这里": "這裡",
  "】进行滑块验证后再回来重试。": "】進行滑塊驗證後再回來重試。",
  "加载失败，请先访问【": "加載失敗，請先訪問【",
  "】，再回来重试": "】，再回來重試",
  "加载失败，": "加載失敗，",
  "接口故障，请稍后再试": "接口故障，請稍後再試",
  "，请重试一次": "，請重試一次",
  "去登录": "去登錄",
  "再试一次": "再試一次",
  "暂无同款": "暫無同款",
  "加载失败": "加載失敗"
};

G.missingText = missingText;

module.exports = function (text) {
  if (G.lang === 'zh-tr' && trMap[text]) {
    return trMap[text];
  }
  if (G.lang === 'zh-tr' && !trMap[text]) {
    missingText[text] = '';
  }
  return text;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var requestInfo = function requestInfo(url, callback, price) {
  var cbrun = false;
  if (G.allowBackgroundRequest) {
    __webpack_require__(3).getCouponFromUrl(url, price).then(function (res) {
      if (cbrun) return;
      cbrun = true;
      callback(res);
    });
    setTimeout(function () {
      if (!cbrun) {
        cbrun = true;
        callback();
      }
    }, 3000);
  } else {
    __webpack_require__(3).getCouponFromUrl(url, price).then(function (res) {
      callback(res);
    });
  }
  // var xmlhttp = new XMLHttpRequest();
  // xmlhttp.addEventListener('load', function() {
  //   try {
  //     callback(JSON.parse(xmlhttp.responseText))
  //   } catch (e) {
  //     callback({})
  //   }
  //
  // })
  // xmlhttp.open("GET", url, true);
  // xmlhttp.send();
  // require('common/request').get(`${G.server}/extension/CouponHandler?op=get&rawApi=${encodeURIComponent(url)}`).then(data => {
  //
  // })
};

module.exports.init = function (id, adzone_id, callback) {
  var direct = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3];
  var price = arguments.length <= 4 || arguments[4] === undefined ? null : arguments[4];

  var cbrun = false;
  if (G.forbidCoupon) {
    return;
  }
  if (!id) {
    callback && callback();
    cbrun = true;
    return;
  }
  id = ('' + id).replace('-83', '');
  id = ('' + id).replace('-8', '');
  var hosts = "open.lesiclub.cn";
  // if ((G.from_device === 'bijiago' && navigator.userAgent.toLocaleLowerCase().indexOf('firefox') > -1))
  //   hosts = "browser.gwdang.com/adbats"
  var url = location.protocol + "//" + hosts + "/coupon/get_ext/10005/" + adzone_id + "/" + id;
  requestInfo(url, function (data) {
    if (data && data.data) {
      data.data.reqid = id;
      data.data.click_url2 = G.u_server + '/?url=' + encodeURIComponent(data.data.click_url);

      if (G.from_device === 'bijiago' && G.aliSite && data.data.coupon) {
        data.data.click_url2 = 'https://tb.' + (G.ss_name === 'priceDog' ? 'pricedog' : 'bijiago') + '.com/extension/qrpage?union=' + G.union + '&dp_id=' + id + '-83&tag=9_chrome&discount=' + data.data.coupon.coupon_money + '&lang=' + G.lang;
      }

      if (G.from_device === 'biyibi' && G.aliSite) {
        data.data.click_url2 = 'https://tb.biyibi123.com/extension/qrpage?union=' + G.union + '&dp_id=' + id + '-83&tag=9_chrome&discount=' + data.data.coupon.coupon_money;
      }

      data.data.click_url2 = __webpack_require__(20).appendTbInfoForUrl(data.data.click_url2);

      data.data.cpid = adzone_id;
      if (callback) callback(data);
    } else {
      callback(null);
    }
    cbrun = true;
  }, price);
};

module.exports.byIdAndAdzone = function (id, adzone_id) {
  if (!id) {
    return new Promise(function (resolve) {
      return resolve(null);
    });
  }
  id = ('' + id).replace('-83', '');
  id = ('' + id).replace('-8', '');
  var hosts = "open.lesiclub.cn";
  if (G.from_device === 'bijiago' && navigator.userAgent.toLocaleLowerCase().indexOf('firefox') > -1) hosts = "browser.gwdang.com/adbats";
  var url = location.protocol + "//" + hosts + "/coupon/get_ext/10005/" + adzone_id + "/" + id;
  return new Promise(function (resolve) {
    requestInfo(url, function (data) {
      if (data && data.data) {
        data.data.reqid = id;
        data.data.click_url2 = G.u_server + '/?url=' + encodeURIComponent(data.data.click_url) + '&union=' + G.union;
        if (G.from_device === 'bijiago' && G.aliSite) {
          data.data.click_url2 = __webpack_require__(20).appendTbInfoForUrl('https://tb.' + (G.ss_name === 'priceDog' ? 'pricedog' : 'bijiago') + '.com/extension/qrpage?union=' + G.union + '&dp_id=' + dpId + '&tag=9_chrome&discount=' + data.data.coupon.coupon_money);
        }
        if (G.from_device === 'biyibi' && G.aliSite) {
          data.data.click_url2 = __webpack_require__(20).appendTbInfoForUrl('https://tb.biyibi123.com/extension/qrpage?union=' + G.union + '&dp_id=' + dpId + '&tag=9_chrome&discount=' + data.data.coupon.coupon_money);
        }
        resolve(data);
      } else {
        resolve(null);
      }
    });
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _vuex = __webpack_require__(24);

var _vuex2 = _interopRequireDefault(_vuex);

var _commonUserData = __webpack_require__(15);

var _commonUserData2 = _interopRequireDefault(_commonUserData);

var _commonLog = __webpack_require__(14);

var _commonLog2 = _interopRequireDefault(_commonLog);

var _commonCnzz = __webpack_require__(12);

var _commonCnzz2 = _interopRequireDefault(_commonCnzz);

var _commonRequest = __webpack_require__(3);

var _commonRequest2 = _interopRequireDefault(_commonRequest);

var userCenter = __webpack_require__(31);
var extConsole = __webpack_require__(6);

var inited = false;
var instanceId = null,
    store = null;

var getStore = function getStore() {
  __webpack_require__(6).log('getStore with instanceId', instanceId, 'G.instanceId', G.instanceId, 'G', G);
  if (G.instanceId !== instanceId) {
    instanceId = G.instanceId;
    store = makeStore();
    window.gwdStore = store;
    return store;
  } else {
    window.gwdStore = store;
    return store;
  }
};

module.exports.getStore = getStore;

var makeStore = function makeStore() {
  return new _vuex2["default"].Store({
    modules: {
      user: {
        namespaced: true,
        state: {
          login: false,
          wxQr: ''
        },
        mutations: {
          setLogin: function setLogin(state) {
            var login = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];

            state.login = login;
          },
          setWxQr: function setWxQr(state, qr) {
            state.wxQr = qr;
          }
        }
      },
      priceRemind: {
        namespaced: true,
        state: {
          instanceId: G.instanceId,
          mode: 0,
          notifySite: 0, // 0 全网商家 1 当前商家
          notifierMPromo: 1, // 多件推送 0 不开启 1 开启
          allPrice: 0,
          currentPrice: 0,
          hovered: false,
          collected: false,
          settedNotifySite: null,
          nowPrice: 0,
          showMPromo: false
        },
        mutations: {
          setState: function setState(state, payload) {
            Object.keys(payload).forEach(function (key) {
              state[key] = payload[key];
            });
          },
          updateRemindSettings: function updateRemindSettings(state, payload) {
            // if (G.productChecked && G.productChecked.collected) {
            //   debugger
            // }
            Object.keys(payload).forEach(function (key) {
              state[key] = payload[key];
            });
          }
        },
        actions: {
          cancel: function cancel(ctx) {
            return regeneratorRuntime.async(function cancel$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  return context$2$0.abrupt("return", userCenter["delete"]().then(function (res) {
                    ctx.commit('updateRemindSettings', {
                      collected: false,
                      settedNotifySite: null
                    });
                    return new Promise(function (resolve) {
                      return resolve();
                    });
                  }));

                case 1:
                case "end":
                  return context$2$0.stop();
              }
            }, null, this);
          },
          reset: function reset(ctx) {
            return regeneratorRuntime.async(function reset$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                case "end":
                  return context$2$0.stop();
              }
            }, null, this);
          },
          init: function init(ctx) {
            var dp_query, currentPrice, allPrice;
            return regeneratorRuntime.async(function init$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  // if (inited) {
                  //   return
                  // }
                  inited = true;
                  if (G.userLogin) {
                    ctx.commit('user/setLogin', true, { root: true });
                  }
                  if (G.userLogin && G.productChecked && G.productChecked.collected) {
                    ctx.commit('setState', {
                      collected: true
                    });
                  }

                  context$2$0.next = 5;
                  return regeneratorRuntime.awrap(__webpack_require__(4).met('dp_query_set'));

                case 5:
                  dp_query = _commonUserData2["default"].get('dp_query');
                  context$2$0.next = 8;
                  return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

                case 8:
                  currentPrice = context$2$0.sent;

                  // let single = await Promise.race([
                  //   require('common/globalCondition').met('SinglePrice'),
                  //   require('common/commonUtil').sleep(1000)
                  // ])
                  // if (single) {
                  //   currentPrice = single
                  // }
                  if (G.aliSite && G.dp.price) currentPrice = G.dp.price;
                  allPrice = parseFloat(dp_query.b2c.min_price) || currentPrice;

                  if (!allPrice || isNaN(allPrice)) allPrice = currentPrice;
                  currentPrice = parseFloat(currentPrice.toString().replace(',', ''));
                  allPrice = parseFloat(allPrice.toString().replace(',', ''));
                  if (dp_query.b2c.product && dp_query.b2c.product.length !== 0) {
                    (0, _commonLog2["default"])('allsite-lowpri-show');
                    _commonCnzz2["default"].log('allsite-lowpri-show');
                  }
                  if (!(G.productChecked && G.productChecked.collected)) {
                    ctx.commit('updateRemindSettings', {
                      allPrice: allPrice,
                      currentPrice: currentPrice,
                      notifySite: 1,
                      nowPrice: currentPrice
                    });
                    __webpack_require__(4).met('SinglePrice').then(function (single) {
                      ctx.commit('updateRemindSettings', {
                        currentPrice: single
                      });
                    });
                  }
                  __webpack_require__(4).setMet('PriceRemindSetted');

                case 17:
                case "end":
                  return context$2$0.stop();
              }
            }, null, this);
          },
          hover: function hover(ctx) {
            var url, cat_id, cats;
            return regeneratorRuntime.async(function hover$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  if (ctx.state.hovered) {
                    context$2$0.next = 7;
                    break;
                  }

                  if (G.userLogin) {
                    url = "https://www.gwdang.com/collect/get_qrcode/";

                    if (G.qrApi && G.qrApi !== 'default') {
                      url = G.qrApi;
                    }
                    _commonRequest2["default"].rawGet(url, true).then(function (data) {
                      ctx.commit('user/setWxQr', data.img_url, { root: true });
                    });
                    cat_id = G.dp.cat_id;

                    if (cat_id && cat_id.includes('-')) {
                      cats = cat_id.split('-');

                      if (cats.length > 3) {
                        cats.pop();
                      }
                      cat_id = cats.join(',');
                    }
                    _commonRequest2["default"].get(G.server + "/extension/ProductFilter?scene=collection&dp_ids=" + G.dp.dpId + "&one=1&cid=" + cat_id).then(function (r) {
                      if (r.data && !r.data.is_black_class) {
                        G.showMPromo = true;
                        ctx.commit('setState', {
                          showMPromo: true
                        });
                      }
                    });
                  }

                  if (!(G.userLogin && ctx.state.collected)) {
                    context$2$0.next = 6;
                    break;
                  }

                  context$2$0.next = 5;
                  return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

                case 5:
                  userCenter.detail(G.dp.dpId).then(function (r) {
                    extConsole.log('detail', r);
                    var payload = {
                      mode: r.data.notifier.mode,
                      notifySite: r.data.notifier.site,
                      settedNotifySite: r.data.notifier.site,
                      notifierMPromo: r.data.notifier.mpromo
                    };
                    if (payload.notifySite === 1) {
                      payload.currentPrice = r.data.notifier.threshold;
                    } else {
                      payload.allPrice = r.data.notifier.threshold;
                    }
                    // payload.currentPrice = r.data.notifier.threshold
                    ctx.commit('updateRemindSettings', payload);
                  });

                case 6:
                  ctx.commit('setState', {
                    hovered: true
                  });

                case 7:
                case "end":
                  return context$2$0.stop();
              }
            }, null, this);
          },
          submit: function submit(ctx, payload) {
            return regeneratorRuntime.async(function submit$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  return context$2$0.abrupt("return", userCenter.add(payload.price, payload.notifySite, payload.mode, payload.notifyMPromo, ctx.state.showMPromo ? 0 : 1).then(function (r) {
                    if (r.error_code && r.error_code === 1000) {
                      ctx.commit('user/setLogin', false, { root: true });
                    }
                    if (r.code === 100 || r.code <= 0) {
                      return new Promise(function (resolve, reject) {
                        reject(r.msg);
                      });
                    }
                    if (r.code === 1) {
                      var mode = payload.mode;
                      var site = payload.notifySite;
                      if (r.data) {
                        mode = r.data.notifier.mode;
                        site = r.data.notifier.site;
                      }
                      var payloadRes = {
                        mode: mode,
                        notifySite: site,
                        settedNotifySite: site,
                        collected: true,
                        notifierMPromo: payload.notifyMPromo ? 1 : 0
                      };
                      if (r.data) {
                        if (payloadRes.notifySite === 1) {
                          payloadRes.currentPrice = r.data.notifier.threshold;
                        } else {
                          payloadRes.allPrice = r.data.notifier.threshold;
                        }
                      } else {
                        if (payloadRes.notifySite === 1) {
                          payloadRes.currentPrice = payload.price;
                        } else {
                          payloadRes.allPrice = payload.price;
                        }
                      }
                      ctx.commit('updateRemindSettings', payloadRes);
                      return new Promise(function (resolve) {
                        resolve('提交成功');
                      });
                    }
                  }));

                case 1:
                case "end":
                  return context$2$0.stop();
              }
            }, null, this);
          }
        }
      },
      priceTrend: {
        namespaced: true,
        state: {
          money: '',
          priceRange: '',
          nowPrice: ''
        },
        mutations: {
          setState: function setState(state, payload) {
            Object.keys(payload).forEach(function (key) {
              state[key] = payload[key];
            });
          }
        }
      }
    }
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i < arr.length;i++) arr2[i] = arr[i];return arr2;}else {return Array.from(arr);}}var href=window.location.href;var host=window.location.host;var pageInfo; //检查是否在此页面出现小工具栏
module.exports.isAvailablePage = function(){if(location.hostname.includes('.gwdang.com') && location.href.includes('/jd_enhance')){return 'gwdang';}for(var pattern in sitePattern) {if(host.match(new RegExp(pattern,'i'))){return sitePattern[pattern];}}return false;}; //检查是否在此页面出现比价
module.exports.isProductPage = function(url){url = url || href;if(url.indexOf('oneplus.com/cn/store') > -1){return false;}if(G.from_device === 'bijiago' && location.href.indexOf('https://pcsitepp-fm.jd.com/') > -1){return '360buy';}for(var pattern in productPattern) {var matchs=url.match(new RegExp(pattern,'i'));if(matchs){ //if (url.match(new RegExp(pattern))) {
var site=productPattern[pattern];var _host=new URL(url).host;if(site === "amazon" && _host !== "www.amazon.cn" && matchs[1]){var m=matchs[1];if(m.indexOf('.') > -1)m = m.split('.')[1];m = 'amazon-' + m;return m;}return productPattern[pattern];}}return false;};var page404=function page404(site){var page;switch(site){default:if($('#content h2').text().indexOf('您查看的商品找不到了') > -1)page = true;break;}return page;}; //检查是否屏蔽此域名
module.exports.isInBanList = function(){if(G.dcmExt)return false;if(!G.iframe){var no_url=href.match(/[&\?]no_url/);if(!no_url && (self.location != top.location || self.frameElement && self.frameElement.tagName == "IFRAME" || window.top != window.self)){return true;}}var main_url=href;if(location.href.indexOf('?') > 0){main_url = href.substr(0,href.indexOf('?'));} // kaluli网站
if(main_url.match(/\.kaluli.com/)){return false;} //有一个carters的网站，防止被下面cart匹配到给屏蔽，提前判断如果匹配到carters就return false
if(main_url.match(/(?:cartridge|Camcorder|carters|feifei\.com\/order\/|ref=ord_cart_shr)/) != null){return false;}if(location.host.indexOf(G.extName + '.com') > -1 && !location.href.includes('jd_enhance'))return true;if(main_url.match(/detail\.zol\.com\.cn/))return false;if(main_url.match(/(?:cart|member|order|myhome|picture_index|handle-buy-box|chat|t.sina.com.cn|discussion|union.dangdang|eve.360buy|bank.vmall|checkout|confirm|gateway|trade|http:\/\/i.taobao.com|we.taobao.com|passport.yougou.com)/ig) != null){return true;}return false;};var specialHost=function specialHost(name){if(name === 'swarovski'){if(location.href.match(/Web_GB\/en/)){name = 'swarovski-en';}}return name;};var getPageInfo=function getPageInfo(){if(pageInfo)return pageInfo;var name="";if(module.exports.isInBanList()){return pageInfo = {type:0,siteName:name};}name = module.exports.isProductPage();if(name){if(typeof name !== 'string'){G.hidebar = name.hidebar;name = name.name;}G.site = name;G.logsite = name;if(name.indexOf("amazon") > -1)G.site = "amazon";if(page404(name)){return pageInfo = {type:0,siteName:name};}return pageInfo = {type:2,siteName:name};}name = module.exports.isAvailablePage();if(name){if(typeof name !== 'string'){G.hidebar = name.hidebar;name = name.name;}name = specialHost(name);G.site = name;G.logsite = name;return pageInfo = {type:1,siteName:name};}return pageInfo = {type:0,siteName:''};};var sitePattern={'\\.comix\\.com\\.cn':'comix','\\.3c2p\\.com':'3c2p','\\.nbdeli.com':'nbdeli','\\.colipu.com':'colipu','www\\.epicgames\\.com':'epic','www\\.stbchina\\.cn':'stbchina','www\\.mafengwo\\.cn':'mafengwo','www\\.kjt\\.com':'kjt','www\\.lifevc.com':'lifevc','www\\.coocaa\\.com':'coocaa','(?:www|shop)\\.nubia\\.(?:cn|com)':'nubia','www\\.kzj365\\.com':'kzj365','\\.kaola\\.com':'kaola','www\\.ymatou\\.(?:com|hk)':'ymatou','www\\.metao\\.com':'metao','shop\\.philips\\.com\\.cn':'philips','www\\.tcl\\.com':'tcl','www\\.e-changhong\\.com':'changhong','shop\\.konka\\.com':'konka','shop\\.hisense\\.com':'hisense','www\\.ineigo\\.com':'ineigo','www\\.skg\\.com':'skg','www\\.k-touch\\.cn':'k-touch','\\.gionee\\.com':'gionee','(?:www|store)\\.oppo\\.com':'oppo','gfive\\.b2c\\.eqimingxing\\.com':'gfive','shop\\.vivo\\.com\\.cn':'vivo','www\\.grainger\\.cn':'grainger','(?:mall|piao)\\.163\\.com':'wy163','t\\.dianping\\.com':'dianping','\\.nuomi\\.com':'nuomi','\\.meituan\\.com':'meituan','www\\.ebay\\.com':'ebay','yao\\.95095\\.com':{name:'taobao',hidebar:true},'\\.feiniu\\.com':'feiniu','item\\.feiniu\\.com':'feiniu','\\.feifei\\.(?:cn|com)':'feifei','\\.guang\\.com':'guang','\\.meilishuo\\.com':'meilishuo','\\.mogu(?:jie|)\\.com':'mogujie','shop\\.coolpad\\.cn':'coolpad','\\.sephora\\.cn':'sephoracps','cn\\d*\\.strawberrynet\\.com':'strawberrynet','\\.yesmywine\\.com':'yesmywine','(\\.)?yiguo\\.com':'yiguo','\\.wanggou\\.com':'wanggou','mall\\.jia\\.com':'jia','weigou\\.baidu\\.com':'baidu-weigou','\\.(xiao)?mi\\.com':'xiaomi','shop\\.letv\\.com':'lemall','\\.handu\\.com':'handu','(?:www\\.|^)taoshu\\.com':'taoshu','\\.ouku\\.com':'ouku','\\.j1\\.com':'j1','\\.zm7\\.cn':'zm7','\\.1688\\.com':{name:'1688',hidebar:true},'\\.yiwugou\\.com':'yiwugou','\\.zhiwo\\.com':'zhiwo','\\.muyingzhijia\\.com':'muyingzhijia','\\.vmall\\.com':'vmall','\\.hihonor\\.com':'hihonor','\\.didamall\\.com':'didamall','\\.xiji.com':'xiji','\\.xijie.com':'xijie','\\.miqi\\.cn':'miqi','\\.zol\\.com(?:$|/|\\?)':'zol','zol\\.com\\.cn':'zol','\\.camel\\.com\\.cn':'camel','camel.com.cn':'camel','(\\.)?homevv\\.com':'homevv','\\.paixie\\.net':'paixie','\\.tao3c\\.com':'tao3c','\\.amazon\\.cn':'amazon','\\.dangdang\\.com':'dangdang','s8\\.taobao\\.com':'s8','taobao\\.(?:com|hk)':{name:'taobao',hidebar:true},'fake\\.taobao\\.com':'taobao','\\.(?:360buy|jd|jkcsjd)\\.com':'360buy','\\.(?:360buy|jd)\\.hk':'360buy','\\.yiyaojd.com':'360buy','\\.jingdonghealth.cn':'360buy','\\i-item\\.jd\\.com':'360buy','\\.newegg(\\.com)?\\.cn':'newegg','\\.redbaby\\.com\\.cn':'redbaby','\\.51buy\\.com':'51buy','\\.yixun\\.com':'51buy','\\.okbuy\\.com':'okbuy','\\.shopee\\.tw':'shopee','\\.suning\\.com':'suning','\\.coo8\\.com':'coo8','\\.lusen\\.com':'lusen','\\.gome\\.com\\.cn':'gome','\\.gomehome\\.com':'gome','\\.gomehigo\\.hk':'gomehigo','\\.yhd\\.com':'yihaodian','\\.yihaodian\\.com':'yihaodian','\\.1mall\\.com':'yihaodian','\\.womai\\.com':'womai','\\.leyou\\.com\\.cn':'leyou','\\.shopin\\.net':'shopin','\\.no5\\.com\\.cn':'no5','\\.xiu\\.com':'xiu','\\.mbaobao\\.com':'mbaobao','\\.360kxr\\.com':'360kxr','\\.m6go\\.com':'m6go','\\.gou\\.com':'m6go','\\.smzdm\\.com':'smzdm','\\.99read\\.com':'99read','\\.china-pub\\.com':'china-pub','\\.bookschina\\.com':'bookschina','\\.efeihu\\.com':'efeihu','\\.yintai\\.com':'yintai','\\.quwan\\.com':'quwan','\\.k121\\.com':'k121','\\.happigo\\.com':'happigo','\\.gap\\.cn':'gap','\\.binggo\\.com/':'binggo','\\.yougou\\.com':'yougou','\\.jxdyf\\.com':'jxdyf','\\.winxuan\\.com':'winxuan','\\.bookuu\\.com':'bookuu','\\.jiuxian\\.com':'jiuxian','\\.vancl\\.com':'vancl','\\.111\\.com\\.cn':'111','\\.sfbest\\.(?:hk|com)':'sfbest','\\.vip(shop)?\\.com':'vipshop','\\.vipglobal\\.hk':'vipshop','\\.jumei\\.com':'jumei','jumeiglobal\\.com':'jumeiglobal','\\.lefeng\\.com':'lefeng','www\\.benlai\\.com':'benlai','(?:\\.|^)letao\\.com':'letao','\\.139shop\\.com':'139shop','(?:\\.|^)zzl365\\.com':'zzl365','\\.tiantian\\.com':'tiantian','\\.taoxie\\.com':'taoxie','\\.gjw\\.com':'gjw','www\\.d1\\.com\\.cn':'d1','\\.ihush\\.com':'ihush','www\\.s\\.cn':'s','\\.(?:moonbasa|korirl|rutisher|suorang|alaves|ing2ing|0-100s|qjherb|monteamor)\\.com':'moonbasa','\\.wangjiu\\.com':'wangjiu','\\.liebo\\.com':'liebo','\\.esprit\\.cn':'esprit','(?:\\.|^)lamiu\\.com':'lamiu','\\.aimer\\.com\\.cn':'aimer','www\\.kadang\\.com':'kadang','www\\.lizi\\.com':'lizi','www\\.metromall\\.cn':'metromall','www\\.pba\\.cn':'pba','\\.shangpin\\.com':'shangpin','\\.wbiao\\.cn':'wbiao','\\.handuyishe\\.com':'handuyishe','\\.ehaier\\.com':'ehaier','\\.secoo\\.com':'secoo','(?:vivian|linkmasa|masamaso)\\.(?:com|cn)':'masamaso','www\\.naruko\\.cn':'naruku','www\\.sportica\\.cn':'sportica','(?:\\.|^)xifuquan\\.com':'xifuquan','www\\.milier\\.com':'milier','www\\.nop\\.cn':'nop','\\.lenovo\\.com':'lenovo','shop\\.lenovo\\.com\\.cn':'lenovo','shop\\.lenovomobile\\.com':'lenovo','\\.189\\.cn':'189','\\.hicdma\\.com':'hicdma','\\.e100\\.cn':'e100','store\\.samsung\\.com':'samsung','www.apple\\.com':'apple','store.apple\\.com':'apple','\\.meizu\\.com':'meizu','\\.958shop\\.com':'958shop','\\.okhqb\\.com':'okhqb','\\.ztedevice\\.com\\.cn':'ztedevice','\\.kuaishubao\\.com':'kuaishubao','\\.lvyoumall\\.com':'lvyoumall','(?:www\\.|^)x\\.com\\.cn':'x','\\.lingshi\\.com':'lingshi','\\.ctrip\\.com':'ctrip','\\.zuipin\\.cn':'zuipin','www\\.xgbaby\\.com':'bbready','\\.yohobuy\\.com':'yohobuy','\\.lvmama\\.com':'lvmama','(?:\\.|^)qmango\\.com':'qmango','www\\.228cai\\.com':'228cai','\\.ikjtao\\.com':'ikjtao','www\\.bestkeep\\.cn':'ikjtao','\\.bagtree\\.cn':'bagtree','yichengpin\\.com':'yichengpin','zgzcw\\.com':{name:'zgzcw',hidebar:true},'www\\.mia\\.com':'miyabaobei','\\.miyabaobei.hk':'miyabaobei','\\.ule\\.com':'ule','minshengec\\.com':'minshengec','wangfujing\\.com':'wangfujing','\\.qunar\\.com':'qunar','\\.meilele\\.com':'meilele','www\\.55tuan\\.com':'55tuan','jinjianginns\\.com':'jinjianginns','\\.elong\\.com':'elong','podinns\\.com':'podinns','mangocity\\.com':'mangocity','\\.500\\.com':'500','www\\.ly\\.com':'ly','e-lining\\.com':'e-lining','\\.lining\\.com':'lining','\\.koolearn\\.com':'koolearn','\\.springtour\\.com':'springtour','\\.qinqinbaby\\.com':'qinqinbaby','winenice\\.com':'winenice','\\.sasa\\.com':'sasa','(?:\\.|^)5lux\\.com':'5lux','\\.228\\.com\\.cn':'228','\\.rrs\\.com':'rrs','\\.rrsjk.com':'rrs','(?:\\.|^)buy\\.ccb\\.com':'ccb','\\.banggo\\.com':'banggo','www\\.amazon\\.com':'amazon-com','www\\.amazon\\.co\\.jp':'amazon-jp','www\\.amazon\\.in':'amazon-in','www\\.amazon\\.fr':'amazon-fr','www\\.amazon\\.de':'amazon-de','www\\.amazon\\.it':'amazon-it','www\\.amazon\\.co.uk':'amazon-uk','www\\.amazon\\.nl':'amazon-nl','www\\.amazon\\.es':'amazon-es','www\\.amazon\\.ca':'amazon-ca','www\\.amazon\\.com\\.mx':'amazon-mx','www\\.amazon\\.com\\.br':'amazon-br','www\\.amazon\\.com\\.au':'amazon-au','store\\.logitech\\.com\\.cn':'logitech','\\.boohee\\.com':'boohee','nike\\.com':'nike','\\.jianke\\.com':'jianke','\\.360kad\\.com':'360kad','\\.lbxcn\\.com':'lbxcn','\\.meici\\.com':'meici','\\.beibei\\.com':'beibei','\\.aliexpress\.com':{name:'aliexpress',hidebar:true},'\\.6pm\\.com':'6pm','\\.gnc\\.com':'gnc','\\.myhabit\\.com':'myhabit','\\.shopbop\\.com':'shopbop','\\.drugstore\\.com':'drugstore','www\\.walgreens\\.com':'walgreens','sierratradingpost\\.com':'sierratradingpost','\\.newegg\\.com':'newegg-us','\\.jomashop\\.com':'jomashop','\\.ashford\\.com':'ashford','lookfantastic\\.com':'lookfantastic-com','lookfantastic\\.cn':'lookfantastic-cn','\\.rei\\.com':'rei','cn\\.iherb\\.com':'iherb','\\.iherb\\.com':'iherb-com','\\.carters\\.com':'carters','www\\.endclothing\\.com':'endclothing','\\.campsaver\\.com':'campsaver','global\\.rakuten\\.com':'rakuten','(?:\\.|^)100yue\\.com':'100yue','www\\.woot\\.com':'woot','www\\.haitaocheng\\.com':'haitaocheng','joesnewbalanceoutlet\\.com':'joesnewbalanceoutlet','\\.finishline\\.com':'finishline','\\.vitacost\\.com':'vitacost','\\.groupon.com':'groupon','\\.supumall\\.com':'supumall','www1\\.macys\\.com':'macys','www\\.moosejaw\\.com':'moosejaw','www\\.lemall\\.com':'lemall','www\\.jiumei\\.com':'jiumei','(?:\\.|^)chunshuitang\\.com':'chunshuitang','www\\.daling.com':'daling','www\\.oyeah\\.com':'oyeah','www\\.morefood\\.com':'morefood','www\\.yummy77\\.com':'yummy77','www\\.fruitday\\.com':'fruitday','www\\.gilt\\.com':'gilt','www\\.fengqu\\.com':'fengqu','www\\.mei\\.com':'mei','\\.vsigo\\.cn':'vsigo','www\\.keede\\.com':'keede','www\\.kede\\.com':'keede','k1\\.keede\\.cn':'keede','www\\.showjoy\\.com':'showjoy','\\.ocj\\.com\\.cn':'ocj','\\.ocj\\.kr':'ocj','\\.tmall\\.(?:com|hk)':{name:'tmall',hidebar:true},'www\\.sundan\\.com':'sundan','www\\.jiae\\.com':'jiae','(?:\\.|^)zazhipu\\.com':'zazhipu','www\\.easeeyes\\.com':'easeeyes','microsoftstore\\.com\\.cn':'microsoftstore','(?:\\.|^)xgdq\\.com':'xgdq','\\.bestcake\\.com':'bestcake','\\.lovo\\.cn':'lovo','www\\.hua\\.com':'hua','www\\.xtep\\.com\\.cn':'xtep','www\\.staples\\.cn':'staples','(?:\\.|^)efotile\\.com':'efotile','www\\.zhe800\\.com':'zhe800','www\\.aidai\\.com':'aidai','www\\.bftv\\.com':'bftv','\\.tujia\\.com':'tujia','\\.cosme\\.com':'cosme','www\\.diapers\\.com':'diapers','www\\.windeln\\.de':'windeln','www\\.babyneo\\.de':'babyneo','www\\.escentual\\.com':'escentual','www\\.thewatchery\\.com':'thewatchery','\\.biccamera.com':'biccamera','\\.tuhu.(?:cn|com)':'tuhu','eshop\\.htc\\.com':'htc','roseonly\\.com\\.cn':'roseonly','\\.rong360.com':'rong360','\\.niwodai.com':'niwodai','www\\.esteelauder.com':'esteelauder','\\.saksfifthavenue.com':'saksfifthavenue','\\.taqu.cn':'taqu','\\.qyer.com':'qyer','\\.axmall\\.com\\.au':'axmall','\\.muji.net':'muji','(?:\\.|^)gmarket.co.kr':'gmarket','english.11st.co.kr':'11st','\\.smartbargains\\.com':'smartbargains','\\.shopping\\.yahoo\\.co\\.jp':'yahooshop','\\.bloomingdales\\.com':'bloomingdales','\\.mikihouse\\.jp':'mikihouse','\\.toysrus\\.co\\.jp':'toysrus','\\.comfortfirst\\.com':'comfortfirst','\\.gymboree\\.com':'gymboree','\\.albeebaby.com':'albeebaby','\\.babymarkt.de':'babymarkt','\\.uggaustralia.co.uk':'uggaustralia','www\\.ugg\\.com':'ugg','neimanmarcus\\.com':'neimanmarcus','www\\.shoebuy.com':'shoebuy','www\\.szul\\.com':'szul','www\\.timex.com':'timex','\\.timex.com':'timex','www\\.kay.com':'kay','\\.ewatches.com':'ewatches','\\.swarovski.com':'swarovski','\\.worldofwatches.com':'worldofwatches','www.danielwellington.com':'danielwellington','\\.danielwellington\\.cn':'danielwellington-cn','\\.beautybay.com':'beautybay','\\.beauty.com':'beauty','www.beautybar.com':'beautybar','skinstore.com':'skinstore','www.laneige.com':'laneige','(?:\\.|^)bose.com':'bose','(?:\\.|^)bestbuy.com':'bestbuy','bhphotovideo.com':'bhphotovideo','(?:\\.|^)sony.jp':'sony','\\.bl\\.com':'bl','(?:\\.|^)you.163.com':'you163','(?:\\.|^)jinjiang.com':'jinjiang','(?:\\.|^)bestinfoods.com':'bestinfoods','(?:\\.|^)jinxiang.com':'jinxiang','(?:\\.|^)guojimami.com':'guojimami','(?:\\.|^)baiyangwang.com':'baiyangwang','\\.aoyou.com':'aoyou','(?:\\.|^)royyoungchemist.com.au':'royyoungchemist','(?:\\.|^)medihealshop.com':'medihealshop','(?:\\.|^)1001pharmacies.com':'1001pharmacies','(?:\\.|^)lookfantastic.cn':'lookfantastic-cn','(?:\\.|^)1\\.163\\.com':'1-163','www\\.kaixinbao.com':'kaixinbao','(?:\\.|^)booking.com':'booking','(?:\\.|^)juanpi.com':'juanpi','(?:\\.|^)pharmacyonline.com':'pharmacyonline','(?:\\.|^)bodyguardapotheke.com':'bodyguardapotheke','(?:\\.|^)purcotton.com':'purcotton','(?:\\.|^)wstx.com':'wstx','www\\.midea\\.com':'midea','www\\.midea\\.cn':'midea','mall\\.midea\\.com':'midea','\\.kaluli.com':'kaluli',"(?:\\.|^)yunhou\\.com":"yunhou","(?:\\.|^)haituncun\\.com":"haituncun","(?:\\.|^)vmei\\.com":"vmei","(?:\\.|^)jgb\\.cn":"jgb","(?:\\.|^)51din\\.com":"51din","(?:\\.|^)boqii\\.com":"boqii","cn.toursforfun\\.com":"toursforfun","(?:\\.|^)lulutrip\\.com":"lulutrip","(?:\\.|^)spider\\.com\\.cn":"spider","(?:\\.|^)walmart\\.com":"walmart","mall.to8to.com":"to8to",'www.opposhop.cn':'opposhop','baobeigezi.com':'baobeigezi','www.yao123.com':'yao123','www.menglu.com':'menglu','www.guopi.com':'guopi','www.likeface.com':'likeface','www.mallvv.com':'homevv','www.markmall.com':'markmall','www\\.baicheng\\.com':'baicheng','www\\.suanjuzi\\.com':'suanjuzi','\\.jinxiang\\.com':'jinxiang','\\.aomygod\\.com':'aomygod','(?:\\.|^)luolai\\.cn':'luolai','\\.vivo\\.com\\.cn':'vivo','\\.dixintong\\.com':'dixintong','\\.coolpad\\.com':'coolpad','\\.skg\\.com':'skg','vip\\.iqiyi\\.com':'iqiyi','\\aolaigo\\.com':'aolaigo','vip\\.missfresh\\.cn':'missfresh','\\.pushenkuajing\\.com':'pushenkuajing','cn\\.feelunique\\.com':'feelunique-cn','\\.chemistdirect\\.com\\.au':'chemistdirect','\\.netpharmacy\\.co\\.nz':'netpharmacy','\\.pharmacy4less\\.com\\.au':'pharmacy4less','\\.pharmacydirect\\.co\\.nz':'pharmacydirect','\\.amcal\\.com\\.au':'amcal','\\.laredoute\\.cn':'laredoute','cn\\.unserekleineapotheke\\.de':'unserekleineapotheke','\\.erwinmueller\\.com\\.cn':'erwinmueller','\\.kiwidiscovery\\.co\\.nz':'kiwidiscovery','\\.springlane\\.de':'springlane','\\.jako-o\\.com':'jako-o','\\.easytoys\\.cn':'easytoys','\\.tlcpharmacy\\.cn\\.com':'tlcpharmacy','\\.bienmanger\\.cn':'bienmanger','\\.dewaren\\.com':'dewaren','\\.discount-apotheke\\.de':'discount-apotheke','\\.holland-at-home\\.com':'holland-at-home','\\.youyu\\.com':'youyu','\\.kiwistarcare\\.com':'kiwistarcare','\\.lenovomobile\\.com':'lenovomobile','\\.51taouk\\.com':'51taouk','\\.kiehls\\.com':'kiehls','\\.zappos\\.com':'zappos','\\.coach\\.com':'coach','\\.yoox\\.cn':'yoox','\\.11street\\.com\\.cn':'11street','\\.ba\\.de':'ba','www\\.hqhair\\.com':'hqhair','www\\.katespade\\.co\\.uk':'katespade','cn\\.vitafy\\.de':'vitafy','www\\.yoox\\.cn':'yoox','\\.m18\\.com':'m18','comfortfirst\\.com':'comfortfirst','china\\.lotte\\.com':'lotte','\\.carrefour\\.cn':'carrefour','www\\.tea7\\.com':'tea7','\\.zhongjiu.cn':'zhongjiu','\\.puzeyf\\.com':'puzeyf','www\\.kohls\\.com':'kohls','www\\.bodybuilding\\.com':'bodybuilding','\\.nordstrom\\.com':'nordstrom','www\\.costco\\.com':'costco','www\\.target\\.com':'target','www\\.kmart\\.com':'kmart','www\\.overstock\\.com':'overstock','www\\.sears\\.com':'sears','www\\.shoprobam\\.com':'shoprobam','mall\\.goumin\\.com':'goumin','www\\.flyco\\.com':'flyco','www\\.opplestore\\.com':'opplestore','www\\.syshop\\.com':'syshop','www\\.yfdyf\\.com':'yfdyf','ssl\\.hotels\\.cn':'hotels','aihuishou\\.com':'aihuishou','www\\.thebeastshop\\.com':'thebeastshop','www\\.jomooshop\\.com':'jomooshop','www\\.septwolves\\.cn':'septwolves','\\.lianjia\\.com':{name:'lianjia',hidebar:true},'\\.maitian\\.cn':{name:'maitian',hidebar:true},'\\.5i5j\\.com':{name:'5i5j',hidebar:true},'\\.ke\\.com':{name:'ke',hidebar:true},'\\.6\\.cn':'home6','www\\.800pharm\\.com':'800pharm','www\\.ujipin\\.com':'ujipin','pc\\.mmb\\.cn':'mmb','www\\.ihaveu\\.com':'ihaveu','mall\\.ikang\\.com':'ikang','www\\.wyn88\\.com':'wyn88','www\\.mcake\\.com':'mcake','www\\.xmeise\\.com':'xmeise','www\\.lecake\\.com':'lecake','www\\.jd100\\.com':'jd100','www\\.jinghua\\.com':'jinghua','www\\.taohwu\\.com':'taohwu','www\\.zbird\\.com':'zbird','www\\.km1818\\.com':'km1818','www\\.zocai\\.com':'zocai','www\\.taoshu\\.com':'taoshu','www\\.aizhigu\\.com\\.cn':'aizhigu','www\\.tieyou\\.com':'tieyou','www\\.fieldschina\\.com':'fieldschina','www\\.wdmcake\\.cn':'wdmcake','mall\\.lqxshop\\.com':'lqxshop','www\\.usashopcn\\.com':'usashopcn','www\\.wine9\\.com':'wine9','www\\.qipaimall\\.com':'qipaimall','www\\.yododo\\.cn':'yododo','www\\.yoger\\.com\\.cn':'yoger','www\\.dapu\\.dapu':'dapu','www\\.winona\\.cn':'winona','www\\.wl\\.cn':'wl','www\\.shanmai\\.cn':'shanmai','www\\.zgshoes\\.com':'zgshoes','www\\.maichawang\\.com':'maichawang','www\\.uemall\\.com':'uemall','\\.51you\\.com':'51you','\\.beifabook\\.com':'beifabook','www\\.jpeen\\.com':'jpeen','www\\.huatuoyf\\.com':'huatuoyf','www\\.fengbuy\\.com':'fengbuy','\\.uiyi\\.com':'uiyi','www\\.hecha\\.cn':'hecha','www\\.t10\\.com':'t10','www\\.qw\\.cc':'qw','\\.miutour\\.com':'miutour','www\\.ehaoyao\\.com':'ehaoyao','www\\.idx\\.com\\.cn':'idx','www\\.uya100\\.com':'uya100','www\\.ssnewyork\\.com':'ssnewyork','www\\.clinique\\.com':'clinique','www\\.hxepawn\\.com':'hxepawn','www\\.brooksbrothers\\.com':'brooksbrothers','www\\.omtao\\.com':'omtao','www\\.ep365\\.com':'ep365','www\\.columbiasports\\.cn':'columbiasports','\\.bstapp\\.cn':'bstapp','www\\.newbalance\\.com':'newbalance','\\.wjike\\.com':'wjike','www\\.bally\\.co\\.uk':'bally','\\.1hai\\.cn':'1hai','www\\.jialich\\.cn':'jialich','\\.takeya\\.co\\.jp':'takeya','www\\.forever21\\.com':'forever21','www\\.modernavenue\\.com':'modernavenue','www\\.muniao\\.com':'muniao','\\.centanet\\.com':'centanet','www\\.zuihuiyou\\.com':'zuihuiyou','www\\.bobbibrowncosmetic\\.com':'bobbibrowncosmetics','www\\.super-in\\.com':'super-in','www\\.hangowa\\.com':'hangowa','www\\.levi\\.com':'levi','www\\.fila\\.cn':'fila','www\\.converse\\.com\\.cn':'converse','us\\.nextdirect\\.com':'nextdirect','www\\.itrip\\.com':'itrip','www\\.lashou\\.com':'lashou','www\\.liufeng\\.com':'liufeng','www\\.trt\\.hk':'trt','www1\\.wodinghua\\.com':'wodinghua','\\.wuliwuli\\.cn':'wuliwuli','www\\.forestfood\\.com':'forestfood','\\.bonjourhk\\.com':'bonjourhk','www\\.vitagou\\.hk':'vitagou','\\.kinhom\\.com':'kinhom','www\\.360lj\\.com':'360lj','v\\.changba\\.com':'changba','www\\.oakley\\.com':'oakley','www\\.jpyoo\\.com':'jpyoo','www\\.clarksusa\\.com':'clarksusa','www\\.starwoodhotels\\.com':'starwoodhotels','www\\.marriott\\.com\\.cn':'marriott-cn','www\\.yesstyle\\.com':'yesstyle','^evisu\\.com':'evisu','^lifeseasy\\.com\\.cn':'lifeseasy','www\\.ccxpet\\.com':'ccxpet','www\\.0061\\.com\\.au':'x0061','www\\.kkguan\\.com':'kkguan','www\\.style-oclock\\.com':'style-oclock','www\\.peikua\\.com':'peikua','www\\.airfrance\\.(?:us|com)':'airfrance','www\\.accorhotels\\.com':'accorhotels','www\\.spacenk\\.com':'spacenk','www\\.haichufang\\.com':'haichufang','us\\.wconcept\\.com':'wconcept','www\\.gant\\.co\\.uk':'gant','www\\.catfootwear\\.com':'catfootwear','www\\.saucony\\.com':'saucony','www\\.zaozuo\\.com':'zaozuo','\\.littleswan\\.com':'littleswan','www\\.can\\.tv':'can','www\\.ssrj\\.com':'ssrj','shop\\.guess\\.net\\.au':'guess','www\\.etihad\\.com':'etihad','store\\.fiil\\.com':'fiil','www\\.mianshui365\\.com':'mianshui365','www\\.tegoushe\\.com':'tegoushe','www\\.wiggle\\.cn':'wiggle','www\\.mdreams\\.com':'mdreams','\\.ecovacs\\.cn':'ecovacs','www\\.calvinklein\\.cn':'calvinklein','cn\\.memebox\\.com':'memebox','www3\\.hilton\\.com':'hilton','www\\.revolve\\.com':'revolve','www\\.shiseido\\.com':'shiseido','www\\.clarinsusa\\.com':'clarinsusa','store\\.starbucks\\.com':'starbucks','www\\.ray-ban\\.com':'ray-ban','us\\.puma\\.com':'puma','www\\.nautica\\.com':'nautica','www\\.cremedelamer\\.com':'cremedelamer','www\\.kipling-usa\\.com':'kipling-usa','www\\.jurlique\\.com':'jurlique','www\\.hushpuppies\\.com':'hushpuppies','www\\.origins\\.com':'origins','www\\.follifollie\\.us\\.com':'follifollie','usa\\.loccitane\\.com':'loccitane','\\.hpstore\\.cn':'hpstore','\\.01home\\.com':'01home','www\\.healthpost\\.co\\.nz':'healthpost','\\.imengxiang\\.cn':'imengxiang','www\\.hysj\\.com':'hysj','\\.saohuo7\\.com':'saohuo7','\\.repai\\.com':'repai','www\\.mayi\\.com':'mayi','\\.yinpiao\\.com':'yinpiao','\\.ihome-ins.com':'ihome-ins','\\.incake\\.net':'incake','\\.kuwo\\.cn':'kuwo','www\\.ywart\\.com':'ywart','www\\.cct\\.cn':'cct','www\\.ansgo\\.com':'ansgo','www\\.pilibaba\\.com':'pilibaba','www\\.xiaoniu88\\.com':'xiaoniu88','www\\.ahava\\.com':'ahava','\\.5-fifth\\.com':'5-fifth','\\.thewatchhut\\.co\\.uk':'thewatchhut','\\.babyhaven\\.com':'babyhaven','cn\\.cosme-de\\.com':'cosme-de','cn\\.getthelabel\\.com':'getthelabel','cn\\.matsuya\\.com':'matsuya','www\\.timberland\\.com':'timberland','\\.topman\\.com':'topman','www\\.homeaway\\.com':'homeaway','www\\.beautyexpert\\.com':'beautyexpert','\\.haimi\\.com':'haimi','www\\.mankind\\.co\\.uk':'mankind','www\\.thehut\\.com':'thehut','www\\.topshop\\.com':'topshop','mamaladen\\.com':'mamaladen','www\\.traveler-store\\.com':'traveler-store','www\\.travelzoo\\.com':'travelzoo','www\\.umishoes\\.com':'umishoes','store\\.ferrari\\.com':'ferrari','willerexpress\\.com':'willerexpress','www\\.unineed\\.com':'unineed','www\\.acnestudios\\.com':'acnestudios','www\\.aeropostale\\.com':'aeropostale','www\\.agoda\\.com':'agoda','www\\.albamoda\\.de':'albamoda','www\\.allbeauty\\.com':'allbeauty','www\\.allsaints\\.com':'allsaints','www\\.allsole\\.com':'allsole','www\\.urbanoutfitters\\.com':'urbanoutfitters','www\\.vitabiotics\\.com':'vitabiotics','www\\.bellemaison\\.jp':'bellemaison','www\\.benefitcosmetics\\.com':'benefitcosmetics','www\\.bhcosmetics\\.com':'bhcosmetics','www\\.bjmylikes\\.com':'bjmylikes','www\\.vitaminbay\\.com':'vitaminbay','www\\.waitrose\\.com':'waitrose','www\\.wolfordshop\\.co\\.uk':'wolfordshop','www\\.boohoo\\.com':'boohoo','www\\.boots\\.com':'boots','www\\.britishcornershop\\.co\\.uk':'britishcornershop','www\\.yirendai\\.com':'yirendai','www\\.ys7\\.com':'ys7','www\\.coggles\\.com':'coggles','www\\.corsetdeal\\.com':'corsetdeal','^cottonon\\.com':'cottonon','www\\.crocs\\.co\\.uk':'crocs','www\\.cruisefashion\\.com':'cruisefashion','www\\.dell\\.com':'dell','www\\.dermstore\\.com':'dermstore','www\\.disneystore\\.com':'disneystore','www\\.dorothyperkins\\.com':'dorothyperkins','www\\.doudoukang\\.com':'doudoukang','www\\.dujiake\\.com':'dujiake','www\\.dunelondon\\.com':'dunelondon','www\\.eastbay\\.com':'eastbay','www\\.eastdane\\.com':'eastdane','www\\.zaful\\.com':'zaful','www\\.zavvi\\.com':'zavvi','cn\\.feinkeit\\.de':'feinkeit','www\\.eibmarkt\\.com':'eibmarkt','www\\.belluna\\.cn':'belluna','www\\.emirates\\.com':'emirates','www\\.ems\\.com':'ems','www\\.eterna\\.de':'eterna','www\\.eurail\\.com':'eurail','www\\.exantediet\\.com':'exantediet','www\\.expedia\\.co\\.uk':'expedia','www\\.falke\\.com':'falke','www\\.famousfootwear\\.com':'famousfootwear','www\\.foreo\\.com':'foreo','www\\.wangxinlicai\\.com':'wangxinlicai','www\\.foreverunique\\.co\\.uk':'foreverunique','www\\.au\\.forzieri\\.com':'forzieri','www\\.freecountry\\.com':'freecountry','www\\.frenchconnection\\.com':'frenchconnection','www\\.gift-land\\.com':'gift-land','cn\\.growgorgeous\\.com':'growgorgeous','www\\.hotel\\.info':'hotel','www\\.houseoffraser\\.co\\.uk':'houseoffraser','www\\.huizuche\\.com':'huizuche','www\\.iwantoneofthose\\.com':'iwantoneofthose','www\\.jjglobal\\.com':'jjglobal','www\\.juicycouture\\.com':'juicycouture','www\\.kenko\\.com':'kenko','www\\.kikocosmetics\\.com':'kikocosmetics','www\\.lancerskincare\\.co\\.uk':'lancerskincare','shop\\.lego\\.com':'lego','www\\.lordandtaylor\\.com':'lordandtaylor','www\\.maizhi\\.com':'maizhi','www\\.matchesfashion\\.com':'matchesfashion','www\\.matsukiyo\\.co\\.jp':'matsukiyo','www\\.microsoft\\.com':'microsoft','cn\\.mioskincare\\.com':'mioskincare','www\\.missselfridge\\.com':'missselfridge','www\\.mountaingear\\.com':'mountaingear','www\\.mybag\\.com':'mybag','www\\.myprotein\\.com':'myprotein-com','www\\.myvitamins\\.com':'myvitamins','www\\.net-a-porter\\.com':'net-a-porter','www\\.newbalance\\.co\\.uk':'newbalance-uk','www\\.newlook\\.com':'newlook','www\\.nike\\.com\\.br':'nike-br','www\\.nike\\.com\\.hk':'nike-hk','www\\.nyandcompany\\.com':'nyandcompany','www\\.oasis-stores\\.com':'oasis-stores','www\\.orbitz\\.com':'orbitz','www\\.orchira\\.co\\.uk':'orchira','www\\.origins\\.co\\.uk':'origins-uk','www\\.petsmart\\.com':'petsmart','www\\.probikekit\\.co\\.uk':'probikekit','www\\.qatarairways\\.com':'qatarairways','www\\.radley\\.co\\.uk':'radley','www\\.ralphlauren\\.cn':'ralphlauren','www\\.rebeccaminkoff\\.com':'rebeccaminkoff','www\\.rentalcars\\.com':'rentalcars','www\\.ricaud\\.com':'ricaud','www\\.rockport\\.com':'rockport','www\\.ruelala\\.com':'ruelala','www\\.saksoff5th\\.com':'saksoff5th','www\\.sc24\\.com':'sc24','www\\.shoes\\.com':'shoes','www\\.shopspring\\.com':'shopspring','www\\.simplysupplements\\.co\\.uk':'simplysupplements','www\\.ssense\\.com':'ssense','www\\.stevemadden\\.com':'stevemadden','www\\.taodo\\.com':'taodo','www\\.michaelkors\\.cn':'michaelkors','www\\.ttcj\\.tv':'ttcj','www\\.uf-club\\.com':'uf-club','www\\.zhaidou\\.com':'zhaidou','www\\.163yun\\.com':'163yun','cn\\.apo\\.com':'apo','loan-m\\.jimu\\.com':'jimu','www\\.hao24\\.com':'hao24','m\\.seagoor\\.com':'seagoor','www\\.wannar\\.com':'wannar','www\\.caihang\\.com':'caihang','www\\.csmall\\.com':'csmall','www\\.kuajing\\.com':'kuajing','www\\.millenniumhotels\\.com':'millenniumhotels','www\\.reebonz\\.cn':'reebonz','cn\\.wemakeprice\\.com':'wemakeprice','www\\.wzhouhui\\.com':'wzhouhui','www\\.huijiayou\\.cn':'huijiayou','www\\.melimelo\\.cn':'melimelo','www\\.91xcm\\.com':'91xcm','zh\\.ashford\\.com':'ashford-zh','cjonmart\\.cn':'cjonmart','www\\.cnyto\\.me':'cnyto','www\\.granddfs\\.com':'granddfs','www\\.officedepot\\.com':'officedepot','www\\.tianhong\\.cn':'tianhong','www\\.yilingshop\\.com':'yilingshop','www\\.klook\\.com':'klook','m\\.ddky\\.com':'ddky','www\\.chinaacc\\.com':'chinaacc','www\\.bmai\\.com':'bmai','m\\.inke\\.cn':'inke','www\\.junrongdai\\.com':'junrongdai','www\\.napai\\.cn':'napai','mall\\.gree\\.com':'gree','sales\\.allianz\\.com':'allianz','v\\.youmi\\.cn':'youmi','www\\.21cake\\.com':'21cake','www\\.56ren\\.com':'56ren','www\\.anantara\\.com':'anantara','www\\.chesudi\\.com':'chesudi','www\\.ehmall\\.com':'ehmall','www\\.farfetch\\.cn':'farfetch','www\\.freepeople\\.com':'freepeople','www\\.gaosouyi\\.com':'gaosouyi','www\\.charm-color\\.':'charm-color','www\\.felissimo\\.co\\.jp':'felissimo','www\\.surfstitch\\.com':'surfstitch','www\\.lornajane\\.sg':'lornajane','www\\.reiss\\.com':'reiss','www\\.gzl\\.com\\.cn':'gzl','www\\.9drug\\.com':'9drug','www\\.yungoubs\\.com':'yungoubs','www\\.yencity\\.com':'yencity','class\\.hujiang\\.com':'hujiang','iphx\\.meituan\\.com':'meituan-iphx','www\\.svgouwu\\.com':'svgouwu','linktech\\.hqwx\\.com':'hqwx','\\.hysjg\\.com':'hysjg','\\.maimaicn\\.com':'maimaicn','\\.tyfo\\.com':'tyfo','www\\.tthigo\\.com':'tthigo','www\\.mayn\\.com\\.cn':'mayn','\\.harrods\\.com':'harrods','\\.theundone\\.com':'theundone','www\\.imomoko\\.com':'imomoko','www\\.perfumesclub\\.cn':'perfumesclub','www\\.godaddy\\.com':'godaddy','www\\.mytheresa\\.com':'mytheresa','www\\.backcountry\\.com':'backcountry','www\\.marriott\\.com':'marriott','www\\.mrporter\\.com':'mrporter','www\\.priceline\\.com':'priceline','english\\.ctrip\\.com':'ctrip-en','cn\\.monnierfreres\\.com':'monnierfreres','www\\.myprotein\\.cn':'myprotein','www\\.toryburch\\.com':'toryburch-com','www\\.italist\\.com':'italist','www\\.askderm\\.com':'askderm','www\\.tatcha\\.com':'tatcha','www\\.hollandandbarrett\\.com':'hollandandbarrett','www\\.ninewest\\.com':'ninewest','www\\.bergdorfgoodman\\.com':'bergdorfgoodman','www\\.ihg\\.com':'ihg','www\\.footlocker\\.com':'footlocker','www\\.rodial\\.co':'rodial','www\\.feelunique\\.com':'feelunique','www\\.jackwills\\.com':'jackwills','www\\.kidsroom\\.de':'kidsroom','cn\\.dod\\.nl':'dod','www\\.karenmillen\\.com':'karenmillen','cn\\.illicopharma\\.com':'illicopharma','www\\.tedbaker\\.com':'tedbaker','www\\.b-glowing\\.com':'b-glowing','www\\.adiexpress\\.com':'adiexpress','www\\.fragrancex\\.com':'fragrancex','www\\.peterthomasroth\\.com':'peterthomasroth','www\\.gap\\.com':'gap-com','www\\.cecile\\.co':'cecile','www\\.barneys\\.com':'barneys','www\\.debuycn\\.com':'debuycn','www\\.smashbox\\.com':'smashbox','www\\.lastcall\\.com':'lastcall','www\\.superdrug\\.com':'superdrug','www\\.libertylondon\\.com':'libertylondon','www\\.chemistdirect\\.co\\.uk':'chemistdirect-uk','www\\.skincarerx\\.com':'skincarerx','www\\.haba\\.co':'haba','shop\\.panasonic\\.com':'panasonic','www\\.beautifiedyou\\.com':'beautifiedyou','store\\.nba\\.com':'nba','www\\.elfcosmetics\\.com':'elfcosmetics','www\\.uniqlo\\.com':'uniqlo','www\\.uniqlo\\.cn':'uniqlo','www\\.colehaan\\.com':'colehaan','www\\.carters\\.com':'carters','www\\.sportsdirect\\.com':'sportsdirect','www\\.adorama\\.com':'adorama','www\\.ae\\.com':'ae','us\\.amorepacific\\.com':'amorepacific','www\\.anntaylor\\.com':'anntaylor','clearance\\.asics\\.com':'asics','www\\.asos\\.com':'asos','www\\.aveneusa\\.com':'aveneusa','www\\.barneyswarehouse\\.com':'barneyswarehouse','bensherman\\.com':'bensherman','www\\.blissworld\\.com':'blissworld','www\\.blueandcream\\.com':'blueandcream','www\\.bonds\\.com':'bonds','www\\.cookieskids\\.com':'cookieskids','www\\.cosmeland\\.jp':'cosmeland','www\\.crabtree-evelyn\\.com':'crabtree-evelyn','www\\.crocs\\.ca':'crocs-ca','www\\.darphin\\.com':'darphin','www\\.davidscookies\\.com':'davidscookies','www\\.dickiesstore\\.co':'dickiesstore','us\\.dockers\\.com':'dockers','www\\.easyspirit\\.com':'easyspirit','www\\.ebags\\.com':'ebags','www\\.echemist\\.co':'echemist','www\\.eddiebauer\\.com':'eddiebauer','www\\.elemis\\.com':'elemis','www\\.elizabetharden\\.co':'elizabetharden','www\\.ena\\.travel':'ena','www\\.evitamins\\.com':'evitamins','www\\.fashionesta\\.com':'fashionesta','www\\.figleaves\\.com':'figleaves','www\\.folica\\.com':'folica','www\\.fragrancenet\\.com':'fragrancenet','www\\.glamglow\\.co\\.uk':'glamglow-uk','www\\.godivachocolates\\.co':'godivachocolates','www\\.goldsmiths\\.co':'goldsmiths','www\\.growgorgeous\\.co\\.uk':'growgorgeous-uk','www\\.happysocks\\.com':'happysocks','www\\.harveynichols\\.com':'harveynichols','www\\.hatley\\.com':'hatley','www\\.herbspro\\.com':'herbspro','www\\.houseofholland\\.co':'houseofholland','www\\.jayjays\\.com':'jayjays','www\\.jetairways\\.com':'jetairways','www\\.journeys\\.com':'journeys','www\\.karmaloop\\.com':'karmaloop','www\\.keds\\.com':'keds','www\\.labseries\\.co':'labseries','leejeans\\.com':'leejeans','livingsocial\\.com':'livingsocial','www\\.wkzuche\\.com':'wkzuche','www\\.uzise\\.com':'uzise','m\\.laiyifen\\.com':'laiyifen','www\\.avast\\.com':'avast','usa\\.kaspersky\\.com':'kaspersky','www\\.steepandcheap\\.com':'steepandcheap','www\\.glamglow\\.com':'glamglow-com','www\\.cledepeaubeaute\\.com':'cledepeaubeaute','www\\.kicksusa\\.com':'kicksusa','www\\.lacoste\\.com':'lacoste','.*\\.bilibili\\.com':'bilibili','www\\.perriconemd\\.com':'perriconemd','www\\.gemvara\\.com':'gemvara','www\\.bluenile\\.com':'bluenile','www\\.modaoperandi\\.com':'modaoperandi','www\\.parrot\\.com':'parrot','cn\\.fashionbunker\\.com':'fashionbunker','www\\.final-score\\.com':'final-score','www\\.dkny\\.com':'dkny','shop\\.mango\\.com':'mango','www\\.charlottetilbury\\.com':'charlottetilbury','www\\.vmware\\.com':'vmware','www\\.avira\\.com':'avira','www\\.jewelry\\.com':'jewelry','www\\.eset\\.com':'eset','buy\\.norton\\.com':'norton','www\\.jimmyjazz\\.com':'jimmyjazz','www\\.roxy\\.com':'roxy','www\\.nastygal\\.com':'nastygal','www\\.marcjacobs\\.com':'marcjacobs','(?:^|www\\.)beastsmode\\.cn':'beastsmode','www\\.theapollobox\\.com':'theapollobox','www\\.yamibuy\\.com':'yamibuy','www\\.hbx\\.com':'hbx','www\\.horchow\\.com':'horchow','www\\.bluefly\\.com':'bluefly','www\\.swansonvitamins\\.com':'swansonvitamins','www\\.jcrew\\.com':'jcrew','www\\.bebe\\.com':'bebe','www\\.mucfc\\.com':'mucfc','www\\.only\\.cn':'only','www\\.veromoda\\.com':'veromoda','www\\.jackjones\\.com':'jackjones','www\\.selected\\.com':'selected','www\\.hanes\\.com':'hanes','www\\.algenist\\.com':'algenist','(?:^|www\\.)factory\\.jcrew\\.com':'jcrew-factory','www\\.lolewomen\\.com':'lolewomen','www\\.underarmour\\.com':'underarmour-com','www\\.theory\\.com':'theory','www\\.intimina\\.com':'intimina','www\\.nydj\\.com':'nydj','www\\.jny\\.com':'jny','bonobos\\.com':'bonobos','www\\.alphaindustries\\.com':'alphaindustries','venuekings\\.com':'venuekings','(?:^|www\\.)goop\\.com':'goop','www\\.silkyscents\\.com':'silkyscents','www\\.shopsky\\.com':'shopsky','www\\.vitaminworld\\.com':'vitaminworld','www\\.bumbleandbumble\\.com':'bumbleandbumble','mattandnat\\.com':'mattandnat','www\\.ladyfootlocker\\.com':'ladyfootlocker','www\\.aliceandolivia\\.com':'aliceandolivia','www\\.lancome-usa\\.com':'lancome-usa','www\\.sk-ii\\.com':'sk-ii','www\\.beautifulhalo\\.com':'beautifulhalo','www\\.footaction\\.com':'footaction','www\\.vitaminshoppe\\.com':'vitaminshoppe','www\\.reebok\\.com':'reebok','(?:^|www\\.)jet\\.com':'jet','www\\.burtsbeesbaby\\.com':'burtsbeesbaby','www\\.yoins\\.com':'yoins','www\\.skechers\\.com':'skechers','www\\.toofaced\\.com':'toofaced','elevtd\\.shoebuy\\.com':'shoebuy-elevtd','www\\.katvondbeauty\\.com':'katvondbeauty','www\\.mountainsteals\\.com':'mountainsteals','www\\.tours4fun\\.com':'tours4fun','www\\.jewelryaffairs\\.com':'jewelryaffairs','www\\.perfume\\.com':'perfume','www\\.tgw\\.com':'tgw','www\\.prescriptives\\.com':'prescriptives','www\\.perryellis\\.com':'perryellis','www\\.originalpenguin\\.com':'originalpenguin','www\\.naturalizer\\.com':'naturalizer','www\\.luisaviaroma\\.com':'luisaviaroma','www\\.giorgioarmanibeauty-usa\\.com':'giorgioarmanibeauty-usa','us\\.caudalie\\.com':'caudalie','www\\.murad\\.com':'murad','www\\.betseyjohnson\\.com':'betseyjohnson','www\\.thebodyshop\\.com':'thebodyshop','hampdenclothing\\.com':'hampdenclothing','www\\.anthropologie\\.com':'anthropologie','www\\.armani\\.com':'armani','us\\.shop\\.ecco\\.com':'ecco-us','www\\.loft\\.com':'loft','www\\.shuuemura-usa\\.com':'shuuemura-usa','www\\.therealreal\\.com':'therealreal','www\\.c21stores\\.com':'c21stores','www\\.ctshirts\\.com':'ctshirts','www\\.superjeweler\\.com':'superjeweler','us\\.jimmychoo\\.com':'jimmychoo','www\\.fwrd\\.com':'fwrd','www\\.aveda\\.com':'aveda','na-kd\\.com':'na-kd','www\\.nancymeyer\\.com':'nancymeyer','www\\.baublebar\\.com':'baublebar','us\\.elevenparis\\.com':'elevenparis','www\\.lindtusa\\.com':'lindtusa','www\\.narscosmetics\\.com':'narscosmetics','www\\.jackrabbit\\.com':'jackrabbit','www\\.macmall\\.com':'macmall','www\\.champssports\\.com':'champssports','store\\.dji\\.com':'dji','www\\.bodenusa\\.com':'bodenusa','www\\.crazy8\\.com':'crazy8','www\\.moltonbrown\\.com':'moltonbrown','needsupply\\.com':'needsupply','www\\.solesociety\\.com':'solesociety','www\\.childrensplace\\.com':'childrensplace','www\\.sigmabeauty\\.com':'sigmabeauty','www\\.adidas\\.com':'adidas-us','www\\.veronicabeard\\.com':'veronicabeard','www\\.cross\\.com':'cross','www\\.monsterproducts\\.com':'monsterproducts','www\\.theoutnet\\.com':'theoutnet','www\\.clarisonic\\.com':'clarisonic','www\\.dermadoctor\\.com':'dermadoctor','www\\.solsticesunglasses\\.com':'solsticesunglasses','www\\.pixiemarket\\.com':'pixiemarket','vip\\.yunifang\\.com':'yunifang','api\\.globalwinner\\.cn':'globalwinner','www\\.biotherm-usa\\.com':'biotherm-usa','www\\.jomalone\\.com':'jomalone','www\\.yvesrocherusa\\.com':'yvesrocherusa','www\\.mountainhardwear\\.com':'mountainhardwear','www\\.boscovs\\.com':'boscovs','www\\.putmeinthestory\\.com':'putmeinthestory','www\\.petit-bateau\\.us':'petit-bateau','www\\.striderite\\.com':'striderite','www\\.bcbg\\.com':'bcbg','www\\.marissacollections\\.com':'marissacollections','www\\.chineselaundry\\.com':'chineselaundry','www\\.ylang23\\.com':'ylang23','www\\.thewalkingcompany\\.com':'thewalkingcompany','www\\.perfumania\\.com':'perfumania','www\\.philosophy\\.com':'philosophy','www\\.underarmour\\.cn':'underarmour','www\\.bestgymequipment\\.co':'bestgymequipment','thesportsedit\\.com':'thesportsedit','www\\.treds\\.co':'treds','www\\.selfridges\\.com':'selfridges','www\\.toryburch\\.co\\.uk':'toryburch-uk','zh\\.virginatlantic\\.com':'virginatlantic','www.\\chowsangsang\\.com':'chowsangsang','www.speedo.com.cn':'speedo', // '\\.steampowered\\.com': 'steampowered',
'\\.pinduoduo\\.com':'pinduoduo','\\.yangkeduo\\.com':'yangkeduo','\\.rakuten\\.co\\.jp':'rakuten','\\.computeruniverse\\.net':'computeruniverse','\\.prodirectsoccer\\.com':'prodirectsoccer','\\.prodirectrunning\\.com':'prodirectrunning','\\.dbox\\.co\\.nz':'dbox','\\.motorola\\.com\\.cn':'motorola','\\.haiershui\\.com':'haiershui','\\.wandougongzhu\\.cn':'wandougongzhu','www\\.xiaomiyoupin\\.com':'youpin-mi','bananarepublic\\.gap\\.com':'bananarepublic-gap','\\.decathlon\\.com\\.cn':'decathlon','\\.oneplus\\.com':'oneplus','\\.heytap\\.com':'heytap','\\.momoshop\\.com\\.tw':'momoshop','\\.rakuten\\.com\\.tw':'rakuten','\\.books\\.com\\.tw':'books','\\.pchome\\.com\\.tw':'pchometw','\\.tw\\.buy\\.yahoo\\.com':'twbuyyahoo','\\.rakuten\\.com\\.tw':'rakuten'};var productPattern={'dest/test\\.html':'test','\\.books\\.com\\.tw/products/':'books','24h\\.pchome\\.com\\.tw/prod/.*':'pchometw','tw\\.buy\\.yahoo\\.com/gdsale/.*\\.html':'twbuyyahoo','tw\\.bid\\.yahoo\\.com/item/':'twbuyyahoo','tw\\.buy\\.yahoo\\.com/gdsale/gdsale\\.asp':'twbuyyahoo','https://www\\.rakuten\\.com\\.tw/shop/.*/product/.*':'rakuten','^(?:http|https)://www\\.epicgames\\.com/store\\/[\\w\\W]+':'epic','^(?:http|https)://www\\.stbchina\\.cn/item.html#\\?itemId=\\d+':'heytap','^(?:http|https)://www\\.heytap\\.com/products\\/\\d+\\.html':'heytap','^(?:http|https)://shopee\\.tw/.*\\.\\d+\\.\\d+':'shopee','^(?:http|https)://shopee\\.tw/product\\/\\d+\\/\\d+':'shopee','https://www\\.momoshop\\.com\\.tw/goods/GoodsDetail.jsp':'momoshop','^(?:http|https)://traveldetail\\.fliggy\\.com/item.htm':'fliggy','^(?:http|https)://www\\.wzhouhui\\.com/product[\\d\\-\\/]+.html':'wzhouhui','^(?:http|https)://cn\\.wemakeprice\\.com/[\\d\\-\\/]+':'wemakeprice','^(?:http|https)://cn\\.dod\\.nl/product/\\d+\\.html':'dod','^(?:http|https)://www\\.decathlon\\.com\\.cn/zh/p/':'decathlon','^(?:http|https)://cn\\.apo\\.com/product/detail/\\d+':'apo','^(?:http|https)://www\\.ansgo\\.com/product-\\d+\\.html':'ansgo','^(?:http|https)://www\\.perfumesclub\\.cn/product/\\d+\\.html':'perfumesclub','^(?:http|https)://www\\.net-a-porter\\.com/cn/[a-z]{2}/product/[\\w\\W]+':'net-a-porter','^(?:http|https)://www\\.kidsroom\\.cn/zh/[\\w\\W]+':'kidsroom','^(?:http|https)://cn\\.getthelabel\\.com/product/\\d+\\.html':'getthelabel','^(?:http|https)://www\\.farfetch\\.cn/cn/shopping/[\\w\\W]+\\.aspx':'farfetch','^(?:http|https)://item\\.kongfz\\.com/book/\\d+\\.html':'kongfz','^(?:http|https)://book\\.kongfz\\.com/\\d+/\\d+/':'kongfz','^(?:http|https)://cn\\.iherb\\.com/pr/[a-z0-9A-Z-]+/\\d+':'iherb','^(?:http|https)://www\\.hqhair\\.com/[a-z0-9-]+/\\d+\\.html':'hqhair','^(?:http|https)://www\\.wl\\.cn/\\d+':'wl','^(?:http|https)://www\\.columbia\\.com/[a-z0-9A-Z-]+\\.html\\?cgid=':'columbia','^(?:http|https)://www\\.columbiasports\\.cn/product-\\d+\\.html':'columbiasports','^(?:http|https)://www\\.ehaoyao\\.com/product-\\d+\\.html':'ehaoyao','^(?:http|https)://www\\.bhphotovideo\\.com/c/product/\\d+':'bhphotovideo','^(?:http|https)://www\\.shoes\\.com/[a-z0-9-]+/\\d+/\\d+':'shoes','^(?:http|https)://www\\.jomashop\\.com/[a-z0-9-]+\\.html':'jomashop','^(?:http|https)://cn\\.pharmacydirect\\.co\\.nz/\\d+\\.html':'pharmacydirect','^(?:http|https)://cn\\.pharmacydirect\\.co\\.nz/product/\\d+\\.html':'pharmacydirect','^(?:http|https)://www\\.holland-at-home\\.com/cn/(\\w+/){1,5}\\w+\\.html':'holland-at-home','^(?:http|https)://cn\\.holland-at-home\\.com/product/\\d+.html':'holland-at-home','^(?:http|https)://www\\.rei\\.com/product/\\d+':'rei','^(?:http|https)://item\\.aomygod\\.com/\\d+\\.html':'aomygod','^(?:http|https)://www\\.huatuoyf\\.com/product/\\d+\\.htm':'huatuoyf','^(?:http|https)://www\\.forever21\\.com/uk/shop/catalog/product':'forever21','^(?:http|https)://zh\\.ashford\\.com/([a-z0-9-]+/){1,6}[a-zA-Z0-9]+\\.pid':'ashford-zh','^(?:http|https)://www\\.bestbuy\\.com/[a-z]+/[a-z0-9-]+/\\d+\\.p\\?skuId=\\d+':'bestbuy','^(?:http|https)://www\\.target\\.com/p/[a-z0-0-]+':'target','^(?:http|https)://cn\\.chemistdirect\\.com\\.au/\\d+\\.html':'chemistdirect','^(?:http|https)://cn\\.chemistdirect\\.com\\.au/product/\\d+\\.html':'chemistdirect','^(?:http|https)://www\\.ba\\.de/product/\\d+\\.html':'ba','^(?:http|https)://m\\.wandougongzhu\\.cn/product/\\d+\\.html':'wandougongzhu','^(?:http|https)://cn\\.feelunique\\.com/\\d+\\.html':'feelunique','^(?:http|https)://cn\\.feelunique\\.com/product/\\d+\\.html':'feelunique','^(?:http|https)://shop\\.dixintong\\.com/products-[0-9-]+\\.html':'dixintong','^(?:http|https)://cn\\.pharmacyonline\\.com\\.au/\\d+\\.html':'pharmacyonline','^(?:http|https)://cn\\.pharmacyonline\\.com\\.au/product/\\d+\\.html':'pharmacyonline','^(?:http|https)://cn\\.discount-apotheke\\.de/\\d+\\.html':'discount-apotheke','^(?:http|https)://cn\\.discount-apotheke\\.de/product/\\d+\\.html':'discount-apotheke','^(?:http|https)://www\\.carters\\.com/[a-z0-9-]+/[A-Z]_\\d+\\.html\\?':'carters','^(?:http|https)://www\\.katespade\\.co\\.uk/[a-z-]+/([a-z0-9-]+/){1,3}[A-Za-z0-9]+\\.html':'katespade','^(?:http|https)://www\\.katespade\\.cn/[\\W\\w]+':'katespade','^(?:http|https)://www\\.beautybay\\.com/p/\\w+':'beautybay','^(?:http|https)://cn\\.pharmacy4less\\.com\\.au/\\d+\\.html':'pharmacy4less','^(?:http|https)://www\\.newegg\\.com/Product/Product\\.aspx':'newegg-us','^(?:http|https)://www\\.newbalance\\.com/pd/\\w+':'newbalance','^(?:http|https)://www\\.bodybuilding\\.com/store/[a-z0-9-]+/[a-z0-9-]+\\.html\\?skuId=':'bodybuilding','^(?:http|https)://www\\.ssnewyork\\.com/good/detail/\\d+':'ssnewyork','^(?:http|https)://www\\.wine9\\.com/\\d+\\.html':'wine9','^(?:http|https)://www\\.kohls\\.com/product/prd-\\d+':'kohls','^(?:http|https)://www\\.gnc\\.com/[a-z0-9-]+/\\d+\\.html\\?cgid=':'gnc','^(?:http|https)://www\\.qw\\.cc/goods-\\d+\\.html':'qw','^(?:http|https)://www\\.haiershui\\.com/product/\\d+\\.html':'haiershui','^(?:http|https)://www\\.ugg\\.com/[a-z0-9-]+/[a-z0-9-]+/\\d+\\.html':'ugg','^(?:http|https)://www\\.ugg\\.cn/product-\\d+\\.html':'ugg','^(?:http|https)://www\\.yoger\\.com\\.cn/product/\\d+\\.html':'yoger','^(?:http|https)://www\\.flyco\\.com/goods-[a-zA-Z0-9-_]+\\.html':'flyco','^(?:http|https)://www\\.yfdyf\\.com/product-\\d+\\.html':'yfdyf','^(?:http|https)://www\\.joesnewbalanceoutlet\\.com/product/':'joesnewbalanceoutlet','^(?:http|https)://www\\.jomoo\\.com\\.cn/item/[a-z0-9-]+\\.htm':'jomooshop','^(?:http|https)://www\\.dapu\\.com/product-\\d+\\.html':'dapu','^(?:http|https)://china\\.coach\\.com/product/\\d+':'coach','^(?:http|https)://china\\.coach\\.com/[a-z\\-]+/\\d+_\\w+':'coach','^(?:http|https)://www\\.shanmai\\.cn/product-\\d+\\.html':'shanmai','^(?:http|https)://www\\.fengbuy\\.com/[a-z0-9-]+\\.html':'fengbuy','^(?:http|https)://www\\.t10\\.com/\\w+-\\d+/':'t10','^(?:http|https)://cn\\.amcal\\.com\\.au/\\d+\\.html':'amcal','^(?:http|https)://cn\\.amcal\\.com\\.au/product/\\d+\\.html':'amcal','^(?:http|https)://cn\\.babyhaven\\.com/product/\\d+\\.html':'babyhaven','^(?:http|https)://www\\.51taouk\\.com/[A-Z0-9]+$':'51taouk',"^(?:http|https)://(?:www|shop)\\.usashopcn\\.com/goods\\.php\\?id=\\d+":"usashopcn","^(?:http|https)://www\\.petit-bateau\\.us/[a-z0-9-]+/d/[0-9A-Z]+\\?CategoryId":"petit-bateau","^(?:http|https)://www\\.tlcpharmacy\\.cn\\.com/\\d+\\.html":"bienmanger","^(?:http|https)://www\\.km1818\\.com/products/\\d+\\.html":"km1818","^(?:http|https)://www\\.bienmanger\\.cn/\\d+\\.html":"bienmanger","^(?:http|https)://www\\.syshop\\.com/goods/gooddetail/\\d+\\.html":"syshop","^(?:http|https)://www\\.qipaimall\\.com/goods/\\?goods_sn=":"qipaimall","^(?:http|https)://mall\\.goumin\\.com/mall/view/\\d+":"goumin","^(?:http|https)://www\\.taohwu\\.com/goods-\\d+\\.html":"taohwu","^(?:http|https)://www\\.xmeise\\.com/goods-\\d+\\.html":"xmeise","^(?:http|https)://www\\.septwolves\\.cn/ishop/web/theme/default/Ishop_pc/dist/#/goods_details\\?goods_id=\\d+":"septwolves","^(?:http|https)://www\\.kiehls\\.com/[a-z]+/[a-z0-9-]+/[a-z0-9-]+/\\d+\\.html":"kiehls","^(?:http|https)://www\\.puzeyf\\.com/detail/\\d+\\.html":"puzeyf","^(?:http|https)://www\\.aizhigu\\.com\\.cn/product\\.\\d+\\.html":"aizhigu","^(?:http|https)://www\\.hecha\\.cn/sgoods-\\d+\\.html":"hecha","^(?:http|https)://www\\.zgshoes\\.com/goods-\\d+\\.html":"zgshoes","^(?:http|https)://cn\\.takeya\\.co\\.jp/\\d+\\.html/":"takeya","^(?:http|https)://cn\\.takeya\\.co\\.jp/product/\\d+\\.html":"takeya","^(?:http|https)://www\\.shoprobam\\.com/Home/Products/detail/gid/\\d+":"shoprobam","^(?:http|https)://www\\.opplestore\\.com/item\\.html\\?itemId=\\d+":"opplestore","^(?:http|https)://www\\.maichawang\\.com/goods-\\d+\\.html":"maichawang","^(?:http|https)://www\\.bose\\.com/en_us/products/":"bose","^(?:http|https)://dewaren\\.com/cn/[a-zA-Z0-9]+/[a-zA-Z0-9-]+/\\w+/[0-9]+\\.html":"dewaren","^(?:http|https)://dewaren\\.com/cn/[a-zA-Z0-9-]+/\\w+[0-9\\-]+\\.html":"dewaren","^(?:http|https)://www\\.winona\\.cn/product/[0-9]+\\.html":"winona","^(?:http|https)://www\\.motorola\\.com\\.cn/store/[0-9_]+\\.html":"motorola","^(?:http|https)://www\\.motorola\\.com\\.cn/[a-z0-9]+/[a-z0-9]+/index\\.html":"motorola","^(?:http|https)://www\\.danielwellington\\.cn/[a-z0-9-]+[^\\/]$":"danielwellington-cn","^(?:http|https)://www\\.danielwellington\\.com/us/[a-z0-9-]+[^\\/]$":"danielwellington","^(?:http|https)://www\\.danielwellington\\.com/global/[a-z0-9-]+[^\\/]$":"danielwellington",'^(?:http|https)://youhui\\.pinduoduo\\.com/goods/goods-detail\\?goodsId=\\d+':'pinduoduo', // "^(?:http|https)://www.iherb.com/pr/[a-z0-9A-Z-]+/\\d+": "iherb",
"^(?:http|https)://(?:mobile\\.|)yangkeduo.com/goods(?:2|1)?\\.html\\?":"yangkeduo","^(?:http|https)://www.finishline.com/store/product/":"finishline","^(?:http|https)://www.skinstore.com/[a-z0-9A-Z-]+/\\d+\\.html":"skinstore","^(?:http|https)://item.wjike.com/\\d+\\.html":"wjike","^(?:http|https)://youpin.mi.com/detail\\?gid=\\d+":"youpin-mi","^(?:http|https)://www\\.xiaomiyoupin\\.com/detail\\?gid=\\d+":"youpin-mi","^(?:http|https)://store\\.steampowered\\.com/app/\\d+":"steampowered","^(?:http|https)://store\\.steampowered\\.com/sub/\\d+":"steampowered","^(?:http|https)://www.forever21.com/UK/Product/Product\\.aspx":"forever21","^(?:http|https)://www.jialich.cn/goods\\.php\\?id=\\d+":"jialich","^(?:http|https)://www.tthigo.com/product/\\w+":"tthigo","^(?:http|https)://www\\.modernavenue\\.com/product-\\d+\\.html":"modernavenue","^(?:http|https)://www\\.tcl\\.com/\\w+/\\w+":"tcl","^(?:http|https)://www\\.bonjourhk\\.com/\\d+":"bonjourhk","^(?:http|https)://m\\.bonjourhk\\.com/[a-z]+/\\d+":"bonjourhk","(?:http:|https:)//www\\.trt\\.hk/page/products/\\d+\\.html":"trt","^(?:http|https)://www\\.forestfood\\.com/goods\\.php\\?id=\\d+":"forestfood","(?:http:|https:)//www\\.converse\\.com\\.cn/[a-z-_]+/\\d+/item":"converse","(?:http:|https:)//www\\.converse\\.com\\.cn/[a-z0-9-_]+/\\w+/item\\.htm":"converse","^(?:http|https)://www\\.fila\\.cn/item-index-[a-z0-9]+\\.html":"fila","^(?:http|https)://www\\.fila\\.cn/fila-[A-Za-z0-9]+\\.html":"fila","(?:http:|https:)//www\\.levi\\.com\\.cn/(?:men|women)/[a-z-]+/[0-9-]+/item":"levi","(?:http:|https:)//www\\.levi\\.com/[A-Z]+/[a-zA-Z_]+/[a-z]+/[a-z0-9-]+/p/\\d+":"levi","^(?:http|https)://www\\.hangowa\\.com/item-\\d+\\.html":"hangowa","^(?:http|https)://www\\.super-in\\.com/product/\\d+\\.html":"super-in","^(?:http|https)://www\\.ccxpet\\.com/Product/Detail":"ccxpet","^(?:http|https)://www\\.360lj\\.com/product/\\d+\\.html":"360lj","^(?:http|https)://www\\.hysjg\\.com/goods\\.php\\?id=\\d+":"hysjg","^(?:http|https)://www\\.0061\\.com\\.au/product/content/\\d+":"x0061","^(?:http|https)://mall\\.ecovacs\\.cn/product-\\d+\\.html":"ecovacs","^(?:http|https)://mall\\.littleswan\\.com/detail/index(?:/sale|)\\?itemid":"littleswan","^(?:http|https)://www\\.vitagou\\.hk/products/id/\\d+":"vitagou","^(?:http|https)://www\\.vitagou\\.hk/product-\\d+\\.html":"vitagou","^(?:http|https)://www\\.vitagou\\.hk/detail-\\d+\\.html":"vitagou","^(?:http|https)://www\\.hpstore\\.cn/accessary/\\w+":"hpstore","^(?:http|https)://www\\.hpstore\\.cn/(?:hp|omen)-":"hpstore","^(?:http|https)://www\\.kkguan\\.com/goods-\\d+\\.html":"kkguan","^(?:http|https)://www\\.mayn\\.com\\.cn/html/\\d+/\\d+":"mayn","^(?:http|https)://www\\.peikua\\.com/product-\\d+\\.html":"peikua","^(?:http|https)://item\\.kinhom\\.com/\\d+\\.html":"kinhom","^(?:http|https)://www.9drug.com/goods-\\d+\\.html":"9drug","^(?:http|https)://www.tea7.com/item/\\d+\\.html":"tea7","^(?:http|https)://www.01home.com/product/[a-z0-9-]+\\.html":"01home","^(?:http|https)://www.hpstore.cn/wasd-ii-[a-z0-9-]+\\.html":"hpstore","^(?:http|https)://www\\.hpstore.cn/(?:[a-z0-9-]+/|)[a-z0-9-]+\\.html":"hpstore","^(?:http|https)://www.aliexpress.com/store/product/":"aliexpress","^(?:http|https)://www.aliexpress.com/item/\\w+":"aliexpress","^(?:http|https)://www.easytoys.cn/\\d+\\.html":"easytoys","^(?:http|https)://www.kiwistarcare.com/goods-\\d+\\.html":"kiwistarcare","^(?:http|https)://www.carrefour.cn/product/\\d+":"carrefour","^(?:http|https)://china.lotte.com/goods/viewGoodsDetail\\.lotte":"lotte","^(?:http|https)://www.ewatches.com/detail\\.asp":"ewatches","^(?:http|https)://global.timex.com/node/\\d+":"timex","^(?:http|https)://comfortfirst.com/[a-z0-9-]+/[a-z0-9-]+/[a-z0-9-]+\\.html":"comfortfirst","^(?:http|https)://www.luolai.cn/product-\\d+\\.html":"luolai","^(?:http|https)://www.youyu.com/goods\\?sn=\\d+":"youyu","^(?:http|https)://www.yoox.cn/(?:cn/)[a-z0-9A-Z]+/item":"yoox","^(?:http|https)://store.yoox.cn/(?:cn/)[a-z0-9A-Z]+/item":"yoox", // "^(?:http|https)://www.walgreens.com/store/\\w+/[a-z0-9-]+/ID=prod\\d+-product": "walgreens",
"^(?:http|https)://www.suanjuzi.com/product-\\d+\\.html":"suanjuzi","^(?:http|https)://www.yao123.com/product/\\w+":"yao123","^(?:http|https)://item.baobeigezi.com/product/\\d+\\.html":"baobeigezi","^(?:http|https)://www.baobeigezi.com/product/\\d+\\.html":"baobeigezi","^(?:http|https)://www.opposhop.cn/products/\\d+\\.html":"opposhop","^(?:http|https)://www.opposhop.cn/products/\\d+":"opposhop",'^(?:http|https)://store\\.oppo\\.com/(?:goods|products)/\\d+':'opposhop','^(?:http|https)://www\\.oppo\\.com/cn/product':'opposhop','^(?:http|https)://hd.oppo.com/act/\\d+/oppoR9s':'opposhop',"^(?:http|https)://mall.to8to.com/temai/\\d+.html":"to8to","^(?:http|https)://item\\.yunhou\\.com/\\d+\\.html":"yunhou","^(?:http|https)://item\\.yhd\\.com":"yihaodian","^(?:http|https)://www\\.haituncun\\.com/[a-z]+/[a-z0-9]+/\\d+/":"haituncun","^(?:http|https)://www\\.walmart\\.com/ip/[a-zA-Z0-9-]+/\\d+":"walmart","^(?:http|https)://www\\.vmei\\.com/product/[0-9]+":"vmei","^(?:http|https)://www\\.jgb\\.cn/p/[a-z0-9_]+\\.html":"jgb","^(?:http|https)://www\\.51din\\.com/product/[0-9]+/[0-9]+\\.html":"51din","^(?:http|https)://www.51din.com/product/(?!list)/[0-9]+.jhtml":"51din","^(?:http|https)://www\\.aidai\\.com/Product[0-9]+\\.html":"aidai","^(?:http|https)://shop\\.boqii\\.com/product-[0-9]+\\.html":"boqii","^(?:http|https)://www\\.spider\\.com.cn/[a-z]+/[0-9]+\\.html":"spider","^(?:http|https)://www\\.spider\\.com.cn/auction.html?auctionid=[0-9]+ ":"spider","^(?:http|https)://www\\.jiae\\.com/productdetail?productId=[0-9]+":"jiae","^(?:http|https)://(?:item|www)\\.zazhipu\\.com/[0-9]+\\.html":"zazhipu","^(?:http|https)://www\\.walmart\\.com/ip/\\d+":"walmart","^(?:http|https)://www\\.shop\\.philips\\.com\\.cn/item/[a-z0-9-]+":"philips",'^(?:http|https)://tuan.zhongjiu.cn/product/detail/\\d+.htm':'zhongjiu','^(?:http|https)://www.zhongjiu.cn/productdetail/\\d+.htm':'zhongjiu','^(?:http|https)://www.kaluli.com/product/\\d+.html':'kaluli','^(?:http|https)://shop.wstx.com/item/\\d+':'wstx','^(?:http|https)://www.purcotton.com/detail/\\d+/[0-9-]+\\.html':'purcotton','^(?:http|https)://shop.juanpi.com/[a-z]+/\\d+':'juanpi','^(?:http|https)://www.gnc.com/[A-Za-z0-9-]+/product.jsp':'gnc','^(?:http|https)://www.jinxiang.com/product/\\d+\\.html':'jinxiang','^(?:http|https)://1.163.com/detail/\\d+-\\d+\\.html':'1-163','^(?:http|https)://www.guojimami.com/goods-\\d+\\.html':'guojimami','^(?:http|https)://www.baiyangwang.com/product/\\d+\\.html':'baiyangwang','^(?:http|https)://www.baiyangwang.com/item-\\d+\\.html':'baiyangwang','^(?:http|https)://cn.royyoungchemist.com.au/\\d+\\.html':'royyoungchemist','^(?:http|https)://cn.medihealshop.com/\\d+':'medihealshop','^(?:http|https)://(?:www\\.|)medihealshop.com/shop/shopdetail\\.html\\?':'medihealshop','^(?:http|https)://cn.1001pharmacies.com/\\d+\\.html':'1001pharmacies','^(?:http|https)://www.lookfantastic.cn/[a-z0-9-.]+/\\d+':'lookfantastic-cn','^(?:http|https)://www.lookfantastic.cn/beauty-box/[a-z0-9-.]+/\\d+':'lookfantastic-cn','^(?:http|https)://www.lookfantastic.com/[a-z0-9-.]+/\\d+':'lookfantastic-com','^(?:http|https)://www.lookfantastic.com/beauty-box/[a-z0-9-.]+/\\d+':'lookfantastic-com','^(?:http|https)://you.163.com/item/detail':'you163','^(?:http|https)://product.bl.com/\\d+\\.html':'bl','^(?:http|https)://www.bestinfoods.com/(?:\\?|)product-[0-9]+\\.html':'bestinfoods','^(?:http|https)://www.muji.net/store/\\w+/detail/[0-9]+':'muji', // 'item2.gmarket.co.kr/Item/detailview/Item.aspx': 'gmarket',
'^(?:http|https)://www\\.easeeyes\\.com/goods[0-9]+\\.html':'easeeyes','^(?:http|https)://www\\.lingshi\\.com/product/lingshi-\\d+\\.htm':'lingshi','^(?:http|https)://www\\.nubia\\.com/(?:nubian1|nubiamyprague|pragues|nubiaz9mark|nubiaz9|nubiaz9max|nubiaz9max|nubiaz9max|nubiaz11mini|nubiaZ11mini|nubiaz11max|nubiaz11max|nubiaz11max|nubiaz11|nubiaz11|nubiaz11)':'nubia','^(?:http|https)://shop\\.nubia\\.com/active/\\w+\\.html':'nubia','^(?:http|https)://shop\\.nubia\\.com/product\\.php\\?(?:s|)id=\\d+':'nubia','^(?:http|https)://(?:www|shop)\\.nubia\\.cn/product\\.php\\?sid=\\d+':"nubia",'^(?:http|https)://www.nubia.com/((?!.php).)*$':'nubia','^(?:http|https)://shop.nubia.com/buy/(?:nubian1|nubiamyprague|pragues|nubiaz9mark|nubiaz9|nubiaz9max|nubiaz9max|nubiaz9max|nubiaz11mini|nubiaZ11mini|nubiaz11max|nubiaz11max|nubiaz11max|nubiaz11|nubiaz11|nubiaz11|nubia\\w+)':'nubia','^(?:http|https)://www\\.kzj365\\.com/goods-\\d+\\.html':'kzj365','^(?:http|https)://(?:www|goods)\\.kaola\\.com/product/\\d+\\.html':'kaola','^(?:http|https)://www\\.kaola\\.com.hk/product/\\d+\\.html':'kaola','^(?:http|https)://(?:www|goods)\\.kaola\\.com.hk/product/\\d+\\.html':'kaola','^(?:http|https)://www\\.ymatou\\.(?:com|hk)/product/[a-zA-Z0-9-]+\\.html':'ymatou','^(?:http|https)://detail\\.metao\\.com/products/\\d+':'metao','^(?:http|https):tv\\.coocaa\\.com/goods/\\d+.htm':'coocaa','^(?:http|https)://www\\.coocaa\\.com/goods/get_[0-9]+\\.html':'coocaa','^(?:http|https)://www\\.lifevc\\.com/item/\\d+':'lifevc','^(?:http|https)://www\\.supuy\\.com/products/\\d+\\.html':'supuy','^(?:http|https)://www\\.supumall\\.com/Goods/goodsinfo/goodsCode/[0-9]+':'supuy','^(?:http|https)://www\\.mia\\.com/item-\\d+\\.html':'miyabaobei','^(?:http|https)://miyabaobei.hk/item-[0-9]+.html':'miyabaobei','^(?:http|https)://www.miyabaobei.hk/item-[0-9]+.html':'miyabaobei', //'item.gomehigo.hk/[0-9a-zA-Z]+-pop[0-9]+': 'gomehigo',
'^(?:http|https)://item.gomehigo.hk/[0-9a-zA-Z]+-.*':'gomehigo','http://www\\.wangfujing\\.com/item/[0-9A-Z]+':'wangfujing','^(?:http|https)://global\\.gou\\.com/product_[0-9]+\\.html':'gou','^(?:http|https)://www\\.gou\\.com/[a-z0-9_]+\\.html':'gou','^(?:http|https)://(?:www\\.|)ikjtao\\.com/goods-[0-9]+\\.html':'ikjtao','^(?:http|https)://(?:www\\.|)ikjtao\\.com/goods.php':'ikjtao','^(?:http|https)://(?:www\\.|)bestkeep\\.cn/item/\\d+':'ikjtao','^(?:http|https)://(?:item|np)\\.ule\\.com/item/[0-9-]+\\.html':'ule','^(?:http|https)://shop\\.philips\\.com\\.cn/product/\\w+/detail\\.htm':'philips','^(?:http|https)://shop\\.tcl\\.com/ProductDetail/index/id/\\d+\\.html':'tcl','^(?:http|https)://mall\\.tcl\\.com/front/product/toProduct/[a-z0-9]+':'tcl','^(?:http|https)://www\\.e-changhong\\.com/webapp/wcs/stores/servlet/Product[\\w_-]+':'changhong','^(?:http|https)://shop\\.konka\\.com/goods\\.php\\?id=\\d+':'konka','^(?:http|https)://shop\\.konka\\.com/product-[0-9]+\\.html':'konka','^(?:http|https)://shop\\.hisense\\.com/Home/Products/detail/gid/\\d+':'hisense','^(?:http|https)://(?:www|shop)\\.hisense\\.com/(?:product|items)/[a-z0-9-]+':'hisense','^(?:http|https)://www\\.ineigo\\.com/Product/product.aspx\\?&?id=\\d+':'ineigo','^(?:http|https)://www\\.skg\\.com/\\d+\\.html':'skg','^(?:http|https)://www\\.skg\\.com/product/[0-9]+\\.htm':'skg','^(?:http|https)://www\\.oyeah\\.com/giveaway-[0-9a-z-]+':'oyeah','^(?:http|https)://www\\.morefood\\.com/products/info/[0-9]+\\.html':'morefood','^(?:http|https)://www\\.zhen\\.com/product-[0-9]+\\.html':'zhen','^(?:http|https)://shop\\.vivo\\.com\\.cn/index\\.php/product-\\d+\\.html':'vivo','^(?:http|https)://shop\\.vivo\\.com\\.cn/product-[0-9]+':'vivo','^(?:http|https)://shop\\.vivo\\.com\\.cn/product/[0-9]+':'vivo','^(?:http|https)://gfive\\.b2c\\.eqimingxing\\.com/product-\\d+\\.html':'gfive','^(?:http|https)://www\\.6pm\\.com/product/':'6pm','^(?:http|https)://www\\.6pm\\.com/p/[a-z0-9-]+/product/':'6pm', // '^(?:http|https)://www\\.sierratradingpost\\.com/[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-[a-z0-9]+-': 'sierratradingpost',
'^(?:http|https)://shop\\.gionee\\.com/goods/\\d+':'gionee','^(?:http|https)://z\\.gionee\\.com/details-pc/\\w+/index\\.html':'gionee','^(?:http|https)://store\\.lining\\.com/shop/goods-[0-9]+':'lining','^(?:http|https)://store\\.lining\\.com/goods/detail.*':'lining','^(?:http|https)://www\\.mf910\\.com/product-[0-9]+\\.html':'mf910','^(?:http|https)://www\\.k-touch\\.cn/product/detail/prod_id/\\d+\\.html':'k-touch','^(?:http|https)://www\\.k-touch\\.cn/Product/ProductDetail\\?productid':'k-touch','^(?:http|https)://item\\.grainger\\.cn/g/\\d+':'grainger','^(?:http|https)://piao\\.163\\.com/\\w+/movie/\\d+\\.html':'wy163','^(?:http|https)://mall\\.163\\.com/p/product/\\d+\\.html':'wy163', //'^(?:http|https)://[\\w]+\\.nuomi\\.com/deal/\\w+\\.html':'nuomi',
'^(?:http|https)://detail\\.yao.\\95095\\.com/item\\.htm':'taobao-95095','^(?:http|https)://www\\.ebay\\.com/itm/[0-9a-zA-Z]+':'ebay','^(?:http|https)://(?:www\\.|)100yue\\.com/product-[0-9]+\\.html':'100yue','^(?:http|https)://www\\.feiniu\\.com/item/[-\\w]+':'feiniu','^(?:http|https)://www\\.lemall\\.com/product/':'lemall','^(?:http|https)://www\\.lemall\\.com/cn/(?:tv|sale|phone)/\\w+':'lemall','^(?:http|https)://www\\.lemall\\.com/(?:le_2|le_max|le_1pro|x55pro|x65|x55|x43s|x40s|umax120|chao4max70)':'lemall','^(?:http|https)://www\\.lemall\\.com/(?:chao4|le_max|le_max2|le_2pro|le_2|le_max2|x40sx40s)/(?:\\w+/|)\\w+\\.html':'lemall','^(?:http|https)://item\\.feiniu\\.com/[0-9]+':'feiniu','^(?:http|https)://www\\.xgbaby\\.com/product/[0-9]+':'bbready','^(?:http|https)://www\\.zuipin\\.cn/[0-9a-z-]+\\.html':'zuipin','^(?:http|https)://www\\.zuipin\\.cn/goods\\?id=\\d+':'zuipin','^(?:http|https)://item\\.feifei\\.(?:cn|com)/\\w+\\.html':'feifei','^(?:http|https)://www\\.feifei\\.com/order/-/product-info/productname/[0-9]+\\.html':'feifei','^(?:http|https)://guang\\.com/baobei/\\d+':'guang','^(?:http|https)://www\\.haitaocheng\\.com/Product/Detail-\\d+\\.html':'haitaocheng','^(?:http|https)://www\\.rrs(?:jk|)\\.com/product/[0-9]+\\.html':'rrs','^(?:http|https)://shop\\.ccb\\.com/products/pd_[0-9]+\\.jhtml':'ccb','^(?:http|https)://www\\.meilishuo\\.com/(?:prom|share)/item/\\d+':'meilishuo','^(?:http|https)://www\\.meilishuo\\.com/share/[\\d]+':'meilishuo','^(?:http|https)://item\\.meilishuo\\.com/detail/':'meilishuo','^(?:http|https)://www\\.mogujie\\.com/tuan/detail/\\w+':'mogujie','^(?:http|https)://shop\\.mogu(?:jie|)\\.com/detail/\\w+':'mogujie','^(?:http|https)://www\\.mogujie\\.com/note/.*?showtype=good':'mogujie','^(?:http|https)://www\\.supumall\\.com/products/[0-9]+\\.html':'supumall','^(?:http|https)://shop\\.coolpad\\.(?:com|cn)/goods/\\d+\\.htm':'coolpad','^(?:http|https)://(www\\.)?yiguo\\.com/product/\\d+\\.html':'yiguo','^(?:http|https)://(www\\.)?yiguo\\.com/CommodityDetail\\.aspx\\?CommodityId=':'yiguo','^(?:http|https)://item\\.wanggou\\.com/':'wanggou','^(?:http|https)://mall\\.jia\\.com/item/':'jia','^(?:http|https)://www\\.jiumei\\.com/product/[a-z0-9_-]+\\.shtml':'jiumei','^(?:http|https)://weigou\\.baidu\\.com/item':'baidu-weigou','^(?:http|https)://shop\\.letv\\.com/product/':'letv','^(?:http|https)://www\\.(xiao)?mi\\.com/(goods|item)/':'xiaomi','^(?:http|https)://item\\.mi\\.com/[0-9]+\\.html':'xiaomi','^(?:http|https)://item\\.mi\\.com/product/[0-9]+\\.html':'xiaomi','^(?:http|https)://www\\.mi\\.com/(shop/)?buy/detail':'xiaomi','^(?:http|https)://item\\.mi\\.com/buy(?:phone|mitv|mitv\\w+)/[a-z0-9]+':'xiaomi','^(?:http|https)://item\\.mi\\.com/static/[a-z0-9]+':'xiaomi','^(?:http|https)://item\\.mi\\.com/buy/[a-z0-9]+':'xiaomi','^(?:http|https)://www\\.mi\\.com/(?:mi5|mimax|redminote4|note3|hongmi3s|redmipro|hongmi3|hongmi3x|mibookair|mipad2|mitv3s|mitv3s|mitv3s|mitv3|mitv3|mitv3|tvzj|hezi3s|hezi3|hezimini|shb|mivr1c|miwifi3|scooter|mibicycle|kettle|dianfanbao|micamera|xiaoyi|air2|water|water2|ihealth2|ihealth|mjsmartlamp|desklamp|mitu|cute|wangguan|shouhuan2|shouhuan|scale|mituwatch|miwifimini|miwifilite|miwifi3c|miwifi|dianyuan10000|dianyuan10000|dianyuan5000|chaxianban2|powerstrip|recharger|chongdianqi4kou|headphone|quantie|capsuleearphone|pocketaudio|littleaudio|yinxiang|speaker|radio|mimosdge|gelpen|pillowZ1|pillowZ2|roomrobot|recharger7|charger|bluetooth-headset|suitcase|redmi\\w+|mi5splus|mi5s|mix|minote\\w+|mi5c|max\\w+|mi6|mipad3|mitv\\w+)/':'xiaomi','^(?:http|https)://www\\.handu\\.com/goods-':'handu','^(?:http|https)://www\\.yummy77\\.com/product/[0-9]+\\.html':'yummy77','^(?:http|https)://www\\.fruitday\\.com/web/pro/[0-9]+':'fruitday','^(?:http|https)://www\\.fruitday\\.com/prodetail/index/[0-9]+':'fruitday','^(?:http|https)://www\\.benlai\\.com/items?-\\d+':'benlai','^(?:http|https)://www\\.benlai\\.com/[a-z/]+/item-[0-9]+\\.html':'benlai','^(?:http|https)://taoshu\\.com/\\d+\\.html':'taoshu','^(?:http|https)://www\\.meilele\\.com/category-[a-z]+/goods-[0-9]+\\.html':'meilele','^(?:http|https)://www\\.meilele\\.com/tuangou/info-[0-9]+.html':'meilele-tuan','^(?:http|https)://www\\.meilele\\.com/miaosha/ms-[0-9]+.html':'meilele-ms','^(?:http|https)://www\\.gjw\\.com/product/item':'gjw','^(?:http|https)://www\\.gjw\\.com/Home/TuanItem/\\d+\\.htm':'gjw','^(?:http|https)://www\\.gjw\\.com/TryDrink/item-id-[0-9]+\\.htm':'gjw','^(?:http|https)://www\\.oneplus\\.com/cn/':'oneplus','^(?:http|https)://store\\.apple\\.com/cn/product/':'apple','^(?:http|https)://www\\.apple\\.com/cn/(?:macbook|ipad-pro|ipad|ipad-mini-4|iphone-7|iphone-\\w+|ipod-shuffle)/':'apple','^(?:http|https)://store\\.apple\\.com/cn/buy-iphone/iphone\\w+':'apple','^(?:http|https)://store\\.apple\\.com/cn/buy-mac/\\w+-\\w+\\?product=\\w+/\\w+':'apple','^(?:http|https)://www\\.apple\\.com\\.cn/shop/':'apple','^(?:http|https)://store\\.apple\\.com/cn/buy-ipad/ipad-\\w+-\\w+':'apple','^(?:http|https)://store\\.apple\\.com/cn/buy-ipod/ipod-\\w+-\\w+':'apple','^(?:http|https)://www\\.apple\\.com/cn/shop/(?:product|buy-[a-z]+)/[a-z0-9-]+':'apple','^(?:http|https)://www\\.j1\\.com/product/':'j1','^(?:http|https)://miao\\.j1\\.com/product/':'j1-miao','^(?:http|https)://(?:www\\.|)zzl365\\.com/product-\\d+':'zzl365','^(?:http|https)://mobile\\.139shop\\.com/.*?/\\d+/\\d+\\.htm':'139shop','^(?:http|https)://139shop\\.com/[a-z0-9-]+/[a-z0-9]+/[a-z0-9]+\\.htm':'139shop','^(?:http|https)://detail\\.1688\\.com/offer/\\d+':'1688','^(?:http|https)://www\\.yiwugou\\.com/product/detail/[0-9]+\\.html':'yiwugou','^(?:http|https)://www\\.zhiwo\\.com/product/\\d+':'zhiwo','^(?:http|https)://www\\.zhiwo\\.com/group/\\d+':'zhiwo-tuan','^(?:http|https)://[^\\.]+\\.miqi\\.cn/[^/]+/p\\d+':'miqi','^(?:http|https)://www\\.miqi\\.cn/[a-z]+/[0-9]+\\.html':'miqi','^(?:http|https)://www\\.camel\\.com\\.cn/[a-zA-Z0-9]+(_[a-zA-Z0-9]+)+/[\\w]+\\.shtml':'camel','^(?:http|https)://www\\.camel\\.com\\.cn/[a-zA-Z0-9_]+/[A-Za-z0-9]+\\.shtml':'camel','^(?:http|https)://www\\.kuaishubao\\.com/\\d+/\\d+':'kuaishubao','^(?:http|https)://www.kuaishubao.com/g/':'kuaishubao','^(?:http|https)://www\\.juegg\\.com/templets/DefaultGreen/Product\\.jsp':'juegg','^(?:http|https)://mall\\.10010\\.com/goodsdetail/[\\d]+\\.html':'mall10010','^(?:http|https)://www\\.wowsai\\.com/goods/':'wowsai','^(?:http|https)://www\\.tianpin\\.com/item/':'tianpin','^(?:http|https)://www\\.tootoo\\.cn/product-':'tootoo','^(?:http|https)://www\\.tootoo\\.cn/[a-z]+/detail/[0-9]+':'tootoo','^(?:http|https)://item\\.minshengec\\.com/[a-z]-(?:|[a-zA-Z%0-9]+)/[a-z0-9-]+\\.jhtml':'minshengec','^(?:http|https)://www\\.sfbest\\.com/html/(sfv)?products/':'sfbest','^(?:http|https)://ht\\.sfbest\\.hk/[0-9a-z_]+\\.htm':'sfbest','^(?:http|https)://shop\\.lenovo\\.com\\.cn/product-':'lenovo','^(?:http|https)://(?:item|\\w+)\\.lenovo\\.com\\.cn/product/\\d+\\.html':'lenovo','^(?:http|https)://shop\\.lenovomobile\\.com/ShowPhone.aspx\\?GdsID=':'lenovo','^(?:http|https)://www\\.lenovomobile\\.com/store/\\d+\\.html':'lenovo','^(?:http|https)://www\\.lenovo\\.com\\.cn/product/[0-9]+\\.html':'lenovo','^(?:http|https)://www\\.lenovo\\.com\\.cn/abtest/[0-9_]+\\.shtml':'lenovo','^(?:http|https)://thinkpad\\.lenovo\\.com\\.cn/product/[0-9]+\\.html':'lenovo','^(?:http|https)://www\\.vmall\\.com/item/\\d+/(?:index|buy)':'vmall','^(?:http|https)://www\\.vmall\\.com/product/\\d+\\.html':'vmall','^(?:http|https)://www\\.vmall\\.com/product/comdetail/index.html':'vmall','^(?:http|https)://www.hihonor.com/cn/shop/product/\\d+\\.html':'hihonor','^(?:http|https)://www\\.ihush\\.com/product':'ihush','^(?:http|https)://(?:www\\.)?fclub\\.cn/goods':'fclub','^(?:http|https)://item\\.yohobuy\\.com/product/\\w+/\\w+\\.html':'yohobuy','^(?:http|https)://item\\.yohobuy\\.com/\\w+\\.html':'yohobuy','^(?:http|https)://www\\.yohobuy\\.com/product/\\d+\\.html':'yohobuy','^(?:http|https)://www\\.fclub\\.cn/tuangouDetail\\.html':'fclub','^(?:http|https)://ju\\.taobao\\.com/tg/home\\.htm.*(item_)?id=[\\d]+':'taobao-ju','^(?:http|https)://detail\\.tmall\\.com/item(_o)?\\.htm':'tmall','^(?:http|https)://detail\\.liangxinyao\\.com/item\\.htm':'tmall','^(?:http|https)://world\\.tmall\\.com/item/[0-9]+\.htm':'tmall','^(?:http|https)://detail\\.tmall\\.hk/hk/item\.htm':'tmall','^(?:http|https)://detail\\.tmall\\.hk/item\\.htm':'tmall','^(?:http|https)://item\\.taobao\\.com/item\.htm':'taobao','^(?:http|https)://2\\.taobao\\.com/item\\.htm':'taobao-xianyu','^(?:http|https)://ai\\.taobao\\.com/auction':'ai-taobao','^(?:http|https)://chaoshi\\.detail\\.tmall\\.com/item\\.htm':'tmall','^(?:http|https)://chaoshi\\.detail\\.tmall\\.com/item_o\\.htm':'tmall','^(?:http|https)://detail\\.ju\\.taobao\\.com/home\\.htm':'taobao-ju','^(?:http|https)://(?:archive-shop|shop|www|day|lux)\\.vip(shop)?\\.com/detail':'vipshop','^(?:https|http):\\/\\/detail\\.vip\\.com\\/detail-\\d+':'vipshop','^(?:https|http):\\/\\/www\\.vipglobal\\.hk\\/detail-\\d+':'vipshop','^(?:http|https)://tuan\\.lefeng\\.com/.*?/\\d+_\\d+\\.html':'lefeng','^(?:http|https)://(?:www|product)\\.lefeng\\.com/(product|pklist)/':'lefeng','^(?:http|https)://(?:www|1hour)\\.jxdyf\\.com/product[-/][\\d]+':'jxdyf','^(?:http|https)://www\\.jxdyf\\.com/ProductContent':'jxdyf','^(?:http|https)://www\\.tnice\\.com/product/':'tnice','^(?:http|https)://auction1\\.paipai\\.com/':'paipai','^(?:http|https)://item\\.xinbaigo\\.com/Goods/StyleDetail':'xinbaigo','^(?:http|https)://www\\.orbis\\.com\\.cn.*product\\-[\\d]+':'orbis','^(?:http|https)://www\\.sfht\\.com/detail/[0-9]+\\.html':'sfht','^(?:http|https)://(?:www|cosmetic)\\.d1\\.com\\.cn/product/':'d1','^(?:http|https)://www\\.chazuo\\.com/Product/p\\-[\\d]+':'chazuo','^(?:http|https)://www\\.u1baby\\.com/product\\-[\\d]+':'u1baby','^(?:http|https)://(www\\.)?homevv\\.com/vvshopProductView/pid\\-[\\d]+\\.jhtml':'homevv','^(?:http|https)://(www\\.)?homevv\\.com/vvshopProductView\\.jhtml':'homevv','^(?:http|https)://www\\.paixie\\.net/shoe\\-.+\\.html':'paixie','^(?:http|https)://tuan\\.paixie\\.net/[0-9]+\\.html':'paixie-tuan','^(?:http|https)://faxian\\.paixie\\.net/[0-9]+\\.html':'paixie-faxian','^(?:http|https)://www\\.tao3c\\.com/(outlets/)?product/[\\d]+\\.html':'tao3c','^(?:http|https)://www\\.zm7\\.cn/goods':'zm7','^(?:http|https)://s\\.etao\\.com/item/[\\d]+\\.html':'etao','^(?:http|https)://s\\.etao\\.com/search\\?epid=[\\d]+':'etao','^(?:http|https)://product\\.pchouse\\.com\\.cn/item/[\\d]+\\.html':'pchouse','^(?:http|https)://buy\\.daphne\\.cn/goods\\.php':'daphne','^(?:http|https)://www\\.lucemall\\.com\\.cn/.+/[\\d]+\\.html':'lucemall','^(?:http|https)://www\\.lifevc\\.com/detail/':'lifevc','^(?:http|https)://www\\.easy361\\.com/[^\\?]*goods-[\\d]+\\.html':'easy361','^(?:http|https)://item\\.360hqb\\.com/spu\\-[\\d]+\\.html':'360hqb','^(?:http|https)://item\\.360hqb\\.com/[\\d]+\\.html':'360hqb','^(?:http|https)://q\\.360hqb\\.com/detail/[\\d\\_]+\\.html':'360hqb','^(?:http|https)://www\\.goujiuwang\\.com/product/item\\-id\\-[\\d]+\\.htm':'goujiuwang','^(?:http|https)://www\\.huimai365\\.com/goods\\-[\\d]+\\.html':'huimai365','^(?:http|https)://(www|tuan|dingzhi)\\.jiuxian\\.com/(goods|tuan_detail)\\-.+\\.htm':'jiuxian','^(?:http|https)://www\\.winenice\\.com/p_[\\d]+\\.shtml':'winenice','^(?:http|https)://www\\.yesmywine\\.com/goods/[\\d]+\\.html':'yesmywine','^(?:http|https)://mall\\.yesmywine\\.com/shop/junkang/item-[\\d]+':'yesmywine','^(?:http|https)://mall\\.yesmywine\\.com/shop/[\\w]+/item-[\\d]+':'yesmywine','^(?:http|https)://mall\\.yesmywine\\.com/groupbuy/\\d+\\.html':'yesmywine','^(?:http|https)://www\\.banggo\\.com/Goods/[\\d]+\\.shtml':'banggo','^(?:http|https)://www\\.banggo\\.com/goods_[0-9]+\\.shtml':'banggo','^(?:http|https)://www\\.banggo\\.com/goods/[0-9A-Za-z]+\\.s?html':'banggo','^(?:http|https)://www\\.banggo\\.com/goods/[0-9A-Za-z]+':'banggo','^(?:http|https)://ploy\\.banggo\\.com/second/[0-9-_]+\\.shtml':'banggo','^(?:http|https)://www\\.yanyue\\.cn/smoke\\-product\\-[\\d]+\\.html':'yanyue','^(?:http|https)://www\\.bearbuy\\.com\\.cn/goods\\.php\\?id=[\\d]+':'bearbuy','^(?:http|https)://www\\.amazon\\.cn/.*?(?:dp/|gp/product/|detailApp)':'amazon','^(?:http|https)://www\\.amazon\\.(com|co\\.uk|de|co\\.jp|fr|ca|cn|it|es|com\\.au)/.*?(?:dp/|gp/product/|detailApp)(?!search)':'amazon','^(?:http|https)://(?:product\\.dangdang\\.com/[^\\?]*product.aspx|reco\\.dangdang\\.com/reco_pub\\.php)\\?product_id=\\d+':'dangdang','^(?:http|https)://(?:product|detail)\\.dangdang\\.com/[\\d]+':'dangdang','^(?:http|https)://(?:product|detail)\\.globaldangdang\\.hk/[\\d]+\\.html':'dangdang','^(?:http|https)://z\\.jd\\.com/project/details/\\d+\\.html':"360buy",'^(?:http|https)://item\\.jd\\.com/\\d+\\.html':'360buy','^(?:http|https)://item\\.m\\.jd\\.com/product/\\d+\\.html':'360buy','^(?:http|https)://item\\.m\\.jd\\.com/ware/view.action':'360buy','^(?:http|https)://kpl\\.m\\.jd\\.com/product\\?wareId=\\d+':'360buy','^(?:http|https)://pcitem\\.jd\\.hk/\\d+\\.html':'360buy','^(?:http|https)://npcitem\\.jd\\.hk/\\d+\\.html':'360buy','^(?:http|https)://i-item\\.jd\\.com/\\d+\\.html':'360buy','^(?:http|https)://item\\.paipai\\.com/\\d+\\.html':'360buy','^(?:http|https)://item\\.yiyaojd\\.com/\\d+\\.html':'360buy','^(?:http|https)://item\\.jingdonghealth\\.cn/\\d+\\.html':'360buy','^(?:http|https)://item\\.jkcsjd\\.com/\\d+\\.html':'360buy','^(?:http|https)://item\\.jd\\.hk/\\d+\\.html':'360buy','^(?:http|https)://paimai\\.jd\\.com/\\d+':'360buy-paimai','^(?:http|https)://day\\.jd\\.com/item/.*\\.html':'360buy-day','^(?:http|https)://www\\.(?:360buy|jd)\\.com/product/\\d+\\.html':'360buy','^(?:http|https)://(?:book|e)\\.(?:360buy|jd)\\.com/\\d+\\.html':'360buy-book','^(?:http|https)://re\\.jd\\.com/cps/item/[0-9]+\\.html':'360buy-re','^(?:http|https)://auction\\.jd\\.com/[0-9]+':'360buy-auction','^(?:http|https)://mvd\\.(?:360buy|jd)\\.com/\\d+\\.html':'360buy-mvd','^(?:http|https)://tuan\\.(?:360buy|jd)\\.com/team\\-\\d+\\.html':'360buy-tuan','^(?:http|https)://www\\.(?:360buy|jd)\\.com/tuan/[\\d]+\\-[\\d]+\\.html':'360buy-tuan','^(?:http|https)://www\\.(?:360buy|jd)\\.com/bigimage\\.aspx\\?id=\\d+':'360buy-bigimage','^(?:http|https)://club\\.jd\\.com/bbsDetail/[a-z0-9_-]+\\.html':'360buy-club','^(?:http|https)://www\\.360top\\.com/product/\\d+\\.html':'360top','^(?:http|https)://detail\\.zol\\.com\\.cn/.*?(?:index).*?\\.shtml':'zol','^(?:http|https)://detail\\.zol\\.com\\.cn/[\\d]+/[\\d]+/[a-zA-Z]+\\.shtml':'zol','^(?:http|https)://dealer\\.zol\\.com\\.cn/detail/[\\d]+/[\\d]+_[\\d]+.html':'zol','^(?:http|https)://(?:www|mall)\\.zol\\.com/detail':'zol','^(?:http|https)://detail\\.zol\\.com\\.cn/series/[0-9]+/[0-9_]+\\.html':'zol','^(?:http|https)://www\\.fglady\\.cn/BMsgL':'fglady','^(?:http|https)://(www.|)ouku\\.com/(?:goods|product)':'ouku','^(?:http|https)://(www.|)ouku\\.com/cn/[0-9a-z-_]+\\.html':'ouku','^(?:http|https)://www\\.newegg(\\.com)?\\.cn/Product/.*?\\.htm':'newegg','^(?:http|https)://zhadan\\.newegg(\\.com)?\\.cn/Bomb-\\d+\\.htm':'newegg','^(?:http|https)://zhadan\\.newegg\\.cn':'newegg-zhadan','^(?:http|https)://tuan\\.newegg\\.cn/deal/[0-9]+\\.htm':'newegg-tuan','^(?:http|https)://product\\.kimiss\\.com/product/':'kimiss','^(?:http|https)://www\\.redbaby\\.com\\.cn/.*?/\\d{7}\\d+\\.html':'redbaby','^(?:http|https)://product\\.m18\\.com/':'m18','^(?:http|https)://list\\.m18\\.com/item/':'m18','^(?:http|https)://list\\.m18\\.com/g/':'m18','^(?:http|https)://list\\.m18\\.com/.*Goods.aspx':'m18','^(?:http|https)://www\\.m18\\.com/item/':'m18','^(?:http|https)://www\\.w1\\.cn/goods':'w1','^(?:http|https)://www\\.ashford\\.com/us/watches/[a-z0-9-]+/[a-z0-9-]+':'ashford','^(?:http|https)://www\\.sephora\\.cn/productDetailAction/':'sephoracps','^(?:http|https)://www\\.sephora\\.cn/product/\\d+\\.html':'sephoracps','^(?:http|https)://www\\.sephora\\.cn/tryout/\\d+\\.html':'sephoracps','^(?:http|https)://www\\.lafaso\\.com/(?:product/|goods/product_detail)':'lafaso','^(?:http|https)://www\\.s\\.cn/(?!page)\\w{2,}\\-[A-Za-z0-9]+?[0-9]+?[A-Za-z0-9]+?[\\-_*\\.].*?html':'s', // '^(?:http|https)://www\\.s\\.cn/\\w{2,}\\-[A-Z0-9]+?[0-9]+?[A-Z0-9]+?[\\-_*\\.].*?html': 's',
'^(?:http|https)://w?item\\.(?:51buy|yixun)\\.com/':'51buy','^(?:http|https)://www\\.okbuy\\.com/.*?/detail-':'okbuy','^(?:http|https)://www\\.okbuy\\.com/.*?-[\\d]+.html':'okbuy','^(?:http|https)://(www\\.)?letao\\.com/[^\\?]*shoe\\-[^\\~]*$':'letao','^(?:http|https)://(www\\.)?letao\\.com/[a-z0-9]+/detail\\.do\\?id=':'letao','^(?:http|https)://www\\.buy007\\.com/.*?/.*?/[A-Za-z\\d\\_\\-]*?\\.html':'buy007','^(?:http|https)://www\\.taoxie\\.com/commodity':'taoxie','^(?:http|https)://ju\\.suning\\.com/product-[a-zA-Z0-9]+\\.htm':'suning-ju','^(?:http|https)://item\\.suning\\.com/[0-9]+\\.html':'suning','^(?:http|https)://item\\.suning\\.com/[0-9]+/[0-9]+\\.html':'suning','^(?:http|https)://www\\.suning\\.(?:com|cn)/webapp/wcs/stores/servlet/(Prod|prd)':'suning','^(?:http|https)://pai\\.suning\\.(?:com|cn)/shanpai/detail/':'suning-pai','^(?:http|https)://pai\\.suning\\.(?:com|cn)/shanpai/[0-9]/detail/d/[0-9]+\-[0-9]':'suning-pai','^(?:http|https)://[\\w]+\\.suning\\.(?:com|cn)/emall/dgf':'suning-dgf','^(?:http|https)://qiang\\.suning\\.com/rps-web/rp/showActivity_[\\d]+\\.htm':'suning-qiang','^(?:http|https)://product\\.suning\\.com/\\d+':'suning','^(?:http|https)://product\\.suning\\.com/detail[0-9_]+\\.html':'suning','^(?:http|https)://www\\.suning\\.com/detail/':'suning-book-new','^(?:http|https)://snbook\\.suning\\.(?:com|cn)/web/prd/':'suning-snbook','^(?:http|https)://www\\.coo8\\.com/product/':'coo8','^(?:http|https)://(www.|)lusen\\.com/product/productinfo':'lusen','^(?:http|https)://www\\.lusen\\.com/Tuan/ComityInfo\\.aspx\\?id=[0-9]+':'lusen','^(?:http|https)://item\\.gome\\.com\\.cn/[^\\?]':'gome','^(?:http|https)://tao\\.gome\\.com\\.cn/p\\-D[0-9]+':'gome-tao','^(?:http|https)://q\\.gome\\.com\\.cn/item/\\w[0-9]+\\.html':'gome-q','^(?:http|https)://tuan\\.gome\\.com\\.cn/deal/\\w+\\.html':'gome-tuan','^(?:http|https)://www\\.gomehome\\.com/product/productinfo\\?p=[0-9-]+':'gome-home','^(?:http|https)://www\\.gome\\.com\\.cn/ec/rushbuy/limitbuy/itemdetail':'gome-rushbuy','^(?:http|https)://(?:www|item|s)\\.(yhd|yihaodian|1mall)\\.com/(?:product|item)/\\d+':'yihaodian','^(?:http|https)://item\\.yhd\\.com/item/lp/[0-9_]+':'yihaodian','^(?:http|https)://try\\.yhd\\.com/(free|fee)/\\d{4,6}_\\d+/':'yihaodian','^(?:http|https)://t\\.(yhd|yihaodian|1mall)\\.com/detail/\\d+':'yihaodian-tuan','^(?:http|https)://[a-zA-Z]+\\.womai\\.com/(.*)Product(?:\\-|\\.do\\?m?id)':'womai','^(?:http|https)://(www|sh|gz|zs)\\.womai\\.com/related-':'womai-related','^(?:http|https)://(www\\.)?leyou\\.com\\.cn/product/single/':'leyou','^(?:http|https)://haitao\\.leyou\\.com\\.cn/item/single/sku/':'leyou','^(?:http|https)://leleshan\\.leyou\\.com\\.cn/product/single/[A-Z0-9]+':'leyou-leleshan','^(?:http|https)://www\\.shopin\\.net/product/':'shopin','^(?:http|https)://(?:item|www|ebay)\\.xiu\\.com/product/':'xiu','^(?:http|https)://outlets\\.xiu\\.com/[\\d]+\\.shtml':'xiu','^(?:http|https)://ferragamo\\.xiu\\.com/[\\d]{6,10}\\.shtml':'xiu','^(?:http|https)://tuan\\.xiu\\.com/team_[\\d]+':'xiu-tuan','^(?:http|https)://item\\.mbaobao\\.com/pshow':'mbaobao','^(?:http|https)://www\\.mbaobao\\.com/item/':'mbaobao','^(?:http|https)://item\\.vjia\\.com/[\\d]*?\\.html':'vjia','^(?:http|https)://www\\.7cv\\.com/product/':'7cv','^(?:http|https)://www\\.qinqinbaby\\.com/product/':'qinqinbaby','^(?:http|https)://www\\.qinqinbaby\\.com/goods/[0-9]+':'qinqinbaby','^(?:http|https)://www\\.chunshuitang\\.com/[a-z]+/[0-9]+\\.html':'chunshuitang','^(?:http|https)://www\\.x\\.com\\.cn/n_product/[\\w]+\\.shtml':'x','^(?:http|https)://www\\.x\\.com\\.cn/product':'x','^(?:http|https)://www\\.guopi\\.com/p\\.jsp':'guopi','^(?:http|https)://www\\.no5\\.com\\.cn/goods/':'no5','^(?:http|https)://www\\.no5\\.com\\.cn/product/[0-9]+\\.html':'no5','^(?:http|https)://web[\\d]+\\.sasa\\.com/SasaWeb/sch/product/viewProductDetail':'sasa','^(?:http|https)://www\\.sasa\\.com/[a-z]+/[a-zA-Z0-9_-]+':'sasa','^(?:http|https)://www\\.sasa\\.com/[a-z]+-\\d+\\.html':'sasa','^(?:http|https)://www\\.hksasa\\.cn/[a-z]+-\\d+\\.html':'sasa','^(?:http|https)://www\\.dhc\\.net\\.cn/gds/(?:detail|csearch\\.jsp\\?ccd=[\\d]+)':'dhc','^(?:http|https)://www\\.9dadao\\.com/product/':'9dadao','^(?:http|https)://www\\.360kxr\\.com/product/':'360kxr','^(?:http|https)://www\\.m6go\\.com/product':'m6go','^(?:http|https)://www\\.gou\\.com/product':'m6go','^(?:http|https)://www\\.m6go\\.com/qg/product':'m6go','^(?:http|https)://www\\.gou\\.com/qg/product':'m6go','^(?:http|https)://www\\.likeface\\.com/product':'likeface','^(?:http|https)://www\\.qxian\\.com/.*?[0-9]*?\\.html':'qxian','^(?:http|https)://www\\.didamall\\.com/(?:products|libao)/info/':'didamall','^(?:http|https)://www\\.yaodian100\\.com/ecmall/product':'yaodian100','^(?:http|https)://www\\.yaofang\\.cn/goods':'yaofang','^(?:http|https)://www\\.lijiababy\\.com\\.cn/(?:eshop/product|Clothing/.*?/Product_item\\.aspx)':'lijiababy','^(?:http|https)://99read\\.com/Product/[a-zA-Z]*\\d+[a-zA-Z]*\\.aspx':'99read','^(?:http|https)://product\\.china-pub\\.com/\\d+':'china-pub','^(?:http|https)://(www.|)bookschina\\.com/[\\d]+\\.htm':'bookschina','^(?:http|https)://(www.|)bookschina\\.com/GROUPBUY/groupbuy.aspx\\?groupid\\=[0-9]+':'bookschina-tuan','^(?:http|https)://(?:|www\\.)efeihu\\.com/(?:Product/|Pages/ProductShow/ProductDetails\\.aspx)':'efeihu','^(?:http|https)://tuan\\.efeihu\\.com/[0-9a-zA-Z]+/Detials.aspx\\?id=[0-9]+':'efeihu','^(?:http|https)://www\\.360mart\\.com/product[s]?/.*?\\.html':'360mart','^(?:http|https)://www\\.yintai\\.com/product/productdetail':'yintai','^(?:http|https)://item\\.yintai\\.com/':'yintai','^(?:http|https)://www\\.quwan\\.com/goods':'quwan','^(?:http|https)://www\\.urcosme\\.com/search/final':'urcosme','^(?:http|https)://cn\\d*\\.strawberrynet\\.com/.*?/[0-9]+/':'strawberrynet','^(?:http|https)://www\\.strawberrynet\\.com/.*?/[0-9]+/':'strawberrynet','^(?:http|https)://www\\.luce\\.com\\.cn/product/':'luce','^(?:http|https)://www\\.k121\\.com/item':'k121','^(?:http|https)://www\\.happigo\\.com/[\\w]+/[\\w]+/[\\w]+/[\\d]+\\.html':'happigo','^(?:http|https)://www.happigo.com/item-[0-9]+.html':'happigo','^(?:http|https)://mall\\.happigo\\.com/goods-[\\d]+\\.html':'happigo','^(?:http|https)://mall\\.happigo\\.com/groupbuy-[0-9-]+\\.html':'happigo','^(?:http|https)://www\\.gap\\.cn/[^\\?]*product/[\\d]+\\.html':'gap','^(?:http|https)://www\\.misslele\\.com/.+[\\d]+\\.html':'misslele','^(?:http|https)://www\\.5lux\\.com/goods':'5lux','^(?:http|https)://(?:www|hui)\\.5lux\.com/good/detail/[0-9]+':'5lux','^(?:http|https)://www\\.xiaozhuren\\.com/(Disney/)?goods\\.php':'xiaozhuren','^(?:http|https)://www\\.all3c\\.com/product/':'all3c','^(?:http|https)://www\\.idaphne\\.com/goods':'idaphne','^(?:http|https)://product\\.pcbaby\\.com\\.cn/a/':'pcbaby','^(?:http|https)://www\\.binggo\\.com/.*?/\\d{7}\\d+\\.html':'binggo','^(?:http|https)://www\\.tiantian\\.com/.+/[a-zA-Z]?[\\d]+\\.html':'tiantian','^(?:http|https)://tuan\\.tiantian\\.com/Sale/(?:Details|FlashDetails)/[a-zA-Z0-9]+':'tiantian-tuan','^(?:http|https)://www\\.xiji\\.com/product-[0-9]+\\.html':'xiji','^(?:http|https)://www\\.xijie\\.com/prod':'xijie','^(?:http|https)://mall\\.jumei\\.com[^\\?]*/product_':'jumei','^(?:http|https)://pop\\.jumei\\.com/i/deal/\\w+\\.html':'jumei','^(?:http|https)://(gz|bj|sh)\\.jumei\\.com/i/deal/\\w+\\.html':'jumei','^(?:http|https)://item\\.jumei\\.com/[0-9a-zA-Z]+\\.html':'jumei','^(?:http|https)://www\\.jumeiglobal\\.com/deal/\\w+\\.html':'jumeiglobal','^(?:http|https)://item\\.jumeiglobal\\.com/[0-9a-zA-Z]+\\.html':'jumeiglobal','^(?:http|https)://www\\.jumeiglobal\\.com/Deal/Combination\\?':'jumeiglobal','^(?:http|https)://buy\\.caomeipai\\.com/goods':'caomeipai','^(?:http|https)://www\\.dahuozhan\\.com/product/':'dahuozhan','^(?:http|https)://www\\.dazhe\\.cn/goodsdetail':'dazhe','^(?:http|https)://www\\.huolida\\.com/product/':'huolida','^(?:http|https)://www\\.12dian\\.com/product':'12dian','^(?:http|https)://www\\.yougou\\.com/c_':'yougou','^(?:http|https)://(?:outlets|www)\\.yougou\\.com/[^?]+sku-[\\w]+':'yougou','^(?:http|https)://(?:outlets|seoul|www)\\.yougou\\.com/[a-z-]+/sku-[a-z0-9-]+\\.shtml':'yougou','^(?:http|https)://www\\.111\\.com\\.cn/(?:product|item)/':'111','^(?:http|https)://www\\.daoyao\\.com/product':'daoyao','^(?:http|https)://www\\.jianke\\.com/product/':'jianke','^(?:http|https)://www\\.jianke\\.com/tuan/product/[0-9]+\\.html':'jianke','^(?:http|https)://www\\.360kad\\.com/product/[0-9a-z]+\\.shtml':'360kad','^(?:http|https)://www\\.lbxcn.com/(?:Product|item)/[0-9]+.html':'lbxcn','^(?:http|https)://www\\.lbxcn.com/hepstorefront/lbx/zh/LBX/.*/p/[0-9]+':'lbxcn','^(?:http|https)://book\\.douban\\.com/subject/[\\d]+':'douban','^(?:http|https)://dongxi\\.douban\\.com/show/[\\d]+':'douban-dongxi','^(?:http|https)://product\\.it168\\.com/detail/doc/[0-9]+/index\\.shtml':'it168','^(?:http|https)://product\\.pconline\\.com\\.cn/[^/]*?/[^/]*?/[0-9]+\\.html':'pconline','^(?:http|https)://product\\.pcpop\\.com/[0-9]+/Index\\.html':'pcpop','^(?:http|https)://cosme\\.pclady\\.com\\.cn/product/[0-9]+\\.html':'pclady','^(?:http|https)://brand\\.yoka\\.com/cosmetics/.*?/detail[0-9]+\\.htm':'yoka','^(?:http|https)://detail\\.55bbs\\.com/.*?/index[0-9]+\\.shtml':'55bbs','^(?:http|https)://hzp\\.onlylady.com/.*?/[0-9]+/':'onlylady','^(?:http|https)://www\\.24dq.com/product.*?html':'24dq','^(?:http|https)://www\\.muyingzhijia\\.com/Shopping/ProductDetail\\.aspx':'muyingzhijia','^(?:http|https)://www\\.muyingzhijia\\.com/product/\\d+\\.html':'muyingzhijia','^(?:http|https)://item\\.muyingzhijia\\.com/\\d+\\.html':'muyingzhijia','^(?:http|https)://www\\.houmart\\.com/p\\-[\\d]+\\.html':'houmart','^(?:http|https)://www\\.onlyts\\.cn/goods':'onlyts','^(?:http|https)://www\\.winxuan\\.com/product/.*?[0-9]*?':'winxuan','^(?:http|https)://item\\.winxuan\\.com/[0-9]+':'winxuan','^(?:http|https)://detail\\.bookuu\\.com/[0-9]*?\\.html':'bookuu','^(?:http|https)://www\\.bookuu\\.com/detail\\.php\\?id=\\d+':'bookuu','^(?:http|https)://e\\.bookuu\\.com/detail\\.php\\?id=\\d+':'bookuu','^(?:http|https)://wenju\\.bookuu\\.com/detail\\.php\\?id=\\d+':'bookuu','^(?:http|https)://book\\.beifabook\\.com/Product/BookDetail.aspx':'beifabook','^(?:http|https)://product\\.yesky\\.com/product/.*?[0-9]*?/':'yesky','^(?:http|https)://product\\.pchome\\.net/.*?[0-9]*?\\.html':'pchome','^(?:http|https)://product\\.enet\\.com\\.cn/[a-zA-Z\\-].*?[\\d].*?\\.html':'enet','^(?:http|https)://(www\\.)?(?:ruiyi|rayi)\\.(?:com|cn|com\\.cn)/\\?product-[\\d].*?\\.html':'ruiyi','^(?:http|https)://www\\.nop\\.cn/product-[\\d]*?\\.html':'nop','^(?:http|https)://product\\.imobile\\.com\\.cn/show/[\\d].*?\\.html':'imobile','^(?:http|https)://product\\.cnmo\\.com/cell_phone/index[\\d].*?\\.shtml':'cnmo','^(?:http|https)://phone\\.shouji\\.com\\.cn/[\\d]+/detail/[\\d]+':'shouji','^(?:http|https)://product\\.tompda\\.com/[a-zA-Z]/[a-zA-Z]/[\\d]+/[\\d]+':'tompda','^(?:http|https)://www\\.3533\\.com/phone/phone.+\\.htm':'phone3533','^(?:http|https)://product\\.intozgc\\.com/[a-zA-Z\\_]+\\_[\\d]+':'intozgc','^(?:http|https)://product\\.chinabyte\\.com/product/[\\d]+/[\\d]+':'chinabyte','^(?:http|https)://app\\.tech\\.ifeng\\.com/[a-zA-Z\\-\\_]+/[a-zA-Z\\-\\_]+/[a-zA-Z0-9\\-\\_]+':'ifeng','^(?:http|https)://app\\.tech\\.ifeng\\.com/[a-zA-Z\\-\\_]+/detail\\-index\\-[0-9]+\\.html':'ifeng','^(?:http|https)://www2\\.xitek\\.com/production/product.php':'xitek','^(?:http|https)://product\\.imp3\\.net/product\\.php':'imp3','^(?:http|https)://www\\.menglu\\.com/product/[\\d]+\\.html':'menglu','^(?:http|https)://(?:lady|lingerie|www|fashion|shipin|item)\\.moonbasa\\.com/[a-zA-Z]\\-[\\d]+\\.html':'moonbasa','^(?:http|https)://www\\.(?:ing2ing|qjherb|korirl|alaves|0-100s|cherriespie|clafield|baoyeah|suorang|monteamor|rutisher)\\.com/p\\-[\\d]+\\.html':'moonbasa','^(?:http|https)://www\\.keede\\.com(\\.cn)?/[a-zA-Z]+[\\d]+\\.html':'keede','^(?:http|https)://www\\.kede\\.com(\\.cn)?/[a-zA-Z]+[\\d]+\\.html':'keede','^(?:http|https)://k1\\.keede\\.cn/[a-zA-Z]+[\\d]+\\.html':'keede','^(?:http|https)://k1\\.kede\\.cn/[a-zA-Z]+[\\d]+\\.html':'keede','^(?:http|https)://item(\\.vt)?\\.vancl\\.com/[\\d]+\\.html':'vancl','^(?:http|https)://www\\.dazhongdianqi\\.com\\.cn/dazhong/product[\\-\\d]+\\.htm':'dazhongdianqi','^(?:http|https)://www\\.skinstorechina\\.com/.+/.+[\\d]+\\-p\\.html':'skinstorechina','^(?:http|https)://item\\.buy\\.qq\\.com/item/':'qq','^(?:http|https)://.*\\.zol\\.com\\.cn/\\d+/\\d+\\.html':'zol-article','^(?:http|https)://.*\\.pconline\\.com\\.cn/\\d+/\\d+\\.html':'pconline-article','^(?:http|https)://.*\\.yesky\\.com/\\d+/\\d+\\.shtml':'yesky-article','^(?:http|https)://.*\\.it168\\.com/[a-z]\\d+/\\d+/\\d+/\\d+\\.shtml':'it168-article','^(?:http|https)://.*\\.pcpop\\.com/doc/\\d+/\\d+/\\d+\\.shtml':'pcpop-article','^(?:http|https)://.*\\.pchome\\.net/content-\\d+\\.html':'pchome-article','^(?:http|https)://.*\\.139shop\\.com/.*?/\\d+/\\d+\\.htm':'139shop-article','^(?:http|https)://www\\.milier\\.com/product/':'milier','^(?:http|https)://www\\.sportica\\.cn/goods':'sportica','^(?:http|https)://www\\.zhenpin\\.com/product':'zhenpin','^(?:http|https)://www\\.gaojie\\.com/product/':'gaojie','^(?:http|https)://www\\.naruko\\.com\\.cn/shop/product/Goods\\.aspx':'naruko','^(?:http|https)://www\\.(?:vivian|masamaso|linkmasa)\\.(?:com|cn)/goods_':'masamaso','^(?:http|https)://item\\.secoo\\.com/':'secoo','^(?:http|https)://paimai\\.secoo\\.com/[0-9]+\\.shtml':'secoo','^(?:http|https)://sale\\.secoo\\.com/[0-9]+\\.shtml':'secoo','^(?:http|https)://(?:www|tuan)\\.ehaier\\.com/product/':'ehaier','^(?:http|https)://qiji\\.ehaier\\.com/new/newExploreManager/dateil/[0-9]+':'ehaier','^(?:http|https)://www\\.handuyishe\\.com/goods':'handuyishe','^(?:http|https)://www\\.wbiao\\.cn/[a-z0-9-]+\\.html':'wbiao', // '^(?:http|https)://www\\.wbiao\\.cn/[a-z]+/[a-z0-9-]+\\.html': 'wbiao',
'^(?:http|https)://www\\.wbiao\\.cn/goods\\.php\\?goods_id=[0-9]+':'wbiao','^(?:http|https)://www\\.wbiao\\.cn/van-der-bauwede-\\w[0-9]+\\.html':'wbiao','^(?:http|https)://www\\.shangpin\\.com(\\.hk)*/.*?product/':'shangpin','^(?:http|https)://www\\.pba\\.cn/(?:product|sp)':'pba','^(?:http|https)://www\\.metromall\\.cn/Product/':'metromall','^(?:http|https)://www\\.lizi\\.com/product':'lizi','^(?:http|https)://www\\.kadang\\.com/[a-zA-Z0-9/]*detail\\d+':'kadang','^(?:http|https)://www\\.kadang\\.com/product/[0-9]+':'kadang','^(?:http|https)://www\\.aimer\\.com\\.cn/goods/':'aimer','^(?:http|https)://www\\.lamiu\\.com/goods_':'lamiu','^(?:http|https)://www\\.lamiu\\.com/(?:goods_|product-)':'lamiu','^(?:http|https)://www\\.esprit\\.cn/(?:product|item)/\\w+':'esprit','^(?:http|https)://www\\.liebo\\.com/product/':'liebo','^(?:http|https)://www\\.wangjiu\\.com/product/(?!flashPromotion)':'wangjiu','^(?:http|https)://www.wangjiu.com/mall/item-pid-[a-zA-Z0-9]+\\.html':'wangjiu','^(?:http|https)://www\\.xifuquan\\.com/product/':'xifuquan','^(?:http|https)://www\\.189\\.cn/products/':'189','^(?:http|https)://www\\.hicdma\\.com/product_detail_':'hicdma','^(?:http|https)://mall\\.10010\\.com/goodsdetail/':'10010','^(?:http|https)://www\\.e100\\.cn/ebiz/channel/(.*/)+\\d+\\.html':'e100','^(?:http|https)://store\\.samsung\\.com/cn/.*/p/.*':'samsung','^(?:http|https)://www\\.samsungeshop\\.com\\.cn/product/.*':'samsung','^(?:http|https)://store\\.meizu\\.com/product/':'meizu','^(?:http|https)://detail\\.meizu\\.com/item/\\w+':'meizu','^(?:http|https)://b2c\\.958shop\\.com/.*/\\d+\\.html':'958shop','^(?:http|https)://www\\.okhqb\\.com/item/\\d+\\.html':'okhqb','^(?:http|https)://www\\.okhqb\\.com/qiang/\\d+/\\d+\\.html':'okhqb','^(?:http|https)://www\\.ztedevice\\.com\\.cn/product/':'ztedevice','^(?:http|https)://www\\.daling\\.com/detail-[0-9]+\\.html':'daling','^(?:http|https)://item\\.showjoy\\.com/sku/[0-9]+\\.html':'showjoy','^(?:http|https)://www\\.ocj\\.com\\.cn/detail/[0-9]+':'ocj','^(?:http|https)://www\\.ocj\\.kr/detail/[0-9]+':'ocj-kr','^(?:http|https)://www\\.ocj\\.com\\.cn/otuans/[a-z]+/[0-9]+':'ocj-tuan','^http://www\\.lvyoumall\\.com/(tuan/goods-|tmh/goods-|goods/)\\d+':'lvyoumall','http://www\\.kjt\\.com/product/detail/\\d+':'kjt','^(?:http|https)://store\\.logitech\\.com\\.cn/pro/proDetail/\\d+':'logitech','^(?:http|https)://store\\.logitech\\.com\\.cn/product/PointDetail/\\d+':'logitech','http://shop\\.boohee\\.com/store/goods/\\w+':'boohee','http://www\\.meici\\.com/product-[a-zA-Z0-9-]+\\.html':'meici','http://www\\.meici\\.com/product.*':'meici','http://(?:global|you|www)\\.beibei\\.com/detail/[0-9-]+\\.html':'beibei','http://store\\.nike\\.com/cn/zh_cn/pd/[a-zA-Z0-9\\u4e00-\\u9fa5-]+':'nike','http://store\\.nike\\.com/cn/zh_cn/product/[a-zA-Z0-9\\u4e00-\\u9fa5-]+':'nike','^(?:http|https)://www\\.nike\\.com/cn/t/[a-zA-Z0-9\\u4e00-\\u9fa5-]+':'nike','^(?:http|https)://www\\.fengqu\\.com\/detail\/':'fengqu','^(?:http|https)://www\\.mei\\.com/silo/.*-event-event/.*\\.html':'mei','^(?:http|https)://www\\.mei\\.com/item\\.html\\?':'mei','^(?:http|https)://www\\.vsigo\\.cn/.*\\.html':'vsigo','^(?:http|https)://www\\.sundan\\.com/product-[0-9]+':'sundan','^(?:http|https)://www\\.jiae\\.com/productdetail':'jiae','^(?:http|https)://hd\\.zazhipu\\.com/.*\\.asp\\?id=[0-9]+':'zazhipu','^(?:http|https)://www\\.microsoftstore\\.com\\.cn/%E7%B1%BB%E5%88%AB/.*/p/.*':'microsoftstore','^(?:http|https)://www\\.microsoftstore\\.com\\.cn/surface/[a-z0-9A-Z-]+':'microsoftstore','^(?:http|https)://www\\.xgdq\\.com/product-[0-9]+\\.html':'xgdq','^(?:http|https)://(?:www\\.|)xtep\\.com\\.cn/goods/do_index':'xtep','^(?:http|https)://www\\.xtep\\.com\\.cn/team-[0-9]+\\.html':'xtep','^(?:http|https)://www\\.xtep\\.com\\.cn/spike-[0-9]+\\.html':'xtep','^(?:http|https)://www\\.staples\\.cn/product/[0-9a-zA-Z]+':'staples', // '^(?:http|https)://(?:www\\.|)efotile\\.com/productdetail/[a-z0-9-_]+/[a-z0-9-_]+\\.html': 'efotile',
'^(?:http|https)://mall\\.midea\\.com/detail/index':'midea','^(?:http|https)://www\\.midea\\.cn/detail/index':'midea','^(?:http|https)://www\\.midea\\.cn/[0-9]+/[0-9]+\\.html':'midea','^(?:http|https)://www1\\.macys\\.com/shop/product/\\w+':'macys','^(?:http|https)://cn.shopbop.com/[a-z0-9-]+/vp/\\w+':'shopbop', // 'www\\.bestcake\\.com/\\w+/item/[a-z0-9-]+': 'bestcake',
'^(?:http|https)://www\\.hua\\.com/product/[0-9]+\\.html':'hua','^(?:http|https)://shop.zhe800.com/products/[0-9a-z]+':'zhe800','^(?:http|https)://www.cosme.com/products/detail.php\\?product_id':'cosme','^(?:http|https)://www.diapers.com/p/':'diapers','^(?:http|https)://www.windeln.de/zh/\\w+-':'windeln','^(?:http|https)://www.windeln.com\\.cn/product/\\d+':'windeln','^(?:http|https)://www.escentual.com/[a-z]+[0-9]+/':'escentual','^(?:http|https)://www.biccamera.com/bc/disp/\\w+':'biccamera','^(?:http|https)://www.esteelauder.com/product/\\d+/\\d+/\\w+':'esteelauder','^(?:http|https)://www.saksfifthavenue.com/main/ProductDetail.jsp':'saksfifthavenue','^(?:http|https)://www.thewatchery.com/detail.asp':'thewatchery','^(?:http|https)://item.tuhu.(cn|com)/Products/':'tuhu','^(?:http|https)://item\\.tuhu\\.cn/Products/[A-Z-]+/\\d+\\.html':'tuhu','^(?:http|https)://eshop.htc.com/mall/zh-CN/htc/[a-z0-9-]+':'htc','^(?:http|https)://roseonly.com.cn/item/[0-9]+.html':'roseonly','^(?:http|https)://www.taqu.cn/goods-\\d+.html':'taqu','^(?:http|https)://shop.jx.189.cn/web/productDetail.action\\?productInfoID':'189','^(?:http|https)://www.bftv.com/product/[0-9]+':'bftv','^(?:http|https)://www.axmall.com.au/p/\\d+\\.html':'axmall','^(?:http|https)://www\\.lovo\\.cn/pr-[0-9]+\\.htm':'lovo','^(?:http|https)://www\\.adidas\\.com\\.cn/item/':'adidas','^(?:http|https)://www\\.smzdm\\.com/p/[0-9]+':'smzdm','^(?:http|https)://www\\.uniqlo\\.cn/product-detail\\.html\\?productCode=[a-z0-9-]+':'uniqlo', // https://www.colipu.com/category3-paper-computerprintingpaper-80columncomputerprintingpaper-colipu-48293.html
'^(?:http|https)://www\\.colipu\\.com/[a-z0-9-]+\\.html':'colipu', // https://b2b.nbdeli.com/pcweb/detail?sku=100002912
'^(?:http|https)://b2b\\.nbdeli\\.com/pcweb/detail\\?sku=\\d+':'nbdeli', // https://www.3c2p.com/views/detail/detail.html?productId=5066002
'^(?:http|https)://www\\.3c2p\\.com/views/detail/detail\\.html\\?productId=\\d+':'3c2p', // https://www.comix.com.cn/3011710.html
'^(?:http|https)://www\\.comix\\.com\\.cn/\\d+\\.html':'comix'}; // '^(?:http|https)://(main|h5)\\.m\\.taobao\\.com/awp/': 'taobao',
module.exports.init = function(){var pageInfo=getPageInfo();__webpack_require__(6).log(pageInfo);var productSites=new Set(Object.values(productPattern).filter(function(x){return typeof x === 'string';}));var allSites=new Set(Object.values(sitePattern).map(function(x){return typeof x === 'string'?x:x.name;}));var noProductSites=new Set([].concat(_toConsumableArray(allSites)).filter(function(x){return !productSites.has(x);}));G.pageInfo = pageInfo; // if (noProductSites.has(G.site)) {
//   require('common/log')('view:unsupportedSite')
// } else {
//   require('common/log')('view:supportedSite:' + pageInfo.type)
// }
// if (G.from_device === 'biyibi') require('common/log')('viewurl')
if(G.sjfix)return;if(G.site && (G.site == 'taobao' || G.site == 'tmall' || G.site.indexOf('taobao') > -1 || G.site == '1688')){G.aliSite = true;if(window.__ASSET_PATH__){ // check UI version
// //g.alicdn.com/detail-project/pc-detail/0.2.49/web/
var match=window.__ASSET_PATH__.match(/\/(\d+\.\d+\.\d+)\/web\//);if(match){var version=match[1];G.aliUIVersion = version;}}}};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {/**
 * Created by cosimo on 2017/2/9.
 */


var _this = this;

var nowPrice = undefined;

function priceExtracor(selectors, radixPoint, split) {
  radixPoint = radixPoint || '.';
  split = split || ',';

  function extractPrice() {
    for (var i = 0; i < selectors.length; i++) {
      var selector = selectors[i];
      var price = document.querySelector(selector);
      if (price) {
        return formatPrice(price.textContent, radixPoint, split);
      }
    }
    return -1;
  }

  return extractPrice;
}

function formatPrice(price, radixPoint, split) {
  radixPoint = radixPoint || '.';
  split = split || ',';
  if (price === -1) {
    return -1;
  }
  if (price) {
    price = price.toString().replace(split, '');
    if (radixPoint && radixPoint !== '.') {
      price = price.replace(radixPoint, '.');
    }
    price = price.match(/[0-9.]+/);
    if (price) {
      try {
        return parseFloat(price[0]);
      } catch (e) {
        return -1;
      }
    }
  }
  return -1;
}
var getPLUSPrice = function getPLUSPrice() {
  var PLUSDom = $('.plus-price .price');
  if (PLUSDom.length === 0) {
    PLUSDom = $('.p-price-plus .price');
  }
  if (PLUSDom) {
    return Number(PLUSDom.text().replace(/[￥¥\s]+/g, ''));
  } else {
    return 0;
  }
};

function parserFactory(extractPrice) {

  function parser(callback) {
    function callbackWrapper(price) {
      if (price <= 0) {
        price = '';
      }
      if (!G.dp) {
        console.warn('G.dp not ready');
        return;
      }
      G.dp.price = price;
      G.dp.oldPrice = price;
      var tle = '';
      if (G.dp.name && (G.dp.site == "360buy" || G.dp.site == "suning")) {
        tle = G.dp.name.trim();
      }
      var priItem = [{
        'url': document.location.href,
        'price': price,
        'tle': tle,
        'crc32': ''
      }];
      if (G.dp.site == "360buy") {
        var PLUS = getPLUSPrice();
        if (PLUS) {
          priItem[0].plus = PLUS;
        }
      }

      G.priItem = priItem;
      // require('common/getListInfo').sendPriCheck(priItem)
    }

    var price = extractPrice();
    if (price === -1 || price == 0 || document.readyState !== 'complete') {
      (function () {
        var tryTimes = 0;

        var interval = setInterval(function () {
          tryTimes++;
          var price = extractPrice();

          if (document.readyState !== 'complete') {
            return;
          }

          if (price > 0 || tryTimes > 4) {
            clearInterval(interval);
            callbackWrapper(price);
          }
        }, 2500);
      })();
    } else {
      nowPrice = price;
      callbackWrapper(price);
    }
    callback(price);
  }

  return parser;
}

function template(selectors) {
  // console.log('selector:', selectors)
  // debugger
  return parserFactory(priceExtracor(selectors));
}

var priceParsers = {};

priceParsers[1] = ['#apex_desktop .a-price .a-offscreen', '#priceblock_dealprice', '#priceblock_saleprice', '#priceblock_ourprice', '#tmmSwatches .a-button-inner .a-button-text .a-color-price', '#tmmSwatches .a-button-inner  .a-color-secondary span', '#soldByThirdParty .offer-price', '#olp_feature_div .a-color-price', '.a-color-price'];
priceParsers[2] = ['#dd-price', '#d_price'];
// priceParsers[3] = ['#J_FinalPrice .price', '#jd-price', '.p-price:not(.dj-price) .price', '#price', '.price']
priceParsers[3] = ['#jd-price', '.p-price:not(.dj-price) .price', '#price', '.price'];
priceParsers[4] = ['.price-type'];
priceParsers[10] = ['#dl_sell_price'];
priceParsers[12] = ['div.promotion-container > p:nth-child(2)'];
priceParsers[13] = ['.dity-price-c'];
priceParsers[14] = ['.price1.salePrice_big'];
priceParsers[17] = ['.leftPrice'];
priceParsers[18] = ['.message_price', '.message_title_name_b'];
priceParsers[19] = ['.tehuiMoney'];
priceParsers[21] = ['#prodPriceAj'];
priceParsers[22] = ['#product_price'];
priceParsers[24] = ['.d-real-price'];
priceParsers[25] = ['.mainprice', '.small-price'];
priceParsers[28] = ['#prdPrice', '#salePrice'];
priceParsers[31] = ['#pricenow', '#current_price', '#detail_prom_price', ''];
priceParsers[32] = ['#buyPrice'];
priceParsers[33] = ['#leyoujia', '.item_l .font_num'];
priceParsers[34] = ['.selPrice'];
priceParsers[35] = ['#prd_price_div'];
priceParsers[39] = ['.price .value'];
priceParsers[40] = ['.Gd_shop_Price b'];
priceParsers[41] = ['.js.jsj b'];
priceParsers[43] = ['.price'];
priceParsers[45] = ['.price .action-price'];
priceParsers[50] = ['pro_promotion_price', '#pro_mall_price'];
priceParsers[51] = ['#SGoodsPrice'];
priceParsers[54] = ['#mprice'];
priceParsers[60] = ['#xxjg .pro_buy_sen', '#xxjg .pro_buy_dis option:last-child'];
priceParsers[61] = ['.tehuijia i:last-child .thisprice', '.priceList:last-child span'];
priceParsers[62] = ['.info-main .price-n b'];
priceParsers[66] = ['.YTPrice'];
priceParsers[72] = ['.price_now', ''];
priceParsers[73] = ['#productShowPrice'];
priceParsers[75] = ['.fsk_goods_price', '.gd_price'];
priceParsers[83] = ['#J_PromoBox .tb-wrTuan-num', '.tm-promo-price .tm-price', '.tm-price'];
priceParsers[84] = ['.buy_pri', '.dynamic-price'];
priceParsers[86] = ['.price_num', '.deal_accout_two', '.jumei_price', '.price_now'];
priceParsers[93] = ['#yitianPrice'];
priceParsers[94] = ['.good_price'];
priceParsers[97] = ['#price_big em', '.FFA em'];
priceParsers[98] = ['.p-price'];
priceParsers[99] = ['#shopprice'];
priceParsers[100] = ['#salePriceText'];
priceParsers[101] = ['.myPrice em'];
priceParsers[102] = ['#jiage .numb'];
priceParsers[103] = ['#nowPrice strong'];
priceParsers[108] = ['#spPrice'];
priceParsers[109] = ['.sku-price'];
priceParsers[110] = ['#bk-d-price'];
priceParsers[115] = ['.mprice', '.p_mp'];
priceParsers[123] = ['#J_PromoPriceNum', '#J_StrPrice'];
priceParsers[125] = ['.dPrice'];
priceParsers[126] = ['#price-sf .price'];
priceParsers[127] = ['#intro_price .price'];
priceParsers[128] = ['#price'];
priceParsers[129] = ['#J-sale-price', '.J-price'];
priceParsers[134] = ['#pro-price'];
priceParsers[135] = ['.de_info_price'];
priceParsers[138] = ['#ECS_SHOPPRICE'];
priceParsers[140] = ['.groupdetail_nowprice', '.dsingle_nowprice'];
priceParsers[141] = ['#jianyiPrice'];
priceParsers[142] = ['.spare02'];
priceParsers[145] = ['#pdpPrice .discount', '#pdpPrice', '.discou'];
priceParsers[146] = ['.action-price'];
priceParsers[147] = ['#postPrice'];
priceParsers[152] = ['.detail-item-gold'];
priceParsers[153] = ['#g5_price'];
priceParsers[154] = ['.promote_price'];
priceParsers[155] = ['.cur-price'];
priceParsers[156] = ['#secooPriceJs'];
priceParsers[157] = ['#prod_price'];
priceParsers[158] = ['.price24'];
priceParsers[164] = ['.jg_cuhong', '#myjgcuhong'];
priceParsers[167] = ['.J_mi_goodsPrice', '.money', '.J_currentPrice', 'J_proPrice', '.price'];
priceParsers[168] = ['.letv_price', '#js_price'];
priceParsers[174] = ['.pro-price'];
priceParsers[180] = ['#J_product_value', '.info-price'];
priceParsers[182] = ['.detail_price', '.coupon_price'];
priceParsers[184] = ['.promotion-price .price', '.price'];
priceParsers[188] = ['#goodsPrice'];
priceParsers[194] = ['.action-price'];
priceParsers[195] = ['#item_price'];
priceParsers[196] = ['.price strong'];
priceParsers[197] = ['.ms_price strong'];
priceParsers[202] = ['#J_NowPrice'];
priceParsers[203] = ['#J_NowPrice'];
priceParsers[210] = ['#g_price'];
priceParsers[213] = ['#offerPrice'];
priceParsers[221] = ['.price'];
priceParsers[222] = ['#rprice'];
priceParsers[223] = ['.currentPrice'];
priceParsers[226] = ['.mainPrice'];
priceParsers[227] = ['.sale-price'];
priceParsers[228] = priceParsers[1];
priceParsers[229] = priceParsers[1];
priceParsers[230] = ['#prcIsum'];
priceParsers[231] = ['.p-current-price .p-price'];
priceParsers[232] = ['.action-price'];
priceParsers[233] = ['.js-pdpLocalPrice'];
priceParsers[234] = ['#saleprice_value'];
priceParsers[235] = ['.detail_tzh span'];
priceParsers[236] = ['.pro_price span'];
priceParsers[237] = ['.view-SkuPriceInfo .price', '.view-SkuPriceInfo i'];
priceParsers[238] = ['#priceSlot .price', '._37Y6D ._3r_Ou'];
priceParsers[239] = ['.product-price'];
priceParsers[241] = ['.priceBlock .salePrice', '.priceBlock'];
priceParsers[242] = ['.ng-binding.wag-bold'];
priceParsers[243] = ['#displayPrice'];
priceParsers[244] = ['.price-main-product .price-current', '.price-current'];
priceParsers[245] = ['#final-price'];
priceParsers[246] = function () {
  parserFactory(priceExtracor(['#priceblock_dealprice', '#priceblock_ourprice', '#tmmSwatches .a-button-inner  .a-color-secondary span', '#soldByThirdParty .offer-price', '#olp_feature_div .a-color-price'], ',', '.'));
};
priceParsers[247] = ['#pricing td.highlight'];
priceParsers[248] = ['.product-price .price'];
priceParsers[249] = ['#js-product-information-price .product-current-price', '.main-product-details .compare-price__display'];
priceParsers[251] = ['.product-price-container .price-sales '];
priceParsers[252] = ['.detail-price', 's_discountpricenew', '.cutpriceposition'];
priceParsers[256] = ['#price'];
priceParsers[259] = ['#Price .productPrice'];
priceParsers[260] = ['#productPrice .nowPrice', '#productPrice'];
priceParsers[261] = ['#pdpMainPrice .pOurPriceM', '#pdpSubPrice .pRetailPrice:nth-child(2)', '.pRetailPrice', '#pdpMainPrice'];
priceParsers[263] = ['.priceSale'];
priceParsers[264] = ['.price-set'];
priceParsers[266] = priceParsers[1];
priceParsers[267] = ['.goods-data .goods-price span'];
priceParsers[268] = ['.goods-price-r1 strong'];
priceParsers[269] = ['#productRMB'];
priceParsers[270] = ['.j_PriceNum', '.price'];
priceParsers[271] = ['.price', '.product_price_cont'];
priceParsers[272] = ['.action-price'];
priceParsers[273] = ['.product_top_r span.fs20'];
priceParsers[274] = ['#jScarePrice', '.jFirstPrice'];
priceParsers[275] = ['.rmb-price'];
priceParsers[276] = ['.Price'];
priceParsers[277] = ['#currPrice'];
priceParsers[279] = ['.product_price', 'price_rmb'];
priceParsers[280] = ['#goodsCurrentPrice', '.prdsale strong'];
priceParsers[281] = ['#bqPrice', '.price span'];
priceParsers[285] = ['.price .current'];
priceParsers[286] = ['.j-item-now-price'];
priceParsers[287] = ['.xprice_val[itemprop="lowPrice"]'];
priceParsers[288] = ['.action-price'];
priceParsers[289] = ['.current_price'];
priceParsers[290] = ['.price'];
priceParsers[291] = ['#priceDiv .nowPrice'];
priceParsers[292] = ['.item-actPrice'];
priceParsers[294] = ['#salePriceSpan'];
priceParsers[295] = ['.price-sell .price-num'];
priceParsers[299] = ['.pro_price .price'];
priceParsers[300] = ['#priceDomId'];
priceParsers[305] = ['.autoShipPrice', '.singlePrice'];
priceParsers[306] = ['.product-price div'];
priceParsers[311] = ['.product-full__price', '.spp-product__mini-bag-price-size'];
priceParsers[313] = ['#details-price'];
priceParsers[328] = ['.goodsprice'];
priceParsers[330] = ['#you_pay.price', '.price'];
priceParsers[337] = ['.price'];
priceParsers[338] = ['.js-price'];
priceParsers[340] = ['.singlePrice'];
priceParsers[341] = ['.product-price .price'];
priceParsers[343] = ['.bose-price__price'];
priceParsers[344] = ['.item-price'];
priceParsers[345] = ['.ypYouPay'];
priceParsers[347] = ['#FlashPrice'];
priceParsers[348] = ['.goods-price .price1'];
priceParsers[349] = ['.j-retail-price'];
priceParsers[351] = ['.tm_jg #ECS_SHOPPRICE', '#ECS_SHOPPRICE'];
priceParsers[352] = ['.price-b .new'];
priceParsers[354] = ['.detail-last-price'];
priceParsers[355] = ['.price-item.current .value'];
priceParsers[356] = ['.m-price'];
priceParsers[357] = ['.product-price .price'];
priceParsers[362] = ['.DetailPriceContain .PriceNow'];
priceParsers[363] = ['.current-price'];
priceParsers[364] = ['.price'];
priceParsers[365] = priceParsers[246];
priceParsers[366] = priceParsers[1];
priceParsers[367] = ['.itemInfo .price'];
priceParsers[368] = ['#salePriceId'];
priceParsers[369] = ['#jd-price'];
priceParsers[370] = ['.g-group-price', '#kaluliPrice'];
priceParsers[371] = ['#show_goods_price [name="goods_real_price"]'];
priceParsers[372] = ['.price'];
priceParsers[373] = ['#bb_price'];
priceParsers[374] = ['#opr'];
priceParsers[376] = ['#JgoodsPrice'];
priceParsers[377] = ['.action-pro_price', 'action-price', '.price'];
priceParsers[378] = ['.jFirstPrice'];
priceParsers[379] = ['.action-price'];
priceParsers[380] = ['.now-price'];
priceParsers[381] = ['.priceAndService .price'];
priceParsers[382] = ['.sale-price'];
priceParsers[385] = ['#salePrice'];
priceParsers[386] = ['.price-box .price-product'];
priceParsers[387] = ['.spare02_price'];
priceParsers[388] = ['.current-price'];
priceParsers[389] = ['.price-info .current-price'];
priceParsers[390] = ['.shop-nature1 [price]'];
priceParsers[391] = ['.m-price'];
priceParsers[392] = ['.now-price'];
priceParsers[393] = ['.current-price'];
priceParsers[394] = ['.current-price .price-number'];
priceParsers[395] = ['.rmb-price'];
priceParsers[396] = ['.now .price'];
priceParsers[397] = ['.DetailPrice .PriceNow'];
priceParsers[398] = ['.last_prices .price'];
priceParsers[399] = ['.price-number'];
priceParsers[400] = ['.product-property .current-price'];
priceParsers[401] = ['.product-shop .PriceNow'];
priceParsers[402] = ['.price-number'];
priceParsers[403] = function () {
  parserFactory(priceExtracor(['.price-productdesc'], ',', '.'));
};
priceParsers[404] = ['.price-current'];
priceParsers[405] = ['.price-info .price'];
priceParsers[406] = ['.d-price'];
priceParsers[407] = ['.goods-price'];
priceParsers[408] = ['#product-summary .price'];
priceParsers[409] = ['.price_sale'];
priceParsers[410] = ['.salePrice', '.nowPrice'];
priceParsers[411] = ['#skuPrice'];
priceParsers[412] = ['#item-price .font-bold', '#item-price'];
priceParsers[413] = ['#productPriceInfo .m_price'];
priceParsers[414] = ['.wb-price span'];
priceParsers[415] = ['.product-price .price'];
priceParsers[416] = ['#price'];
priceParsers[417] = ['.special-price .price', '.price'];
priceParsers[418] = ['.final', '.here_price strong'];
priceParsers[419] = ['.market-price'];
priceParsers[420] = ['#salePrice'];
priceParsers[423] = ['.price'];
priceParsers[424] = ['.price-current', '.regular-price'];
priceParsers[427] = ['.redSalePrice', '.product-price-big .price-wrapper'];
priceParsers[428] = ['.monetary-price-value'];
priceParsers[429] = priceParsers[427];
priceParsers[430] = ['.num_span'];
priceParsers[431] = ['#mall_price'];
priceParsers[432] = ['#price_current'];
priceParsers[433] = ['.action-price'];
priceParsers[434] = ['.price'];
priceParsers[435] = ['.goodsprice'];

// 没有匹配到id的时候
priceParsers[9999] = function () {
  return function (callback) {
    callback();
  };
};

module.exports.clear = function () {
  nowPrice = null;
};

var sitePriceElements = {
  '360buy': '.p-price .price'
};

module.exports.init = function callee$0$0(siteId, callback) {
  var s;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(location.host === 'www.amazon.de')) {
          context$1$0.next = 3;
          break;
        }

        callback(G.dp.oldPrice);
        return context$1$0.abrupt('return');

      case 3:
        if (!nowPrice) {
          context$1$0.next = 6;
          break;
        }

        callback(nowPrice);
        return context$1$0.abrupt('return');

      case 6:
        if (!sitePriceElements[G.site]) {
          context$1$0.next = 9;
          break;
        }

        context$1$0.next = 9;
        return regeneratorRuntime.awrap(Promise.race([__webpack_require__(10).sleep(3000), __webpack_require__(11).waitForConditionFn(function () {
          return $(sitePriceElements[G.site]).text();
        })]));

      case 9:
        s = priceParsers[siteId];

        if (s instanceof Array) {
          template(s)(callback);
        } else if (s instanceof Object && s.prototype) {
          s()(callback);
        } else {
          callback();
        }

      case 11:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 37 */
/***/ (function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
var stylesInDom = {},
	memoize = function(fn) {
		var memo;
		return function () {
			if (typeof memo === "undefined") memo = fn.apply(this, arguments);
			return memo;
		};
	},
	isOldIE = memoize(function() {
		return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
	}),
	getHeadElement = memoize(function () {
		return document.head || document.getElementsByTagName("head")[0];
	}),
	singletonElement = null,
	singletonCounter = 0,
	styleElementsInsertedAtTop = [];

module.exports = function(list, options) {
	if(typeof DEBUG !== "undefined" && DEBUG) {
		if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};
	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (typeof options.singleton === "undefined") options.singleton = isOldIE();

	// By default, add <style> tags to the bottom of <head>.
	if (typeof options.insertAt === "undefined") options.insertAt = "bottom";

	var styles = listToStyles(list);
	addStylesToDom(styles, options);

	return function update(newList) {
		var mayRemove = [];
		for(var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];
			domStyle.refs--;
			mayRemove.push(domStyle);
		}
		if(newList) {
			var newStyles = listToStyles(newList);
			addStylesToDom(newStyles, options);
		}
		for(var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];
			if(domStyle.refs === 0) {
				for(var j = 0; j < domStyle.parts.length; j++)
					domStyle.parts[j]();
				delete stylesInDom[domStyle.id];
			}
		}
	};
}

function addStylesToDom(styles, options) {
	for(var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];
		if(domStyle) {
			domStyle.refs++;
			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}
			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];
			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}
			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles(list) {
	var styles = [];
	var newStyles = {};
	for(var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};
		if(!newStyles[id])
			styles.push(newStyles[id] = {id: id, parts: [part]});
		else
			newStyles[id].parts.push(part);
	}
	return styles;
}

function insertStyleElement(options, styleElement) {
	var head = getHeadElement();
	var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
	if (options.insertAt === "top") {
		if(!lastStyleElementInsertedAtTop) {
			head.insertBefore(styleElement, head.firstChild);
		} else if(lastStyleElementInsertedAtTop.nextSibling) {
			head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			head.appendChild(styleElement);
		}
		styleElementsInsertedAtTop.push(styleElement);
	} else if (options.insertAt === "bottom") {
		head.appendChild(styleElement);
	} else {
		throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
	}
}

function removeStyleElement(styleElement) {
	styleElement.parentNode.removeChild(styleElement);
	var idx = styleElementsInsertedAtTop.indexOf(styleElement);
	if(idx >= 0) {
		styleElementsInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement(options) {
	var styleElement = document.createElement("style");
	styleElement.type = "text/css";
	insertStyleElement(options, styleElement);
	return styleElement;
}

function createLinkElement(options) {
	var linkElement = document.createElement("link");
	linkElement.rel = "stylesheet";
	insertStyleElement(options, linkElement);
	return linkElement;
}

function addStyle(obj, options) {
	var styleElement, update, remove;

	if (options.singleton) {
		var styleIndex = singletonCounter++;
		styleElement = singletonElement || (singletonElement = createStyleElement(options));
		update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
		remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
	} else if(obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function") {
		styleElement = createLinkElement(options);
		update = updateLink.bind(null, styleElement);
		remove = function() {
			removeStyleElement(styleElement);
			if(styleElement.href)
				URL.revokeObjectURL(styleElement.href);
		};
	} else {
		styleElement = createStyleElement(options);
		update = applyToTag.bind(null, styleElement);
		remove = function() {
			removeStyleElement(styleElement);
		};
	}

	update(obj);

	return function updateStyle(newObj) {
		if(newObj) {
			if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
				return;
			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;
		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag(styleElement, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (styleElement.styleSheet) {
		styleElement.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = styleElement.childNodes;
		if (childNodes[index]) styleElement.removeChild(childNodes[index]);
		if (childNodes.length) {
			styleElement.insertBefore(cssNode, childNodes[index]);
		} else {
			styleElement.appendChild(cssNode);
		}
	}
}

function applyToTag(styleElement, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		styleElement.setAttribute("media", media)
	}

	if(styleElement.styleSheet) {
		styleElement.styleSheet.cssText = css;
	} else {
		while(styleElement.firstChild) {
			styleElement.removeChild(styleElement.firstChild);
		}
		styleElement.appendChild(document.createTextNode(css));
	}
}

function updateLink(linkElement, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	if(sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = linkElement.href;

	linkElement.href = URL.createObjectURL(blob);

	if(oldSrc)
		URL.revokeObjectURL(oldSrc);
}


/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var pidConfig = __webpack_require__(268);
var request = __webpack_require__(3);

module.exports.init = function (id, style, callback) {
  var pidInfo = pidConfig.init(id, style);
  var dp_id = G.dp.itemId;
  if (!dp_id) {
    if (G.site === 'taobao-ju') {
      dp_id = location.href.match(/item_id=(\d+)/)[1];
    }
  }
  getInfo(dp_id, pidInfo, callback);
};

module.exports.initWithDp = function (dpId, id, style, callback) {
  var pidInfo = pidConfig.init(id, style);
  getInfo(dpId, pidInfo, callback);
};

module.exports.initWithDpAsync = function (dpId, id, style) {
  var pidInfo = pidConfig.init(id, style);
  return new Promise(function (resolve) {
    getInfo(dpId, pidInfo, resolve);
  });
};

var getInfo = function getInfo(dpId, pidInfo, callback) {
  var dp_id = dpId;
  if (!dp_id) return;
  dp_id = '' + dp_id;
  dp_id = dp_id.replace('-83', '');
  if (!pidInfo) pidInfo = { token: 'visit', pid: 'show' };
  var url = 'https://q.apptimes.cn/union/coupon/' + pidInfo.token + '?pid=' + pidInfo.pid + '&good_id=' + dp_id;
  request.getCouponFromUrl(url).then(function (res) {
    var data = res;
    //console.log(res)
    if (data && data.data) {
      data.data.reqid = dp_id;
      data.data.click_url2 = G.u_server + '/?url=' + encodeURIComponent(data.data.click_url) + '&union=' + G.union;
      if (G.from_device === 'bijiago' && G.aliSite) {
        data.data.click_url2 = 'https://tb.' + (G.ss_name === 'priceDog' ? 'pricedog' : 'bijiago') + '.com/extension/qrpage?union=' + G.union + '&dp_id=' + dpId + '&tag=9_chrome&discount=' + data.data.coupon.coupon_money;
      }
      if (G.from_device === 'biyibi' && G.aliSite) {
        data.data.click_url2 = 'https://tb.biyibi123.com/extension/qrpage?union=' + G.union + '&dp_id=' + dpId + '&tag=9_chrome&discount=' + data.data.coupon.coupon_money;
      }
    }
    callback(res);
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

module.exports = {
  getString: function getString(config, key) {
    var u = 'zh';
    if (G.lang) {
      u = G.lang;
    }
    if (G.ss_name === 'pricedog') {
      u = 'zh-tr';
    }
    return config[key][u];
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = {
  observe: function observe(dom, cb) {
    var config = arguments.length <= 2 || arguments[2] === undefined ? {
      subtree: true,
      attributes: true
    } : arguments[2];

    var observer = new MutationObserver(function (mutations, observer) {
      if (cb) {
        cb(mutations, observer);
      }
    });

    try {
      if (typeof dom === 'string') {
        dom = document.querySelector(dom);
      }
      observer.observe(dom, config);
    } catch (e) {
      __webpack_require__(6).error(e);
    }
  }
};

/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

var request = __webpack_require__(3);
var template = __webpack_require__(13);

module.exports = {
  init: function init(hasCoupon) {
    var configUrl, config, c, onlyCenter, t, s, e, html, html2, version;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!window.bjgActivity) {
            context$1$0.next = 2;
            break;
          }

          return context$1$0.abrupt('return');

        case 2:
          if (!(G.ss_name === 'priceDog')) {
            context$1$0.next = 5;
            break;
          }

          __webpack_require__(102).init(hasCoupon);
          return context$1$0.abrupt('return');

        case 5:
          window.bjgActivity = true;
          configUrl = 'https://cdn.bijiago.com/js/configs/activity-bijiago-online.json';

          if (G.from_device === 'biyibi') {
            configUrl = 'https://cdn.bijiago.com/js/configs/activity-biyibi.json';
          }
          context$1$0.next = 10;
          return regeneratorRuntime.awrap(request.rawGet(configUrl));

        case 10:
          config = context$1$0.sent;

          if (config.aliActivity && G.aliSite) {
            c = config.aliActivity;
            onlyCenter = false;

            if (c.disableWhenHasCoupon && hasCoupon) {
              onlyCenter = true;
            }
            t = new Date();
            s = new Date(c.start);
            e = new Date(c.end);

            if (t < e && t > s) {
              if (!onlyCenter) {
                if (window.innerWidth - $('#bjgext_mainbar').outerWidth() > 160) {
                  html = template.compile(__webpack_require__(355))({
                    img: c.bottom.img,
                    qr: c.bottom.qr,
                    extClass: '',
                    link: c.link
                  });

                  $('#bjgext_mainbar .common-banner').after(html);
                  __webpack_require__(12).hoverLog('.gwd-bottom-tmall', '底部活动二维码');
                }

                html2 = template.compile(__webpack_require__(356))({
                  qr: c.top.qr,
                  text: c.middle.text,
                  link: c.link
                });

                $('#bjgext_minibar').after(html2);
              }

              if (true) {
                (function () {
                  // 中间
                  var html = template.compile(__webpack_require__(357))({
                    img: c.top.img,
                    qr: c.top.qr,
                    text: c.center.text,
                    extClass: '',
                    link: c.link,
                    qrText: c.qrText
                  });
                  // $('.bjgext-mini-trend').after(html)
                  $('.gwd-middle-tmall').css('border', '1px solid #f1f1f1');

                  var centerLogged = false;
                  __webpack_require__(12).log('中间活动二维码', '曝光');
                  setTimeout(function () {
                    $('.gwd-middle-tmall').hover(function () {
                      if (!centerLogged) {
                        centerLogged = true;
                        __webpack_require__(12).log('中间活动二维码', '悬浮');
                      }
                    });
                    $('.gwd-take').hover(function () {
                      if (!centerLogged) {
                        centerLogged = true;
                        __webpack_require__(12).log('中间活动二维码', '悬浮');
                      }
                    });
                  }, 0);
                })();
              }
            } else if (G.from_device === 'biyibi' && G.mv3) {
              // if (!hasCoupon) {
              //   $('#bjgext_mainbar .common-banner').after('<a href="https://www.biyibi.com" id="bijiago-banner-ad" target="_blank" class="rinfo-btn close-models" title="点击领取" style="width: initial;"></a>')
              // }
            }
          }
          if (config.jdActivity && G.site === '360buy') {
            c = config.jdActivity;
            t = new Date();

            if (t < new Date(c.end) && t > new Date(c.start)) {
              $('#bijiago-banner-ad').remove();

              if (!hasCoupon) {
                if (c.center.textlong) {
                  html = template.compile(__webpack_require__(358))({
                    link: c.center.link,
                    text: c.center.textlong
                  });

                  $('#bjgext_minibar').append(html);

                  $('.bjgext-toptabs').css('width', '100%');
                  // $('.minibar-tab').css('width', '128px')
                  // $('.gwd-middle-tmall').css('width', '159px;')
                }

                if (window.innerWidth - $('#bjgext_mainbar').outerWidth() > 160) {
                  html = '<a href="' + c.bottom.link + '" target="_blank" class="rinfo-btn" title="点击领取" style="width: initial; margin-left: 8px; margin-right: 8px"><img style="height: 48px" src="' + c.bottom.img + '"/></a>';

                  $('#bjgext_mainbar .common-banner').after(html);
                }
              }
            } else {
              if (window.bjgAutoPriceProtect && !hasCoupon && !G.disableLogin) {
                html = __webpack_require__(359);

                $('.bjgext-toptabs').after(html);
              }
            }
          }

          if (!(G.from_device === 'biyibi' && G.mv3 && !navigator.userAgent.toLowerCase().includes('edg'))) {
            context$1$0.next = 18;
            break;
          }

          context$1$0.next = 16;
          return regeneratorRuntime.awrap(request.rawGet('https://cdn.bijiago.com/js/configs/biyibi-version.json'));

        case 16:
          version = context$1$0.sent;

          if (version.build > G.version) {
            $('#bijiago-banner-ad').html(version.HTML);
            $('#bijiago-banner-ad').attr('href', version.link);
            $('#bijiago-banner-ad').attr('title', '');
          }

        case 18:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

// 底部

// 购物党中间

// 购物党底部

// check version.json for updates
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['tag'],
  data: function data() {
    return {
      qr: '',
      loading: false
    };
  },
  computed: {
    link: function link() {
      return __webpack_require__(20).appendTbInfoForUrl(G.tb_server + '/extension/qrpage?union=' + G.union + '&dp_id=' + (this.dpId ? this.dpId : G.dp.dpId) + '&tag=' + this.tag);
    }
  },
  methods: {
    getText: function getText(text) {
      var map = {
        '当前商品可领会员券': '當前商品可領會員券',
        '立即领取': '立即領取',
        '手淘扫码': '手淘掃碼',
        '联系客服领取': '聯系客服領取'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    over: function over() {
      var _this = this;

      if (this.tag === 2) {
        __webpack_require__(12).logOnce('淘宝会员券:悬浮');
      }
      if (this.loading || this.qr) return;
      this.loading = true;
      __webpack_require__(3).rawGet(G.u_server + ('/helper/qrcode?union=' + G.union + (this.url ? '&url=' + this.url : '') + '&event=appQrcode' + (this.tag ? '&tag=' + this.tag : '') + '&dp_id=') + (this.dpId ? this.dpId : G.dp.dpId)).then(function (res) {
        if (typeof res === 'string') {
          res = JSON.parse(res);
        }
        _this.qr = res.data.qrImgStr;
      });
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var b2cCompare = __webpack_require__(438);
var tbCompare2 = __webpack_require__(442);
var amazonGlobal = __webpack_require__(446);
var calWidth = __webpack_require__(53);
var utils = __webpack_require__(11);
var log = __webpack_require__(14);

var runDp = {};

var moduleControl = function moduleControl(id) {
  log('track:' + id);
  switch (id) {
    case 'b2c_compare':
      b2cCompare.renderTopDetail();
      break;
    case 'tb_compare':
      tbCompare2.renderTopDetail2('taobao');
      break;
    case 'tm_compare':
      tbCompare2.renderTopDetail2('tmall');
      break;
    case 'amazon_compare':
      amazonGlobal.renderTopDetail('tmall');
      break;
  }
};
var checkImage = function checkImage(dom, src) {
  var image = new Image();
  image.onload = function () {
    $(dom).attr('src', src);
  };
  image.onerror = function () {
    $(dom).attr('src', G.noImg);
  };
  image.src = src;
};
var turnPage = function turnPage(type, dom, id) {
  var widthObj = calWidth.init();
  var list = dom.find('.all-products li');
  var totalP = Number(dom.find('.page-num').text());
  var curentP = Number(dom.find('.current-page').text());
  var sNum = widthObj.b2cShowListNum;
  if (id.indexOf('b2c') === -1) {
    sNum = widthObj.showListNum;
  }

  list.hide();
  if (type === 1) {
    if (curentP === totalP) curentP = 0;
    module.exports.loadImg(sNum * curentP, sNum * (curentP + 1), dom.find('.all-products li img'));
    for (var i = sNum * curentP; i < sNum * (curentP + 1); i++) {
      list.eq(i).show();
    }
    curentP++;
  } else {
    if (curentP === 1) curentP = totalP + 1;
    module.exports.loadImg(sNum * (curentP - 2), sNum * (curentP - 1), dom.find('.all-products li img'));
    for (var i = sNum * (curentP - 2); i < sNum * (curentP - 1); i++) {
      list.eq(i).show();
    }
    curentP--;
  }
  dom.find('.current-page').text(curentP);
};
module.exports.loadImg = function (start, end, dom) {
  for (var i = start; i < end; i++) {
    var itemimg = $(dom).eq(i)[0];
    if (!itemimg) return;
    var src = itemimg.getAttribute('data-original');
    var defaultsrc = itemimg.src;
    if (src !== defaultsrc) checkImage(itemimg, src);
  }
};

var autoFixWidth = function autoFixWidth() {
  var reset = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];

  var barW = $(window).width();
  if (reset) {
    $('.gwd-hidden').removeClass('gwd-hidden');
  }
  var feedW = $('#gwdang-feed-close').outerWidth();
  var history = $('#gwd_history').outerWidth();
  var searchW = $('.search-mod').outerWidth();
  var lowW = $('#gwd_lowpri').outerWidth();
  var leftW = $('.gwd-topbar-left').outerWidth();
  var logoW = $('.gwd-topbar-logo').outerWidth();
  var promoW = $('#promo_quan_btn').outerWidth();
  var adWidth = $('#gwdang-banner-ad').outerWidth();
  var adWidth2 = $('#gwdang-banner-ad2').outerWidth();
  var shareBtn = $('.shareExt').outerWidth();
  var suggestW = $('.gwdang-suggest').outerWidth();
  //let freeW = barW - (feedW + history + searchW + lowW + leftW + logoW + adWidth + adWidth2 + shareBtn);
  //if (freeW < -1000) return;
  var freeW = $('#gwd-space').outerWidth();
  if ($('#gwd-space').outerWidth() > 10) {
    return;
  }
  var list = ['.shareExt', '.gwdang-suggest', '.search-mod', '#gwd_history', '#gwdang-favor'];
  if (freeW < 5) {
    for (var i = 0; i < list.length; i++) {
      var toCheck = list[i];
      if (!$(toCheck)[0]) continue;
      if (!$(toCheck).hasClass('gwd-hidden')) {
        $(toCheck).addClass('gwd-hidden');
        setTimeout(function () {
          autoFixWidth(false);
        }, 0);
        return;
      }
    }
  }
  if (freeW < 50) {
    $('.shareExt').addClass('gwd-hidden');
    freeW += searchW;
  }
  if (freeW < 50) {
    $('.gwdang-suggest').addClass('gwd-hidden');
    freeW += searchW;
  }
  if (freeW < 50) {
    $('.search-mod').addClass('gwd-hidden');
    freeW += searchW;
  }
  if (freeW < 50) {
    $('#gwd_history').addClass('gwd-hidden');
    freeW += history;
  }
  if (freeW < 50) {
    $('#gwdang-banner-ad2').addClass('gwd-hidden');
    freeW += adWidth2;
  }
  if (freeW < 50) {
    $('#gwd_lowpri').addClass('gwd-hidden');
    $('.gwd-topbar-right').css('min-width', 'auto');
    freeW += lowW;
  }
  if (freeW < 50) {
    $('#promo_quan_btn').addClass('gwd-hidden');
    freeW += promoW;
  }
  if ($('.gwd-topbar-right').outerWidth() === 400) {
    $('.gwd-topbar-right').css('min-width', 'auto');
  }
};
module.exports.autoFixWidth = autoFixWidth;
module.exports.clearRunDp = function () {
  runDp = {};
};

module.exports.listenBar = function (style) {
  runDp = {};
  var renderSetting = undefined;
  if (style === 'top') {
    $(G.dval).on('mouseenter', '.gwdang-tab', function () {
      var id = $(this).attr('id');
      if (!runDp[id] && id !== 'gwdang-trend') {
        runDp[id] = true;
        moduleControl(id);
      } else {
        //$(this).find('.top-bar-detail').show()
        $(document).trigger('renderAgain');
      }
      $(this).addClass('tab-hover');
    });
    $(G.dval).on('mouseleave', '.gwdang-tab', function () {
      var id = $(this).attr('id');
      // 价格走势的展开框因为有特殊情况， 所以不在这里隐藏， 单独添加事件监控
      if (id === 'gwdang-trend') return false;
      //$('.top-bar-detail').hide()
      $(this).removeClass('tab-hover');
    });
    $(G.dval).on('click', '.turn-page a', function () {
      var id = $(this).attr('id');
      var dom = $(this).parent().parent();
      if (id.match(/(?:b2c|taobao|tmall|fuzzy)-prev-page/)) {
        turnPage(-1, dom, id);
      } else if (id.match(/(?:b2c|taobao|tmall|fuzzy)-next-page/)) {
        turnPage(1, dom, id);
      }
    });
    $('.gwd_close').on('click', function () {
      $('#gwdang_main').hide();
      $('#gwdang-mini').show();
      utils.setLocal('fold', '1');
      utils.settings('set_p_fold', 'p_fold', '1');
      $('body').css('padding-top', '0px').removeClass('gwd_unfold');
    });
    $('#gwd_fold_pointer').on('click', function () {
      $('#gwdang_main').show();
      $('#gwdang-mini').hide();
      utils.setLocal('fold', '0');
      utils.settings('set_p_fold', 'p_fold', '0');
      $('body').css('padding-top', '36px').addClass('gwd_unfold');
      autoFixWidth();
    });
  } else {
    $('#bjd_bottom_detail').on('mouseenter', '.btm-tab', function () {
      $(this).find('.gwd-btn-detail').show();
    });
    $('#bjd_bottom_detail').on('mouseleave', '.btm-tab', function () {
      $(this).find('.gwd-btn-detail').hide();
    });
  }
  var resizeT = undefined;
  $(window).resize(function () {
    clearTimeout(resizeT);
    resizeT = setTimeout(function () {
      autoFixWidth();
    }, 500);
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var domains = {
  '\\.jd\\.com': '360buy',
  'dangdang\\.com': 'dangdang',
  'vmei\\.com': 'vmei',
  'tootoo\\.cn': 'tootoo',
  'www\\.spider\\.com\\.cn': 'spider',
  '.*?boqii\\.com': 'boqii',
  'www\\.51din\\.com': '51din',
  'www\\.haituncun\\.com': 'haituncun',
  'yunhou\\.com': 'yunhou',
  '.*?vip\\.com': 'vip',
  'www\\.mallvv\\.com': 'homevv',
  'rayi\\.cn': 'rayi',
  'www\\.yaofang\\.cn': 'yaofang',
  'www\\.likeface\\.com': 'likeface',
  'www\\.guopi\\.com': 'guopi',
  'www\\.menglu\\.com': 'menglu',
  '(.*?)\\.m18\\.com': 'm18',
  '\\.efeihu\\.com': 'efeihu',
  '//www\\.mei\\.com/silo/.*-event-event\\.html': 'mei',
  'benlai\\.com': 'benlai',
  '//www\\.kjt\\.com': 'kjt',
  'www\\.kjt\\.com': 'kjt',
  'bestinfoods.com': 'bestinfoods',
  '\\.j1\\.com': 'j1',
  'yummy77\\.com': 'yummy77',
  '\\.360kxr\\.com': '360kxr',
  'item\\.feiniu\\.com': 'feiniu',
  'shop\\.lenovomobile\\.com': 'lenovo',
  'supuy\\.com': 'supuy',
  'supumall\\.com': 'supumall',
  'yohobuy\\.com': 'yohobuy',
  'mf910\\.com': 'mf910',
  'sundan\\.com': 'sundan',
  '\\.tao3c\\.com': 'tao3c',
  'aidai\\.com': 'aidai',
  'x\\.com\\.cn': 'x',
  'feifei\\.(?:cn|com)': 'feifei',
  'lovo\\.cn': 'lovo',
  'yintai\\.com': 'yintai',
  'banggo\\.com': 'banggo',
  '5lux\\.com': '5lux',
  'amazon\\.de': 'amazon_de',
  '\\.paixie\\.net': 'paixie',
  '\\.handu\\.com': 'handu',
  '\\.gou\\.com': 'm6go',
  'minshengec\\.com': 'minshengec',
  'lemall\\.com': 'lemall',
  'ocj\\.com\\.cn': 'ocj',
  'nike\\.com': 'nike',
  'sfbest\\.(?:hk|com)': 'sfbest',
  '\\.winxuan\\.com': 'winxuan',
  '\\.shopin\\.net': 'shopin',
  '\\.mbaobao\\.com': 'mbaobao',
  'www\\.ymatou\\.com': 'ymatou',
  'coocaa\\.com': 'coocaa',
  '111\\.com\\.cn': '111',
  'shop\\.lenovo\\.com\\.cn': 'lenovo',
  'fruitday\\.com': 'fruitday',
  'amazon\\.es': 'amazon',
  'meici\\.com': 'meici',
  'beibei\\.com': 'beibei',
  'keede\\.com': 'keede',
  'kede\\.com': 'keede',
  'xijie.com': 'xijie',
  'camel.com.cn': 'camel',
  'meituan\\.com': 'meituan',
  '\\.amazon\\.cn': 'amazon',
  '\\.amazon\\.com': 'amazon_us',
  'lenovo\\.com': 'lenovo',
  'easeeyes\\.com': 'easeeyes',
  'aimer\\.com\\.cn': 'aimer',
  'showjoy\\.com': 'showjoy',
  'yesmywine\\.com': 'yesmywine',
  'tiantian\\.com': 'tiantian',
  '\\.gap\\.cn': 'gap',
  'wangfujing\\.com': 'wangfujing',
  '\\.mei\\.com': 'mei',
  'amazon\\.ca': 'amazon_ca',
  'secoo\\.com': 'secoo',
  'www\\.metao\\.com': 'metao',
  'metao\\.com': 'metao',
  'amazon\\.com\\.br': 'amazon',
  'baiyangwang.com': 'baiyangwang',
  'bookuu\\.com': 'bookuu',
  '100yue\\.com': '100yue',
  'meilele\\.com': 'meilele',
  'd1\\.com\\.cn': 'd1',
  'm\\.d1\\.cn': 'd1',
  '.taqu.cn': 'taqu',
  'letao\\.com': 'letao',
  'www\\.kaola\\.com': 'kaola',
  'lamiu\\.com': 'lamiu',
  '\\.vmall\\.com': 'vmall',
  'morefood\\.com': 'morefood',
  '\\.xiji.com': 'xiji',
  'shop\\.letv\\.com': 'lemall',
  'vjia\\.com': 'vjia',
  'staples\\.cn': 'staples',
  '\\.zm7\\.cn': 'zm7',
  '\\.(?:moonbasa|korirl|rutisher|suorang|alaves|ing2ing|0-100s|qjherb|monteamor)\\.com': 'moonbasa',
  'fengqu\\.com': 'fengqu',
  'bestkeep\\.cn': 'bestkeep',
  'ocj\\.kr': 'ocj',
  'amazon\\.co\\.jp': 'amazon_jp',
  'zhen\\.com': 'zhen',
  '\\.xiu\\.com': 'xiu',
  '(\\.)?homevv\\.com': 'homevv',
  'daling.com': 'daling',
  'amazon\\.in': 'amazon',
  'feiniu\\.com': 'feiniu',
  'jiumei\\.com': 'jiumei',
  'taoxie\\.com': 'taoxie',
  'amazon\\.it': 'amazon',
  'zazhipu\\.com': 'zazhipu',
  '\\.bl\\.com': 'bl',
  '.*?bl\\.com': 'bl',
  'you.163.com': 'you163',
  'lingshi\\.com': 'lingshi',
  'hua\\.com': 'hua',
  '\\.m6go\\.com': 'm6go',
  'lefeng\\.com': 'lefeng',
  '360kad\\.com': '360kad',
  '\\.99read\\.com': '99read',
  '\\.miqi\\.cn': 'miqi',
  'qinqinbaby\\.com': 'qinqinbaby',
  'vancl\\.com': 'vancl',
  '\\.jiuxian\\.com': 'jiuxian',
  'jiae\\.com': 'jiae',
  'midea\\.com': 'midea',
  'amazon\\.com\\.mx': 'amazon',
  'xifuquan\\.com': 'xifuquan',
  'amazon\\.com': 'amazon_us',
  'wangjiu\\.com': 'wangjiu',
  'amazon\\.nl': 'amazon',
  '\\.okbuy\\.com': 'okbuy',
  'amazon\\.com\\.au': 'amazon',
  'sasa\\.com': 'sasa',
  '(\\.)?yiguo\\.com': 'yiguo',
  'muyingzhijia\\.com': 'muyingzhijia',
  '.*?zuipin\\.cn': 'zuipin',
  '\\.zhiwo\\.com': 'zhiwo',
  'store\\.logitech\\.com\\.cn': 'logitech',
  '\\.newegg(\\.com)?\\.cn': 'newegg',
  'efotile\\.com': 'efotile',
  '\\.ouku\\.com': 'ouku',
  '\\.no5\\.com\\.cn': 'no5',
  'haierjingshui\\.com': 'haierjingshui',
  'www\\.kzj365\\.com': 'kzj365',
  'wbiao\\.cn': 'wbiao',
  '\\.lusen\\.com': 'lusen',
  'jumei\\.com': 'jumei',
  'xgdq\\.com': 'xgdq',
  'mia\\.com': 'miyabaobei',
  'miyabaobei.hk': 'miyabaobei',
  'ule\\.com': 'ule',
  '\\.okhqb\\.com': 'okhqb',
  'jianke\\.com': 'jianke',
  '\\.jxdyf\\.com': 'jxdyf',
  'xtep\\.com\\.cn': 'xtep',
  'guojimami.com': 'guojimami',
  'ehaier\\.com': 'ehaier',
  'lbxcn\\.com': 'lbxcn',
  '\\.camel\\.com\\.cn': 'camel',
  '(?:vivian|linkmasa|masamaso)\\.(?:com|cn)': 'masamaso',
  'lifevc.com': 'lifevc',
  'chunshuitang\\.com': 'chunshuitang',
  '\\.bookschina\\.com': 'bookschina',
  'leyou\\.com\\.cn': 'leyou',
  '\\.yougou\\.com': 'yougou',
  'amazon\\.co\\.uk': 'amazon_uk',
  'gjw\\.com': 'gjw',
  'lining\\.com': 'lining',
  '\\.s\\.cn': 'scn',
  'hisense\\.com': 'hisense',
  '\\.china-pub\\.com': 'chinapub',
  'jumeiglobal\\.com': 'jumei',
  '\\.(xiao)?mi\\.com': 'mi',
  '\\.sephora\\.cn': 'sephora',
  'jinxiang.com': 'jxdyf',
  'purcotton.com': 'purcotton',
  'wstx.com': 'wstx',
  'zhongjiu.cn': 'zhongjiu',
  'www.kaluli.com': 'kaluli',
  'mall.to8to.com': 'to8to',
  'www.opposhop.cn': 'opposhop',
  'baobeigezi.com': 'baobeigezi',
  'www.markmall.com': 'markmall',
  'happigo\\.com': 'happigo',
  'aolaigo\\.com': 'aolaigo',
  'skg\\.com': 'skg',
  'coolpad\\.com': 'coolpad',
  'dixintong\\.com': 'dixintong',
  'vivo\\.com\\.cn': 'vivo',
  'luolai\\.cn': 'luolai',
  'aomygod\\.com': 'aomygod',
  'suanjuzi\\.com': 'suanjuzi',
  'gionee\\.com': 'gionee',
  'yao123\\.com': 'yao123',
  'tuhu\\.cn': 'tuhu',
  'walmart\\.com': 'walmart',
  'vsigo\\.cn': 'vsigo',
  'lookfantastic\\.com': 'lookfantastic',
  'ashford\\.com': 'ashford',
  'shopbop\\.com': 'shopbop',
  '6pm\\.com': '6pm',
  'amazon\\.fr': 'amazon_fr',
  'suning\\.com': 'suning',
  'gome.com.cn': 'gome',
  's\\.taobao\\.com': 'taobao',
  'list\\.tmall\\.com': 'tmall',
  'yhd.com': 'yihaodian',
  'xiaomiyoupin\\.com': 'youpin-mi',
  '\\.yangkeduo\\.com': 'yangkeduo'
};
var siteIdHash = {
  "amazon": 1,
  "dangdang": 2,
  "360buy": 3,
  "zol": 4,
  "fglady": 5,
  "ouku": 6,
  "newegg": 7,
  "kimiss": 8,
  "redbaby": 9,
  "m18": 10,
  "sephora": 12,
  "lefeng": 13,
  "scn": 14,
  "51buy": 15,
  "menglu": 16,
  "moonbasa": 17,
  "keede": 18,
  "vancl": 19,
  "okbuy": 21,
  "letao": 22,
  "buy007": 23,
  "taoxie": 24,
  "suning": 25,
  "coo8": 26,
  "lusen": 27,
  "gome": 28,
  'dazhongdianqi': 29,
  "yihaodian": 31,
  "womai": 32,
  "leyou": 33,
  "shopin": 34,
  "xiu": 35,
  "mbaobao": 36,
  "vjia": 37,
  '7cv': 38,
  "youpin-mi": 39,
  "chunshuitang": 40,
  "x": 41,
  "guopi": 42,
  "no5": 43,
  'sasa': 45,
  "360kxr": 50,
  "m6go": 51,
  "likeface": 52,
  "morefood": 54,
  "yaofang": 56,
  "99read": 59,
  "chinapub": 60,
  "bookschina": 61,
  "winxuan": 62,
  "efeihu": 63,
  "yintai": 66,
  "happigo": 72,
  "gap": 73,
  '5lux': 75,
  "tmall": 83,
  "tiantian": 84,
  "xijie": 85,
  "jumei": 86,
  "yougou": 93,
  "111": 94,
  'jianke': 97,
  "muyingzhijia": 98,
  "lingshi": 99,
  "banggo": 100,
  "yesmywine": 101,
  "jiumei": 102,
  "jiuxian": 103,
  "gjw": 108,
  "okhqb": 109,
  "bookuu": 110,
  "tao3c": 111,
  "d1": 115,
  "rayi": 120,
  "paixie": 122,
  "taobao": 123,
  "homevv": 124,
  "jxdyf": 125,
  "sfbest": 126,
  "benlai": 127,
  "tootoo": 128,
  "tuotuo": 128,
  "vip": 129,
  "vmall": 134,
  "lenovo": 135,
  'apple': 136,
  "zm7": 138,
  "miqi": 139,
  "zhiwo": 140,
  "j1": 141,
  'wangjiu': 142,
  'lamiu': 146,
  'aimer': 147,
  "wbiao": 153,
  'handu': 154,
  "ehaier": 155,
  "secoo": 156,
  'camel': 157,
  'masamaso': 158,
  'zhen': 162,
  'xifuquan': 164,
  "mi": 167,
  'lemall': 168,
  "meituan": 172,
  'ctrip': 173,
  "yiguo": 174,
  "yummy77": 175,
  "fruitday": 178,
  "feiniu": 180,
  "feifei": 181,
  'zuipin': 182,
  'yohobuy': 184,
  'lvmama': 185,
  'bestkeep': 188,
  'mf910': 194,
  'markmall': 194,
  "miyabaobei": 195,
  'ule': 196,
  'minshengec': 197,
  'wangfujing': 198,
  'nuomi': 199,
  "meilele": 201,
  "mogujie": 203,
  'elong': 206,
  "supumall": 210,
  'ly': 211,
  'lining': 213,
  'springtour': 215,
  'haierjingshui': 217,
  "coocaa": 218,
  'lifevc': 220,
  'kzj365': 222,
  "kaola": 223,
  "ymatou": 224,
  "metao": 225,
  'kjt': 226,
  "logitech": 227,
  'amazon_us': 228,
  'amazon_jp': 229,
  "xiji": 232,
  'nike': 233,
  '360kad': 234,
  'lbxcn': 235,
  'meici': 236,
  'beibei': 237,
  '6pm': 238,
  'shopbop': 241,
  'amazon_de': 246,
  'ashford': 247,
  'lookfantastic': 248,
  'vsigo': 252,
  '100yue': 256,
  'amazon_uk': 266,
  "daling": 267,
  "fengqu": 268,
  'mei': 269,
  'showjoy': 270,
  'ocj': 271,
  'sundan': 272,
  'easeeyes': 273,
  'yunhou': 274,
  'haituncun': 275,
  'walmart': 276,
  'vmei': 277,
  'jgb': 278,
  '51din': 279,
  'aidai': 280,
  'boqii': 281,
  'toursforfun': 282,
  'lulutrip': 283,
  'spider': 284,
  'jiae': 286,
  'zazhipu': 287,
  'xgdq': 288,
  'xtep': 289,
  'midea': 290,
  'staples': 291,
  'efotile': 292,
  'lovo': 294,
  'hua': 295,
  'zhe800': 296,
  'tuhu': 299,
  'taqu': 313,
  'bl': 347,
  'bestinfoods': 348,
  'you163': 349,
  'guojimami': 351,
  'baiyangwang': 352,
  'juanpi': 360,
  'purcotton': 364,
  'amazon_fr': 365,
  'amazon_ca': 366,
  'wstx': 367,
  'hisense': 368,
  'zhongjiu': 369,
  'yangkeduo': 370,
  'to8to': 371,
  'opposhop': 372,
  'baobeigezi': 373,
  'yao123': 374,
  'gionee': 376,
  'suanjuzi': 377,
  'aomygod': 378,
  'luolai': 379,
  'vivo': 380,
  'dixintong': 381,
  'coolpad': 382,
  'skg': 383,
  'aolaigo': 385
};
var siteName = {
  0: "购物党",
  1: "亚马逊",
  2: "当当网",
  3: "京东商城",
  4: "中关村在线",
  5: "风尚伊人网",
  6: "欧酷网",
  7: "新蛋中国",
  8: "闺蜜网",
  9: "红孩子",
  10: "麦网",
  11: "唯伊商城",
  12: "丝芙兰",
  13: "乐蜂网",
  14: "名鞋库",
  15: "易迅网",
  16: "梦露时尚网",
  17: "梦芭莎",
  18: "可得眼镜网",
  19: "凡客诚品",
  20: "淘秀-百丽鞋业",
  21: "好乐买",
  22: "乐淘",
  23: "奥讯运动商城",
  24: "淘鞋网",
  25: "苏宁易购",
  26: "库巴网(国美)",
  27: "绿森数码",
  28: "国美在线",
  29: "大中电器",
  30: "国美体育",
  31: "一号店",
  32: "中粮我买网",
  33: "乐友孕婴童",
  34: "上品折扣",
  35: "走秀网",
  36: "麦包包",
  37: "V+(凡客)",
  38: "七彩谷",
  39: "小米有品",
  40: "春水堂",
  41: "桔色成人",
  42: "果皮网",
  43: "No5时尚广场",
  44: "IDSHE.COM",
  45: "香港莎莎",
  46: "DHC中国",
  47: "烧包网",
  48: "日全食",
  49: "第九大道",
  50: "开心人大药房",
  51: "麦乐购",
  52: "悦美丽",
  53: "抢鲜网",
  54: "猫诚食品",
  55: "耀点100百货商城",
  56: "药房网",
  57: "中关村在线商城",
  58: "丽家宝贝",
  59: "99网上书城",
  60: "互动出版网",
  61: "中国图书网",
  62: "文轩网",
  63: "飞虎乐购",
  65: "致美网(SkinStore China)",
  66: "银泰百货",
  67: "趣玩",
  68: "UrCosme",
  69: "草莓网",
  70: "露倩网",
  71: "酷运动",
  72: "快乐购",
  73: "GAP中国",
  74: "妙乐乐母婴用品商城",
  75: "第五大道奢侈品网",
  76: "小主人网",
  77: "宜家家居官网",
  78: "新七天电器网",
  79: "达芙妮官网",
  80: "太平洋亲子网",
  81: "太平洋家居网",
  82: "缤购网(红孩子)",
  83: "天猫",
  84: "天天网",
  85: "西街运动网",
  86: "聚美优品",
  87: "小熊在线商城",
  88: "草莓派化妆品商城",
  89: "大货栈网上超市",
  90: "名品打折",
  91: "活力达保健品网",
  92: "12点零食",
  93: "优购网",
  94: "1药网",
  95: "导药网(上海复美大药房)",
  96: "烟悦网",
  97: "健客网",
  98: "母婴之家",
  99: "中国零食网",
  100: "邦购网",
  101: "也买酒",
  102: "酒美网",
  103: "酒仙网",
  104: "惠健康商城",
  105: "工贸家电",
  106: "后玛特网上超市",
  107: "虎扑识货",
  108: "购酒网",
  109: "华强北商城",
  110: "博库书城",
  111: "高鸿商城",
  112: "西单igo5",
  113: "新世界百货",
  114: "汉光百货",
  115: "D1优尚",
  116: "易斯来福",
  117: "优悦生活",
  118: "插座网",
  119: "ORBIS中国",
  120: "锐意网",
  121: "优1宝贝",
  122: "拍鞋网",
  123: "淘宝网",
  124: "为为网",
  125: "金象网",
  126: "顺丰优选",
  127: "本来生活",
  128: "沱沱工社",
  129: "唯品会",
  130: "聚尚网",
  131: "俏物悄语",
  132: "天品网",
  134: "华为商城",
  135: "联想商城",
  136: "苹果官网",
  138: "卓美网",
  139: "米奇网",
  140: "知我药妆",
  141: "健一网",
  142: "网酒网",
  143: "比度克",
  144: "裂帛服饰",
  145: "ESPRIT中文官网",
  146: "兰缪内衣",
  147: "爱慕官网",
  148: "卡当网",
  149: "丽子美妆",
  150: "麦德龙",
  151: "PBA美妆",
  152: "尚品网",
  153: "万表网",
  154: "韩都衣舍",
  155: "海尔商城",
  156: "寺库网",
  157: "骆驼官方商城",
  158: "玛萨玛索",
  159: "NOP男装",
  160: "牛尔官网",
  161: "高街网",
  162: "珍品网",
  163: "斯波帝卡",
  164: "皙肤泉",
  165: "米粒儿",
  167: "小米商城",
  168: "乐视商城",
  169: "多看阅读",
  170: "QQ网购",
  171: "大众点评",
  172: "美团",
  173: "携程网",
  174: "易果网",
  175: "美味七七",
  178: "天天果园",
  179: "聚美海外购",
  180: "飞牛网",
  181: "飞飞商城",
  182: "醉品商城",
  183: "贝备网",
  184: "有货",
  185: "驴妈妈旅游网",
  186: "青芒果",
  187: "优彩网",
  188: "跨境淘",
  189: "包包树",
  190: "满座网",
  191: "一城一品",
  192: "中国足彩网",
  193: "发彩网",
  194: "马克华菲",
  195: "蜜芽",
  196: "邮乐网",
  197: "民生商城",
  198: "王府井网上商城",
  199: "百度糯米",
  200: "去哪儿网",
  201: "美乐乐",
  202: "美丽说",
  203: "蘑菇街",
  204: "窝窝团",
  205: "锦江之星",
  206: "艺龙旅行网",
  207: "布丁酒店",
  208: "芒果网",
  209: "500彩票网",
  210: "速普商城",
  211: "同程网",
  213: "李宁官方商城",
  214: "新东方在线",
  215: "春秋旅游",
  216: "永乐票务",
  217: "海尔净水商城",
  218: "酷开商城",
  219: "魅族在线商店",
  220: "LifeVC",
  221: "努比亚官网",
  222: "康之家网上药店",
  223: "考拉海购",
  224: "洋码头",
  225: "蜜淘",
  226: "跨境通",
  227: "罗技官网",
  228: "亚马逊美国",
  229: "亚马逊日本",
  230: "eBay",
  231: "AliExpress",
  232: "西集网",
  233: "Nike",
  234: "康爱多网上药店",
  235: "老百姓网上药店",
  236: "美西时尚",
  237: "贝贝网",
  238: "6PM",
  239: "GNC美国官网",
  240: "MYHABIT",
  241: "SHOPBOP",
  242: "Walgreens",
  243: "STP",
  244: "美国新蛋",
  245: "Jomashop",
  246: "亚马逊德国",
  247: "Ashford",
  248: "LookFantastic",
  249: "REI",
  250: "iHerb",
  251: "Carter's",
  252: "视客眼镜网",
  253: "END.",
  254: "CampSaver",
  255: "乐天国际",
  256: "百悦网",
  257: "Woot",
  258: "海淘城",
  259: "Joe's NB Outlet",
  260: "FinishLine",
  261: "Vitacost",
  262: "Groupon",
  263: "Macy's",
  264: "Moosejaw",
  265: "GILT",
  266: "亚马逊英国",
  267: "达令",
  268: "丰趣海淘",
  269: "魅力惠",
  270: "尚妆网",
  271: "东方CJ",
  272: "顺电网上商城",
  273: "易视网",
  274: "云猴网",
  275: "海豚村",
  276: "Walmart",
  277: "唯美美妆",
  278: "金箍棒海外购",
  279: "我要订",
  280: "爱戴网",
  281: "波奇宠物商城",
  282: "途风网",
  283: "路路行",
  284: "蜘蛛网",
  285: "微软中国",
  286: "加意新品",
  287: "杂志铺",
  288: "小狗电器",
  289: "特步官方商城",
  290: "美的商城",
  291: "史泰博",
  292: "方太商城",
  293: "贝思客",
  294: "LOVO家纺",
  295: "中国鲜花礼品网",
  296: "折800",
  297: "暴风TV",
  298: "途家网",
  299: "途虎养车网",
  300: "HTC官方商城",
  301: "roseonly官网",
  302: "融360",
  303: "你我贷",
  304: "Cosme Shopping",
  305: "Diapers",
  306: "Windeln.de",
  307: "Babyneo.de",
  308: "Escentual",
  309: "TheWatchery",
  310: "Saks Fifth Avenue",
  311: "Estee Lauder",
  312: "Bic Camera",
  313: "他趣",
  314: "穷游网",
  315: "澳新优选",
  316: "无印良品",
  317: "Gmarket",
  318: "11号街",
  319: "Smartbargains",
  320: "雅虎日本商城",
  321: "布鲁明戴尔",
  322: "Mikihouse",
  323: "ToysRUs日本官网",
  324: "ComfortFirst",
  325: "金宝贝",
  326: "Albee Baby",
  327: "Babymarkt",
  328: "UGG官网",
  329: "Neiman Marcus",
  330: "Shoebuy",
  331: "Szul",
  332: "Timex",
  333: "Kay Jewelers",
  334: "eWatches",
  335: "Swarovski美国官网",
  336: "World of Watches",
  337: "Daniel Wellington",
  338: "Beauty Bay",
  339: "Beauty.com",
  340: "Beauty Bar",
  341: "SkinStore",
  342: "兰芝韩国官网",
  343: "BOSE美国官网",
  344: "Best Buy",
  345: "B&H",
  346: "索尼日本官网",
  347: "百联",
  348: "源品优购",
  349: "网易严选",
  350: "锦江国际",
  351: "国际妈咪",
  352: "百洋商城",
  353: "遨游网",
  354: "Roy Young中文官网",
  355: "Mediheal中文官网",
  356: "1001 pharmacies中文官网",
  357: "Lookfantastic中文官网",
  359: "开心保保险网",
  360: "卷皮网",
  361: "Booking.com",
  362: "澳洲PO药房中文官网",
  363: "德国BA保镖药房中文网",
  364: "全棉时代",
  365: "亚马逊法国",
  366: "亚马逊加拿大",
  367: "外设天下",
  368: "海信商城",
  369: "中酒网",
  370: "拼多多",
  371: "土巴兔家居商城",
  372: "OPPO在线商城",
  373: "宝贝格子",
  374: "国药网",
  375: "百程旅行网",
  376: "金立手机官网",
  377: "酸橘子",
  378: "奥买家全球购",
  379: "罗莱官方商城",
  380: "VIVO官方商城",
  381: "迪信通官方商城",
  382: "酷派商城",
  383: "SKG官网",
  384: "爱奇艺",
  385: "奥莱购",
  386: "每日优鲜",
  387: "圃神跨境",
  388: "Feelunique中文网",
  389: "Chemist Direct中文网",
  390: "Net Pharmacy中文网",
  391: "Pharmacy 4 Less中文网",
  392: "Pharmacy Direct中文网",
  393: "Amcal中文网",
  394: "La Redoute中文网",
  395: "德国UKA优卡有机中文网",
  396: "Erwin Mueller穆勒家居中文网",
  397: "Kiwi Discovery中文网",
  398: "Springlane中文网",
  399: "德国JAKO-O婴童用品中文网",
  400: "EasyToys中文站",
  401: "英国TLC中文网",
  402: "法国BM彼洋美食",
  403: "Dewaren德国狮子家中文网",
  404: "DC德式康线上药房中文官网",
  405: "荷兰之家中文站",
  406: "鱿鱼网",
  407: "KiwiStarcare官网",
  408: "ZUK联想手机商城",
  409: "Kiehl's美国官网",
  410: "Zappos",
  411: "COACH蔻驰中国官网",
  412: "YOOX中文官网",
  413: "韩国11街中文官网",
  414: "英超海淘",
  415: "HQhair.com",
  416: "Kate Spade",
  417: "Vitafy中文官网",
  418: "乐天网购",
  419: "家乐福网上商城",
  420: "茶七网",
  421: "普泽大药房",
  422: "Kohl's",
  423: "Body Building",
  424: "Nordstrom",
  425: "Costco",
  426: "Target",
  427: "Kmart",
  428: "Overstock",
  429: "Sears",
  430: "老板电器官方商城",
  431: "狗民网商城",
  432: "飞科商城",
  433: "欧普照明",
  434: "世界婴童网",
  435: "益丰大药房",
  436: "好订网",
  437: "爱回收",
  438: "野兽派",
  439: "九牧卫浴官方商城",
  440: "七匹狼官方商城",
  441: "链家",
  442: "我爱我家",
  443: "六间房秀场",
  444: "八百方网上药店",
  445: "优集品",
  446: "买卖宝",
  447: "优众网",
  448: "爱康国宾健康商城",
  449: "维也纳酒店官网",
  450: "M'CAKE",
  451: "美色商城",
  452: "诺心蛋糕官网",
  453: "简单学习网",
  454: "精华在线",
  455: "桃花坞",
  456: "钻石小鸟官网",
  457: "康美健康商城",
  458: "佐卡伊官网",
  459: "淘书网",
  460: "爱之谷",
  461: "铁友旅行网",
  462: "莆田网",
  463: "味多美官网",
  464: "林清轩官网",
  467: "美国购物网",
  468: "品尚汇",
  469: "柒牌官方商城",
  470: "游多多客栈",
  471: "1688平价精选",
  472: "优个网",
  473: "大朴网",
  474: "薇诺娜官网",
  475: "蔚蓝图书网",
  476: "山脉户外",
  477: "何金昌官网",
  478: "买茶网",
  479: "优e网",
  480: "51YOU旅游网",
  481: "北发图书网",
  482: "晶品网",
  483: "华佗药房",
  484: "威锋商城",
  485: "诺一良品",
  486: "和茶网",
  487: "天时汇官网",
  488: "趣网商城",
  489: "蜜柚旅行",
  490: "好药师网上药店",
  491: "IDX爱定客",
  492: "优雅100",
  493: "S&S女装",
  494: "倩碧美国官网",
  495: "华夏e当",
  496: "Brooks Brothers",
  497: "欧美淘",
  498: "印通天下",
  499: "哥伦比亚美国官网",
  500: "BEST全球购",
  501: "New Balance美国官网",
  502: "万集客",
  503: "Bally英国官网",
  504: "一嗨租车",
  505: "嘉利成",
  506: "多庆屋中文官网",
  507: "Forever 21",
  508: "摩登大道",
  509: "木鸟短租",
  510: "最会游",
  511: "中原地产",
  512: "Bobbi Brown美国官网",
  513: "Super-in",
  514: "汉购网",
  515: "Levis德国官网",
  516: "斐乐FILA官方商城",
  517: "匡威中国官方商城",
  518: "Next美国官网",
  519: "iTrip爱去旅行网",
  520: "拉手网",
  521: "六丰商城",
  522: "同仁堂天然淘",
  523: "我订花",
  524: "Foodi",
  525: "中国森林食品网",
  526: "香港卓悦化妆品",
  527: "维他购",
  528: "金海马商城",
  529: "亮健好药房",
  530: "唱吧直播间",
  531: "Oakley美国官网",
  532: "逸行网",
  533: "Clarks美国官网",
  534: "Starwood Hotels",
  535: "Marriott万豪美国官网",
  536: "Yes Style",
  537: "Evisu中文官网",
  538: "Life's Easy",
  539: "宠宠熊官方商城",
  540: "0061澳洲制造",
  541: "KK馆全球购",
  542: "Style O'Clock",
  543: "配夸全球购",
  544: "Air France",
  545: "Accor Hotels中文官网",
  546: "Space.NK",
  547: "嗨厨房",
  548: "W Concept",
  549: "GANT英国官网",
  550: "CAT Footwear英国官网",
  551: "Saucony英国官网",
  552: "造作家居",
  553: "小天鹅官方商城",
  554: "CAN看尚商城",
  555: "时尚日记",
  556: "Guess澳大利亚官网",
  557: "Etihad Airways",
  558: "FIIL商城",
  559: "免税易购",
  560: "特购社",
  561: "Wiggle中文官网",
  562: "Melissa香港官网",
  563: "科沃斯官方商城",
  564: "Calvin Klein",
  565: "MEMEBOX美美箱",
  566: "Hilton美国官网",
  567: "Revolve Clothing",
  568: "资生堂美国官网",
  569: "娇韵诗美国官网",
  570: "Starbucks美国官网",
  571: "Ray-Ban美国官网",
  572: "Puma美国官网",
  573: "Nautica美国官网",
  574: "La Mer美国官网",
  575: "Kipling美国官网",
  576: "Jurlique美国官网",
  577: "Hush Puppies",
  578: "Origins美国官网",
  579: "Folli Follie美国官网",
  580: "L'Occitane美国官网",
  581: "麦田",
  582: "惠普官方商城",
  583: "国大地产",
  584: "首家商城",
  585: "青岛Q房网",
  586: "广州家家顺房产网",
  587: "杭州豪世华邦房产网",
  588: "HealthPost",
  589: "房天下",
  590: "梦想书城",
  591: "海优世纪馆",
  592: "扫货特卖",
  593: "热拍网",
  594: "蚂蚁短租",
  595: "银票网",
  596: "爱虎保",
  597: "Incake官网",
  598: "聚星直播",
  599: "艺网",
  600: "康辉旅行网",
  601: "安适购海外商城",
  602: "霹雳爸爸海淘平台",
  603: "小牛在线",
  604: "AHAVA",
  605: "Fifth",
  606: "The Watch Hut",
  607: "BabyHaven中文网",
  608: "玫丽网",
  609: "Get The Label 中文网",
  610: "松屋百货中文网",
  611: "Timberland",
  612: "Topman",
  613: "HomeAway",
  614: "Beauty Expert",
  615: "海蜜严选",
  616: "Mankind",
  617: "The Hut",
  618: "Topshop",
  619: "Mamaladen",
  620: "Traveler store",
  621: "Travelzoo",
  622: "UMI Children's Shoes",
  623: "新秀丽美国官网",
  624: "Ferrari Store",
  625: "Willer Travel",
  626: "Unineed",
  627: "Acne Studios中文网",
  628: "Aeropostale",
  629: "Agoda中文站",
  630: "Alba Moda",
  631: "Allbeauty",
  632: "AllSaints",
  633: "Allsole",
  634: "Urban Outfitters",
  635: "Vitabiotics",
  636: "Belle Maison",
  637: "贝玲妃美国官网",
  638: "BH Cosmetics",
  639: "美莱新青年",
  640: "Vitamin Bay",
  641: "Waitrose",
  642: "Wolford",
  643: "Boohoo",
  644: "Boots.com",
  645: "British Corner Shop",
  646: "宜人贷",
  647: "萤石商城",
  648: "Coggles.com",
  649: "Corset Deal",
  650: "COTTON ON",
  651: "Crocs英国官网",
  652: "CRUISE",
  653: "Dell美国官网",
  654: "Dermstore",
  655: "Disney Store",
  656: "Dorothy Perkins",
  657: "痘痘康官方商城",
  658: "度假客",
  659: "Dune London",
  660: "Eastbay",
  661: "East Dane中文网",
  662: "Zaful",
  663: "Zavvi",
  664: "Feinkeit.de",
  665: "eibmarkt",
  666: "Belluna中文网",
  667: "Emirates阿联酋航",
  668: "Eastern Mountain Sports",
  669: "ETERNA",
  670: "Eurail",
  671: "Exante Diet",
  672: "Expedia UK",
  673: "FALKE",
  674: "Famous Footwear",
  675: "Bonpont",
  676: "Foreo",
  677: "网信",
  678: "Forever Unique",
  679: "Forzieri",
  680: "Free Country",
  681: "CERRUTI 1881",
  682: "French Connection",
  683: "Gift land",
  684: "Cult Beauty",
  685: "Fancy",
  686: "Kent&Curwen",
  687: "Grow Gorgeous中文网",
  688: "KoreanMall中文站",
  689: "STYLEBOP.com",
  690: "HOTEL INFO",
  691: "House of Fraser",
  692: "惠租车",
  693: "Vitamin Planet",
  694: "Wow Mall",
  695: "IWOOT",
  696: "讲究商城",
  697: "YA-MAN",
  698: "海保保险",
  699: "Juicy Couture",
  700: "Kenko",
  701: "The jewel hut",
  702: "KIKO美国官网",
  703: "Lancer Skincare",
  704: "LEGO shop",
  705: "Moss Bros",
  706: "Lord & Taylor",
  707: "Stylenanda中文网",
  708: "人卫智网",
  709: "有道翻译",
  710: "Filthy Fragrance",
  711: "麦知网",
  712: "MatchesFashion",
  713: "松本清",
  714: "移动商街",
  715: "Microsoft Store",
  716: "Mio Skincare中文站",
  717: "Miss Selfridge",
  718: "Mountain Gear",
  719: "360好药",
  720: "My Bag",
  721: "Myprotein",
  722: "美骑易购商城",
  723: "Myvitamins",
  724: "NET-A-PORTER中文网",
  725: "New Balance英国官网",
  726: "叮当快药",
  727: "New Look",
  728: "中华会计网校",
  729: "必迈官网",
  730: "耐克香港官网",
  731: "耐克巴西官网",
  732: "映客直播",
  733: "New York & Company",
  734: "Oasis英国官网",
  735: "Orbitz",
  736: "Orchira",
  737: "Origins英国官网",
  738: "PetSmart",
  739: "君融贷",
  740: "哪拍网",
  741: "格力官方商城",
  742: "ProBikeKit",
  743: "Qatar Airways卡塔尔航空",
  744: "Radley英国官网",
  745: "安联保险",
  746: "Ralph Lauren",
  747: "Rebecca Minkoff",
  748: "优米网",
  749: "21Cake",
  750: "Rentalcar",
  751: "Dr. Pierre Ricaud",
  752: "Rockport",
  753: "Ruelala",
  754: "56人旅游网",
  755: "Saks Fifth Avenue OFF 5TH",
  756: "安纳塔拉",
  757: "SC24.com",
  758: "车速递租车",
  759: "SHOES.COM",
  760: "Spring",
  761: "Simply Supplements",
  762: "宜和购物",
  763: "Farfetch中文网",
  764: "Ssense",
  765: "Steve Madden",
  766: "Free People中文网",
  767: "高搜易",
  768: "iMomoko中文网",
  769: "淘豆",
  770: "Michael Kors中文网",
  771: "三佳购物",
  772: "联金所",
  773: "宅豆网",
  774: "网易云",
  775: "德国药房apo.com中文网",
  776: "读秒",
  777: "好享商城",
  778: "西狗全球购",
  779: "玩哪网",
  780: "紫马财行",
  781: "金猫银猫",
  782: "跨境网",
  783: "Millennium&Copthorne Hotels中文网",
  784: "Reebonz",
  785: "薇美铺",
  786: "五洲会海购",
  787: "惠家有",
  788: "Meli Melo中文网",
  789: "小财迷",
  790: "Ashford中文网",
  791: "韩国CJONmart中文网",
  792: "益钱网",
  793: "THE GRAND中文免税店",
  794: "欧迪办公",
  795: "天虹网上商城",
  796: "以岭健康城",
  797: "客路旅行",
  1001: "亚马逊第三方",
  1003: "京东手机端",
  1015: "易迅北京",
  1025: "苏宁北京",
  1031: "一号店上海",
  1032: "中粮我买网华东",
  1124: "为为网北京",
  1126: "顺丰上海",
  2003: "京东微信端",
  2015: "易迅广东",
  2025: "苏宁广州",
  2031: "一号店广东",
  2032: "中粮我买华南",
  2126: "顺丰广州",
  3015: "易迅湖北",
  3025: "苏宁成都",
  3031: "一号店湖北",
  4031: "一号店四川"
};

module.exports.getSiteId = function (site) {
  return siteIdHash[site];
};
module.exports.getSiteName = function (site, siteId) {
  if (!siteId) siteId = siteIdHash[site];
  return siteName[siteId];
};

var passLinks = function passLinks(site, callback) {
  var pagerParser = __webpack_require__(236);
  var id = -1;
  if (!(id = siteIdHash[site]) || !pagerParser[id]) {
    return;
  }
  var links = pagerParser[id](document);
  if (!links) {
    return;
  }
  // var sendMessage = function() {
  //   var queue = pyDomain[site] ? 0 : 1 //0: need python
  //     //if (links.length) {
  //   chrome.runtime.sendMessage({
  //       action: 'pager',
  //       links: Array.prototype.slice.call(links),
  //       args: [
  //         [id]
  //       ],
  //       url: document.URL,
  //       queue: queue
  //     })
  //     //}
  // }

  if (links.wait) {
    setTimeout(function () {
      links = Array.prototype.slice.call(document._links);
      callback(id, links);
    }, 5500);
  } else {
    callback(id, links);
  }
};

module.exports.init = function (callback) {
  //$(function() {
  //document.addEventListener("DOMContentLoaded", function() {
  for (var key in domains) {
    if (document.location.hostname.match(key)) {
      passLinks(domains[key], callback);
      break;
    }
  }

  //}, false)
  //})
};

/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var pako = __webpack_require__(250);
module.exports.gZip = function (str) {
  return pako.gzip(JSON.stringify(str));
};
module.exports.unGzip = function (str) {
  var z = pako.ungzip(str);
  var decoder = new TextDecoder('utf8');
  return JSON.parse(decoder.decode(z));
};

/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = {
  'bjg923253': 'pid-bjg-923253',
  'union_bijiago': 'pid-bjg-union',
  'union_bijiago_uos': 'pid-bjg-union-uos',
  'union_bijiago_mogu': 'pid-bjg-union'
};

/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var request = __webpack_require__(3);
var detect = __webpack_require__(44);
var priceParser = __webpack_require__(36);

var nowpage = 0;
var globalPage = undefined;
var time = 0;
var globalDom = undefined;
module.exports.init = function (data, dom) {
  if (G.forbidCoupon) return;
  if (G.aliSite) return;
  globalDom = dom;
  var tbData = userData.get('tbData');
  time++;
  if (tbData.ss === time) {
    if (data.tmall.length === 0 && data.taobao.length === 0) {
      getHymInfo(render2);
    } else {
      var siteName = G.site;
      var siteId = detect.getSiteId(siteName);
      priceParser.init(siteId, function (price) {
        if (price && price > 0) {
          G.dp.oldPrice = price;
          G.dp.price = price;
        }
        render(data, tbData);
      });
    }
  }
};

var getHymInfo = function getHymInfo(callback) {
  if (true) return;
  var info = userData.get('other_info');
  var url = G.server + '/extension/getCouponTao?keyword=' + encodeURIComponent(info.now.coreword) + '&class_id=' + info['code-server'].class_id + '&brand=' + encodeURIComponent(info.exact_arr.sbrand) + '&sige_id=' + info.now.site_id;
  request.get(url).done(function (data) {
    if (data && data.data && data.data.length > 0) {
      callback(data.data);
    }
  });
};
var render2 = function render2(data) {
  for (var i = 0; i < data.length; i++) {
    data[i].click_url = data[i].url;
    data[i].promoPri = data[i].currentPrice;
    data[i].price = data[i].originPrice;
    data[i].coupon_money = data[i].couponInfo;
  }
  renderBar(data);
};

var render = function render(data, tbData) {
  var comarr = [];
  if (tbData.tmm && data.tmall.length > 0) {
    for (var i = 0; i < tbData.tmall.product.length; i++) {
      var itemi = tbData.tmall.product[i];
      for (var j = 0; j < data.tmall.length; j++) {
        var itemj = data.tmall[j];
        if (itemi.num_iid === itemj.reqid) {
          itemi.click_url = itemj.click_url;
          itemi.click_url2 = itemj.click_url2;
          itemi.coupon_money = itemj.coupon.coupon_money;
          itemi.sicon = "https://cdn.gwdang.com/images/favicon/83.ico";
          itemi.promoPri = (Number(itemi.price) - itemj.coupon.coupon_money).toFixed(2);
          if (Number(itemi.promoPri) > G.dp.price) continue;
          comarr.push(itemi);
        }
      }
    }
  }
  if (tbData.tbb && data.taobao.length > 0) {
    for (var i = 0; i < tbData.taobao.product.length; i++) {
      var itemi = tbData.taobao.product[i];
      for (var j = 0; j < data.taobao.length; j++) {
        var itemj = data.taobao[j];
        if (itemi.num_iid === itemj.reqid) {
          itemi.click_url = itemj.click_url;
          itemi.click_url2 = itemj.click_url2;
          itemi.coupon_money = itemj.coupon.coupon_money;
          itemi.sicon = "https://cdn.gwdang.com/images/favicon/123.ico";
          itemi.promoPri = (Number(itemi.price) - itemj.coupon.coupon_money).toFixed(2);
          if (Number(itemi.promoPri) > G.dp.price) continue;
          comarr.push(itemi);
        }
      }
    }
  }
  renderBar(comarr);
};

var lunbo = function lunbo() {
  try {
    var dom = $('#miniCouponCom ul');
    var _top = Number(dom.css('top').replace('px', ''));
    _top = _top - 62;
    nowpage++;
    if (nowpage === globalPage) {
      dom.css('top', '0px');
      nowpage = 0;
      return;
    }
    dom.animate({
      'top': _top + 'px'
    }, 600);
  } catch (e) {}
};

var renderBar = function renderBar(data) {
  data = data.sort(function (v1, v2) {
    if (Number(v1.promoPri) > Number(v2.promoPri)) return 1;else if (Number(v1.promoPri) === Number(v2.promoPri)) return 0;else return -1;
  });
  globalPage = data.length;
  if (globalPage === 0) return;
  var html = __webpack_require__(269);
  if (location.host.indexOf('detail.ju.taobao') > -1 && G.ss_name === 'priceDog') {
    $('.pricedog-bar').before(template.compile(html)({
      data: data,
      fmdv: G.from_device,
      lang: G.lang
    }));
    $('.botbar').css('margin-top', '150px');
  } else {
    $(globalDom).append(template.compile(html)({
      data: data,
      fmdv: G.from_device,
      lang: G.lang
    }));
  }
  setInterval(lunbo, 5000);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS

/**
 * @license Highcharts JS v4.0.4 (2014-09-02)
 *
 * (c) 2009-2014 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */

// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console, each, grep */
/*jslint ass: true, sloppy: true, forin: true, plusplus: true, nomen: true, vars: true, regexp: true, newcap: true, browser: true, continue: true, white: true */
;(function () {
var jQuery = __webpack_require__(1);
// encapsulated variables
var UNDEFINED,
	doc = document,
	win = window,
	math = Math,
	mathRound = math.round,
	mathFloor = math.floor,
	mathCeil = math.ceil,
	mathMax = math.max,
	mathMin = math.min,
	mathAbs = math.abs,
	mathCos = math.cos,
	mathSin = math.sin,
	mathPI = math.PI,
	deg2rad = mathPI * 2 / 360,


	// some variables
	userAgent = navigator.userAgent,
	isOpera = win.opera,
	isIE = /msie/i.test(userAgent) && !isOpera,
	docMode8 = doc.documentMode === 8,
	isWebKit = /AppleWebKit/.test(userAgent),
	isFirefox = /Firefox/.test(userAgent),
	isTouchDevice = /(Mobile|Android|Windows Phone)/.test(userAgent),
	SVG_NS = 'http://www.w3.org/2000/svg',
	hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
	hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
	useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
	Renderer,
	hasTouch,
	symbolSizes = {},
	idCounter = 0,
	garbageBin,
	defaultOptions,
	dateFormat, // function
	globalAnimation,
	pathAnim,
	timeUnits,
	error,
	noop = function () { return UNDEFINED; },
	charts = [],
	chartCount = 0,
	PRODUCT = 'Highcharts',
	VERSION = '4.0.4',

	// some constants for frequently used strings
	DIV = 'div',
	ABSOLUTE = 'absolute',
	RELATIVE = 'relative',
	HIDDEN = 'hidden',
	PREFIX = 'highcharts-',
	VISIBLE = 'visible',
	PX = 'px',
	NONE = 'none',
	M = 'M',
	L = 'L',
	numRegex = /^[0-9]+$/,
	NORMAL_STATE = '',
	HOVER_STATE = 'hover',
	SELECT_STATE = 'select',

	// Object for extending Axis
	AxisPlotLineOrBandExtension,

	// constants for attributes
	STROKE_WIDTH = 'stroke-width',

	// time methods, changed based on whether or not UTC is used
	Date,  // Allow using a different Date class
	makeTime,
	timezoneOffset,
	getMinutes,
	getHours,
	getDay,
	getDate,
	getMonth,
	getFullYear,
	setMinutes,
	setHours,
	setDate,
	setMonth,
	setFullYear,


	// lookup over the types and the associated classes
	seriesTypes = {},
	Highcharts= {};

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){
	return Highcharts;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))

/**
 * Extend an object with the members of another
 * @param {Object} a The object to be extended
 * @param {Object} b The object to add to the first one
 */
function extend(a, b) {
	var n;
	if (!a) {
		a = {};
	}
	for (n in b) {
		a[n] = b[n];
	}
	return a;
}

/**
 * Deep merge two or more objects and return a third object. If the first argument is
 * true, the contents of the second object is copied into the first object.
 * Previously this function redirected to jQuery.extend(true), but this had two limitations.
 * First, it deep merged arrays, which lead to workarounds in Highcharts. Second,
 * it copied properties from extended prototypes.
 */
function merge() {
	var i,
		args = arguments,
		len,
		ret = {},
		doCopy = function (copy, original) {
			var value, key;

			// An object is replacing a primitive
			if (typeof copy !== 'object') {
				copy = {};
			}

			for (key in original) {
				if (original.hasOwnProperty(key)) {
					value = original[key];

					// Copy the contents of objects, but not arrays or DOM nodes
					if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'
							&& key !== 'renderTo' && typeof value.nodeType !== 'number') {
						copy[key] = doCopy(copy[key] || {}, value);

					// Primitives and arrays are copied over directly
					} else {
						copy[key] = original[key];
					}
				}
			}
			return copy;
		};

	// If first argument is true, copy into the existing object. Used in setOptions.
	if (args[0] === true) {
		ret = args[1];
		args = Array.prototype.slice.call(args, 2);
	}

	// For each argument, extend the return
	len = args.length;
	for (i = 0; i < len; i++) {
		ret = doCopy(ret, args[i]);
	}

	return ret;
}

/**
 * Shortcut for parseInt
 * @param {Object} s
 * @param {Number} mag Magnitude
 */
function pInt(s, mag) {
	return parseInt(s, mag || 10);
}

/**
 * Check for string
 * @param {Object} s
 */
function isString(s) {
	return typeof s === 'string';
}

/**
 * Check for object
 * @param {Object} obj
 */
function isObject(obj) {
	return obj && typeof obj === 'object';
}

/**
 * Check for array
 * @param {Object} obj
 */
function isArray(obj) {
	return Object.prototype.toString.call(obj) === '[object Array]';
}

/**
 * Check for number
 * @param {Object} n
 */
function isNumber(n) {
	return typeof n === 'number';
}

function log2lin(num) {
	return math.log(num) / math.LN10;
}
function lin2log(num) {
	return math.pow(10, num);
}

/**
 * Remove last occurence of an item from an array
 * @param {Array} arr
 * @param {Mixed} item
 */
function erase(arr, item) {
	var i = arr.length;
	while (i--) {
		if (arr[i] === item) {
			arr.splice(i, 1);
			break;
		}
	}
	//return arr;
}

/**
 * Returns true if the object is not null or undefined. Like MooTools' $.defined.
 * @param {Object} obj
 */
function defined(obj) {
	return obj !== UNDEFINED && obj !== null;
}

/**
 * Set or get an attribute or an object of attributes. Can't use jQuery attr because
 * it attempts to set expando properties on the SVG element, which is not allowed.
 *
 * @param {Object} elem The DOM element to receive the attribute(s)
 * @param {String|Object} prop The property or an abject of key-value pairs
 * @param {String} value The value if a single property is set
 */
function attr(elem, prop, value) {
	var key,
		ret;

	// if the prop is a string
	if (isString(prop)) {
		// set the value
		if (defined(value)) {
			elem.setAttribute(prop, value);

		// get the value
		} else if (elem && elem.getAttribute) { // elem not defined when printing pie demo...
			ret = elem.getAttribute(prop);
		}

	// else if prop is defined, it is a hash of key/value pairs
	} else if (defined(prop) && isObject(prop)) {
		for (key in prop) {
			elem.setAttribute(key, prop[key]);
		}
	}
	return ret;
}
/**
 * Check if an element is an array, and if not, make it into an array. Like
 * MooTools' $.splat.
 */
function splat(obj) {
	return isArray(obj) ? obj : [obj];
}


/**
 * Return the first value that is defined. Like MooTools' $.pick.
 */
function pick() {
	var args = arguments,
		i,
		arg,
		length = args.length;
	for (i = 0; i < length; i++) {
		arg = args[i];
		if (arg !== UNDEFINED && arg !== null) {
			return arg;
		}
	}
}

/**
 * Set CSS on a given element
 * @param {Object} el
 * @param {Object} styles Style object with camel case property names
 */
function css(el, styles) {
	if (isIE && !hasSVG) { // #2686
		if (styles && styles.opacity !== UNDEFINED) {
			styles.filter = 'alpha(opacity=' + (styles.opacity * 100) + ')';
		}
	}
	extend(el.style, styles);
}

/**
 * Utility function to create element with attributes and styles
 * @param {Object} tag
 * @param {Object} attribs
 * @param {Object} styles
 * @param {Object} parent
 * @param {Object} nopad
 */
function createElement(tag, attribs, styles, parent, nopad) {
	var el = doc.createElement(tag);
	if (attribs) {
		extend(el, attribs);
	}
	if (nopad) {
		css(el, {padding: 0, border: NONE, margin: 0});
	}
	if (styles) {
		css(el, styles);
	}
	if (parent) {
		parent.appendChild(el);
	}
	return el;
}

/**
 * Extend a prototyped class by new members
 * @param {Object} parent
 * @param {Object} members
 */
function extendClass(parent, members) {
	var object = function () { return UNDEFINED; };
	object.prototype = new parent();
	extend(object.prototype, members);
	return object;
}

/**
 * Format a number and return a string based on input settings
 * @param {Number} number The input number to format
 * @param {Number} decimals The amount of decimals
 * @param {String} decPoint The decimal point, defaults to the one given in the lang options
 * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
 */
function numberFormat(number, decimals, decPoint, thousandsSep) {
	var externalFn = Highcharts.numberFormat,
		lang = defaultOptions.lang,
		// http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
		n = +number || 0,
		c = decimals === -1 ?
			(n.toString().split('.')[1] || '').length : // preserve decimals
			(isNaN(decimals = mathAbs(decimals)) ? 2 : decimals),
		d = decPoint === undefined ? lang.decimalPoint : decPoint,
		t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep,
		s = n < 0 ? "-" : "",
		i = String(pInt(n = mathAbs(n).toFixed(c))),
		j = i.length > 3 ? i.length % 3 : 0;

	return externalFn !== numberFormat ?
		externalFn(number, decimals, decPoint, thousandsSep) :
		(s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
			(c ? d + mathAbs(n - i).toFixed(c).slice(2) : ""));
}

/**
 * Pad a string to a given length by adding 0 to the beginning
 * @param {Number} number
 * @param {Number} length
 */
function pad(number, length) {
	// Create an array of the remaining length +1 and join it with 0's
	return new Array((length || 2) + 1 - String(number).length).join(0) + number;
}

/**
 * Wrap a method with extended functionality, preserving the original function
 * @param {Object} obj The context object that the method belongs to
 * @param {String} method The name of the method to extend
 * @param {Function} func A wrapper function callback. This function is called with the same arguments
 * as the original function, except that the original function is unshifted and passed as the first
 * argument.
 */
function wrap(obj, method, func) {
	var proceed = obj[method];
	obj[method] = function () {
		var args = Array.prototype.slice.call(arguments);
		args.unshift(proceed);
		return func.apply(this, args);
	};
}

/**
 * Based on http://www.php.net/manual/en/function.strftime.php
 * @param {String} format
 * @param {Number} timestamp
 * @param {Boolean} capitalize
 */
dateFormat = function (format, timestamp, capitalize) {
	if (!defined(timestamp) || isNaN(timestamp)) {
		return 'Invalid date';
	}
	format = pick(format, '%Y-%m-%d %H:%M:%S');

	var date = new Date(timestamp - timezoneOffset),
		key, // used in for constuct below
		// get the basic time values
		hours = date[getHours](),
		day = date[getDay](),
		dayOfMonth = date[getDate](),
		month = date[getMonth](),
		fullYear = date[getFullYear](),
		lang = defaultOptions.lang,
		langWeekdays = lang.weekdays,

		// List all format keys. Custom formats can be added from the outside.
		replacements = extend({

			// Day
			'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
			'A': langWeekdays[day], // Long weekday, like 'Monday'
			'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
			'e': dayOfMonth, // Day of the month, 1 through 31

			// Week (none implemented)
			//'W': weekNumber(),

			// Month
			'b': lang.shortMonths[month], // Short month, like 'Jan'
			'B': lang.months[month], // Long month, like 'January'
			'm': pad(month + 1), // Two digit month number, 01 through 12

			// Year
			'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
			'Y': fullYear, // Four digits year, like 2009

			// Time
			'H': pad(hours), // Two digits hours in 24h format, 00 through 23
			'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
			'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
			'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
			'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
			'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
			'S': pad(date.getSeconds()), // Two digits seconds, 00 through  59
			'L': pad(mathRound(timestamp % 1000), 3) // Milliseconds (naming from Ruby)
		}, Highcharts.dateFormats);


	// do the replaces
	for (key in replacements) {
		while (format.indexOf('%' + key) !== -1) { // regex would do it in one line, but this is faster
			format = format.replace('%' + key, typeof replacements[key] === 'function' ? replacements[key](timestamp) : replacements[key]);
		}
	}

	// Optionally capitalize the string and return
	return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
};

/**
 * Format a single variable. Similar to sprintf, without the % prefix.
 */
function formatSingle(format, val) {
	var floatRegex = /f$/,
		decRegex = /\.([0-9])/,
		lang = defaultOptions.lang,
		decimals;

	if (floatRegex.test(format)) { // float
		decimals = format.match(decRegex);
		decimals = decimals ? decimals[1] : -1;
		if (val !== null) {
			val = numberFormat(
				val,
				decimals,
				lang.decimalPoint,
				format.indexOf(',') > -1 ? lang.thousandsSep : ''
			);
		}
	} else {
		val = dateFormat(format, val);
	}
	return val;
}

/**
 * Format a string according to a subset of the rules of Python's String.format method.
 */
function format(str, ctx) {
	var splitter = '{',
		isInside = false,
		segment,
		valueAndFormat,
		path,
		i,
		len,
		ret = [],
		val,
		index;

	while ((index = str.indexOf(splitter)) !== -1) {

		segment = str.slice(0, index);
		if (isInside) { // we're on the closing bracket looking back

			valueAndFormat = segment.split(':');
			path = valueAndFormat.shift().split('.'); // get first and leave format
			len = path.length;
			val = ctx;

			// Assign deeper paths
			for (i = 0; i < len; i++) {
				val = val[path[i]];
			}

			// Format the replacement
			if (valueAndFormat.length) {
				val = formatSingle(valueAndFormat.join(':'), val);
			}

			// Push the result and advance the cursor
			ret.push(val);

		} else {
			ret.push(segment);

		}
		str = str.slice(index + 1); // the rest
		isInside = !isInside; // toggle
		splitter = isInside ? '}' : '{'; // now look for next matching bracket
	}
	ret.push(str);
	return ret.join('');
}

/**
 * Get the magnitude of a number
 */
function getMagnitude(num) {
	return math.pow(10, mathFloor(math.log(num) / math.LN10));
}

/**
 * Take an interval and normalize it to multiples of 1, 2, 2.5 and 5
 * @param {Number} interval
 * @param {Array} multiples
 * @param {Number} magnitude
 * @param {Object} options
 */
function normalizeTickInterval(interval, multiples, magnitude, allowDecimals) {
	var normalized, i;

	// round to a tenfold of 1, 2, 2.5 or 5
	magnitude = pick(magnitude, 1);
	normalized = interval / magnitude;

	// multiples for a linear scale
	if (!multiples) {
		multiples = [1, 2, 2.5, 5, 10];

		// the allowDecimals option
		if (allowDecimals === false) {
			if (magnitude === 1) {
				multiples = [1, 2, 5, 10];
			} else if (magnitude <= 0.1) {
				multiples = [1 / magnitude];
			}
		}
	}

	// normalize the interval to the nearest multiple
	for (i = 0; i < multiples.length; i++) {
		interval = multiples[i];
		if (normalized <= (multiples[i] + (multiples[i + 1] || multiples[i])) / 2) {
			break;
		}
	}

	// multiply back to the correct magnitude
	interval *= magnitude;

	return interval;
}


/**
 * Utility method that sorts an object array and keeping the order of equal items.
 * ECMA script standard does not specify the behaviour when items are equal.
 */
function stableSort(arr, sortFunction) {
	var length = arr.length,
		sortValue,
		i;

	// Add index to each item
	for (i = 0; i < length; i++) {
		arr[i].ss_i = i; // stable sort index
	}

	arr.sort(function (a, b) {
		sortValue = sortFunction(a, b);
		return sortValue === 0 ? a.ss_i - b.ss_i : sortValue;
	});

	// Remove index from items
	for (i = 0; i < length; i++) {
		delete arr[i].ss_i; // stable sort index
	}
}

/**
 * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
 * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
 * method is slightly slower, but safe.
 */
function arrayMin(data) {
	var i = data.length,
		min = data[0];

	while (i--) {
		if (data[i] < min) {
			min = data[i];
		}
	}
	return min;
}

/**
 * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
 * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
 * method is slightly slower, but safe.
 */
function arrayMax(data) {
	var i = data.length,
		max = data[0];

	while (i--) {
		if (data[i] > max) {
			max = data[i];
		}
	}
	return max;
}

/**
 * Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
 * It loops all properties and invokes destroy if there is a destroy method. The property is
 * then delete'ed.
 * @param {Object} The object to destroy properties on
 * @param {Object} Exception, do not destroy this property, only delete it.
 */
function destroyObjectProperties(obj, except) {
	var n;
	for (n in obj) {
		// If the object is non-null and destroy is defined
		if (obj[n] && obj[n] !== except && obj[n].destroy) {
			// Invoke the destroy
			obj[n].destroy();
		}

		// Delete the property from the object.
		delete obj[n];
	}
}


/**
 * Discard an element by moving it to the bin and delete
 * @param {Object} The HTML node to discard
 */
function discardElement(element) {
	// create a garbage bin element, not part of the DOM
	if (!garbageBin) {
		garbageBin = createElement(DIV);
	}

	// move the node and empty bin
	if (element) {
		garbageBin.appendChild(element);
	}
	garbageBin.innerHTML = '';
}

/**
 * Provide error messages for debugging, with links to online explanation
 */
error = function (code, stop) {
	var msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code;
	if (stop) {
		throw msg;
	}
	// else ...
	if (win.console) {
		console.log(msg);
	}
};

/**
 * Fix JS round off float errors
 * @param {Number} num
 */
function correctFloat(num) {
	return parseFloat(
		num.toPrecision(14)
	);
}

/**
 * Set the global animation to either a given value, or fall back to the
 * given chart's animation option
 * @param {Object} animation
 * @param {Object} chart
 */
function setAnimation(animation, chart) {
	globalAnimation = pick(animation, chart.animation);
}

/**
 * The time unit lookup
 */
timeUnits = {
	millisecond: 1,
	second: 1000,
	minute: 60000,
	hour: 3600000,
	day: 24 * 3600000,
	week: 7 * 24 * 3600000,
	month: 31 * 24 * 3600000,
	year: 31556952000
};
/**
 * Path interpolation algorithm used across adapters
 */
pathAnim = {
	/**
	 * Prepare start and end values so that the path can be animated one to one
	 */
	init: function (elem, fromD, toD) {
		fromD = fromD || '';
		var shift = elem.shift,
			bezier = fromD.indexOf('C') > -1,
			numParams = bezier ? 7 : 3,
			endLength,
			slice,
			i,
			start = fromD.split(' '),
			end = [].concat(toD), // copy
			startBaseLine,
			endBaseLine,
			sixify = function (arr) { // in splines make move points have six parameters like bezier curves
				i = arr.length;
				while (i--) {
					if (arr[i] === M) {
						arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
					}
				}
			};

		if (bezier) {
			sixify(start);
			sixify(end);
		}

		// pull out the base lines before padding
		if (elem.isArea) {
			startBaseLine = start.splice(start.length - 6, 6);
			endBaseLine = end.splice(end.length - 6, 6);
		}

		// if shifting points, prepend a dummy point to the end path
		if (shift <= end.length / numParams && start.length === end.length) {
			while (shift--) {
				end = [].concat(end).splice(0, numParams).concat(end);
			}
		}
		elem.shift = 0; // reset for following animations

		// copy and append last point until the length matches the end length
		if (start.length) {
			endLength = end.length;
			while (start.length < endLength) {

				//bezier && sixify(start);
				slice = [].concat(start).splice(start.length - numParams, numParams);
				if (bezier) { // disable first control point
					slice[numParams - 6] = slice[numParams - 2];
					slice[numParams - 5] = slice[numParams - 1];
				}
				start = start.concat(slice);
			}
		}

		if (startBaseLine) { // append the base lines for areas
			start = start.concat(startBaseLine);
			end = end.concat(endBaseLine);
		}
		return [start, end];
	},

	/**
	 * Interpolate each value of the path and return the array
	 */
	step: function (start, end, pos, complete) {
		var ret = [],
			i = start.length,
			startVal;

		if (pos === 1) { // land on the final path without adjustment points appended in the ends
			ret = complete;

		} else if (i === end.length && pos < 1) {
			while (i--) {
				startVal = parseFloat(start[i]);
				ret[i] =
					isNaN(startVal) ? // a letter instruction like M or L
						start[i] :
						pos * (parseFloat(end[i] - startVal)) + startVal;

			}
		} else { // if animation is finished or length not matching, land on right value
			ret = end;
		}
		return ret;
	}
};

(function ($) {
	/**
	 * The default HighchartsAdapter for jQuery
	 */
	win.HighchartsAdapter = win.HighchartsAdapter || ($ && {

		/**
		 * Initialize the adapter by applying some extensions to jQuery
		 */
		init: function (pathAnim) {

			// extend the animate function to allow SVG animations
			var Fx = $.fx;

			/*jslint unparam: true*//* allow unused param x in this function */
			$.extend($.easing, {
				easeOutQuad: function (x, t, b, c, d) {
					return -c * (t /= d) * (t - 2) + b;
				}
			});
			/*jslint unparam: false*/

			// extend some methods to check for elem.attr, which means it is a Highcharts SVG object
			$.each(['cur', '_default', 'width', 'height', 'opacity'], function (i, fn) {
				var obj = Fx.step,
					base;

				// Handle different parent objects
				if (fn === 'cur') {
					obj = Fx.prototype; // 'cur', the getter, relates to Fx.prototype

				} else if (fn === '_default' && $.Tween) { // jQuery 1.8 model
					obj = $.Tween.propHooks[fn];
					fn = 'set';
				}

				// Overwrite the method
				base = obj[fn];
				if (base) { // step.width and step.height don't exist in jQuery < 1.7

					// create the extended function replacement
					obj[fn] = function (fx) {

						var elem;

						// Fx.prototype.cur does not use fx argument
						fx = i ? fx : this;

						// Don't run animations on textual properties like align (#1821)
						if (fx.prop === 'align') {
							return;
						}

						// shortcut
						elem = fx.elem;

						// Fx.prototype.cur returns the current value. The other ones are setters
						// and returning a value has no effect.
						return elem.attr ? // is SVG element wrapper
							elem.attr(fx.prop, fn === 'cur' ? UNDEFINED : fx.now) : // apply the SVG wrapper's method
							base.apply(this, arguments); // use jQuery's built-in method
					};
				}
			});

			// Extend the opacity getter, needed for fading opacity with IE9 and jQuery 1.10+
			wrap($.cssHooks.opacity, 'get', function (proceed, elem, computed) {
				return elem.attr ? (elem.opacity || 0) : proceed.call(this, elem, computed);
			});

			// Define the setter function for d (path definitions)
			this.addAnimSetter('d', function (fx) {
				var elem = fx.elem,
					ends;

				// Normally start and end should be set in state == 0, but sometimes,
				// for reasons unknown, this doesn't happen. Perhaps state == 0 is skipped
				// in these cases
				if (!fx.started) {
					ends = pathAnim.init(elem, elem.d, elem.toD);
					fx.start = ends[0];
					fx.end = ends[1];
					fx.started = true;
				}

				// Interpolate each value of the path
				elem.attr('d', pathAnim.step(fx.start, fx.end, fx.pos, elem.toD));
			});

			/**
			 * Utility for iterating over an array. Parameters are reversed compared to jQuery.
			 * @param {Array} arr
			 * @param {Function} fn
			 */
			this.each = Array.prototype.forEach ?
				function (arr, fn) { // modern browsers
					return Array.prototype.forEach.call(arr, fn);

				} :
				function (arr, fn) { // legacy
					var i,
						len = arr.length;
					for (i = 0; i < len; i++) {
						if (fn.call(arr[i], arr[i], i, arr) === false) {
							return i;
						}
					}
				};

			/**
			 * Register Highcharts as a plugin in the respective framework
			 */
			$.fn.highcharts = function () {
				var constr = 'Chart', // default constructor
					args = arguments,
					options,
					ret,
					chart;

				if (this[0]) {

					if (isString(args[0])) {
						constr = args[0];
						args = Array.prototype.slice.call(args, 1);
					}
					options = args[0];

					// Create the chart
					if (options !== UNDEFINED) {
						/*jslint unused:false*/
						options.chart = options.chart || {};
						options.chart.renderTo = this[0];
						chart = new Highcharts[constr](options, args[1]);
						ret = this;
						/*jslint unused:true*/
					}

					// When called without parameters or with the return argument, get a predefined chart
					if (options === UNDEFINED) {
						ret = charts[attr(this[0], 'data-highcharts-chart')];
					}
				}

				return ret;
			};

		},

		/**
		 * Add an animation setter for a specific property
		 */
		addAnimSetter: function (prop, setter) {
			// jQuery 1.8 style
			if ($.Tween) {
				$.Tween.propHooks[prop] = {
					set: setter
				};
			// pre 1.8
			} else {
				$.fx.step[prop] = setter;
			}
		},

		/**
		 * Downloads a script and executes a callback when done.
		 * @param {String} scriptLocation
		 * @param {Function} callback
		 */
		getScript: $.getScript,

		/**
		 * Return the index of an item in an array, or -1 if not found
		 */
		inArray: $.inArray,

		/**
		 * A direct link to jQuery methods. MooTools and Prototype adapters must be implemented for each case of method.
		 * @param {Object} elem The HTML element
		 * @param {String} method Which method to run on the wrapped element
		 */
		adapterRun: function (elem, method) {
			return $(elem)[method]();
		},

		/**
		 * Filter an array
		 */
		grep: $.grep,

		/**
		 * Map an array
		 * @param {Array} arr
		 * @param {Function} fn
		 */
		map: function (arr, fn) {
			//return jQuery.map(arr, fn);
			var results = [],
				i = 0,
				len = arr.length;
			for (; i < len; i++) {
				results[i] = fn.call(arr[i], arr[i], i, arr);
			}
			return results;

		},

		/**
		 * Get the position of an element relative to the top left of the page
		 */
		offset: function (el) {
			return $(el).offset();
		},

		/**
		 * Add an event listener
		 * @param {Object} el A HTML element or custom object
		 * @param {String} event The event type
		 * @param {Function} fn The event handler
		 */
		addEvent: function (el, event, fn) {
			$(el).bind(event, fn);
		},

		/**
		 * Remove event added with addEvent
		 * @param {Object} el The object
		 * @param {String} eventType The event type. Leave blank to remove all events.
		 * @param {Function} handler The function to remove
		 */
		removeEvent: function (el, eventType, handler) {
			// workaround for jQuery issue with unbinding custom events:
			// http://forum.jQuery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jQuery-1-4-2
			var func = doc.removeEventListener ? 'removeEventListener' : 'detachEvent';
			if (doc[func] && el && !el[func]) {
				el[func] = function () {};
			}

			$(el).unbind(eventType, handler);
		},

		/**
		 * Fire an event on a custom object
		 * @param {Object} el
		 * @param {String} type
		 * @param {Object} eventArguments
		 * @param {Function} defaultFunction
		 */
		fireEvent: function (el, type, eventArguments, defaultFunction) {
			var event = $.Event(type),
				detachedType = 'detached' + type,
				defaultPrevented;

			// Remove warnings in Chrome when accessing returnValue (#2790), layerX and layerY. Although Highcharts
			// never uses these properties, Chrome includes them in the default click event and
			// raises the warning when they are copied over in the extend statement below.
			//
			// To avoid problems in IE (see #1010) where we cannot delete the properties and avoid
			// testing if they are there (warning in chrome) the only option is to test if running IE.
			if (!isIE && eventArguments) {
				delete eventArguments.layerX;
				delete eventArguments.layerY;
				delete eventArguments.returnValue;
			}

			extend(event, eventArguments);

			// Prevent jQuery from triggering the object method that is named the
			// same as the event. For example, if the event is 'select', jQuery
			// attempts calling el.select and it goes into a loop.
			if (el[type]) {
				el[detachedType] = el[type];
				el[type] = null;
			}

			// Wrap preventDefault and stopPropagation in try/catch blocks in
			// order to prevent JS errors when cancelling events on non-DOM
			// objects. #615.
			/*jslint unparam: true*/
			$.each(['preventDefault', 'stopPropagation'], function (i, fn) {
				var base = event[fn];
				event[fn] = function () {
					try {
						base.call(event);
					} catch (e) {
						if (fn === 'preventDefault') {
							defaultPrevented = true;
						}
					}
				};
			});
			/*jslint unparam: false*/

			// trigger it
			$(el).trigger(event);

			// attach the method
			if (el[detachedType]) {
				el[type] = el[detachedType];
				el[detachedType] = null;
			}

			if (defaultFunction && !event.isDefaultPrevented() && !defaultPrevented) {
				defaultFunction(event);
			}
		},

		/**
		 * Extension method needed for MooTools
		 */
		washMouseEvent: function (e) {
			var ret = e.originalEvent || e;

			// computed by jQuery, needed by IE8
			if (ret.pageX === UNDEFINED) { // #1236
				ret.pageX = e.pageX;
				ret.pageY = e.pageY;
			}

			return ret;
		},

		/**
		 * Animate a HTML element or SVG element wrapper
		 * @param {Object} el
		 * @param {Object} params
		 * @param {Object} options jQuery-like animation options: duration, easing, callback
		 */
		animate: function (el, params, options) {
			var $el = $(el);
			if (!el.style) {
				el.style = {}; // #1881
			}
			if (params.d) {
				el.toD = params.d; // keep the array form for paths, used in $.fx.step.d
				params.d = 1; // because in jQuery, animating to an array has a different meaning
			}

			$el.stop();
			if (params.opacity !== UNDEFINED && el.attr) {
				params.opacity += 'px'; // force jQuery to use same logic as width and height (#2161)
			}
			el.hasAnim = 1; // #3342
			$el.animate(params, options);

		},
		/**
		 * Stop running animation
		 */
		stop: function (el) {
			if (el.hasAnim) { // #3342, memory leak on calling $(el) from destroy
				$(el).stop();
			}
		}
	});
}(jQuery));


// check for a custom HighchartsAdapter defined prior to this file
var globalAdapter = win.HighchartsAdapter,
	adapter = globalAdapter || {};

// Initialize the adapter
if (globalAdapter) {
	globalAdapter.init.call(globalAdapter, pathAnim);
}


// Utility functions. If the HighchartsAdapter is not defined, adapter is an empty object
// and all the utility functions will be null. In that case they are populated by the
// default adapters below.
var adapterRun = adapter.adapterRun,
	getScript = adapter.getScript,
	inArray = adapter.inArray,
	each = adapter.each,
	grep = adapter.grep,
	offset = adapter.offset,
	map = adapter.map,
	addEvent = adapter.addEvent,
	removeEvent = adapter.removeEvent,
	fireEvent = adapter.fireEvent,
	washMouseEvent = adapter.washMouseEvent,
	animate = adapter.animate,
	stop = adapter.stop;



/* ****************************************************************************
 * Handle the options                                                         *
 *****************************************************************************/
var

defaultLabelOptions = {
	enabled: true,
	// rotation: 0,
	// align: 'center',
	x: 0,
	y: 15,
	/*formatter: function () {
		return this.value;
	},*/
	style: {
		color: '#606060',
		cursor: 'default',
		fontSize: '11px'
	}
};

defaultOptions = {
	colors: ['#7cb5ec', '#434348', '#90ed7d', '#f7a35c',
		    '#8085e9', '#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1'],
	symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],
	lang: {
		loading: 'Loading...',
		months: ['January', 'February', 'March', 'April', 'May', 'June', 'July',
				'August', 'September', 'October', 'November', 'December'],
		shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
		weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
		decimalPoint: '.',
		numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'], // SI prefixes used in axis labels
		resetZoom: 'Reset zoom',
		resetZoomTitle: 'Reset zoom level 1:1',
		thousandsSep: ','
	},
	global: {
		useUTC: true,
		//timezoneOffset: 0,
		VMLRadialGradientURL: 'http://code.highcharts.com/4.0.4/gfx/vml-radial-gradient.png'
	},
	chart: {
		//animation: true,
		//alignTicks: false,
		//reflow: true,
		//className: null,
		//events: { load, selection },
		//margin: [null],
		//marginTop: null,
		//marginRight: null,
		//marginBottom: null,
		//marginLeft: null,
		borderColor: '#4572A7',
		//borderWidth: 0,
		borderRadius: 0,
		defaultSeriesType: 'line',
		ignoreHiddenSeries: true,
		//inverted: false,
		//shadow: false,
		spacing: [10, 10, 15, 10],
		//spacingTop: 10,
		//spacingRight: 10,
		//spacingBottom: 15,
		//spacingLeft: 10,
		//style: {
		//	fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', // default font
		//	fontSize: '12px'
		//},
		backgroundColor: '#FFFFFF',
		//plotBackgroundColor: null,
		plotBorderColor: '#C0C0C0',
		//plotBorderWidth: 0,
		//plotShadow: false,
		//zoomType: ''
		resetZoomButton: {
			theme: {
				zIndex: 20
			},
			position: {
				align: 'right',
				x: -10,
				//verticalAlign: 'top',
				y: 10
			}
			// relativeTo: 'plot'
		}
	},
	title: {
		text: 'Chart title',
		align: 'center',
		// floating: false,
		margin: 15,
		// x: 0,
		// verticalAlign: 'top',
		// y: null,
		style: {
			color: '#333333',
			fontSize: '18px'
		}

	},
	subtitle: {
		text: '',
		align: 'center',
		// floating: false
		// x: 0,
		// verticalAlign: 'top',
		// y: null,
		style: {
			color: '#555555'
		}
	},

	plotOptions: {
		line: { // base series options
			allowPointSelect: false,
			showCheckbox: false,
			animation: {
				duration: 1000
			},
			//connectNulls: false,
			//cursor: 'default',
			//clip: true,
			//dashStyle: null,
			//enableMouseTracking: true,
			events: {},
			//legendIndex: 0,
			//linecap: 'round',
			lineWidth: 2,
			//shadow: false,
			// stacking: null,
			marker: {
				//enabled: true,
				//symbol: null,
				lineWidth: 0,
				radius: 4,
				lineColor: '#FFFFFF',
				//fillColor: null,
				states: { // states for a single point
					hover: {
						enabled: true,
						lineWidthPlus: 1,
						radiusPlus: 2
					},
					select: {
						fillColor: '#FFFFFF',
						lineColor: '#000000',
						lineWidth: 2
					}
				}
			},
			point: {
				events: {}
			},
			dataLabels: merge(defaultLabelOptions, {
				align: 'center',
				//defer: true,
				enabled: false,
				formatter: function () {
					return this.y === null ? '' : numberFormat(this.y, -1);
				},
				verticalAlign: 'bottom', // above singular point
				y: 0
				// backgroundColor: undefined,
				// borderColor: undefined,
				// borderRadius: undefined,
				// borderWidth: undefined,
				// padding: 3,
				// shadow: false
			}),
			cropThreshold: 300, // draw points outside the plot area when the number of points is less than this
			pointRange: 0,
			//pointStart: 0,
			//pointInterval: 1,
			//showInLegend: null, // auto: true for standalone series, false for linked series
			states: { // states for the entire series
				hover: {
					//enabled: false,
					lineWidthPlus: 1,
					marker: {
						// lineWidth: base + 1,
						// radius: base + 1
					},
					halo: {
						size: 10,
						opacity: 0.25
					}
				},
				select: {
					marker: {}
				}
			},
			stickyTracking: true,
			//tooltip: {
				//pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: <b>{point.y}</b>'
				//valueDecimals: null,
				//xDateFormat: '%A, %b %e, %Y',
				//valuePrefix: '',
				//ySuffix: ''
			//}
			turboThreshold: 1000
			// zIndex: null
		}
	},
	labels: {
		//items: [],
		style: {
			//font: defaultFont,
			position: ABSOLUTE,
			color: '#3E576F'
		}
	},
	legend: {
		enabled: true,
		align: 'center',
		//floating: false,
		layout: 'horizontal',
		labelFormatter: function () {
			return this.name;
		},
		//borderWidth: 0,
		borderColor: '#909090',
		borderRadius: 0,
		navigation: {
			// animation: true,
			activeColor: '#274b6d',
			// arrowSize: 12
			inactiveColor: '#CCC'
			// style: {} // text styles
		},
		// margin: 20,
		// reversed: false,
		shadow: false,
		// backgroundColor: null,
		/*style: {
			padding: '5px'
		},*/
		itemStyle: {
			color: '#333333',
			fontSize: '12px',
			fontWeight: 'bold'
		},
		itemHoverStyle: {
			//cursor: 'pointer', removed as of #601
			color: '#000'
		},
		itemHiddenStyle: {
			color: '#CCC'
		},
		itemCheckboxStyle: {
			position: ABSOLUTE,
			width: '13px', // for IE precision
			height: '13px'
		},
		// itemWidth: undefined,
		// symbolRadius: 0,
		// symbolWidth: 16,
		symbolPadding: 5,
		verticalAlign: 'bottom',
		// width: undefined,
		x: 0,
		y: 0,
		title: {
			//text: null,
			style: {
				fontWeight: 'bold'
			}
		}
	},

	loading: {
		// hideDuration: 100,
		labelStyle: {
			fontWeight: 'bold',
			position: RELATIVE,
			top: '45%'
		},
		// showDuration: 0,
		style: {
			position: ABSOLUTE,
			backgroundColor: 'white',
			opacity: 0.5,
			textAlign: 'center'
		}
	},

	tooltip: {
		enabled: true,
		animation: hasSVG,
		//crosshairs: null,
		backgroundColor: 'rgba(249, 249, 249, .85)',
		borderWidth: 1,
		borderRadius: 3,
		dateTimeLabelFormats: {
			millisecond: '%A, %b %e, %H:%M:%S.%L',
			second: '%A, %b %e, %H:%M:%S',
			minute: '%A, %b %e, %H:%M',
			hour: '%A, %b %e, %H:%M',
			day: '%A, %b %e, %Y',
			week: 'Week from %A, %b %e, %Y',
			month: '%B %Y',
			year: '%Y'
		},
		//formatter: defaultFormatter,
		headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
		pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>',
		shadow: true,
		//shape: 'callout',
		//shared: false,
		snap: isTouchDevice ? 25 : 10,
		style: {
			color: '#333333',
			cursor: 'default',
			fontSize: '12px',
			padding: '8px',
			whiteSpace: 'nowrap'
		}
		//xDateFormat: '%A, %b %e, %Y',
		//valueDecimals: null,
		//valuePrefix: '',
		//valueSuffix: ''
	},

	credits: {
		enabled: true,
		text: 'Highcharts.com',
		href: 'http://www.highcharts.com',
		position: {
			align: 'right',
			x: -10,
			verticalAlign: 'bottom',
			y: -5
		},
		style: {
			cursor: 'pointer',
			color: '#909090',
			fontSize: '9px'
		}
	}
};




// Series defaults
var defaultPlotOptions = defaultOptions.plotOptions,
	defaultSeriesOptions = defaultPlotOptions.line;

// set the default time methods
setTimeMethods();



/**
 * Set the time methods globally based on the useUTC option. Time method can be either
 * local time or UTC (default).
 */
function setTimeMethods() {
	var useUTC = defaultOptions.global.useUTC,
		GET = useUTC ? 'getUTC' : 'get',
		SET = useUTC ? 'setUTC' : 'set';


	Date = defaultOptions.global.Date || window.Date;
	timezoneOffset = ((useUTC && defaultOptions.global.timezoneOffset) || 0) * 60000;
	makeTime = useUTC ? Date.UTC : function (year, month, date, hours, minutes, seconds) {
		return new Date(
			year,
			month,
			pick(date, 1),
			pick(hours, 0),
			pick(minutes, 0),
			pick(seconds, 0)
		).getTime();
	};
	getMinutes =  GET + 'Minutes';
	getHours =    GET + 'Hours';
	getDay =      GET + 'Day';
	getDate =     GET + 'Date';
	getMonth =    GET + 'Month';
	getFullYear = GET + 'FullYear';
	setMinutes =  SET + 'Minutes';
	setHours =    SET + 'Hours';
	setDate =     SET + 'Date';
	setMonth =    SET + 'Month';
	setFullYear = SET + 'FullYear';

}

/**
 * Merge the default options with custom options and return the new options structure
 * @param {Object} options The new custom options
 */
function setOptions(options) {

	// Copy in the default options
	defaultOptions = merge(true, defaultOptions, options);

	// Apply UTC
	setTimeMethods();

	return defaultOptions;
}

/**
 * Get the updated default options. Until 3.0.7, merely exposing defaultOptions for outside modules
 * wasn't enough because the setOptions method created a new object.
 */
function getOptions() {
	return defaultOptions;
}


/**
 * Handle color operations. The object methods are chainable.
 * @param {String} input The input color in either rbga or hex format
 */
var rgbaRegEx = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
	hexRegEx = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
	rgbRegEx = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/;

var Color = function (input) {
	// declare variables
	var rgba = [], result, stops;

	/**
	 * Parse the input color to rgba array
	 * @param {String} input
	 */
	function init(input) {

		// Gradients
		if (input && input.stops) {
			stops = map(input.stops, function (stop) {
				return Color(stop[1]);
			});

		// Solid colors
		} else {
			// rgba
			result = rgbaRegEx.exec(input);
			if (result) {
				rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
			} else {
				// hex
				result = hexRegEx.exec(input);
				if (result) {
					rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
				} else {
					// rgb
					result = rgbRegEx.exec(input);
					if (result) {
						rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), 1];
					}
				}
			}
		}

	}
	/**
	 * Return the color a specified format
	 * @param {String} format
	 */
	function get(format) {
		var ret;

		if (stops) {
			ret = merge(input);
			ret.stops = [].concat(ret.stops);
			each(stops, function (stop, i) {
				ret.stops[i] = [ret.stops[i][0], stop.get(format)];
			});

		// it's NaN if gradient colors on a column chart
		} else if (rgba && !isNaN(rgba[0])) {
			if (format === 'rgb') {
				ret = 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
			} else if (format === 'a') {
				ret = rgba[3];
			} else {
				ret = 'rgba(' + rgba.join(',') + ')';
			}
		} else {
			ret = input;
		}
		return ret;
	}

	/**
	 * Brighten the color
	 * @param {Number} alpha
	 */
	function brighten(alpha) {
		if (stops) {
			each(stops, function (stop) {
				stop.brighten(alpha);
			});

		} else if (isNumber(alpha) && alpha !== 0) {
			var i;
			for (i = 0; i < 3; i++) {
				rgba[i] += pInt(alpha * 255);

				if (rgba[i] < 0) {
					rgba[i] = 0;
				}
				if (rgba[i] > 255) {
					rgba[i] = 255;
				}
			}
		}
		return this;
	}
	/**
	 * Set the color's opacity to a given alpha value
	 * @param {Number} alpha
	 */
	function setOpacity(alpha) {
		rgba[3] = alpha;
		return this;
	}

	// initialize: parse the input
	init(input);

	// public methods
	return {
		get: get,
		brighten: brighten,
		rgba: rgba,
		setOpacity: setOpacity
	};
};


/**
 * A wrapper object for SVG elements
 */
function SVGElement() {}

SVGElement.prototype = {

	// Default base for animation
	opacity: 1,
	// For labels, these CSS properties are applied to the <text> node directly
	textProps: ['fontSize', 'fontWeight', 'fontFamily', 'color',
		'lineHeight', 'width', 'textDecoration', 'textShadow', 'HcTextStroke'],

	/**
	 * Initialize the SVG renderer
	 * @param {Object} renderer
	 * @param {String} nodeName
	 */
	init: function (renderer, nodeName) {
		var wrapper = this;
		wrapper.element = nodeName === 'span' ?
			createElement(nodeName) :
			doc.createElementNS(SVG_NS, nodeName);
		wrapper.renderer = renderer;
	},

	/**
	 * Animate a given attribute
	 * @param {Object} params
	 * @param {Number} options The same options as in jQuery animation
	 * @param {Function} complete Function to perform at the end of animation
	 */
	animate: function (params, options, complete) {
		var animOptions = pick(options, globalAnimation, true);
		stop(this); // stop regardless of animation actually running, or reverting to .attr (#607)
		if (animOptions) {
			animOptions = merge(animOptions, {}); //#2625
			if (complete) { // allows using a callback with the global animation without overwriting it
				animOptions.complete = complete;
			}
			animate(this, params, animOptions);
		} else {
			this.attr(params);
			if (complete) {
				complete();
			}
		}
		return this;
	},

	/**
	 * Build an SVG gradient out of a common JavaScript configuration object
	 */
	colorGradient: function (color, prop, elem) {
		var renderer = this.renderer,
			colorObject,
			gradName,
			gradAttr,
			gradients,
			gradientObject,
			stops,
			stopColor,
			stopOpacity,
			radialReference,
			n,
			id,
			key = [];

		// Apply linear or radial gradients
		if (color.linearGradient) {
			gradName = 'linearGradient';
		} else if (color.radialGradient) {
			gradName = 'radialGradient';
		}

		if (gradName) {
			gradAttr = color[gradName];
			gradients = renderer.gradients;
			stops = color.stops;
			radialReference = elem.radialReference;

			// Keep < 2.2 kompatibility
			if (isArray(gradAttr)) {
				color[gradName] = gradAttr = {
					x1: gradAttr[0],
					y1: gradAttr[1],
					x2: gradAttr[2],
					y2: gradAttr[3],
					gradientUnits: 'userSpaceOnUse'
				};
			}

			// Correct the radial gradient for the radial reference system
			if (gradName === 'radialGradient' && radialReference && !defined(gradAttr.gradientUnits)) {
				gradAttr = merge(gradAttr, {
					cx: (radialReference[0] - radialReference[2] / 2) + gradAttr.cx * radialReference[2],
					cy: (radialReference[1] - radialReference[2] / 2) + gradAttr.cy * radialReference[2],
					r: gradAttr.r * radialReference[2],
					gradientUnits: 'userSpaceOnUse'
				});
			}

			// Build the unique key to detect whether we need to create a new element (#1282)
			for (n in gradAttr) {
				if (n !== 'id') {
					key.push(n, gradAttr[n]);
				}
			}
			for (n in stops) {
				key.push(stops[n]);
			}
			key = key.join(',');

			// Check if a gradient object with the same config object is created within this renderer
			if (gradients[key]) {
				id = gradients[key].attr('id');

			} else {

				// Set the id and create the element
				gradAttr.id = id = PREFIX + idCounter++;
				gradients[key] = gradientObject = renderer.createElement(gradName)
					.attr(gradAttr)
					.add(renderer.defs);


				// The gradient needs to keep a list of stops to be able to destroy them
				gradientObject.stops = [];
				each(stops, function (stop) {
					var stopObject;
					if (stop[1].indexOf('rgba') === 0) {
						colorObject = Color(stop[1]);
						stopColor = colorObject.get('rgb');
						stopOpacity = colorObject.get('a');
					} else {
						stopColor = stop[1];
						stopOpacity = 1;
					}
					stopObject = renderer.createElement('stop').attr({
						offset: stop[0],
						'stop-color': stopColor,
						'stop-opacity': stopOpacity
					}).add(gradientObject);

					// Add the stop element to the gradient
					gradientObject.stops.push(stopObject);
				});
			}

			// Set the reference to the gradient object
			elem.setAttribute(prop, 'url(' + renderer.url + '#' + id + ')');
		}
	},

	/**
	 * Set or get a given attribute
	 * @param {Object|String} hash
	 * @param {Mixed|Undefined} val
	 */
	attr: function (hash, val) {
		var key,
			value,
			element = this.element,
			hasSetSymbolSize,
			ret = this,
			skipAttr;

		// single key-value pair
		if (typeof hash === 'string' && val !== UNDEFINED) {
			key = hash;
			hash = {};
			hash[key] = val;
		}

		// used as a getter: first argument is a string, second is undefined
		if (typeof hash === 'string') {
			ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element);

		// setter
		} else {

			for (key in hash) {
				value = hash[key];
				skipAttr = false;



				if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
					if (!hasSetSymbolSize) {
						this.symbolAttr(hash);
						hasSetSymbolSize = true;
					}
					skipAttr = true;
				}

				if (this.rotation && (key === 'x' || key === 'y')) {
					this.doTransform = true;
				}

				if (!skipAttr) {
					(this[key + 'Setter'] || this._defaultSetter).call(this, value, key, element);
				}

				// Let the shadow follow the main element
				if (this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
					this.updateShadows(key, value);
				}
			}

			// Update transform. Do this outside the loop to prevent redundant updating for batch setting
			// of attributes.
			if (this.doTransform) {
				this.updateTransform();
				this.doTransform = false;
			}

		}

		return ret;
	},

	updateShadows: function (key, value) {
		var shadows = this.shadows,
			i = shadows.length;
		while (i--) {
			shadows[i].setAttribute(
				key,
				key === 'height' ?
					mathMax(value - (shadows[i].cutHeight || 0), 0) :
					key === 'd' ? this.d : value
			);
		}
	},

	/**
	 * Add a class name to an element
	 */
	addClass: function (className) {
		var element = this.element,
			currentClassName = attr(element, 'class') || '';

		if (currentClassName.indexOf(className) === -1) {
			attr(element, 'class', currentClassName + ' ' + className);
		}
		return this;
	},
	/* hasClass and removeClass are not (yet) needed
	hasClass: function (className) {
		return attr(this.element, 'class').indexOf(className) !== -1;
	},
	removeClass: function (className) {
		attr(this.element, 'class', attr(this.element, 'class').replace(className, ''));
		return this;
	},
	*/

	/**
	 * If one of the symbol size affecting parameters are changed,
	 * check all the others only once for each call to an element's
	 * .attr() method
	 * @param {Object} hash
	 */
	symbolAttr: function (hash) {
		var wrapper = this;

		each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR', 'anchorX', 'anchorY'], function (key) {
			wrapper[key] = pick(hash[key], wrapper[key]);
		});

		wrapper.attr({
			d: wrapper.renderer.symbols[wrapper.symbolName](
				wrapper.x,
				wrapper.y,
				wrapper.width,
				wrapper.height,
				wrapper
			)
		});
	},

	/**
	 * Apply a clipping path to this object
	 * @param {String} id
	 */
	clip: function (clipRect) {
		return this.attr('clip-path', clipRect ? 'url(' + this.renderer.url + '#' + clipRect.id + ')' : NONE);
	},

	/**
	 * Calculate the coordinates needed for drawing a rectangle crisply and return the
	 * calculated attributes
	 * @param {Number} strokeWidth
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} width
	 * @param {Number} height
	 */
	crisp: function (rect) {

		var wrapper = this,
			key,
			attribs = {},
			normalizer,
			strokeWidth = rect.strokeWidth || wrapper.strokeWidth || 0;

		normalizer = mathRound(strokeWidth) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors

		// normalize for crisp edges
		rect.x = mathFloor(rect.x || wrapper.x || 0) + normalizer;
		rect.y = mathFloor(rect.y || wrapper.y || 0) + normalizer;
		rect.width = mathFloor((rect.width || wrapper.width || 0) - 2 * normalizer);
		rect.height = mathFloor((rect.height || wrapper.height || 0) - 2 * normalizer);
		rect.strokeWidth = strokeWidth;

		for (key in rect) {
			if (wrapper[key] !== rect[key]) { // only set attribute if changed
				wrapper[key] = attribs[key] = rect[key];
			}
		}

		return attribs;
	},

	/**
	 * Set styles for the element
	 * @param {Object} styles
	 */
	css: function (styles) {
		var elemWrapper = this,
			oldStyles = elemWrapper.styles,
			newStyles = {},
			elem = elemWrapper.element,
			textWidth,
			n,
			serializedCss = '',
			hyphenate,
			hasNew = !oldStyles;

		// convert legacy
		if (styles && styles.color) {
			styles.fill = styles.color;
		}

		// Filter out existing styles to increase performance (#2640)
		if (oldStyles) {
			for (n in styles) {
				if (styles[n] !== oldStyles[n]) {
					newStyles[n] = styles[n];
					hasNew = true;
				}
			}
		}
		if (hasNew) {
			textWidth = elemWrapper.textWidth = styles && styles.width && elem.nodeName.toLowerCase() === 'text' && pInt(styles.width);

			// Merge the new styles with the old ones
			if (oldStyles) {
				styles = extend(
					oldStyles,
					newStyles
				);
			}

			// store object
			elemWrapper.styles = styles;

			if (textWidth && (useCanVG || (!hasSVG && elemWrapper.renderer.forExport))) {
				delete styles.width;
			}

			// serialize and set style attribute
			if (isIE && !hasSVG) {
				css(elemWrapper.element, styles);
			} else {
				/*jslint unparam: true*/
				hyphenate = function (a, b) { return '-' + b.toLowerCase(); };
				/*jslint unparam: false*/
				for (n in styles) {
					serializedCss += n.replace(/([A-Z])/g, hyphenate) + ':' + styles[n] + ';';
				}
				attr(elem, 'style', serializedCss); // #1881
			}


			// re-build text
			if (textWidth && elemWrapper.added) {
				elemWrapper.renderer.buildText(elemWrapper);
			}
		}

		return elemWrapper;
	},

	/**
	 * Add an event listener
	 * @param {String} eventType
	 * @param {Function} handler
	 */
	on: function (eventType, handler) {
		var svgElement = this,
			element = svgElement.element;

		// touch
		if (hasTouch && eventType === 'click') {
			element.ontouchstart = function (e) {
				svgElement.touchEventFired = Date.now();
				e.preventDefault();
				handler.call(element, e);
			};
			element.onclick = function (e) {
				if (userAgent.indexOf('Android') === -1 || Date.now() - (svgElement.touchEventFired || 0) > 1100) { // #2269
					handler.call(element, e);
				}
			};
		} else {
			// simplest possible event model for internal use
			element['on' + eventType] = handler;
		}
		return this;
	},

	/**
	 * Set the coordinates needed to draw a consistent radial gradient across
	 * pie slices regardless of positioning inside the chart. The format is
	 * [centerX, centerY, diameter] in pixels.
	 */
	setRadialReference: function (coordinates) {
		this.element.radialReference = coordinates;
		return this;
	},

	/**
	 * Move an object and its children by x and y values
	 * @param {Number} x
	 * @param {Number} y
	 */
	translate: function (x, y) {
		return this.attr({
			translateX: x,
			translateY: y
		});
	},

	/**
	 * Invert a group, rotate and flip
	 */
	invert: function () {
		var wrapper = this;
		wrapper.inverted = true;
		wrapper.updateTransform();
		return wrapper;
	},

	/**
	 * Private method to update the transform attribute based on internal
	 * properties
	 */
	updateTransform: function () {
		var wrapper = this,
			translateX = wrapper.translateX || 0,
			translateY = wrapper.translateY || 0,
			scaleX = wrapper.scaleX,
			scaleY = wrapper.scaleY,
			inverted = wrapper.inverted,
			rotation = wrapper.rotation,
			element = wrapper.element,
			transform;

		// flipping affects translate as adjustment for flipping around the group's axis
		if (inverted) {
			translateX += wrapper.attr('width');
			translateY += wrapper.attr('height');
		}

		// Apply translate. Nearly all transformed elements have translation, so instead
		// of checking for translate = 0, do it always (#1767, #1846).
		transform = ['translate(' + translateX + ',' + translateY + ')'];

		// apply rotation
		if (inverted) {
			transform.push('rotate(90) scale(-1,1)');
		} else if (rotation) { // text rotation
			transform.push('rotate(' + rotation + ' ' + (element.getAttribute('x') || 0) + ' ' + (element.getAttribute('y') || 0) + ')');
		}

		// apply scale
		if (defined(scaleX) || defined(scaleY)) {
			transform.push('scale(' + pick(scaleX, 1) + ' ' + pick(scaleY, 1) + ')');
		}

		if (transform.length) {
			element.setAttribute('transform', transform.join(' '));
		}
	},
	/**
	 * Bring the element to the front
	 */
	toFront: function () {
		var element = this.element;
		element.parentNode.appendChild(element);
		return this;
	},


	/**
	 * Break down alignment options like align, verticalAlign, x and y
	 * to x and y relative to the chart.
	 *
	 * @param {Object} alignOptions
	 * @param {Boolean} alignByTranslate
	 * @param {String[Object} box The box to align to, needs a width and height. When the
	 *        box is a string, it refers to an object in the Renderer. For example, when
	 *        box is 'spacingBox', it refers to Renderer.spacingBox which holds width, height
	 *        x and y properties.
	 *
	 */
	align: function (alignOptions, alignByTranslate, box) {
		var align,
			vAlign,
			x,
			y,
			attribs = {},
			alignTo,
			renderer = this.renderer,
			alignedObjects = renderer.alignedObjects;

		// First call on instanciate
		if (alignOptions) {
			this.alignOptions = alignOptions;
			this.alignByTranslate = alignByTranslate;
			if (!box || isString(box)) { // boxes other than renderer handle this internally
				this.alignTo = alignTo = box || 'renderer';
				erase(alignedObjects, this); // prevent duplicates, like legendGroup after resize
				alignedObjects.push(this);
				box = null; // reassign it below
			}

		// When called on resize, no arguments are supplied
		} else {
			alignOptions = this.alignOptions;
			alignByTranslate = this.alignByTranslate;
			alignTo = this.alignTo;
		}

		box = pick(box, renderer[alignTo], renderer);

		// Assign variables
		align = alignOptions.align;
		vAlign = alignOptions.verticalAlign;
		x = (box.x || 0) + (alignOptions.x || 0); // default: left align
		y = (box.y || 0) + (alignOptions.y || 0); // default: top align

		// Align
		if (align === 'right' || align === 'center') {
			x += (box.width - (alignOptions.width || 0)) /
					{ right: 1, center: 2 }[align];
		}
		attribs[alignByTranslate ? 'translateX' : 'x'] = mathRound(x);


		// Vertical align
		if (vAlign === 'bottom' || vAlign === 'middle') {
			y += (box.height - (alignOptions.height || 0)) /
					({ bottom: 1, middle: 2 }[vAlign] || 1);

		}
		attribs[alignByTranslate ? 'translateY' : 'y'] = mathRound(y);

		// Animate only if already placed
		this[this.placed ? 'animate' : 'attr'](attribs);
		this.placed = true;
		this.alignAttr = attribs;

		return this;
	},

	/**
	 * Get the bounding box (width, height, x and y) for the element
	 */
	getBBox: function () {
		var wrapper = this,
			bBox = wrapper.bBox,
			renderer = wrapper.renderer,
			width,
			height,
			rotation = wrapper.rotation,
			element = wrapper.element,
			styles = wrapper.styles,
			rad = rotation * deg2rad,
			textStr = wrapper.textStr,
			cacheKey;

		// Since numbers are monospaced, and numerical labels appear a lot in a chart,
		// we assume that a label of n characters has the same bounding box as others
		// of the same length.
		if (textStr === '' || numRegex.test(textStr)) {
			cacheKey = 'num.' + textStr.toString().length + (styles ? ('|' + styles.fontSize + '|' + styles.fontFamily) : '');

		} //else { // This code block made demo/waterfall fail, related to buildText
			// Caching all strings reduces rendering time by 4-5%.
			// TODO: Check how this affects places where bBox is found on the element
			//cacheKey = textStr + (styles ? ('|' + styles.fontSize + '|' + styles.fontFamily) : '');
		//}
		if (cacheKey) {
			bBox = renderer.cache[cacheKey];
		}

		// No cache found
		if (!bBox) {

			// SVG elements
			if (element.namespaceURI === SVG_NS || renderer.forExport) {
				try { // Fails in Firefox if the container has display: none.

					bBox = element.getBBox ?
						// SVG: use extend because IE9 is not allowed to change width and height in case
						// of rotation (below)
						extend({}, element.getBBox()) :
						// Canvas renderer and legacy IE in export mode
						{
							width: element.offsetWidth,
							height: element.offsetHeight
						};
				} catch (e) {}

				// If the bBox is not set, the try-catch block above failed. The other condition
				// is for Opera that returns a width of -Infinity on hidden elements.
				if (!bBox || bBox.width < 0) {
					bBox = { width: 0, height: 0 };
				}


			// VML Renderer or useHTML within SVG
			} else {

				bBox = wrapper.htmlGetBBox();

			}

			// True SVG elements as well as HTML elements in modern browsers using the .useHTML option
			// need to compensated for rotation
			if (renderer.isSVG) {
				width = bBox.width;
				height = bBox.height;

				// Workaround for wrong bounding box in IE9 and IE10 (#1101, #1505, #1669, #2568)
				if (isIE && styles && styles.fontSize === '11px' && height.toPrecision(3) === '16.9') {
					bBox.height = height = 14;
				}

				// Adjust for rotated text
				if (rotation) {
					bBox.width = mathAbs(height * mathSin(rad)) + mathAbs(width * mathCos(rad));
					bBox.height = mathAbs(height * mathCos(rad)) + mathAbs(width * mathSin(rad));
				}
			}

			// Cache it
			wrapper.bBox = bBox;
			if (cacheKey) {
				renderer.cache[cacheKey] = bBox;
			}
		}
		return bBox;
	},

	/**
	 * Show the element
	 */
	show: function (inherit) {
		// IE9-11 doesn't handle visibilty:inherit well, so we remove the attribute instead (#2881)
		if (inherit && this.element.namespaceURI === SVG_NS) {
			this.element.removeAttribute('visibility');
		} else {
			this.attr({ visibility: inherit ? 'inherit' : VISIBLE });
		}
		return this;
	},

	/**
	 * Hide the element
	 */
	hide: function () {
		return this.attr({ visibility: HIDDEN });
	},

	fadeOut: function (duration) {
		var elemWrapper = this;
		elemWrapper.animate({
			opacity: 0
		}, {
			duration: duration || 150,
			complete: function () {
				elemWrapper.attr({ y: -9999 }); // #3088, assuming we're only using this for tooltips
			}
		});
	},

	/**
	 * Add the element
	 * @param {Object|Undefined} parent Can be an element, an element wrapper or undefined
	 *    to append the element to the renderer.box.
	 */
	add: function (parent) {

		var renderer = this.renderer,
			parentWrapper = parent || renderer,
			parentNode = parentWrapper.element || renderer.box,
			childNodes,
			element = this.element,
			zIndex = this.zIndex,
			otherElement,
			otherZIndex,
			i,
			inserted;

		if (parent) {
			this.parentGroup = parent;
		}

		// mark as inverted
		this.parentInverted = parent && parent.inverted;

		// build formatted text
		if (this.textStr !== undefined) {
			renderer.buildText(this);
		}

		// mark the container as having z indexed children
		if (zIndex) {
			parentWrapper.handleZ = true;
			zIndex = pInt(zIndex);
		}

		// insert according to this and other elements' zIndex
		if (parentWrapper.handleZ) { // this element or any of its siblings has a z index
			childNodes = parentNode.childNodes;
			for (i = 0; i < childNodes.length; i++) {
				otherElement = childNodes[i];
				otherZIndex = attr(otherElement, 'zIndex');
				if (otherElement !== element && (
						// insert before the first element with a higher zIndex
						pInt(otherZIndex) > zIndex ||
						// if no zIndex given, insert before the first element with a zIndex
						(!defined(zIndex) && defined(otherZIndex))

						)) {
					parentNode.insertBefore(element, otherElement);
					inserted = true;
					break;
				}
			}
		}

		// default: append at the end
		if (!inserted) {
			parentNode.appendChild(element);
		}

		// mark as added
		this.added = true;

		// fire an event for internal hooks
		if (this.onAdd) {
			this.onAdd();
		}

		return this;
	},

	/**
	 * Removes a child either by removeChild or move to garbageBin.
	 * Issue 490; in VML removeChild results in Orphaned nodes according to sIEve, discardElement does not.
	 */
	safeRemoveChild: function (element) {
		var parentNode = element.parentNode;
		if (parentNode) {
			parentNode.removeChild(element);
		}
	},

	/**
	 * Destroy the element and element wrapper
	 */
	destroy: function () {
		var wrapper = this,
			element = wrapper.element || {},
			shadows = wrapper.shadows,
			parentToClean = wrapper.renderer.isSVG && element.nodeName === 'SPAN' && wrapper.parentGroup,
			grandParent,
			key,
			i;

		// remove events
		element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = element.point = null;
		stop(wrapper); // stop running animations

		if (wrapper.clipPath) {
			wrapper.clipPath = wrapper.clipPath.destroy();
		}

		// Destroy stops in case this is a gradient object
		if (wrapper.stops) {
			for (i = 0; i < wrapper.stops.length; i++) {
				wrapper.stops[i] = wrapper.stops[i].destroy();
			}
			wrapper.stops = null;
		}

		// remove element
		wrapper.safeRemoveChild(element);

		// destroy shadows
		if (shadows) {
			each(shadows, function (shadow) {
				wrapper.safeRemoveChild(shadow);
			});
		}

		// In case of useHTML, clean up empty containers emulating SVG groups (#1960, #2393, #2697).
		while (parentToClean && parentToClean.div && parentToClean.div.childNodes.length === 0) {
			grandParent = parentToClean.parentGroup;
			wrapper.safeRemoveChild(parentToClean.div);
			delete parentToClean.div;
			parentToClean = grandParent;
		}

		// remove from alignObjects
		if (wrapper.alignTo) {
			erase(wrapper.renderer.alignedObjects, wrapper);
		}

		for (key in wrapper) {
			delete wrapper[key];
		}

		return null;
	},

	/**
	 * Add a shadow to the element. Must be done after the element is added to the DOM
	 * @param {Boolean|Object} shadowOptions
	 */
	shadow: function (shadowOptions, group, cutOff) {
		var shadows = [],
			i,
			shadow,
			element = this.element,
			strokeWidth,
			shadowWidth,
			shadowElementOpacity,

			// compensate for inverted plot area
			transform;


		if (shadowOptions) {
			shadowWidth = pick(shadowOptions.width, 3);
			shadowElementOpacity = (shadowOptions.opacity || 0.15) / shadowWidth;
			transform = this.parentInverted ?
				'(-1,-1)' :
				'(' + pick(shadowOptions.offsetX, 1) + ', ' + pick(shadowOptions.offsetY, 1) + ')';
			for (i = 1; i <= shadowWidth; i++) {
				shadow = element.cloneNode(0);
				strokeWidth = (shadowWidth * 2) + 1 - (2 * i);
				attr(shadow, {
					'isShadow': 'true',
					'stroke': shadowOptions.color || 'black',
					'stroke-opacity': shadowElementOpacity * i,
					'stroke-width': strokeWidth,
					'transform': 'translate' + transform,
					'fill': NONE
				});
				if (cutOff) {
					attr(shadow, 'height', mathMax(attr(shadow, 'height') - strokeWidth, 0));
					shadow.cutHeight = strokeWidth;
				}

				if (group) {
					group.element.appendChild(shadow);
				} else {
					element.parentNode.insertBefore(shadow, element);
				}

				shadows.push(shadow);
			}

			this.shadows = shadows;
		}
		return this;

	},

	xGetter: function (key) {
		if (this.element.nodeName === 'circle') {
			key = { x: 'cx', y: 'cy' }[key] || key;
		}
		return this._defaultGetter(key);
	},

	/**
	 * Get the current value of an attribute or pseudo attribute, used mainly
	 * for animation.
	 */
	_defaultGetter: function (key) {
		var ret = pick(this[key], this.element ? this.element.getAttribute(key) : null, 0);

		if (/^[\-0-9\.]+$/.test(ret)) { // is numerical
			ret = parseFloat(ret);
		}
		return ret;
	},


	dSetter: function (value, key, element) {
		if (value && value.join) { // join path
			value = value.join(' ');
		}
		if (/(NaN| {2}|^$)/.test(value)) {
			value = 'M 0 0';
		}
		element.setAttribute(key, value);

		this[key] = value;
	},
	dashstyleSetter: function (value) {
		var i;
		value = value && value.toLowerCase();
		if (value) {
			value = value
				.replace('shortdashdotdot', '3,1,1,1,1,1,')
				.replace('shortdashdot', '3,1,1,1')
				.replace('shortdot', '1,1,')
				.replace('shortdash', '3,1,')
				.replace('longdash', '8,3,')
				.replace(/dot/g, '1,3,')
				.replace('dash', '4,3,')
				.replace(/,$/, '')
				.split(','); // ending comma

			i = value.length;
			while (i--) {
				value[i] = pInt(value[i]) * this['stroke-width'];
			}
			value = value.join(',')
				.replace('NaN', 'none'); // #3226
			this.element.setAttribute('stroke-dasharray', value);
		}
	},
	alignSetter: function (value) {
		this.element.setAttribute('text-anchor', { left: 'start', center: 'middle', right: 'end' }[value]);
	},
	opacitySetter: function (value, key, element) {
		this[key] = value;
		element.setAttribute(key, value);
	},
	titleSetter: function (value) {
		var titleNode = this.element.getElementsByTagName('title')[0];
		if (!titleNode) {
			titleNode = doc.createElementNS(SVG_NS, 'title');
			this.element.appendChild(titleNode);
		}
		titleNode.textContent = pick(value, '').replace(/<[^>]*>/g, ''); // #3276
	},
	textSetter: function (value) {
		if (value !== this.textStr) {
			// Delete bBox memo when the text changes
			delete this.bBox;

			this.textStr = value;
			if (this.added) {
				this.renderer.buildText(this);
			}
		}
	},
	fillSetter: function (value, key, element) {
		if (typeof value === 'string') {
			element.setAttribute(key, value);
		} else if (value) {
			this.colorGradient(value, key, element);
		}
	},
	zIndexSetter: function (value, key, element) {
		element.setAttribute(key, value);
		this[key] = value;
	},
	_defaultSetter: function (value, key, element) {
		element.setAttribute(key, value);
	}
};

// Some shared setters and getters
SVGElement.prototype.yGetter = SVGElement.prototype.xGetter;
SVGElement.prototype.translateXSetter = SVGElement.prototype.translateYSetter =
		SVGElement.prototype.rotationSetter = SVGElement.prototype.verticalAlignSetter =
		SVGElement.prototype.scaleXSetter = SVGElement.prototype.scaleYSetter = function (value, key) {
	this[key] = value;
	this.doTransform = true;
};

// WebKit and Batik have problems with a stroke-width of zero, so in this case we remove the
// stroke attribute altogether. #1270, #1369, #3065, #3072.
SVGElement.prototype['stroke-widthSetter'] = SVGElement.prototype.strokeSetter = function (value, key, element) {
	this[key] = value;
	// Only apply the stroke attribute if the stroke width is defined and larger than 0
	if (this.stroke && this['stroke-width']) {
		this.strokeWidth = this['stroke-width'];
		SVGElement.prototype.fillSetter.call(this, this.stroke, 'stroke', element); // use prototype as instance may be overridden
		element.setAttribute('stroke-width', this['stroke-width']);
		this.hasStroke = true;
	} else if (key === 'stroke-width' && value === 0 && this.hasStroke) {
		element.removeAttribute('stroke');
		this.hasStroke = false;
	}
};


/**
 * The default SVG renderer
 */
var SVGRenderer = function () {
	this.init.apply(this, arguments);
};
SVGRenderer.prototype = {
	Element: SVGElement,

	/**
	 * Initialize the SVGRenderer
	 * @param {Object} container
	 * @param {Number} width
	 * @param {Number} height
	 * @param {Boolean} forExport
	 */
	init: function (container, width, height, style, forExport) {
		var renderer = this,
			loc = location,
			boxWrapper,
			element,
			desc;

		boxWrapper = renderer.createElement('svg')
			.attr({
				version: '1.1'
			})
			.css(this.getStyle(style));
		element = boxWrapper.element;
		container.appendChild(element);

		// For browsers other than IE, add the namespace attribute (#1978)
		if (container.innerHTML.indexOf('xmlns') === -1) {
			attr(element, 'xmlns', SVG_NS);
		}

		// object properties
		renderer.isSVG = true;
		renderer.box = element;
		renderer.boxWrapper = boxWrapper;
		renderer.alignedObjects = [];

		// Page url used for internal references. #24, #672, #1070
		renderer.url = (isFirefox || isWebKit) && doc.getElementsByTagName('base').length ?
			loc.href
				.replace(/#.*?$/, '') // remove the hash
				.replace(/([\('\)])/g, '\\$1') // escape parantheses and quotes
				.replace(/ /g, '%20') : // replace spaces (needed for Safari only)
			'';

		// Add description
		desc = this.createElement('desc').add();
		desc.element.appendChild(doc.createTextNode('Created with ' + PRODUCT + ' ' + VERSION));


		renderer.defs = this.createElement('defs').add();
		renderer.forExport = forExport;
		renderer.gradients = {}; // Object where gradient SvgElements are stored
		renderer.cache = {}; // Cache for numerical bounding boxes

		renderer.setSize(width, height, false);



		// Issue 110 workaround:
		// In Firefox, if a div is positioned by percentage, its pixel position may land
		// between pixels. The container itself doesn't display this, but an SVG element
		// inside this container will be drawn at subpixel precision. In order to draw
		// sharp lines, this must be compensated for. This doesn't seem to work inside
		// iframes though (like in jsFiddle).
		var subPixelFix, rect;
		if (isFirefox && container.getBoundingClientRect) {
			renderer.subPixelFix = subPixelFix = function () {
				css(container, { left: 0, top: 0 });
				rect = container.getBoundingClientRect();
				css(container, {
					left: (mathCeil(rect.left) - rect.left) + PX,
					top: (mathCeil(rect.top) - rect.top) + PX
				});
			};

			// run the fix now
			subPixelFix();

			// run it on resize
			addEvent(win, 'resize', subPixelFix);
		}
	},

	getStyle: function (style) {
		return (this.style = extend({
			fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', // default font
			fontSize: '12px'
		}, style));
	},

	/**
	 * Detect whether the renderer is hidden. This happens when one of the parent elements
	 * has display: none. #608.
	 */
	isHidden: function () {
		return !this.boxWrapper.getBBox().width;
	},

	/**
	 * Destroys the renderer and its allocated members.
	 */
	destroy: function () {
		var renderer = this,
			rendererDefs = renderer.defs;
		renderer.box = null;
		renderer.boxWrapper = renderer.boxWrapper.destroy();

		// Call destroy on all gradient elements
		destroyObjectProperties(renderer.gradients || {});
		renderer.gradients = null;

		// Defs are null in VMLRenderer
		// Otherwise, destroy them here.
		if (rendererDefs) {
			renderer.defs = rendererDefs.destroy();
		}

		// Remove sub pixel fix handler
		// We need to check that there is a handler, otherwise all functions that are registered for event 'resize' are removed
		// See issue #982
		if (renderer.subPixelFix) {
			removeEvent(win, 'resize', renderer.subPixelFix);
		}

		renderer.alignedObjects = null;

		return null;
	},

	/**
	 * Create a wrapper for an SVG element
	 * @param {Object} nodeName
	 */
	createElement: function (nodeName) {
		var wrapper = new this.Element();
		wrapper.init(this, nodeName);
		return wrapper;
	},

	/**
	 * Dummy function for use in canvas renderer
	 */
	draw: function () {},

	/**
	 * Parse a simple HTML string into SVG tspans
	 *
	 * @param {Object} textNode The parent text SVG node
	 */
	buildText: function (wrapper) {
		var textNode = wrapper.element,
			renderer = this,
			forExport = renderer.forExport,
			textStr = pick(wrapper.textStr, '').toString(),
			hasMarkup = textStr.indexOf('<') !== -1,
			lines,
			childNodes = textNode.childNodes,
			styleRegex,
			hrefRegex,
			parentX = attr(textNode, 'x'),
			textStyles = wrapper.styles,
			width = wrapper.textWidth,
			textLineHeight = textStyles && textStyles.lineHeight,
			textStroke = textStyles && textStyles.HcTextStroke,
			i = childNodes.length,
			getLineHeight = function (tspan) {
				return textLineHeight ?
					pInt(textLineHeight) :
					renderer.fontMetrics(
						/(px|em)$/.test(tspan && tspan.style.fontSize) ?
							tspan.style.fontSize :
							((textStyles && textStyles.fontSize) || renderer.style.fontSize || 12),
						tspan
					).h;
			};

		/// remove old text
		while (i--) {
			textNode.removeChild(childNodes[i]);
		}

		// Skip tspans, add text directly to text node. The forceTSpan is a hook
		// used in text outline hack.
		if (!hasMarkup && !textStroke && textStr.indexOf(' ') === -1) {
			textNode.appendChild(doc.createTextNode(textStr));
			return;

		// Complex strings, add more logic
		} else {

			styleRegex = /<.*style="([^"]+)".*>/;
			hrefRegex = /<.*href="(http[^"]+)".*>/;

			if (width && !wrapper.added) {
				this.box.appendChild(textNode); // attach it to the DOM to read offset width
			}

			if (hasMarkup) {
				lines = textStr
					.replace(/<(b|strong)>/g, '<span style="font-weight:bold">')
					.replace(/<(i|em)>/g, '<span style="font-style:italic">')
					.replace(/<a/g, '<span')
					.replace(/<\/(b|strong|i|em|a)>/g, '</span>')
					.split(/<br.*?>/g);

			} else {
				lines = [textStr];
			}


			// remove empty line at end
			if (lines[lines.length - 1] === '') {
				lines.pop();
			}


			// build the lines
			each(lines, function (line, lineNo) {
				var spans, spanNo = 0;

				line = line.replace(/<span/g, '|||<span').replace(/<\/span>/g, '</span>|||');
				spans = line.split('|||');

				each(spans, function (span) {
					if (span !== '' || spans.length === 1) {
						var attributes = {},
							tspan = doc.createElementNS(SVG_NS, 'tspan'),
							spanStyle; // #390
						if (styleRegex.test(span)) {
							spanStyle = span.match(styleRegex)[1].replace(/(;| |^)color([ :])/, '$1fill$2');
							attr(tspan, 'style', spanStyle);
						}
						if (hrefRegex.test(span) && !forExport) { // Not for export - #1529
							attr(tspan, 'onclick', 'location.href=\"' + span.match(hrefRegex)[1] + '\"');
							css(tspan, { cursor: 'pointer' });
						}

						span = (span.replace(/<(.|\n)*?>/g, '') || ' ')
							.replace(/&lt;/g, '<')
							.replace(/&gt;/g, '>');

						// Nested tags aren't supported, and cause crash in Safari (#1596)
						if (span !== ' ') {

							// add the text node
							tspan.appendChild(doc.createTextNode(span));

							if (!spanNo) { // first span in a line, align it to the left
								if (lineNo && parentX !== null) {
									attributes.x = parentX;
								}
							} else {
								attributes.dx = 0; // #16
							}

							// add attributes
							attr(tspan, attributes);

							// Append it
							textNode.appendChild(tspan);

							// first span on subsequent line, add the line height
							if (!spanNo && lineNo) {

								// allow getting the right offset height in exporting in IE
								if (!hasSVG && forExport) {
									css(tspan, { display: 'block' });
								}

								// Set the line height based on the font size of either
								// the text element or the tspan element
								attr(
									tspan,
									'dy',
									getLineHeight(tspan)
								);
							}

							// check width and apply soft breaks
							if (width) {
								var words = span.replace(/([^\^])-/g, '$1- ').split(' '), // #1273
									hasWhiteSpace = spans.length > 1 || (words.length > 1 && textStyles.whiteSpace !== 'nowrap'),
									tooLong,
									actualWidth,
									hcHeight = textStyles.HcHeight,
									rest = [],
									dy = getLineHeight(tspan),
									softLineNo = 1,
									bBox;

								while (hasWhiteSpace && (words.length || rest.length)) {
									delete wrapper.bBox; // delete cache
									bBox = wrapper.getBBox();
									actualWidth = bBox.width;

									// Old IE cannot measure the actualWidth for SVG elements (#2314)
									if (!hasSVG && renderer.forExport) {
										actualWidth = renderer.measureSpanWidth(tspan.firstChild.data, wrapper.styles);
									}

									tooLong = actualWidth > width;
									if (!tooLong || words.length === 1) { // new line needed
										words = rest;
										rest = [];
										if (words.length) {
											softLineNo++;
											if (hcHeight && softLineNo * dy > hcHeight) {
												words = ['...'];
												wrapper.attr('title', wrapper.textStr);
											} else {

												tspan = doc.createElementNS(SVG_NS, 'tspan');
												attr(tspan, {
													dy: dy,
													x: parentX
												});
												if (spanStyle) { // #390
													attr(tspan, 'style', spanStyle);
												}
												textNode.appendChild(tspan);
											}
										}
										if (actualWidth > width) { // a single word is pressing it out
											width = actualWidth;
										}
									} else { // append to existing line tspan
										tspan.removeChild(tspan.firstChild);
										rest.unshift(words.pop());
									}
									if (words.length) {
										tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g, '-')));
									}
								}
							}

							spanNo++;
						}
					}
				});
			});
		}
	},

	/**
	 * Create a button with preset states
	 * @param {String} text
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Function} callback
	 * @param {Object} normalState
	 * @param {Object} hoverState
	 * @param {Object} pressedState
	 */
	button: function (text, x, y, callback, normalState, hoverState, pressedState, disabledState, shape) {
		var label = this.label(text, x, y, shape, null, null, null, null, 'button'),
			curState = 0,
			stateOptions,
			stateStyle,
			normalStyle,
			hoverStyle,
			pressedStyle,
			disabledStyle,
			verticalGradient = { x1: 0, y1: 0, x2: 0, y2: 1 };

		// Normal state - prepare the attributes
		normalState = merge({
			'stroke-width': 1,
			stroke: '#CCCCCC',
			fill: {
				linearGradient: verticalGradient,
				stops: [
					[0, '#FEFEFE'],
					[1, '#F6F6F6']
				]
			},
			r: 2,
			padding: 5,
			style: {
				color: 'black'
			}
		}, normalState);
		normalStyle = normalState.style;
		delete normalState.style;

		// Hover state
		hoverState = merge(normalState, {
			stroke: '#68A',
			fill: {
				linearGradient: verticalGradient,
				stops: [
					[0, '#FFF'],
					[1, '#ACF']
				]
			}
		}, hoverState);
		hoverStyle = hoverState.style;
		delete hoverState.style;

		// Pressed state
		pressedState = merge(normalState, {
			stroke: '#68A',
			fill: {
				linearGradient: verticalGradient,
				stops: [
					[0, '#9BD'],
					[1, '#CDF']
				]
			}
		}, pressedState);
		pressedStyle = pressedState.style;
		delete pressedState.style;

		// Disabled state
		disabledState = merge(normalState, {
			style: {
				color: '#CCC'
			}
		}, disabledState);
		disabledStyle = disabledState.style;
		delete disabledState.style;

		// Add the events. IE9 and IE10 need mouseover and mouseout to funciton (#667).
		addEvent(label.element, isIE ? 'mouseover' : 'mouseenter', function () {
			if (curState !== 3) {
				label.attr(hoverState)
					.css(hoverStyle);
			}
		});
		addEvent(label.element, isIE ? 'mouseout' : 'mouseleave', function () {
			if (curState !== 3) {
				stateOptions = [normalState, hoverState, pressedState][curState];
				stateStyle = [normalStyle, hoverStyle, pressedStyle][curState];
				label.attr(stateOptions)
					.css(stateStyle);
			}
		});

		label.setState = function (state) {
			label.state = curState = state;
			if (!state) {
				label.attr(normalState)
					.css(normalStyle);
			} else if (state === 2) {
				label.attr(pressedState)
					.css(pressedStyle);
			} else if (state === 3) {
				label.attr(disabledState)
					.css(disabledStyle);
			}
		};

		return label
			.on('click', function () {
				if (curState !== 3) {
					callback.call(label);
				}
			})
			.attr(normalState)
			.css(extend({ cursor: 'default' }, normalStyle));
	},

	/**
	 * Make a straight line crisper by not spilling out to neighbour pixels
	 * @param {Array} points
	 * @param {Number} width
	 */
	crispLine: function (points, width) {
		// points format: [M, 0, 0, L, 100, 0]
		// normalize to a crisp line
		if (points[1] === points[4]) {
			// Substract due to #1129. Now bottom and left axis gridlines behave the same.
			points[1] = points[4] = mathRound(points[1]) - (width % 2 / 2);
		}
		if (points[2] === points[5]) {
			points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2);
		}
		return points;
	},


	/**
	 * Draw a path
	 * @param {Array} path An SVG path in array form
	 */
	path: function (path) {
		var attr = {
			fill: NONE
		};
		if (isArray(path)) {
			attr.d = path;
		} else if (isObject(path)) { // attributes
			extend(attr, path);
		}
		return this.createElement('path').attr(attr);
	},

	/**
	 * Draw and return an SVG circle
	 * @param {Number} x The x position
	 * @param {Number} y The y position
	 * @param {Number} r The radius
	 */
	circle: function (x, y, r) {
		var attr = isObject(x) ?
			x :
			{
				x: x,
				y: y,
				r: r
			},
			wrapper = this.createElement('circle');

		wrapper.xSetter = function (value) {
			this.element.setAttribute('cx', value);
		};
		wrapper.ySetter = function (value) {
			this.element.setAttribute('cy', value);
		};
		return wrapper.attr(attr);
	},

	/**
	 * Draw and return an arc
	 * @param {Number} x X position
	 * @param {Number} y Y position
	 * @param {Number} r Radius
	 * @param {Number} innerR Inner radius like used in donut charts
	 * @param {Number} start Starting angle
	 * @param {Number} end Ending angle
	 */
	arc: function (x, y, r, innerR, start, end) {
		var arc;

		if (isObject(x)) {
			y = x.y;
			r = x.r;
			innerR = x.innerR;
			start = x.start;
			end = x.end;
			x = x.x;
		}

		// Arcs are defined as symbols for the ability to set
		// attributes in attr and animate
		arc = this.symbol('arc', x || 0, y || 0, r || 0, r || 0, {
			innerR: innerR || 0,
			start: start || 0,
			end: end || 0
		});
		arc.r = r; // #959
		return arc;
	},

	/**
	 * Draw and return a rectangle
	 * @param {Number} x Left position
	 * @param {Number} y Top position
	 * @param {Number} width
	 * @param {Number} height
	 * @param {Number} r Border corner radius
	 * @param {Number} strokeWidth A stroke width can be supplied to allow crisp drawing
	 */
	rect: function (x, y, width, height, r, strokeWidth) {

		r = isObject(x) ? x.r : r;

		var wrapper = this.createElement('rect'),
			attribs = isObject(x) ? x : x === UNDEFINED ? {} : {
				x: x,
				y: y,
				width: mathMax(width, 0),
				height: mathMax(height, 0)
			};

		if (strokeWidth !== UNDEFINED) {
			attribs.strokeWidth = strokeWidth;
			attribs = wrapper.crisp(attribs);
		}

		if (r) {
			attribs.r = r;
		}

		wrapper.rSetter = function (value) {
			attr(this.element, {
				rx: value,
				ry: value
			});
		};

		return wrapper.attr(attribs);
	},

	/**
	 * Resize the box and re-align all aligned elements
	 * @param {Object} width
	 * @param {Object} height
	 * @param {Boolean} animate
	 *
	 */
	setSize: function (width, height, animate) {
		var renderer = this,
			alignedObjects = renderer.alignedObjects,
			i = alignedObjects.length;

		renderer.width = width;
		renderer.height = height;

		renderer.boxWrapper[pick(animate, true) ? 'animate' : 'attr']({
			width: width,
			height: height
		});

		while (i--) {
			alignedObjects[i].align();
		}
	},

	/**
	 * Create a group
	 * @param {String} name The group will be given a class name of 'highcharts-{name}'.
	 *     This can be used for styling and scripting.
	 */
	g: function (name) {
		var elem = this.createElement('g');
		return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem;
	},

	/**
	 * Display an image
	 * @param {String} src
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} width
	 * @param {Number} height
	 */
	image: function (src, x, y, width, height) {
		var attribs = {
				preserveAspectRatio: NONE
			},
			elemWrapper;

		// optional properties
		if (arguments.length > 1) {
			extend(attribs, {
				x: x,
				y: y,
				width: width,
				height: height
			});
		}

		elemWrapper = this.createElement('image').attr(attribs);

		// set the href in the xlink namespace
		if (elemWrapper.element.setAttributeNS) {
			elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink',
				'href', src);
		} else {
			// could be exporting in IE
			// using href throws "not supported" in ie7 and under, requries regex shim to fix later
			elemWrapper.element.setAttribute('hc-svg-href', src);
		}
		return elemWrapper;
	},

	/**
	 * Draw a symbol out of pre-defined shape paths from the namespace 'symbol' object.
	 *
	 * @param {Object} symbol
	 * @param {Object} x
	 * @param {Object} y
	 * @param {Object} radius
	 * @param {Object} options
	 */
	symbol: function (symbol, x, y, width, height, options) {

		var obj,

			// get the symbol definition function
			symbolFn = this.symbols[symbol],

			// check if there's a path defined for this symbol
			path = symbolFn && symbolFn(
				mathRound(x),
				mathRound(y),
				width,
				height,
				options
			),

			imageElement,
			imageRegex = /^url\((.*?)\)$/,
			imageSrc,
			imageSize,
			centerImage;

		if (path) {

			obj = this.path(path);
			// expando properties for use in animate and attr
			extend(obj, {
				symbolName: symbol,
				x: x,
				y: y,
				width: width,
				height: height
			});
			if (options) {
				extend(obj, options);
			}


		// image symbols
		} else if (imageRegex.test(symbol)) {

			// On image load, set the size and position
			centerImage = function (img, size) {
				if (img.element) { // it may be destroyed in the meantime (#1390)
					img.attr({
						width: size[0],
						height: size[1]
					});

					if (!img.alignByTranslate) { // #185
						img.translate(
							mathRound((width - size[0]) / 2), // #1378
							mathRound((height - size[1]) / 2)
						);
					}
				}
			};

			imageSrc = symbol.match(imageRegex)[1];
			imageSize = symbolSizes[imageSrc] || (options && options.width && options.height && [options.width, options.height]);

			// Ireate the image synchronously, add attribs async
			obj = this.image(imageSrc)
				.attr({
					x: x,
					y: y
				});
			obj.isImg = true;

			if (imageSize) {
				centerImage(obj, imageSize);
			} else {
				// Initialize image to be 0 size so export will still function if there's no cached sizes.
				obj.attr({ width: 0, height: 0 });

				// Create a dummy JavaScript image to get the width and height. Due to a bug in IE < 8,
				// the created element must be assigned to a variable in order to load (#292).
				imageElement = createElement('img', {
					onload: function () {
						centerImage(obj, symbolSizes[imageSrc] = [this.width, this.height]);
					},
					src: imageSrc
				});
			}
		}

		return obj;
	},

	/**
	 * An extendable collection of functions for defining symbol paths.
	 */
	symbols: {
		'circle': function (x, y, w, h) {
			var cpw = 0.166 * w;
			return [
				M, x + w / 2, y,
				'C', x + w + cpw, y, x + w + cpw, y + h, x + w / 2, y + h,
				'C', x - cpw, y + h, x - cpw, y, x + w / 2, y,
				'Z'
			];
		},

		'square': function (x, y, w, h) {
			return [
				M, x, y,
				L, x + w, y,
				x + w, y + h,
				x, y + h,
				'Z'
			];
		},

		'triangle': function (x, y, w, h) {
			return [
				M, x + w / 2, y,
				L, x + w, y + h,
				x, y + h,
				'Z'
			];
		},

		'triangle-down': function (x, y, w, h) {
			return [
				M, x, y,
				L, x + w, y,
				x + w / 2, y + h,
				'Z'
			];
		},
		'diamond': function (x, y, w, h) {
			return [
				M, x + w / 2, y,
				L, x + w, y + h / 2,
				x + w / 2, y + h,
				x, y + h / 2,
				'Z'
			];
		},
		'arc': function (x, y, w, h, options) {
			var start = options.start,
				radius = options.r || w || h,
				end = options.end - 0.001, // to prevent cos and sin of start and end from becoming equal on 360 arcs (related: #1561)
				innerRadius = options.innerR,
				open = options.open,
				cosStart = mathCos(start),
				sinStart = mathSin(start),
				cosEnd = mathCos(end),
				sinEnd = mathSin(end),
				longArc = options.end - start < mathPI ? 0 : 1;

			return [
				M,
				x + radius * cosStart,
				y + radius * sinStart,
				'A', // arcTo
				radius, // x radius
				radius, // y radius
				0, // slanting
				longArc, // long or short arc
				1, // clockwise
				x + radius * cosEnd,
				y + radius * sinEnd,
				open ? M : L,
				x + innerRadius * cosEnd,
				y + innerRadius * sinEnd,
				'A', // arcTo
				innerRadius, // x radius
				innerRadius, // y radius
				0, // slanting
				longArc, // long or short arc
				0, // clockwise
				x + innerRadius * cosStart,
				y + innerRadius * sinStart,

				open ? '' : 'Z' // close
			];
		},

		/**
		 * Callout shape used for default tooltips, also used for rounded rectangles in VML
		 */
		callout: function (x, y, w, h, options) {
			var arrowLength = 6,
				halfDistance = 6,
				r = mathMin((options && options.r) || 0, w, h),
				safeDistance = r + halfDistance,
				anchorX = options && options.anchorX,
				anchorY = options && options.anchorY,
				path,
				normalizer = mathRound(options.strokeWidth || 0) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors;

			x += normalizer;
			y += normalizer;
			path = [
				'M', x + r, y,
				'L', x + w - r, y, // top side
				'C', x + w, y, x + w, y, x + w, y + r, // top-right corner
				'L', x + w, y + h - r, // right side
				'C', x + w, y + h, x + w, y + h, x + w - r, y + h, // bottom-right corner
				'L', x + r, y + h, // bottom side
				'C', x, y + h, x, y + h, x, y + h - r, // bottom-left corner
				'L', x, y + r, // left side
				'C', x, y, x, y, x + r, y // top-right corner
			];

			if (anchorX && anchorX > w && anchorY > y + safeDistance && anchorY < y + h - safeDistance) { // replace right side
				path.splice(13, 3,
					'L', x + w, anchorY - halfDistance,
					x + w + arrowLength, anchorY,
					x + w, anchorY + halfDistance,
					x + w, y + h - r
				);
			} else if (anchorX && anchorX < 0 && anchorY > y + safeDistance && anchorY < y + h - safeDistance) { // replace left side
				path.splice(33, 3,
					'L', x, anchorY + halfDistance,
					x - arrowLength, anchorY,
					x, anchorY - halfDistance,
					x, y + r
				);
			} else if (anchorY && anchorY > h && anchorX > x + safeDistance && anchorX < x + w - safeDistance) { // replace bottom
				path.splice(23, 3,
					'L', anchorX + halfDistance, y + h,
					anchorX, y + h + arrowLength,
					anchorX - halfDistance, y + h,
					x + r, y + h
				);
			} else if (anchorY && anchorY < 0 && anchorX > x + safeDistance && anchorX < x + w - safeDistance) { // replace top
				path.splice(3, 3,
					'L', anchorX - halfDistance, y,
					anchorX, y - arrowLength,
					anchorX + halfDistance, y,
					w - r, y
				);
			}
			return path;
		}
	},

	/**
	 * Define a clipping rectangle
	 * @param {String} id
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} width
	 * @param {Number} height
	 */
	clipRect: function (x, y, width, height) {
		var wrapper,
			id = PREFIX + idCounter++,

			clipPath = this.createElement('clipPath').attr({
				id: id
			}).add(this.defs);

		wrapper = this.rect(x, y, width, height, 0).add(clipPath);
		wrapper.id = id;
		wrapper.clipPath = clipPath;

		return wrapper;
	},





	/**
	 * Add text to the SVG object
	 * @param {String} str
	 * @param {Number} x Left position
	 * @param {Number} y Top position
	 * @param {Boolean} useHTML Use HTML to render the text
	 */
	text: function (str, x, y, useHTML) {

		// declare variables
		var renderer = this,
			fakeSVG = useCanVG || (!hasSVG && renderer.forExport),
			wrapper,
			attr = {};

		if (useHTML && !renderer.forExport) {
			return renderer.html(str, x, y);
		}

		attr.x = Math.round(x || 0); // X is always needed for line-wrap logic
		if (y) {
			attr.y = Math.round(y);
		}
		if (str || str === 0) {
			attr.text = str;
		}

		wrapper = renderer.createElement('text')
			.attr(attr);

		// Prevent wrapping from creating false offsetWidths in export in legacy IE (#1079, #1063)
		if (fakeSVG) {
			wrapper.css({
				position: ABSOLUTE
			});
		}

		if (!useHTML) {
			wrapper.xSetter = function (value, key, element) {
				var tspans = element.getElementsByTagName('tspan'),
					tspan,
					parentVal = element.getAttribute(key),
					i;
				for (i = 0; i < tspans.length; i++) {
					tspan = tspans[i];
					// If the x values are equal, the tspan represents a linebreak
					if (tspan.getAttribute(key) === parentVal) {
						tspan.setAttribute(key, value);
					}
				}
				element.setAttribute(key, value);
			};
		}

		return wrapper;
	},

	/**
	 * Utility to return the baseline offset and total line height from the font size
	 */
	fontMetrics: function (fontSize, elem) {
		fontSize = fontSize || this.style.fontSize;
		if (elem && win.getComputedStyle) {
			elem = elem.element || elem; // SVGElement
			fontSize = win.getComputedStyle(elem, "").fontSize;
		}
		fontSize = /px/.test(fontSize) ? pInt(fontSize) : /em/.test(fontSize) ? parseFloat(fontSize) * 12 : 12;

		// Empirical values found by comparing font size and bounding box height.
		// Applies to the default font family. http://jsfiddle.net/highcharts/7xvn7/
		var lineHeight = fontSize < 24 ? fontSize + 4 : mathRound(fontSize * 1.2),
			baseline = mathRound(lineHeight * 0.8);

		return {
			h: lineHeight,
			b: baseline,
			f: fontSize
		};
	},

	/**
	 * Add a label, a text item that can hold a colored or gradient background
	 * as well as a border and shadow.
	 * @param {string} str
	 * @param {Number} x
	 * @param {Number} y
	 * @param {String} shape
	 * @param {Number} anchorX In case the shape has a pointer, like a flag, this is the
	 *    coordinates it should be pinned to
	 * @param {Number} anchorY
	 * @param {Boolean} baseline Whether to position the label relative to the text baseline,
	 *    like renderer.text, or to the upper border of the rectangle.
	 * @param {String} className Class name for the group
	 */
	label: function (str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {

		var renderer = this,
			wrapper = renderer.g(className),
			text = renderer.text('', 0, 0, useHTML)
				.attr({
					zIndex: 1
				}),
				//.add(wrapper),
			box,
			bBox,
			alignFactor = 0,
			padding = 3,
			paddingLeft = 0,
			width,
			height,
			wrapperX,
			wrapperY,
			crispAdjust = 0,
			deferredAttr = {},
			baselineOffset,
			needsBox;

		/**
		 * This function runs after the label is added to the DOM (when the bounding box is
		 * available), and after the text of the label is updated to detect the new bounding
		 * box and reflect it in the border box.
		 */
		function updateBoxSize() {
			var boxX,
				boxY,
				style = text.element.style;

			bBox = (width === undefined || height === undefined || wrapper.styles.textAlign) && text.textStr &&
				text.getBBox();
			wrapper.width = (width || bBox.width || 0) + 2 * padding + paddingLeft;
			wrapper.height = (height || bBox.height || 0) + 2 * padding;

			// update the label-scoped y offset
			baselineOffset = padding + renderer.fontMetrics(style && style.fontSize, text).b;


			if (needsBox) {

				// create the border box if it is not already present
				if (!box) {
					boxX = mathRound(-alignFactor * padding);
					boxY = baseline ? -baselineOffset : 0;

					wrapper.box = box = shape ?
						renderer.symbol(shape, boxX, boxY, wrapper.width, wrapper.height, deferredAttr) :
						renderer.rect(boxX, boxY, wrapper.width, wrapper.height, 0, deferredAttr[STROKE_WIDTH]);
					box.attr('fill', NONE).add(wrapper);
				}

				// apply the box attributes
				if (!box.isImg) { // #1630
					box.attr(extend({
						width: mathRound(wrapper.width),
						height: mathRound(wrapper.height)
					}, deferredAttr));
				}
				deferredAttr = null;
			}
		}

		/**
		 * This function runs after setting text or padding, but only if padding is changed
		 */
		function updateTextPadding() {
			var styles = wrapper.styles,
				textAlign = styles && styles.textAlign,
				x = paddingLeft + padding * (1 - alignFactor),
				y;

			// determin y based on the baseline
			y = baseline ? 0 : baselineOffset;

			// compensate for alignment
			if (defined(width) && bBox && (textAlign === 'center' || textAlign === 'right')) {
				x += { center: 0.5, right: 1 }[textAlign] * (width - bBox.width);
			}

			// update if anything changed
			if (x !== text.x || y !== text.y) {
				text.attr('x', x);
				if (y !== UNDEFINED) {
					text.attr('y', y);
				}
			}

			// record current values
			text.x = x;
			text.y = y;
		}

		/**
		 * Set a box attribute, or defer it if the box is not yet created
		 * @param {Object} key
		 * @param {Object} value
		 */
		function boxAttr(key, value) {
			if (box) {
				box.attr(key, value);
			} else {
				deferredAttr[key] = value;
			}
		}

		/**
		 * After the text element is added, get the desired size of the border box
		 * and add it before the text in the DOM.
		 */
		wrapper.onAdd = function () {
			text.add(wrapper);
			wrapper.attr({
				text: (str || str === 0) ? str : '', // alignment is available now // #3295: 0 not rendered if given as a value
				x: x,
				y: y
			});

			if (box && defined(anchorX)) {
				wrapper.attr({
					anchorX: anchorX,
					anchorY: anchorY
				});
			}
		};

		/*
		 * Add specific attribute setters.
		 */

		// only change local variables
		wrapper.widthSetter = function (value) {
			width = value;
		};
		wrapper.heightSetter = function (value) {
			height = value;
		};
		wrapper.paddingSetter =  function (value) {
			if (defined(value) && value !== padding) {
				padding = value;
				updateTextPadding();
			}
		};
		wrapper.paddingLeftSetter =  function (value) {
			if (defined(value) && value !== paddingLeft) {
				paddingLeft = value;
				updateTextPadding();
			}
		};


		// change local variable and prevent setting attribute on the group
		wrapper.alignSetter = function (value) {
			alignFactor = { left: 0, center: 0.5, right: 1 }[value];
		};

		// apply these to the box and the text alike
		wrapper.textSetter = function (value) {
			if (value !== UNDEFINED) {
				text.textSetter(value);
			}
			updateBoxSize();
			updateTextPadding();
		};

		// apply these to the box but not to the text
		wrapper['stroke-widthSetter'] = function (value, key) {
			if (value) {
				needsBox = true;
			}
			crispAdjust = value % 2 / 2;
			boxAttr(key, value);
		};
		wrapper.strokeSetter = wrapper.fillSetter = wrapper.rSetter = function (value, key) {
			if (key === 'fill' && value) {
				needsBox = true;
			}
			boxAttr(key, value);
		};
		wrapper.anchorXSetter = function (value, key) {
			anchorX = value;
			boxAttr(key, value + crispAdjust - wrapperX);
		};
		wrapper.anchorYSetter = function (value, key) {
			anchorY = value;
			boxAttr(key, value - wrapperY);
		};

		// rename attributes
		wrapper.xSetter = function (value) {
			wrapper.x = value; // for animation getter
			if (alignFactor) {
				value -= alignFactor * ((width || bBox.width) + padding);
			}
			wrapperX = mathRound(value);
			wrapper.attr('translateX', wrapperX);
		};
		wrapper.ySetter = function (value) {
			wrapperY = wrapper.y = mathRound(value);
			wrapper.attr('translateY', wrapperY);
		};

		// Redirect certain methods to either the box or the text
		var baseCss = wrapper.css;
		return extend(wrapper, {
			/**
			 * Pick up some properties and apply them to the text instead of the wrapper
			 */
			css: function (styles) {
				if (styles) {
					var textStyles = {};
					styles = merge(styles); // create a copy to avoid altering the original object (#537)
					each(wrapper.textProps, function (prop) {
						if (styles[prop] !== UNDEFINED) {
							textStyles[prop] = styles[prop];
							delete styles[prop];
						}
					});
					text.css(textStyles);
				}
				return baseCss.call(wrapper, styles);
			},
			/**
			 * Return the bounding box of the box, not the group
			 */
			getBBox: function () {
				return {
					width: bBox.width + 2 * padding,
					height: bBox.height + 2 * padding,
					x: bBox.x - padding,
					y: bBox.y - padding
				};
			},
			/**
			 * Apply the shadow to the box
			 */
			shadow: function (b) {
				if (box) {
					box.shadow(b);
				}
				return wrapper;
			},
			/**
			 * Destroy and release memory.
			 */
			destroy: function () {

				// Added by button implementation
				removeEvent(wrapper.element, 'mouseenter');
				removeEvent(wrapper.element, 'mouseleave');

				if (text) {
					text = text.destroy();
				}
				if (box) {
					box = box.destroy();
				}
				// Call base implementation to destroy the rest
				SVGElement.prototype.destroy.call(wrapper);

				// Release local pointers (#1298)
				wrapper = renderer = updateBoxSize = updateTextPadding = boxAttr = null;
			}
		});
	}
}; // end SVGRenderer


// general renderer
Renderer = SVGRenderer;
// extend SvgElement for useHTML option
extend(SVGElement.prototype, {
	/**
	 * Apply CSS to HTML elements. This is used in text within SVG rendering and
	 * by the VML renderer
	 */
	htmlCss: function (styles) {
		var wrapper = this,
			element = wrapper.element,
			textWidth = styles && element.tagName === 'SPAN' && styles.width;

		if (textWidth) {
			delete styles.width;
			wrapper.textWidth = textWidth;
			wrapper.updateTransform();
		}

		wrapper.styles = extend(wrapper.styles, styles);
		css(wrapper.element, styles);

		return wrapper;
	},

	/**
	 * VML and useHTML method for calculating the bounding box based on offsets
	 * @param {Boolean} refresh Whether to force a fresh value from the DOM or to
	 * use the cached value
	 *
	 * @return {Object} A hash containing values for x, y, width and height
	 */

	htmlGetBBox: function () {
		var wrapper = this,
			element = wrapper.element,
			bBox = wrapper.bBox;

		// faking getBBox in exported SVG in legacy IE
		if (!bBox) {
			// faking getBBox in exported SVG in legacy IE (is this a duplicate of the fix for #1079?)
			if (element.nodeName === 'text') {
				element.style.position = ABSOLUTE;
			}

			bBox = wrapper.bBox = {
				x: element.offsetLeft,
				y: element.offsetTop,
				width: element.offsetWidth,
				height: element.offsetHeight
			};
		}

		return bBox;
	},

	/**
	 * VML override private method to update elements based on internal
	 * properties based on SVG transform
	 */
	htmlUpdateTransform: function () {
		// aligning non added elements is expensive
		if (!this.added) {
			this.alignOnAdd = true;
			return;
		}

		var wrapper = this,
			renderer = wrapper.renderer,
			elem = wrapper.element,
			translateX = wrapper.translateX || 0,
			translateY = wrapper.translateY || 0,
			x = wrapper.x || 0,
			y = wrapper.y || 0,
			align = wrapper.textAlign || 'left',
			alignCorrection = { left: 0, center: 0.5, right: 1 }[align],
			shadows = wrapper.shadows;

		// apply translate
		css(elem, {
			marginLeft: translateX,
			marginTop: translateY
		});
		if (shadows) { // used in labels/tooltip
			each(shadows, function (shadow) {
				css(shadow, {
					marginLeft: translateX + 1,
					marginTop: translateY + 1
				});
			});
		}

		// apply inversion
		if (wrapper.inverted) { // wrapper is a group
			each(elem.childNodes, function (child) {
				renderer.invertChild(child, elem);
			});
		}

		if (elem.tagName === 'SPAN') {

			var width,
				rotation = wrapper.rotation,
				baseline,
				textWidth = pInt(wrapper.textWidth),
				currentTextTransform = [rotation, align, elem.innerHTML, wrapper.textWidth].join(',');

			if (currentTextTransform !== wrapper.cTT) { // do the calculations and DOM access only if properties changed


				baseline = renderer.fontMetrics(elem.style.fontSize).b;

				// Renderer specific handling of span rotation
				if (defined(rotation)) {
					wrapper.setSpanRotation(rotation, alignCorrection, baseline);
				}

				width = pick(wrapper.elemWidth, elem.offsetWidth);

				// Update textWidth
				if (width > textWidth && /[ \-]/.test(elem.textContent || elem.innerText)) { // #983, #1254
					css(elem, {
						width: textWidth + PX,
						display: 'block',
						whiteSpace: 'normal'
					});
					width = textWidth;
				}

				wrapper.getSpanCorrection(width, baseline, alignCorrection, rotation, align);
			}

			// apply position with correction
			css(elem, {
				left: (x + (wrapper.xCorr || 0)) + PX,
				top: (y + (wrapper.yCorr || 0)) + PX
			});

			// force reflow in webkit to apply the left and top on useHTML element (#1249)
			if (isWebKit) {
				baseline = elem.offsetHeight; // assigned to baseline for JSLint purpose
			}

			// record current text transform
			wrapper.cTT = currentTextTransform;
		}
	},

	/**
	 * Set the rotation of an individual HTML span
	 */
	setSpanRotation: function (rotation, alignCorrection, baseline) {
		var rotationStyle = {},
			cssTransformKey = isIE ? '-ms-transform' : isWebKit ? '-webkit-transform' : isFirefox ? 'MozTransform' : isOpera ? '-o-transform' : '';

		rotationStyle[cssTransformKey] = rotationStyle.transform = 'rotate(' + rotation + 'deg)';
		rotationStyle[cssTransformKey + (isFirefox ? 'Origin' : '-origin')] = rotationStyle.transformOrigin = (alignCorrection * 100) + '% ' + baseline + 'px';
		css(this.element, rotationStyle);
	},

	/**
	 * Get the correction in X and Y positioning as the element is rotated.
	 */
	getSpanCorrection: function (width, baseline, alignCorrection) {
		this.xCorr = -width * alignCorrection;
		this.yCorr = -baseline;
	}
});

// Extend SvgRenderer for useHTML option.
extend(SVGRenderer.prototype, {
	/**
	 * Create HTML text node. This is used by the VML renderer as well as the SVG
	 * renderer through the useHTML option.
	 *
	 * @param {String} str
	 * @param {Number} x
	 * @param {Number} y
	 */
	html: function (str, x, y) {
		var wrapper = this.createElement('span'),
			element = wrapper.element,
			renderer = wrapper.renderer;

		// Text setter
		wrapper.textSetter = function (value) {
			if (value !== element.innerHTML) {
				delete this.bBox;
			}
			element.innerHTML = this.textStr = value;
		};

		// Various setters which rely on update transform
		wrapper.xSetter = wrapper.ySetter = wrapper.alignSetter = wrapper.rotationSetter = function (value, key) {
			if (key === 'align') {
				key = 'textAlign'; // Do not overwrite the SVGElement.align method. Same as VML.
			}
			wrapper[key] = value;
			wrapper.htmlUpdateTransform();
		};

		// Set the default attributes
		wrapper.attr({
				text: str,
				x: mathRound(x),
				y: mathRound(y)
			})
			.css({
				position: ABSOLUTE,
				whiteSpace: 'nowrap',
				fontFamily: this.style.fontFamily,
				fontSize: this.style.fontSize
			});

		// Use the HTML specific .css method
		wrapper.css = wrapper.htmlCss;

		// This is specific for HTML within SVG
		if (renderer.isSVG) {
			wrapper.add = function (svgGroupWrapper) {

				var htmlGroup,
					container = renderer.box.parentNode,
					parentGroup,
					parents = [];

				this.parentGroup = svgGroupWrapper;

				// Create a mock group to hold the HTML elements
				if (svgGroupWrapper) {
					htmlGroup = svgGroupWrapper.div;
					if (!htmlGroup) {

						// Read the parent chain into an array and read from top down
						parentGroup = svgGroupWrapper;
						while (parentGroup) {

							parents.push(parentGroup);

							// Move up to the next parent group
							parentGroup = parentGroup.parentGroup;
						}

						// Ensure dynamically updating position when any parent is translated
						each(parents.reverse(), function (parentGroup) {
							var htmlGroupStyle;

							// Create a HTML div and append it to the parent div to emulate
							// the SVG group structure
							htmlGroup = parentGroup.div = parentGroup.div || createElement(DIV, {
								className: attr(parentGroup.element, 'class')
							}, {
								position: ABSOLUTE,
								left: (parentGroup.translateX || 0) + PX,
								top: (parentGroup.translateY || 0) + PX
							}, htmlGroup || container); // the top group is appended to container

							// Shortcut
							htmlGroupStyle = htmlGroup.style;

							// Set listeners to update the HTML div's position whenever the SVG group
							// position is changed
							extend(parentGroup, {
								translateXSetter: function (value, key) {
									htmlGroupStyle.left = value + PX;
									parentGroup[key] = value;
									parentGroup.doTransform = true;
								},
								translateYSetter: function (value, key) {
									htmlGroupStyle.top = value + PX;
									parentGroup[key] = value;
									parentGroup.doTransform = true;
								},
								visibilitySetter: function (value, key) {
									htmlGroupStyle[key] = value;
								}
							});
						});

					}
				} else {
					htmlGroup = container;
				}

				htmlGroup.appendChild(element);

				// Shared with VML:
				wrapper.added = true;
				if (wrapper.alignOnAdd) {
					wrapper.htmlUpdateTransform();
				}

				return wrapper;
			};
		}
		return wrapper;
	}
});

/* ****************************************************************************
 *                                                                            *
 * START OF INTERNET EXPLORER <= 8 SPECIFIC CODE                              *
 *                                                                            *
 * For applications and websites that don't need IE support, like platform    *
 * targeted mobile apps and web apps, this code can be removed.               *
 *                                                                            *
 *****************************************************************************/

/**
 * @constructor
 */
var VMLRenderer, VMLElement;
if (!hasSVG && !useCanVG) {

/**
 * The VML element wrapper.
 */
VMLElement = {

	/**
	 * Initialize a new VML element wrapper. It builds the markup as a string
	 * to minimize DOM traffic.
	 * @param {Object} renderer
	 * @param {Object} nodeName
	 */
	init: function (renderer, nodeName) {
		var wrapper = this,
			markup =  ['<', nodeName, ' filled="f" stroked="f"'],
			style = ['position: ', ABSOLUTE, ';'],
			isDiv = nodeName === DIV;

		// divs and shapes need size
		if (nodeName === 'shape' || isDiv) {
			style.push('left:0;top:0;width:1px;height:1px;');
		}
		style.push('visibility: ', isDiv ? HIDDEN : VISIBLE);

		markup.push(' style="', style.join(''), '"/>');

		// create element with default attributes and style
		if (nodeName) {
			markup = isDiv || nodeName === 'span' || nodeName === 'img' ?
				markup.join('')
				: renderer.prepVML(markup);
			wrapper.element = createElement(markup);
		}

		wrapper.renderer = renderer;
	},

	/**
	 * Add the node to the given parent
	 * @param {Object} parent
	 */
	add: function (parent) {
		var wrapper = this,
			renderer = wrapper.renderer,
			element = wrapper.element,
			box = renderer.box,
			inverted = parent && parent.inverted,

			// get the parent node
			parentNode = parent ?
				parent.element || parent :
				box;


		// if the parent group is inverted, apply inversion on all children
		if (inverted) { // only on groups
			renderer.invertChild(element, parentNode);
		}

		// append it
		parentNode.appendChild(element);

		// align text after adding to be able to read offset
		wrapper.added = true;
		if (wrapper.alignOnAdd && !wrapper.deferUpdateTransform) {
			wrapper.updateTransform();
		}

		// fire an event for internal hooks
		if (wrapper.onAdd) {
			wrapper.onAdd();
		}

		return wrapper;
	},

	/**
	 * VML always uses htmlUpdateTransform
	 */
	updateTransform: SVGElement.prototype.htmlUpdateTransform,

	/**
	 * Set the rotation of a span with oldIE's filter
	 */
	setSpanRotation: function () {
		// Adjust for alignment and rotation. Rotation of useHTML content is not yet implemented
		// but it can probably be implemented for Firefox 3.5+ on user request. FF3.5+
		// has support for CSS3 transform. The getBBox method also needs to be updated
		// to compensate for the rotation, like it currently does for SVG.
		// Test case: http://jsfiddle.net/highcharts/Ybt44/

		var rotation = this.rotation,
			costheta = mathCos(rotation * deg2rad),
			sintheta = mathSin(rotation * deg2rad);

		css(this.element, {
			filter: rotation ? ['progid:DXImageTransform.Microsoft.Matrix(M11=', costheta,
				', M12=', -sintheta, ', M21=', sintheta, ', M22=', costheta,
				', sizingMethod=\'auto expand\')'].join('') : NONE
		});
	},

	/**
	 * Get the positioning correction for the span after rotating.
	 */
	getSpanCorrection: function (width, baseline, alignCorrection, rotation, align) {

		var costheta = rotation ? mathCos(rotation * deg2rad) : 1,
			sintheta = rotation ? mathSin(rotation * deg2rad) : 0,
			height = pick(this.elemHeight, this.element.offsetHeight),
			quad,
			nonLeft = align && align !== 'left';

		// correct x and y
		this.xCorr = costheta < 0 && -width;
		this.yCorr = sintheta < 0 && -height;

		// correct for baseline and corners spilling out after rotation
		quad = costheta * sintheta < 0;
		this.xCorr += sintheta * baseline * (quad ? 1 - alignCorrection : alignCorrection);
		this.yCorr -= costheta * baseline * (rotation ? (quad ? alignCorrection : 1 - alignCorrection) : 1);
		// correct for the length/height of the text
		if (nonLeft) {
			this.xCorr -= width * alignCorrection * (costheta < 0 ? -1 : 1);
			if (rotation) {
				this.yCorr -= height * alignCorrection * (sintheta < 0 ? -1 : 1);
			}
			css(this.element, {
				textAlign: align
			});
		}
	},

	/**
	 * Converts a subset of an SVG path definition to its VML counterpart. Takes an array
	 * as the parameter and returns a string.
	 */
	pathToVML: function (value) {
		// convert paths
		var i = value.length,
			path = [];

		while (i--) {

			// Multiply by 10 to allow subpixel precision.
			// Substracting half a pixel seems to make the coordinates
			// align with SVG, but this hasn't been tested thoroughly
			if (isNumber(value[i])) {
				path[i] = mathRound(value[i] * 10) - 5;
			} else if (value[i] === 'Z') { // close the path
				path[i] = 'x';
			} else {
				path[i] = value[i];

				// When the start X and end X coordinates of an arc are too close,
				// they are rounded to the same value above. In this case, substract or
				// add 1 from the end X and Y positions. #186, #760, #1371, #1410.
				if (value.isArc && (value[i] === 'wa' || value[i] === 'at')) {
					// Start and end X
					if (path[i + 5] === path[i + 7]) {
						path[i + 7] += value[i + 7] > value[i + 5] ? 1 : -1;
					}
					// Start and end Y
					if (path[i + 6] === path[i + 8]) {
						path[i + 8] += value[i + 8] > value[i + 6] ? 1 : -1;
					}
				}
			}
		}


		// Loop up again to handle path shortcuts (#2132)
		/*while (i++ < path.length) {
			if (path[i] === 'H') { // horizontal line to
				path[i] = 'L';
				path.splice(i + 2, 0, path[i - 1]);
			} else if (path[i] === 'V') { // vertical line to
				path[i] = 'L';
				path.splice(i + 1, 0, path[i - 2]);
			}
		}*/
		return path.join(' ') || 'x';
	},

	/**
	 * Set the element's clipping to a predefined rectangle
	 *
	 * @param {String} id The id of the clip rectangle
	 */
	clip: function (clipRect) {
		var wrapper = this,
			clipMembers,
			cssRet;

		if (clipRect) {
			clipMembers = clipRect.members;
			erase(clipMembers, wrapper); // Ensure unique list of elements (#1258)
			clipMembers.push(wrapper);
			wrapper.destroyClip = function () {
				erase(clipMembers, wrapper);
			};
			cssRet = clipRect.getCSS(wrapper);

		} else {
			if (wrapper.destroyClip) {
				wrapper.destroyClip();
			}
			cssRet = { clip: docMode8 ? 'inherit' : 'rect(auto)' }; // #1214
		}

		return wrapper.css(cssRet);

	},

	/**
	 * Set styles for the element
	 * @param {Object} styles
	 */
	css: SVGElement.prototype.htmlCss,

	/**
	 * Removes a child either by removeChild or move to garbageBin.
	 * Issue 490; in VML removeChild results in Orphaned nodes according to sIEve, discardElement does not.
	 */
	safeRemoveChild: function (element) {
		// discardElement will detach the node from its parent before attaching it
		// to the garbage bin. Therefore it is important that the node is attached and have parent.
		if (element.parentNode) {
			discardElement(element);
		}
	},

	/**
	 * Extend element.destroy by removing it from the clip members array
	 */
	destroy: function () {
		if (this.destroyClip) {
			this.destroyClip();
		}

		return SVGElement.prototype.destroy.apply(this);
	},

	/**
	 * Add an event listener. VML override for normalizing event parameters.
	 * @param {String} eventType
	 * @param {Function} handler
	 */
	on: function (eventType, handler) {
		// simplest possible event model for internal use
		this.element['on' + eventType] = function () {
			var evt = win.event;
			evt.target = evt.srcElement;
			handler(evt);
		};
		return this;
	},

	/**
	 * In stacked columns, cut off the shadows so that they don't overlap
	 */
	cutOffPath: function (path, length) {

		var len;

		path = path.split(/[ ,]/);
		len = path.length;

		if (len === 9 || len === 11) {
			path[len - 4] = path[len - 2] = pInt(path[len - 2]) - 10 * length;
		}
		return path.join(' ');
	},

	/**
	 * Apply a drop shadow by copying elements and giving them different strokes
	 * @param {Boolean|Object} shadowOptions
	 */
	shadow: function (shadowOptions, group, cutOff) {
		var shadows = [],
			i,
			element = this.element,
			renderer = this.renderer,
			shadow,
			elemStyle = element.style,
			markup,
			path = element.path,
			strokeWidth,
			modifiedPath,
			shadowWidth,
			shadowElementOpacity;

		// some times empty paths are not strings
		if (path && typeof path.value !== 'string') {
			path = 'x';
		}
		modifiedPath = path;

		if (shadowOptions) {
			shadowWidth = pick(shadowOptions.width, 3);
			shadowElementOpacity = (shadowOptions.opacity || 0.15) / shadowWidth;
			for (i = 1; i <= 3; i++) {

				strokeWidth = (shadowWidth * 2) + 1 - (2 * i);

				// Cut off shadows for stacked column items
				if (cutOff) {
					modifiedPath = this.cutOffPath(path.value, strokeWidth + 0.5);
				}

				markup = ['<shape isShadow="true" strokeweight="', strokeWidth,
					'" filled="false" path="', modifiedPath,
					'" coordsize="10 10" style="', element.style.cssText, '" />'];

				shadow = createElement(renderer.prepVML(markup),
					null, {
						left: pInt(elemStyle.left) + pick(shadowOptions.offsetX, 1),
						top: pInt(elemStyle.top) + pick(shadowOptions.offsetY, 1)
					}
				);
				if (cutOff) {
					shadow.cutOff = strokeWidth + 1;
				}

				// apply the opacity
				markup = ['<stroke color="', shadowOptions.color || 'black', '" opacity="', shadowElementOpacity * i, '"/>'];
				createElement(renderer.prepVML(markup), null, null, shadow);


				// insert it
				if (group) {
					group.element.appendChild(shadow);
				} else {
					element.parentNode.insertBefore(shadow, element);
				}

				// record it
				shadows.push(shadow);

			}

			this.shadows = shadows;
		}
		return this;
	},
	updateShadows: noop, // Used in SVG only

	setAttr: function (key, value) {
		if (docMode8) { // IE8 setAttribute bug
			this.element[key] = value;
		} else {
			this.element.setAttribute(key, value);
		}
	},
	classSetter: function (value) {
		// IE8 Standards mode has problems retrieving the className unless set like this
		this.element.className = value;
	},
	dashstyleSetter: function (value, key, element) {
		var strokeElem = element.getElementsByTagName('stroke')[0] ||
			createElement(this.renderer.prepVML(['<stroke/>']), null, null, element);
		strokeElem[key] = value || 'solid';
		this[key] = value; /* because changing stroke-width will change the dash length
			and cause an epileptic effect */
	},
	dSetter: function (value, key, element) {
		var i,
			shadows = this.shadows;
		value = value || [];
		this.d = value.join && value.join(' '); // used in getter for animation

		element.path = value = this.pathToVML(value);

		// update shadows
		if (shadows) {
			i = shadows.length;
			while (i--) {
				shadows[i].path = shadows[i].cutOff ? this.cutOffPath(value, shadows[i].cutOff) : value;
			}
		}
		this.setAttr(key, value);
	},
	fillSetter: function (value, key, element) {
		var nodeName = element.nodeName;
		if (nodeName === 'SPAN') { // text color
			element.style.color = value;
		} else if (nodeName !== 'IMG') { // #1336
			element.filled = value !== NONE;
			this.setAttr('fillcolor', this.renderer.color(value, element, key, this));
		}
	},
	opacitySetter: noop, // Don't bother - animation is too slow and filters introduce artifacts
	rotationSetter: function (value, key, element) {
		var style = element.style;
		this[key] = style[key] = value; // style is for #1873

		// Correction for the 1x1 size of the shape container. Used in gauge needles.
		style.left = -mathRound(mathSin(value * deg2rad) + 1) + PX;
		style.top = mathRound(mathCos(value * deg2rad)) + PX;
	},
	strokeSetter: function (value, key, element) {
		this.setAttr('strokecolor', this.renderer.color(value, element, key));
	},
	'stroke-widthSetter': function (value, key, element) {
		element.stroked = !!value; // VML "stroked" attribute
		this[key] = value; // used in getter, issue #113
		if (isNumber(value)) {
			value += PX;
		}
		this.setAttr('strokeweight', value);
	},
	titleSetter: function (value, key) {
		this.setAttr(key, value);
	},
	visibilitySetter: function (value, key, element) {

		// Handle inherited visibility
		if (value === 'inherit') {
			value = VISIBLE;
		}

		// Let the shadow follow the main element
		if (this.shadows) {
			each(this.shadows, function (shadow) {
				shadow.style[key] = value;
			});
		}

		// Instead of toggling the visibility CSS property, move the div out of the viewport.
		// This works around #61 and #586
		if (element.nodeName === 'DIV') {
			value = value === HIDDEN ? '-999em' : 0;

			// In order to redraw, IE7 needs the div to be visible when tucked away
			// outside the viewport. So the visibility is actually opposite of
			// the expected value. This applies to the tooltip only.
			if (!docMode8) {
				element.style[key] = value ? VISIBLE : HIDDEN;
			}
			key = 'top';
		}
		element.style[key] = value;
	},
	xSetter: function (value, key, element) {
		this[key] = value; // used in getter

		if (key === 'x') {
			key = 'left';
		} else if (key === 'y') {
			key = 'top';
		}/* else {
			value = mathMax(0, value); // don't set width or height below zero (#311)
		}*/

		// clipping rectangle special
		if (this.updateClipping) {
			this[key] = value; // the key is now 'left' or 'top' for 'x' and 'y'
			this.updateClipping();
		} else {
			// normal
			element.style[key] = value;
		}
	},
	zIndexSetter: function (value, key, element) {
		element.style[key] = value;
	}
};
Highcharts.VMLElement = VMLElement = extendClass(SVGElement, VMLElement);

// Some shared setters
VMLElement.prototype.ySetter =
	VMLElement.prototype.widthSetter =
	VMLElement.prototype.heightSetter =
	VMLElement.prototype.xSetter;


/**
 * The VML renderer
 */
var VMLRendererExtension = { // inherit SVGRenderer

	Element: VMLElement,
	isIE8: userAgent.indexOf('MSIE 8.0') > -1,


	/**
	 * Initialize the VMLRenderer
	 * @param {Object} container
	 * @param {Number} width
	 * @param {Number} height
	 */
	init: function (container, width, height, style) {
		var renderer = this,
			boxWrapper,
			box,
			css;

		renderer.alignedObjects = [];

		boxWrapper = renderer.createElement(DIV)
			.css(extend(this.getStyle(style), { position: RELATIVE}));
		box = boxWrapper.element;
		container.appendChild(boxWrapper.element);


		// generate the containing box
		renderer.isVML = true;
		renderer.box = box;
		renderer.boxWrapper = boxWrapper;
		renderer.cache = {};


		renderer.setSize(width, height, false);

		// The only way to make IE6 and IE7 print is to use a global namespace. However,
		// with IE8 the only way to make the dynamic shapes visible in screen and print mode
		// seems to be to add the xmlns attribute and the behaviour style inline.
		if (!doc.namespaces.hcv) {

			doc.namespaces.add('hcv', 'urn:schemas-microsoft-com:vml');

			// Setup default CSS (#2153, #2368, #2384)
			css = 'hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke' +
				'{ behavior:url(#default#VML); display: inline-block; } ';
			try {
				doc.createStyleSheet().cssText = css;
			} catch (e) {
				doc.styleSheets[0].cssText += css;
			}

		}
	},


	/**
	 * Detect whether the renderer is hidden. This happens when one of the parent elements
	 * has display: none
	 */
	isHidden: function () {
		return !this.box.offsetWidth;
	},

	/**
	 * Define a clipping rectangle. In VML it is accomplished by storing the values
	 * for setting the CSS style to all associated members.
	 *
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} width
	 * @param {Number} height
	 */
	clipRect: function (x, y, width, height) {

		// create a dummy element
		var clipRect = this.createElement(),
			isObj = isObject(x);

		// mimic a rectangle with its style object for automatic updating in attr
		return extend(clipRect, {
			members: [],
			left: (isObj ? x.x : x) + 1,
			top: (isObj ? x.y : y) + 1,
			width: (isObj ? x.width : width) - 1,
			height: (isObj ? x.height : height) - 1,
			getCSS: function (wrapper) {
				var element = wrapper.element,
					nodeName = element.nodeName,
					isShape = nodeName === 'shape',
					inverted = wrapper.inverted,
					rect = this,
					top = rect.top - (isShape ? element.offsetTop : 0),
					left = rect.left,
					right = left + rect.width,
					bottom = top + rect.height,
					ret = {
						clip: 'rect(' +
							mathRound(inverted ? left : top) + 'px,' +
							mathRound(inverted ? bottom : right) + 'px,' +
							mathRound(inverted ? right : bottom) + 'px,' +
							mathRound(inverted ? top : left) + 'px)'
					};

				// issue 74 workaround
				if (!inverted && docMode8 && nodeName === 'DIV') {
					extend(ret, {
						width: right + PX,
						height: bottom + PX
					});
				}
				return ret;
			},

			// used in attr and animation to update the clipping of all members
			updateClipping: function () {
				each(clipRect.members, function (member) {
					if (member.element) { // Deleted series, like in stock/members/series-remove demo. Should be removed from members, but this will do.
						member.css(clipRect.getCSS(member));
					}
				});
			}
		});

	},


	/**
	 * Take a color and return it if it's a string, make it a gradient if it's a
	 * gradient configuration object, and apply opacity.
	 *
	 * @param {Object} color The color or config object
	 */
	color: function (color, elem, prop, wrapper) {
		var renderer = this,
			colorObject,
			regexRgba = /^rgba/,
			markup,
			fillType,
			ret = NONE;

		// Check for linear or radial gradient
		if (color && color.linearGradient) {
			fillType = 'gradient';
		} else if (color && color.radialGradient) {
			fillType = 'pattern';
		}


		if (fillType) {

			var stopColor,
				stopOpacity,
				gradient = color.linearGradient || color.radialGradient,
				x1,
				y1,
				x2,
				y2,
				opacity1,
				opacity2,
				color1,
				color2,
				fillAttr = '',
				stops = color.stops,
				firstStop,
				lastStop,
				colors = [],
				addFillNode = function () {
					// Add the fill subnode. When colors attribute is used, the meanings of opacity and o:opacity2
					// are reversed.
					markup = ['<fill colors="' + colors.join(',') + '" opacity="', opacity2, '" o:opacity2="', opacity1,
						'" type="', fillType, '" ', fillAttr, 'focus="100%" method="any" />'];
					createElement(renderer.prepVML(markup), null, null, elem);
				};

			// Extend from 0 to 1
			firstStop = stops[0];
			lastStop = stops[stops.length - 1];
			if (firstStop[0] > 0) {
				stops.unshift([
					0,
					firstStop[1]
				]);
			}
			if (lastStop[0] < 1) {
				stops.push([
					1,
					lastStop[1]
				]);
			}

			// Compute the stops
			each(stops, function (stop, i) {
				if (regexRgba.test(stop[1])) {
					colorObject = Color(stop[1]);
					stopColor = colorObject.get('rgb');
					stopOpacity = colorObject.get('a');
				} else {
					stopColor = stop[1];
					stopOpacity = 1;
				}

				// Build the color attribute
				colors.push((stop[0] * 100) + '% ' + stopColor);

				// Only start and end opacities are allowed, so we use the first and the last
				if (!i) {
					opacity1 = stopOpacity;
					color2 = stopColor;
				} else {
					opacity2 = stopOpacity;
					color1 = stopColor;
				}
			});

			// Apply the gradient to fills only.
			if (prop === 'fill') {

				// Handle linear gradient angle
				if (fillType === 'gradient') {
					x1 = gradient.x1 || gradient[0] || 0;
					y1 = gradient.y1 || gradient[1] || 0;
					x2 = gradient.x2 || gradient[2] || 0;
					y2 = gradient.y2 || gradient[3] || 0;
					fillAttr = 'angle="' + (90  - math.atan(
						(y2 - y1) / // y vector
						(x2 - x1) // x vector
						) * 180 / mathPI) + '"';

					addFillNode();

				// Radial (circular) gradient
				} else {

					var r = gradient.r,
						sizex = r * 2,
						sizey = r * 2,
						cx = gradient.cx,
						cy = gradient.cy,
						radialReference = elem.radialReference,
						bBox,
						applyRadialGradient = function () {
							if (radialReference) {
								bBox = wrapper.getBBox();
								cx += (radialReference[0] - bBox.x) / bBox.width - 0.5;
								cy += (radialReference[1] - bBox.y) / bBox.height - 0.5;
								sizex *= radialReference[2] / bBox.width;
								sizey *= radialReference[2] / bBox.height;
							}
							fillAttr = 'src="' + defaultOptions.global.VMLRadialGradientURL + '" ' +
								'size="' + sizex + ',' + sizey + '" ' +
								'origin="0.5,0.5" ' +
								'position="' + cx + ',' + cy + '" ' +
								'color2="' + color2 + '" ';

							addFillNode();
						};

					// Apply radial gradient
					if (wrapper.added) {
						applyRadialGradient();
					} else {
						// We need to know the bounding box to get the size and position right
						wrapper.onAdd = applyRadialGradient;
					}

					// The fill element's color attribute is broken in IE8 standards mode, so we
					// need to set the parent shape's fillcolor attribute instead.
					ret = color1;
				}

			// Gradients are not supported for VML stroke, return the first color. #722.
			} else {
				ret = stopColor;
			}

		// if the color is an rgba color, split it and add a fill node
		// to hold the opacity component
		} else if (regexRgba.test(color) && elem.tagName !== 'IMG') {

			colorObject = Color(color);

			markup = ['<', prop, ' opacity="', colorObject.get('a'), '"/>'];
			createElement(this.prepVML(markup), null, null, elem);

			ret = colorObject.get('rgb');


		} else {
			var propNodes = elem.getElementsByTagName(prop); // 'stroke' or 'fill' node
			if (propNodes.length) {
				propNodes[0].opacity = 1;
				propNodes[0].type = 'solid';
			}
			ret = color;
		}

		return ret;
	},

	/**
	 * Take a VML string and prepare it for either IE8 or IE6/IE7.
	 * @param {Array} markup A string array of the VML markup to prepare
	 */
	prepVML: function (markup) {
		var vmlStyle = 'display:inline-block;behavior:url(#default#VML);',
			isIE8 = this.isIE8;

		markup = markup.join('');

		if (isIE8) { // add xmlns and style inline
			markup = markup.replace('/>', ' xmlns="urn:schemas-microsoft-com:vml" />');
			if (markup.indexOf('style="') === -1) {
				markup = markup.replace('/>', ' style="' + vmlStyle + '" />');
			} else {
				markup = markup.replace('style="', 'style="' + vmlStyle);
			}

		} else { // add namespace
			markup = markup.replace('<', '<hcv:');
		}

		return markup;
	},

	/**
	 * Create rotated and aligned text
	 * @param {String} str
	 * @param {Number} x
	 * @param {Number} y
	 */
	text: SVGRenderer.prototype.html,

	/**
	 * Create and return a path element
	 * @param {Array} path
	 */
	path: function (path) {
		var attr = {
			// subpixel precision down to 0.1 (width and height = 1px)
			coordsize: '10 10'
		};
		if (isArray(path)) {
			attr.d = path;
		} else if (isObject(path)) { // attributes
			extend(attr, path);
		}
		// create the shape
		return this.createElement('shape').attr(attr);
	},

	/**
	 * Create and return a circle element. In VML circles are implemented as
	 * shapes, which is faster than v:oval
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} r
	 */
	circle: function (x, y, r) {
		var circle = this.symbol('circle');
		if (isObject(x)) {
			r = x.r;
			y = x.y;
			x = x.x;
		}
		circle.isCircle = true; // Causes x and y to mean center (#1682)
		circle.r = r;
		return circle.attr({ x: x, y: y });
	},

	/**
	 * Create a group using an outer div and an inner v:group to allow rotating
	 * and flipping. A simple v:group would have problems with positioning
	 * child HTML elements and CSS clip.
	 *
	 * @param {String} name The name of the group
	 */
	g: function (name) {
		var wrapper,
			attribs;

		// set the class name
		if (name) {
			attribs = { 'className': PREFIX + name, 'class': PREFIX + name };
		}

		// the div to hold HTML and clipping
		wrapper = this.createElement(DIV).attr(attribs);

		return wrapper;
	},

	/**
	 * VML override to create a regular HTML image
	 * @param {String} src
	 * @param {Number} x
	 * @param {Number} y
	 * @param {Number} width
	 * @param {Number} height
	 */
	image: function (src, x, y, width, height) {
		var obj = this.createElement('img')
			.attr({ src: src });

		if (arguments.length > 1) {
			obj.attr({
				x: x,
				y: y,
				width: width,
				height: height
			});
		}
		return obj;
	},

	/**
	 * For rectangles, VML uses a shape for rect to overcome bugs and rotation problems
	 */
	createElement: function (nodeName) {
		return nodeName === 'rect' ? this.symbol(nodeName) : SVGRenderer.prototype.createElement.call(this, nodeName);
	},

	/**
	 * In the VML renderer, each child of an inverted div (group) is inverted
	 * @param {Object} element
	 * @param {Object} parentNode
	 */
	invertChild: function (element, parentNode) {
		var ren = this,
			parentStyle = parentNode.style,
			imgStyle = element.tagName === 'IMG' && element.style; // #1111

		css(element, {
			flip: 'x',
			left: pInt(parentStyle.width) - (imgStyle ? pInt(imgStyle.top) : 1),
			top: pInt(parentStyle.height) - (imgStyle ? pInt(imgStyle.left) : 1),
			rotation: -90
		});

		// Recursively invert child elements, needed for nested composite shapes like box plots and error bars. #1680, #1806.
		each(element.childNodes, function (child) {
			ren.invertChild(child, element);
		});
	},

	/**
	 * Symbol definitions that override the parent SVG renderer's symbols
	 *
	 */
	symbols: {
		// VML specific arc function
		arc: function (x, y, w, h, options) {
			var start = options.start,
				end = options.end,
				radius = options.r || w || h,
				innerRadius = options.innerR,
				cosStart = mathCos(start),
				sinStart = mathSin(start),
				cosEnd = mathCos(end),
				sinEnd = mathSin(end),
				ret;

			if (end - start === 0) { // no angle, don't show it.
				return ['x'];
			}

			ret = [
				'wa', // clockwise arc to
				x - radius, // left
				y - radius, // top
				x + radius, // right
				y + radius, // bottom
				x + radius * cosStart, // start x
				y + radius * sinStart, // start y
				x + radius * cosEnd, // end x
				y + radius * sinEnd  // end y
			];

			if (options.open && !innerRadius) {
				ret.push(
					'e',
					M,
					x,// - innerRadius,
					y// - innerRadius
				);
			}

			ret.push(
				'at', // anti clockwise arc to
				x - innerRadius, // left
				y - innerRadius, // top
				x + innerRadius, // right
				y + innerRadius, // bottom
				x + innerRadius * cosEnd, // start x
				y + innerRadius * sinEnd, // start y
				x + innerRadius * cosStart, // end x
				y + innerRadius * sinStart, // end y
				'x', // finish path
				'e' // close
			);

			ret.isArc = true;
			return ret;

		},
		// Add circle symbol path. This performs significantly faster than v:oval.
		circle: function (x, y, w, h, wrapper) {

			if (wrapper) {
				w = h = 2 * wrapper.r;
			}

			// Center correction, #1682
			if (wrapper && wrapper.isCircle) {
				x -= w / 2;
				y -= h / 2;
			}

			// Return the path
			return [
				'wa', // clockwisearcto
				x, // left
				y, // top
				x + w, // right
				y + h, // bottom
				x + w, // start x
				y + h / 2,     // start y
				x + w, // end x
				y + h / 2,     // end y
				//'x', // finish path
				'e' // close
			];
		},
		/**
		 * Add rectangle symbol path which eases rotation and omits arcsize problems
		 * compared to the built-in VML roundrect shape. When borders are not rounded,
		 * use the simpler square path, else use the callout path without the arrow.
		 */
		rect: function (x, y, w, h, options) {
			return SVGRenderer.prototype.symbols[
				!defined(options) || !options.r ? 'square' : 'callout'
			].call(0, x, y, w, h, options);
		}
	}
};
Highcharts.VMLRenderer = VMLRenderer = function () {
	this.init.apply(this, arguments);
};
VMLRenderer.prototype = merge(SVGRenderer.prototype, VMLRendererExtension);

	// general renderer
	Renderer = VMLRenderer;
}

// This method is used with exporting in old IE, when emulating SVG (see #2314)
SVGRenderer.prototype.measureSpanWidth = function (text, styles) {
	var measuringSpan = doc.createElement('span'),
		offsetWidth,
	textNode = doc.createTextNode(text);

	measuringSpan.appendChild(textNode);
	css(measuringSpan, styles);
	this.box.appendChild(measuringSpan);
	offsetWidth = measuringSpan.offsetWidth;
	discardElement(measuringSpan); // #2463
	return offsetWidth;
};


/* ****************************************************************************
 *                                                                            *
 * END OF INTERNET EXPLORER <= 8 SPECIFIC CODE                                *
 *                                                                            *
 *****************************************************************************/
/* ****************************************************************************
 *                                                                            *
 * START OF ANDROID < 3 SPECIFIC CODE. THIS CAN BE REMOVED IF YOU'RE NOT      *
 * TARGETING THAT SYSTEM.                                                     *
 *                                                                            *
 *****************************************************************************/
var CanVGRenderer,
	CanVGController;

if (useCanVG) {
	/**
	 * The CanVGRenderer is empty from start to keep the source footprint small.
	 * When requested, the CanVGController downloads the rest of the source packaged
	 * together with the canvg library.
	 */
	Highcharts.CanVGRenderer = CanVGRenderer = function () {
		// Override the global SVG namespace to fake SVG/HTML that accepts CSS
		SVG_NS = 'http://www.w3.org/1999/xhtml';
	};

	/**
	 * Start with an empty symbols object. This is needed when exporting is used (exporting.src.js will add a few symbols), but
	 * the implementation from SvgRenderer will not be merged in until first render.
	 */
	CanVGRenderer.prototype.symbols = {};

	/**
	 * Handles on demand download of canvg rendering support.
	 */
	CanVGController = (function () {
		// List of renderering calls
		var deferredRenderCalls = [];

		/**
		 * When downloaded, we are ready to draw deferred charts.
		 */
		function drawDeferred() {
			var callLength = deferredRenderCalls.length,
				callIndex;

			// Draw all pending render calls
			for (callIndex = 0; callIndex < callLength; callIndex++) {
				deferredRenderCalls[callIndex]();
			}
			// Clear the list
			deferredRenderCalls = [];
		}

		return {
			push: function (func, scriptLocation) {
				// Only get the script once
				if (deferredRenderCalls.length === 0) {
					getScript(scriptLocation, drawDeferred);
				}
				// Register render call
				deferredRenderCalls.push(func);
			}
		};
	}());

	Renderer = CanVGRenderer;
} // end CanVGRenderer

/* ****************************************************************************
 *                                                                            *
 * END OF ANDROID < 3 SPECIFIC CODE                                           *
 *                                                                            *
 *****************************************************************************/

/**
 * The Tick class
 */
function Tick(axis, pos, type, noLabel) {
	this.axis = axis;
	this.pos = pos;
	this.type = type || '';
	this.isNew = true;

	if (!type && !noLabel) {
		this.addLabel();
	}
}

Tick.prototype = {
	/**
	 * Write the tick label
	 */
	addLabel: function () {
		var tick = this,
			axis = tick.axis,
			options = axis.options,
			chart = axis.chart,
			horiz = axis.horiz,
			categories = axis.categories,
			names = axis.names,
			pos = tick.pos,
			labelOptions = options.labels,
			rotation = labelOptions.rotation,
			str,
			tickPositions = axis.tickPositions,
			width = (horiz && categories &&
				!labelOptions.step && !labelOptions.staggerLines &&
				!labelOptions.rotation &&
				chart.plotWidth / tickPositions.length) ||
				(!horiz && (chart.margin[3] || chart.chartWidth * 0.33)), // #1580, #1931
			isFirst = pos === tickPositions[0],
			isLast = pos === tickPositions[tickPositions.length - 1],
			css,
			attr,
			value = categories ?
				pick(categories[pos], names[pos], pos) :
				pos,
			label = tick.label,
			tickPositionInfo = tickPositions.info,
			dateTimeLabelFormat;

		// Set the datetime label format. If a higher rank is set for this position, use that. If not,
		// use the general format.
		if (axis.isDatetimeAxis && tickPositionInfo) {
			dateTimeLabelFormat = options.dateTimeLabelFormats[tickPositionInfo.higherRanks[pos] || tickPositionInfo.unitName];
		}
		// set properties for access in render method
		tick.isFirst = isFirst;
		tick.isLast = isLast;

		// get the string
		str = axis.labelFormatter.call({
			axis: axis,
			chart: chart,
			isFirst: isFirst,
			isLast: isLast,
			dateTimeLabelFormat: dateTimeLabelFormat,
			value: axis.isLog ? correctFloat(lin2log(value)) : value
		});

		// prepare CSS
		css = width && { width: mathMax(1, mathRound(width - 2 * (labelOptions.padding || 10))) + PX };

		// first call
		if (!defined(label)) {
			attr = {
				align: axis.labelAlign
			};
			if (isNumber(rotation)) {
				attr.rotation = rotation;
			}
			if (width && labelOptions.ellipsis) {
				css.HcHeight = axis.len / tickPositions.length;
			}

			tick.label = label =
				defined(str) && labelOptions.enabled ?
					chart.renderer.text(
							str,
							0,
							0,
							labelOptions.useHTML
						)
						.attr(attr)
						// without position absolute, IE export sometimes is wrong
						.css(extend(css, labelOptions.style))
						.add(axis.labelGroup) :
					null;

			// Set the tick baseline and correct for rotation (#1764)
			axis.tickBaseline = chart.renderer.fontMetrics(labelOptions.style.fontSize, label).b;
			if (rotation && axis.side === 2) {
				axis.tickBaseline *= mathCos(rotation * deg2rad);
			}


		// update
		} else if (label) {
			label.attr({
					text: str
				})
				.css(css);
		}
		tick.yOffset = label ? pick(labelOptions.y, axis.tickBaseline + (axis.side === 2 ? 8 : -(label.getBBox().height / 2))) : 0;
	},

	/**
	 * Get the offset height or width of the label
	 */
	getLabelSize: function () {
		var label = this.label,
			axis = this.axis;
		return label ?
			label.getBBox()[axis.horiz ? 'height' : 'width'] :
			0;
	},

	/**
	 * Find how far the labels extend to the right and left of the tick's x position. Used for anti-collision
	 * detection with overflow logic.
	 */
	getLabelSides: function () {
		var bBox = this.label.getBBox(),
			axis = this.axis,
			horiz = axis.horiz,
			options = axis.options,
			labelOptions = options.labels,
			size = horiz ? bBox.width : bBox.height,
			leftSide = horiz ?
				labelOptions.x - size * { left: 0, center: 0.5, right: 1 }[axis.labelAlign] :
				0,
			rightSide = horiz ?
				size + leftSide :
				size;

		return [leftSide, rightSide];
	},

	/**
	 * Handle the label overflow by adjusting the labels to the left and right edge, or
	 * hide them if they collide into the neighbour label.
	 */
	handleOverflow: function (index, xy) {
		var show = true,
			axis = this.axis,
			isFirst = this.isFirst,
			isLast = this.isLast,
			horiz = axis.horiz,
			pxPos = horiz ? xy.x : xy.y,
			reversed = axis.reversed,
			tickPositions = axis.tickPositions,
			sides = this.getLabelSides(),
			leftSide = sides[0],
			rightSide = sides[1],
			axisLeft,
			axisRight,
			neighbour,
			neighbourEdge,
			line = this.label.line,
			lineIndex = line || 0,
			labelEdge = axis.labelEdge,
			justifyLabel = axis.justifyLabels && (isFirst || isLast),
			justifyToPlot;

		// Hide it if it now overlaps the neighbour label
		if (labelEdge[lineIndex] === UNDEFINED || pxPos + leftSide > labelEdge[lineIndex]) {
			labelEdge[lineIndex] = pxPos + rightSide;

		} else if (!justifyLabel) {
			show = false;
		}

		if (justifyLabel) {
			justifyToPlot = axis.justifyToPlot;
			axisLeft = justifyToPlot ? axis.pos : 0;
			axisRight = justifyToPlot ? axisLeft + axis.len : axis.chart.chartWidth;

			// Find the firsth neighbour on the same line
			do {
				index += (isFirst ? 1 : -1);
				neighbour = axis.ticks[tickPositions[index]];
			} while (tickPositions[index] && (!neighbour || !neighbour.label || neighbour.label.line !== line)); // #3044

			neighbourEdge = neighbour && neighbour.label.xy && neighbour.label.xy.x + neighbour.getLabelSides()[isFirst ? 0 : 1];

			if ((isFirst && !reversed) || (isLast && reversed)) {
				// Is the label spilling out to the left of the plot area?
				if (pxPos + leftSide < axisLeft) {

					// Align it to plot left
					pxPos = axisLeft - leftSide;

					// Hide it if it now overlaps the neighbour label
					if (neighbour && pxPos + rightSide > neighbourEdge) {
						show = false;
					}
				}

			} else {
				// Is the label spilling out to the right of the plot area?
				if (pxPos + rightSide > axisRight) {

					// Align it to plot right
					pxPos = axisRight - rightSide;

					// Hide it if it now overlaps the neighbour label
					if (neighbour && pxPos + leftSide < neighbourEdge) {
						show = false;
					}

				}
			}

			// Set the modified x position of the label
			xy.x = pxPos;
		}
		return show;
	},

	/**
	 * Get the x and y position for ticks and labels
	 */
	getPosition: function (horiz, pos, tickmarkOffset, old) {
		var axis = this.axis,
			chart = axis.chart,
			cHeight = (old && chart.oldChartHeight) || chart.chartHeight;

		return {
			x: horiz ?
				axis.translate(pos + tickmarkOffset, null, null, old) + axis.transB :
				axis.left + axis.offset + (axis.opposite ? ((old && chart.oldChartWidth) || chart.chartWidth) - axis.right - axis.left : 0),

			y: horiz ?
				cHeight - axis.bottom + axis.offset - (axis.opposite ? axis.height : 0) :
				cHeight - axis.translate(pos + tickmarkOffset, null, null, old) - axis.transB
		};

	},

	/**
	 * Get the x, y position of the tick label
	 */
	getLabelPosition: function (x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
		var axis = this.axis,
			transA = axis.transA,
			reversed = axis.reversed,
			staggerLines = axis.staggerLines;

		x = x + labelOptions.x - (tickmarkOffset && horiz ?
			tickmarkOffset * transA * (reversed ? -1 : 1) : 0);
		y = y + this.yOffset - (tickmarkOffset && !horiz ?
			tickmarkOffset * transA * (reversed ? 1 : -1) : 0);

		// Correct for staggered labels
		if (staggerLines) {
			label.line = (index / (step || 1) % staggerLines);
			y += label.line * (axis.labelOffset / staggerLines);
		}

		return {
			x: x,
			y: y
		};
	},

	/**
	 * Extendible method to return the path of the marker
	 */
	getMarkPath: function (x, y, tickLength, tickWidth, horiz, renderer) {
		return renderer.crispLine([
				M,
				x,
				y,
				L,
				x + (horiz ? 0 : -tickLength),
				y + (horiz ? tickLength : 0)
			], tickWidth);
	},

	/**
	 * Put everything in place
	 *
	 * @param index {Number}
	 * @param old {Boolean} Use old coordinates to prepare an animation into new position
	 */
	render: function (index, old, opacity) {
		var tick = this,
			axis = tick.axis,
			options = axis.options,
			chart = axis.chart,
			renderer = chart.renderer,
			horiz = axis.horiz,
			type = tick.type,
			label = tick.label,
			pos = tick.pos,
			labelOptions = options.labels,
			gridLine = tick.gridLine,
			gridPrefix = type ? type + 'Grid' : 'grid',
			tickPrefix = type ? type + 'Tick' : 'tick',
			gridLineWidth = options[gridPrefix + 'LineWidth'],
			gridLineColor = options[gridPrefix + 'LineColor'],
			dashStyle = options[gridPrefix + 'LineDashStyle'],
			tickLength = options[tickPrefix + 'Length'],
			tickWidth = options[tickPrefix + 'Width'] || 0,
			tickColor = options[tickPrefix + 'Color'],
			tickPosition = options[tickPrefix + 'Position'],
			gridLinePath,
			mark = tick.mark,
			markPath,
			step = labelOptions.step,
			attribs,
			show = true,
			tickmarkOffset = axis.tickmarkOffset,
			xy = tick.getPosition(horiz, pos, tickmarkOffset, old),
			x = xy.x,
			y = xy.y,
			reverseCrisp = ((horiz && x === axis.pos + axis.len) || (!horiz && y === axis.pos)) ? -1 : 1; // #1480, #1687

		opacity = pick(opacity, 1);
		this.isActive = true;

		// create the grid line
		if (gridLineWidth) {
			gridLinePath = axis.getPlotLinePath(pos + tickmarkOffset, gridLineWidth * reverseCrisp, old, true);

			if (gridLine === UNDEFINED) {
				attribs = {
					stroke: gridLineColor,
					'stroke-width': gridLineWidth
				};
				if (dashStyle) {
					attribs.dashstyle = dashStyle;
				}
				if (!type) {
					attribs.zIndex = 1;
				}
				if (old) {
					attribs.opacity = 0;
				}
				tick.gridLine = gridLine =
					gridLineWidth ?
						renderer.path(gridLinePath)
							.attr(attribs).add(axis.gridGroup) :
						null;
			}

			// If the parameter 'old' is set, the current call will be followed
			// by another call, therefore do not do any animations this time
			if (!old && gridLine && gridLinePath) {
				gridLine[tick.isNew ? 'attr' : 'animate']({
					d: gridLinePath,
					opacity: opacity
				});
			}
		}

		// create the tick mark
		if (tickWidth && tickLength) {

			// negate the length
			if (tickPosition === 'inside') {
				tickLength = -tickLength;
			}
			if (axis.opposite) {
				tickLength = -tickLength;
			}

			markPath = tick.getMarkPath(x, y, tickLength, tickWidth * reverseCrisp, horiz, renderer);
			if (mark) { // updating
				mark.animate({
					d: markPath,
					opacity: opacity
				});
			} else { // first time
				tick.mark = renderer.path(
					markPath
				).attr({
					stroke: tickColor,
					'stroke-width': tickWidth,
					opacity: opacity
				}).add(axis.axisGroup);
			}
		}

		// the label is created on init - now move it into place
		if (label && !isNaN(x)) {
			label.xy = xy = tick.getLabelPosition(x, y, label, horiz, labelOptions, tickmarkOffset, index, step);

			// Apply show first and show last. If the tick is both first and last, it is
			// a single centered tick, in which case we show the label anyway (#2100).
			if ((tick.isFirst && !tick.isLast && !pick(options.showFirstLabel, 1)) ||
					(tick.isLast && !tick.isFirst && !pick(options.showLastLabel, 1))) {
				show = false;

			// Handle label overflow and show or hide accordingly
			} else if (!axis.isRadial && !labelOptions.step && !labelOptions.rotation && !old && opacity !== 0) {
				show = tick.handleOverflow(index, xy);
			}

			// apply step
			if (step && index % step) {
				// show those indices dividable by step
				show = false;
			}

			// Set the new position, and show or hide
			if (show && !isNaN(xy.y)) {
				xy.opacity = opacity;
				label[tick.isNew ? 'attr' : 'animate'](xy);
				tick.isNew = false;
			} else {
				label.attr('y', -9999); // #1338
			}
		}
	},

	/**
	 * Destructor for the tick prototype
	 */
	destroy: function () {
		destroyObjectProperties(this, this.axis);
	}
};

/**
 * The object wrapper for plot lines and plot bands
 * @param {Object} options
 */
Highcharts.PlotLineOrBand = function (axis, options) {
	this.axis = axis;

	if (options) {
		this.options = options;
		this.id = options.id;
	}
};

Highcharts.PlotLineOrBand.prototype = {

	/**
	 * Render the plot line or plot band. If it is already existing,
	 * move it.
	 */
	render: function () {
		var plotLine = this,
			axis = plotLine.axis,
			horiz = axis.horiz,
			halfPointRange = (axis.pointRange || 0) / 2,
			options = plotLine.options,
			optionsLabel = options.label,
			label = plotLine.label,
			width = options.width,
			to = options.to,
			from = options.from,
			isBand = defined(from) && defined(to),
			value = options.value,
			dashStyle = options.dashStyle,
			svgElem = plotLine.svgElem,
			path = [],
			addEvent,
			eventType,
			xs,
			ys,
			x,
			y,
			color = options.color,
			zIndex = options.zIndex,
			events = options.events,
			attribs = {},
			renderer = axis.chart.renderer;

		// logarithmic conversion
		if (axis.isLog) {
			from = log2lin(from);
			to = log2lin(to);
			value = log2lin(value);
		}

		// plot line
		if (width) {
			path = axis.getPlotLinePath(value, width);
			attribs = {
				stroke: color,
				'stroke-width': width
			};
			if (dashStyle) {
				attribs.dashstyle = dashStyle;
			}
		} else if (isBand) { // plot band

			// keep within plot area
			from = mathMax(from, axis.min - halfPointRange);
			to = mathMin(to, axis.max + halfPointRange);

			path = axis.getPlotBandPath(from, to, options);
			if (color) {
				attribs.fill = color;
			}
			if (options.borderWidth) {
				attribs.stroke = options.borderColor;
				attribs['stroke-width'] = options.borderWidth;
			}
		} else {
			return;
		}
		// zIndex
		if (defined(zIndex)) {
			attribs.zIndex = zIndex;
		}

		// common for lines and bands
		if (svgElem) {
			if (path) {
				svgElem.animate({
					d: path
				}, null, svgElem.onGetPath);
			} else {
				svgElem.hide();
				svgElem.onGetPath = function () {
					svgElem.show();
				};
				if (label) {
					plotLine.label = label = label.destroy();
				}
			}
		} else if (path && path.length) {
			plotLine.svgElem = svgElem = renderer.path(path)
				.attr(attribs).add();

			// events
			if (events) {
				addEvent = function (eventType) {
					svgElem.on(eventType, function (e) {
						events[eventType].apply(plotLine, [e]);
					});
				};
				for (eventType in events) {
					addEvent(eventType);
				}
			}
		}

		// the plot band/line label
		if (optionsLabel && defined(optionsLabel.text) && path && path.length && axis.width > 0 && axis.height > 0) {
			// apply defaults
			optionsLabel = merge({
				align: horiz && isBand && 'center',
				x: horiz ? !isBand && 4 : 10,
				verticalAlign : !horiz && isBand && 'middle',
				y: horiz ? isBand ? 16 : 10 : isBand ? 6 : -4,
				rotation: horiz && !isBand && 90
			}, optionsLabel);

			// add the SVG element
			if (!label) {
				attribs = {
					align: optionsLabel.textAlign || optionsLabel.align,
					rotation: optionsLabel.rotation
				};
				if (defined(zIndex)) {
					attribs.zIndex = zIndex;
				}
				plotLine.label = label = renderer.text(
						optionsLabel.text,
						0,
						0,
						optionsLabel.useHTML
					)
					.attr(attribs)
					.css(optionsLabel.style)
					.add();
			}

			// get the bounding box and align the label
			// #3000 changed to better handle choice between plotband or plotline
			xs = [path[1], path[4], (isBand ? path[6] : path[1])];
			ys = [path[2], path[5], (isBand ? path[7] : path[2])];
			x = arrayMin(xs);
			y = arrayMin(ys);

			label.align(optionsLabel, false, {
				x: x,
				y: y,
				width: arrayMax(xs) - x,
				height: arrayMax(ys) - y
			});
			label.show();

		} else if (label) { // move out of sight
			label.hide();
		}

		// chainable
		return plotLine;
	},

	/**
	 * Remove the plot line or band
	 */
	destroy: function () {
		// remove it from the lookup
		erase(this.axis.plotLinesAndBands, this);

		delete this.axis;
		destroyObjectProperties(this);
	}
};

/**
 * Object with members for extending the Axis prototype
 */

AxisPlotLineOrBandExtension = {

	/**
	 * Create the path for a plot band
	 */
	getPlotBandPath: function (from, to) {
		var toPath = this.getPlotLinePath(to),
			path = this.getPlotLinePath(from);

		if (path && toPath) {
			path.push(
				toPath[4],
				toPath[5],
				toPath[1],
				toPath[2]
			);
		} else { // outside the axis area
			path = null;
		}

		return path;
	},

	addPlotBand: function (options) {
		return this.addPlotBandOrLine(options, 'plotBands');
	},

	addPlotLine: function (options) {
		return this.addPlotBandOrLine(options, 'plotLines');
	},

	/**
	 * Add a plot band or plot line after render time
	 *
	 * @param options {Object} The plotBand or plotLine configuration object
	 */
	addPlotBandOrLine: function (options, coll) {
		var obj = new Highcharts.PlotLineOrBand(this, options).render(),
			userOptions = this.userOptions;

		if (obj) { // #2189
			// Add it to the user options for exporting and Axis.update
			if (coll) {
				userOptions[coll] = userOptions[coll] || [];
				userOptions[coll].push(options);
			}
			this.plotLinesAndBands.push(obj);
		}

		return obj;
	},

	/**
	 * Remove a plot band or plot line from the chart by id
	 * @param {Object} id
	 */
	removePlotBandOrLine: function (id) {
		var plotLinesAndBands = this.plotLinesAndBands,
			options = this.options,
			userOptions = this.userOptions,
			i = plotLinesAndBands.length;
		while (i--) {
			if (plotLinesAndBands[i].id === id) {
				plotLinesAndBands[i].destroy();
			}
		}
		each([options.plotLines || [], userOptions.plotLines || [], options.plotBands || [], userOptions.plotBands || []], function (arr) {
			i = arr.length;
			while (i--) {
				if (arr[i].id === id) {
					erase(arr, arr[i]);
				}
			}
		});
	}
};

/**
 * Create a new axis object
 * @param {Object} chart
 * @param {Object} options
 */
function Axis() {
	this.init.apply(this, arguments);
}

Axis.prototype = {

	/**
	 * Default options for the X axis - the Y axis has extended defaults
	 */
	defaultOptions: {
		// allowDecimals: null,
		// alternateGridColor: null,
		// categories: [],
		dateTimeLabelFormats: {
			millisecond: '%H:%M:%S.%L',
			second: '%H:%M:%S',
			minute: '%H:%M',
			hour: '%H:%M',
			day: '%e. %b',
			week: '%e. %b',
			month: '%b \'%y',
			year: '%Y'
		},
		endOnTick: false,
		gridLineColor: '#C0C0C0',
		// gridLineDashStyle: 'solid',
		// gridLineWidth: 0,
		// reversed: false,

		labels: defaultLabelOptions,
			// { step: null },
		lineColor: '#C0D0E0',
		lineWidth: 1,
		//linkedTo: null,
		//max: undefined,
		//min: undefined,
		minPadding: 0.01,
		maxPadding: 0.01,
		//minRange: null,
		minorGridLineColor: '#E0E0E0',
		// minorGridLineDashStyle: null,
		minorGridLineWidth: 1,
		minorTickColor: '#A0A0A0',
		//minorTickInterval: null,
		minorTickLength: 2,
		minorTickPosition: 'outside', // inside or outside
		//minorTickWidth: 0,
		//opposite: false,
		//offset: 0,
		//plotBands: [{
		//	events: {},
		//	zIndex: 1,
		//	labels: { align, x, verticalAlign, y, style, rotation, textAlign }
		//}],
		//plotLines: [{
		//	events: {}
		//  dashStyle: {}
		//	zIndex:
		//	labels: { align, x, verticalAlign, y, style, rotation, textAlign }
		//}],
		//reversed: false,
		// showFirstLabel: true,
		// showLastLabel: true,
		startOfWeek: 1,
		startOnTick: false,
		tickColor: '#C0D0E0',
		//tickInterval: null,
		tickLength: 10,
		tickmarkPlacement: 'between', // on or between
		tickPixelInterval: 100,
		tickPosition: 'outside',
		tickWidth: 1,
		title: {
			//text: null,
			align: 'middle', // low, middle or high
			//margin: 0 for horizontal, 10 for vertical axes,
			//rotation: 0,
			//side: 'outside',
			style: {
				color: '#707070'
			}
			//x: 0,
			//y: 0
		},
		type: 'linear' // linear, logarithmic or datetime
	},

	/**
	 * This options set extends the defaultOptions for Y axes
	 */
	defaultYAxisOptions: {
		endOnTick: true,
		gridLineWidth: 1,
		tickPixelInterval: 72,
		showLastLabel: true,
		labels: {
			x: -8,
			y: 3
		},
		lineWidth: 0,
		maxPadding: 0.05,
		minPadding: 0.05,
		startOnTick: true,
		tickWidth: 0,
		title: {
			rotation: 270,
			text: 'Values'
		},
		stackLabels: {
			enabled: false,
			//align: dynamic,
			//y: dynamic,
			//x: dynamic,
			//verticalAlign: dynamic,
			//textAlign: dynamic,
			//rotation: 0,
			formatter: function () {
				return numberFormat(this.total, -1);
			},
			style: defaultLabelOptions.style
		}
	},

	/**
	 * These options extend the defaultOptions for left axes
	 */
	defaultLeftAxisOptions: {
		labels: {
			x: -15,
			y: null
		},
		title: {
			rotation: 270
		}
	},

	/**
	 * These options extend the defaultOptions for right axes
	 */
	defaultRightAxisOptions: {
		labels: {
			x: 15,
			y: null
		},
		title: {
			rotation: 90
		}
	},

	/**
	 * These options extend the defaultOptions for bottom axes
	 */
	defaultBottomAxisOptions: {
		labels: {
			x: 0,
			y: null // based on font size
			// overflow: undefined,
			// staggerLines: null
		},
		title: {
			rotation: 0
		}
	},
	/**
	 * These options extend the defaultOptions for left axes
	 */
	defaultTopAxisOptions: {
		labels: {
			x: 0,
			y: -15
			// overflow: undefined
			// staggerLines: null
		},
		title: {
			rotation: 0
		}
	},

	/**
	 * Initialize the axis
	 */
	init: function (chart, userOptions) {


		var isXAxis = userOptions.isX,
			axis = this;

		// Flag, is the axis horizontal
		axis.horiz = chart.inverted ? !isXAxis : isXAxis;

		// Flag, isXAxis
		axis.isXAxis = isXAxis;
		axis.coll = isXAxis ? 'xAxis' : 'yAxis';

		axis.opposite = userOptions.opposite; // needed in setOptions
		axis.side = userOptions.side || (axis.horiz ?
				(axis.opposite ? 0 : 2) : // top : bottom
				(axis.opposite ? 1 : 3));  // right : left

		axis.setOptions(userOptions);


		var options = this.options,
			type = options.type,
			isDatetimeAxis = type === 'datetime';

		axis.labelFormatter = options.labels.formatter || axis.defaultLabelFormatter; // can be overwritten by dynamic format


		// Flag, stagger lines or not
		axis.userOptions = userOptions;

		//axis.axisTitleMargin = UNDEFINED,// = options.title.margin,
		axis.minPixelPadding = 0;
		//axis.ignoreMinPadding = UNDEFINED; // can be set to true by a column or bar series
		//axis.ignoreMaxPadding = UNDEFINED;

		axis.chart = chart;
		axis.reversed = options.reversed;
		axis.zoomEnabled = options.zoomEnabled !== false;

		// Initial categories
		axis.categories = options.categories || type === 'category';
		axis.names = [];

		// Elements
		//axis.axisGroup = UNDEFINED;
		//axis.gridGroup = UNDEFINED;
		//axis.axisTitle = UNDEFINED;
		//axis.axisLine = UNDEFINED;

		// Shorthand types
		axis.isLog = type === 'logarithmic';
		axis.isDatetimeAxis = isDatetimeAxis;

		// Flag, if axis is linked to another axis
		axis.isLinked = defined(options.linkedTo);
		// Linked axis.
		//axis.linkedParent = UNDEFINED;

		// Tick positions
		//axis.tickPositions = UNDEFINED; // array containing predefined positions
		// Tick intervals
		//axis.tickInterval = UNDEFINED;
		//axis.minorTickInterval = UNDEFINED;

		axis.tickmarkOffset = (axis.categories && options.tickmarkPlacement === 'between' &&
			pick(options.tickInterval, 1) === 1) ? 0.5 : 0; // #3202

		// Major ticks
		axis.ticks = {};
		axis.labelEdge = [];
		// Minor ticks
		axis.minorTicks = {};
		//axis.tickAmount = UNDEFINED;

		// List of plotLines/Bands
		axis.plotLinesAndBands = [];

		// Alternate bands
		axis.alternateBands = {};

		// Axis metrics
		//axis.left = UNDEFINED;
		//axis.top = UNDEFINED;
		//axis.width = UNDEFINED;
		//axis.height = UNDEFINED;
		//axis.bottom = UNDEFINED;
		//axis.right = UNDEFINED;
		//axis.transA = UNDEFINED;
		//axis.transB = UNDEFINED;
		//axis.oldTransA = UNDEFINED;
		axis.len = 0;
		//axis.oldMin = UNDEFINED;
		//axis.oldMax = UNDEFINED;
		//axis.oldUserMin = UNDEFINED;
		//axis.oldUserMax = UNDEFINED;
		//axis.oldAxisLength = UNDEFINED;
		axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;
		axis.range = options.range;
		axis.offset = options.offset || 0;


		// Dictionary for stacks
		axis.stacks = {};
		axis.oldStacks = {};

		// Min and max in the data
		//axis.dataMin = UNDEFINED,
		//axis.dataMax = UNDEFINED,

		// The axis range
		axis.max = null;
		axis.min = null;

		// User set min and max
		//axis.userMin = UNDEFINED,
		//axis.userMax = UNDEFINED,

		// Crosshair options
		axis.crosshair = pick(options.crosshair, splat(chart.options.tooltip.crosshairs)[isXAxis ? 0 : 1], false);
		// Run Axis

		var eventType,
			events = axis.options.events;

		// Register
		if (inArray(axis, chart.axes) === -1) { // don't add it again on Axis.update()
			if (isXAxis && !this.isColorAxis) { // #2713
				chart.axes.splice(chart.xAxis.length, 0, axis);
			} else {
				chart.axes.push(axis);
			}

			chart[axis.coll].push(axis);
		}

		axis.series = axis.series || []; // populated by Series

		// inverted charts have reversed xAxes as default
		if (chart.inverted && isXAxis && axis.reversed === UNDEFINED) {
			axis.reversed = true;
		}

		axis.removePlotBand = axis.removePlotBandOrLine;
		axis.removePlotLine = axis.removePlotBandOrLine;


		// register event listeners
		for (eventType in events) {
			addEvent(axis, eventType, events[eventType]);
		}

		// extend logarithmic axis
		if (axis.isLog) {
			axis.val2lin = log2lin;
			axis.lin2val = lin2log;
		}
	},

	/**
	 * Merge and set options
	 */
	setOptions: function (userOptions) {
		this.options = merge(
			this.defaultOptions,
			this.isXAxis ? {} : this.defaultYAxisOptions,
			[this.defaultTopAxisOptions, this.defaultRightAxisOptions,
				this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side],
			merge(
				defaultOptions[this.coll], // if set in setOptions (#1053)
				userOptions
			)
		);
	},

	/**
	 * The default label formatter. The context is a special config object for the label.
	 */
	defaultLabelFormatter: function () {
		var axis = this.axis,
			value = this.value,
			categories = axis.categories,
			dateTimeLabelFormat = this.dateTimeLabelFormat,
			numericSymbols = defaultOptions.lang.numericSymbols,
			i = numericSymbols && numericSymbols.length,
			multi,
			ret,
			formatOption = axis.options.labels.format,

			// make sure the same symbol is added for all labels on a linear axis
			numericSymbolDetector = axis.isLog ? value : axis.tickInterval;

		if (formatOption) {
			ret = format(formatOption, this);

		} else if (categories) {
			ret = value;

		} else if (dateTimeLabelFormat) { // datetime axis
			ret = dateFormat(dateTimeLabelFormat, value);

		} else if (i && numericSymbolDetector >= 1000) {
			// Decide whether we should add a numeric symbol like k (thousands) or M (millions).
			// If we are to enable this in tooltip or other places as well, we can move this
			// logic to the numberFormatter and enable it by a parameter.
			while (i-- && ret === UNDEFINED) {
				multi = Math.pow(1000, i + 1);
				if (numericSymbolDetector >= multi && numericSymbols[i] !== null) {
					ret = numberFormat(value / multi, -1) + numericSymbols[i];
				}
			}
		}

		if (ret === UNDEFINED) {
			if (mathAbs(value) >= 10000) { // add thousands separators
				ret = numberFormat(value, 0);

			} else { // small numbers
				ret = numberFormat(value, -1, UNDEFINED, ''); // #2466
			}
		}

		return ret;
	},

	/**
	 * Get the minimum and maximum for the series of each axis
	 */
	getSeriesExtremes: function () {
		var axis = this,
			chart = axis.chart;

		axis.hasVisibleSeries = false;

		// Reset properties in case we're redrawing (#3353)
		axis.dataMin = axis.dataMax = axis.ignoreMinPadding = axis.ignoreMaxPadding = null;

		if (axis.buildStacks) {
			axis.buildStacks();
		}

		// loop through this axis' series
		each(axis.series, function (series) {

			if (series.visible || !chart.options.chart.ignoreHiddenSeries) {

				var seriesOptions = series.options,
					xData,
					threshold = seriesOptions.threshold,
					seriesDataMin,
					seriesDataMax;

				axis.hasVisibleSeries = true;

				// Validate threshold in logarithmic axes
				if (axis.isLog && threshold <= 0) {
					threshold = null;
				}

				// Get dataMin and dataMax for X axes
				if (axis.isXAxis) {
					xData = series.xData;
					if (xData.length) {
						axis.dataMin = mathMin(pick(axis.dataMin, xData[0]), arrayMin(xData));
						axis.dataMax = mathMax(pick(axis.dataMax, xData[0]), arrayMax(xData));
					}

				// Get dataMin and dataMax for Y axes, as well as handle stacking and processed data
				} else {

					// Get this particular series extremes
					series.getExtremes();
					seriesDataMax = series.dataMax;
					seriesDataMin = series.dataMin;

					// Get the dataMin and dataMax so far. If percentage is used, the min and max are
					// always 0 and 100. If seriesDataMin and seriesDataMax is null, then series
					// doesn't have active y data, we continue with nulls
					if (defined(seriesDataMin) && defined(seriesDataMax)) {
						axis.dataMin = mathMin(pick(axis.dataMin, seriesDataMin), seriesDataMin);
						axis.dataMax = mathMax(pick(axis.dataMax, seriesDataMax), seriesDataMax);
					}

					// Adjust to threshold
					if (defined(threshold)) {
						if (axis.dataMin >= threshold) {
							axis.dataMin = threshold;
							axis.ignoreMinPadding = true;
						} else if (axis.dataMax < threshold) {
							axis.dataMax = threshold;
							axis.ignoreMaxPadding = true;
						}
					}
				}
			}
		});
	},

	/**
	 * Translate from axis value to pixel position on the chart, or back
	 *
	 */
	translate: function (val, backwards, cvsCoord, old, handleLog, pointPlacement) {
		var axis = this,
			sign = 1,
			cvsOffset = 0,
			localA = old ? axis.oldTransA : axis.transA,
			localMin = old ? axis.oldMin : axis.min,
			returnValue,
			minPixelPadding = axis.minPixelPadding,
			postTranslate = (axis.options.ordinal || (axis.isLog && handleLog)) && axis.lin2val;

		if (!localA) {
			localA = axis.transA;
		}

		// In vertical axes, the canvas coordinates start from 0 at the top like in
		// SVG.
		if (cvsCoord) {
			sign *= -1; // canvas coordinates inverts the value
			cvsOffset = axis.len;
		}

		// Handle reversed axis
		if (axis.reversed) {
			sign *= -1;
			cvsOffset -= sign * (axis.sector || axis.len);
		}

		// From pixels to value
		if (backwards) { // reverse translation

			val = val * sign + cvsOffset;
			val -= minPixelPadding;
			returnValue = val / localA + localMin; // from chart pixel to value
			if (postTranslate) { // log and ordinal axes
				returnValue = axis.lin2val(returnValue);
			}

		// From value to pixels
		} else {
			if (postTranslate) { // log and ordinal axes
				val = axis.val2lin(val);
			}
			if (pointPlacement === 'between') {
				pointPlacement = 0.5;
			}
			returnValue = sign * (val - localMin) * localA + cvsOffset + (sign * minPixelPadding) +
				(isNumber(pointPlacement) ? localA * pointPlacement * axis.pointRange : 0);
		}

		return returnValue;
	},

	/**
	 * Utility method to translate an axis value to pixel position.
	 * @param {Number} value A value in terms of axis units
	 * @param {Boolean} paneCoordinates Whether to return the pixel coordinate relative to the chart
	 *        or just the axis/pane itself.
	 */
	toPixels: function (value, paneCoordinates) {
		return this.translate(value, false, !this.horiz, null, true) + (paneCoordinates ? 0 : this.pos);
	},

	/*
	 * Utility method to translate a pixel position in to an axis value
	 * @param {Number} pixel The pixel value coordinate
	 * @param {Boolean} paneCoordiantes Whether the input pixel is relative to the chart or just the
	 *        axis/pane itself.
	 */
	toValue: function (pixel, paneCoordinates) {
		return this.translate(pixel - (paneCoordinates ? 0 : this.pos), true, !this.horiz, null, true);
	},

	/**
	 * Create the path for a plot line that goes from the given value on
	 * this axis, across the plot to the opposite side
	 * @param {Number} value
	 * @param {Number} lineWidth Used for calculation crisp line
	 * @param {Number] old Use old coordinates (for resizing and rescaling)
	 */
	getPlotLinePath: function (value, lineWidth, old, force, translatedValue) {
		var axis = this,
			chart = axis.chart,
			axisLeft = axis.left,
			axisTop = axis.top,
			x1,
			y1,
			x2,
			y2,
			cHeight = (old && chart.oldChartHeight) || chart.chartHeight,
			cWidth = (old && chart.oldChartWidth) || chart.chartWidth,
			skip,
			transB = axis.transB;

		translatedValue = pick(translatedValue, axis.translate(value, null, null, old));
		x1 = x2 = mathRound(translatedValue + transB);
		y1 = y2 = mathRound(cHeight - translatedValue - transB);

		if (isNaN(translatedValue)) { // no min or max
			skip = true;

		} else if (axis.horiz) {
			y1 = axisTop;
			y2 = cHeight - axis.bottom;
			if (x1 < axisLeft || x1 > axisLeft + axis.width) {
				skip = true;
			}
		} else {
			x1 = axisLeft;
			x2 = cWidth - axis.right;

			if (y1 < axisTop || y1 > axisTop + axis.height) {
				skip = true;
			}
		}
		return skip && !force ?
			null :
			chart.renderer.crispLine([M, x1, y1, L, x2, y2], lineWidth || 1);
	},

	/**
	 * Set the tick positions of a linear axis to round values like whole tens or every five.
	 */
	getLinearTickPositions: function (tickInterval, min, max) {
		var pos,
			lastPos,
			roundedMin = correctFloat(mathFloor(min / tickInterval) * tickInterval),
			roundedMax = correctFloat(mathCeil(max / tickInterval) * tickInterval),
			tickPositions = [];

		// For single points, add a tick regardless of the relative position (#2662)
		if (min === max && isNumber(min)) {
			return [min];
		}

		// Populate the intermediate values
		pos = roundedMin;
		while (pos <= roundedMax) {

			// Place the tick on the rounded value
			tickPositions.push(pos);

			// Always add the raw tickInterval, not the corrected one.
			pos = correctFloat(pos + tickInterval);

			// If the interval is not big enough in the current min - max range to actually increase
			// the loop variable, we need to break out to prevent endless loop. Issue #619
			if (pos === lastPos) {
				break;
			}

			// Record the last value
			lastPos = pos;
		}
		return tickPositions;
	},

	/**
	 * Return the minor tick positions. For logarithmic axes, reuse the same logic
	 * as for major ticks.
	 */
	getMinorTickPositions: function () {
		var axis = this,
			options = axis.options,
			tickPositions = axis.tickPositions,
			minorTickInterval = axis.minorTickInterval,
			minorTickPositions = [],
			pos,
			i,
			len;

		if (axis.isLog) {
			len = tickPositions.length;
			for (i = 1; i < len; i++) {
				minorTickPositions = minorTickPositions.concat(
					axis.getLogTickPositions(minorTickInterval, tickPositions[i - 1], tickPositions[i], true)
				);
			}
		} else if (axis.isDatetimeAxis && options.minorTickInterval === 'auto') { // #1314
			minorTickPositions = minorTickPositions.concat(
				axis.getTimeTicks(
					axis.normalizeTimeTickInterval(minorTickInterval),
					axis.min,
					axis.max,
					options.startOfWeek
				)
			);
			if (minorTickPositions[0] < axis.min) {
				minorTickPositions.shift();
			}
		} else {
			for (pos = axis.min + (tickPositions[0] - axis.min) % minorTickInterval; pos <= axis.max; pos += minorTickInterval) {
				minorTickPositions.push(pos);
			}
		}
		return minorTickPositions;
	},

	/**
	 * Adjust the min and max for the minimum range. Keep in mind that the series data is
	 * not yet processed, so we don't have information on data cropping and grouping, or
	 * updated axis.pointRange or series.pointRange. The data can't be processed until
	 * we have finally established min and max.
	 */
	adjustForMinRange: function () {
		var axis = this,
			options = axis.options,
			min = axis.min,
			max = axis.max,
			zoomOffset,
			spaceAvailable = axis.dataMax - axis.dataMin >= axis.minRange,
			closestDataRange,
			i,
			distance,
			xData,
			loopLength,
			minArgs,
			maxArgs;

		// Set the automatic minimum range based on the closest point distance
		if (axis.isXAxis && axis.minRange === UNDEFINED && !axis.isLog) {

			if (defined(options.min) || defined(options.max)) {
				axis.minRange = null; // don't do this again

			} else {

				// Find the closest distance between raw data points, as opposed to
				// closestPointRange that applies to processed points (cropped and grouped)
				each(axis.series, function (series) {
					xData = series.xData;
					loopLength = series.xIncrement ? 1 : xData.length - 1;
					for (i = loopLength; i > 0; i--) {
						distance = xData[i] - xData[i - 1];
						if (closestDataRange === UNDEFINED || distance < closestDataRange) {
							closestDataRange = distance;
						}
					}
				});
				axis.minRange = mathMin(closestDataRange * 5, axis.dataMax - axis.dataMin);
			}
		}

		// if minRange is exceeded, adjust
		if (max - min < axis.minRange) {
			var minRange = axis.minRange;
			zoomOffset = (minRange - max + min) / 2;

			// if min and max options have been set, don't go beyond it
			minArgs = [min - zoomOffset, pick(options.min, min - zoomOffset)];
			if (spaceAvailable) { // if space is available, stay within the data range
				minArgs[2] = axis.dataMin;
			}
			min = arrayMax(minArgs);

			maxArgs = [min + minRange, pick(options.max, min + minRange)];
			if (spaceAvailable) { // if space is availabe, stay within the data range
				maxArgs[2] = axis.dataMax;
			}

			max = arrayMin(maxArgs);

			// now if the max is adjusted, adjust the min back
			if (max - min < minRange) {
				minArgs[0] = max - minRange;
				minArgs[1] = pick(options.min, max - minRange);
				min = arrayMax(minArgs);
			}
		}

		// Record modified extremes
		axis.min = min;
		axis.max = max;
	},

	/**
	 * Update translation information
	 */
	setAxisTranslation: function (saveOld) {
		var axis = this,
			range = axis.max - axis.min,
			pointRange = axis.axisPointRange || 0,
			closestPointRange,
			minPointOffset = 0,
			pointRangePadding = 0,
			linkedParent = axis.linkedParent,
			ordinalCorrection,
			hasCategories = !!axis.categories,
			transA = axis.transA;

		// Adjust translation for padding. Y axis with categories need to go through the same (#1784).
		if (axis.isXAxis || hasCategories || pointRange) {
			if (linkedParent) {
				minPointOffset = linkedParent.minPointOffset;
				pointRangePadding = linkedParent.pointRangePadding;

			} else {
				each(axis.series, function (series) {
					var seriesPointRange = hasCategories ? 1 : (axis.isXAxis ? series.pointRange : (axis.axisPointRange || 0)), // #2806
						pointPlacement = series.options.pointPlacement,
						seriesClosestPointRange = series.closestPointRange;

					if (seriesPointRange > range) { // #1446
						seriesPointRange = 0;
					}
					pointRange = mathMax(pointRange, seriesPointRange);

					// minPointOffset is the value padding to the left of the axis in order to make
					// room for points with a pointRange, typically columns. When the pointPlacement option
					// is 'between' or 'on', this padding does not apply.
					minPointOffset = mathMax(
						minPointOffset,
						isString(pointPlacement) ? 0 : seriesPointRange / 2
					);

					// Determine the total padding needed to the length of the axis to make room for the
					// pointRange. If the series' pointPlacement is 'on', no padding is added.
					pointRangePadding = mathMax(
						pointRangePadding,
						pointPlacement === 'on' ? 0 : seriesPointRange
					);

					// Set the closestPointRange
					if (!series.noSharedTooltip && defined(seriesClosestPointRange)) {
						closestPointRange = defined(closestPointRange) ?
							mathMin(closestPointRange, seriesClosestPointRange) :
							seriesClosestPointRange;
					}
				});
			}

			// Record minPointOffset and pointRangePadding
			ordinalCorrection = axis.ordinalSlope && closestPointRange ? axis.ordinalSlope / closestPointRange : 1; // #988, #1853
			axis.minPointOffset = minPointOffset = minPointOffset * ordinalCorrection;
			axis.pointRangePadding = pointRangePadding = pointRangePadding * ordinalCorrection;

			// pointRange means the width reserved for each point, like in a column chart
			axis.pointRange = mathMin(pointRange, range);

			// closestPointRange means the closest distance between points. In columns
			// it is mostly equal to pointRange, but in lines pointRange is 0 while closestPointRange
			// is some other value
			axis.closestPointRange = closestPointRange;
		}

		// Secondary values
		if (saveOld) {
			axis.oldTransA = transA;
		}
		axis.translationSlope = axis.transA = transA = axis.len / ((range + pointRangePadding) || 1);
		axis.transB = axis.horiz ? axis.left : axis.bottom; // translation addend
		axis.minPixelPadding = transA * minPointOffset;
	},

	/**
	 * Set the tick positions to round values and optionally extend the extremes
	 * to the nearest tick
	 */
	setTickPositions: function (secondPass) {
		var axis = this,
			chart = axis.chart,
			options = axis.options,
			startOnTick = options.startOnTick,
			endOnTick = options.endOnTick,
			isLog = axis.isLog,
			isDatetimeAxis = axis.isDatetimeAxis,
			isXAxis = axis.isXAxis,
			isLinked = axis.isLinked,
			tickPositioner = axis.options.tickPositioner,
			maxPadding = options.maxPadding,
			minPadding = options.minPadding,
			length,
			linkedParentExtremes,
			tickIntervalOption = options.tickInterval,
			minTickIntervalOption = options.minTickInterval,
			tickPixelIntervalOption = options.tickPixelInterval,
			tickPositions,
			keepTwoTicksOnly,
			categories = axis.categories;

		// linked axis gets the extremes from the parent axis
		if (isLinked) {
			axis.linkedParent = chart[axis.coll][options.linkedTo];
			linkedParentExtremes = axis.linkedParent.getExtremes();
			axis.min = pick(linkedParentExtremes.min, linkedParentExtremes.dataMin);
			axis.max = pick(linkedParentExtremes.max, linkedParentExtremes.dataMax);
			if (options.type !== axis.linkedParent.options.type) {
				error(11, 1); // Can't link axes of different type
			}
		} else { // initial min and max from the extreme data values
			axis.min = pick(axis.userMin, options.min, axis.dataMin);
			axis.max = pick(axis.userMax, options.max, axis.dataMax);
		}

		if (isLog) {
			if (!secondPass && mathMin(axis.min, pick(axis.dataMin, axis.min)) <= 0) { // #978
				error(10, 1); // Can't plot negative values on log axis
			}
			axis.min = correctFloat(log2lin(axis.min)); // correctFloat cures #934
			axis.max = correctFloat(log2lin(axis.max));
		}

		// handle zoomed range
		if (axis.range && defined(axis.max)) {
			axis.userMin = axis.min = mathMax(axis.min, axis.max - axis.range); // #618
			axis.userMax = axis.max;

			axis.range = null;  // don't use it when running setExtremes
		}

		// Hook for adjusting this.min and this.max. Used by bubble series.
		if (axis.beforePadding) {
			axis.beforePadding();
		}

		// adjust min and max for the minimum range
		axis.adjustForMinRange();

		// Pad the values to get clear of the chart's edges. To avoid tickInterval taking the padding
		// into account, we do this after computing tick interval (#1337).
		if (!categories && !axis.axisPointRange && !axis.usePercentage && !isLinked && defined(axis.min) && defined(axis.max)) {
			length = axis.max - axis.min;
			if (length) {
				if (!defined(options.min) && !defined(axis.userMin) && minPadding && (axis.dataMin < 0 || !axis.ignoreMinPadding)) {
					axis.min -= length * minPadding;
				}
				if (!defined(options.max) && !defined(axis.userMax)  && maxPadding && (axis.dataMax > 0 || !axis.ignoreMaxPadding)) {
					axis.max += length * maxPadding;
				}
			}
		}

		// Stay within floor and ceiling
		if (isNumber(options.floor)) {
			axis.min = mathMax(axis.min, options.floor);
		}
		if (isNumber(options.ceiling)) {
			axis.max = mathMin(axis.max, options.ceiling);
		}

		// get tickInterval
		if (axis.min === axis.max || axis.min === undefined || axis.max === undefined) {
			axis.tickInterval = 1;
		} else if (isLinked && !tickIntervalOption &&
				tickPixelIntervalOption === axis.linkedParent.options.tickPixelInterval) {
			axis.tickInterval = axis.linkedParent.tickInterval;
		} else {
			axis.tickInterval = pick(
				tickIntervalOption,
				categories ? // for categoried axis, 1 is default, for linear axis use tickPix
					1 :
					// don't let it be more than the data range
					(axis.max - axis.min) * tickPixelIntervalOption / mathMax(axis.len, tickPixelIntervalOption)
			);
			// For squished axes, set only two ticks
			if (!defined(tickIntervalOption) && axis.len < tickPixelIntervalOption && !this.isRadial &&
					!this.isLog && !categories && startOnTick && endOnTick) {
				keepTwoTicksOnly = true;
				axis.tickInterval /= 4; // tick extremes closer to the real values
			}
		}

		// Now we're finished detecting min and max, crop and group series data. This
		// is in turn needed in order to find tick positions in ordinal axes.
		if (isXAxis && !secondPass) {
			each(axis.series, function (series) {
				series.processData(axis.min !== axis.oldMin || axis.max !== axis.oldMax);
			});
		}

		// set the translation factor used in translate function
		axis.setAxisTranslation(true);

		// hook for ordinal axes and radial axes
		if (axis.beforeSetTickPositions) {
			axis.beforeSetTickPositions();
		}

		// hook for extensions, used in Highstock ordinal axes
		if (axis.postProcessTickInterval) {
			axis.tickInterval = axis.postProcessTickInterval(axis.tickInterval);
		}

		// In column-like charts, don't cramp in more ticks than there are points (#1943)
		if (axis.pointRange) {
			axis.tickInterval = mathMax(axis.pointRange, axis.tickInterval);
		}

		// Before normalizing the tick interval, handle minimum tick interval. This applies only if tickInterval is not defined.
		if (!tickIntervalOption && axis.tickInterval < minTickIntervalOption) {
			axis.tickInterval = minTickIntervalOption;
		}

		// for linear axes, get magnitude and normalize the interval
		if (!isDatetimeAxis && !isLog) { // linear
			if (!tickIntervalOption) {
				axis.tickInterval = normalizeTickInterval(
					axis.tickInterval,
					null,
					getMagnitude(axis.tickInterval),
					// If the tick interval is between 1 and 5 and the axis max is in the order of
					// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
					pick(options.allowDecimals, !(axis.tickInterval > 1 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999))
				);
			}
		}

		// get minorTickInterval
		axis.minorTickInterval = options.minorTickInterval === 'auto' && axis.tickInterval ?
				axis.tickInterval / 5 : options.minorTickInterval;

		// find the tick positions
		axis.tickPositions = tickPositions = options.tickPositions ?
			[].concat(options.tickPositions) : // Work on a copy (#1565)
			(tickPositioner && tickPositioner.apply(axis, [axis.min, axis.max]));
		if (!tickPositions) {

			// Too many ticks
			if (!axis.ordinalPositions && (axis.max - axis.min) / axis.tickInterval > mathMax(2 * axis.len, 200)) {
				error(19, true);
			}

			if (isDatetimeAxis) {
				tickPositions = axis.getTimeTicks(
					axis.normalizeTimeTickInterval(axis.tickInterval, options.units),
					axis.min,
					axis.max,
					options.startOfWeek,
					axis.ordinalPositions,
					axis.closestPointRange,
					true
				);
			} else if (isLog) {
				tickPositions = axis.getLogTickPositions(axis.tickInterval, axis.min, axis.max);
			} else {
				tickPositions = axis.getLinearTickPositions(axis.tickInterval, axis.min, axis.max);
			}

			if (keepTwoTicksOnly) {
				tickPositions.splice(1, tickPositions.length - 2);
			}

			axis.tickPositions = tickPositions;
		}

		if (!isLinked) {

			// reset min/max or remove extremes based on start/end on tick
			var roundedMin = tickPositions[0],
				roundedMax = tickPositions[tickPositions.length - 1],
				minPointOffset = axis.minPointOffset || 0,
				singlePad;

			if (startOnTick) {
				axis.min = roundedMin;
			} else if (axis.min - minPointOffset > roundedMin) {
				tickPositions.shift();
			}

			if (endOnTick) {
				axis.max = roundedMax;
			} else if (axis.max + minPointOffset < roundedMax) {
				tickPositions.pop();
			}

			// If no tick are left, set one tick in the middle (#3195)
			if (tickPositions.length === 0 && defined(roundedMin)) {
				tickPositions.push((roundedMax + roundedMin) / 2);
			}

			// When there is only one point, or all points have the same value on this axis, then min
			// and max are equal and tickPositions.length is 0 or 1. In this case, add some padding
			// in order to center the point, but leave it with one tick. #1337.
			if (tickPositions.length === 1) {
				singlePad = mathAbs(axis.max) > 10e12 ? 1 : 0.001; // The lowest possible number to avoid extra padding on columns (#2619, #2846)
				axis.min -= singlePad;
				axis.max += singlePad;
			}
		}
	},

	/**
	 * Set the max ticks of either the x and y axis collection
	 */
	setMaxTicks: function () {

		var chart = this.chart,
			maxTicks = chart.maxTicks || {},
			tickPositions = this.tickPositions,
			key = this._maxTicksKey = [this.coll, this.pos, this.len].join('-');

		if (!this.isLinked && !this.isDatetimeAxis && tickPositions && tickPositions.length > (maxTicks[key] || 0) && this.options.alignTicks !== false) {
			maxTicks[key] = tickPositions.length;
		}
		chart.maxTicks = maxTicks;
	},

	/**
	 * When using multiple axes, adjust the number of ticks to match the highest
	 * number of ticks in that group
	 */
	adjustTickAmount: function () {
		var axis = this,
			chart = axis.chart,
			key = axis._maxTicksKey,
			tickPositions = axis.tickPositions,
			maxTicks = chart.maxTicks;

		if (maxTicks && maxTicks[key] && !axis.isDatetimeAxis && !axis.categories && !axis.isLinked &&
				axis.options.alignTicks !== false && this.min !== UNDEFINED) {
			var oldTickAmount = axis.tickAmount,
				calculatedTickAmount = tickPositions.length,
				tickAmount;

			// set the axis-level tickAmount to use below
			axis.tickAmount = tickAmount = maxTicks[key];

			if (calculatedTickAmount < tickAmount) {
				while (tickPositions.length < tickAmount) {
					tickPositions.push(correctFloat(
						tickPositions[tickPositions.length - 1] + axis.tickInterval
					));
				}
				axis.transA *= (calculatedTickAmount - 1) / (tickAmount - 1);
				axis.max = tickPositions[tickPositions.length - 1];

			}
			if (defined(oldTickAmount) && tickAmount !== oldTickAmount) {
				axis.isDirty = true;
			}
		}
	},

	/**
	 * Set the scale based on data min and max, user set min and max or options
	 *
	 */
	setScale: function () {
		var axis = this,
			stacks = axis.stacks,
			type,
			i,
			isDirtyData,
			isDirtyAxisLength;

		axis.oldMin = axis.min;
		axis.oldMax = axis.max;
		axis.oldAxisLength = axis.len;

		// set the new axisLength
		axis.setAxisSize();
		//axisLength = horiz ? axisWidth : axisHeight;
		isDirtyAxisLength = axis.len !== axis.oldAxisLength;

		// is there new data?
		each(axis.series, function (series) {
			if (series.isDirtyData || series.isDirty ||
					series.xAxis.isDirty) { // when x axis is dirty, we need new data extremes for y as well
				isDirtyData = true;
			}
		});

		// do we really need to go through all this?
		if (isDirtyAxisLength || isDirtyData || axis.isLinked || axis.forceRedraw ||
			axis.userMin !== axis.oldUserMin || axis.userMax !== axis.oldUserMax) {

			// reset stacks
			if (!axis.isXAxis) {
				for (type in stacks) {
					for (i in stacks[type]) {
						stacks[type][i].total = null;
						stacks[type][i].cum = 0;
					}
				}
			}

			axis.forceRedraw = false;

			// get data extremes if needed
			axis.getSeriesExtremes();

			// get fixed positions based on tickInterval
			axis.setTickPositions();

			// record old values to decide whether a rescale is necessary later on (#540)
			axis.oldUserMin = axis.userMin;
			axis.oldUserMax = axis.userMax;

			// Mark as dirty if it is not already set to dirty and extremes have changed. #595.
			if (!axis.isDirty) {
				axis.isDirty = isDirtyAxisLength || axis.min !== axis.oldMin || axis.max !== axis.oldMax;
			}
		} else if (!axis.isXAxis) {
			if (axis.oldStacks) {
				stacks = axis.stacks = axis.oldStacks;
			}

			// reset stacks
			for (type in stacks) {
				for (i in stacks[type]) {
					stacks[type][i].cum = stacks[type][i].total;
				}
			}
		}

		// Set the maximum tick amount
		axis.setMaxTicks();
	},

	/**
	 * Set the extremes and optionally redraw
	 * @param {Number} newMin
	 * @param {Number} newMax
	 * @param {Boolean} redraw
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 * @param {Object} eventArguments
	 *
	 */
	setExtremes: function (newMin, newMax, redraw, animation, eventArguments) {
		var axis = this,
			chart = axis.chart;

		redraw = pick(redraw, true); // defaults to true

		// Extend the arguments with min and max
		eventArguments = extend(eventArguments, {
			min: newMin,
			max: newMax
		});

		// Fire the event
		fireEvent(axis, 'setExtremes', eventArguments, function () { // the default event handler

			axis.userMin = newMin;
			axis.userMax = newMax;
			axis.eventArgs = eventArguments;

			// Mark for running afterSetExtremes
			axis.isDirtyExtremes = true;

			// redraw
			if (redraw) {
				chart.redraw(animation);
			}
		});
	},

	/**
	 * Overridable method for zooming chart. Pulled out in a separate method to allow overriding
	 * in stock charts.
	 */
	zoom: function (newMin, newMax) {
		var dataMin = this.dataMin,
			dataMax = this.dataMax,
			options = this.options;

		// Prevent pinch zooming out of range. Check for defined is for #1946. #1734.
		if (!this.allowZoomOutside) {
			if (defined(dataMin) && newMin <= mathMin(dataMin, pick(options.min, dataMin))) {
				newMin = UNDEFINED;
			}
			if (defined(dataMax) && newMax >= mathMax(dataMax, pick(options.max, dataMax))) {
				newMax = UNDEFINED;
			}
		}

		// In full view, displaying the reset zoom button is not required
		this.displayBtn = newMin !== UNDEFINED || newMax !== UNDEFINED;

		// Do it
		this.setExtremes(
			newMin,
			newMax,
			false,
			UNDEFINED,
			{ trigger: 'zoom' }
		);
		return true;
	},

	/**
	 * Update the axis metrics
	 */
	setAxisSize: function () {
		var chart = this.chart,
			options = this.options,
			offsetLeft = options.offsetLeft || 0,
			offsetRight = options.offsetRight || 0,
			horiz = this.horiz,
			width = pick(options.width, chart.plotWidth - offsetLeft + offsetRight),
			height = pick(options.height, chart.plotHeight),
			top = pick(options.top, chart.plotTop),
			left = pick(options.left, chart.plotLeft + offsetLeft),
			percentRegex = /%$/;

		// Check for percentage based input values
		if (percentRegex.test(height)) {
			height = parseInt(height, 10) / 100 * chart.plotHeight;
		}
		if (percentRegex.test(top)) {
			top = parseInt(top, 10) / 100 * chart.plotHeight + chart.plotTop;
		}

		// Expose basic values to use in Series object and navigator
		this.left = left;
		this.top = top;
		this.width = width;
		this.height = height;
		this.bottom = chart.chartHeight - height - top;
		this.right = chart.chartWidth - width - left;

		// Direction agnostic properties
		this.len = mathMax(horiz ? width : height, 0); // mathMax fixes #905
		this.pos = horiz ? left : top; // distance from SVG origin
	},

	/**
	 * Get the actual axis extremes
	 */
	getExtremes: function () {
		var axis = this,
			isLog = axis.isLog;

		return {
			min: isLog ? correctFloat(lin2log(axis.min)) : axis.min,
			max: isLog ? correctFloat(lin2log(axis.max)) : axis.max,
			dataMin: axis.dataMin,
			dataMax: axis.dataMax,
			userMin: axis.userMin,
			userMax: axis.userMax
		};
	},

	/**
	 * Get the zero plane either based on zero or on the min or max value.
	 * Used in bar and area plots
	 */
	getThreshold: function (threshold) {
		var axis = this,
			isLog = axis.isLog;

		var realMin = isLog ? lin2log(axis.min) : axis.min,
			realMax = isLog ? lin2log(axis.max) : axis.max;

		if (realMin > threshold || threshold === null) {
			threshold = realMin;
		} else if (realMax < threshold) {
			threshold = realMax;
		}

		return axis.translate(threshold, 0, 1, 0, 1);
	},

	/**
	 * Compute auto alignment for the axis label based on which side the axis is on
	 * and the given rotation for the label
	 */
	autoLabelAlign: function (rotation) {
		var ret,
			angle = (pick(rotation, 0) - (this.side * 90) + 720) % 360;

		if (angle > 15 && angle < 165) {
			ret = 'right';
		} else if (angle > 195 && angle < 345) {
			ret = 'left';
		} else {
			ret = 'center';
		}
		return ret;
	},

	/**
	 * Render the tick labels to a preliminary position to get their sizes
	 */
	getOffset: function () {
		var axis = this,
			chart = axis.chart,
			renderer = chart.renderer,
			options = axis.options,
			tickPositions = axis.tickPositions,
			ticks = axis.ticks,
			horiz = axis.horiz,
			side = axis.side,
			invertedSide = chart.inverted ? [1, 0, 3, 2][side] : side,
			hasData,
			showAxis,
			titleOffset = 0,
			titleOffsetOption,
			titleMargin = 0,
			axisTitleOptions = options.title,
			labelOptions = options.labels,
			labelOffset = 0, // reset
			labelOffsetPadded,
			axisOffset = chart.axisOffset,
			clipOffset = chart.clipOffset,
			directionFactor = [-1, 1, 1, -1][side],
			n,
			i,
			autoStaggerLines = 1,
			maxStaggerLines = pick(labelOptions.maxStaggerLines, 5),
			sortedPositions,
			lastRight,
			overlap,
			pos,
			bBox,
			x,
			w,
			lineNo,
			lineHeightCorrection;

		// For reuse in Axis.render
		axis.hasData = hasData = (axis.hasVisibleSeries || (defined(axis.min) && defined(axis.max) && !!tickPositions));
		axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);

		// Set/reset staggerLines
		axis.staggerLines = axis.horiz && labelOptions.staggerLines;

		// Create the axisGroup and gridGroup elements on first iteration
		if (!axis.axisGroup) {
			axis.gridGroup = renderer.g('grid')
				.attr({ zIndex: options.gridZIndex || 1 })
				.add();
			axis.axisGroup = renderer.g('axis')
				.attr({ zIndex: options.zIndex || 2 })
				.add();
			axis.labelGroup = renderer.g('axis-labels')
				.attr({ zIndex: labelOptions.zIndex || 7 })
				.addClass(PREFIX + axis.coll.toLowerCase() + '-labels')
				.add();
		}

		if (hasData || axis.isLinked) {

			// Set the explicit or automatic label alignment
			axis.labelAlign = pick(labelOptions.align || axis.autoLabelAlign(labelOptions.rotation));

			// Generate ticks
			each(tickPositions, function (pos) {
				if (!ticks[pos]) {
					ticks[pos] = new Tick(axis, pos);
				} else {
					ticks[pos].addLabel(); // update labels depending on tick interval
				}
			});

			// Handle automatic stagger lines
			if (axis.horiz && !axis.staggerLines && maxStaggerLines && !labelOptions.rotation) {
				sortedPositions = axis.reversed ? [].concat(tickPositions).reverse() : tickPositions;
				while (autoStaggerLines < maxStaggerLines) {
					lastRight = [];
					overlap = false;

					for (i = 0; i < sortedPositions.length; i++) {
						pos = sortedPositions[i];
						bBox = ticks[pos].label && ticks[pos].label.getBBox();
						w = bBox ? bBox.width : 0;
						lineNo = i % autoStaggerLines;

						if (w) {
							x = axis.translate(pos); // don't handle log
							if (lastRight[lineNo] !== UNDEFINED && x < lastRight[lineNo]) {
								overlap = true;
							}
							lastRight[lineNo] = x + w;
						}
					}
					if (overlap) {
						autoStaggerLines++;
					} else {
						break;
					}
				}

				if (autoStaggerLines > 1) {
					axis.staggerLines = autoStaggerLines;
				}
			}


			each(tickPositions, function (pos) {
				// left side must be align: right and right side must have align: left for labels
				if (side === 0 || side === 2 || { 1: 'left', 3: 'right' }[side] === axis.labelAlign) {

					// get the highest offset
					labelOffset = mathMax(
						ticks[pos].getLabelSize(),
						labelOffset
					);
				}
			});

			if (axis.staggerLines) {
				labelOffset *= axis.staggerLines;
				axis.labelOffset = labelOffset;
			}


		} else { // doesn't have data
			for (n in ticks) {
				ticks[n].destroy();
				delete ticks[n];
			}
		}

		if (axisTitleOptions && axisTitleOptions.text && axisTitleOptions.enabled !== false) {
			if (!axis.axisTitle) {
				axis.axisTitle = renderer.text(
					axisTitleOptions.text,
					0,
					0,
					axisTitleOptions.useHTML
				)
				.attr({
					zIndex: 7,
					rotation: axisTitleOptions.rotation || 0,
					align:
						axisTitleOptions.textAlign ||
						{ low: 'left', middle: 'center', high: 'right' }[axisTitleOptions.align]
				})
				.addClass(PREFIX + this.coll.toLowerCase() + '-title')
				.css(axisTitleOptions.style)
				.add(axis.axisGroup);
				axis.axisTitle.isNew = true;
			}

			if (showAxis) {
				titleOffset = axis.axisTitle.getBBox()[horiz ? 'height' : 'width'];
				titleOffsetOption = axisTitleOptions.offset;
				titleMargin = defined(titleOffsetOption) ? 0 : pick(axisTitleOptions.margin, horiz ? 5 : 10);
			}

			// hide or show the title depending on whether showEmpty is set
			axis.axisTitle[showAxis ? 'show' : 'hide']();
		}

		// handle automatic or user set offset
		axis.offset = directionFactor * pick(options.offset, axisOffset[side]);

		lineHeightCorrection = side === 2 ? axis.tickBaseline : 0;
		labelOffsetPadded = labelOffset + titleMargin +
			(labelOffset && (directionFactor * (horiz ? pick(labelOptions.y, axis.tickBaseline + 8) : labelOptions.x) - lineHeightCorrection));
		axis.axisTitleMargin = pick(titleOffsetOption, labelOffsetPadded);

		axisOffset[side] = mathMax(
			axisOffset[side],
			axis.axisTitleMargin + titleOffset + directionFactor * axis.offset,
			labelOffsetPadded // #3027
		);
		clipOffset[invertedSide] = mathMax(clipOffset[invertedSide], mathFloor(options.lineWidth / 2) * 2);
	},

	/**
	 * Get the path for the axis line
	 */
	getLinePath: function (lineWidth) {
		var chart = this.chart,
			opposite = this.opposite,
			offset = this.offset,
			horiz = this.horiz,
			lineLeft = this.left + (opposite ? this.width : 0) + offset,
			lineTop = chart.chartHeight - this.bottom - (opposite ? this.height : 0) + offset;

		if (opposite) {
			lineWidth *= -1; // crispify the other way - #1480, #1687
		}

		return chart.renderer.crispLine([
				M,
				horiz ?
					this.left :
					lineLeft,
				horiz ?
					lineTop :
					this.top,
				L,
				horiz ?
					chart.chartWidth - this.right :
					lineLeft,
				horiz ?
					lineTop :
					chart.chartHeight - this.bottom
			], lineWidth);
	},

	/**
	 * Position the title
	 */
	getTitlePosition: function () {
		// compute anchor points for each of the title align options
		var horiz = this.horiz,
			axisLeft = this.left,
			axisTop = this.top,
			axisLength = this.len,
			axisTitleOptions = this.options.title,
			margin = horiz ? axisLeft : axisTop,
			opposite = this.opposite,
			offset = this.offset,
			fontSize = pInt(axisTitleOptions.style.fontSize || 12),

			// the position in the length direction of the axis
			alongAxis = {
				low: margin + (horiz ? 0 : axisLength),
				middle: margin + axisLength / 2,
				high: margin + (horiz ? axisLength : 0)
			}[axisTitleOptions.align],

			// the position in the perpendicular direction of the axis
			offAxis = (horiz ? axisTop + this.height : axisLeft) +
				(horiz ? 1 : -1) * // horizontal axis reverses the margin
				(opposite ? -1 : 1) * // so does opposite axes
				this.axisTitleMargin +
				(this.side === 2 ? fontSize : 0);

		return {
			x: horiz ?
				alongAxis :
				offAxis + (opposite ? this.width : 0) + offset +
					(axisTitleOptions.x || 0), // x
			y: horiz ?
				offAxis - (opposite ? this.height : 0) + offset :
				alongAxis + (axisTitleOptions.y || 0) // y
		};
	},

	/**
	 * Render the axis
	 */
	render: function () {
		var axis = this,
			horiz = axis.horiz,
			reversed = axis.reversed,
			chart = axis.chart,
			renderer = chart.renderer,
			options = axis.options,
			isLog = axis.isLog,
			isLinked = axis.isLinked,
			tickPositions = axis.tickPositions,
			sortedPositions,
			axisTitle = axis.axisTitle,
			ticks = axis.ticks,
			minorTicks = axis.minorTicks,
			alternateBands = axis.alternateBands,
			stackLabelOptions = options.stackLabels,
			alternateGridColor = options.alternateGridColor,
			tickmarkOffset = axis.tickmarkOffset,
			lineWidth = options.lineWidth,
			linePath,
			hasRendered = chart.hasRendered,
			slideInTicks = hasRendered && defined(axis.oldMin) && !isNaN(axis.oldMin),
			hasData = axis.hasData,
			showAxis = axis.showAxis,
			from,
			overflow = options.labels.overflow,
			justifyLabels = axis.justifyLabels = horiz && overflow !== false,
			to;

		// Reset
		axis.labelEdge.length = 0;
		axis.justifyToPlot = overflow === 'justify';

		// Mark all elements inActive before we go over and mark the active ones
		each([ticks, minorTicks, alternateBands], function (coll) {
			var pos;
			for (pos in coll) {
				coll[pos].isActive = false;
			}
		});

		// If the series has data draw the ticks. Else only the line and title
		if (hasData || isLinked) {

			// minor ticks
			if (axis.minorTickInterval && !axis.categories) {
				each(axis.getMinorTickPositions(), function (pos) {
					if (!minorTicks[pos]) {
						minorTicks[pos] = new Tick(axis, pos, 'minor');
					}

					// render new ticks in old position
					if (slideInTicks && minorTicks[pos].isNew) {
						minorTicks[pos].render(null, true);
					}

					minorTicks[pos].render(null, false, 1);
				});
			}

			// Major ticks. Pull out the first item and render it last so that
			// we can get the position of the neighbour label. #808.
			if (tickPositions.length) { // #1300
				sortedPositions = tickPositions.slice();
				if ((horiz && reversed) || (!horiz && !reversed)) {
					sortedPositions.reverse();
				}
				if (justifyLabels) {
					sortedPositions = sortedPositions.slice(1).concat([sortedPositions[0]]);
				}
				each(sortedPositions, function (pos, i) {

					// Reorganize the indices
					if (justifyLabels) {
						i = (i === sortedPositions.length - 1) ? 0 : i + 1;
					}

					// linked axes need an extra check to find out if
					if (!isLinked || (pos >= axis.min && pos <= axis.max)) {

						if (!ticks[pos]) {
							ticks[pos] = new Tick(axis, pos);
						}

						// render new ticks in old position
						if (slideInTicks && ticks[pos].isNew) {
							ticks[pos].render(i, true, 0.1);
						}

						ticks[pos].render(i);
					}

				});
				// In a categorized axis, the tick marks are displayed between labels. So
				// we need to add a tick mark and grid line at the left edge of the X axis.
				if (tickmarkOffset && axis.min === 0) {
					if (!ticks[-1]) {
						ticks[-1] = new Tick(axis, -1, null, true);
					}
					ticks[-1].render(-1);
				}

			}

			// alternate grid color
			if (alternateGridColor) {
				each(tickPositions, function (pos, i) {
					if (i % 2 === 0 && pos < axis.max) {
						if (!alternateBands[pos]) {
							alternateBands[pos] = new Highcharts.PlotLineOrBand(axis);
						}
						from = pos + tickmarkOffset; // #949
						to = tickPositions[i + 1] !== UNDEFINED ? tickPositions[i + 1] + tickmarkOffset : axis.max;
						alternateBands[pos].options = {
							from: isLog ? lin2log(from) : from,
							to: isLog ? lin2log(to) : to,
							color: alternateGridColor
						};
						alternateBands[pos].render();
						alternateBands[pos].isActive = true;
					}
				});
			}

			// custom plot lines and bands
			if (!axis._addedPlotLB) { // only first time
				each((options.plotLines || []).concat(options.plotBands || []), function (plotLineOptions) {
					axis.addPlotBandOrLine(plotLineOptions);
				});
				axis._addedPlotLB = true;
			}

		} // end if hasData

		// Remove inactive ticks
		each([ticks, minorTicks, alternateBands], function (coll) {
			var pos,
				i,
				forDestruction = [],
				delay = globalAnimation ? globalAnimation.duration || 500 : 0,
				destroyInactiveItems = function () {
					i = forDestruction.length;
					while (i--) {
						// When resizing rapidly, the same items may be destroyed in different timeouts,
						// or the may be reactivated
						if (coll[forDestruction[i]] && !coll[forDestruction[i]].isActive) {
							coll[forDestruction[i]].destroy();
							delete coll[forDestruction[i]];
						}
					}

				};

			for (pos in coll) {

				if (!coll[pos].isActive) {
					// Render to zero opacity
					coll[pos].render(pos, false, 0);
					coll[pos].isActive = false;
					forDestruction.push(pos);
				}
			}

			// When the objects are finished fading out, destroy them
			if (coll === alternateBands || !chart.hasRendered || !delay) {
				destroyInactiveItems();
			} else if (delay) {
				setTimeout(destroyInactiveItems, delay);
			}
		});

		// Static items. As the axis group is cleared on subsequent calls
		// to render, these items are added outside the group.
		// axis line
		if (lineWidth) {
			linePath = axis.getLinePath(lineWidth);
			if (!axis.axisLine) {
				axis.axisLine = renderer.path(linePath)
					.attr({
						stroke: options.lineColor,
						'stroke-width': lineWidth,
						zIndex: 7
					})
					.add(axis.axisGroup);
			} else {
				axis.axisLine.animate({ d: linePath });
			}

			// show or hide the line depending on options.showEmpty
			axis.axisLine[showAxis ? 'show' : 'hide']();
		}

		if (axisTitle && showAxis) {

			axisTitle[axisTitle.isNew ? 'attr' : 'animate'](
				axis.getTitlePosition()
			);
			axisTitle.isNew = false;
		}

		// Stacked totals:
		if (stackLabelOptions && stackLabelOptions.enabled) {
			axis.renderStackTotals();
		}
		// End stacked totals

		axis.isDirty = false;
	},

	/**
	 * Redraw the axis to reflect changes in the data or axis extremes
	 */
	redraw: function () {

		// render the axis
		this.render();

		// move plot lines and bands
		each(this.plotLinesAndBands, function (plotLine) {
			plotLine.render();
		});

		// mark associated series as dirty and ready for redraw
		each(this.series, function (series) {
			series.isDirty = true;
		});

	},

	/**
	 * Destroys an Axis instance.
	 */
	destroy: function (keepEvents) {
		var axis = this,
			stacks = axis.stacks,
			stackKey,
			plotLinesAndBands = axis.plotLinesAndBands,
			i;

		// Remove the events
		if (!keepEvents) {
			removeEvent(axis);
		}

		// Destroy each stack total
		for (stackKey in stacks) {
			destroyObjectProperties(stacks[stackKey]);

			stacks[stackKey] = null;
		}

		// Destroy collections
		each([axis.ticks, axis.minorTicks, axis.alternateBands], function (coll) {
			destroyObjectProperties(coll);
		});
		i = plotLinesAndBands.length;
		while (i--) { // #1975
			plotLinesAndBands[i].destroy();
		}

		// Destroy local variables
		each(['stackTotalGroup', 'axisLine', 'axisTitle', 'axisGroup', 'cross', 'gridGroup', 'labelGroup'], function (prop) {
			if (axis[prop]) {
				axis[prop] = axis[prop].destroy();
			}
		});

		// Destroy crosshair
		if (this.cross) {
			this.cross.destroy();
		}
	},

	/**
	 * Draw the crosshair
	 */
	drawCrosshair: function (e, point) {
		if (!this.crosshair) { return; }// Do not draw crosshairs if you don't have too.

		if ((defined(point) || !pick(this.crosshair.snap, true)) === false) {
			this.hideCrosshair();
			return;
		}

		var path,
			options = this.crosshair,
			animation = options.animation,
			pos;

		// Get the path
		if (!pick(options.snap, true)) {
			pos = (this.horiz ? e.chartX - this.pos : this.len - e.chartY + this.pos);
		} else if (defined(point)) {
			/*jslint eqeq: true*/
			pos = (this.chart.inverted != this.horiz) ? point.plotX : this.len - point.plotY;
			/*jslint eqeq: false*/
		}

		if (this.isRadial) {
			path = this.getPlotLinePath(this.isXAxis ? point.x : pick(point.stackY, point.y));
		} else {
			path = this.getPlotLinePath(null, null, null, null, pos);
		}

		if (path === null) {
			this.hideCrosshair();
			return;
		}

		// Draw the cross
		if (this.cross) {
			this.cross
				.attr({ visibility: VISIBLE })[animation ? 'animate' : 'attr']({ d: path }, animation);
		} else {
			var attribs = {
				'stroke-width': options.width || 1,
				stroke: options.color || '#C0C0C0',
				zIndex: options.zIndex || 2
			};
			if (options.dashStyle) {
				attribs.dashstyle = options.dashStyle;
			}
			this.cross = this.chart.renderer.path(path).attr(attribs).add();
		}
	},

	/**
	 *	Hide the crosshair.
	 */
	hideCrosshair: function () {
		if (this.cross) {
			this.cross.hide();
		}
	}
}; // end Axis

extend(Axis.prototype, AxisPlotLineOrBandExtension);

/**
 * Set the tick positions to a time unit that makes sense, for example
 * on the first of each month or on every Monday. Return an array
 * with the time positions. Used in datetime axes as well as for grouping
 * data on a datetime axis.
 *
 * @param {Object} normalizedInterval The interval in axis values (ms) and the count
 * @param {Number} min The minimum in axis values
 * @param {Number} max The maximum in axis values
 * @param {Number} startOfWeek
 */
Axis.prototype.getTimeTicks = function (normalizedInterval, min, max, startOfWeek) {
	var tickPositions = [],
		i,
		higherRanks = {},
		useUTC = defaultOptions.global.useUTC,
		minYear, // used in months and years as a basis for Date.UTC()
		minDate = new Date(min - timezoneOffset),
		interval = normalizedInterval.unitRange,
		count = normalizedInterval.count;

	if (defined(min)) { // #1300
		if (interval >= timeUnits.second) { // second
			minDate.setMilliseconds(0);
			minDate.setSeconds(interval >= timeUnits.minute ? 0 :
				count * mathFloor(minDate.getSeconds() / count));
		}

		if (interval >= timeUnits.minute) { // minute
			minDate[setMinutes](interval >= timeUnits.hour ? 0 :
				count * mathFloor(minDate[getMinutes]() / count));
		}

		if (interval >= timeUnits.hour) { // hour
			minDate[setHours](interval >= timeUnits.day ? 0 :
				count * mathFloor(minDate[getHours]() / count));
		}

		if (interval >= timeUnits.day) { // day
			minDate[setDate](interval >= timeUnits.month ? 1 :
				count * mathFloor(minDate[getDate]() / count));
		}

		if (interval >= timeUnits.month) { // month
			minDate[setMonth](interval >= timeUnits.year ? 0 :
				count * mathFloor(minDate[getMonth]() / count));
			minYear = minDate[getFullYear]();
		}

		if (interval >= timeUnits.year) { // year
			minYear -= minYear % count;
			minDate[setFullYear](minYear);
		}

		// week is a special case that runs outside the hierarchy
		if (interval === timeUnits.week) {
			// get start of current week, independent of count
			minDate[setDate](minDate[getDate]() - minDate[getDay]() +
				pick(startOfWeek, 1));
		}


		// get tick positions
		i = 1;
		if (timezoneOffset) {
			minDate = new Date(minDate.getTime() + timezoneOffset);
		}
		minYear = minDate[getFullYear]();
		var time = minDate.getTime(),
			minMonth = minDate[getMonth](),
			minDateDate = minDate[getDate](),
			localTimezoneOffset = (timeUnits.day +
					(useUTC ? timezoneOffset : minDate.getTimezoneOffset() * 60 * 1000)
				) % timeUnits.day; // #950, #3359

		// iterate and add tick positions at appropriate values
		while (time < max) {
			tickPositions.push(time);

			// if the interval is years, use Date.UTC to increase years
			if (interval === timeUnits.year) {
				time = makeTime(minYear + i * count, 0);

			// if the interval is months, use Date.UTC to increase months
			} else if (interval === timeUnits.month) {
				time = makeTime(minYear, minMonth + i * count);

			// if we're using global time, the interval is not fixed as it jumps
			// one hour at the DST crossover
			} else if (!useUTC && (interval === timeUnits.day || interval === timeUnits.week)) {
				time = makeTime(minYear, minMonth, minDateDate +
					i * count * (interval === timeUnits.day ? 1 : 7));

			// else, the interval is fixed and we use simple addition
			} else {
				time += interval * count;
			}

			i++;
		}

		// push the last time
		tickPositions.push(time);


		// mark new days if the time is dividible by day (#1649, #1760)
		each(grep(tickPositions, function (time) {
			return interval <= timeUnits.hour && time % timeUnits.day === localTimezoneOffset;
		}), function (time) {
			higherRanks[time] = 'day';
		});
	}


	// record information on the chosen unit - for dynamic label formatter
	tickPositions.info = extend(normalizedInterval, {
		higherRanks: higherRanks,
		totalRange: interval * count
	});

	return tickPositions;
};

/**
 * Get a normalized tick interval for dates. Returns a configuration object with
 * unit range (interval), count and name. Used to prepare data for getTimeTicks.
 * Previously this logic was part of getTimeTicks, but as getTimeTicks now runs
 * of segments in stock charts, the normalizing logic was extracted in order to
 * prevent it for running over again for each segment having the same interval.
 * #662, #697.
 */
Axis.prototype.normalizeTimeTickInterval = function (tickInterval, unitsOption) {
	var units = unitsOption || [[
				'millisecond', // unit name
				[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
			], [
				'second',
				[1, 2, 5, 10, 15, 30]
			], [
				'minute',
				[1, 2, 5, 10, 15, 30]
			], [
				'hour',
				[1, 2, 3, 4, 6, 8, 12]
			], [
				'day',
				[1, 2]
			], [
				'week',
				[1, 2]
			], [
				'month',
				[1, 2, 3, 4, 6]
			], [
				'year',
				null
			]],
		unit = units[units.length - 1], // default unit is years
		interval = timeUnits[unit[0]],
		multiples = unit[1],
		count,
		i;

	// loop through the units to find the one that best fits the tickInterval
	for (i = 0; i < units.length; i++) {
		unit = units[i];
		interval = timeUnits[unit[0]];
		multiples = unit[1];


		if (units[i + 1]) {
			// lessThan is in the middle between the highest multiple and the next unit.
			var lessThan = (interval * multiples[multiples.length - 1] +
						timeUnits[units[i + 1][0]]) / 2;

			// break and keep the current unit
			if (tickInterval <= lessThan) {
				break;
			}
		}
	}

	// prevent 2.5 years intervals, though 25, 250 etc. are allowed
	if (interval === timeUnits.year && tickInterval < 5 * interval) {
		multiples = [1, 2, 5];
	}

	// get the count
	count = normalizeTickInterval(
		tickInterval / interval,
		multiples,
		unit[0] === 'year' ? mathMax(getMagnitude(tickInterval / interval), 1) : 1 // #1913, #2360
	);

	return {
		unitRange: interval,
		count: count,
		unitName: unit[0]
	};
};/**
 * Methods defined on the Axis prototype
 */

/**
 * Set the tick positions of a logarithmic axis
 */
Axis.prototype.getLogTickPositions = function (interval, min, max, minor) {
	var axis = this,
		options = axis.options,
		axisLength = axis.len,
		// Since we use this method for both major and minor ticks,
		// use a local variable and return the result
		positions = [];

	// Reset
	if (!minor) {
		axis._minorAutoInterval = null;
	}

	// First case: All ticks fall on whole logarithms: 1, 10, 100 etc.
	if (interval >= 0.5) {
		interval = mathRound(interval);
		positions = axis.getLinearTickPositions(interval, min, max);

	// Second case: We need intermediary ticks. For example
	// 1, 2, 4, 6, 8, 10, 20, 40 etc.
	} else if (interval >= 0.08) {
		var roundedMin = mathFloor(min),
			intermediate,
			i,
			j,
			len,
			pos,
			lastPos,
			break2;

		if (interval > 0.3) {
			intermediate = [1, 2, 4];
		} else if (interval > 0.15) { // 0.2 equals five minor ticks per 1, 10, 100 etc
			intermediate = [1, 2, 4, 6, 8];
		} else { // 0.1 equals ten minor ticks per 1, 10, 100 etc
			intermediate = [1, 2, 3, 4, 5, 6, 7, 8, 9];
		}

		for (i = roundedMin; i < max + 1 && !break2; i++) {
			len = intermediate.length;
			for (j = 0; j < len && !break2; j++) {
				pos = log2lin(lin2log(i) * intermediate[j]);
				if (pos > min && (!minor || lastPos <= max) && lastPos !== UNDEFINED) { // #1670, lastPos is #3113
					positions.push(lastPos);
				}

				if (lastPos > max) {
					break2 = true;
				}
				lastPos = pos;
			}
		}

	// Third case: We are so deep in between whole logarithmic values that
	// we might as well handle the tick positions like a linear axis. For
	// example 1.01, 1.02, 1.03, 1.04.
	} else {
		var realMin = lin2log(min),
			realMax = lin2log(max),
			tickIntervalOption = options[minor ? 'minorTickInterval' : 'tickInterval'],
			filteredTickIntervalOption = tickIntervalOption === 'auto' ? null : tickIntervalOption,
			tickPixelIntervalOption = options.tickPixelInterval / (minor ? 5 : 1),
			totalPixelLength = minor ? axisLength / axis.tickPositions.length : axisLength;

		interval = pick(
			filteredTickIntervalOption,
			axis._minorAutoInterval,
			(realMax - realMin) * tickPixelIntervalOption / (totalPixelLength || 1)
		);

		interval = normalizeTickInterval(
			interval,
			null,
			getMagnitude(interval)
		);

		positions = map(axis.getLinearTickPositions(
			interval,
			realMin,
			realMax
		), log2lin);

		if (!minor) {
			axis._minorAutoInterval = interval / 5;
		}
	}

	// Set the axis-level tickInterval variable
	if (!minor) {
		axis.tickInterval = interval;
	}
	return positions;
};/**
 * The tooltip object
 * @param {Object} chart The chart instance
 * @param {Object} options Tooltip options
 */
var Tooltip = Highcharts.Tooltip = function () {
	this.init.apply(this, arguments);
};

Tooltip.prototype = {

	init: function (chart, options) {

		var borderWidth = options.borderWidth,
			style = options.style,
			padding = pInt(style.padding);

		// Save the chart and options
		this.chart = chart;
		this.options = options;

		// Keep track of the current series
		//this.currentSeries = UNDEFINED;

		// List of crosshairs
		this.crosshairs = [];

		// Current values of x and y when animating
		this.now = { x: 0, y: 0 };

		// The tooltip is initially hidden
		this.isHidden = true;


		// create the label
		this.label = chart.renderer.label('', 0, 0, options.shape || 'callout', null, null, options.useHTML, null, 'tooltip')
			.attr({
				padding: padding,
				fill: options.backgroundColor,
				'stroke-width': borderWidth,
				r: options.borderRadius,
				zIndex: 8
			})
			.css(style)
			.css({ padding: 0 }) // Remove it from VML, the padding is applied as an attribute instead (#1117)
			.add()
			.attr({ y: -9999 }); // #2301, #2657

		// When using canVG the shadow shows up as a gray circle
		// even if the tooltip is hidden.
		if (!useCanVG) {
			this.label.shadow(options.shadow);
		}

		// Public property for getting the shared state.
		this.shared = options.shared;
	},

	/**
	 * Destroy the tooltip and its elements.
	 */
	destroy: function () {
		// Destroy and clear local variables
		if (this.label) {
			this.label = this.label.destroy();
		}
		clearTimeout(this.hideTimer);
		clearTimeout(this.tooltipTimeout);
	},

	/**
	 * Provide a soft movement for the tooltip
	 *
	 * @param {Number} x
	 * @param {Number} y
	 * @private
	 */
	move: function (x, y, anchorX, anchorY) {
		var tooltip = this,
			now = tooltip.now,
			animate = tooltip.options.animation !== false && !tooltip.isHidden &&
				// When we get close to the target position, abort animation and land on the right place (#3056)
				(mathAbs(x - now.x) > 1 || mathAbs(y - now.y) > 1),
			skipAnchor = tooltip.followPointer || tooltip.len > 1;

		// Get intermediate values for animation
		extend(now, {
			x: animate ? (2 * now.x + x) / 3 : x,
			y: animate ? (now.y + y) / 2 : y,
			anchorX: skipAnchor ? UNDEFINED : animate ? (2 * now.anchorX + anchorX) / 3 : anchorX,
			anchorY: skipAnchor ? UNDEFINED : animate ? (now.anchorY + anchorY) / 2 : anchorY
		});

		// Move to the intermediate value
		tooltip.label.attr(now);


		// Run on next tick of the mouse tracker
		if (animate) {

			// Never allow two timeouts
			clearTimeout(this.tooltipTimeout);

			// Set the fixed interval ticking for the smooth tooltip
			this.tooltipTimeout = setTimeout(function () {
				// The interval function may still be running during destroy, so check that the chart is really there before calling.
				if (tooltip) {
					tooltip.move(x, y, anchorX, anchorY);
				}
			}, 32);

		}
	},

	/**
	 * Hide the tooltip
	 */
	hide: function (delay) {
		var tooltip = this,
			hoverPoints;

		clearTimeout(this.hideTimer); // disallow duplicate timers (#1728, #1766)
		if (!this.isHidden) {
			hoverPoints = this.chart.hoverPoints;

			this.hideTimer = setTimeout(function () {
				tooltip.label.fadeOut();
				tooltip.isHidden = true;
			}, pick(delay, this.options.hideDelay, 500));

			// hide previous hoverPoints and set new
			if (hoverPoints) {
				each(hoverPoints, function (point) {
					point.setState();
				});
			}

			this.chart.hoverPoints = null;
		}
	},

	/**
	 * Extendable method to get the anchor position of the tooltip
	 * from a point or set of points
	 */
	getAnchor: function (points, mouseEvent) {
		var ret,
			chart = this.chart,
			inverted = chart.inverted,
			plotTop = chart.plotTop,
			plotX = 0,
			plotY = 0,
			yAxis;

		points = splat(points);

		// Pie uses a special tooltipPos
		ret = points[0].tooltipPos;

		// When tooltip follows mouse, relate the position to the mouse
		if (this.followPointer && mouseEvent) {
			if (mouseEvent.chartX === UNDEFINED) {
				mouseEvent = chart.pointer.normalize(mouseEvent);
			}
			ret = [
				mouseEvent.chartX - chart.plotLeft,
				mouseEvent.chartY - plotTop
			];
		}
		// When shared, use the average position
		if (!ret) {
			each(points, function (point) {
				yAxis = point.series.yAxis;
				plotX += point.plotX;
				plotY += (point.plotLow ? (point.plotLow + point.plotHigh) / 2 : point.plotY) +
					(!inverted && yAxis ? yAxis.top - plotTop : 0); // #1151
			});

			plotX /= points.length;
			plotY /= points.length;

			ret = [
				inverted ? chart.plotWidth - plotY : plotX,
				this.shared && !inverted && points.length > 1 && mouseEvent ?
					mouseEvent.chartY - plotTop : // place shared tooltip next to the mouse (#424)
					inverted ? chart.plotHeight - plotX : plotY
			];
		}

		return map(ret, mathRound);
	},

	/**
	 * Place the tooltip in a chart without spilling over
	 * and not covering the point it self.
	 */
	getPosition: function (boxWidth, boxHeight, point) {

		var chart = this.chart,
			distance = this.distance,
			ret = {},
			swapped,
			first = ['y', chart.chartHeight, boxHeight, point.plotY + chart.plotTop],
			second = ['x', chart.chartWidth, boxWidth, point.plotX + chart.plotLeft],
			// The far side is right or bottom
			preferFarSide = point.ttBelow || (chart.inverted && !point.negative) || (!chart.inverted && point.negative),
			/**
			 * Handle the preferred dimension. When the preferred dimension is tooltip
			 * on top or bottom of the point, it will look for space there.
			 */
			firstDimension = function (dim, outerSize, innerSize, point) {
				var roomLeft = innerSize < point - distance,
					roomRight = point + distance + innerSize < outerSize,
					alignedLeft = point - distance - innerSize,
					alignedRight = point + distance;

				if (preferFarSide && roomRight) {
					ret[dim] = alignedRight;
				} else if (!preferFarSide && roomLeft) {
					ret[dim] = alignedLeft;
				} else if (roomLeft) {
					ret[dim] = alignedLeft;
				} else if (roomRight) {
					ret[dim] = alignedRight;
				} else {
					return false;
				}
			},
			/**
			 * Handle the secondary dimension. If the preferred dimension is tooltip
			 * on top or bottom of the point, the second dimension is to align the tooltip
			 * above the point, trying to align center but allowing left or right
			 * align within the chart box.
			 */
			secondDimension = function (dim, outerSize, innerSize, point) {
				// Too close to the edge, return false and swap dimensions
				if (point < distance || point > outerSize - distance) {
					return false;

				// Align left/top
				} else if (point < innerSize / 2) {
					ret[dim] = 1;
				// Align right/bottom
				} else if (point > outerSize - innerSize / 2) {
					ret[dim] = outerSize - innerSize - 2;
				// Align center
				} else {
					ret[dim] = point - innerSize / 2;
				}
			},
			/**
			 * Swap the dimensions
			 */
			swap = function (count) {
				var temp = first;
				first = second;
				second = temp;
				swapped = count;
			},
			run = function () {
				if (firstDimension.apply(0, first) !== false) {
					if (secondDimension.apply(0, second) === false && !swapped) {
						swap(true);
						run();
					}
				} else if (!swapped) {
					swap(true);
					run();
				} else {
					ret.x = ret.y = 0;
				}
			};

		// Under these conditions, prefer the tooltip on the side of the point
		if (chart.inverted || this.len > 1) {
			swap();
		}
		run();

		return ret;

	},

	/**
	 * In case no user defined formatter is given, this will be used. Note that the context
	 * here is an object holding point, series, x, y etc.
	 */
	defaultFormatter: function (tooltip) {
		var items = this.points || splat(this),
			series = items[0].series,
			s;

		// build the header
		s = [tooltip.tooltipHeaderFormatter(items[0])];

		// build the values
		each(items, function (item) {
			series = item.series;
			s.push((series.tooltipFormatter && series.tooltipFormatter(item)) ||
				item.point.tooltipFormatter(series.tooltipOptions.pointFormat));
		});

		// footer
		s.push(tooltip.options.footerFormat || '');

		return s.join('');
	},

	/**
	 * Refresh the tooltip's text and position.
	 * @param {Object} point
	 */
	refresh: function (point, mouseEvent) {
		var tooltip = this,
			chart = tooltip.chart,
			label = tooltip.label,
			options = tooltip.options,
			x,
			y,
			anchor,
			textConfig = {},
			text,
			pointConfig = [],
			formatter = options.formatter || tooltip.defaultFormatter,
			hoverPoints = chart.hoverPoints,
			borderColor,
			shared = tooltip.shared,
			currentSeries;

		clearTimeout(this.hideTimer);

		// get the reference point coordinates (pie charts use tooltipPos)
		tooltip.followPointer = splat(point)[0].series.tooltipOptions.followPointer;
		anchor = tooltip.getAnchor(point, mouseEvent);
		x = anchor[0];
		y = anchor[1];

		// shared tooltip, array is sent over
		if (shared && !(point.series && point.series.noSharedTooltip)) {

			// hide previous hoverPoints and set new

			chart.hoverPoints = point;
			if (hoverPoints) {
				each(hoverPoints, function (point) {
					point.setState();
				});
			}

			each(point, function (item) {
				item.setState(HOVER_STATE);

				pointConfig.push(item.getLabelConfig());
			});

			textConfig = {
				x: point[0].category,
				y: point[0].y
			};
			textConfig.points = pointConfig;
			this.len = pointConfig.length;
			point = point[0];

		// single point tooltip
		} else {
			textConfig = point.getLabelConfig();
		}
		text = formatter.call(textConfig, tooltip);

		// register the current series
		currentSeries = point.series;
		this.distance = pick(currentSeries.tooltipOptions.distance, 16);

		// update the inner HTML
		if (text === false) {
			this.hide();
		} else {

			// show it
			if (tooltip.isHidden) {
				stop(label);
				label.attr('opacity', 1).show();
			}

			// update text
			label.attr({
				text: text
			});

			// set the stroke color of the box
			borderColor = options.borderColor || point.color || currentSeries.color || '#606060';
			label.attr({
				stroke: borderColor
			});

			tooltip.updatePosition({ plotX: x, plotY: y, negative: point.negative, ttBelow: point.ttBelow });

			this.isHidden = false;
		}
		fireEvent(chart, 'tooltipRefresh', {
				text: text,
				x: x + chart.plotLeft,
				y: y + chart.plotTop,
				borderColor: borderColor
			});
	},

	/**
	 * Find the new position and perform the move
	 */
	updatePosition: function (point) {
		var chart = this.chart,
			label = this.label,
			pos = (this.options.positioner || this.getPosition).call(
				this,
				label.width,
				label.height,
				point
			);

		// do the move
		this.move(
			mathRound(pos.x),
			mathRound(pos.y),
			point.plotX + chart.plotLeft,
			point.plotY + chart.plotTop
		);
	},


	/**
	 * Format the header of the tooltip
	 */
	tooltipHeaderFormatter: function (point) {
		var series = point.series,
			tooltipOptions = series.tooltipOptions,
			dateTimeLabelFormats = tooltipOptions.dateTimeLabelFormats,
			xDateFormat = tooltipOptions.xDateFormat,
			xAxis = series.xAxis,
			isDateTime = xAxis && xAxis.options.type === 'datetime' && isNumber(point.key),
			headerFormat = tooltipOptions.headerFormat,
			closestPointRange = xAxis && xAxis.closestPointRange,
			n;

		// Guess the best date format based on the closest point distance (#568)
		if (isDateTime && !xDateFormat) {
			if (closestPointRange) {
				for (n in timeUnits) {
					if (timeUnits[n] >= closestPointRange ||
							// If the point is placed every day at 23:59, we need to show
							// the minutes as well. This logic only works for time units less than
							// a day, since all higher time units are dividable by those. #2637.
							(timeUnits[n] <= timeUnits.day && point.key % timeUnits[n] > 0)) {
						xDateFormat = dateTimeLabelFormats[n];
						break;
					}
				}
			} else {
				xDateFormat = dateTimeLabelFormats.day;
			}

			xDateFormat = xDateFormat || dateTimeLabelFormats.year; // #2546, 2581

		}

		// Insert the header date format if any
		if (isDateTime && xDateFormat) {
			headerFormat = headerFormat.replace('{point.key}', '{point.key:' + xDateFormat + '}');
		}

		return format(headerFormat, {
			point: point,
			series: series
		});
	}
};

var hoverChartIndex;

// Global flag for touch support
hasTouch = doc.documentElement.ontouchstart !== UNDEFINED;

/**
 * The mouse tracker object. All methods starting with "on" are primary DOM event handlers.
 * Subsequent methods should be named differently from what they are doing.
 * @param {Object} chart The Chart instance
 * @param {Object} options The root options object
 */
var Pointer = Highcharts.Pointer = function (chart, options) {
	this.init(chart, options);
};

Pointer.prototype = {
	/**
	 * Initialize Pointer
	 */
	init: function (chart, options) {

		var chartOptions = options.chart,
			chartEvents = chartOptions.events,
			zoomType = useCanVG ? '' : chartOptions.zoomType,
			inverted = chart.inverted,
			zoomX,
			zoomY;

		// Store references
		this.options = options;
		this.chart = chart;

		// Zoom status
		this.zoomX = zoomX = /x/.test(zoomType);
		this.zoomY = zoomY = /y/.test(zoomType);
		this.zoomHor = (zoomX && !inverted) || (zoomY && inverted);
		this.zoomVert = (zoomY && !inverted) || (zoomX && inverted);
		this.hasZoom = zoomX || zoomY;

		// Do we need to handle click on a touch device?
		this.runChartClick = chartEvents && !!chartEvents.click;

		this.pinchDown = [];
		this.lastValidTouch = {};

		if (Highcharts.Tooltip && options.tooltip.enabled) {
			chart.tooltip = new Tooltip(chart, options.tooltip);
			this.followTouchMove = options.tooltip.followTouchMove;
		}

		this.setDOMEvents();
	},

	/**
	 * Add crossbrowser support for chartX and chartY
	 * @param {Object} e The event object in standard browsers
	 */
	normalize: function (e, chartPosition) {
		var chartX,
			chartY,
			ePos;

		// common IE normalizing
		e = e || window.event;

		// Framework specific normalizing (#1165)
		e = washMouseEvent(e);

		// More IE normalizing, needs to go after washMouseEvent
		if (!e.target) {
			e.target = e.srcElement;
		}

		// iOS (#2757)
		ePos = e.touches ?  (e.touches.length ? e.touches.item(0) : e.changedTouches[0]) : e;

		// Get mouse position
		if (!chartPosition) {
			this.chartPosition = chartPosition = offset(this.chart.container);
		}

		// chartX and chartY
		if (ePos.pageX === UNDEFINED) { // IE < 9. #886.
			chartX = mathMax(e.x, e.clientX - chartPosition.left); // #2005, #2129: the second case is
				// for IE10 quirks mode within framesets
			chartY = e.y;
		} else {
			chartX = ePos.pageX - chartPosition.left;
			chartY = ePos.pageY - chartPosition.top;
		}

		return extend(e, {
			chartX: mathRound(chartX),
			chartY: mathRound(chartY)
		});
	},

	/**
	 * Get the click position in terms of axis values.
	 *
	 * @param {Object} e A pointer event
	 */
	getCoordinates: function (e) {
		var coordinates = {
				xAxis: [],
				yAxis: []
			};

		each(this.chart.axes, function (axis) {
			coordinates[axis.isXAxis ? 'xAxis' : 'yAxis'].push({
				axis: axis,
				value: axis.toValue(e[axis.horiz ? 'chartX' : 'chartY'])
			});
		});
		return coordinates;
	},

	/**
	 * Return the index in the tooltipPoints array, corresponding to pixel position in
	 * the plot area.
	 */
	getIndex: function (e) {
		var chart = this.chart;
		return chart.inverted ?
			chart.plotHeight + chart.plotTop - e.chartY :
			e.chartX - chart.plotLeft;
	},

	/**
	 * With line type charts with a single tracker, get the point closest to the mouse.
	 * Run Point.onMouseOver and display tooltip for the point or points.
	 */
	runPointActions: function (e) {
		var pointer = this,
			chart = pointer.chart,
			series = chart.series,
			tooltip = chart.tooltip,
			followPointer,
			point,
			points,
			hoverPoint = chart.hoverPoint,
			hoverSeries = chart.hoverSeries,
			i,
			j,
			distance = chart.chartWidth,
			index = pointer.getIndex(e),
			anchor;

		// shared tooltip
		if (tooltip && pointer.options.tooltip.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
			points = [];

			// loop over all series and find the ones with points closest to the mouse
			i = series.length;
			for (j = 0; j < i; j++) {
				if (series[j].visible &&
						series[j].options.enableMouseTracking !== false &&
						!series[j].noSharedTooltip && series[j].singularTooltips !== true && series[j].tooltipPoints.length) {
					point = series[j].tooltipPoints[index];
					if (point && point.series) { // not a dummy point, #1544
						point._dist = mathAbs(index - point.clientX);
						distance = mathMin(distance, point._dist);
						points.push(point);
					}
				}
			}
			// remove furthest points
			i = points.length;
			while (i--) {
				if (points[i]._dist > distance) {
					points.splice(i, 1);
				}
			}
			// refresh the tooltip if necessary
			if (points.length && (points[0].clientX !== pointer.hoverX)) {
				tooltip.refresh(points, e);
				pointer.hoverX = points[0].clientX;
			}
		}

		// Separate tooltip and general mouse events
		followPointer = hoverSeries && hoverSeries.tooltipOptions.followPointer;
		if (hoverSeries && hoverSeries.tracker && !followPointer) { // #2584, #2830

			// get the point
			point = hoverSeries.tooltipPoints[index];

			// a new point is hovered, refresh the tooltip
			if (point && point !== hoverPoint) {

				// trigger the events
				point.onMouseOver(e);

			}

		} else if (tooltip && followPointer && !tooltip.isHidden) {
			anchor = tooltip.getAnchor([{}], e);
			tooltip.updatePosition({ plotX: anchor[0], plotY: anchor[1] });
		}

		// Start the event listener to pick up the tooltip
		if (tooltip && !pointer._onDocumentMouseMove) {
			pointer._onDocumentMouseMove = function (e) {
				if (charts[hoverChartIndex]) {
					charts[hoverChartIndex].pointer.onDocumentMouseMove(e);
				}
			};
			addEvent(doc, 'mousemove', pointer._onDocumentMouseMove);
		}

		// Draw independent crosshairs
		each(chart.axes, function (axis) {
			axis.drawCrosshair(e, pick(point, hoverPoint));
		});
	},



	/**
	 * Reset the tracking by hiding the tooltip, the hover series state and the hover point
	 *
	 * @param allowMove {Boolean} Instead of destroying the tooltip altogether, allow moving it if possible
	 */
	reset: function (allowMove, delay) {
		var pointer = this,
			chart = pointer.chart,
			hoverSeries = chart.hoverSeries,
			hoverPoint = chart.hoverPoint,
			tooltip = chart.tooltip,
			tooltipPoints = tooltip && tooltip.shared ? chart.hoverPoints : hoverPoint;

		// Narrow in allowMove
		allowMove = allowMove && tooltip && tooltipPoints;

		// Check if the points have moved outside the plot area, #1003
		if (allowMove && splat(tooltipPoints)[0].plotX === UNDEFINED) {
			allowMove = false;
		}

		// Just move the tooltip, #349
		if (allowMove) {
			tooltip.refresh(tooltipPoints);
			if (hoverPoint) { // #2500
				hoverPoint.setState(hoverPoint.state, true);
			}

		// Full reset
		} else {

			if (hoverPoint) {
				hoverPoint.onMouseOut();
			}

			if (hoverSeries) {
				hoverSeries.onMouseOut();
			}

			if (tooltip) {
				tooltip.hide(delay);
			}

			if (pointer._onDocumentMouseMove) {
				removeEvent(doc, 'mousemove', pointer._onDocumentMouseMove);
				pointer._onDocumentMouseMove = null;
			}

			// Remove crosshairs
			each(chart.axes, function (axis) {
				axis.hideCrosshair();
			});

			pointer.hoverX = null;

		}
	},

	/**
	 * Scale series groups to a certain scale and translation
	 */
	scaleGroups: function (attribs, clip) {

		var chart = this.chart,
			seriesAttribs;

		// Scale each series
		each(chart.series, function (series) {
			seriesAttribs = attribs || series.getPlotBox(); // #1701
			if (series.xAxis && series.xAxis.zoomEnabled) {
				series.group.attr(seriesAttribs);
				if (series.markerGroup) {
					series.markerGroup.attr(seriesAttribs);
					series.markerGroup.clip(clip ? chart.clipRect : null);
				}
				if (series.dataLabelsGroup) {
					series.dataLabelsGroup.attr(seriesAttribs);
				}
			}
		});

		// Clip
		chart.clipRect.attr(clip || chart.clipBox);
	},

	/**
	 * Start a drag operation
	 */
	dragStart: function (e) {
		var chart = this.chart;

		// Record the start position
		chart.mouseIsDown = e.type;
		chart.cancelClick = false;
		chart.mouseDownX = this.mouseDownX = e.chartX;
		chart.mouseDownY = this.mouseDownY = e.chartY;
	},

	/**
	 * Perform a drag operation in response to a mousemove event while the mouse is down
	 */
	drag: function (e) {

		var chart = this.chart,
			chartOptions = chart.options.chart,
			chartX = e.chartX,
			chartY = e.chartY,
			zoomHor = this.zoomHor,
			zoomVert = this.zoomVert,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			clickedInside,
			size,
			mouseDownX = this.mouseDownX,
			mouseDownY = this.mouseDownY,
			panKey = chartOptions.panKey && e[chartOptions.panKey + 'Key'];

		// If the mouse is outside the plot area, adjust to cooordinates
		// inside to prevent the selection marker from going outside
		if (chartX < plotLeft) {
			chartX = plotLeft;
		} else if (chartX > plotLeft + plotWidth) {
			chartX = plotLeft + plotWidth;
		}

		if (chartY < plotTop) {
			chartY = plotTop;
		} else if (chartY > plotTop + plotHeight) {
			chartY = plotTop + plotHeight;
		}

		// determine if the mouse has moved more than 10px
		this.hasDragged = Math.sqrt(
			Math.pow(mouseDownX - chartX, 2) +
			Math.pow(mouseDownY - chartY, 2)
		);

		if (this.hasDragged > 10) {
			clickedInside = chart.isInsidePlot(mouseDownX - plotLeft, mouseDownY - plotTop);

			// make a selection
			if (chart.hasCartesianSeries && (this.zoomX || this.zoomY) && clickedInside && !panKey) {
				if (!this.selectionMarker) {
					this.selectionMarker = chart.renderer.rect(
						plotLeft,
						plotTop,
						zoomHor ? 1 : plotWidth,
						zoomVert ? 1 : plotHeight,
						0
					)
					.attr({
						fill: chartOptions.selectionMarkerFill || 'rgba(69,114,167,0.25)',
						zIndex: 7
					})
					.add();
				}
			}

			// adjust the width of the selection marker
			if (this.selectionMarker && zoomHor) {
				size = chartX - mouseDownX;
				this.selectionMarker.attr({
					width: mathAbs(size),
					x: (size > 0 ? 0 : size) + mouseDownX
				});
			}
			// adjust the height of the selection marker
			if (this.selectionMarker && zoomVert) {
				size = chartY - mouseDownY;
				this.selectionMarker.attr({
					height: mathAbs(size),
					y: (size > 0 ? 0 : size) + mouseDownY
				});
			}

			// panning
			if (clickedInside && !this.selectionMarker && chartOptions.panning) {
				chart.pan(e, chartOptions.panning);
			}
		}
	},

	/**
	 * On mouse up or touch end across the entire document, drop the selection.
	 */
	drop: function (e) {
		var chart = this.chart,
			hasPinched = this.hasPinched;

		if (this.selectionMarker) {
			var selectionData = {
					xAxis: [],
					yAxis: [],
					originalEvent: e.originalEvent || e
				},
				selectionBox = this.selectionMarker,
				selectionLeft = selectionBox.attr ? selectionBox.attr('x') : selectionBox.x,
				selectionTop = selectionBox.attr ? selectionBox.attr('y') : selectionBox.y,
				selectionWidth = selectionBox.attr ? selectionBox.attr('width') : selectionBox.width,
				selectionHeight = selectionBox.attr ? selectionBox.attr('height') : selectionBox.height,
				runZoom;

			// a selection has been made
			if (this.hasDragged || hasPinched) {

				// record each axis' min and max
				each(chart.axes, function (axis) {
					if (axis.zoomEnabled) {
						var horiz = axis.horiz,
							minPixelPadding = e.type === 'touchend' ? axis.minPixelPadding: 0, // #1207, #3075
							selectionMin = axis.toValue((horiz ? selectionLeft : selectionTop) + minPixelPadding),
							selectionMax = axis.toValue((horiz ? selectionLeft + selectionWidth : selectionTop + selectionHeight) - minPixelPadding);

						if (!isNaN(selectionMin) && !isNaN(selectionMax)) { // #859
							selectionData[axis.coll].push({
								axis: axis,
								min: mathMin(selectionMin, selectionMax), // for reversed axes,
								max: mathMax(selectionMin, selectionMax)
							});
							runZoom = true;
						}
					}
				});
				if (runZoom) {
					fireEvent(chart, 'selection', selectionData, function (args) {
						chart.zoom(extend(args, hasPinched ? { animation: false } : null));
					});
				}

			}
			this.selectionMarker = this.selectionMarker.destroy();

			// Reset scaling preview
			if (hasPinched) {
				this.scaleGroups();
			}
		}

		// Reset all
		if (chart) { // it may be destroyed on mouse up - #877
			css(chart.container, { cursor: chart._cursor });
			chart.cancelClick = this.hasDragged > 10; // #370
			chart.mouseIsDown = this.hasDragged = this.hasPinched = false;
			this.pinchDown = [];
		}
	},

	onContainerMouseDown: function (e) {

		e = this.normalize(e);

		// issue #295, dragging not always working in Firefox
		if (e.preventDefault) {
			e.preventDefault();
		}

		this.dragStart(e);
	},



	onDocumentMouseUp: function (e) {
		if (charts[hoverChartIndex]) {
			charts[hoverChartIndex].pointer.drop(e);
		}
	},

	/**
	 * Special handler for mouse move that will hide the tooltip when the mouse leaves the plotarea.
	 * Issue #149 workaround. The mouseleave event does not always fire.
	 */
	onDocumentMouseMove: function (e) {
		var chart = this.chart,
			chartPosition = this.chartPosition,
			hoverSeries = chart.hoverSeries;

		e = this.normalize(e, chartPosition);

		// If we're outside, hide the tooltip
		if (chartPosition && hoverSeries && !this.inClass(e.target, 'highcharts-tracker') &&
				!chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop)) {
			this.reset();
		}
	},

	/**
	 * When mouse leaves the container, hide the tooltip.
	 */
	onContainerMouseLeave: function () {
		var chart = charts[hoverChartIndex];
		if (chart) {
			chart.pointer.reset();
			chart.pointer.chartPosition = null; // also reset the chart position, used in #149 fix
		}
	},

	// The mousemove, touchmove and touchstart event handler
	onContainerMouseMove: function (e) {

		var chart = this.chart;

		hoverChartIndex = chart.index;

		e = this.normalize(e);
		e.returnValue = false; // #2251, #3224

		if (chart.mouseIsDown === 'mousedown') {
			this.drag(e);
		}

		// Show the tooltip and run mouse over events (#977)
		if ((this.inClass(e.target, 'highcharts-tracker') ||
				chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop)) && !chart.openMenu) {
			this.runPointActions(e);
		}
	},

	/**
	 * Utility to detect whether an element has, or has a parent with, a specific
	 * class name. Used on detection of tracker objects and on deciding whether
	 * hovering the tooltip should cause the active series to mouse out.
	 */
	inClass: function (element, className) {
		var elemClassName;
		while (element) {
			elemClassName = attr(element, 'class');
			if (elemClassName) {
				if (elemClassName.indexOf(className) !== -1) {
					return true;
				} else if (elemClassName.indexOf(PREFIX + 'container') !== -1) {
					return false;
				}
			}
			element = element.parentNode;
		}
	},

	onTrackerMouseOut: function (e) {
		var series = this.chart.hoverSeries,
			relatedTarget = e.relatedTarget || e.toElement,
			relatedSeries = relatedTarget && relatedTarget.point && relatedTarget.point.series; // #2499

		if (series && !series.options.stickyTracking && !this.inClass(relatedTarget, PREFIX + 'tooltip') &&
				relatedSeries !== series) {
			series.onMouseOut();
		}
	},

	onContainerClick: function (e) {
		var chart = this.chart,
			hoverPoint = chart.hoverPoint,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop;

		e = this.normalize(e);
		e.cancelBubble = true; // IE specific

		if (!chart.cancelClick) {

			// On tracker click, fire the series and point events. #783, #1583
			if (hoverPoint && this.inClass(e.target, PREFIX + 'tracker')) {

				// the series click event
				fireEvent(hoverPoint.series, 'click', extend(e, {
					point: hoverPoint
				}));

				// the point click event
				if (chart.hoverPoint) { // it may be destroyed (#1844)
					hoverPoint.firePointEvent('click', e);
				}

			// When clicking outside a tracker, fire a chart event
			} else {
				extend(e, this.getCoordinates(e));

				// fire a click event in the chart
				if (chart.isInsidePlot(e.chartX - plotLeft, e.chartY - plotTop)) {
					fireEvent(chart, 'click', e);
				}
			}


		}
	},

	/**
	 * Set the JS DOM events on the container and document. This method should contain
	 * a one-to-one assignment between methods and their handlers. Any advanced logic should
	 * be moved to the handler reflecting the event's name.
	 */
	setDOMEvents: function () {

		var pointer = this,
			container = pointer.chart.container;

		container.onmousedown = function (e) {
			pointer.onContainerMouseDown(e);
		};
		container.onmousemove = function (e) {
			pointer.onContainerMouseMove(e);
		};
		container.onclick = function (e) {
			pointer.onContainerClick(e);
		};
		addEvent(container, 'mouseleave', pointer.onContainerMouseLeave);
		if (chartCount === 1) {
			addEvent(doc, 'mouseup', pointer.onDocumentMouseUp);
		}
		if (hasTouch) {
			container.ontouchstart = function (e) {
				pointer.onContainerTouchStart(e);
			};
			container.ontouchmove = function (e) {
				pointer.onContainerTouchMove(e);
			};
			if (chartCount === 1) {
				addEvent(doc, 'touchend', pointer.onDocumentTouchEnd);
			}
		}

	},

	/**
	 * Destroys the Pointer object and disconnects DOM events.
	 */
	destroy: function () {
		var prop;

		removeEvent(this.chart.container, 'mouseleave', this.onContainerMouseLeave);
		if (!chartCount) {
			removeEvent(doc, 'mouseup', this.onDocumentMouseUp);
			removeEvent(doc, 'touchend', this.onDocumentTouchEnd);
		}

		// memory and CPU leak
		clearInterval(this.tooltipTimeout);

		for (prop in this) {
			this[prop] = null;
		}
	}
};


/* Support for touch devices */
extend(Highcharts.Pointer.prototype, {

	/**
	 * Run translation operations
	 */
	pinchTranslate: function (pinchDown, touches, transform, selectionMarker, clip, lastValidTouch) {
		if (this.zoomHor || this.pinchHor) {
			this.pinchTranslateDirection(true, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);
		}
		if (this.zoomVert || this.pinchVert) {
			this.pinchTranslateDirection(false, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);
		}
	},

	/**
	 * Run translation operations for each direction (horizontal and vertical) independently
	 */
	pinchTranslateDirection: function (horiz, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch, forcedScale) {
		var chart = this.chart,
			xy = horiz ? 'x' : 'y',
			XY = horiz ? 'X' : 'Y',
			sChartXY = 'chart' + XY,
			wh = horiz ? 'width' : 'height',
			plotLeftTop = chart['plot' + (horiz ? 'Left' : 'Top')],
			selectionWH,
			selectionXY,
			clipXY,
			scale = forcedScale || 1,
			inverted = chart.inverted,
			bounds = chart.bounds[horiz ? 'h' : 'v'],
			singleTouch = pinchDown.length === 1,
			touch0Start = pinchDown[0][sChartXY],
			touch0Now = touches[0][sChartXY],
			touch1Start = !singleTouch && pinchDown[1][sChartXY],
			touch1Now = !singleTouch && touches[1][sChartXY],
			outOfBounds,
			transformScale,
			scaleKey,
			setScale = function () {
				if (!singleTouch && mathAbs(touch0Start - touch1Start) > 20) { // Don't zoom if fingers are too close on this axis
					scale = forcedScale || mathAbs(touch0Now - touch1Now) / mathAbs(touch0Start - touch1Start);
				}

				clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;
				selectionWH = chart['plot' + (horiz ? 'Width' : 'Height')] / scale;
			};

		// Set the scale, first pass
		setScale();

		selectionXY = clipXY; // the clip position (x or y) is altered if out of bounds, the selection position is not

		// Out of bounds
		if (selectionXY < bounds.min) {
			selectionXY = bounds.min;
			outOfBounds = true;
		} else if (selectionXY + selectionWH > bounds.max) {
			selectionXY = bounds.max - selectionWH;
			outOfBounds = true;
		}

		// Is the chart dragged off its bounds, determined by dataMin and dataMax?
		if (outOfBounds) {

			// Modify the touchNow position in order to create an elastic drag movement. This indicates
			// to the user that the chart is responsive but can't be dragged further.
			touch0Now -= 0.8 * (touch0Now - lastValidTouch[xy][0]);
			if (!singleTouch) {
				touch1Now -= 0.8 * (touch1Now - lastValidTouch[xy][1]);
			}

			// Set the scale, second pass to adapt to the modified touchNow positions
			setScale();

		} else {
			lastValidTouch[xy] = [touch0Now, touch1Now];
		}

		// Set geometry for clipping, selection and transformation
		if (!inverted) { // TODO: implement clipping for inverted charts
			clip[xy] = clipXY - plotLeftTop;
			clip[wh] = selectionWH;
		}
		scaleKey = inverted ? (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;
		transformScale = inverted ? 1 / scale : scale;

		selectionMarker[wh] = selectionWH;
		selectionMarker[xy] = selectionXY;
		transform[scaleKey] = scale;
		transform['translate' + XY] = (transformScale * plotLeftTop) + (touch0Now - (transformScale * touch0Start));
	},

	/**
	 * Handle touch events with two touches
	 */
	pinch: function (e) {

		var self = this,
			chart = self.chart,
			pinchDown = self.pinchDown,
			followTouchMove = self.followTouchMove,
			touches = e.touches,
			touchesLength = touches.length,
			lastValidTouch = self.lastValidTouch,
			hasZoom = self.hasZoom,
			selectionMarker = self.selectionMarker,
			transform = {},
			fireClickEvent = touchesLength === 1 && ((self.inClass(e.target, PREFIX + 'tracker') &&
				chart.runTrackerClick) || self.runChartClick),
			clip = {};

		// On touch devices, only proceed to trigger click if a handler is defined
		if ((hasZoom || followTouchMove) && !fireClickEvent) {
			e.preventDefault();
		}

		// Normalize each touch
		map(touches, function (e) {
			return self.normalize(e);
		});

		// Register the touch start position
		if (e.type === 'touchstart') {
			each(touches, function (e, i) {
				pinchDown[i] = { chartX: e.chartX, chartY: e.chartY };
			});
			lastValidTouch.x = [pinchDown[0].chartX, pinchDown[1] && pinchDown[1].chartX];
			lastValidTouch.y = [pinchDown[0].chartY, pinchDown[1] && pinchDown[1].chartY];

			// Identify the data bounds in pixels
			each(chart.axes, function (axis) {
				if (axis.zoomEnabled) {
					var bounds = chart.bounds[axis.horiz ? 'h' : 'v'],
						minPixelPadding = axis.minPixelPadding,
						min = axis.toPixels(pick(axis.options.min, axis.dataMin)),
						max = axis.toPixels(pick(axis.options.max, axis.dataMax)),
						absMin = mathMin(min, max),
						absMax = mathMax(min, max);

					// Store the bounds for use in the touchmove handler
					bounds.min = mathMin(axis.pos, absMin - minPixelPadding);
					bounds.max = mathMax(axis.pos + axis.len, absMax + minPixelPadding);
				}
			});
			self.res = true; // reset on next move

		// Event type is touchmove, handle panning and pinching
		} else if (pinchDown.length) { // can be 0 when releasing, if touchend fires first


			// Set the marker
			if (!selectionMarker) {
				self.selectionMarker = selectionMarker = extend({
					destroy: noop
				}, chart.plotBox);
			}

			self.pinchTranslate(pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);

			self.hasPinched = hasZoom;

			// Scale and translate the groups to provide visual feedback during pinching
			self.scaleGroups(transform, clip);

			// Optionally move the tooltip on touchmove
			if (!hasZoom && followTouchMove && touchesLength === 1) {
				this.runPointActions(self.normalize(e));
			} else if (self.res) {
				self.res = false;
				this.reset(false, 0);
			}
		}
	},

	onContainerTouchStart: function (e) {
		var chart = this.chart;

		hoverChartIndex = chart.index;

		if (e.touches.length === 1) {

			e = this.normalize(e);

			if (chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop)) {

				// Run mouse events and display tooltip etc
				this.runPointActions(e);

				this.pinch(e);

			} else {
				// Hide the tooltip on touching outside the plot area (#1203)
				this.reset();
			}

		} else if (e.touches.length === 2) {
			this.pinch(e);
		}
	},

	onContainerTouchMove: function (e) {
		if (e.touches.length === 1 || e.touches.length === 2) {
			this.pinch(e);
		}
	},

	onDocumentTouchEnd: function (e) {
		if (charts[hoverChartIndex]) {
			charts[hoverChartIndex].pointer.drop(e);
		}
	}

});
if (win.PointerEvent || win.MSPointerEvent) {

	// The touches object keeps track of the points being touched at all times
	var touches = {},
		hasPointerEvent = !!win.PointerEvent,
		getWebkitTouches = function () {
			var key, fake = [];
			fake.item = function (i) { return this[i]; };
			for (key in touches) {
				if (touches.hasOwnProperty(key)) {
					fake.push({
						pageX: touches[key].pageX,
						pageY: touches[key].pageY,
						target: touches[key].target
					});
				}
			}
			return fake;
		},
		translateMSPointer = function (e, method, wktype, callback) {
			var p;
			e = e.originalEvent || e;
			if ((e.pointerType === 'touch' || e.pointerType === e.MSPOINTER_TYPE_TOUCH) && charts[hoverChartIndex]) {
				callback(e);
				p = charts[hoverChartIndex].pointer;
				p[method]({
					type: wktype,
					target: e.currentTarget,
					preventDefault: noop,
					touches: getWebkitTouches()
				});
			}
		};

	/**
	 * Extend the Pointer prototype with methods for each event handler and more
	 */
	extend(Pointer.prototype, {
		onContainerPointerDown: function (e) {
			translateMSPointer(e, 'onContainerTouchStart', 'touchstart', function (e) {
				touches[e.pointerId] = { pageX: e.pageX, pageY: e.pageY, target: e.currentTarget };
			});
		},
		onContainerPointerMove: function (e) {
			translateMSPointer(e, 'onContainerTouchMove', 'touchmove', function (e) {
				touches[e.pointerId] = { pageX: e.pageX, pageY: e.pageY };
				if (!touches[e.pointerId].target) {
					touches[e.pointerId].target = e.currentTarget;
				}
			});
		},
		onDocumentPointerUp: function (e) {
			translateMSPointer(e, 'onContainerTouchEnd', 'touchend', function (e) {
				delete touches[e.pointerId];
			});
		},

		/**
		 * Add or remove the MS Pointer specific events
		 */
		batchMSEvents: function (fn) {
			fn(this.chart.container, hasPointerEvent ? 'pointerdown' : 'MSPointerDown', this.onContainerPointerDown);
			fn(this.chart.container, hasPointerEvent ? 'pointermove' : 'MSPointerMove', this.onContainerPointerMove);
			fn(doc, hasPointerEvent ? 'pointerup' : 'MSPointerUp', this.onDocumentPointerUp);
		}
	});

	// Disable default IE actions for pinch and such on chart element
	wrap(Pointer.prototype, 'init', function (proceed, chart, options) {
		proceed.call(this, chart, options);
		if (this.hasZoom || this.followTouchMove) {
			css(chart.container, {
				'-ms-touch-action': NONE,
				'touch-action': NONE
			});
		}
	});

	// Add IE specific touch events to chart
	wrap(Pointer.prototype, 'setDOMEvents', function (proceed) {
		proceed.apply(this);
		if (this.hasZoom || this.followTouchMove) {
			this.batchMSEvents(addEvent);
		}
	});
	// Destroy MS events also
	wrap(Pointer.prototype, 'destroy', function (proceed) {
		this.batchMSEvents(removeEvent);
		proceed.call(this);
	});
}
/**
 * The overview of the chart's series
 */
var Legend = Highcharts.Legend = function (chart, options) {
	this.init(chart, options);
};

Legend.prototype = {

	/**
	 * Initialize the legend
	 */
	init: function (chart, options) {

		var legend = this,
			itemStyle = options.itemStyle,
			padding = pick(options.padding, 8),
			itemMarginTop = options.itemMarginTop || 0;

		this.options = options;

		if (!options.enabled) {
			return;
		}

		legend.itemStyle = itemStyle;
		legend.itemHiddenStyle = merge(itemStyle, options.itemHiddenStyle);
		legend.itemMarginTop = itemMarginTop;
		legend.padding = padding;
		legend.initialItemX = padding;
		legend.initialItemY = padding - 5; // 5 is the number of pixels above the text
		legend.maxItemWidth = 0;
		legend.chart = chart;
		legend.itemHeight = 0;
		legend.lastLineHeight = 0;
		legend.symbolWidth = pick(options.symbolWidth, 16);
		legend.pages = [];


		// Render it
		legend.render();

		// move checkboxes
		addEvent(legend.chart, 'endResize', function () {
			legend.positionCheckboxes();
		});

	},

	/**
	 * Set the colors for the legend item
	 * @param {Object} item A Series or Point instance
	 * @param {Object} visible Dimmed or colored
	 */
	colorizeItem: function (item, visible) {
		var legend = this,
			options = legend.options,
			legendItem = item.legendItem,
			legendLine = item.legendLine,
			legendSymbol = item.legendSymbol,
			hiddenColor = legend.itemHiddenStyle.color,
			textColor = visible ? options.itemStyle.color : hiddenColor,
			symbolColor = visible ? (item.legendColor || item.color || '#CCC') : hiddenColor,
			markerOptions = item.options && item.options.marker,
			symbolAttr = { fill: symbolColor },
			key,
			val;

		if (legendItem) {
			legendItem.css({ fill: textColor, color: textColor }); // color for #1553, oldIE
		}
		if (legendLine) {
			legendLine.attr({ stroke: symbolColor });
		}

		if (legendSymbol) {

			// Apply marker options
			if (markerOptions && legendSymbol.isMarker) { // #585
				symbolAttr.stroke = symbolColor;
				markerOptions = item.convertAttribs(markerOptions);
				for (key in markerOptions) {
					val = markerOptions[key];
					if (val !== UNDEFINED) {
						symbolAttr[key] = val;
					}
				}
			}

			legendSymbol.attr(symbolAttr);
		}
	},

	/**
	 * Position the legend item
	 * @param {Object} item A Series or Point instance
	 */
	positionItem: function (item) {
		var legend = this,
			options = legend.options,
			symbolPadding = options.symbolPadding,
			ltr = !options.rtl,
			legendItemPos = item._legendItemPos,
			itemX = legendItemPos[0],
			itemY = legendItemPos[1],
			checkbox = item.checkbox;

		if (item.legendGroup) {
			item.legendGroup.translate(
				ltr ? itemX : legend.legendWidth - itemX - 2 * symbolPadding - 4,
				itemY
			);
		}

		if (checkbox) {
			checkbox.x = itemX;
			checkbox.y = itemY;
		}
	},

	/**
	 * Destroy a single legend item
	 * @param {Object} item The series or point
	 */
	destroyItem: function (item) {
		var checkbox = item.checkbox;

		// destroy SVG elements
		each(['legendItem', 'legendLine', 'legendSymbol', 'legendGroup'], function (key) {
			if (item[key]) {
				item[key] = item[key].destroy();
			}
		});

		if (checkbox) {
			discardElement(item.checkbox);
		}
	},

	/**
	 * Destroys the legend.
	 */
	destroy: function () {
		var legend = this,
			legendGroup = legend.group,
			box = legend.box;

		if (box) {
			legend.box = box.destroy();
		}

		if (legendGroup) {
			legend.group = legendGroup.destroy();
		}
	},

	/**
	 * Position the checkboxes after the width is determined
	 */
	positionCheckboxes: function (scrollOffset) {
		var alignAttr = this.group.alignAttr,
			translateY,
			clipHeight = this.clipHeight || this.legendHeight;

		if (alignAttr) {
			translateY = alignAttr.translateY;
			each(this.allItems, function (item) {
				var checkbox = item.checkbox,
					top;

				if (checkbox) {
					top = (translateY + checkbox.y + (scrollOffset || 0) + 3);
					css(checkbox, {
						left: (alignAttr.translateX + item.checkboxOffset + checkbox.x - 20) + PX,
						top: top + PX,
						display: top > translateY - 6 && top < translateY + clipHeight - 6 ? '' : NONE
					});
				}
			});
		}
	},

	/**
	 * Render the legend title on top of the legend
	 */
	renderTitle: function () {
		var options = this.options,
			padding = this.padding,
			titleOptions = options.title,
			titleHeight = 0,
			bBox;

		if (titleOptions.text) {
			if (!this.title) {
				this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, null, null, null, null, null, 'legend-title')
					.attr({ zIndex: 1 })
					.css(titleOptions.style)
					.add(this.group);
			}
			bBox = this.title.getBBox();
			titleHeight = bBox.height;
			this.offsetWidth = bBox.width; // #1717
			this.contentGroup.attr({ translateY: titleHeight });
		}
		this.titleHeight = titleHeight;
	},

	/**
	 * Render a single specific legend item
	 * @param {Object} item A series or point
	 */
	renderItem: function (item) {
		var legend = this,
			chart = legend.chart,
			renderer = chart.renderer,
			options = legend.options,
			horizontal = options.layout === 'horizontal',
			symbolWidth = legend.symbolWidth,
			symbolPadding = options.symbolPadding,
			itemStyle = legend.itemStyle,
			itemHiddenStyle = legend.itemHiddenStyle,
			padding = legend.padding,
			itemDistance = horizontal ? pick(options.itemDistance, 20) : 0,
			ltr = !options.rtl,
			itemHeight,
			widthOption = options.width,
			itemMarginBottom = options.itemMarginBottom || 0,
			itemMarginTop = legend.itemMarginTop,
			initialItemX = legend.initialItemX,
			bBox,
			itemWidth,
			li = item.legendItem,
			series = item.series && item.series.drawLegendSymbol ? item.series : item,
			seriesOptions = series.options,
			showCheckbox = legend.createCheckboxForItem && seriesOptions && seriesOptions.showCheckbox,
			useHTML = options.useHTML;

		if (!li) { // generate it once, later move it

			// Generate the group box
			// A group to hold the symbol and text. Text is to be appended in Legend class.
			item.legendGroup = renderer.g('legend-item')
				.attr({ zIndex: 1 })
				.add(legend.scrollGroup);

			// Generate the list item text and add it to the group
			item.legendItem = li = renderer.text(
					options.labelFormat ? format(options.labelFormat, item) : options.labelFormatter.call(item),
					ltr ? symbolWidth + symbolPadding : -symbolPadding,
					legend.baseline || 0,
					useHTML
				)
				.css(merge(item.visible ? itemStyle : itemHiddenStyle)) // merge to prevent modifying original (#1021)
				.attr({
					align: ltr ? 'left' : 'right',
					zIndex: 2
				})
				.add(item.legendGroup);

			// Get the baseline for the first item - the font size is equal for all
			if (!legend.baseline) {
				legend.baseline = renderer.fontMetrics(itemStyle.fontSize, li).f + 3 + itemMarginTop;
				li.attr('y', legend.baseline);
			}

			// Draw the legend symbol inside the group box
			series.drawLegendSymbol(legend, item);

			if (legend.setItemEvents) {
				legend.setItemEvents(item, li, useHTML, itemStyle, itemHiddenStyle);
			}

			// Colorize the items
			legend.colorizeItem(item, item.visible);

			// add the HTML checkbox on top
			if (showCheckbox) {
				legend.createCheckboxForItem(item);
			}
		}

		// calculate the positions for the next line
		bBox = li.getBBox();

		itemWidth = item.checkboxOffset =
			options.itemWidth ||
			item.legendItemWidth ||
			symbolWidth + symbolPadding + bBox.width + itemDistance + (showCheckbox ? 20 : 0);
		legend.itemHeight = itemHeight = mathRound(item.legendItemHeight || bBox.height);

		// if the item exceeds the width, start a new line
		if (horizontal && legend.itemX - initialItemX + itemWidth >
				(widthOption || (chart.chartWidth - 2 * padding - initialItemX - options.x))) {
			legend.itemX = initialItemX;
			legend.itemY += itemMarginTop + legend.lastLineHeight + itemMarginBottom;
			legend.lastLineHeight = 0; // reset for next line
		}

		// If the item exceeds the height, start a new column
		/*if (!horizontal && legend.itemY + options.y + itemHeight > chart.chartHeight - spacingTop - spacingBottom) {
			legend.itemY = legend.initialItemY;
			legend.itemX += legend.maxItemWidth;
			legend.maxItemWidth = 0;
		}*/

		// Set the edge positions
		legend.maxItemWidth = mathMax(legend.maxItemWidth, itemWidth);
		legend.lastItemY = itemMarginTop + legend.itemY + itemMarginBottom;
		legend.lastLineHeight = mathMax(itemHeight, legend.lastLineHeight); // #915

		// cache the position of the newly generated or reordered items
		item._legendItemPos = [legend.itemX, legend.itemY];

		// advance
		if (horizontal) {
			legend.itemX += itemWidth;

		} else {
			legend.itemY += itemMarginTop + itemHeight + itemMarginBottom;
			legend.lastLineHeight = itemHeight;
		}

		// the width of the widest item
		legend.offsetWidth = widthOption || mathMax(
			(horizontal ? legend.itemX - initialItemX - itemDistance : itemWidth) + padding,
			legend.offsetWidth
		);
	},

	/**
	 * Get all items, which is one item per series for normal series and one item per point
	 * for pie series.
	 */
	getAllItems: function () {
		var allItems = [];
		each(this.chart.series, function (series) {
			var seriesOptions = series.options;

			// Handle showInLegend. If the series is linked to another series, defaults to false.
			if (!pick(seriesOptions.showInLegend, !defined(seriesOptions.linkedTo) ? UNDEFINED : false, true)) {
				return;
			}

			// use points or series for the legend item depending on legendType
			allItems = allItems.concat(
					series.legendItems ||
					(seriesOptions.legendType === 'point' ?
							series.data :
							series)
			);
		});
		return allItems;
	},

	/**
	 * Render the legend. This method can be called both before and after
	 * chart.render. If called after, it will only rearrange items instead
	 * of creating new ones.
	 */
	render: function () {
		var legend = this,
			chart = legend.chart,
			renderer = chart.renderer,
			legendGroup = legend.group,
			allItems,
			display,
			legendWidth,
			legendHeight,
			box = legend.box,
			options = legend.options,
			padding = legend.padding,
			legendBorderWidth = options.borderWidth,
			legendBackgroundColor = options.backgroundColor;

		legend.itemX = legend.initialItemX;
		legend.itemY = legend.initialItemY;
		legend.offsetWidth = 0;
		legend.lastItemY = 0;

		if (!legendGroup) {
			legend.group = legendGroup = renderer.g('legend')
				.attr({ zIndex: 7 })
				.add();
			legend.contentGroup = renderer.g()
				.attr({ zIndex: 1 }) // above background
				.add(legendGroup);
			legend.scrollGroup = renderer.g()
				.add(legend.contentGroup);
		}

		legend.renderTitle();

		// add each series or point
		allItems = legend.getAllItems();

		// sort by legendIndex
		stableSort(allItems, function (a, b) {
			return ((a.options && a.options.legendIndex) || 0) - ((b.options && b.options.legendIndex) || 0);
		});

		// reversed legend
		if (options.reversed) {
			allItems.reverse();
		}

		legend.allItems = allItems;
		legend.display = display = !!allItems.length;

		// render the items
		each(allItems, function (item) {
			legend.renderItem(item);
		});

		// Draw the border
		legendWidth = options.width || legend.offsetWidth;
		legendHeight = legend.lastItemY + legend.lastLineHeight + legend.titleHeight;


		legendHeight = legend.handleOverflow(legendHeight);

		if (legendBorderWidth || legendBackgroundColor) {
			legendWidth += padding;
			legendHeight += padding;

			if (!box) {
				legend.box = box = renderer.rect(
					0,
					0,
					legendWidth,
					legendHeight,
					options.borderRadius,
					legendBorderWidth || 0
				).attr({
					stroke: options.borderColor,
					'stroke-width': legendBorderWidth || 0,
					fill: legendBackgroundColor || NONE
				})
				.add(legendGroup)
				.shadow(options.shadow);
				box.isNew = true;

			} else if (legendWidth > 0 && legendHeight > 0) {
				box[box.isNew ? 'attr' : 'animate'](
					box.crisp({ width: legendWidth, height: legendHeight })
				);
				box.isNew = false;
			}

			// hide the border if no items
			box[display ? 'show' : 'hide']();
		}

		legend.legendWidth = legendWidth;
		legend.legendHeight = legendHeight;

		// Now that the legend width and height are established, put the items in the
		// final position
		each(allItems, function (item) {
			legend.positionItem(item);
		});

		// 1.x compatibility: positioning based on style
		/*var props = ['left', 'right', 'top', 'bottom'],
			prop,
			i = 4;
		while (i--) {
			prop = props[i];
			if (options.style[prop] && options.style[prop] !== 'auto') {
				options[i < 2 ? 'align' : 'verticalAlign'] = prop;
				options[i < 2 ? 'x' : 'y'] = pInt(options.style[prop]) * (i % 2 ? -1 : 1);
			}
		}*/

		if (display) {
			legendGroup.align(extend({
				width: legendWidth,
				height: legendHeight
			}, options), true, 'spacingBox');
		}

		if (!chart.isResizing) {
			this.positionCheckboxes();
		}
	},

	/**
	 * Set up the overflow handling by adding navigation with up and down arrows below the
	 * legend.
	 */
	handleOverflow: function (legendHeight) {
		var legend = this,
			chart = this.chart,
			renderer = chart.renderer,
			options = this.options,
			optionsY = options.y,
			alignTop = options.verticalAlign === 'top',
			spaceHeight = chart.spacingBox.height + (alignTop ? -optionsY : optionsY) - this.padding,
			maxHeight = options.maxHeight,
			clipHeight,
			clipRect = this.clipRect,
			navOptions = options.navigation,
			animation = pick(navOptions.animation, true),
			arrowSize = navOptions.arrowSize || 12,
			nav = this.nav,
			pages = this.pages,
			lastY,
			allItems = this.allItems;

		// Adjust the height
		if (options.layout === 'horizontal') {
			spaceHeight /= 2;
		}
		if (maxHeight) {
			spaceHeight = mathMin(spaceHeight, maxHeight);
		}

		// Reset the legend height and adjust the clipping rectangle
		pages.length = 0;
		if (legendHeight > spaceHeight && !options.useHTML) {

			this.clipHeight = clipHeight = mathMax(spaceHeight - 20 - this.titleHeight - this.padding, 0);
			this.currentPage = pick(this.currentPage, 1);
			this.fullHeight = legendHeight;

			// Fill pages with Y positions so that the top of each a legend item defines
			// the scroll top for each page (#2098)
			each(allItems, function (item, i) {
				var y = item._legendItemPos[1],
					h = mathRound(item.legendItem.getBBox().height),
					len = pages.length;

				if (!len || (y - pages[len - 1] > clipHeight && (lastY || y) !== pages[len - 1])) {
					pages.push(lastY || y);
					len++;
				}

				if (i === allItems.length - 1 && y + h - pages[len - 1] > clipHeight) {
					pages.push(y);
				}
				if (y !== lastY) {
					lastY = y;
				}
			});

			// Only apply clipping if needed. Clipping causes blurred legend in PDF export (#1787)
			if (!clipRect) {
				clipRect = legend.clipRect = renderer.clipRect(0, this.padding, 9999, 0);
				legend.contentGroup.clip(clipRect);
			}
			clipRect.attr({
				height: clipHeight
			});

			// Add navigation elements
			if (!nav) {
				this.nav = nav = renderer.g().attr({ zIndex: 1 }).add(this.group);
				this.up = renderer.symbol('triangle', 0, 0, arrowSize, arrowSize)
					.on('click', function () {
						legend.scroll(-1, animation);
					})
					.add(nav);
				this.pager = renderer.text('', 15, 10)
					.css(navOptions.style)
					.add(nav);
				this.down = renderer.symbol('triangle-down', 0, 0, arrowSize, arrowSize)
					.on('click', function () {
						legend.scroll(1, animation);
					})
					.add(nav);
			}

			// Set initial position
			legend.scroll(0);

			legendHeight = spaceHeight;

		} else if (nav) {
			clipRect.attr({
				height: chart.chartHeight
			});
			nav.hide();
			this.scrollGroup.attr({
				translateY: 1
			});
			this.clipHeight = 0; // #1379
		}

		return legendHeight;
	},

	/**
	 * Scroll the legend by a number of pages
	 * @param {Object} scrollBy
	 * @param {Object} animation
	 */
	scroll: function (scrollBy, animation) {
		var pages = this.pages,
			pageCount = pages.length,
			currentPage = this.currentPage + scrollBy,
			clipHeight = this.clipHeight,
			navOptions = this.options.navigation,
			activeColor = navOptions.activeColor,
			inactiveColor = navOptions.inactiveColor,
			pager = this.pager,
			padding = this.padding,
			scrollOffset;

		// When resizing while looking at the last page
		if (currentPage > pageCount) {
			currentPage = pageCount;
		}

		if (currentPage > 0) {

			if (animation !== UNDEFINED) {
				setAnimation(animation, this.chart);
			}

			this.nav.attr({
				translateX: padding,
				translateY: clipHeight + this.padding + 7 + this.titleHeight,
				visibility: VISIBLE
			});
			this.up.attr({
					fill: currentPage === 1 ? inactiveColor : activeColor
				})
				.css({
					cursor: currentPage === 1 ? 'default' : 'pointer'
				});
			pager.attr({
				text: currentPage + '/' + pageCount
			});
			this.down.attr({
					x: 18 + this.pager.getBBox().width, // adjust to text width
					fill: currentPage === pageCount ? inactiveColor : activeColor
				})
				.css({
					cursor: currentPage === pageCount ? 'default' : 'pointer'
				});

			scrollOffset = -pages[currentPage - 1] + this.initialItemY;

			this.scrollGroup.animate({
				translateY: scrollOffset
			});

			this.currentPage = currentPage;
			this.positionCheckboxes(scrollOffset);
		}

	}

};

/*
 * LegendSymbolMixin
 */

var LegendSymbolMixin = Highcharts.LegendSymbolMixin = {

	/**
	 * Get the series' symbol in the legend
	 *
	 * @param {Object} legend The legend object
	 * @param {Object} item The series (this) or point
	 */
	drawRectangle: function (legend, item) {
		var symbolHeight = legend.options.symbolHeight || 12;

		item.legendSymbol = this.chart.renderer.rect(
			0,
			legend.baseline - 5 - (symbolHeight / 2),
			legend.symbolWidth,
			symbolHeight,
			legend.options.symbolRadius || 0
		).attr({
			zIndex: 3
		}).add(item.legendGroup);

	},

	/**
	 * Get the series' symbol in the legend. This method should be overridable to create custom
	 * symbols through Highcharts.seriesTypes[type].prototype.drawLegendSymbols.
	 *
	 * @param {Object} legend The legend object
	 */
	drawLineMarker: function (legend) {

		var options = this.options,
			markerOptions = options.marker,
			radius,
			legendOptions = legend.options,
			legendSymbol,
			symbolWidth = legend.symbolWidth,
			renderer = this.chart.renderer,
			legendItemGroup = this.legendGroup,
			verticalCenter = legend.baseline - mathRound(renderer.fontMetrics(legendOptions.itemStyle.fontSize, this.legendItem).b * 0.3),
			attr;

		// Draw the line
		if (options.lineWidth) {
			attr = {
				'stroke-width': options.lineWidth
			};
			if (options.dashStyle) {
				attr.dashstyle = options.dashStyle;
			}
			this.legendLine = renderer.path([
				M,
				0,
				verticalCenter,
				L,
				symbolWidth,
				verticalCenter
			])
			.attr(attr)
			.add(legendItemGroup);
		}

		// Draw the marker
		if (markerOptions && markerOptions.enabled !== false) {
			radius = markerOptions.radius;
			this.legendSymbol = legendSymbol = renderer.symbol(
				this.symbol,
				(symbolWidth / 2) - radius,
				verticalCenter - radius,
				2 * radius,
				2 * radius
			)
			.add(legendItemGroup);
			legendSymbol.isMarker = true;
		}
	}
};

// Workaround for #2030, horizontal legend items not displaying in IE11 Preview,
// and for #2580, a similar drawing flaw in Firefox 26.
// TODO: Explore if there's a general cause for this. The problem may be related
// to nested group elements, as the legend item texts are within 4 group elements.
if (/Trident\/7\.0/.test(userAgent) || isFirefox) {
	wrap(Legend.prototype, 'positionItem', function (proceed, item) {
		var legend = this,
			runPositionItem = function () { // If chart destroyed in sync, this is undefined (#2030)
				if (item._legendItemPos) {
					proceed.call(legend, item);
				}
			};

		// Do it now, for export and to get checkbox placement
		runPositionItem();

		// Do it after to work around the core issue
		setTimeout(runPositionItem);
	});
}
/**
 * The chart class
 * @param {Object} options
 * @param {Function} callback Function to run when the chart has loaded
 */
function Chart() {
	this.init.apply(this, arguments);
}

Chart.prototype = {

	/**
	 * Initialize the chart
	 */
	init: function (userOptions, callback) {

		// Handle regular options
		var options,
			seriesOptions = userOptions.series; // skip merging data points to increase performance

		userOptions.series = null;
		options = merge(defaultOptions, userOptions); // do the merge
		options.series = userOptions.series = seriesOptions; // set back the series data
		this.userOptions = userOptions;

		var optionsChart = options.chart;

		// Create margin & spacing array
		this.margin = this.splashArray('margin', optionsChart);
		this.spacing = this.splashArray('spacing', optionsChart);

		var chartEvents = optionsChart.events;

		//this.runChartClick = chartEvents && !!chartEvents.click;
		this.bounds = { h: {}, v: {} }; // Pixel data bounds for touch zoom

		this.callback = callback;
		this.isResizing = 0;
		this.options = options;
		//chartTitleOptions = UNDEFINED;
		//chartSubtitleOptions = UNDEFINED;

		this.axes = [];
		this.series = [];
		this.hasCartesianSeries = optionsChart.showAxes;
		//this.axisOffset = UNDEFINED;
		//this.maxTicks = UNDEFINED; // handle the greatest amount of ticks on grouped axes
		//this.inverted = UNDEFINED;
		//this.loadingShown = UNDEFINED;
		//this.container = UNDEFINED;
		//this.chartWidth = UNDEFINED;
		//this.chartHeight = UNDEFINED;
		//this.marginRight = UNDEFINED;
		//this.marginBottom = UNDEFINED;
		//this.containerWidth = UNDEFINED;
		//this.containerHeight = UNDEFINED;
		//this.oldChartWidth = UNDEFINED;
		//this.oldChartHeight = UNDEFINED;

		//this.renderTo = UNDEFINED;
		//this.renderToClone = UNDEFINED;

		//this.spacingBox = UNDEFINED

		//this.legend = UNDEFINED;

		// Elements
		//this.chartBackground = UNDEFINED;
		//this.plotBackground = UNDEFINED;
		//this.plotBGImage = UNDEFINED;
		//this.plotBorder = UNDEFINED;
		//this.loadingDiv = UNDEFINED;
		//this.loadingSpan = UNDEFINED;

		var chart = this,
			eventType;

		// Add the chart to the global lookup
		chart.index = charts.length;
		charts.push(chart);
		chartCount++;

		// Set up auto resize
		if (optionsChart.reflow !== false) {
			addEvent(chart, 'load', function () {
				chart.initReflow();
			});
		}

		// Chart event handlers
		if (chartEvents) {
			for (eventType in chartEvents) {
				addEvent(chart, eventType, chartEvents[eventType]);
			}
		}

		chart.xAxis = [];
		chart.yAxis = [];

		// Expose methods and variables
		chart.animation = useCanVG ? false : pick(optionsChart.animation, true);
		chart.pointCount = chart.colorCounter = chart.symbolCounter = 0;

		chart.firstRender();
	},

	/**
	 * Initialize an individual series, called internally before render time
	 */
	initSeries: function (options) {
		var chart = this,
			optionsChart = chart.options.chart,
			type = options.type || optionsChart.type || optionsChart.defaultSeriesType,
			series,
			constr = seriesTypes[type];

		// No such series type
		if (!constr) {
			error(17, true);
		}

		series = new constr();
		series.init(this, options);
		return series;
	},

	/**
	 * Check whether a given point is within the plot area
	 *
	 * @param {Number} plotX Pixel x relative to the plot area
	 * @param {Number} plotY Pixel y relative to the plot area
	 * @param {Boolean} inverted Whether the chart is inverted
	 */
	isInsidePlot: function (plotX, plotY, inverted) {
		var x = inverted ? plotY : plotX,
			y = inverted ? plotX : plotY;

		return x >= 0 &&
			x <= this.plotWidth &&
			y >= 0 &&
			y <= this.plotHeight;
	},

	/**
	 * Adjust all axes tick amounts
	 */
	adjustTickAmounts: function () {
		if (this.options.chart.alignTicks !== false) {
			each(this.axes, function (axis) {
				axis.adjustTickAmount();
			});
		}
		this.maxTicks = null;
	},

	/**
	 * Redraw legend, axes or series based on updated data
	 *
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 */
	redraw: function (animation) {
		var chart = this,
			axes = chart.axes,
			series = chart.series,
			pointer = chart.pointer,
			legend = chart.legend,
			redrawLegend = chart.isDirtyLegend,
			hasStackedSeries,
			hasDirtyStacks,
			hasCartesianSeries = chart.hasCartesianSeries,
			isDirtyBox = chart.isDirtyBox, // todo: check if it has actually changed?
			seriesLength = series.length,
			i = seriesLength,
			serie,
			renderer = chart.renderer,
			isHiddenChart = renderer.isHidden(),
			afterRedraw = [];

		setAnimation(animation, chart);

		if (isHiddenChart) {
			chart.cloneRenderTo();
		}

		// Adjust title layout (reflow multiline text)
		chart.layOutTitles();

		// link stacked series
		while (i--) {
			serie = series[i];

			if (serie.options.stacking) {
				hasStackedSeries = true;

				if (serie.isDirty) {
					hasDirtyStacks = true;
					break;
				}
			}
		}
		if (hasDirtyStacks) { // mark others as dirty
			i = seriesLength;
			while (i--) {
				serie = series[i];
				if (serie.options.stacking) {
					serie.isDirty = true;
				}
			}
		}

		// handle updated data in the series
		each(series, function (serie) {
			if (serie.isDirty) { // prepare the data so axis can read it
				if (serie.options.legendType === 'point') {
					redrawLegend = true;
				}
			}
		});

		// handle added or removed series
		if (redrawLegend && legend.options.enabled) { // series or pie points are added or removed
			// draw legend graphics
			legend.render();

			chart.isDirtyLegend = false;
		}

		// reset stacks
		if (hasStackedSeries) {
			chart.getStacks();
		}


		if (hasCartesianSeries) {
			if (!chart.isResizing) {

				// reset maxTicks
				chart.maxTicks = null;

				// set axes scales
				each(axes, function (axis) {
					axis.setScale();
				});
			}

			chart.adjustTickAmounts();
		}

		chart.getMargins(); // #3098

		if (hasCartesianSeries) {
			// If one axis is dirty, all axes must be redrawn (#792, #2169)
			each(axes, function (axis) {
				if (axis.isDirty) {
					isDirtyBox = true;
				}
			});

			// redraw axes
			each(axes, function (axis) {

				// Fire 'afterSetExtremes' only if extremes are set
				if (axis.isDirtyExtremes) { // #821
					axis.isDirtyExtremes = false;
					afterRedraw.push(function () { // prevent a recursive call to chart.redraw() (#1119)
						fireEvent(axis, 'afterSetExtremes', extend(axis.eventArgs, axis.getExtremes())); // #747, #751
						delete axis.eventArgs;
					});
				}

				if (isDirtyBox || hasStackedSeries) {
					axis.redraw();
				}
			});
		}

		// the plot areas size has changed
		if (isDirtyBox) {
			chart.drawChartBox();
		}


		// redraw affected series
		each(series, function (serie) {
			if (serie.isDirty && serie.visible &&
					(!serie.isCartesian || serie.xAxis)) { // issue #153
				serie.redraw();
			}
		});

		// move tooltip or reset
		if (pointer) {
			pointer.reset(true);
		}

		// redraw if canvas
		renderer.draw();

		// fire the event
		fireEvent(chart, 'redraw'); // jQuery breaks this when calling it from addEvent. Overwrites chart.redraw

		if (isHiddenChart) {
			chart.cloneRenderTo(true);
		}

		// Fire callbacks that are put on hold until after the redraw
		each(afterRedraw, function (callback) {
			callback.call();
		});
	},

	/**
	 * Get an axis, series or point object by id.
	 * @param id {String} The id as given in the configuration options
	 */
	get: function (id) {
		var chart = this,
			axes = chart.axes,
			series = chart.series;

		var i,
			j,
			points;

		// search axes
		for (i = 0; i < axes.length; i++) {
			if (axes[i].options.id === id) {
				return axes[i];
			}
		}

		// search series
		for (i = 0; i < series.length; i++) {
			if (series[i].options.id === id) {
				return series[i];
			}
		}

		// search points
		for (i = 0; i < series.length; i++) {
			points = series[i].points || [];
			for (j = 0; j < points.length; j++) {
				if (points[j].id === id) {
					return points[j];
				}
			}
		}
		return null;
	},

	/**
	 * Create the Axis instances based on the config options
	 */
	getAxes: function () {
		var chart = this,
			options = this.options,
			xAxisOptions = options.xAxis = splat(options.xAxis || {}),
			yAxisOptions = options.yAxis = splat(options.yAxis || {}),
			optionsArray,
			axis;

		// make sure the options are arrays and add some members
		each(xAxisOptions, function (axis, i) {
			axis.index = i;
			axis.isX = true;
		});

		each(yAxisOptions, function (axis, i) {
			axis.index = i;
		});

		// concatenate all axis options into one array
		optionsArray = xAxisOptions.concat(yAxisOptions);

		each(optionsArray, function (axisOptions) {
			axis = new Axis(chart, axisOptions);
		});

		chart.adjustTickAmounts();
	},


	/**
	 * Get the currently selected points from all series
	 */
	getSelectedPoints: function () {
		var points = [];
		each(this.series, function (serie) {
			points = points.concat(grep(serie.points || [], function (point) {
				return point.selected;
			}));
		});
		return points;
	},

	/**
	 * Get the currently selected series
	 */
	getSelectedSeries: function () {
		return grep(this.series, function (serie) {
			return serie.selected;
		});
	},

	/**
	 * Generate stacks for each series and calculate stacks total values
	 */
	getStacks: function () {
		var chart = this;

		// reset stacks for each yAxis
		each(chart.yAxis, function (axis) {
			if (axis.stacks && axis.hasVisibleSeries) {
				axis.oldStacks = axis.stacks;
			}
		});

		each(chart.series, function (series) {
			if (series.options.stacking && (series.visible === true || chart.options.chart.ignoreHiddenSeries === false)) {
				series.stackKey = series.type + pick(series.options.stack, '');
			}
		});
	},

	/**
	 * Show the title and subtitle of the chart
	 *
	 * @param titleOptions {Object} New title options
	 * @param subtitleOptions {Object} New subtitle options
	 *
	 */
	setTitle: function (titleOptions, subtitleOptions, redraw) {
		var chart = this,
			options = chart.options,
			chartTitleOptions,
			chartSubtitleOptions;

		chartTitleOptions = options.title = merge(options.title, titleOptions);
		chartSubtitleOptions = options.subtitle = merge(options.subtitle, subtitleOptions);

		// add title and subtitle
		each([
			['title', titleOptions, chartTitleOptions],
			['subtitle', subtitleOptions, chartSubtitleOptions]
		], function (arr) {
			var name = arr[0],
				title = chart[name],
				titleOptions = arr[1],
				chartTitleOptions = arr[2];

			if (title && titleOptions) {
				chart[name] = title = title.destroy(); // remove old
			}

			if (chartTitleOptions && chartTitleOptions.text && !title) {
				chart[name] = chart.renderer.text(
					chartTitleOptions.text,
					0,
					0,
					chartTitleOptions.useHTML
				)
				.attr({
					align: chartTitleOptions.align,
					'class': PREFIX + name,
					zIndex: chartTitleOptions.zIndex || 4
				})
				.css(chartTitleOptions.style)
				.add();
			}
		});
		chart.layOutTitles(redraw);
	},

	/**
	 * Lay out the chart titles and cache the full offset height for use in getMargins
	 */
	layOutTitles: function (redraw) {
		var titleOffset = 0,
			title = this.title,
			subtitle = this.subtitle,
			options = this.options,
			titleOptions = options.title,
			subtitleOptions = options.subtitle,
			requiresDirtyBox,
			renderer = this.renderer,
			autoWidth = this.spacingBox.width - 44; // 44 makes room for default context button

		if (title) {
			title
				.css({ width: (titleOptions.width || autoWidth) + PX })
				.align(extend({
					y: renderer.fontMetrics(titleOptions.style.fontSize, title).b - 3
				}, titleOptions), false, 'spacingBox');

			if (!titleOptions.floating && !titleOptions.verticalAlign) {
				titleOffset = title.getBBox().height;
			}
		}
		if (subtitle) {
			subtitle
				.css({ width: (subtitleOptions.width || autoWidth) + PX })
				.align(extend({
					y: titleOffset + (titleOptions.margin - 13) + renderer.fontMetrics(titleOptions.style.fontSize, subtitle).b
				}, subtitleOptions), false, 'spacingBox');

			if (!subtitleOptions.floating && !subtitleOptions.verticalAlign) {
				titleOffset = mathCeil(titleOffset + subtitle.getBBox().height);
			}
		}

		requiresDirtyBox = this.titleOffset !== titleOffset;
		this.titleOffset = titleOffset; // used in getMargins

		if (!this.isDirtyBox && requiresDirtyBox) {
			this.isDirtyBox = requiresDirtyBox;
			// Redraw if necessary (#2719, #2744)
			if (this.hasRendered && pick(redraw, true) && this.isDirtyBox) {
				this.redraw();
			}
		}
	},

	/**
	 * Get chart width and height according to options and container size
	 */
	getChartSize: function () {
		var chart = this,
			optionsChart = chart.options.chart,
			widthOption = optionsChart.width,
			heightOption = optionsChart.height,
			renderTo = chart.renderToClone || chart.renderTo;

		// get inner width and height from jQuery (#824)
		if (!defined(widthOption)) {
			chart.containerWidth = adapterRun(renderTo, 'width');
		}
		if (!defined(heightOption)) {
			chart.containerHeight = adapterRun(renderTo, 'height');
		}

		chart.chartWidth = mathMax(0, widthOption || chart.containerWidth || 600); // #1393, 1460
		chart.chartHeight = mathMax(0, pick(heightOption,
			// the offsetHeight of an empty container is 0 in standard browsers, but 19 in IE7:
			chart.containerHeight > 19 ? chart.containerHeight : 400));
	},

	/**
	 * Create a clone of the chart's renderTo div and place it outside the viewport to allow
	 * size computation on chart.render and chart.redraw
	 */
	cloneRenderTo: function (revert) {
		var clone = this.renderToClone,
			container = this.container;

		// Destroy the clone and bring the container back to the real renderTo div
		if (revert) {
			if (clone) {
				this.renderTo.appendChild(container);
				discardElement(clone);
				delete this.renderToClone;
			}

		// Set up the clone
		} else {
			if (container && container.parentNode === this.renderTo) {
				this.renderTo.removeChild(container); // do not clone this
			}
			this.renderToClone = clone = this.renderTo.cloneNode(0);
			css(clone, {
				position: ABSOLUTE,
				top: '-9999px',
				display: 'block' // #833
			});
			if (clone.style.setProperty) { // #2631
				clone.style.setProperty('display', 'block', 'important');
			}
			doc.body.appendChild(clone);
			if (container) {
				clone.appendChild(container);
			}
		}
	},

	/**
	 * Get the containing element, determine the size and create the inner container
	 * div to hold the chart
	 */
	getContainer: function () {
		var chart = this,
			container,
			optionsChart = chart.options.chart,
			chartWidth,
			chartHeight,
			renderTo,
			indexAttrName = 'data-highcharts-chart',
			oldChartIndex,
			containerId;

		chart.renderTo = renderTo = optionsChart.renderTo;
		containerId = PREFIX + idCounter++;

		if (isString(renderTo)) {
			chart.renderTo = renderTo = doc.getElementById(renderTo);
		}

		// Display an error if the renderTo is wrong
		if (!renderTo) {
			error(13, true);
		}

		// If the container already holds a chart, destroy it. The check for hasRendered is there
		// because web pages that are saved to disk from the browser, will preserve the data-highcharts-chart
		// attribute and the SVG contents, but not an interactive chart. So in this case,
		// charts[oldChartIndex] will point to the wrong chart if any (#2609).
		oldChartIndex = pInt(attr(renderTo, indexAttrName));
		if (!isNaN(oldChartIndex) && charts[oldChartIndex] && charts[oldChartIndex].hasRendered) {
			charts[oldChartIndex].destroy();
		}

		// Make a reference to the chart from the div
		attr(renderTo, indexAttrName, chart.index);

		// remove previous chart
		renderTo.innerHTML = '';

		// If the container doesn't have an offsetWidth, it has or is a child of a node
		// that has display:none. We need to temporarily move it out to a visible
		// state to determine the size, else the legend and tooltips won't render
		// properly. The allowClone option is used in sparklines as a micro optimization,
		// saving about 1-2 ms each chart.
		if (!optionsChart.skipClone && !renderTo.offsetWidth) {
			chart.cloneRenderTo();
		}

		// get the width and height
		chart.getChartSize();
		chartWidth = chart.chartWidth;
		chartHeight = chart.chartHeight;

		// create the inner container
		chart.container = container = createElement(DIV, {
				className: PREFIX + 'container' +
					(optionsChart.className ? ' ' + optionsChart.className : ''),
				id: containerId
			}, extend({
				position: RELATIVE,
				overflow: HIDDEN, // needed for context menu (avoid scrollbars) and
					// content overflow in IE
				width: chartWidth + PX,
				height: chartHeight + PX,
				textAlign: 'left',
				lineHeight: 'normal', // #427
				zIndex: 0, // #1072
				'-webkit-tap-highlight-color': 'rgba(0,0,0,0)'
			}, optionsChart.style),
			chart.renderToClone || renderTo
		);

		// cache the cursor (#1650)
		chart._cursor = container.style.cursor;

		// Initialize the renderer
		chart.renderer =
			optionsChart.forExport ? // force SVG, used for SVG export
				new SVGRenderer(container, chartWidth, chartHeight, optionsChart.style, true) :
				new Renderer(container, chartWidth, chartHeight, optionsChart.style);

		if (useCanVG) {
			// If we need canvg library, extend and configure the renderer
			// to get the tracker for translating mouse events
			chart.renderer.create(chart, container, chartWidth, chartHeight);
		}
	},

	/**
	 * Calculate margins by rendering axis labels in a preliminary position. Title,
	 * subtitle and legend have already been rendered at this stage, but will be
	 * moved into their final positions
	 */
	getMargins: function () {
		var chart = this,
			spacing = chart.spacing,
			axisOffset,
			legend = chart.legend,
			margin = chart.margin,
			legendOptions = chart.options.legend,
			legendMargin = pick(legendOptions.margin, 20),
			legendX = legendOptions.x,
			legendY = legendOptions.y,
			align = legendOptions.align,
			verticalAlign = legendOptions.verticalAlign,
			titleOffset = chart.titleOffset;

		chart.resetMargins();
		axisOffset = chart.axisOffset;

		// Adjust for title and subtitle
		if (titleOffset && !defined(margin[0])) {
			chart.plotTop = mathMax(chart.plotTop, titleOffset + chart.options.title.margin + spacing[0]);
		}

		// Adjust for legend
		if (legend.display && !legendOptions.floating) {
			if (align === 'right') { // horizontal alignment handled first
				if (!defined(margin[1])) {
					chart.marginRight = mathMax(
						chart.marginRight,
						legend.legendWidth - legendX + legendMargin + spacing[1]
					);
				}
			} else if (align === 'left') {
				if (!defined(margin[3])) {
					chart.plotLeft = mathMax(
						chart.plotLeft,
						legend.legendWidth + legendX + legendMargin + spacing[3]
					);
				}

			} else if (verticalAlign === 'top') {
				if (!defined(margin[0])) {
					chart.plotTop = mathMax(
						chart.plotTop,
						legend.legendHeight + legendY + legendMargin + spacing[0]
					);
				}

			} else if (verticalAlign === 'bottom') {
				if (!defined(margin[2])) {
					chart.marginBottom = mathMax(
						chart.marginBottom,
						legend.legendHeight - legendY + legendMargin + spacing[2]
					);
				}
			}
		}

		// adjust for scroller
		if (chart.extraBottomMargin) {
			chart.marginBottom += chart.extraBottomMargin;
		}
		if (chart.extraTopMargin) {
			chart.plotTop += chart.extraTopMargin;
		}

		// pre-render axes to get labels offset width
		if (chart.hasCartesianSeries) {
			each(chart.axes, function (axis) {
				axis.getOffset();
			});
		}

		if (!defined(margin[3])) {
			chart.plotLeft += axisOffset[3];
		}
		if (!defined(margin[0])) {
			chart.plotTop += axisOffset[0];
		}
		if (!defined(margin[2])) {
			chart.marginBottom += axisOffset[2];
		}
		if (!defined(margin[1])) {
			chart.marginRight += axisOffset[1];
		}

		chart.setChartSize();

	},

	/**
	 * Resize the chart to its container if size is not explicitly set
	 */
	reflow: function (e) {
		var chart = this,
			optionsChart = chart.options.chart,
			renderTo = chart.renderTo,
			width = optionsChart.width || adapterRun(renderTo, 'width'),
			height = optionsChart.height || adapterRun(renderTo, 'height'),
			target = e ? e.target : win, // #805 - MooTools doesn't supply e
			doReflow = function () {
				if (chart.container) { // It may have been destroyed in the meantime (#1257)
					chart.setSize(width, height, false);
					chart.hasUserSize = null;
				}
			};

		// Width and height checks for display:none. Target is doc in IE8 and Opera,
		// win in Firefox, Chrome and IE9.
		if (!chart.hasUserSize && width && height && (target === win || target === doc)) {
			if (width !== chart.containerWidth || height !== chart.containerHeight) {
				clearTimeout(chart.reflowTimeout);
				if (e) { // Called from window.resize
					chart.reflowTimeout = setTimeout(doReflow, 100);
				} else { // Called directly (#2224)
					doReflow();
				}
			}
			chart.containerWidth = width;
			chart.containerHeight = height;
		}
	},

	/**
	 * Add the event handlers necessary for auto resizing
	 */
	initReflow: function () {
		var chart = this,
			reflow = function (e) {
				chart.reflow(e);
			};


		addEvent(win, 'resize', reflow);
		addEvent(chart, 'destroy', function () {
			removeEvent(win, 'resize', reflow);
		});
	},

	/**
	 * Resize the chart to a given width and height
	 * @param {Number} width
	 * @param {Number} height
	 * @param {Object|Boolean} animation
	 */
	setSize: function (width, height, animation) {
		var chart = this,
			chartWidth,
			chartHeight,
			fireEndResize;

		// Handle the isResizing counter
		chart.isResizing += 1;
		fireEndResize = function () {
			if (chart) {
				fireEvent(chart, 'endResize', null, function () {
					chart.isResizing -= 1;
				});
			}
		};

		// set the animation for the current process
		setAnimation(animation, chart);

		chart.oldChartHeight = chart.chartHeight;
		chart.oldChartWidth = chart.chartWidth;
		if (defined(width)) {
			chart.chartWidth = chartWidth = mathMax(0, mathRound(width));
			chart.hasUserSize = !!chartWidth;
		}
		if (defined(height)) {
			chart.chartHeight = chartHeight = mathMax(0, mathRound(height));
		}

		// Resize the container with the global animation applied if enabled (#2503)
		(globalAnimation ? animate : css)(chart.container, {
			width: chartWidth + PX,
			height: chartHeight + PX
		}, globalAnimation);

		chart.setChartSize(true);
		chart.renderer.setSize(chartWidth, chartHeight, animation);

		// handle axes
		chart.maxTicks = null;
		each(chart.axes, function (axis) {
			axis.isDirty = true;
			axis.setScale();
		});

		// make sure non-cartesian series are also handled
		each(chart.series, function (serie) {
			serie.isDirty = true;
		});

		chart.isDirtyLegend = true; // force legend redraw
		chart.isDirtyBox = true; // force redraw of plot and chart border

		chart.layOutTitles(); // #2857
		chart.getMargins();

		chart.redraw(animation);


		chart.oldChartHeight = null;
		fireEvent(chart, 'resize');

		// fire endResize and set isResizing back
		// If animation is disabled, fire without delay
		if (globalAnimation === false) {
			fireEndResize();
		} else { // else set a timeout with the animation duration
			setTimeout(fireEndResize, (globalAnimation && globalAnimation.duration) || 500);
		}
	},

	/**
	 * Set the public chart properties. This is done before and after the pre-render
	 * to determine margin sizes
	 */
	setChartSize: function (skipAxes) {
		var chart = this,
			inverted = chart.inverted,
			renderer = chart.renderer,
			chartWidth = chart.chartWidth,
			chartHeight = chart.chartHeight,
			optionsChart = chart.options.chart,
			spacing = chart.spacing,
			clipOffset = chart.clipOffset,
			clipX,
			clipY,
			plotLeft,
			plotTop,
			plotWidth,
			plotHeight,
			plotBorderWidth;

		chart.plotLeft = plotLeft = mathRound(chart.plotLeft);
		chart.plotTop = plotTop = mathRound(chart.plotTop);
		chart.plotWidth = plotWidth = mathMax(0, mathRound(chartWidth - plotLeft - chart.marginRight));
		chart.plotHeight = plotHeight = mathMax(0, mathRound(chartHeight - plotTop - chart.marginBottom));

		chart.plotSizeX = inverted ? plotHeight : plotWidth;
		chart.plotSizeY = inverted ? plotWidth : plotHeight;

		chart.plotBorderWidth = optionsChart.plotBorderWidth || 0;

		// Set boxes used for alignment
		chart.spacingBox = renderer.spacingBox = {
			x: spacing[3],
			y: spacing[0],
			width: chartWidth - spacing[3] - spacing[1],
			height: chartHeight - spacing[0] - spacing[2]
		};
		chart.plotBox = renderer.plotBox = {
			x: plotLeft,
			y: plotTop,
			width: plotWidth,
			height: plotHeight
		};

		plotBorderWidth = 2 * mathFloor(chart.plotBorderWidth / 2);
		clipX = mathCeil(mathMax(plotBorderWidth, clipOffset[3]) / 2);
		clipY = mathCeil(mathMax(plotBorderWidth, clipOffset[0]) / 2);
		chart.clipBox = {
			x: clipX,
			y: clipY,
			width: mathFloor(chart.plotSizeX - mathMax(plotBorderWidth, clipOffset[1]) / 2 - clipX),
			height: mathMax(0, mathFloor(chart.plotSizeY - mathMax(plotBorderWidth, clipOffset[2]) / 2 - clipY))
		};

		if (!skipAxes) {
			each(chart.axes, function (axis) {
				axis.setAxisSize();
				axis.setAxisTranslation();
			});
		}
	},

	/**
	 * Initial margins before auto size margins are applied
	 */
	resetMargins: function () {
		var chart = this,
			spacing = chart.spacing,
			margin = chart.margin;

		chart.plotTop = pick(margin[0], spacing[0]);
		chart.marginRight = pick(margin[1], spacing[1]);
		chart.marginBottom = pick(margin[2], spacing[2]);
		chart.plotLeft = pick(margin[3], spacing[3]);
		chart.axisOffset = [0, 0, 0, 0]; // top, right, bottom, left
		chart.clipOffset = [0, 0, 0, 0];
	},

	/**
	 * Draw the borders and backgrounds for chart and plot area
	 */
	drawChartBox: function () {
		var chart = this,
			optionsChart = chart.options.chart,
			renderer = chart.renderer,
			chartWidth = chart.chartWidth,
			chartHeight = chart.chartHeight,
			chartBackground = chart.chartBackground,
			plotBackground = chart.plotBackground,
			plotBorder = chart.plotBorder,
			plotBGImage = chart.plotBGImage,
			chartBorderWidth = optionsChart.borderWidth || 0,
			chartBackgroundColor = optionsChart.backgroundColor,
			plotBackgroundColor = optionsChart.plotBackgroundColor,
			plotBackgroundImage = optionsChart.plotBackgroundImage,
			plotBorderWidth = optionsChart.plotBorderWidth || 0,
			mgn,
			bgAttr,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			plotBox = chart.plotBox,
			clipRect = chart.clipRect,
			clipBox = chart.clipBox;

		// Chart area
		mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);

		if (chartBorderWidth || chartBackgroundColor) {
			if (!chartBackground) {

				bgAttr = {
					fill: chartBackgroundColor || NONE
				};
				if (chartBorderWidth) { // #980
					bgAttr.stroke = optionsChart.borderColor;
					bgAttr['stroke-width'] = chartBorderWidth;
				}
				chart.chartBackground = renderer.rect(mgn / 2, mgn / 2, chartWidth - mgn, chartHeight - mgn,
						optionsChart.borderRadius, chartBorderWidth)
					.attr(bgAttr)
					.addClass(PREFIX + 'background')
					.add()
					.shadow(optionsChart.shadow);

			} else { // resize
				chartBackground.animate(
					chartBackground.crisp({ width: chartWidth - mgn, height: chartHeight - mgn })
				);
			}
		}


		// Plot background
		if (plotBackgroundColor) {
			if (!plotBackground) {
				chart.plotBackground = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0)
					.attr({
						fill: plotBackgroundColor
					})
					.add()
					.shadow(optionsChart.plotShadow);
			} else {
				plotBackground.animate(plotBox);
			}
		}
		if (plotBackgroundImage) {
			if (!plotBGImage) {
				chart.plotBGImage = renderer.image(plotBackgroundImage, plotLeft, plotTop, plotWidth, plotHeight)
					.add();
			} else {
				plotBGImage.animate(plotBox);
			}
		}

		// Plot clip
		if (!clipRect) {
			chart.clipRect = renderer.clipRect(clipBox);
		} else {
			clipRect.animate({
				width: clipBox.width,
				height: clipBox.height
			});
		}

		// Plot area border
		if (plotBorderWidth) {
			if (!plotBorder) {
				chart.plotBorder = renderer.rect(plotLeft, plotTop, plotWidth, plotHeight, 0, -plotBorderWidth)
					.attr({
						stroke: optionsChart.plotBorderColor,
						'stroke-width': plotBorderWidth,
						fill: NONE,
						zIndex: 1
					})
					.add();
			} else {
				plotBorder.animate(
					plotBorder.crisp({ x: plotLeft, y: plotTop, width: plotWidth, height: plotHeight, strokeWidth: -plotBorderWidth }) //#3282 plotBorder should be negative
				);
			}
		}

		// reset
		chart.isDirtyBox = false;
	},

	/**
	 * Detect whether a certain chart property is needed based on inspecting its options
	 * and series. This mainly applies to the chart.invert property, and in extensions to
	 * the chart.angular and chart.polar properties.
	 */
	propFromSeries: function () {
		var chart = this,
			optionsChart = chart.options.chart,
			klass,
			seriesOptions = chart.options.series,
			i,
			value;


		each(['inverted', 'angular', 'polar'], function (key) {

			// The default series type's class
			klass = seriesTypes[optionsChart.type || optionsChart.defaultSeriesType];

			// Get the value from available chart-wide properties
			value = (
				chart[key] || // 1. it is set before
				optionsChart[key] || // 2. it is set in the options
				(klass && klass.prototype[key]) // 3. it's default series class requires it
			);

			// 4. Check if any the chart's series require it
			i = seriesOptions && seriesOptions.length;
			while (!value && i--) {
				klass = seriesTypes[seriesOptions[i].type];
				if (klass && klass.prototype[key]) {
					value = true;
				}
			}

			// Set the chart property
			chart[key] = value;
		});

	},

	/**
	 * Link two or more series together. This is done initially from Chart.render,
	 * and after Chart.addSeries and Series.remove.
	 */
	linkSeries: function () {
		var chart = this,
			chartSeries = chart.series;

		// Reset links
		each(chartSeries, function (series) {
			series.linkedSeries.length = 0;
		});

		// Apply new links
		each(chartSeries, function (series) {
			var linkedTo = series.options.linkedTo;
			if (isString(linkedTo)) {
				if (linkedTo === ':previous') {
					linkedTo = chart.series[series.index - 1];
				} else {
					linkedTo = chart.get(linkedTo);
				}
				if (linkedTo) {
					linkedTo.linkedSeries.push(series);
					series.linkedParent = linkedTo;
				}
			}
		});
	},

	/**
	 * Render series for the chart
	 */
	renderSeries: function () {
		each(this.series, function (serie) {
			serie.translate();
			if (serie.setTooltipPoints) {
				serie.setTooltipPoints();
			}
			serie.render();
		});
	},

	/**
	 * Render labels for the chart
	 */
	renderLabels: function () {
		var chart = this,
			labels = chart.options.labels;
		if (labels.items) {
			each(labels.items, function (label) {
				var style = extend(labels.style, label.style),
					x = pInt(style.left) + chart.plotLeft,
					y = pInt(style.top) + chart.plotTop + 12;

				// delete to prevent rewriting in IE
				delete style.left;
				delete style.top;

				chart.renderer.text(
					label.html,
					x,
					y
				)
				.attr({ zIndex: 2 })
				.css(style)
				.add();

			});
		}
	},

	/**
	 * Render all graphics for the chart
	 */
	render: function () {
		var chart = this,
			axes = chart.axes,
			renderer = chart.renderer,
			options = chart.options;

		// Title
		chart.setTitle();


		// Legend
		chart.legend = new Legend(chart, options.legend);

		chart.getStacks(); // render stacks

		// Get margins by pre-rendering axes
		// set axes scales
		each(axes, function (axis) {
			axis.setScale();
		});

		chart.getMargins();

		chart.maxTicks = null; // reset for second pass
		each(axes, function (axis) {
			axis.setTickPositions(true); // update to reflect the new margins
			axis.setMaxTicks();
		});
		chart.adjustTickAmounts();
		chart.getMargins(); // second pass to check for new labels


		// Draw the borders and backgrounds
		chart.drawChartBox();


		// Axes
		if (chart.hasCartesianSeries) {
			each(axes, function (axis) {
				axis.render();
			});
		}

		// The series
		if (!chart.seriesGroup) {
			chart.seriesGroup = renderer.g('series-group')
				.attr({ zIndex: 3 })
				.add();
		}
		chart.renderSeries();

		// Labels
		chart.renderLabels();

		// Credits
		chart.showCredits(options.credits);

		// Set flag
		chart.hasRendered = true;

	},

	/**
	 * Show chart credits based on config options
	 */
	showCredits: function (credits) {
		if (credits.enabled && !this.credits) {
			this.credits = this.renderer.text(
				credits.text,
				0,
				0
			)
			.on('click', function () {
				if (credits.href) {
					location.href = credits.href;
				}
			})
			.attr({
				align: credits.position.align,
				zIndex: 8
			})
			.css(credits.style)
			.add()
			.align(credits.position);
		}
	},

	/**
	 * Clean up memory usage
	 */
	destroy: function () {
		var chart = this,
			axes = chart.axes,
			series = chart.series,
			container = chart.container,
			i,
			parentNode = container && container.parentNode;

		// fire the chart.destoy event
		fireEvent(chart, 'destroy');

		// Delete the chart from charts lookup array
		charts[chart.index] = UNDEFINED;
		chartCount--;
		chart.renderTo.removeAttribute('data-highcharts-chart');

		// remove events
		removeEvent(chart);

		// ==== Destroy collections:
		// Destroy axes
		i = axes.length;
		while (i--) {
			axes[i] = axes[i].destroy();
		}

		// Destroy each series
		i = series.length;
		while (i--) {
			series[i] = series[i].destroy();
		}

		// ==== Destroy chart properties:
		each(['title', 'subtitle', 'chartBackground', 'plotBackground', 'plotBGImage',
				'plotBorder', 'seriesGroup', 'clipRect', 'credits', 'pointer', 'scroller',
				'rangeSelector', 'legend', 'resetZoomButton', 'tooltip', 'renderer'], function (name) {
			var prop = chart[name];

			if (prop && prop.destroy) {
				chart[name] = prop.destroy();
			}
		});

		// remove container and all SVG
		if (container) { // can break in IE when destroyed before finished loading
			container.innerHTML = '';
			removeEvent(container);
			if (parentNode) {
				discardElement(container);
			}

		}

		// clean it all up
		for (i in chart) {
			delete chart[i];
		}

	},


	/**
	 * VML namespaces can't be added until after complete. Listening
	 * for Perini's doScroll hack is not enough.
	 */
	isReadyToRender: function () {
		var chart = this;

		// Note: in spite of JSLint's complaints, win == win.top is required
		/*jslint eqeq: true*/
		if ((!hasSVG && (win == win.top && doc.readyState !== 'complete')) || (useCanVG && !win.canvg)) {
		/*jslint eqeq: false*/
			if (useCanVG) {
				// Delay rendering until canvg library is downloaded and ready
				CanVGController.push(function () { chart.firstRender(); }, chart.options.global.canvasToolsURL);
			} else {
				doc.attachEvent('onreadystatechange', function () {
					doc.detachEvent('onreadystatechange', chart.firstRender);
					if (doc.readyState === 'complete') {
						chart.firstRender();
					}
				});
			}
			return false;
		}
		return true;
	},

	/**
	 * Prepare for first rendering after all data are loaded
	 */
	firstRender: function () {
		var chart = this,
			options = chart.options,
			callback = chart.callback;

		// Check whether the chart is ready to render
		if (!chart.isReadyToRender()) {
			return;
		}

		// Create the container
		chart.getContainer();

		// Run an early event after the container and renderer are established
		fireEvent(chart, 'init');


		chart.resetMargins();
		chart.setChartSize();

		// Set the common chart properties (mainly invert) from the given series
		chart.propFromSeries();

		// get axes
		chart.getAxes();

		// Initialize the series
		each(options.series || [], function (serieOptions) {
			chart.initSeries(serieOptions);
		});

		chart.linkSeries();

		// Run an event after axes and series are initialized, but before render. At this stage,
		// the series data is indexed and cached in the xData and yData arrays, so we can access
		// those before rendering. Used in Highstock.
		fireEvent(chart, 'beforeRender');

		// depends on inverted and on margins being set
		if (Highcharts.Pointer) {
			chart.pointer = new Pointer(chart, options);
		}

		chart.render();

		// add canvas
		chart.renderer.draw();
		// run callbacks
		if (callback) {
			callback.apply(chart, [chart]);
		}
		each(chart.callbacks, function (fn) {
			fn.apply(chart, [chart]);
		});


		// If the chart was rendered outside the top container, put it back in
		chart.cloneRenderTo(true);

		fireEvent(chart, 'load');

	},

	/**
	* Creates arrays for spacing and margin from given options.
	*/
	splashArray: function (target, options) {
		var oVar = options[target],
			tArray = isObject(oVar) ? oVar : [oVar, oVar, oVar, oVar];

		return [pick(options[target + 'Top'], tArray[0]),
				pick(options[target + 'Right'], tArray[1]),
				pick(options[target + 'Bottom'], tArray[2]),
				pick(options[target + 'Left'], tArray[3])];
	}
}; // end Chart

// Hook for exporting module
Chart.prototype.callbacks = [];

var CenteredSeriesMixin = Highcharts.CenteredSeriesMixin = {
	/**
	 * Get the center of the pie based on the size and center options relative to the
	 * plot area. Borrowed by the polar and gauge series types.
	 */
	getCenter: function () {

		var options = this.options,
			chart = this.chart,
			slicingRoom = 2 * (options.slicedOffset || 0),
			handleSlicingRoom,
			plotWidth = chart.plotWidth - 2 * slicingRoom,
			plotHeight = chart.plotHeight - 2 * slicingRoom,
			centerOption = options.center,
			positions = [pick(centerOption[0], '50%'), pick(centerOption[1], '50%'), options.size || '100%', options.innerSize || 0],
			smallestSize = mathMin(plotWidth, plotHeight),
			isPercent;

		return map(positions, function (length, i) {
			isPercent = /%$/.test(length);
			handleSlicingRoom = i < 2 || (i === 2 && isPercent);
			return (isPercent ?
				// i == 0: centerX, relative to width
				// i == 1: centerY, relative to height
				// i == 2: size, relative to smallestSize
				// i == 4: innerSize, relative to smallestSize
				[plotWidth, plotHeight, smallestSize, smallestSize][i] *
					pInt(length) / 100 :
				length) + (handleSlicingRoom ? slicingRoom : 0);
		});
	}
};

/**
 * The Point object and prototype. Inheritable and used as base for PiePoint
 */
var Point = function () {};
Point.prototype = {

	/**
	 * Initialize the point
	 * @param {Object} series The series object containing this point
	 * @param {Object} options The data in either number, array or object format
	 */
	init: function (series, options, x) {

		var point = this,
			colors;
		point.series = series;
		point.applyOptions(options, x);
		point.pointAttr = {};

		if (series.options.colorByPoint) {
			colors = series.options.colors || series.chart.options.colors;
			point.color = point.color || colors[series.colorCounter++];
			// loop back to zero
			if (series.colorCounter === colors.length) {
				series.colorCounter = 0;
			}
		}

		series.chart.pointCount++;
		return point;
	},
	/**
	 * Apply the options containing the x and y data and possible some extra properties.
	 * This is called on point init or from point.update.
	 *
	 * @param {Object} options
	 */
	applyOptions: function (options, x) {
		var point = this,
			series = point.series,
			pointValKey = series.options.pointValKey || series.pointValKey;

		options = Point.prototype.optionsToObject.call(this, options);

		// copy options directly to point
		extend(point, options);
		point.options = point.options ? extend(point.options, options) : options;

		// For higher dimension series types. For instance, for ranges, point.y is mapped to point.low.
		if (pointValKey) {
			point.y = point[pointValKey];
		}

		// If no x is set by now, get auto incremented value. All points must have an
		// x value, however the y value can be null to create a gap in the series
		if (point.x === UNDEFINED && series) {
			point.x = x === UNDEFINED ? series.autoIncrement() : x;
		}

		return point;
	},

	/**
	 * Transform number or array configs into objects
	 */
	optionsToObject: function (options) {
		var ret = {},
			series = this.series,
			pointArrayMap = series.pointArrayMap || ['y'],
			valueCount = pointArrayMap.length,
			firstItemType,
			i = 0,
			j = 0;

		if (typeof options === 'number' || options === null) {
			ret[pointArrayMap[0]] = options;

		} else if (isArray(options)) {
			// with leading x value
			if (options.length > valueCount) {
				firstItemType = typeof options[0];
				if (firstItemType === 'string') {
					ret.name = options[0];
				} else if (firstItemType === 'number') {
					ret.x = options[0];
				}
				i++;
			}
			while (j < valueCount) {
				ret[pointArrayMap[j++]] = options[i++];
			}
		} else if (typeof options === 'object') {
			ret = options;

			// This is the fastest way to detect if there are individual point dataLabels that need
			// to be considered in drawDataLabels. These can only occur in object configs.
			if (options.dataLabels) {
				series._hasPointLabels = true;
			}

			// Same approach as above for markers
			if (options.marker) {
				series._hasPointMarkers = true;
			}
		}
		return ret;
	},

	/**
	 * Destroy a point to clear memory. Its reference still stays in series.data.
	 */
	destroy: function () {
		var point = this,
			series = point.series,
			chart = series.chart,
			hoverPoints = chart.hoverPoints,
			prop;

		chart.pointCount--;

		if (hoverPoints) {
			point.setState();
			erase(hoverPoints, point);
			if (!hoverPoints.length) {
				chart.hoverPoints = null;
			}

		}
		if (point === chart.hoverPoint) {
			point.onMouseOut();
		}

		// remove all events
		if (point.graphic || point.dataLabel) { // removeEvent and destroyElements are performance expensive
			removeEvent(point);
			point.destroyElements();
		}

		if (point.legendItem) { // pies have legend items
			chart.legend.destroyItem(point);
		}

		for (prop in point) {
			point[prop] = null;
		}


	},

	/**
	 * Destroy SVG elements associated with the point
	 */
	destroyElements: function () {
		var point = this,
			props = ['graphic', 'dataLabel', 'dataLabelUpper', 'group', 'connector', 'shadowGroup'],
			prop,
			i = 6;
		while (i--) {
			prop = props[i];
			if (point[prop]) {
				point[prop] = point[prop].destroy();
			}
		}
	},

	/**
	 * Return the configuration hash needed for the data label and tooltip formatters
	 */
	getLabelConfig: function () {
		var point = this;
		return {
			x: point.category,
			y: point.y,
			key: point.name || point.category,
			series: point.series,
			point: point,
			percentage: point.percentage,
			total: point.total || point.stackTotal
		};
	},

	/**
	 * Extendable method for formatting each point's tooltip line
	 *
	 * @return {String} A string to be concatenated in to the common tooltip text
	 */
	tooltipFormatter: function (pointFormat) {

		// Insert options for valueDecimals, valuePrefix, and valueSuffix
		var series = this.series,
			seriesTooltipOptions = series.tooltipOptions,
			valueDecimals = pick(seriesTooltipOptions.valueDecimals, ''),
			valuePrefix = seriesTooltipOptions.valuePrefix || '',
			valueSuffix = seriesTooltipOptions.valueSuffix || '';

		// Loop over the point array map and replace unformatted values with sprintf formatting markup
		each(series.pointArrayMap || ['y'], function (key) {
			key = '{point.' + key; // without the closing bracket
			if (valuePrefix || valueSuffix) {
				pointFormat = pointFormat.replace(key + '}', valuePrefix + key + '}' + valueSuffix);
			}
			pointFormat = pointFormat.replace(key + '}', key + ':,.' + valueDecimals + 'f}');
		});

		return format(pointFormat, {
			point: this,
			series: this.series
		});
	},

	/**
	 * Fire an event on the Point object. Must not be renamed to fireEvent, as this
	 * causes a name clash in MooTools
	 * @param {String} eventType
	 * @param {Object} eventArgs Additional event arguments
	 * @param {Function} defaultFunction Default event handler
	 */
	firePointEvent: function (eventType, eventArgs, defaultFunction) {
		var point = this,
			series = this.series,
			seriesOptions = series.options;

		// load event handlers on demand to save time on mouseover/out
		if (seriesOptions.point.events[eventType] || (point.options && point.options.events && point.options.events[eventType])) {
			this.importEvents();
		}

		// add default handler if in selection mode
		if (eventType === 'click' && seriesOptions.allowPointSelect) {
			defaultFunction = function (event) {
				// Control key is for Windows, meta (= Cmd key) for Mac, Shift for Opera
				point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);
			};
		}

		fireEvent(this, eventType, eventArgs, defaultFunction);
	}
};/**
 * @classDescription The base function which all other series types inherit from. The data in the series is stored
 * in various arrays.
 *
 * - First, series.options.data contains all the original config options for
 * each point whether added by options or methods like series.addPoint.
 * - Next, series.data contains those values converted to points, but in case the series data length
 * exceeds the cropThreshold, or if the data is grouped, series.data doesn't contain all the points. It
 * only contains the points that have been created on demand.
 * - Then there's series.points that contains all currently visible point objects. In case of cropping,
 * the cropped-away points are not part of this array. The series.points array starts at series.cropStart
 * compared to series.data and series.options.data. If however the series data is grouped, these can't
 * be correlated one to one.
 * - series.xData and series.processedXData contain clean x values, equivalent to series.data and series.points.
 * - series.yData and series.processedYData contain clean x values, equivalent to series.data and series.points.
 *
 * @param {Object} chart
 * @param {Object} options
 */
var Series = function () {};

Series.prototype = {

	isCartesian: true,
	type: 'line',
	pointClass: Point,
	sorted: true, // requires the data to be sorted
	requireSorting: true,
	pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
		stroke: 'lineColor',
		'stroke-width': 'lineWidth',
		fill: 'fillColor',
		r: 'radius'
	},
	axisTypes: ['xAxis', 'yAxis'],
	colorCounter: 0,
	parallelArrays: ['x', 'y'], // each point's x and y values are stored in this.xData and this.yData
	init: function (chart, options) {
		var series = this,
			eventType,
			events,
			chartSeries = chart.series,
			sortByIndex = function (a, b) {
				return pick(a.options.index, a._i) - pick(b.options.index, b._i);
			};

		series.chart = chart;
		series.options = options = series.setOptions(options); // merge with plotOptions
		series.linkedSeries = [];

		// bind the axes
		series.bindAxes();

		// set some variables
		extend(series, {
			name: options.name,
			state: NORMAL_STATE,
			pointAttr: {},
			visible: options.visible !== false, // true by default
			selected: options.selected === true // false by default
		});

		// special
		if (useCanVG) {
			options.animation = false;
		}

		// register event listeners
		events = options.events;
		for (eventType in events) {
			addEvent(series, eventType, events[eventType]);
		}
		if (
			(events && events.click) ||
			(options.point && options.point.events && options.point.events.click) ||
			options.allowPointSelect
		) {
			chart.runTrackerClick = true;
		}

		series.getColor();
		series.getSymbol();

		// Set the data
		each(series.parallelArrays, function (key) {
			series[key + 'Data'] = [];
		});
		series.setData(options.data, false);

		// Mark cartesian
		if (series.isCartesian) {
			chart.hasCartesianSeries = true;
		}

		// Register it in the chart
		chartSeries.push(series);
		series._i = chartSeries.length - 1;

		// Sort series according to index option (#248, #1123, #2456)
		stableSort(chartSeries, sortByIndex);
		if (this.yAxis) {
			stableSort(this.yAxis.series, sortByIndex);
		}

		each(chartSeries, function (series, i) {
			series.index = i;
			series.name = series.name || 'Series ' + (i + 1);
		});

	},

	/**
	 * Set the xAxis and yAxis properties of cartesian series, and register the series
	 * in the axis.series array
	 */
	bindAxes: function () {
		var series = this,
			seriesOptions = series.options,
			chart = series.chart,
			axisOptions;

		each(series.axisTypes || [], function (AXIS) { // repeat for xAxis and yAxis

			each(chart[AXIS], function (axis) { // loop through the chart's axis objects
				axisOptions = axis.options;

				// apply if the series xAxis or yAxis option mathches the number of the
				// axis, or if undefined, use the first axis
				if ((seriesOptions[AXIS] === axisOptions.index) ||
						(seriesOptions[AXIS] !== UNDEFINED && seriesOptions[AXIS] === axisOptions.id) ||
						(seriesOptions[AXIS] === UNDEFINED && axisOptions.index === 0)) {

					// register this series in the axis.series lookup
					axis.series.push(series);

					// set this series.xAxis or series.yAxis reference
					series[AXIS] = axis;

					// mark dirty for redraw
					axis.isDirty = true;
				}
			});

			// The series needs an X and an Y axis
			if (!series[AXIS] && series.optionalAxis !== AXIS) {
				error(18, true);
			}

		});
	},

	/**
	 * For simple series types like line and column, the data values are held in arrays like
	 * xData and yData for quick lookup to find extremes and more. For multidimensional series
	 * like bubble and map, this can be extended with arrays like zData and valueData by
	 * adding to the series.parallelArrays array.
	 */
	updateParallelArrays: function (point, i) {
		var series = point.series,
			args = arguments,
			fn = typeof i === 'number' ?
				 // Insert the value in the given position
				function (key) {
					var val = key === 'y' && series.toYData ? series.toYData(point) : point[key];
					series[key + 'Data'][i] = val;
				} :
				// Apply the method specified in i with the following arguments as arguments
				function (key) {
					Array.prototype[i].apply(series[key + 'Data'], Array.prototype.slice.call(args, 2));
				};

		each(series.parallelArrays, fn);
	},

	/**
	 * Return an auto incremented x value based on the pointStart and pointInterval options.
	 * This is only used if an x value is not given for the point that calls autoIncrement.
	 */
	autoIncrement: function () {
		var series = this,
			options = series.options,
			xIncrement = series.xIncrement;

		xIncrement = pick(xIncrement, options.pointStart, 0);

		series.pointInterval = pick(series.pointInterval, options.pointInterval, 1);

		series.xIncrement = xIncrement + series.pointInterval;
		return xIncrement;
	},

	/**
	 * Divide the series data into segments divided by null values.
	 */
	getSegments: function () {
		var series = this,
			lastNull = -1,
			segments = [],
			i,
			points = series.points,
			pointsLength = points.length;

		if (pointsLength) { // no action required for []

			// if connect nulls, just remove null points
			if (series.options.connectNulls) {
				i = pointsLength;
				while (i--) {
					if (points[i].y === null) {
						points.splice(i, 1);
					}
				}
				if (points.length) {
					segments = [points];
				}

			// else, split on null points
			} else {
				each(points, function (point, i) {
					if (point.y === null) {
						if (i > lastNull + 1) {
							segments.push(points.slice(lastNull + 1, i));
						}
						lastNull = i;
					} else if (i === pointsLength - 1) { // last value
						segments.push(points.slice(lastNull + 1, i + 1));
					}
				});
			}
		}

		// register it
		series.segments = segments;
	},

	/**
	 * Set the series options by merging from the options tree
	 * @param {Object} itemOptions
	 */
	setOptions: function (itemOptions) {
		var chart = this.chart,
			chartOptions = chart.options,
			plotOptions = chartOptions.plotOptions,
			userOptions = chart.userOptions || {},
			userPlotOptions = userOptions.plotOptions || {},
			typeOptions = plotOptions[this.type],
			options;

		this.userOptions = itemOptions;

		options = merge(
			typeOptions,
			plotOptions.series,
			itemOptions
		);

		// The tooltip options are merged between global and series specific options
		this.tooltipOptions = merge(
			defaultOptions.tooltip,
			defaultOptions.plotOptions[this.type].tooltip,
			userOptions.tooltip,
			userPlotOptions.series && userPlotOptions.series.tooltip,
			userPlotOptions[this.type] && userPlotOptions[this.type].tooltip,
			itemOptions.tooltip
		);

		// Delete marker object if not allowed (#1125)
		if (typeOptions.marker === null) {
			delete options.marker;
		}

		return options;

	},

	getCyclic: function (prop, value, defaults) {
		var i,
			userOptions = this.userOptions,
			indexName = '_' + prop + 'Index',
			counterName = prop + 'Counter';

		if (!value) {
			if (defined(userOptions[indexName])) { // after Series.update()
				i = userOptions[indexName];
			} else {
				userOptions[indexName] = i = this.chart[counterName] % defaults.length;
				this.chart[counterName] += 1;
			}
			value = defaults[i];
		}
		this[prop] = value;
	},

	/**
	 * Get the series' color
	 */
	getColor: function () {
		if (!this.options.colorByPoint) {
			this.getCyclic('color', this.options.color || defaultPlotOptions[this.type].color, this.chart.options.colors);
		}
	},
	/**
	 * Get the series' symbol
	 */
	getSymbol: function () {
		var seriesMarkerOption = this.options.marker;

		this.getCyclic('symbol', seriesMarkerOption.symbol, this.chart.options.symbols);

		// don't substract radius in image symbols (#604)
		if (/^url/.test(this.symbol)) {
			seriesMarkerOption.radius = 0;
		}
	},

	drawLegendSymbol: LegendSymbolMixin.drawLineMarker,

	/**
	 * Replace the series data with a new set of data
	 * @param {Object} data
	 * @param {Object} redraw
	 */
	setData: function (data, redraw, animation, updatePoints) {
		var series = this,
			oldData = series.points,
			oldDataLength = (oldData && oldData.length) || 0,
			dataLength,
			options = series.options,
			chart = series.chart,
			firstPoint = null,
			xAxis = series.xAxis,
			hasCategories = xAxis && !!xAxis.categories,
			tooltipPoints = series.tooltipPoints,
			i,
			turboThreshold = options.turboThreshold,
			pt,
			xData = this.xData,
			yData = this.yData,
			pointArrayMap = series.pointArrayMap,
			valueCount = pointArrayMap && pointArrayMap.length;

		data = data || [];
		dataLength = data.length;
		redraw = pick(redraw, true);

		// If the point count is the same as is was, just run Point.update which is
		// cheaper, allows animation, and keeps references to points.
		if (updatePoints !== false && dataLength && oldDataLength === dataLength && !series.cropped && !series.hasGroupedData) {
			each(data, function (point, i) {
				oldData[i].update(point, false, null, false);
			});

		} else {

			// Reset properties
			series.xIncrement = null;
			series.pointRange = hasCategories ? 1 : options.pointRange;

			series.colorCounter = 0; // for series with colorByPoint (#1547)

			// Update parallel arrays
			each(this.parallelArrays, function (key) {
				series[key + 'Data'].length = 0;
			});

			// In turbo mode, only one- or twodimensional arrays of numbers are allowed. The
			// first value is tested, and we assume that all the rest are defined the same
			// way. Although the 'for' loops are similar, they are repeated inside each
			// if-else conditional for max performance.
			if (turboThreshold && dataLength > turboThreshold) {

				// find the first non-null point
				i = 0;
				while (firstPoint === null && i < dataLength) {
					firstPoint = data[i];
					i++;
				}


				if (isNumber(firstPoint)) { // assume all points are numbers
					var x = pick(options.pointStart, 0),
						pointInterval = pick(options.pointInterval, 1);

					for (i = 0; i < dataLength; i++) {
						xData[i] = x;
						yData[i] = data[i];
						x += pointInterval;
					}
					series.xIncrement = x;
				} else if (isArray(firstPoint)) { // assume all points are arrays
					if (valueCount) { // [x, low, high] or [x, o, h, l, c]
						for (i = 0; i < dataLength; i++) {
							pt = data[i];
							xData[i] = pt[0];
							yData[i] = pt.slice(1, valueCount + 1);
						}
					} else { // [x, y]
						for (i = 0; i < dataLength; i++) {
							pt = data[i];
							xData[i] = pt[0];
							yData[i] = pt[1];
						}
					}
				} else {
					error(12); // Highcharts expects configs to be numbers or arrays in turbo mode
				}
			} else {
				for (i = 0; i < dataLength; i++) {
					if (data[i] !== UNDEFINED) { // stray commas in oldIE
						pt = { series: series };
						series.pointClass.prototype.applyOptions.apply(pt, [data[i]]);
						series.updateParallelArrays(pt, i);
						if (hasCategories && pt.name) {
							xAxis.names[pt.x] = pt.name; // #2046
						}
					}
				}
			}

			// Forgetting to cast strings to numbers is a common caveat when handling CSV or JSON
			if (isString(yData[0])) {
				error(14, true);
			}

			series.data = [];
			series.options.data = data;
			//series.zData = zData;

			// destroy old points
			i = oldDataLength;
			while (i--) {
				if (oldData[i] && oldData[i].destroy) {
					oldData[i].destroy();
				}
			}
			if (tooltipPoints) { // #2594
				tooltipPoints.length = 0;
			}

			// reset minRange (#878)
			if (xAxis) {
				xAxis.minRange = xAxis.userMinRange;
			}

			// redraw
			series.isDirty = series.isDirtyData = chart.isDirtyBox = true;
			animation = false;
		}

		if (redraw) {
			chart.redraw(animation);
		}
	},

	/**
	 * Process the data by cropping away unused data points if the series is longer
	 * than the crop threshold. This saves computing time for lage series.
	 */
	processData: function (force) {
		var series = this,
			processedXData = series.xData, // copied during slice operation below
			processedYData = series.yData,
			dataLength = processedXData.length,
			croppedData,
			cropStart = 0,
			cropped,
			distance,
			closestPointRange,
			xAxis = series.xAxis,
			i, // loop variable
			options = series.options,
			cropThreshold = options.cropThreshold,
			activePointCount = 0,
			isCartesian = series.isCartesian,
			xExtremes,
			min,
			max;

		// If the series data or axes haven't changed, don't go through this. Return false to pass
		// the message on to override methods like in data grouping.
		if (isCartesian && !series.isDirty && !xAxis.isDirty && !series.yAxis.isDirty && !force) {
			return false;
		}

		if (xAxis) {
			xExtremes = xAxis.getExtremes(); // corrected for log axis (#3053)
			min = xExtremes.min;
			max = xExtremes.max;
		}

		// optionally filter out points outside the plot area
		if (isCartesian && series.sorted && (!cropThreshold || dataLength > cropThreshold || series.forceCrop)) {

			// it's outside current extremes
			if (processedXData[dataLength - 1] < min || processedXData[0] > max) {
				processedXData = [];
				processedYData = [];

			// only crop if it's actually spilling out
			} else if (processedXData[0] < min || processedXData[dataLength - 1] > max) {
				croppedData = this.cropData(series.xData, series.yData, min, max);
				processedXData = croppedData.xData;
				processedYData = croppedData.yData;
				cropStart = croppedData.start;
				cropped = true;
				activePointCount = processedXData.length;
			}
		}


		// Find the closest distance between processed points
		for (i = processedXData.length - 1; i >= 0; i--) {
			distance = processedXData[i] - processedXData[i - 1];

			if (!cropped && processedXData[i] > min && processedXData[i] < max) {
				activePointCount++;
			}

			if (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) {
				closestPointRange = distance;

			// Unsorted data is not supported by the line tooltip, as well as data grouping and
			// navigation in Stock charts (#725) and width calculation of columns (#1900)
			} else if (distance < 0 && series.requireSorting) {
				error(15);
			}
		}

		// Record the properties
		series.cropped = cropped; // undefined or true
		series.cropStart = cropStart;
		series.processedXData = processedXData;
		series.processedYData = processedYData;
		series.activePointCount = activePointCount;

		if (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC
			series.pointRange = closestPointRange || 1;
		}
		series.closestPointRange = closestPointRange;

	},

	/**
	 * Iterate over xData and crop values between min and max. Returns object containing crop start/end
	 * cropped xData with corresponding part of yData, dataMin and dataMax within the cropped range
	 */
	cropData: function (xData, yData, min, max) {
		var dataLength = xData.length,
			cropStart = 0,
			cropEnd = dataLength,
			cropShoulder = pick(this.cropShoulder, 1), // line-type series need one point outside
			i;

		// iterate up to find slice start
		for (i = 0; i < dataLength; i++) {
			if (xData[i] >= min) {
				cropStart = mathMax(0, i - cropShoulder);
				break;
			}
		}

		// proceed to find slice end
		for (; i < dataLength; i++) {
			if (xData[i] > max) {
				cropEnd = i + cropShoulder;
				break;
			}
		}

		return {
			xData: xData.slice(cropStart, cropEnd),
			yData: yData.slice(cropStart, cropEnd),
			start: cropStart,
			end: cropEnd
		};
	},


	/**
	 * Generate the data point after the data has been processed by cropping away
	 * unused points and optionally grouped in Highcharts Stock.
	 */
	generatePoints: function () {
		var series = this,
			options = series.options,
			dataOptions = options.data,
			data = series.data,
			dataLength,
			processedXData = series.processedXData,
			processedYData = series.processedYData,
			pointClass = series.pointClass,
			processedDataLength = processedXData.length,
			cropStart = series.cropStart || 0,
			cursor,
			hasGroupedData = series.hasGroupedData,
			point,
			points = [],
			i;

		if (!data && !hasGroupedData) {
			var arr = [];
			arr.length = dataOptions.length;
			data = series.data = arr;
		}

		for (i = 0; i < processedDataLength; i++) {
			cursor = cropStart + i;
			if (!hasGroupedData) {
				if (data[cursor]) {
					point = data[cursor];
				} else if (dataOptions[cursor] !== UNDEFINED) { // #970
					data[cursor] = point = (new pointClass()).init(series, dataOptions[cursor], processedXData[i]);
				}
				points[i] = point;
			} else {
				// splat the y data in case of ohlc data array
				points[i] = (new pointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));
			}
			points[i].index = cursor; // For faster access in Point.update
		}

		// Hide cropped-away points - this only runs when the number of points is above cropThreshold, or when
		// swithching view from non-grouped data to grouped data (#637)
		if (data && (processedDataLength !== (dataLength = data.length) || hasGroupedData)) {
			for (i = 0; i < dataLength; i++) {
				if (i === cropStart && !hasGroupedData) { // when has grouped data, clear all points
					i += processedDataLength;
				}
				if (data[i]) {
					data[i].destroyElements();
					data[i].plotX = UNDEFINED; // #1003
				}
			}
		}

		series.data = data;
		series.points = points;
	},

	/**
	 * Calculate Y extremes for visible data
	 */
	getExtremes: function (yData) {
		var xAxis = this.xAxis,
			yAxis = this.yAxis,
			xData = this.processedXData,
			yDataLength,
			activeYData = [],
			activeCounter = 0,
			xExtremes = xAxis.getExtremes(), // #2117, need to compensate for log X axis
			xMin = xExtremes.min,
			xMax = xExtremes.max,
			validValue,
			withinRange,
			dataMin,
			dataMax,
			x,
			y,
			i,
			j;

		yData = yData || this.stackedYData || this.processedYData;
		yDataLength = yData.length;

		for (i = 0; i < yDataLength; i++) {

			x = xData[i];
			y = yData[i];

			// For points within the visible range, including the first point outside the
			// visible range, consider y extremes
			validValue = y !== null && y !== UNDEFINED && (!yAxis.isLog || (y.length || y > 0));
			withinRange = this.getExtremesFromAll || this.cropped || ((xData[i + 1] || x) >= xMin &&
				(xData[i - 1] || x) <= xMax);

			if (validValue && withinRange) {

				j = y.length;
				if (j) { // array, like ohlc or range data
					while (j--) {
						if (y[j] !== null) {
							activeYData[activeCounter++] = y[j];
						}
					}
				} else {
					activeYData[activeCounter++] = y;
				}
			}
		}
		this.dataMin = pick(dataMin, arrayMin(activeYData));
		this.dataMax = pick(dataMax, arrayMax(activeYData));
	},

	/**
	 * Translate data points from raw data values to chart specific positioning data
	 * needed later in drawPoints, drawGraph and drawTracker.
	 */
	translate: function () {
		if (!this.processedXData) { // hidden series
			this.processData();
		}
		this.generatePoints();
		var series = this,
			options = series.options,
			stacking = options.stacking,
			xAxis = series.xAxis,
			categories = xAxis.categories,
			yAxis = series.yAxis,
			points = series.points,
			dataLength = points.length,
			hasModifyValue = !!series.modifyValue,
			i,
			pointPlacement = options.pointPlacement,
			dynamicallyPlaced = pointPlacement === 'between' || isNumber(pointPlacement),
			threshold = options.threshold;

		// Translate each point
		for (i = 0; i < dataLength; i++) {
			var point = points[i],
				xValue = point.x,
				yValue = point.y,
				yBottom = point.low,
				stack = stacking && yAxis.stacks[(series.negStacks && yValue < threshold ? '-' : '') + series.stackKey],
				pointStack,
				stackValues;

			// Discard disallowed y values for log axes
			if (yAxis.isLog && yValue <= 0) {
				point.y = yValue = null;
				error(10);
			}

			// Get the plotX translation
			point.plotX = xAxis.translate(xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags'); // Math.round fixes #591


			// Calculate the bottom y value for stacked series
			if (stacking && series.visible && stack && stack[xValue]) {

				pointStack = stack[xValue];
				stackValues = pointStack.points[series.index + ',' + i];
				yBottom = stackValues[0];
				yValue = stackValues[1];

				if (yBottom === 0) {
					yBottom = pick(threshold, yAxis.min);
				}
				if (yAxis.isLog && yBottom <= 0) { // #1200, #1232
					yBottom = null;
				}

				point.total = point.stackTotal = pointStack.total;
				point.percentage = pointStack.total && (point.y / pointStack.total * 100);
				point.stackY = yValue;

				// Place the stack label
				pointStack.setOffset(series.pointXOffset || 0, series.barW || 0);

			}

			// Set translated yBottom or remove it
			point.yBottom = defined(yBottom) ?
				yAxis.translate(yBottom, 0, 1, 0, 1) :
				null;

			// general hook, used for Highstock compare mode
			if (hasModifyValue) {
				yValue = series.modifyValue(yValue, point);
			}

			// Set the the plotY value, reset it for redraws
			point.plotY = (typeof yValue === 'number' && yValue !== Infinity) ?
				//mathRound(yAxis.translate(yValue, 0, 1, 0, 1) * 10) / 10 : // Math.round fixes #591
				yAxis.translate(yValue, 0, 1, 0, 1) :
				UNDEFINED;

			// Set client related positions for mouse tracking
			point.clientX = dynamicallyPlaced ? xAxis.translate(xValue, 0, 0, 0, 1) : point.plotX; // #1514

			point.negative = point.y < (threshold || 0);

			// some API data
			point.category = categories && categories[point.x] !== UNDEFINED ?
				categories[point.x] : point.x;

		}

		// now that we have the cropped data, build the segments
		series.getSegments();
	},

	/**
	 * Animate in the series
	 */
	animate: function (init) {
		var series = this,
			chart = series.chart,
			renderer = chart.renderer,
			clipRect,
			markerClipRect,
			animation = series.options.animation,
			clipBox = series.clipBox || chart.clipBox,
			inverted = chart.inverted,
			sharedClipKey;

		// Animation option is set to true
		if (animation && !isObject(animation)) {
			animation = defaultPlotOptions[series.type].animation;
		}
		sharedClipKey = ['_sharedClip', animation.duration, animation.easing, clipBox.height].join(',');

		// Initialize the animation. Set up the clipping rectangle.
		if (init) {

			// If a clipping rectangle with the same properties is currently present in the chart, use that.
			clipRect = chart[sharedClipKey];
			markerClipRect = chart[sharedClipKey + 'm'];
			if (!clipRect) {
				chart[sharedClipKey] = clipRect = renderer.clipRect(
					extend(clipBox, { width: 0 })
				);

				chart[sharedClipKey + 'm'] = markerClipRect = renderer.clipRect(
					-99, // include the width of the first marker
					inverted ? -chart.plotLeft : -chart.plotTop,
					99,
					inverted ? chart.chartWidth : chart.chartHeight
				);
			}
			series.group.clip(clipRect);
			series.markerGroup.clip(markerClipRect);
			series.sharedClipKey = sharedClipKey;

		// Run the animation
		} else {
			clipRect = chart[sharedClipKey];
			if (clipRect) {
				clipRect.animate({
					width: chart.plotSizeX
				}, animation);
			}
			if (chart[sharedClipKey + 'm']) {
				chart[sharedClipKey + 'm'].animate({
					width: chart.plotSizeX + 99
				}, animation);
			}

			// Delete this function to allow it only once
			series.animate = null;

		}
	},

	/**
	 * This runs after animation to land on the final plot clipping
	 */
	afterAnimate: function () {
		var chart = this.chart,
			sharedClipKey = this.sharedClipKey,
			group = this.group,
			clipBox = this.clipBox;

		if (group && this.options.clip !== false) {
			if (!sharedClipKey || !clipBox) {
				group.clip(clipBox ? chart.renderer.clipRect(clipBox) : chart.clipRect);
			}
			this.markerGroup.clip(); // no clip
		}

		fireEvent(this, 'afterAnimate');

		// Remove the shared clipping rectancgle when all series are shown
		setTimeout(function () {
			if (sharedClipKey && chart[sharedClipKey]) {
				if (!clipBox) {
					chart[sharedClipKey] = chart[sharedClipKey].destroy();
				}
				if (chart[sharedClipKey + 'm']) {
					chart[sharedClipKey + 'm'] = chart[sharedClipKey + 'm'].destroy();
				}
			}
		}, 100);
	},

	/**
	 * Draw the markers
	 */
	drawPoints: function () {
		var series = this,
			pointAttr,
			points = series.points,
			chart = series.chart,
			plotX,
			plotY,
			i,
			point,
			radius,
			symbol,
			isImage,
			graphic,
			options = series.options,
			seriesMarkerOptions = options.marker,
			seriesPointAttr = series.pointAttr[''],
			pointMarkerOptions,
			hasPointMarker,
			enabled,
			isInside,
			markerGroup = series.markerGroup,
			globallyEnabled = pick(
				seriesMarkerOptions.enabled,
				!series.requireSorting || series.activePointCount < (0.5 * series.xAxis.len / seriesMarkerOptions.radius)
			);

		if (seriesMarkerOptions.enabled !== false || series._hasPointMarkers) {

			i = points.length;
			while (i--) {
				point = points[i];
				plotX = mathFloor(point.plotX); // #1843
				plotY = point.plotY;
				graphic = point.graphic;
				pointMarkerOptions = point.marker || {};
				hasPointMarker = !!point.marker;
				enabled = (globallyEnabled && pointMarkerOptions.enabled === UNDEFINED) || pointMarkerOptions.enabled;
				isInside = chart.isInsidePlot(mathRound(plotX), plotY, chart.inverted); // #1858

				// only draw the point if y is defined
				if (enabled && plotY !== UNDEFINED && !isNaN(plotY) && point.y !== null) {

					// shortcuts
					pointAttr = point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE] || seriesPointAttr;
					radius = pointAttr.r;
					symbol = pick(pointMarkerOptions.symbol, series.symbol);
					isImage = symbol.indexOf('url') === 0;

					if (graphic) { // update
						graphic[isInside ? 'show' : 'hide'](true) // Since the marker group isn't clipped, each individual marker must be toggled
							.animate(extend({
								x: plotX - radius,
								y: plotY - radius
							}, graphic.symbolName ? { // don't apply to image symbols #507
								width: 2 * radius,
								height: 2 * radius
							} : {}));
					} else if (isInside && (radius > 0 || isImage)) {
						point.graphic = graphic = chart.renderer.symbol(
							symbol,
							plotX - radius,
							plotY - radius,
							2 * radius,
							2 * radius,
							hasPointMarker ? pointMarkerOptions : seriesMarkerOptions
						)
						.attr(pointAttr)
						.add(markerGroup);
					}

				} else if (graphic) {
					point.graphic = graphic.destroy(); // #1269
				}
			}
		}

	},

	/**
	 * Convert state properties from API naming conventions to SVG attributes
	 *
	 * @param {Object} options API options object
	 * @param {Object} base1 SVG attribute object to inherit from
	 * @param {Object} base2 Second level SVG attribute object to inherit from
	 */
	convertAttribs: function (options, base1, base2, base3) {
		var conversion = this.pointAttrToOptions,
			attr,
			option,
			obj = {};

		options = options || {};
		base1 = base1 || {};
		base2 = base2 || {};
		base3 = base3 || {};

		for (attr in conversion) {
			option = conversion[attr];
			obj[attr] = pick(options[option], base1[attr], base2[attr], base3[attr]);
		}
		return obj;
	},

	/**
	 * Get the state attributes. Each series type has its own set of attributes
	 * that are allowed to change on a point's state change. Series wide attributes are stored for
	 * all series, and additionally point specific attributes are stored for all
	 * points with individual marker options. If such options are not defined for the point,
	 * a reference to the series wide attributes is stored in point.pointAttr.
	 */
	getAttribs: function () {
		var series = this,
			seriesOptions = series.options,
			normalOptions = defaultPlotOptions[series.type].marker ? seriesOptions.marker : seriesOptions,
			stateOptions = normalOptions.states,
			stateOptionsHover = stateOptions[HOVER_STATE],
			pointStateOptionsHover,
			seriesColor = series.color,
			normalDefaults = {
				stroke: seriesColor,
				fill: seriesColor
			},
			points = series.points || [], // #927
			i,
			point,
			seriesPointAttr = [],
			pointAttr,
			pointAttrToOptions = series.pointAttrToOptions,
			hasPointSpecificOptions = series.hasPointSpecificOptions,
			negativeColor = seriesOptions.negativeColor,
			defaultLineColor = normalOptions.lineColor,
			defaultFillColor = normalOptions.fillColor,
			turboThreshold = seriesOptions.turboThreshold,
			attr,
			key;

		// series type specific modifications
		if (seriesOptions.marker) { // line, spline, area, areaspline, scatter

			// if no hover radius is given, default to normal radius + 2
			stateOptionsHover.radius = stateOptionsHover.radius || normalOptions.radius + stateOptionsHover.radiusPlus;
			stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + stateOptionsHover.lineWidthPlus;

		} else { // column, bar, pie

			// if no hover color is given, brighten the normal color
			stateOptionsHover.color = stateOptionsHover.color ||
				Color(stateOptionsHover.color || seriesColor)
					.brighten(stateOptionsHover.brightness).get();
		}

		// general point attributes for the series normal state
		seriesPointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, normalDefaults);

		// HOVER_STATE and SELECT_STATE states inherit from normal state except the default radius
		each([HOVER_STATE, SELECT_STATE], function (state) {
			seriesPointAttr[state] =
					series.convertAttribs(stateOptions[state], seriesPointAttr[NORMAL_STATE]);
		});

		// set it
		series.pointAttr = seriesPointAttr;


		// Generate the point-specific attribute collections if specific point
		// options are given. If not, create a referance to the series wide point
		// attributes
		i = points.length;
		if (!turboThreshold || i < turboThreshold || hasPointSpecificOptions) {
			while (i--) {
				point = points[i];
				normalOptions = (point.options && point.options.marker) || point.options;
				if (normalOptions && normalOptions.enabled === false) {
					normalOptions.radius = 0;
				}

				if (point.negative && negativeColor) {
					point.color = point.fillColor = negativeColor;
				}

				hasPointSpecificOptions = seriesOptions.colorByPoint || point.color; // #868

				// check if the point has specific visual options
				if (point.options) {
					for (key in pointAttrToOptions) {
						if (defined(normalOptions[pointAttrToOptions[key]])) {
							hasPointSpecificOptions = true;
						}
					}
				}

				// a specific marker config object is defined for the individual point:
				// create it's own attribute collection
				if (hasPointSpecificOptions) {
					normalOptions = normalOptions || {};
					pointAttr = [];
					stateOptions = normalOptions.states || {}; // reassign for individual point
					pointStateOptionsHover = stateOptions[HOVER_STATE] = stateOptions[HOVER_STATE] || {};

					// Handle colors for column and pies
					if (!seriesOptions.marker) { // column, bar, point
						// If no hover color is given, brighten the normal color. #1619, #2579
						pointStateOptionsHover.color = pointStateOptionsHover.color || (!point.options.color && stateOptionsHover.color) ||
							Color(point.color)
								.brighten(pointStateOptionsHover.brightness || stateOptionsHover.brightness)
								.get();
					}

					// normal point state inherits series wide normal state
					attr = { color: point.color }; // #868
					if (!defaultFillColor) { // Individual point color or negative color markers (#2219)
						attr.fillColor = point.color;
					}
					if (!defaultLineColor) {
						attr.lineColor = point.color; // Bubbles take point color, line markers use white
					}
					pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);

					// inherit from point normal and series hover
					pointAttr[HOVER_STATE] = series.convertAttribs(
						stateOptions[HOVER_STATE],
						seriesPointAttr[HOVER_STATE],
						pointAttr[NORMAL_STATE]
					);

					// inherit from point normal and series hover
					pointAttr[SELECT_STATE] = series.convertAttribs(
						stateOptions[SELECT_STATE],
						seriesPointAttr[SELECT_STATE],
						pointAttr[NORMAL_STATE]
					);


				// no marker config object is created: copy a reference to the series-wide
				// attribute collection
				} else {
					pointAttr = seriesPointAttr;
				}

				point.pointAttr = pointAttr;
			}
		}
	},

	/**
	 * Clear DOM objects and free up memory
	 */
	destroy: function () {
		var series = this,
			chart = series.chart,
			issue134 = /AppleWebKit\/533/.test(userAgent),
			destroy,
			i,
			data = series.data || [],
			point,
			prop,
			axis;

		// add event hook
		fireEvent(series, 'destroy');

		// remove all events
		removeEvent(series);

		// erase from axes
		each(series.axisTypes || [], function (AXIS) {
			axis = series[AXIS];
			if (axis) {
				erase(axis.series, series);
				axis.isDirty = axis.forceRedraw = true;
			}
		});

		// remove legend items
		if (series.legendItem) {
			series.chart.legend.destroyItem(series);
		}

		// destroy all points with their elements
		i = data.length;
		while (i--) {
			point = data[i];
			if (point && point.destroy) {
				point.destroy();
			}
		}
		series.points = null;

		// Clear the animation timeout if we are destroying the series during initial animation
		clearTimeout(series.animationTimeout);

		// destroy all SVGElements associated to the series
		each(['area', 'graph', 'dataLabelsGroup', 'group', 'markerGroup', 'tracker',
				'graphNeg', 'areaNeg', 'posClip', 'negClip'], function (prop) {
			if (series[prop]) {

				// issue 134 workaround
				destroy = issue134 && prop === 'group' ?
					'hide' :
					'destroy';

				series[prop][destroy]();
			}
		});

		// remove from hoverSeries
		if (chart.hoverSeries === series) {
			chart.hoverSeries = null;
		}
		erase(chart.series, series);

		// clear all members
		for (prop in series) {
			delete series[prop];
		}
	},

	/**
	 * Return the graph path of a segment
	 */
	getSegmentPath: function (segment) {
		var series = this,
			segmentPath = [],
			step = series.options.step;

		// build the segment line
		each(segment, function (point, i) {

			var plotX = point.plotX,
				plotY = point.plotY,
				lastPoint;

			if (series.getPointSpline) { // generate the spline as defined in the SplineSeries object
				segmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));

			} else {

				// moveTo or lineTo
				segmentPath.push(i ? L : M);

				// step line?
				if (step && i) {
					lastPoint = segment[i - 1];
					if (step === 'right') {
						segmentPath.push(
							lastPoint.plotX,
							plotY
						);

					} else if (step === 'center') {
						segmentPath.push(
							(lastPoint.plotX + plotX) / 2,
							lastPoint.plotY,
							(lastPoint.plotX + plotX) / 2,
							plotY
						);

					} else {
						segmentPath.push(
							plotX,
							lastPoint.plotY
						);
					}
				}

				// normal line to next point
				segmentPath.push(
					point.plotX,
					point.plotY
				);
			}
		});

		return segmentPath;
	},

	/**
	 * Get the graph path
	 */
	getGraphPath: function () {
		var series = this,
			graphPath = [],
			segmentPath,
			singlePoints = []; // used in drawTracker

		// Divide into segments and build graph and area paths
		each(series.segments, function (segment) {

			segmentPath = series.getSegmentPath(segment);

			// add the segment to the graph, or a single point for tracking
			if (segment.length > 1) {
				graphPath = graphPath.concat(segmentPath);
			} else {
				singlePoints.push(segment[0]);
			}
		});

		// Record it for use in drawGraph and drawTracker, and return graphPath
		series.singlePoints = singlePoints;
		series.graphPath = graphPath;

		return graphPath;

	},

	/**
	 * Draw the actual graph
	 */
	drawGraph: function () {
		var series = this,
			options = this.options,
			props = [['graph', options.lineColor || this.color]],
			lineWidth = options.lineWidth,
			dashStyle =  options.dashStyle,
			roundCap = options.linecap !== 'square',
			graphPath = this.getGraphPath(),
			negativeColor = options.negativeColor;

		if (negativeColor) {
			props.push(['graphNeg', negativeColor]);
		}

		// draw the graph
		each(props, function (prop, i) {
			var graphKey = prop[0],
				graph = series[graphKey],
				attribs;

			if (graph) {
				stop(graph); // cancel running animations, #459
				graph.animate({ d: graphPath });

			} else if (lineWidth && graphPath.length) { // #1487
				attribs = {
					stroke: prop[1],
					'stroke-width': lineWidth,
					fill: NONE,
					zIndex: 1 // #1069
				};
				if (dashStyle) {
					attribs.dashstyle = dashStyle;
				} else if (roundCap) {
					attribs['stroke-linecap'] = attribs['stroke-linejoin'] = 'round';
				}

				series[graphKey] = series.chart.renderer.path(graphPath)
					.attr(attribs)
					.add(series.group)
					.shadow(!i && options.shadow);
			}
		});
	},

	/**
	 * Clip the graphs into the positive and negative coloured graphs
	 */
	clipNeg: function () {
		var options = this.options,
			chart = this.chart,
			renderer = chart.renderer,
			negativeColor = options.negativeColor || options.negativeFillColor,
			translatedThreshold,
			posAttr,
			negAttr,
			graph = this.graph,
			area = this.area,
			posClip = this.posClip,
			negClip = this.negClip,
			chartWidth = chart.chartWidth,
			chartHeight = chart.chartHeight,
			chartSizeMax = mathMax(chartWidth, chartHeight),
			yAxis = this.yAxis,
			above,
			below;

		if (negativeColor && (graph || area)) {
			translatedThreshold = mathRound(yAxis.toPixels(options.threshold || 0, true));
			if (translatedThreshold < 0) {
				chartSizeMax -= translatedThreshold; // #2534
			}
			above = {
				x: 0,
				y: 0,
				width: chartSizeMax,
				height: translatedThreshold
			};
			below = {
				x: 0,
				y: translatedThreshold,
				width: chartSizeMax,
				height: chartSizeMax
			};

			if (chart.inverted) {

				above.height = below.y = chart.plotWidth - translatedThreshold;
				if (renderer.isVML) {
					above = {
						x: chart.plotWidth - translatedThreshold - chart.plotLeft,
						y: 0,
						width: chartWidth,
						height: chartHeight
					};
					below = {
						x: translatedThreshold + chart.plotLeft - chartWidth,
						y: 0,
						width: chart.plotLeft + translatedThreshold,
						height: chartWidth
					};
				}
			}

			if (yAxis.reversed) {
				posAttr = below;
				negAttr = above;
			} else {
				posAttr = above;
				negAttr = below;
			}

			if (posClip) { // update
				posClip.animate(posAttr);
				negClip.animate(negAttr);
			} else {

				this.posClip = posClip = renderer.clipRect(posAttr);
				this.negClip = negClip = renderer.clipRect(negAttr);

				if (graph && this.graphNeg) {
					graph.clip(posClip);
					this.graphNeg.clip(negClip);
				}

				if (area) {
					area.clip(posClip);
					this.areaNeg.clip(negClip);
				}
			}
		}
	},

	/**
	 * Initialize and perform group inversion on series.group and series.markerGroup
	 */
	invertGroups: function () {
		var series = this,
			chart = series.chart;

		// Pie, go away (#1736)
		if (!series.xAxis) {
			return;
		}

		// A fixed size is needed for inversion to work
		function setInvert() {
			var size = {
				width: series.yAxis.len,
				height: series.xAxis.len
			};

			each(['group', 'markerGroup'], function (groupName) {
				if (series[groupName]) {
					series[groupName].attr(size).invert();
				}
			});
		}

		addEvent(chart, 'resize', setInvert); // do it on resize
		addEvent(series, 'destroy', function () {
			removeEvent(chart, 'resize', setInvert);
		});

		// Do it now
		setInvert(); // do it now

		// On subsequent render and redraw, just do setInvert without setting up events again
		series.invertGroups = setInvert;
	},

	/**
	 * General abstraction for creating plot groups like series.group, series.dataLabelsGroup and
	 * series.markerGroup. On subsequent calls, the group will only be adjusted to the updated plot size.
	 */
	plotGroup: function (prop, name, visibility, zIndex, parent) {
		var group = this[prop],
			isNew = !group;

		// Generate it on first call
		if (isNew) {
			this[prop] = group = this.chart.renderer.g(name)
				.attr({
					visibility: visibility,
					zIndex: zIndex || 0.1 // IE8 needs this
				})
				.add(parent);
		}
		// Place it on first and subsequent (redraw) calls
		group[isNew ? 'attr' : 'animate'](this.getPlotBox());
		return group;
	},

	/**
	 * Get the translation and scale for the plot area of this series
	 */
	getPlotBox: function () {
		var chart = this.chart,
			xAxis = this.xAxis,
			yAxis = this.yAxis;

		// Swap axes for inverted (#2339)
		if (chart.inverted) {
			xAxis = yAxis;
			yAxis = this.xAxis;
		}
		return {
			translateX: xAxis ? xAxis.left : chart.plotLeft,
			translateY: yAxis ? yAxis.top : chart.plotTop,
			scaleX: 1, // #1623
			scaleY: 1
		};
	},

	/**
	 * Render the graph and markers
	 */
	render: function () {
		var series = this,
			chart = series.chart,
			group,
			options = series.options,
			animation = options.animation,
			// Animation doesn't work in IE8 quirks when the group div is hidden,
			// and looks bad in other oldIE
			animDuration = (animation && !!series.animate && chart.renderer.isSVG && pick(animation.duration, 500)) || 0,
			visibility = series.visible ? VISIBLE : HIDDEN,
			zIndex = options.zIndex,
			hasRendered = series.hasRendered,
			chartSeriesGroup = chart.seriesGroup;

		// the group
		group = series.plotGroup(
			'group',
			'series',
			visibility,
			zIndex,
			chartSeriesGroup
		);

		series.markerGroup = series.plotGroup(
			'markerGroup',
			'markers',
			visibility,
			zIndex,
			chartSeriesGroup
		);

		// initiate the animation
		if (animDuration) {
			series.animate(true);
		}

		// cache attributes for shapes
		series.getAttribs();

		// SVGRenderer needs to know this before drawing elements (#1089, #1795)
		group.inverted = series.isCartesian ? chart.inverted : false;

		// draw the graph if any
		if (series.drawGraph) {
			series.drawGraph();
			series.clipNeg();
		}

		each(series.points, function (point) {
			if (point.redraw) {
				point.redraw();
			}
		});

		// draw the data labels (inn pies they go before the points)
		if (series.drawDataLabels) {
			series.drawDataLabels();
		}

		// draw the points
		if (series.visible) {
			series.drawPoints();
		}


		// draw the mouse tracking area
		if (series.drawTracker && series.options.enableMouseTracking !== false) {
			series.drawTracker();
		}

		// Handle inverted series and tracker groups
		if (chart.inverted) {
			series.invertGroups();
		}

		// Initial clipping, must be defined after inverting groups for VML
		if (options.clip !== false && !series.sharedClipKey && !hasRendered) {
			group.clip(chart.clipRect);
		}

		// Run the animation
		if (animDuration) {
			series.animate();
		}

		// Call the afterAnimate function on animation complete (but don't overwrite the animation.complete option
		// which should be available to the user).
		if (!hasRendered) {
			if (animDuration) {
				series.animationTimeout = setTimeout(function () {
					series.afterAnimate();
				}, animDuration);
			} else {
				series.afterAnimate();
			}
		}

		series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
		// (See #322) series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
		series.hasRendered = true;
	},

	/**
	 * Redraw the series after an update in the axes.
	 */
	redraw: function () {
		var series = this,
			chart = series.chart,
			wasDirtyData = series.isDirtyData, // cache it here as it is set to false in render, but used after
			group = series.group,
			xAxis = series.xAxis,
			yAxis = series.yAxis;

		// reposition on resize
		if (group) {
			if (chart.inverted) {
				group.attr({
					width: chart.plotWidth,
					height: chart.plotHeight
				});
			}

			group.animate({
				translateX: pick(xAxis && xAxis.left, chart.plotLeft),
				translateY: pick(yAxis && yAxis.top, chart.plotTop)
			});
		}

		series.translate();
		if (series.setTooltipPoints) {
			series.setTooltipPoints(true);
		}
		series.render();

		if (wasDirtyData) {
			fireEvent(series, 'updatedData');
		}
	}
}; // end Series prototype

/**
 * The class for stack items
 */
function StackItem(axis, options, isNegative, x, stackOption) {

	var inverted = axis.chart.inverted;

	this.axis = axis;

	// Tells if the stack is negative
	this.isNegative = isNegative;

	// Save the options to be able to style the label
	this.options = options;

	// Save the x value to be able to position the label later
	this.x = x;

	// Initialize total value
	this.total = null;

	// This will keep each points' extremes stored by series.index and point index
	this.points = {};

	// Save the stack option on the series configuration object, and whether to treat it as percent
	this.stack = stackOption;

	// The align options and text align varies on whether the stack is negative and
	// if the chart is inverted or not.
	// First test the user supplied value, then use the dynamic.
	this.alignOptions = {
		align: options.align || (inverted ? (isNegative ? 'left' : 'right') : 'center'),
		verticalAlign: options.verticalAlign || (inverted ? 'middle' : (isNegative ? 'bottom' : 'top')),
		y: pick(options.y, inverted ? 4 : (isNegative ? 14 : -6)),
		x: pick(options.x, inverted ? (isNegative ? -6 : 6) : 0)
	};

	this.textAlign = options.textAlign || (inverted ? (isNegative ? 'right' : 'left') : 'center');
}

StackItem.prototype = {
	destroy: function () {
		destroyObjectProperties(this, this.axis);
	},

	/**
	 * Renders the stack total label and adds it to the stack label group.
	 */
	render: function (group) {
		var options = this.options,
			formatOption = options.format,
			str = formatOption ?
				format(formatOption, this) :
				options.formatter.call(this);  // format the text in the label

		// Change the text to reflect the new total and set visibility to hidden in case the serie is hidden
		if (this.label) {
			this.label.attr({text: str, visibility: HIDDEN});
		// Create new label
		} else {
			this.label =
				this.axis.chart.renderer.text(str, null, null, options.useHTML)		// dummy positions, actual position updated with setOffset method in columnseries
					.css(options.style)				// apply style
					.attr({
						align: this.textAlign,				// fix the text-anchor
						rotation: options.rotation,	// rotation
						visibility: HIDDEN					// hidden until setOffset is called
					})
					.add(group);							// add to the labels-group
		}
	},

	/**
	 * Sets the offset that the stack has from the x value and repositions the label.
	 */
	setOffset: function (xOffset, xWidth) {
		var stackItem = this,
			axis = stackItem.axis,
			chart = axis.chart,
			inverted = chart.inverted,
			neg = this.isNegative,							// special treatment is needed for negative stacks
			y = axis.translate(axis.usePercentage ? 100 : this.total, 0, 0, 0, 1), // stack value translated mapped to chart coordinates
			yZero = axis.translate(0),						// stack origin
			h = mathAbs(y - yZero),							// stack height
			x = chart.xAxis[0].translate(this.x) + xOffset,	// stack x position
			plotHeight = chart.plotHeight,
			stackBox = {	// this is the box for the complete stack
				x: inverted ? (neg ? y : y - h) : x,
				y: inverted ? plotHeight - x - xWidth : (neg ? (plotHeight - y - h) : plotHeight - y),
				width: inverted ? h : xWidth,
				height: inverted ? xWidth : h
			},
			label = this.label,
			alignAttr;

		if (label) {
			label.align(this.alignOptions, null, stackBox);	// align the label to the box

			// Set visibility (#678)
			alignAttr = label.alignAttr;
			label[this.options.crop === false || chart.isInsidePlot(alignAttr.x, alignAttr.y) ? 'show' : 'hide'](true);
		}
	}
};


// Stacking methods defined on the Axis prototype

/**
 * Build the stacks from top down
 */
Axis.prototype.buildStacks = function () {
	var series = this.series,
		reversedStacks = pick(this.options.reversedStacks, true),
		i = series.length;
	if (!this.isXAxis) {
		this.usePercentage = false;
		while (i--) {
			series[reversedStacks ? i : series.length - i - 1].setStackedPoints();
		}
		// Loop up again to compute percent stack
		if (this.usePercentage) {
			for (i = 0; i < series.length; i++) {
				series[i].setPercentStacks();
			}
		}
	}
};

Axis.prototype.renderStackTotals = function () {
	var axis = this,
		chart = axis.chart,
		renderer = chart.renderer,
		stacks = axis.stacks,
		stackKey,
		oneStack,
		stackCategory,
		stackTotalGroup = axis.stackTotalGroup;

	// Create a separate group for the stack total labels
	if (!stackTotalGroup) {
		axis.stackTotalGroup = stackTotalGroup =
			renderer.g('stack-labels')
				.attr({
					visibility: VISIBLE,
					zIndex: 6
				})
				.add();
	}

	// plotLeft/Top will change when y axis gets wider so we need to translate the
	// stackTotalGroup at every render call. See bug #506 and #516
	stackTotalGroup.translate(chart.plotLeft, chart.plotTop);

	// Render each stack total
	for (stackKey in stacks) {
		oneStack = stacks[stackKey];
		for (stackCategory in oneStack) {
			oneStack[stackCategory].render(stackTotalGroup);
		}
	}
};


// Stacking methods defnied for Series prototype

/**
 * Adds series' points value to corresponding stack
 */
Series.prototype.setStackedPoints = function () {
	if (!this.options.stacking || (this.visible !== true && this.chart.options.chart.ignoreHiddenSeries !== false)) {
		return;
	}

	var series = this,
		xData = series.processedXData,
		yData = series.processedYData,
		stackedYData = [],
		yDataLength = yData.length,
		seriesOptions = series.options,
		threshold = seriesOptions.threshold,
		stackOption = seriesOptions.stack,
		stacking = seriesOptions.stacking,
		stackKey = series.stackKey,
		negKey = '-' + stackKey,
		negStacks = series.negStacks,
		yAxis = series.yAxis,
		stacks = yAxis.stacks,
		oldStacks = yAxis.oldStacks,
		isNegative,
		stack,
		other,
		key,
		pointKey,
		i,
		x,
		y;

	// loop over the non-null y values and read them into a local array
	for (i = 0; i < yDataLength; i++) {
		x = xData[i];
		y = yData[i];
		pointKey = series.index + ',' + i;

		// Read stacked values into a stack based on the x value,
		// the sign of y and the stack key. Stacking is also handled for null values (#739)
		isNegative = negStacks && y < threshold;
		key = isNegative ? negKey : stackKey;

		// Create empty object for this stack if it doesn't exist yet
		if (!stacks[key]) {
			stacks[key] = {};
		}

		// Initialize StackItem for this x
		if (!stacks[key][x]) {
			if (oldStacks[key] && oldStacks[key][x]) {
				stacks[key][x] = oldStacks[key][x];
				stacks[key][x].total = null;
			} else {
				stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, isNegative, x, stackOption);
			}
		}

		// If the StackItem doesn't exist, create it first
		stack = stacks[key][x];
		stack.points[pointKey] = [stack.cum || 0];

		// Add value to the stack total
		if (stacking === 'percent') {

			// Percent stacked column, totals are the same for the positive and negative stacks
			other = isNegative ? stackKey : negKey;
			if (negStacks && stacks[other] && stacks[other][x]) {
				other = stacks[other][x];
				stack.total = other.total = mathMax(other.total, stack.total) + mathAbs(y) || 0;

			// Percent stacked areas
			} else {
				stack.total = correctFloat(stack.total + (mathAbs(y) || 0));
			}
		} else {
			stack.total = correctFloat(stack.total + (y || 0));
		}

		stack.cum = (stack.cum || 0) + (y || 0);

		stack.points[pointKey].push(stack.cum);
		stackedYData[i] = stack.cum;

	}

	if (stacking === 'percent') {
		yAxis.usePercentage = true;
	}

	this.stackedYData = stackedYData; // To be used in getExtremes

	// Reset old stacks
	yAxis.oldStacks = {};
};

/**
 * Iterate over all stacks and compute the absolute values to percent
 */
Series.prototype.setPercentStacks = function () {
	var series = this,
		stackKey = series.stackKey,
		stacks = series.yAxis.stacks,
		processedXData = series.processedXData;

	each([stackKey, '-' + stackKey], function (key) {
		var i = processedXData.length,
			x,
			stack,
			pointExtremes,
			totalFactor;

		while (i--) {
			x = processedXData[i];
			stack = stacks[key] && stacks[key][x];
			pointExtremes = stack && stack.points[series.index + ',' + i];
			if (pointExtremes) {
				totalFactor = stack.total ? 100 / stack.total : 0;
				pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor); // Y bottom value
				pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor); // Y value
				series.stackedYData[i] = pointExtremes[1];
			}
		}
	});
};

// Extend the Chart prototype for dynamic methods
extend(Chart.prototype, {

	/**
	 * Add a series dynamically after  time
	 *
	 * @param {Object} options The config options
	 * @param {Boolean} redraw Whether to redraw the chart after adding. Defaults to true.
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 *
	 * @return {Object} series The newly created series object
	 */
	addSeries: function (options, redraw, animation) {
		var series,
			chart = this;

		if (options) {
			redraw = pick(redraw, true); // defaults to true

			fireEvent(chart, 'addSeries', { options: options }, function () {
				series = chart.initSeries(options);

				chart.isDirtyLegend = true; // the series array is out of sync with the display
				chart.linkSeries();
				if (redraw) {
					chart.redraw(animation);
				}
			});
		}

		return series;
	},

	/**
     * Add an axis to the chart
     * @param {Object} options The axis option
     * @param {Boolean} isX Whether it is an X axis or a value axis
     */
	addAxis: function (options, isX, redraw, animation) {
		var key = isX ? 'xAxis' : 'yAxis',
			chartOptions = this.options,
			axis;

		/*jslint unused: false*/
		axis = new Axis(this, merge(options, {
			index: this[key].length,
			isX: isX
		}));
		/*jslint unused: true*/

		// Push the new axis options to the chart options
		chartOptions[key] = splat(chartOptions[key] || {});
		chartOptions[key].push(options);

		if (pick(redraw, true)) {
			this.redraw(animation);
		}
	},

	/**
	 * Dim the chart and show a loading text or symbol
	 * @param {String} str An optional text to show in the loading label instead of the default one
	 */
	showLoading: function (str) {
		var chart = this,
			options = chart.options,
			loadingDiv = chart.loadingDiv,
			loadingOptions = options.loading,
			setLoadingSize = function () {
				if (loadingDiv) {
					css(loadingDiv, {
						left: chart.plotLeft + PX,
						top: chart.plotTop + PX,
						width: chart.plotWidth + PX,
						height: chart.plotHeight + PX
					});
				}
			};

		// create the layer at the first call
		if (!loadingDiv) {
			chart.loadingDiv = loadingDiv = createElement(DIV, {
				className: PREFIX + 'loading'
			}, extend(loadingOptions.style, {
				zIndex: 10,
				display: NONE
			}), chart.container);

			chart.loadingSpan = createElement(
				'span',
				null,
				loadingOptions.labelStyle,
				loadingDiv
			);
			addEvent(chart, 'redraw', setLoadingSize); // #1080
		}

		// update text
		chart.loadingSpan.innerHTML = str || options.lang.loading;

		// show it
		if (!chart.loadingShown) {
			css(loadingDiv, {
				opacity: 0,
				display: ''
			});
			animate(loadingDiv, {
				opacity: loadingOptions.style.opacity
			}, {
				duration: loadingOptions.showDuration || 0
			});
			chart.loadingShown = true;
		}
		setLoadingSize();
	},

	/**
	 * Hide the loading layer
	 */
	hideLoading: function () {
		var options = this.options,
			loadingDiv = this.loadingDiv;

		if (loadingDiv) {
			animate(loadingDiv, {
				opacity: 0
			}, {
				duration: options.loading.hideDuration || 100,
				complete: function () {
					css(loadingDiv, { display: NONE });
				}
			});
		}
		this.loadingShown = false;
	}
});

// extend the Point prototype for dynamic methods
extend(Point.prototype, {
	/**
	 * Update the point with new options (typically x/y data) and optionally redraw the series.
	 *
	 * @param {Object} options Point options as defined in the series.data array
	 * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 *
	 */
	update: function (options, redraw, animation, runEvent) {
		var point = this,
			series = point.series,
			graphic = point.graphic,
			i,
			chart = series.chart,
			seriesOptions = series.options;

		redraw = pick(redraw, true);

		function update() {

			point.applyOptions(options);

			// Update visuals
			if (isObject(options) && !isArray(options)) {
				// Defer the actual redraw until getAttribs has been called (#3260)
				point.redraw = function () {
					if (graphic) {
						if (options && options.marker && options.marker.symbol) {
							point.graphic = graphic.destroy();
						} else {
							graphic.attr(point.pointAttr[point.state || '']);
						}
					}
					if (options && options.dataLabels && point.dataLabel) { // #2468
						point.dataLabel = point.dataLabel.destroy();
					}
					point.redraw = null;
				};
			}

			// record changes in the parallel arrays
			i = point.index;
			series.updateParallelArrays(point, i);

			seriesOptions.data[i] = point.options;

			// redraw
			series.isDirty = series.isDirtyData = true;
			if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320
				chart.isDirtyBox = true;
			}

			if (seriesOptions.legendType === 'point') { // #1831, #1885
				chart.legend.destroyItem(point);
			}
			if (redraw) {
				chart.redraw(animation);
			}
		}

		// Fire the event with a default handler of doing the update
		if (runEvent === false) { // When called from setData
			update();
		} else {
			point.firePointEvent('update', { options: options }, update);
		}
	},

	/**
	 * Remove a point and optionally redraw the series and if necessary the axes
	 * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 */
	remove: function (redraw, animation) {
		var point = this,
			series = point.series,
			points = series.points,
			chart = series.chart,
			i,
			data = series.data;

		setAnimation(animation, chart);
		redraw = pick(redraw, true);

		// fire the event with a default handler of removing the point
		point.firePointEvent('remove', null, function () {

			// splice all the parallel arrays
			i = inArray(point, data);
			if (data.length === points.length) {
				points.splice(i, 1);
			}
			data.splice(i, 1);
			series.options.data.splice(i, 1);
			series.updateParallelArrays(point, 'splice', i, 1);

			point.destroy();

			// redraw
			series.isDirty = true;
			series.isDirtyData = true;
			if (redraw) {
				chart.redraw();
			}
		});
	}
});

// Extend the series prototype for dynamic methods
extend(Series.prototype, {
	/**
	 * Add a point dynamically after chart load time
	 * @param {Object} options Point options as given in series.data
	 * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
	 * @param {Boolean} shift If shift is true, a point is shifted off the start
	 *    of the series as one is appended to the end.
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 */
	addPoint: function (options, redraw, shift, animation) {
		var series = this,
			seriesOptions = series.options,
			data = series.data,
			graph = series.graph,
			area = series.area,
			chart = series.chart,
			names = series.xAxis && series.xAxis.names,
			currentShift = (graph && graph.shift) || 0,
			dataOptions = seriesOptions.data,
			point,
			isInTheMiddle,
			xData = series.xData,
			x,
			i;

		setAnimation(animation, chart);

		// Make graph animate sideways
		if (shift) {
			each([graph, area, series.graphNeg, series.areaNeg], function (shape) {
				if (shape) {
					shape.shift = currentShift + 1;
				}
			});
		}
		if (area) {
			area.isArea = true; // needed in animation, both with and without shift
		}

		// Optional redraw, defaults to true
		redraw = pick(redraw, true);

		// Get options and push the point to xData, yData and series.options. In series.generatePoints
		// the Point instance will be created on demand and pushed to the series.data array.
		point = { series: series };
		series.pointClass.prototype.applyOptions.apply(point, [options]);
		x = point.x;

		// Get the insertion point
		i = xData.length;
		if (series.requireSorting && x < xData[i - 1]) {
			isInTheMiddle = true;
			while (i && xData[i - 1] > x) {
				i--;
			}
		}

		series.updateParallelArrays(point, 'splice', i, 0, 0); // insert undefined item
		series.updateParallelArrays(point, i); // update it

		if (names && point.name) {
			names[x] = point.name;
		}
		dataOptions.splice(i, 0, options);

		if (isInTheMiddle) {
			series.data.splice(i, 0, null);
			series.processData();
		}

		// Generate points to be added to the legend (#1329)
		if (seriesOptions.legendType === 'point') {
			series.generatePoints();
		}

		// Shift the first point off the parallel arrays
		// todo: consider series.removePoint(i) method
		if (shift) {
			if (data[0] && data[0].remove) {
				data[0].remove(false);
			} else {
				data.shift();
				series.updateParallelArrays(point, 'shift');

				dataOptions.shift();
			}
		}

		// redraw
		series.isDirty = true;
		series.isDirtyData = true;
		if (redraw) {
			series.getAttribs(); // #1937
			chart.redraw();
		}
	},

	/**
	 * Remove a series and optionally redraw the chart
	 *
	 * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
	 * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
	 *    configuration
	 */

	remove: function (redraw, animation) {
		var series = this,
			chart = series.chart;
		redraw = pick(redraw, true);

		if (!series.isRemoving) {  /* prevent triggering native event in jQuery
				(calling the remove function from the remove event) */
			series.isRemoving = true;

			// fire the event with a default handler of removing the point
			fireEvent(series, 'remove', null, function () {


				// destroy elements
				series.destroy();


				// redraw
				chart.isDirtyLegend = chart.isDirtyBox = true;
				chart.linkSeries();

				if (redraw) {
					chart.redraw(animation);
				}
			});

		}
		series.isRemoving = false;
	},

	/**
	 * Update the series with a new set of options
	 */
	update: function (newOptions, redraw) {
		var series = this,
			chart = this.chart,
			// must use user options when changing type because this.options is merged
			// in with type specific plotOptions
			oldOptions = this.userOptions,
			oldType = this.type,
			proto = seriesTypes[oldType].prototype,
			preserve = ['group', 'markerGroup', 'dataLabelsGroup'],
			n;

		// Make sure groups are not destroyed (#3094)
		each(preserve, function (prop) {
			preserve[prop] = series[prop];
			delete series[prop];
		});

		// Do the merge, with some forced options
		newOptions = merge(oldOptions, {
			animation: false,
			index: this.index,
			pointStart: this.xData[0] // when updating after addPoint
		}, { data: this.options.data }, newOptions);

		// Destroy the series and reinsert methods from the type prototype
		this.remove(false);
		for (n in proto) { // Overwrite series-type specific methods (#2270)
			if (proto.hasOwnProperty(n)) {
				this[n] = UNDEFINED;
			}
		}
		extend(this, seriesTypes[newOptions.type || oldType].prototype);

		// Re-register groups (#3094)
		each(preserve, function (prop) {
			series[prop] = preserve[prop];
		});


		this.init(chart, newOptions);
		chart.linkSeries(); // Links are lost in this.remove (#3028)
		if (pick(redraw, true)) {
			chart.redraw(false);
		}
	}
});

// Extend the Axis.prototype for dynamic methods
extend(Axis.prototype, {

	/**
	 * Update the axis with a new options structure
	 */
	update: function (newOptions, redraw) {
		var chart = this.chart;

		newOptions = chart.options[this.coll][this.options.index] = merge(this.userOptions, newOptions);

		this.destroy(true);
		this._addedPlotLB = UNDEFINED; // #1611, #2887

		this.init(chart, extend(newOptions, { events: UNDEFINED }));

		chart.isDirtyBox = true;
		if (pick(redraw, true)) {
			chart.redraw();
		}
	},

	/**
     * Remove the axis from the chart
     */
	remove: function (redraw) {
		var chart = this.chart,
			key = this.coll, // xAxis or yAxis
			axisSeries = this.series,
			i = axisSeries.length;

		// Remove associated series (#2687)
		while (i--) {
			if (axisSeries[i]) {
				axisSeries[i].remove(false);
			}
		}

		// Remove the axis
		erase(chart.axes, this);
		erase(chart[key], this);
		chart.options[key].splice(this.options.index, 1);
		each(chart[key], function (axis, i) { // Re-index, #1706
			axis.options.index = i;
		});
		this.destroy();
		chart.isDirtyBox = true;

		if (pick(redraw, true)) {
			chart.redraw();
		}
	},

	/**
	 * Update the axis title by options
	 */
	setTitle: function (newTitleOptions, redraw) {
		this.update({ title: newTitleOptions }, redraw);
	},

	/**
	 * Set new axis categories and optionally redraw
	 * @param {Array} categories
	 * @param {Boolean} redraw
	 */
	setCategories: function (categories, redraw) {
		this.update({ categories: categories }, redraw);
	}

});


/**
 * LineSeries object
 */
var LineSeries = extendClass(Series);
seriesTypes.line = LineSeries;

/**
 * Set the default options for area
 */
defaultPlotOptions.area = merge(defaultSeriesOptions, {
	threshold: 0
	// trackByArea: false,
	// lineColor: null, // overrides color, but lets fillColor be unaltered
	// fillOpacity: 0.75,
	// fillColor: null
});

/**
 * AreaSeries object
 */
var AreaSeries = extendClass(Series, {
	type: 'area',
	/**
	 * For stacks, don't split segments on null values. Instead, draw null values with
	 * no marker. Also insert dummy points for any X position that exists in other series
	 * in the stack.
	 */
	getSegments: function () {
		var series = this,
			segments = [],
			segment = [],
			keys = [],
			xAxis = this.xAxis,
			yAxis = this.yAxis,
			stack = yAxis.stacks[this.stackKey],
			pointMap = {},
			plotX,
			plotY,
			points = this.points,
			connectNulls = this.options.connectNulls,
			i,
			x;

		if (this.options.stacking && !this.cropped) { // cropped causes artefacts in Stock, and perf issue
			// Create a map where we can quickly look up the points by their X value.
			for (i = 0; i < points.length; i++) {
				pointMap[points[i].x] = points[i];
			}

			// Sort the keys (#1651)
			for (x in stack) {
				if (stack[x].total !== null) { // nulled after switching between grouping and not (#1651, #2336)
					keys.push(+x);
				}
			}
			keys.sort(function (a, b) {
				return a - b;
			});

			each(keys, function (x) {
				var y = 0,
					stackPoint;

				if (connectNulls && (!pointMap[x] || pointMap[x].y === null)) { // #1836
					return;

				// The point exists, push it to the segment
				} else if (pointMap[x]) {
					segment.push(pointMap[x]);

				// There is no point for this X value in this series, so we
				// insert a dummy point in order for the areas to be drawn
				// correctly.
				} else {

					// Loop down the stack to find the series below this one that has
					// a value (#1991)
					for (i = series.index; i <= yAxis.series.length; i++) {
						stackPoint = stack[x].points[i + ',' + x];
						if (stackPoint) {
							y = stackPoint[1];
							break;
						}
					}

					plotX = xAxis.translate(x);
					plotY = yAxis.toPixels(y, true);
					segment.push({
						y: null,
						plotX: plotX,
						clientX: plotX,
						plotY: plotY,
						yBottom: plotY,
						onMouseOver: noop
					});
				}
			});

			if (segment.length) {
				segments.push(segment);
			}

		} else {
			Series.prototype.getSegments.call(this);
			segments = this.segments;
		}

		this.segments = segments;
	},

	/**
	 * Extend the base Series getSegmentPath method by adding the path for the area.
	 * This path is pushed to the series.areaPath property.
	 */
	getSegmentPath: function (segment) {

		var segmentPath = Series.prototype.getSegmentPath.call(this, segment), // call base method
			areaSegmentPath = [].concat(segmentPath), // work on a copy for the area path
			i,
			options = this.options,
			segLength = segmentPath.length,
			translatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181
			yBottom;

		if (segLength === 3) { // for animation from 1 to two points
			areaSegmentPath.push(L, segmentPath[1], segmentPath[2]);
		}
		if (options.stacking && !this.closedStacks) {

			// Follow stack back. Todo: implement areaspline. A general solution could be to
			// reverse the entire graphPath of the previous series, though may be hard with
			// splines and with series with different extremes
			for (i = segment.length - 1; i >= 0; i--) {

				yBottom = pick(segment[i].yBottom, translatedThreshold);

				// step line?
				if (i < segment.length - 1 && options.step) {
					areaSegmentPath.push(segment[i + 1].plotX, yBottom);
				}

				areaSegmentPath.push(segment[i].plotX, yBottom);
			}

		} else { // follow zero line back
			this.closeSegment(areaSegmentPath, segment, translatedThreshold);
		}
		this.areaPath = this.areaPath.concat(areaSegmentPath);
		return segmentPath;
	},

	/**
	 * Extendable method to close the segment path of an area. This is overridden in polar
	 * charts.
	 */
	closeSegment: function (path, segment, translatedThreshold) {
		path.push(
			L,
			segment[segment.length - 1].plotX,
			translatedThreshold,
			L,
			segment[0].plotX,
			translatedThreshold
		);
	},

	/**
	 * Draw the graph and the underlying area. This method calls the Series base
	 * function and adds the area. The areaPath is calculated in the getSegmentPath
	 * method called from Series.prototype.drawGraph.
	 */
	drawGraph: function () {

		// Define or reset areaPath
		this.areaPath = [];

		// Call the base method
		Series.prototype.drawGraph.apply(this);

		// Define local variables
		var series = this,
			areaPath = this.areaPath,
			options = this.options,
			negativeColor = options.negativeColor,
			negativeFillColor = options.negativeFillColor,
			props = [['area', this.color, options.fillColor]]; // area name, main color, fill color

		if (negativeColor || negativeFillColor) {
			props.push(['areaNeg', negativeColor, negativeFillColor]);
		}

		each(props, function (prop) {
			var areaKey = prop[0],
				area = series[areaKey];

			// Create or update the area
			if (area) { // update
				area.animate({ d: areaPath });

			} else { // create
				series[areaKey] = series.chart.renderer.path(areaPath)
					.attr({
						fill: pick(
							prop[2],
							Color(prop[1]).setOpacity(pick(options.fillOpacity, 0.75)).get()
						),
						zIndex: 0 // #1069
					}).add(series.group);
			}
		});
	},

	drawLegendSymbol: LegendSymbolMixin.drawRectangle
});

seriesTypes.area = AreaSeries;
/**
 * Set the default options for spline
 */
defaultPlotOptions.spline = merge(defaultSeriesOptions);

/**
 * SplineSeries object
 */
var SplineSeries = extendClass(Series, {
	type: 'spline',

	/**
	 * Get the spline segment from a given point's previous neighbour to the given point
	 */
	getPointSpline: function (segment, point, i) {
		var smoothing = 1.5, // 1 means control points midway between points, 2 means 1/3 from the point, 3 is 1/4 etc
			denom = smoothing + 1,
			plotX = point.plotX,
			plotY = point.plotY,
			lastPoint = segment[i - 1],
			nextPoint = segment[i + 1],
			leftContX,
			leftContY,
			rightContX,
			rightContY,
			ret;

		// find control points
		if (lastPoint && nextPoint) {

			var lastX = lastPoint.plotX,
				lastY = lastPoint.plotY,
				nextX = nextPoint.plotX,
				nextY = nextPoint.plotY,
				correction;

			leftContX = (smoothing * plotX + lastX) / denom;
			leftContY = (smoothing * plotY + lastY) / denom;
			rightContX = (smoothing * plotX + nextX) / denom;
			rightContY = (smoothing * plotY + nextY) / denom;

			// have the two control points make a straight line through main point
			correction = ((rightContY - leftContY) * (rightContX - plotX)) /
				(rightContX - leftContX) + plotY - rightContY;

			leftContY += correction;
			rightContY += correction;

			// to prevent false extremes, check that control points are between
			// neighbouring points' y values
			if (leftContY > lastY && leftContY > plotY) {
				leftContY = mathMax(lastY, plotY);
				rightContY = 2 * plotY - leftContY; // mirror of left control point
			} else if (leftContY < lastY && leftContY < plotY) {
				leftContY = mathMin(lastY, plotY);
				rightContY = 2 * plotY - leftContY;
			}
			if (rightContY > nextY && rightContY > plotY) {
				rightContY = mathMax(nextY, plotY);
				leftContY = 2 * plotY - rightContY;
			} else if (rightContY < nextY && rightContY < plotY) {
				rightContY = mathMin(nextY, plotY);
				leftContY = 2 * plotY - rightContY;
			}

			// record for drawing in next point
			point.rightContX = rightContX;
			point.rightContY = rightContY;

		}

		// Visualize control points for debugging
		/*
		if (leftContX) {
			this.chart.renderer.circle(leftContX + this.chart.plotLeft, leftContY + this.chart.plotTop, 2)
				.attr({
					stroke: 'red',
					'stroke-width': 1,
					fill: 'none'
				})
				.add();
			this.chart.renderer.path(['M', leftContX + this.chart.plotLeft, leftContY + this.chart.plotTop,
				'L', plotX + this.chart.plotLeft, plotY + this.chart.plotTop])
				.attr({
					stroke: 'red',
					'stroke-width': 1
				})
				.add();
			this.chart.renderer.circle(rightContX + this.chart.plotLeft, rightContY + this.chart.plotTop, 2)
				.attr({
					stroke: 'green',
					'stroke-width': 1,
					fill: 'none'
				})
				.add();
			this.chart.renderer.path(['M', rightContX + this.chart.plotLeft, rightContY + this.chart.plotTop,
				'L', plotX + this.chart.plotLeft, plotY + this.chart.plotTop])
				.attr({
					stroke: 'green',
					'stroke-width': 1
				})
				.add();
		}
		*/

		// moveTo or lineTo
		if (!i) {
			ret = [M, plotX, plotY];
		} else { // curve from last point to this
			ret = [
				'C',
				lastPoint.rightContX || lastPoint.plotX,
				lastPoint.rightContY || lastPoint.plotY,
				leftContX || plotX,
				leftContY || plotY,
				plotX,
				plotY
			];
			lastPoint.rightContX = lastPoint.rightContY = null; // reset for updating series later
		}
		return ret;
	}
});
seriesTypes.spline = SplineSeries;

/**
 * Set the default options for areaspline
 */
defaultPlotOptions.areaspline = merge(defaultPlotOptions.area);

/**
 * AreaSplineSeries object
 */
var areaProto = AreaSeries.prototype,
	AreaSplineSeries = extendClass(SplineSeries, {
		type: 'areaspline',
		closedStacks: true, // instead of following the previous graph back, follow the threshold back

		// Mix in methods from the area series
		getSegmentPath: areaProto.getSegmentPath,
		closeSegment: areaProto.closeSegment,
		drawGraph: areaProto.drawGraph,
		drawLegendSymbol: LegendSymbolMixin.drawRectangle
	});

seriesTypes.areaspline = AreaSplineSeries;

/**
 * Set the default options for column
 */
defaultPlotOptions.column = merge(defaultSeriesOptions, {
	borderColor: '#FFFFFF',
	//borderWidth: 1,
	borderRadius: 0,
	//colorByPoint: undefined,
	groupPadding: 0.2,
	//grouping: true,
	marker: null, // point options are specified in the base options
	pointPadding: 0.1,
	//pointWidth: null,
	minPointLength: 0,
	cropThreshold: 50, // when there are more points, they will not animate out of the chart on xAxis.setExtremes
	pointRange: null, // null means auto, meaning 1 in a categorized axis and least distance between points if not categories
	states: {
		hover: {
			brightness: 0.1,
			shadow: false,
			halo: false
		},
		select: {
			color: '#C0C0C0',
			borderColor: '#000000',
			shadow: false
		}
	},
	dataLabels: {
		align: null, // auto
		verticalAlign: null, // auto
		y: null
	},
	stickyTracking: false,
	tooltip: {
		distance: 6
	},
	threshold: 0
});

/**
 * ColumnSeries object
 */
var ColumnSeries = extendClass(Series, {
	type: 'column',
	pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
		stroke: 'borderColor',
		fill: 'color',
		r: 'borderRadius'
	},
	cropShoulder: 0,
	trackerGroups: ['group', 'dataLabelsGroup'],
	negStacks: true, // use separate negative stacks, unlike area stacks where a negative
		// point is substracted from previous (#1910)

	/**
	 * Initialize the series
	 */
	init: function () {
		Series.prototype.init.apply(this, arguments);

		var series = this,
			chart = series.chart;

		// if the series is added dynamically, force redraw of other
		// series affected by a new column
		if (chart.hasRendered) {
			each(chart.series, function (otherSeries) {
				if (otherSeries.type === series.type) {
					otherSeries.isDirty = true;
				}
			});
		}
	},

	/**
	 * Return the width and x offset of the columns adjusted for grouping, groupPadding, pointPadding,
	 * pointWidth etc.
	 */
	getColumnMetrics: function () {

		var series = this,
			options = series.options,
			xAxis = series.xAxis,
			yAxis = series.yAxis,
			reversedXAxis = xAxis.reversed,
			stackKey,
			stackGroups = {},
			columnIndex,
			columnCount = 0;

		// Get the total number of column type series.
		// This is called on every series. Consider moving this logic to a
		// chart.orderStacks() function and call it on init, addSeries and removeSeries
		if (options.grouping === false) {
			columnCount = 1;
		} else {
			each(series.chart.series, function (otherSeries) {
				var otherOptions = otherSeries.options,
					otherYAxis = otherSeries.yAxis;
				if (otherSeries.type === series.type && otherSeries.visible &&
						yAxis.len === otherYAxis.len && yAxis.pos === otherYAxis.pos) {  // #642, #2086
					if (otherOptions.stacking) {
						stackKey = otherSeries.stackKey;
						if (stackGroups[stackKey] === UNDEFINED) {
							stackGroups[stackKey] = columnCount++;
						}
						columnIndex = stackGroups[stackKey];
					} else if (otherOptions.grouping !== false) { // #1162
						columnIndex = columnCount++;
					}
					otherSeries.columnIndex = columnIndex;
				}
			});
		}

		var categoryWidth = mathMin(
				mathAbs(xAxis.transA) * (xAxis.ordinalSlope || options.pointRange || xAxis.closestPointRange || xAxis.tickInterval || 1), // #2610
				xAxis.len // #1535
			),
			groupPadding = categoryWidth * options.groupPadding,
			groupWidth = categoryWidth - 2 * groupPadding,
			pointOffsetWidth = groupWidth / columnCount,
			optionPointWidth = options.pointWidth,
			pointPadding = defined(optionPointWidth) ? (pointOffsetWidth - optionPointWidth) / 2 :
				pointOffsetWidth * options.pointPadding,
			pointWidth = pick(optionPointWidth, pointOffsetWidth - 2 * pointPadding), // exact point width, used in polar charts
			colIndex = (reversedXAxis ?
				columnCount - (series.columnIndex || 0) : // #1251
				series.columnIndex) || 0,
			pointXOffset = pointPadding + (groupPadding + colIndex *
				pointOffsetWidth - (categoryWidth / 2)) *
				(reversedXAxis ? -1 : 1);

		// Save it for reading in linked series (Error bars particularly)
		return (series.columnMetrics = {
			width: pointWidth,
			offset: pointXOffset
		});

	},

	/**
	 * Translate each point to the plot area coordinate system and find shape positions
	 */
	translate: function () {
		var series = this,
			chart = series.chart,
			options = series.options,
			borderWidth = series.borderWidth = pick(
				options.borderWidth,
				series.activePointCount > 0.5 * series.xAxis.len ? 0 : 1
			),
			yAxis = series.yAxis,
			threshold = options.threshold,
			translatedThreshold = series.translatedThreshold = yAxis.getThreshold(threshold),
			minPointLength = pick(options.minPointLength, 5),
			metrics = series.getColumnMetrics(),
			pointWidth = metrics.width,
			seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
			pointXOffset = series.pointXOffset = metrics.offset,
			xCrisp = -(borderWidth % 2 ? 0.5 : 0),
			yCrisp = borderWidth % 2 ? 0.5 : 1;

		if (chart.renderer.isVML && chart.inverted) {
			yCrisp += 1;
		}

		// When the pointPadding is 0, we want the columns to be packed tightly, so we allow individual
		// columns to have individual sizes. When pointPadding is greater, we strive for equal-width
		// columns (#2694).
		if (options.pointPadding) {
			seriesBarW = mathCeil(seriesBarW);
		}

		Series.prototype.translate.apply(series);

		// Record the new values
		each(series.points, function (point) {
			var yBottom = pick(point.yBottom, translatedThreshold),
				plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)
				barX = point.plotX + pointXOffset,
				barW = seriesBarW,
				barY = mathMin(plotY, yBottom),
				right,
				bottom,
				fromTop,
				barH = mathMax(plotY, yBottom) - barY;

			// Handle options.minPointLength
			if (mathAbs(barH) < minPointLength) {
				if (minPointLength) {
					barH = minPointLength;
					barY =
						mathRound(mathAbs(barY - translatedThreshold) > minPointLength ? // stacked
							yBottom - minPointLength : // keep position
							translatedThreshold - (yAxis.translate(point.y, 0, 1, 0, 1) <= translatedThreshold ? minPointLength : 0)); // use exact yAxis.translation (#1485)
				}
			}

			// Cache for access in polar
			point.barX = barX;
			point.pointWidth = pointWidth;

			// Fix the tooltip on center of grouped columns (#1216, #424)
			point.tooltipPos = chart.inverted ?
				[yAxis.len - plotY, series.xAxis.len - barX - barW / 2] :
				[barX + barW / 2, plotY + yAxis.pos - chart.plotTop];

			// Round off to obtain crisp edges and avoid overlapping with neighbours (#2694)
			right = mathRound(barX + barW) + xCrisp;
			barX = mathRound(barX) + xCrisp;
			barW = right - barX;

			fromTop = mathAbs(barY) < 0.5;
			bottom = mathRound(barY + barH) + yCrisp;
			barY = mathRound(barY) + yCrisp;
			barH = bottom - barY;

			// Top edges are exceptions
			if (fromTop) {
				barY -= 1;
				barH += 1;
			}

			// Register shape type and arguments to be used in drawPoints
			point.shapeType = 'rect';
			point.shapeArgs = {
				x: barX,
				y: barY,
				width: barW,
				height: barH
			};

		});

	},

	getSymbol: noop,

	/**
	 * Use a solid rectangle like the area series types
	 */
	drawLegendSymbol: LegendSymbolMixin.drawRectangle,


	/**
	 * Columns have no graph
	 */
	drawGraph: noop,

	/**
	 * Draw the columns. For bars, the series.group is rotated, so the same coordinates
	 * apply for columns and bars. This method is inherited by scatter series.
	 *
	 */
	drawPoints: function () {
		var series = this,
			chart = this.chart,
			options = series.options,
			renderer = chart.renderer,
			animationLimit = options.animationLimit || 250,
			shapeArgs,
			pointAttr;

		// draw the columns
		each(series.points, function (point) {
			var plotY = point.plotY,
				graphic = point.graphic,
				borderAttr;

			if (plotY !== UNDEFINED && !isNaN(plotY) && point.y !== null) {
				shapeArgs = point.shapeArgs;

				borderAttr = defined(series.borderWidth) ? {
					'stroke-width': series.borderWidth
				} : {};

				pointAttr = point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE] || series.pointAttr[NORMAL_STATE];

				if (graphic) { // update
					stop(graphic);
					graphic.attr(borderAttr)[chart.pointCount < animationLimit ? 'animate' : 'attr'](merge(shapeArgs));

				} else {
					point.graphic = graphic = renderer[point.shapeType](shapeArgs)
						.attr(pointAttr)
						.attr(borderAttr)
						.add(series.group)
						.shadow(options.shadow, null, options.stacking && !options.borderRadius);
				}

			} else if (graphic) {
				point.graphic = graphic.destroy(); // #1269
			}
		});
	},

	/**
	 * Animate the column heights one by one from zero
	 * @param {Boolean} init Whether to initialize the animation or run it
	 */
	animate: function (init) {
		var series = this,
			yAxis = this.yAxis,
			options = series.options,
			inverted = this.chart.inverted,
			attr = {},
			translatedThreshold;

		if (hasSVG) { // VML is too slow anyway
			if (init) {
				attr.scaleY = 0.001;
				translatedThreshold = mathMin(yAxis.pos + yAxis.len, mathMax(yAxis.pos, yAxis.toPixels(options.threshold)));
				if (inverted) {
					attr.translateX = translatedThreshold - yAxis.len;
				} else {
					attr.translateY = translatedThreshold;
				}
				series.group.attr(attr);

			} else { // run the animation

				attr.scaleY = 1;
				attr[inverted ? 'translateX' : 'translateY'] = yAxis.pos;
				series.group.animate(attr, series.options.animation);

				// delete this function to allow it only once
				series.animate = null;
			}
		}
	},

	/**
	 * Remove this series from the chart
	 */
	remove: function () {
		var series = this,
			chart = series.chart;

		// column and bar series affects other series of the same type
		// as they are either stacked or grouped
		if (chart.hasRendered) {
			each(chart.series, function (otherSeries) {
				if (otherSeries.type === series.type) {
					otherSeries.isDirty = true;
				}
			});
		}

		Series.prototype.remove.apply(series, arguments);
	}
});
seriesTypes.column = ColumnSeries;
/**
 * Set the default options for bar
 */
defaultPlotOptions.bar = merge(defaultPlotOptions.column);
/**
 * The Bar series class
 */
var BarSeries = extendClass(ColumnSeries, {
	type: 'bar',
	inverted: true
});
seriesTypes.bar = BarSeries;

/**
 * Set the default options for scatter
 */
defaultPlotOptions.scatter = merge(defaultSeriesOptions, {
	lineWidth: 0,
	tooltip: {
		headerFormat: '<span style="color:{series.color}">\u25CF</span> <span style="font-size: 10px;"> {series.name}</span><br/>',
		pointFormat: 'x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>'
	},
	stickyTracking: false
});

/**
 * The scatter series class
 */
var ScatterSeries = extendClass(Series, {
	type: 'scatter',
	sorted: false,
	requireSorting: false,
	noSharedTooltip: true,
	trackerGroups: ['markerGroup', 'dataLabelsGroup'],
	takeOrdinalPosition: false, // #2342
	singularTooltips: true,
	drawGraph: function () {
		if (this.options.lineWidth) {
			Series.prototype.drawGraph.call(this);
		}
	}
});

seriesTypes.scatter = ScatterSeries;

/**
 * Set the default options for pie
 */
defaultPlotOptions.pie = merge(defaultSeriesOptions, {
	borderColor: '#FFFFFF',
	borderWidth: 1,
	center: [null, null],
	clip: false,
	colorByPoint: true, // always true for pies
	dataLabels: {
		// align: null,
		// connectorWidth: 1,
		// connectorColor: point.color,
		// connectorPadding: 5,
		distance: 30,
		enabled: true,
		formatter: function () { // #2945
			return this.point.name;
		}
		// softConnector: true,
		//y: 0
	},
	ignoreHiddenPoint: true,
	//innerSize: 0,
	legendType: 'point',
	marker: null, // point options are specified in the base options
	size: null,
	showInLegend: false,
	slicedOffset: 10,
	states: {
		hover: {
			brightness: 0.1,
			shadow: false
		}
	},
	stickyTracking: false,
	tooltip: {
		followPointer: true
	}
});

/**
 * Extended point object for pies
 */
var PiePoint = extendClass(Point, {
	/**
	 * Initiate the pie slice
	 */
	init: function () {

		Point.prototype.init.apply(this, arguments);

		var point = this,
			toggleSlice;

		// Disallow negative values (#1530)
		if (point.y < 0) {
			point.y = null;
		}

		//visible: options.visible !== false,
		extend(point, {
			visible: point.visible !== false,
			name: pick(point.name, 'Slice')
		});

		// add event listener for select
		toggleSlice = function (e) {
			point.slice(e.type === 'select');
		};
		addEvent(point, 'select', toggleSlice);
		addEvent(point, 'unselect', toggleSlice);

		return point;
	},

	/**
	 * Toggle the visibility of the pie slice
	 * @param {Boolean} vis Whether to show the slice or not. If undefined, the
	 *    visibility is toggled
	 */
	setVisible: function (vis) {
		var point = this,
			series = point.series,
			chart = series.chart;

		// if called without an argument, toggle visibility
		point.visible = point.options.visible = vis = vis === UNDEFINED ? !point.visible : vis;
		series.options.data[inArray(point, series.data)] = point.options; // update userOptions.data

		// Show and hide associated elements
		each(['graphic', 'dataLabel', 'connector', 'shadowGroup'], function (key) {
			if (point[key]) {
				point[key][vis ? 'show' : 'hide'](true);
			}
		});

		if (point.legendItem) {
			chart.legend.colorizeItem(point, vis);
		}

		// Handle ignore hidden slices
		if (!series.isDirty && series.options.ignoreHiddenPoint) {
			series.isDirty = true;
			chart.redraw();
		}
	},

	/**
	 * Set or toggle whether the slice is cut out from the pie
	 * @param {Boolean} sliced When undefined, the slice state is toggled
	 * @param {Boolean} redraw Whether to redraw the chart. True by default.
	 */
	slice: function (sliced, redraw, animation) {
		var point = this,
			series = point.series,
			chart = series.chart,
			translation;

		setAnimation(animation, chart);

		// redraw is true by default
		redraw = pick(redraw, true);

		// if called without an argument, toggle
		point.sliced = point.options.sliced = sliced = defined(sliced) ? sliced : !point.sliced;
		series.options.data[inArray(point, series.data)] = point.options; // update userOptions.data

		translation = sliced ? point.slicedTranslation : {
			translateX: 0,
			translateY: 0
		};

		point.graphic.animate(translation);

		if (point.shadowGroup) {
			point.shadowGroup.animate(translation);
		}

	},

	haloPath: function (size) {
		var shapeArgs = this.shapeArgs,
			chart = this.series.chart;

		return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(chart.plotLeft + shapeArgs.x, chart.plotTop + shapeArgs.y, shapeArgs.r + size, shapeArgs.r + size, {
			innerR: this.shapeArgs.r,
			start: shapeArgs.start,
			end: shapeArgs.end
		});
	}
});

/**
 * The Pie series class
 */
var PieSeries = {
	type: 'pie',
	isCartesian: false,
	pointClass: PiePoint,
	requireSorting: false,
	noSharedTooltip: true,
	trackerGroups: ['group', 'dataLabelsGroup'],
	axisTypes: [],
	pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
		stroke: 'borderColor',
		'stroke-width': 'borderWidth',
		fill: 'color'
	},
	singularTooltips: true,

	/**
	 * Pies have one color each point
	 */
	getColor: noop,

	/**
	 * Animate the pies in
	 */
	animate: function (init) {
		var series = this,
			points = series.points,
			startAngleRad = series.startAngleRad;

		if (!init) {
			each(points, function (point) {
				var graphic = point.graphic,
					args = point.shapeArgs;

				if (graphic) {
					// start values
					graphic.attr({
						r: series.center[3] / 2, // animate from inner radius (#779)
						start: startAngleRad,
						end: startAngleRad
					});

					// animate
					graphic.animate({
						r: args.r,
						start: args.start,
						end: args.end
					}, series.options.animation);
				}
			});

			// delete this function to allow it only once
			series.animate = null;
		}
	},

	/**
	 * Extend the basic setData method by running processData and generatePoints immediately,
	 * in order to access the points from the legend.
	 */
	setData: function (data, redraw, animation, updatePoints) {
		Series.prototype.setData.call(this, data, false, animation, updatePoints);
		this.processData();
		this.generatePoints();
		if (pick(redraw, true)) {
			this.chart.redraw(animation);
		}
	},

	/**
	 * Extend the generatePoints method by adding total and percentage properties to each point
	 */
	generatePoints: function () {
		var i,
			total = 0,
			points,
			len,
			point,
			ignoreHiddenPoint = this.options.ignoreHiddenPoint;

		Series.prototype.generatePoints.call(this);

		// Populate local vars
		points = this.points;
		len = points.length;

		// Get the total sum
		for (i = 0; i < len; i++) {
			point = points[i];
			total += (ignoreHiddenPoint && !point.visible) ? 0 : point.y;
		}
		this.total = total;

		// Set each point's properties
		for (i = 0; i < len; i++) {
			point = points[i];
			point.percentage = total > 0 ? (point.y / total) * 100 : 0;
			point.total = total;
		}

	},

	/**
	 * Do translation for pie slices
	 */
	translate: function (positions) {
		this.generatePoints();

		var series = this,
			cumulative = 0,
			precision = 1000, // issue #172
			options = series.options,
			slicedOffset = options.slicedOffset,
			connectorOffset = slicedOffset + options.borderWidth,
			start,
			end,
			angle,
			startAngle = options.startAngle || 0,
			startAngleRad = series.startAngleRad = mathPI / 180 * (startAngle - 90),
			endAngleRad = series.endAngleRad = mathPI / 180 * ((pick(options.endAngle, startAngle + 360)) - 90),
			circ = endAngleRad - startAngleRad, //2 * mathPI,
			points = series.points,
			radiusX, // the x component of the radius vector for a given point
			radiusY,
			labelDistance = options.dataLabels.distance,
			ignoreHiddenPoint = options.ignoreHiddenPoint,
			i,
			len = points.length,
			point;

		// Get positions - either an integer or a percentage string must be given.
		// If positions are passed as a parameter, we're in a recursive loop for adjusting
		// space for data labels.
		if (!positions) {
			series.center = positions = series.getCenter();
		}

		// utility for getting the x value from a given y, used for anticollision logic in data labels
		series.getX = function (y, left) {

			angle = math.asin(mathMin((y - positions[1]) / (positions[2] / 2 + labelDistance), 1));

			return positions[0] +
				(left ? -1 : 1) *
				(mathCos(angle) * (positions[2] / 2 + labelDistance));
		};

		// Calculate the geometry for each point
		for (i = 0; i < len; i++) {

			point = points[i];

			// set start and end angle
			start = startAngleRad + (cumulative * circ);
			if (!ignoreHiddenPoint || point.visible) {
				cumulative += point.percentage / 100;
			}
			end = startAngleRad + (cumulative * circ);

			// set the shape
			point.shapeType = 'arc';
			point.shapeArgs = {
				x: positions[0],
				y: positions[1],
				r: positions[2] / 2,
				innerR: positions[3] / 2,
				start: mathRound(start * precision) / precision,
				end: mathRound(end * precision) / precision
			};

			// The angle must stay within -90 and 270 (#2645)
			angle = (end + start) / 2;
			if (angle > 1.5 * mathPI) {
				angle -= 2 * mathPI;
			} else if (angle < -mathPI / 2) {
				angle += 2 * mathPI;
			}

			// Center for the sliced out slice
			point.slicedTranslation = {
				translateX: mathRound(mathCos(angle) * slicedOffset),
				translateY: mathRound(mathSin(angle) * slicedOffset)
			};

			// set the anchor point for tooltips
			radiusX = mathCos(angle) * positions[2] / 2;
			radiusY = mathSin(angle) * positions[2] / 2;
			point.tooltipPos = [
				positions[0] + radiusX * 0.7,
				positions[1] + radiusY * 0.7
			];

			point.half = angle < -mathPI / 2 || angle > mathPI / 2 ? 1 : 0;
			point.angle = angle;

			// set the anchor point for data labels
			connectorOffset = mathMin(connectorOffset, labelDistance / 2); // #1678
			point.labelPos = [
				positions[0] + radiusX + mathCos(angle) * labelDistance, // first break of connector
				positions[1] + radiusY + mathSin(angle) * labelDistance, // a/a
				positions[0] + radiusX + mathCos(angle) * connectorOffset, // second break, right outside pie
				positions[1] + radiusY + mathSin(angle) * connectorOffset, // a/a
				positions[0] + radiusX, // landing point for connector
				positions[1] + radiusY, // a/a
				labelDistance < 0 ? // alignment
					'center' :
					point.half ? 'right' : 'left', // alignment
				angle // center angle
			];

		}
	},

	drawGraph: null,

	/**
	 * Draw the data points
	 */
	drawPoints: function () {
		var series = this,
			chart = series.chart,
			renderer = chart.renderer,
			groupTranslation,
			//center,
			graphic,
			//group,
			shadow = series.options.shadow,
			shadowGroup,
			shapeArgs;

		if (shadow && !series.shadowGroup) {
			series.shadowGroup = renderer.g('shadow')
				.add(series.group);
		}

		// draw the slices
		each(series.points, function (point) {
			graphic = point.graphic;
			shapeArgs = point.shapeArgs;
			shadowGroup = point.shadowGroup;

			// put the shadow behind all points
			if (shadow && !shadowGroup) {
				shadowGroup = point.shadowGroup = renderer.g('shadow')
					.add(series.shadowGroup);
			}

			// if the point is sliced, use special translation, else use plot area traslation
			groupTranslation = point.sliced ? point.slicedTranslation : {
				translateX: 0,
				translateY: 0
			};

			//group.translate(groupTranslation[0], groupTranslation[1]);
			if (shadowGroup) {
				shadowGroup.attr(groupTranslation);
			}

			// draw the slice
			if (graphic) {
				graphic.animate(extend(shapeArgs, groupTranslation));
			} else {
				point.graphic = graphic = renderer[point.shapeType](shapeArgs)
					.setRadialReference(series.center)
					.attr(
						point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE]
					)
					.attr({
						'stroke-linejoin': 'round'
						//zIndex: 1 // #2722 (reversed)
					})
					.attr(groupTranslation)
					.add(series.group)
					.shadow(shadow, shadowGroup);
			}

			// detect point specific visibility (#2430)
			if (point.visible !== undefined) {
				point.setVisible(point.visible);
			}

		});

	},

	/**
	 * Utility for sorting data labels
	 */
	sortByAngle: function (points, sign) {
		points.sort(function (a, b) {
			return a.angle !== undefined && (b.angle - a.angle) * sign;
		});
	},

	/**
	 * Use a simple symbol from LegendSymbolMixin
	 */
	drawLegendSymbol: LegendSymbolMixin.drawRectangle,

	/**
	 * Use the getCenter method from drawLegendSymbol
	 */
	getCenter: CenteredSeriesMixin.getCenter,

	/**
	 * Pies don't have point marker symbols
	 */
	getSymbol: noop

};
PieSeries = extendClass(Series, PieSeries);
seriesTypes.pie = PieSeries;

/**
 * Draw the data labels
 */
Series.prototype.drawDataLabels = function () {

	var series = this,
		seriesOptions = series.options,
		cursor = seriesOptions.cursor,
		options = seriesOptions.dataLabels,
		points = series.points,
		pointOptions,
		generalOptions,
		hasRendered = series.hasRendered || 0,
		str,
		dataLabelsGroup;

	if (options.enabled || series._hasPointLabels) {

		// Process default alignment of data labels for columns
		if (series.dlProcessOptions) {
			series.dlProcessOptions(options);
		}

		// Create a separate group for the data labels to avoid rotation
		dataLabelsGroup = series.plotGroup(
			'dataLabelsGroup',
			'data-labels',
			options.defer ? HIDDEN : VISIBLE,
			options.zIndex || 6
		);

		if (pick(options.defer, true)) {
			dataLabelsGroup.attr({ opacity: +hasRendered }); // #3300
			if (!hasRendered) {
				addEvent(series, 'afterAnimate', function () {
					if (series.visible) { // #3023, #3024
						dataLabelsGroup.show();
					}
					dataLabelsGroup[seriesOptions.animation ? 'animate' : 'attr']({ opacity: 1 }, { duration: 200 });
				});
			}
		}

		// Make the labels for each point
		generalOptions = options;
		each(points, function (point) {

			var enabled,
				dataLabel = point.dataLabel,
				labelConfig,
				attr,
				name,
				rotation,
				connector = point.connector,
				isNew = true;

			// Determine if each data label is enabled
			pointOptions = point.options && point.options.dataLabels;
			enabled = pick(pointOptions && pointOptions.enabled, generalOptions.enabled); // #2282


			// If the point is outside the plot area, destroy it. #678, #820
			if (dataLabel && !enabled) {
				point.dataLabel = dataLabel.destroy();

			// Individual labels are disabled if the are explicitly disabled
			// in the point options, or if they fall outside the plot area.
			} else if (enabled) {

				// Create individual options structure that can be extended without
				// affecting others
				options = merge(generalOptions, pointOptions);

				rotation = options.rotation;

				// Get the string
				labelConfig = point.getLabelConfig();
				str = options.format ?
					format(options.format, labelConfig) :
					options.formatter.call(labelConfig, options);

				// Determine the color
				options.style.color = pick(options.color, options.style.color, series.color, 'black');


				// update existing label
				if (dataLabel) {

					if (defined(str)) {
						dataLabel
							.attr({
								text: str
							});
						isNew = false;

					} else { // #1437 - the label is shown conditionally
						point.dataLabel = dataLabel = dataLabel.destroy();
						if (connector) {
							point.connector = connector.destroy();
						}
					}

				// create new label
				} else if (defined(str)) {
					attr = {
						//align: align,
						fill: options.backgroundColor,
						stroke: options.borderColor,
						'stroke-width': options.borderWidth,
						r: options.borderRadius || 0,
						rotation: rotation,
						padding: options.padding,
						zIndex: 1
					};
					// Remove unused attributes (#947)
					for (name in attr) {
						if (attr[name] === UNDEFINED) {
							delete attr[name];
						}
					}

					dataLabel = point.dataLabel = series.chart.renderer[rotation ? 'text' : 'label']( // labels don't support rotation
						str,
						0,
						-999,
						null,
						null,
						null,
						options.useHTML
					)
					.attr(attr)
					.css(extend(options.style, cursor && { cursor: cursor }))
					.add(dataLabelsGroup)
					.shadow(options.shadow);

				}

				if (dataLabel) {
					// Now the data label is created and placed at 0,0, so we need to align it
					series.alignDataLabel(point, dataLabel, options, null, isNew);
				}
			}
		});
	}
};

/**
 * Align each individual data label
 */
Series.prototype.alignDataLabel = function (point, dataLabel, options, alignTo, isNew) {
	var chart = this.chart,
		inverted = chart.inverted,
		plotX = pick(point.plotX, -999),
		plotY = pick(point.plotY, -999),
		bBox = dataLabel.getBBox(),
		// Math.round for rounding errors (#2683), alignTo to allow column labels (#2700)
		visible = this.visible && (point.series.forceDL || chart.isInsidePlot(plotX, mathRound(plotY), inverted) ||
			(alignTo && chart.isInsidePlot(plotX, inverted ? alignTo.x + 1 : alignTo.y + alignTo.height - 1, inverted))),
		alignAttr; // the final position;

	if (visible) {

		// The alignment box is a singular point
		alignTo = extend({
			x: inverted ? chart.plotWidth - plotY : plotX,
			y: mathRound(inverted ? chart.plotHeight - plotX : plotY),
			width: 0,
			height: 0
		}, alignTo);

		// Add the text size for alignment calculation
		extend(options, {
			width: bBox.width,
			height: bBox.height
		});

		// Allow a hook for changing alignment in the last moment, then do the alignment
		if (options.rotation) { // Fancy box alignment isn't supported for rotated text
			dataLabel[isNew ? 'attr' : 'animate']({
					x: alignTo.x + options.x + alignTo.width / 2,
					y: alignTo.y + options.y + alignTo.height / 2
				})
				.attr({ // #3003
					align: options.align
				});
		} else {
			dataLabel.align(options, null, alignTo);
			alignAttr = dataLabel.alignAttr;

			// Handle justify or crop
			if (pick(options.overflow, 'justify') === 'justify') {
				this.justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew);

			} else if (pick(options.crop, true)) {
				// Now check that the data label is within the plot area
				visible = chart.isInsidePlot(alignAttr.x, alignAttr.y) && chart.isInsidePlot(alignAttr.x + bBox.width, alignAttr.y + bBox.height);

			}
		}
	}

	// Show or hide based on the final aligned position
	if (!visible) {
		dataLabel.attr({ y: -999 });
		dataLabel.placed = false; // don't animate back in
	}

};

/**
 * If data labels fall partly outside the plot area, align them back in, in a way that
 * doesn't hide the point.
 */
Series.prototype.justifyDataLabel = function (dataLabel, options, alignAttr, bBox, alignTo, isNew) {
	var chart = this.chart,
		align = options.align,
		verticalAlign = options.verticalAlign,
		off,
		justified;

	// Off left
	off = alignAttr.x;
	if (off < 0) {
		if (align === 'right') {
			options.align = 'left';
		} else {
			options.x = -off;
		}
		justified = true;
	}

	// Off right
	off = alignAttr.x + bBox.width;
	if (off > chart.plotWidth) {
		if (align === 'left') {
			options.align = 'right';
		} else {
			options.x = chart.plotWidth - off;
		}
		justified = true;
	}

	// Off top
	off = alignAttr.y;
	if (off < 0) {
		if (verticalAlign === 'bottom') {
			options.verticalAlign = 'top';
		} else {
			options.y = -off;
		}
		justified = true;
	}

	// Off bottom
	off = alignAttr.y + bBox.height;
	if (off > chart.plotHeight) {
		if (verticalAlign === 'top') {
			options.verticalAlign = 'bottom';
		} else {
			options.y = chart.plotHeight - off;
		}
		justified = true;
	}

	if (justified) {
		dataLabel.placed = !isNew;
		dataLabel.align(options, null, alignTo);
	}
};

/**
 * Override the base drawDataLabels method by pie specific functionality
 */
if (seriesTypes.pie) {
	seriesTypes.pie.prototype.drawDataLabels = function () {
		var series = this,
			data = series.data,
			point,
			chart = series.chart,
			options = series.options.dataLabels,
			connectorPadding = pick(options.connectorPadding, 10),
			connectorWidth = pick(options.connectorWidth, 1),
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			connector,
			connectorPath,
			softConnector = pick(options.softConnector, true),
			distanceOption = options.distance,
			seriesCenter = series.center,
			radius = seriesCenter[2] / 2,
			centerY = seriesCenter[1],
			outside = distanceOption > 0,
			dataLabel,
			dataLabelWidth,
			labelPos,
			labelHeight,
			halves = [// divide the points into right and left halves for anti collision
				[], // right
				[]  // left
			],
			x,
			y,
			visibility,
			rankArr,
			i,
			j,
			overflow = [0, 0, 0, 0], // top, right, bottom, left
			sort = function (a, b) {
				return b.y - a.y;
			};

		// get out if not enabled
		if (!series.visible || (!options.enabled && !series._hasPointLabels)) {
			return;
		}

		// run parent method
		Series.prototype.drawDataLabels.apply(series);

		// arrange points for detection collision
		each(data, function (point) {
			if (point.dataLabel && point.visible) { // #407, #2510
				halves[point.half].push(point);
			}
		});

		/* Loop over the points in each half, starting from the top and bottom
		 * of the pie to detect overlapping labels.
		 */
		i = 2;
		while (i--) {

			var slots = [],
				slotsLength,
				usedSlots = [],
				points = halves[i],
				pos,
				bottom,
				length = points.length,
				slotIndex;

			if (!length) {
				continue;
			}

			// Sort by angle
			series.sortByAngle(points, i - 0.5);

			// Assume equal label heights on either hemisphere (#2630)
			j = labelHeight = 0;
			while (!labelHeight && points[j]) { // #1569
				labelHeight = points[j] && points[j].dataLabel && (points[j].dataLabel.getBBox().height || 21); // 21 is for #968
				j++;
			}

			// Only do anti-collision when we are outside the pie and have connectors (#856)
			if (distanceOption > 0) {

				// Build the slots
				bottom = mathMin(centerY + radius + distanceOption, chart.plotHeight);
				for (pos = mathMax(0, centerY - radius - distanceOption); pos <= bottom; pos += labelHeight) {
					slots.push(pos);
				}
				slotsLength = slots.length;


				/* Visualize the slots
				if (!series.slotElements) {
					series.slotElements = [];
				}
				if (i === 1) {
					series.slotElements.forEach(function (elem) {
						elem.destroy();
					});
					series.slotElements.length = 0;
				}

				slots.forEach(function (pos, no) {
					var slotX = series.getX(pos, i) + chart.plotLeft - (i ? 100 : 0),
						slotY = pos + chart.plotTop;

					if (!isNaN(slotX)) {
						series.slotElements.push(chart.renderer.rect(slotX, slotY - 7, 100, labelHeight, 1)
							.attr({
								'stroke-width': 1,
								stroke: 'silver',
								fill: 'rgba(0,0,255,0.1)'
							})
							.add());
						series.slotElements.push(chart.renderer.text('Slot '+ no, slotX, slotY + 4)
							.attr({
								fill: 'silver'
							}).add());
					}
				});
				// */

				// if there are more values than available slots, remove lowest values
				if (length > slotsLength) {
					// create an array for sorting and ranking the points within each quarter
					rankArr = [].concat(points);
					rankArr.sort(sort);
					j = length;
					while (j--) {
						rankArr[j].rank = j;
					}
					j = length;
					while (j--) {
						if (points[j].rank >= slotsLength) {
							points.splice(j, 1);
						}
					}
					length = points.length;
				}

				// The label goes to the nearest open slot, but not closer to the edge than
				// the label's index.
				for (j = 0; j < length; j++) {

					point = points[j];
					labelPos = point.labelPos;

					var closest = 9999,
						distance,
						slotI;

					// find the closest slot index
					for (slotI = 0; slotI < slotsLength; slotI++) {
						distance = mathAbs(slots[slotI] - labelPos[1]);
						if (distance < closest) {
							closest = distance;
							slotIndex = slotI;
						}
					}

					// if that slot index is closer to the edges of the slots, move it
					// to the closest appropriate slot
					if (slotIndex < j && slots[j] !== null) { // cluster at the top
						slotIndex = j;
					} else if (slotsLength  < length - j + slotIndex && slots[j] !== null) { // cluster at the bottom
						slotIndex = slotsLength - length + j;
						while (slots[slotIndex] === null) { // make sure it is not taken
							slotIndex++;
						}
					} else {
						// Slot is taken, find next free slot below. In the next run, the next slice will find the
						// slot above these, because it is the closest one
						while (slots[slotIndex] === null) { // make sure it is not taken
							slotIndex++;
						}
					}

					usedSlots.push({ i: slotIndex, y: slots[slotIndex] });
					slots[slotIndex] = null; // mark as taken
				}
				// sort them in order to fill in from the top
				usedSlots.sort(sort);
			}

			// now the used slots are sorted, fill them up sequentially
			for (j = 0; j < length; j++) {

				var slot, naturalY;

				point = points[j];
				labelPos = point.labelPos;
				dataLabel = point.dataLabel;
				visibility = point.visible === false ? HIDDEN : VISIBLE;
				naturalY = labelPos[1];

				if (distanceOption > 0) {
					slot = usedSlots.pop();
					slotIndex = slot.i;

					// if the slot next to currrent slot is free, the y value is allowed
					// to fall back to the natural position
					y = slot.y;
					if ((naturalY > y && slots[slotIndex + 1] !== null) ||
							(naturalY < y &&  slots[slotIndex - 1] !== null)) {
						y = mathMin(mathMax(0, naturalY), chart.plotHeight);
					}

				} else {
					y = naturalY;
				}

				// get the x - use the natural x position for first and last slot, to prevent the top
				// and botton slice connectors from touching each other on either side
				x = options.justify ?
					seriesCenter[0] + (i ? -1 : 1) * (radius + distanceOption) :
					series.getX(y === centerY - radius - distanceOption || y === centerY + radius + distanceOption ? naturalY : y, i);


				// Record the placement and visibility
				dataLabel._attr = {
					visibility: visibility,
					align: labelPos[6]
				};
				dataLabel._pos = {
					x: x + options.x +
						({ left: connectorPadding, right: -connectorPadding }[labelPos[6]] || 0),
					y: y + options.y - 10 // 10 is for the baseline (label vs text)
				};
				dataLabel.connX = x;
				dataLabel.connY = y;


				// Detect overflowing data labels
				if (this.options.size === null) {
					dataLabelWidth = dataLabel.width;
					// Overflow left
					if (x - dataLabelWidth < connectorPadding) {
						overflow[3] = mathMax(mathRound(dataLabelWidth - x + connectorPadding), overflow[3]);

					// Overflow right
					} else if (x + dataLabelWidth > plotWidth - connectorPadding) {
						overflow[1] = mathMax(mathRound(x + dataLabelWidth - plotWidth + connectorPadding), overflow[1]);
					}

					// Overflow top
					if (y - labelHeight / 2 < 0) {
						overflow[0] = mathMax(mathRound(-y + labelHeight / 2), overflow[0]);

					// Overflow left
					} else if (y + labelHeight / 2 > plotHeight) {
						overflow[2] = mathMax(mathRound(y + labelHeight / 2 - plotHeight), overflow[2]);
					}
				}
			} // for each point
		} // for each half

		// Do not apply the final placement and draw the connectors until we have verified
		// that labels are not spilling over.
		if (arrayMax(overflow) === 0 || this.verifyDataLabelOverflow(overflow)) {

			// Place the labels in the final position
			this.placeDataLabels();

			// Draw the connectors
			if (outside && connectorWidth) {
				each(this.points, function (point) {
					connector = point.connector;
					labelPos = point.labelPos;
					dataLabel = point.dataLabel;

					if (dataLabel && dataLabel._pos) {
						visibility = dataLabel._attr.visibility;
						x = dataLabel.connX;
						y = dataLabel.connY;
						connectorPath = softConnector ? [
							M,
							x + (labelPos[6] === 'left' ? 5 : -5), y, // end of the string at the label
							'C',
							x, y, // first break, next to the label
							2 * labelPos[2] - labelPos[4], 2 * labelPos[3] - labelPos[5],
							labelPos[2], labelPos[3], // second break
							L,
							labelPos[4], labelPos[5] // base
						] : [
							M,
							x + (labelPos[6] === 'left' ? 5 : -5), y, // end of the string at the label
							L,
							labelPos[2], labelPos[3], // second break
							L,
							labelPos[4], labelPos[5] // base
						];

						if (connector) {
							connector.animate({ d: connectorPath });
							connector.attr('visibility', visibility);

						} else {
							point.connector = connector = series.chart.renderer.path(connectorPath).attr({
								'stroke-width': connectorWidth,
								stroke: options.connectorColor || point.color || '#606060',
								visibility: visibility
								//zIndex: 0 // #2722 (reversed)
							})
							.add(series.dataLabelsGroup);
						}
					} else if (connector) {
						point.connector = connector.destroy();
					}
				});
			}
		}
	};
	/**
	 * Perform the final placement of the data labels after we have verified that they
	 * fall within the plot area.
	 */
	seriesTypes.pie.prototype.placeDataLabels = function () {
		each(this.points, function (point) {
			var dataLabel = point.dataLabel,
				_pos;

			if (dataLabel) {
				_pos = dataLabel._pos;
				if (_pos) {
					dataLabel.attr(dataLabel._attr);
					dataLabel[dataLabel.moved ? 'animate' : 'attr'](_pos);
					dataLabel.moved = true;
				} else if (dataLabel) {
					dataLabel.attr({ y: -999 });
				}
			}
		});
	};

	seriesTypes.pie.prototype.alignDataLabel =  noop;

	/**
	 * Verify whether the data labels are allowed to draw, or we should run more translation and data
	 * label positioning to keep them inside the plot area. Returns true when data labels are ready
	 * to draw.
	 */
	seriesTypes.pie.prototype.verifyDataLabelOverflow = function (overflow) {

		var center = this.center,
			options = this.options,
			centerOption = options.center,
			minSize = options.minSize || 80,
			newSize = minSize,
			ret;

		// Handle horizontal size and center
		if (centerOption[0] !== null) { // Fixed center
			newSize = mathMax(center[2] - mathMax(overflow[1], overflow[3]), minSize);

		} else { // Auto center
			newSize = mathMax(
				center[2] - overflow[1] - overflow[3], // horizontal overflow
				minSize
			);
			center[0] += (overflow[3] - overflow[1]) / 2; // horizontal center
		}

		// Handle vertical size and center
		if (centerOption[1] !== null) { // Fixed center
			newSize = mathMax(mathMin(newSize, center[2] - mathMax(overflow[0], overflow[2])), minSize);

		} else { // Auto center
			newSize = mathMax(
				mathMin(
					newSize,
					center[2] - overflow[0] - overflow[2] // vertical overflow
				),
				minSize
			);
			center[1] += (overflow[0] - overflow[2]) / 2; // vertical center
		}

		// If the size must be decreased, we need to run translate and drawDataLabels again
		if (newSize < center[2]) {
			center[2] = newSize;
			this.translate(center);
			each(this.points, function (point) {
				if (point.dataLabel) {
					point.dataLabel._pos = null; // reset
				}
			});

			if (this.drawDataLabels) {
				this.drawDataLabels();
			}
		// Else, return true to indicate that the pie and its labels is within the plot area
		} else {
			ret = true;
		}
		return ret;
	};
}

if (seriesTypes.column) {

	/**
	 * Override the basic data label alignment by adjusting for the position of the column
	 */
	seriesTypes.column.prototype.alignDataLabel = function (point, dataLabel, options,  alignTo, isNew) {
		var chart = this.chart,
			inverted = chart.inverted,
			dlBox = point.dlBox || point.shapeArgs, // data label box for alignment
			below = point.below || (point.plotY > pick(this.translatedThreshold, chart.plotSizeY)),
			inside = pick(options.inside, !!this.options.stacking); // draw it inside the box?

		// Align to the column itself, or the top of it
		if (dlBox) { // Area range uses this method but not alignTo
			alignTo = merge(dlBox);

			if (inverted) {
				alignTo = {
					x: chart.plotWidth - alignTo.y - alignTo.height,
					y: chart.plotHeight - alignTo.x - alignTo.width,
					width: alignTo.height,
					height: alignTo.width
				};
			}

			// Compute the alignment box
			if (!inside) {
				if (inverted) {
					alignTo.x += below ? 0 : alignTo.width;
					alignTo.width = 0;
				} else {
					alignTo.y += below ? alignTo.height : 0;
					alignTo.height = 0;
				}
			}
		}


		// When alignment is undefined (typically columns and bars), display the individual
		// point below or above the point depending on the threshold
		options.align = pick(
			options.align,
			!inverted || inside ? 'center' : below ? 'right' : 'left'
		);
		options.verticalAlign = pick(
			options.verticalAlign,
			inverted || inside ? 'middle' : below ? 'top' : 'bottom'
		);

		// Call the parent method
		Series.prototype.alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);
	};
}



/**
 * TrackerMixin for points and graphs
 */

var TrackerMixin = Highcharts.TrackerMixin = {

	drawTrackerPoint: function () {
		var series = this,
			chart = series.chart,
			pointer = chart.pointer,
			cursor = series.options.cursor,
			css = cursor && { cursor: cursor },
			onMouseOver = function (e) {
				var target = e.target,
				point;

				if (chart.hoverSeries !== series) {
					series.onMouseOver();
				}

				while (target && !point) {
					point = target.point;
					target = target.parentNode;
				}

				if (point !== UNDEFINED && point !== chart.hoverPoint) { // undefined on graph in scatterchart
					point.onMouseOver(e);
				}
			};

		// Add reference to the point
		each(series.points, function (point) {
			if (point.graphic) {
				point.graphic.element.point = point;
			}
			if (point.dataLabel) {
				point.dataLabel.element.point = point;
			}
		});

		// Add the event listeners, we need to do this only once
		if (!series._hasTracking) {
			each(series.trackerGroups, function (key) {
				if (series[key]) { // we don't always have dataLabelsGroup
					series[key]
						.addClass(PREFIX + 'tracker')
						.on('mouseover', onMouseOver)
						.on('mouseout', function (e) { pointer.onTrackerMouseOut(e); })
						.css(css);
					if (hasTouch) {
						series[key].on('touchstart', onMouseOver);
					}
				}
			});
			series._hasTracking = true;
		}
	},

	/**
	 * Draw the tracker object that sits above all data labels and markers to
	 * track mouse events on the graph or points. For the line type charts
	 * the tracker uses the same graphPath, but with a greater stroke width
	 * for better control.
	 */
	drawTrackerGraph: function () {
		var series = this,
			options = series.options,
			trackByArea = options.trackByArea,
			trackerPath = [].concat(trackByArea ? series.areaPath : series.graphPath),
			trackerPathLength = trackerPath.length,
			chart = series.chart,
			pointer = chart.pointer,
			renderer = chart.renderer,
			snap = chart.options.tooltip.snap,
			tracker = series.tracker,
			cursor = options.cursor,
			css = cursor && { cursor: cursor },
			singlePoints = series.singlePoints,
			singlePoint,
			i,
			onMouseOver = function () {
				if (chart.hoverSeries !== series) {
					series.onMouseOver();
				}
			},
			/*
			 * Empirical lowest possible opacities for TRACKER_FILL for an element to stay invisible but clickable
			 * IE6: 0.002
			 * IE7: 0.002
			 * IE8: 0.002
			 * IE9: 0.00000000001 (unlimited)
			 * IE10: 0.0001 (exporting only)
			 * FF: 0.00000000001 (unlimited)
			 * Chrome: 0.000001
			 * Safari: 0.000001
			 * Opera: 0.00000000001 (unlimited)
			 */
			TRACKER_FILL = 'rgba(192,192,192,' + (hasSVG ? 0.0001 : 0.002) + ')';

		// Extend end points. A better way would be to use round linecaps,
		// but those are not clickable in VML.
		if (trackerPathLength && !trackByArea) {
			i = trackerPathLength + 1;
			while (i--) {
				if (trackerPath[i] === M) { // extend left side
					trackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);
				}
				if ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side
					trackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);
				}
			}
		}

		// handle single points
		for (i = 0; i < singlePoints.length; i++) {
			singlePoint = singlePoints[i];
			trackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,
			L, singlePoint.plotX + snap, singlePoint.plotY);
		}

		// draw the tracker
		if (tracker) {
			tracker.attr({ d: trackerPath });
		} else { // create

			series.tracker = renderer.path(trackerPath)
			.attr({
				'stroke-linejoin': 'round', // #1225
				visibility: series.visible ? VISIBLE : HIDDEN,
				stroke: TRACKER_FILL,
				fill: trackByArea ? TRACKER_FILL : NONE,
				'stroke-width' : options.lineWidth + (trackByArea ? 0 : 2 * snap),
				zIndex: 2
			})
			.add(series.group);

			// The tracker is added to the series group, which is clipped, but is covered
			// by the marker group. So the marker group also needs to capture events.
			each([series.tracker, series.markerGroup], function (tracker) {
				tracker.addClass(PREFIX + 'tracker')
					.on('mouseover', onMouseOver)
					.on('mouseout', function (e) { pointer.onTrackerMouseOut(e); })
					.css(css);

				if (hasTouch) {
					tracker.on('touchstart', onMouseOver);
				}
			});
		}
	}
};
/* End TrackerMixin */


/**
 * Add tracking event listener to the series group, so the point graphics
 * themselves act as trackers
 */

if (seriesTypes.column) {
	ColumnSeries.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
}

if (seriesTypes.pie) {
	seriesTypes.pie.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
}

if (seriesTypes.scatter) {
	ScatterSeries.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
}

/*
 * Extend Legend for item events
 */
extend(Legend.prototype, {

	setItemEvents: function (item, legendItem, useHTML, itemStyle, itemHiddenStyle) {
	var legend = this;
	// Set the events on the item group, or in case of useHTML, the item itself (#1249)
	(useHTML ? legendItem : item.legendGroup).on('mouseover', function () {
			item.setState(HOVER_STATE);
			legendItem.css(legend.options.itemHoverStyle);
		})
		.on('mouseout', function () {
			legendItem.css(item.visible ? itemStyle : itemHiddenStyle);
			item.setState();
		})
		.on('click', function (event) {
			var strLegendItemClick = 'legendItemClick',
				fnLegendItemClick = function () {
					item.setVisible();
				};

			// Pass over the click/touch event. #4.
			event = {
				browserEvent: event
			};

			// click the name or symbol
			if (item.firePointEvent) { // point
				item.firePointEvent(strLegendItemClick, event, fnLegendItemClick);
			} else {
				fireEvent(item, strLegendItemClick, event, fnLegendItemClick);
			}
		});
	},

	createCheckboxForItem: function (item) {
		var legend = this;

		item.checkbox = createElement('input', {
			type: 'checkbox',
			checked: item.selected,
			defaultChecked: item.selected // required by IE7
		}, legend.options.itemCheckboxStyle, legend.chart.container);

		addEvent(item.checkbox, 'click', function (event) {
			var target = event.target;
			fireEvent(item, 'checkboxClick', {
					checked: target.checked
				},
				function () {
					item.select();
				}
			);
		});
	}
});

/*
 * Add pointer cursor to legend itemstyle in defaultOptions
 */
defaultOptions.legend.itemStyle.cursor = 'pointer';


/*
 * Extend the Chart object with interaction
 */

extend(Chart.prototype, {
	/**
	 * Display the zoom button
	 */
	showResetZoom: function () {
		var chart = this,
			lang = defaultOptions.lang,
			btnOptions = chart.options.chart.resetZoomButton,
			theme = btnOptions.theme,
			states = theme.states,
			alignTo = btnOptions.relativeTo === 'chart' ? null : 'plotBox';

		this.resetZoomButton = chart.renderer.button(lang.resetZoom, null, null, function () { chart.zoomOut(); }, theme, states && states.hover)
			.attr({
				align: btnOptions.position.align,
				title: lang.resetZoomTitle
			})
			.add()
			.align(btnOptions.position, false, alignTo);

	},

	/**
	 * Zoom out to 1:1
	 */
	zoomOut: function () {
		var chart = this;
		fireEvent(chart, 'selection', { resetSelection: true }, function () {
			chart.zoom();
		});
	},

	/**
	 * Zoom into a given portion of the chart given by axis coordinates
	 * @param {Object} event
	 */
	zoom: function (event) {
		var chart = this,
			hasZoomed,
			pointer = chart.pointer,
			displayButton = false,
			resetZoomButton;

		// If zoom is called with no arguments, reset the axes
		if (!event || event.resetSelection) {
			each(chart.axes, function (axis) {
				hasZoomed = axis.zoom();
			});
		} else { // else, zoom in on all axes
			each(event.xAxis.concat(event.yAxis), function (axisData) {
				var axis = axisData.axis,
					isXAxis = axis.isXAxis;

				// don't zoom more than minRange
				if (pointer[isXAxis ? 'zoomX' : 'zoomY'] || pointer[isXAxis ? 'pinchX' : 'pinchY']) {
					hasZoomed = axis.zoom(axisData.min, axisData.max);
					if (axis.displayBtn) {
						displayButton = true;
					}
				}
			});
		}

		// Show or hide the Reset zoom button
		resetZoomButton = chart.resetZoomButton;
		if (displayButton && !resetZoomButton) {
			chart.showResetZoom();
		} else if (!displayButton && isObject(resetZoomButton)) {
			chart.resetZoomButton = resetZoomButton.destroy();
		}


		// Redraw
		if (hasZoomed) {
			chart.redraw(
				pick(chart.options.chart.animation, event && event.animation, chart.pointCount < 100) // animation
			);
		}
	},

	/**
	 * Pan the chart by dragging the mouse across the pane. This function is called
	 * on mouse move, and the distance to pan is computed from chartX compared to
	 * the first chartX position in the dragging operation.
	 */
	pan: function (e, panning) {

		var chart = this,
			hoverPoints = chart.hoverPoints,
			doRedraw;

		// remove active points for shared tooltip
		if (hoverPoints) {
			each(hoverPoints, function (point) {
				point.setState();
			});
		}

		each(panning === 'xy' ? [1, 0] : [1], function (isX) { // xy is used in maps
			var mousePos = e[isX ? 'chartX' : 'chartY'],
				axis = chart[isX ? 'xAxis' : 'yAxis'][0],
				startPos = chart[isX ? 'mouseDownX' : 'mouseDownY'],
				halfPointRange = (axis.pointRange || 0) / 2,
				extremes = axis.getExtremes(),
				newMin = axis.toValue(startPos - mousePos, true) + halfPointRange,
				newMax = axis.toValue(startPos + chart[isX ? 'plotWidth' : 'plotHeight'] - mousePos, true) - halfPointRange;

			if (axis.series.length && newMin > mathMin(extremes.dataMin, extremes.min) && newMax < mathMax(extremes.dataMax, extremes.max)) {
				axis.setExtremes(newMin, newMax, false, false, { trigger: 'pan' });
				doRedraw = true;
			}

			chart[isX ? 'mouseDownX' : 'mouseDownY'] = mousePos; // set new reference for next run
		});

		if (doRedraw) {
			chart.redraw(false);
		}
		css(chart.container, { cursor: 'move' });
	}
});

/*
 * Extend the Point object with interaction
 */
extend(Point.prototype, {
	/**
	 * Toggle the selection status of a point
	 * @param {Boolean} selected Whether to select or unselect the point.
	 * @param {Boolean} accumulate Whether to add to the previous selection. By default,
	 *		 this happens if the control key (Cmd on Mac) was pressed during clicking.
	 */
	select: function (selected, accumulate) {
		var point = this,
			series = point.series,
			chart = series.chart;

		selected = pick(selected, !point.selected);

		// fire the event with the defalut handler
		point.firePointEvent(selected ? 'select' : 'unselect', { accumulate: accumulate }, function () {
			point.selected = point.options.selected = selected;
			series.options.data[inArray(point, series.data)] = point.options;

			point.setState(selected && SELECT_STATE);

			// unselect all other points unless Ctrl or Cmd + click
			if (!accumulate) {
				each(chart.getSelectedPoints(), function (loopPoint) {
					if (loopPoint.selected && loopPoint !== point) {
						loopPoint.selected = loopPoint.options.selected = false;
						series.options.data[inArray(loopPoint, series.data)] = loopPoint.options;
						loopPoint.setState(NORMAL_STATE);
							loopPoint.firePointEvent('unselect');
					}
				});
			}
		});
	},

	/**
	 * Runs on mouse over the point
	 */
	onMouseOver: function (e) {
		var point = this,
			series = point.series,
			chart = series.chart,
			tooltip = chart.tooltip,
			hoverPoint = chart.hoverPoint;

		// set normal state to previous series
		if (hoverPoint && hoverPoint !== point) {
			hoverPoint.onMouseOut();
		}

		// trigger the event
		point.firePointEvent('mouseOver');

		// update the tooltip
		if (tooltip && (!tooltip.shared || series.noSharedTooltip)) {
			tooltip.refresh(point, e);
		}

		// hover this
		point.setState(HOVER_STATE);
		chart.hoverPoint = point;
	},

	/**
	 * Runs on mouse out from the point
	 */
	onMouseOut: function () {
		var chart = this.series.chart,
			hoverPoints = chart.hoverPoints;

		this.firePointEvent('mouseOut');

		if (!hoverPoints || inArray(this, hoverPoints) === -1) { // #887, #2240
			this.setState();
			chart.hoverPoint = null;
		}
	},

	/**
	 * Import events from the series' and point's options. Only do it on
	 * demand, to save processing time on hovering.
	 */
	importEvents: function () {
		if (!this.hasImportedEvents) {
			var point = this,
				options = merge(point.series.options.point, point.options),
				events = options.events,
				eventType;

			point.events = events;

			for (eventType in events) {
				addEvent(point, eventType, events[eventType]);
			}
			this.hasImportedEvents = true;

		}
	},

	/**
	 * Set the point's state
	 * @param {String} state
	 */
	setState: function (state, move) {
		var point = this,
			plotX = point.plotX,
			plotY = point.plotY,
			series = point.series,
			stateOptions = series.options.states,
			markerOptions = defaultPlotOptions[series.type].marker && series.options.marker,
			normalDisabled = markerOptions && !markerOptions.enabled,
			markerStateOptions = markerOptions && markerOptions.states[state],
			stateDisabled = markerStateOptions && markerStateOptions.enabled === false,
			stateMarkerGraphic = series.stateMarkerGraphic,
			pointMarker = point.marker || {},
			chart = series.chart,
			radius,
			halo = series.halo,
			haloOptions,
			newSymbol,
			pointAttr;

		state = state || NORMAL_STATE; // empty string
		pointAttr = point.pointAttr[state] || series.pointAttr[state];

		if (
				// already has this state
				(state === point.state && !move) ||
				// selected points don't respond to hover
				(point.selected && state !== SELECT_STATE) ||
				// series' state options is disabled
				(stateOptions[state] && stateOptions[state].enabled === false) ||
				// general point marker's state options is disabled
				(state && (stateDisabled || (normalDisabled && markerStateOptions.enabled === false))) ||
				// individual point marker's state options is disabled
				(state && pointMarker.states && pointMarker.states[state] && pointMarker.states[state].enabled === false) // #1610

			) {
			return;
		}

		// apply hover styles to the existing point
		if (point.graphic) {
			radius = markerOptions && point.graphic.symbolName && pointAttr.r;
			point.graphic.attr(merge(
				pointAttr,
				radius ? { // new symbol attributes (#507, #612)
					x: plotX - radius,
					y: plotY - radius,
					width: 2 * radius,
					height: 2 * radius
				} : {}
			));

			// Zooming in from a range with no markers to a range with markers
			if (stateMarkerGraphic) {
				stateMarkerGraphic.hide();
			}
		} else {
			// if a graphic is not applied to each point in the normal state, create a shared
			// graphic for the hover state
			if (state && markerStateOptions) {
				radius = markerStateOptions.radius;
				newSymbol = pointMarker.symbol || series.symbol;

				// If the point has another symbol than the previous one, throw away the
				// state marker graphic and force a new one (#1459)
				if (stateMarkerGraphic && stateMarkerGraphic.currentSymbol !== newSymbol) {
					stateMarkerGraphic = stateMarkerGraphic.destroy();
				}

				// Add a new state marker graphic
				if (!stateMarkerGraphic) {
					if (newSymbol) {
						series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.symbol(
							newSymbol,
							plotX - radius,
							plotY - radius,
							2 * radius,
							2 * radius
						)
						.attr(pointAttr)
						.add(series.markerGroup);
						stateMarkerGraphic.currentSymbol = newSymbol;
					}

				// Move the existing graphic
				} else {
					stateMarkerGraphic[move ? 'animate' : 'attr']({ // #1054
						x: plotX - radius,
						y: plotY - radius
					});
				}
			}

			if (stateMarkerGraphic) {
				stateMarkerGraphic[state && chart.isInsidePlot(plotX, plotY, chart.inverted) ? 'show' : 'hide'](); // #2450
			}
		}

		// Show me your halo
		haloOptions = stateOptions[state] && stateOptions[state].halo;
		if (haloOptions && haloOptions.size) {
			if (!halo) {
				series.halo = halo = chart.renderer.path()
					.add(series.seriesGroup);
			}
			halo.attr(extend({
				fill: Color(point.color || series.color).setOpacity(haloOptions.opacity).get()
			}, haloOptions.attributes))[move ? 'animate' : 'attr']({
				d: point.haloPath(haloOptions.size)
			});
		} else if (halo) {
			halo.attr({ d: [] });
		}

		point.state = state;
	},

	haloPath: function (size) {
		var series = this.series,
			chart = series.chart,
			plotBox = series.getPlotBox(),
			inverted = chart.inverted;

		return chart.renderer.symbols.circle(
			plotBox.translateX + (inverted ? series.yAxis.len - this.plotY : this.plotX) - size,
			plotBox.translateY + (inverted ? series.xAxis.len - this.plotX : this.plotY) - size,
			size * 2,
			size * 2
		);
	}
});

/*
 * Extend the Series object with interaction
 */

extend(Series.prototype, {
	/**
	 * Series mouse over handler
	 */
	onMouseOver: function () {
		var series = this,
			chart = series.chart,
			hoverSeries = chart.hoverSeries;

		// set normal state to previous series
		if (hoverSeries && hoverSeries !== series) {
			hoverSeries.onMouseOut();
		}

		// trigger the event, but to save processing time,
		// only if defined
		if (series.options.events.mouseOver) {
			fireEvent(series, 'mouseOver');
		}

		// hover this
		series.setState(HOVER_STATE);
		chart.hoverSeries = series;
	},

	/**
	 * Series mouse out handler
	 */
	onMouseOut: function () {
		// trigger the event only if listeners exist
		var series = this,
			options = series.options,
			chart = series.chart,
			tooltip = chart.tooltip,
			hoverPoint = chart.hoverPoint;

		// trigger mouse out on the point, which must be in this series
		if (hoverPoint) {
			hoverPoint.onMouseOut();
		}

		// fire the mouse out event
		if (series && options.events.mouseOut) {
			fireEvent(series, 'mouseOut');
		}


		// hide the tooltip
		if (tooltip && !options.stickyTracking && (!tooltip.shared || series.noSharedTooltip)) {
			tooltip.hide();
		}

		// set normal state
		series.setState();
		chart.hoverSeries = null;
	},

	/**
	 * Set the state of the graph
	 */
	setState: function (state) {
		var series = this,
			options = series.options,
			graph = series.graph,
			graphNeg = series.graphNeg,
			stateOptions = options.states,
			lineWidth = options.lineWidth,
			attribs;

		state = state || NORMAL_STATE;

		if (series.state !== state) {
			series.state = state;

			if (stateOptions[state] && stateOptions[state].enabled === false) {
				return;
			}

			if (state) {
				lineWidth = stateOptions[state].lineWidth || lineWidth + (stateOptions[state].lineWidthPlus || 0);
			}

			if (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML
				attribs = {
					'stroke-width': lineWidth
				};
				// use attr because animate will cause any other animation on the graph to stop
				graph.attr(attribs);
				if (graphNeg) {
					graphNeg.attr(attribs);
				}
			}
		}
	},

	/**
	 * Set the visibility of the graph
	 *
	 * @param vis {Boolean} True to show the series, false to hide. If UNDEFINED,
	 *				the visibility is toggled.
	 */
	setVisible: function (vis, redraw) {
		var series = this,
			chart = series.chart,
			legendItem = series.legendItem,
			showOrHide,
			ignoreHiddenSeries = chart.options.chart.ignoreHiddenSeries,
			oldVisibility = series.visible;

		// if called without an argument, toggle visibility
		series.visible = vis = series.userOptions.visible = vis === UNDEFINED ? !oldVisibility : vis;
		showOrHide = vis ? 'show' : 'hide';

		// show or hide elements
		each(['group', 'dataLabelsGroup', 'markerGroup', 'tracker'], function (key) {
			if (series[key]) {
				series[key][showOrHide]();
			}
		});


		// hide tooltip (#1361)
		if (chart.hoverSeries === series) {
			series.onMouseOut();
		}


		if (legendItem) {
			chart.legend.colorizeItem(series, vis);
		}


		// rescale or adapt to resized chart
		series.isDirty = true;
		// in a stack, all other series are affected
		if (series.options.stacking) {
			each(chart.series, function (otherSeries) {
				if (otherSeries.options.stacking && otherSeries.visible) {
					otherSeries.isDirty = true;
				}
			});
		}

		// show or hide linked series
		each(series.linkedSeries, function (otherSeries) {
			otherSeries.setVisible(vis, false);
		});

		if (ignoreHiddenSeries) {
			chart.isDirtyBox = true;
		}
		if (redraw !== false) {
			chart.redraw();
		}

		fireEvent(series, showOrHide);
	},

	/**
	 * Memorize tooltip texts and positions
	 */
	setTooltipPoints: function (renew) {
		var series = this,
			points = [],
			pointsLength,
			low,
			high,
			xAxis = series.xAxis,
			xExtremes = xAxis && xAxis.getExtremes(),
			axisLength = xAxis ? (xAxis.tooltipLen || xAxis.len) : series.chart.plotSizeX, // tooltipLen and tooltipPosName used in polar
			point,
			pointX,
			nextPoint,
			i,
			tooltipPoints = []; // a lookup array for each pixel in the x dimension

		// don't waste resources if tracker is disabled
		if (series.options.enableMouseTracking === false || series.singularTooltips) {
			return;
		}

		// renew
		if (renew) {
			series.tooltipPoints = null;
		}

		// concat segments to overcome null values
		each(series.segments || series.points, function (segment) {
			points = points.concat(segment);
		});

		// Reverse the points in case the X axis is reversed
		if (xAxis && xAxis.reversed) {
			points = points.reverse();
		}

		// Polar needs additional shaping
		if (series.orderTooltipPoints) {
			series.orderTooltipPoints(points);
		}

		// Assign each pixel position to the nearest point
		pointsLength = points.length;
		for (i = 0; i < pointsLength; i++) {
			point = points[i];
			pointX = point.x;
			if (pointX >= xExtremes.min && pointX <= xExtremes.max) { // #1149
				nextPoint = points[i + 1];

				// Set this range's low to the last range's high plus one
				low = high === UNDEFINED ? 0 : high + 1;
				// Now find the new high
				high = points[i + 1] ?
					mathMin(mathMax(0, mathFloor( // #2070
						(point.clientX + (nextPoint ? (nextPoint.wrappedClientX || nextPoint.clientX) : axisLength)) / 2
					)), axisLength) :
					axisLength;

				while (low >= 0 && low <= high) {
					tooltipPoints[low++] = point;
				}
			}
		}
		series.tooltipPoints = tooltipPoints;
	},

	/**
	 * Show the graph
	 */
	show: function () {
		this.setVisible(true);
	},

	/**
	 * Hide the graph
	 */
	hide: function () {
		this.setVisible(false);
	},


	/**
	 * Set the selected state of the graph
	 *
	 * @param selected {Boolean} True to select the series, false to unselect. If
	 *				UNDEFINED, the selection state is toggled.
	 */
	select: function (selected) {
		var series = this;
		// if called without an argument, toggle
		series.selected = selected = (selected === UNDEFINED) ? !series.selected : selected;

		if (series.checkbox) {
			series.checkbox.checked = selected;
		}

		fireEvent(series, selected ? 'select' : 'unselect');
	},

	drawTracker: TrackerMixin.drawTrackerGraph
});
// global variables
extend(Highcharts, {

	// Constructors
	Axis: Axis,
	Chart: Chart,
	Color: Color,
	Point: Point,
	Tick: Tick,
	Renderer: Renderer,
	Series: Series,
	SVGElement: SVGElement,
	SVGRenderer: SVGRenderer,

	// Various
	arrayMin: arrayMin,
	arrayMax: arrayMax,
	charts: charts,
	dateFormat: dateFormat,
	format: format,
	pathAnim: pathAnim,
	getOptions: getOptions,
	hasBidiBug: hasBidiBug,
	isTouchDevice: isTouchDevice,
	numberFormat: numberFormat,
	seriesTypes: seriesTypes,
	setOptions: setOptions,
	addEvent: addEvent,
	removeEvent: removeEvent,
	createElement: createElement,
	discardElement: discardElement,
	css: css,
	each: each,
	extend: extend,
	map: map,
	merge: merge,
	pick: pick,
	splat: splat,
	extendClass: extendClass,
	pInt: pInt,
	wrap: wrap,
	svg: hasSVG,
	canvas: useCanVG,
	vml: !hasSVG && !useCanVG,
	product: PRODUCT,
	version: VERSION
});

}());


/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;/**
 * [js-md5]{@link https://github.com/emn178/js-md5}
 *
 * @namespace md5
 * @version 0.7.3
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2014-2017
 * @license MIT
 */
(function () {
  'use strict';

  var ERROR = 'input is invalid type';
  var WINDOW = typeof window === 'object';
  var root = WINDOW ? window : {};
  if (root.JS_MD5_NO_WINDOW) {
    WINDOW = false;
  }
  var WEB_WORKER = !WINDOW && typeof self === 'object';
  var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
  if (NODE_JS) {
    root = global;
  } else if (WEB_WORKER) {
    root = self;
  }
  var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
  var AMD = "function" === 'function' && __webpack_require__(71);
  var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
  var HEX_CHARS = '0123456789abcdef'.split('');
  var EXTRA = [128, 32768, 8388608, -2147483648];
  var SHIFT = [0, 8, 16, 24];
  var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
  var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');

  var blocks = [], buffer8;
  if (ARRAY_BUFFER) {
    var buffer = new ArrayBuffer(68);
    buffer8 = new Uint8Array(buffer);
    blocks = new Uint32Array(buffer);
  }

  if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
    Array.isArray = function (obj) {
      return Object.prototype.toString.call(obj) === '[object Array]';
    };
  }

  if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
    ArrayBuffer.isView = function (obj) {
      return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
    };
  }

  /**
   * @method hex
   * @memberof md5
   * @description Output hash as hex string
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {String} Hex string
   * @example
   * md5.hex('The quick brown fox jumps over the lazy dog');
   * // equal to
   * md5('The quick brown fox jumps over the lazy dog');
   */
  /**
   * @method digest
   * @memberof md5
   * @description Output hash as bytes array
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {Array} Bytes array
   * @example
   * md5.digest('The quick brown fox jumps over the lazy dog');
   */
  /**
   * @method array
   * @memberof md5
   * @description Output hash as bytes array
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {Array} Bytes array
   * @example
   * md5.array('The quick brown fox jumps over the lazy dog');
   */
  /**
   * @method arrayBuffer
   * @memberof md5
   * @description Output hash as ArrayBuffer
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {ArrayBuffer} ArrayBuffer
   * @example
   * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
   */
  /**
   * @method buffer
   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
   * @memberof md5
   * @description Output hash as ArrayBuffer
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {ArrayBuffer} ArrayBuffer
   * @example
   * md5.buffer('The quick brown fox jumps over the lazy dog');
   */
  /**
   * @method base64
   * @memberof md5
   * @description Output hash as base64 string
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {String} base64 string
   * @example
   * md5.base64('The quick brown fox jumps over the lazy dog');
   */
  var createOutputMethod = function (outputType) {
    return function (message) {
      return new Md5(true).update(message)[outputType]();
    };
  };

  /**
   * @method create
   * @memberof md5
   * @description Create Md5 object
   * @returns {Md5} Md5 object.
   * @example
   * var hash = md5.create();
   */
  /**
   * @method update
   * @memberof md5
   * @description Create and update Md5 object
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {Md5} Md5 object.
   * @example
   * var hash = md5.update('The quick brown fox jumps over the lazy dog');
   * // equal to
   * var hash = md5.create();
   * hash.update('The quick brown fox jumps over the lazy dog');
   */
  var createMethod = function () {
    var method = createOutputMethod('hex');
    if (NODE_JS) {
      method = nodeWrap(method);
    }
    method.create = function () {
      return new Md5();
    };
    method.update = function (message) {
      return method.create().update(message);
    };
    for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
      var type = OUTPUT_TYPES[i];
      method[type] = createOutputMethod(type);
    }
    return method;
  };

  var nodeWrap = function (method) {
    var crypto = eval("require('crypto')");
    var Buffer = eval("require('buffer').Buffer");
    var nodeMethod = function (message) {
      if (typeof message === 'string') {
        return crypto.createHash('md5').update(message, 'utf8').digest('hex');
      } else {
        if (message === null || message === undefined) {
          throw ERROR;
        } else if (message.constructor === ArrayBuffer) {
          message = new Uint8Array(message);
        }
      }
      if (Array.isArray(message) || ArrayBuffer.isView(message) ||
        message.constructor === Buffer) {
        return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
      } else {
        return method(message);
      }
    };
    return nodeMethod;
  };

  /**
   * Md5 class
   * @class Md5
   * @description This is internal class.
   * @see {@link md5.create}
   */
  function Md5(sharedMemory) {
    if (sharedMemory) {
      blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
      this.blocks = blocks;
      this.buffer8 = buffer8;
    } else {
      if (ARRAY_BUFFER) {
        var buffer = new ArrayBuffer(68);
        this.buffer8 = new Uint8Array(buffer);
        this.blocks = new Uint32Array(buffer);
      } else {
        this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
      }
    }
    this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
    this.finalized = this.hashed = false;
    this.first = true;
  }

  /**
   * @method update
   * @memberof Md5
   * @instance
   * @description Update hash
   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
   * @returns {Md5} Md5 object.
   * @see {@link md5.update}
   */
  Md5.prototype.update = function (message) {
    if (this.finalized) {
      return;
    }

    var notString, type = typeof message;
    if (type !== 'string') {
      if (type === 'object') {
        if (message === null) {
          throw ERROR;
        } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
          message = new Uint8Array(message);
        } else if (!Array.isArray(message)) {
          if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
            throw ERROR;
          }
        }
      } else {
        throw ERROR;
      }
      notString = true;
    }
    var code, index = 0, i, length = message.length, blocks = this.blocks;
    var buffer8 = this.buffer8;

    while (index < length) {
      if (this.hashed) {
        this.hashed = false;
        blocks[0] = blocks[16];
        blocks[16] = blocks[1] = blocks[2] = blocks[3] =
        blocks[4] = blocks[5] = blocks[6] = blocks[7] =
        blocks[8] = blocks[9] = blocks[10] = blocks[11] =
        blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
      }

      if (notString) {
        if (ARRAY_BUFFER) {
          for (i = this.start; index < length && i < 64; ++index) {
            buffer8[i++] = message[index];
          }
        } else {
          for (i = this.start; index < length && i < 64; ++index) {
            blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
          }
        }
      } else {
        if (ARRAY_BUFFER) {
          for (i = this.start; index < length && i < 64; ++index) {
            code = message.charCodeAt(index);
            if (code < 0x80) {
              buffer8[i++] = code;
            } else if (code < 0x800) {
              buffer8[i++] = 0xc0 | (code >> 6);
              buffer8[i++] = 0x80 | (code & 0x3f);
            } else if (code < 0xd800 || code >= 0xe000) {
              buffer8[i++] = 0xe0 | (code >> 12);
              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
              buffer8[i++] = 0x80 | (code & 0x3f);
            } else {
              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
              buffer8[i++] = 0xf0 | (code >> 18);
              buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);
              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
              buffer8[i++] = 0x80 | (code & 0x3f);
            }
          }
        } else {
          for (i = this.start; index < length && i < 64; ++index) {
            code = message.charCodeAt(index);
            if (code < 0x80) {
              blocks[i >> 2] |= code << SHIFT[i++ & 3];
            } else if (code < 0x800) {
              blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
            } else if (code < 0xd800 || code >= 0xe000) {
              blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
            } else {
              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
              blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
            }
          }
        }
      }
      this.lastByteIndex = i;
      this.bytes += i - this.start;
      if (i >= 64) {
        this.start = i - 64;
        this.hash();
        this.hashed = true;
      } else {
        this.start = i;
      }
    }
    if (this.bytes > 4294967295) {
      this.hBytes += this.bytes / 4294967296 << 0;
      this.bytes = this.bytes % 4294967296;
    }
    return this;
  };

  Md5.prototype.finalize = function () {
    if (this.finalized) {
      return;
    }
    this.finalized = true;
    var blocks = this.blocks, i = this.lastByteIndex;
    blocks[i >> 2] |= EXTRA[i & 3];
    if (i >= 56) {
      if (!this.hashed) {
        this.hash();
      }
      blocks[0] = blocks[16];
      blocks[16] = blocks[1] = blocks[2] = blocks[3] =
      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
    }
    blocks[14] = this.bytes << 3;
    blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
    this.hash();
  };

  Md5.prototype.hash = function () {
    var a, b, c, d, bc, da, blocks = this.blocks;

    if (this.first) {
      a = blocks[0] - 680876937;
      a = (a << 7 | a >>> 25) - 271733879 << 0;
      d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
      d = (d << 12 | d >>> 20) + a << 0;
      c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
      c = (c << 17 | c >>> 15) + d << 0;
      b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
      b = (b << 22 | b >>> 10) + c << 0;
    } else {
      a = this.h0;
      b = this.h1;
      c = this.h2;
      d = this.h3;
      a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
      a = (a << 7 | a >>> 25) + b << 0;
      d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
      d = (d << 12 | d >>> 20) + a << 0;
      c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
      c = (c << 17 | c >>> 15) + d << 0;
      b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
      b = (b << 22 | b >>> 10) + c << 0;
    }

    a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
    a = (a << 7 | a >>> 25) + b << 0;
    d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
    d = (d << 12 | d >>> 20) + a << 0;
    c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
    c = (c << 17 | c >>> 15) + d << 0;
    b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
    b = (b << 22 | b >>> 10) + c << 0;
    a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
    a = (a << 7 | a >>> 25) + b << 0;
    d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
    d = (d << 12 | d >>> 20) + a << 0;
    c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
    c = (c << 17 | c >>> 15) + d << 0;
    b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
    b = (b << 22 | b >>> 10) + c << 0;
    a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
    a = (a << 7 | a >>> 25) + b << 0;
    d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
    d = (d << 12 | d >>> 20) + a << 0;
    c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
    c = (c << 17 | c >>> 15) + d << 0;
    b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
    b = (b << 22 | b >>> 10) + c << 0;
    a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
    a = (a << 5 | a >>> 27) + b << 0;
    d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
    d = (d << 9 | d >>> 23) + a << 0;
    c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
    c = (c << 14 | c >>> 18) + d << 0;
    b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
    b = (b << 20 | b >>> 12) + c << 0;
    a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
    a = (a << 5 | a >>> 27) + b << 0;
    d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
    d = (d << 9 | d >>> 23) + a << 0;
    c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
    c = (c << 14 | c >>> 18) + d << 0;
    b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
    b = (b << 20 | b >>> 12) + c << 0;
    a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
    a = (a << 5 | a >>> 27) + b << 0;
    d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
    d = (d << 9 | d >>> 23) + a << 0;
    c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
    c = (c << 14 | c >>> 18) + d << 0;
    b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
    b = (b << 20 | b >>> 12) + c << 0;
    a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
    a = (a << 5 | a >>> 27) + b << 0;
    d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
    d = (d << 9 | d >>> 23) + a << 0;
    c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
    c = (c << 14 | c >>> 18) + d << 0;
    b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
    b = (b << 20 | b >>> 12) + c << 0;
    bc = b ^ c;
    a += (bc ^ d) + blocks[5] - 378558;
    a = (a << 4 | a >>> 28) + b << 0;
    d += (bc ^ a) + blocks[8] - 2022574463;
    d = (d << 11 | d >>> 21) + a << 0;
    da = d ^ a;
    c += (da ^ b) + blocks[11] + 1839030562;
    c = (c << 16 | c >>> 16) + d << 0;
    b += (da ^ c) + blocks[14] - 35309556;
    b = (b << 23 | b >>> 9) + c << 0;
    bc = b ^ c;
    a += (bc ^ d) + blocks[1] - 1530992060;
    a = (a << 4 | a >>> 28) + b << 0;
    d += (bc ^ a) + blocks[4] + 1272893353;
    d = (d << 11 | d >>> 21) + a << 0;
    da = d ^ a;
    c += (da ^ b) + blocks[7] - 155497632;
    c = (c << 16 | c >>> 16) + d << 0;
    b += (da ^ c) + blocks[10] - 1094730640;
    b = (b << 23 | b >>> 9) + c << 0;
    bc = b ^ c;
    a += (bc ^ d) + blocks[13] + 681279174;
    a = (a << 4 | a >>> 28) + b << 0;
    d += (bc ^ a) + blocks[0] - 358537222;
    d = (d << 11 | d >>> 21) + a << 0;
    da = d ^ a;
    c += (da ^ b) + blocks[3] - 722521979;
    c = (c << 16 | c >>> 16) + d << 0;
    b += (da ^ c) + blocks[6] + 76029189;
    b = (b << 23 | b >>> 9) + c << 0;
    bc = b ^ c;
    a += (bc ^ d) + blocks[9] - 640364487;
    a = (a << 4 | a >>> 28) + b << 0;
    d += (bc ^ a) + blocks[12] - 421815835;
    d = (d << 11 | d >>> 21) + a << 0;
    da = d ^ a;
    c += (da ^ b) + blocks[15] + 530742520;
    c = (c << 16 | c >>> 16) + d << 0;
    b += (da ^ c) + blocks[2] - 995338651;
    b = (b << 23 | b >>> 9) + c << 0;
    a += (c ^ (b | ~d)) + blocks[0] - 198630844;
    a = (a << 6 | a >>> 26) + b << 0;
    d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
    d = (d << 10 | d >>> 22) + a << 0;
    c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
    c = (c << 15 | c >>> 17) + d << 0;
    b += (d ^ (c | ~a)) + blocks[5] - 57434055;
    b = (b << 21 | b >>> 11) + c << 0;
    a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
    a = (a << 6 | a >>> 26) + b << 0;
    d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
    d = (d << 10 | d >>> 22) + a << 0;
    c += (a ^ (d | ~b)) + blocks[10] - 1051523;
    c = (c << 15 | c >>> 17) + d << 0;
    b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
    b = (b << 21 | b >>> 11) + c << 0;
    a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
    a = (a << 6 | a >>> 26) + b << 0;
    d += (b ^ (a | ~c)) + blocks[15] - 30611744;
    d = (d << 10 | d >>> 22) + a << 0;
    c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
    c = (c << 15 | c >>> 17) + d << 0;
    b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
    b = (b << 21 | b >>> 11) + c << 0;
    a += (c ^ (b | ~d)) + blocks[4] - 145523070;
    a = (a << 6 | a >>> 26) + b << 0;
    d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
    d = (d << 10 | d >>> 22) + a << 0;
    c += (a ^ (d | ~b)) + blocks[2] + 718787259;
    c = (c << 15 | c >>> 17) + d << 0;
    b += (d ^ (c | ~a)) + blocks[9] - 343485551;
    b = (b << 21 | b >>> 11) + c << 0;

    if (this.first) {
      this.h0 = a + 1732584193 << 0;
      this.h1 = b - 271733879 << 0;
      this.h2 = c - 1732584194 << 0;
      this.h3 = d + 271733878 << 0;
      this.first = false;
    } else {
      this.h0 = this.h0 + a << 0;
      this.h1 = this.h1 + b << 0;
      this.h2 = this.h2 + c << 0;
      this.h3 = this.h3 + d << 0;
    }
  };

  /**
   * @method hex
   * @memberof Md5
   * @instance
   * @description Output hash as hex string
   * @returns {String} Hex string
   * @see {@link md5.hex}
   * @example
   * hash.hex();
   */
  Md5.prototype.hex = function () {
    this.finalize();

    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;

    return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
      HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
      HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
      HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
      HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
      HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
      HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
      HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
      HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
      HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
      HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
      HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
      HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
      HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
      HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
      HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
  };

  /**
   * @method toString
   * @memberof Md5
   * @instance
   * @description Output hash as hex string
   * @returns {String} Hex string
   * @see {@link md5.hex}
   * @example
   * hash.toString();
   */
  Md5.prototype.toString = Md5.prototype.hex;

  /**
   * @method digest
   * @memberof Md5
   * @instance
   * @description Output hash as bytes array
   * @returns {Array} Bytes array
   * @see {@link md5.digest}
   * @example
   * hash.digest();
   */
  Md5.prototype.digest = function () {
    this.finalize();

    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
    return [
      h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF,
      h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF,
      h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF,
      h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF
    ];
  };

  /**
   * @method array
   * @memberof Md5
   * @instance
   * @description Output hash as bytes array
   * @returns {Array} Bytes array
   * @see {@link md5.array}
   * @example
   * hash.array();
   */
  Md5.prototype.array = Md5.prototype.digest;

  /**
   * @method arrayBuffer
   * @memberof Md5
   * @instance
   * @description Output hash as ArrayBuffer
   * @returns {ArrayBuffer} ArrayBuffer
   * @see {@link md5.arrayBuffer}
   * @example
   * hash.arrayBuffer();
   */
  Md5.prototype.arrayBuffer = function () {
    this.finalize();

    var buffer = new ArrayBuffer(16);
    var blocks = new Uint32Array(buffer);
    blocks[0] = this.h0;
    blocks[1] = this.h1;
    blocks[2] = this.h2;
    blocks[3] = this.h3;
    return buffer;
  };

  /**
   * @method buffer
   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
   * @memberof Md5
   * @instance
   * @description Output hash as ArrayBuffer
   * @returns {ArrayBuffer} ArrayBuffer
   * @see {@link md5.buffer}
   * @example
   * hash.buffer();
   */
  Md5.prototype.buffer = Md5.prototype.arrayBuffer;

  /**
   * @method base64
   * @memberof Md5
   * @instance
   * @description Output hash as base64 string
   * @returns {String} base64 string
   * @see {@link md5.base64}
   * @example
   * hash.base64();
   */
  Md5.prototype.base64 = function () {
    var v1, v2, v3, base64Str = '', bytes = this.array();
    for (var i = 0; i < 15;) {
      v1 = bytes[i++];
      v2 = bytes[i++];
      v3 = bytes[i++];
      base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
        BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
        BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
        BASE64_ENCODE_CHAR[v3 & 63];
    }
    v1 = bytes[i];
    base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
      BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
      '==';
    return base64Str;
  };

  var exports = createMethod();

  if (COMMON_JS) {
    module.exports = exports;
  } else {
    /**
     * @method md5
     * @description Md5 hash function, export to global in browsers.
     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
     * @returns {String} md5 hashes
     * @example
     * md5(''); // d41d8cd98f00b204e9800998ecf8427e
     * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
     * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
     *
     * // It also supports UTF-8 encoding
     * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
     *
     * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
     * md5([]); // d41d8cd98f00b204e9800998ecf8427e
     * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
     */
    root.md5 = exports;
    if (AMD) {
      !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
        return exports;
      }).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    }
  }
})();


/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime, Vue) {

var _this = this;

var html = __webpack_require__(410);
var template = __webpack_require__(13);
var miniFavor = __webpack_require__(51);
var request = __webpack_require__(3);
var userData = __webpack_require__(15);
var globalCondition = __webpack_require__(4);

var globalFavor = {};
var isRender = undefined,
    firstRender = undefined;
var QRrendered = undefined;

var addLoginBeforeEvent = function addLoginBeforeEvent() {
  $('#login-remind p').css('color', '#E4393C');
};

var settingRemind = function settingRemind(type, email) {
  var setting_type = type;
  var setting_email = email || '';
  var url = G.c_server + '/api/remind_setting?action=set&email=' + G.email + '&setting_type=' + setting_type + '&remind_email=' + setting_email;
  request.get(url);
};

var addRemindEvent = function addRemindEvent() {
  var qrcodeShow = undefined;
  // $('#favor_box .bar-jiangjia-re .select-item').off('click', addLoginBeforeEvent)
  $('.remindHint').hide();

  $('#favor_box .bar-jiangjia-re .select-item').on('click', function () {
    $(this).parent().parent().find('.select-item').removeClass('selected');
    $(this).addClass('selected');
    if ($(this).hasClass('qrcode-item')) {
      $('#remind_qrcode_img').show();
    } else if ($(this).hasClass('email-item')) {
      $('#remind_qrcode_img').hide();
    }
  });
  $('#bar_subbtn').on('click', function () {
    var ischoosed = $('#favor_box').hasClass('favor_choosed');
    var dom = $('#favor_box .jj-remind .select-item.selected');
    var notify_site = dom.attr('data-type');
    var price = dom.parent().find('input').val();
    var hasDot = price.split('.').length > 1;
    if (!/^[\d\.]+$/.test(price) || price < 0 || hasDot && price.split('.')[1].length > 2 || isNaN(parseFloat(price))) {
      $('.error_remind').text('请输入正确格式的价格').show().fadeOut(2000);
      return;
    }
    if (price > allowedMinPrice) {
      $('.error_remind').text('价格不能高于当前商品价格').show().fadeOut(2000);
      return;
    }
    if (!price || price === '0' || price.match(/[a-zA-Z]/)) {
      $('.error_remind').text('请输入商品期望价格').show().fadeOut(2000);
      return;
    }
    if (!ischoosed) {
      var remind_email = undefined;
      var remind_type = $('#favor_box .jj-style .select-item.selected').attr('data-type');
      if (remind_type === '1') {
        remind_email = $('#favor_box .jj-style .re-mail').val();
      }
      settingRemind(remind_type, remind_email);
      $('#favor_box').addClass('favor_choosed');
      $('#edit_remind_style, #remind_qrcode').show();
    }

    /*notify_site => 0 全网 1 当前网站*/
    // $(`#${G.extName}-trend-detail`).hide()
    $('#remind_qrcode_img').hide();
    qrcodeShow = false;
    miniFavor.add_favor(notify_site, price);
  });
  $('#remind_qrcode').on('click', function () {
    QRrendered = $('#remind_qrcode_img img').attr('src');
    if (!qrcodeShow) {
      if (!QRrendered) {
        getQRcode(function () {
          $('#remind_qrcode_img').show();
          qrcodeShow = true;
        });
      } else {
        $('#remind_qrcode_img').show();
        qrcodeShow = true;
      }
    } else {
      $('#remind_qrcode_img').hide();
      qrcodeShow = false;
    }
  });
  $('#edit_remind_style').on('click', function () {
    $('#favor_box').removeClass('favor_choosed');
    $('#edit_remind_style').hide();
  });
};
module.exports.loginRenderTop = function () {
  $('#login-remind').hide();
  addRemindEvent();
};
var addEvent = function addEvent() {
  $('#login-remind .go_login_btn').on('click', function () {
    // $('#login-remind p').css('color', '#9b9b9b')
    // $('#login-remind').hide()
    // $('.login-content').show().animate({
    //   right: '0px'
    // }, 500)
    var url = encodeURIComponent(location.href);
    location.href = 'https://www.gwdang.com/user/login?ext=1&from_url=' + url;
  });
  $('body').on('gwd-login-complete', function (e) {
    G.userLogin = true;
    addRemindEvent();
  });
  $('#loginClickBtnBar').on('click', function () {
    var userN = $('#barusername').val();
    var psd = $('#barpassword').val();
    if (userN && psd) {
      miniFavor.userLogin(userN, psd, function () {
        addRemindEvent();
      });
    } else {
      $('#login_remind_tle, #login_remind_tle_bar').css('display', 'block').fadeOut(5000);
    }
  });
  $('#favor_box').on('mouseenter', function () {
    getQRcode();
  });
  $('#log_back_btn').on('click', function () {
    $('#login-remind').show();
    $('.login-content').animate({
      right: '-292px'
    }, 500, function () {
      $('.login-content').hide();
    });
  });
};

var getQRcode = function getQRcode(callback) {
  var force = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
  var url;
  return regeneratorRuntime.async(function getQRcode$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(globalCondition.met('userLoginChecked'));

      case 2:
        if (QRrendered) {
          $('#remind_qrcode_img img').attr('src', QRrendered);
          $('.qrcode-jj img').attr('src', QRrendered);
          $('.sk-qrcode img').attr('src', QRrendered);
        }

        if (!((QRrendered || !G.userLogin) && !force)) {
          context$1$0.next = 5;
          break;
        }

        return context$1$0.abrupt('return');

      case 5:
        url = 'https://www.gwdang.com/collect/get_qrcode/';

        if (G.qrApi && G.qrApi !== 'default') {
          url = G.qrApi;
        }
        request.rawGet(url, true).then(function (data) {
          QRrendered = data.img_url;
          $('#remind_qrcode_img img').attr('src', data.img_url);
          $('.qrcode-jj img').attr('src', data.img_url);
          $('.sk-qrcode img').attr('src', data.img_url);

          if (callback) {
            callback();
          }
          $('#remind_qrcode').show();
        });

      case 8:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.getQRcode = getQRcode;

var allowedMinPrice = 0;

// 渲染登录下的降价提醒
var renderTop2 = function renderTop2(msg) {
  var oinfo = userData.get('other_info');
  if (!oinfo) return;
  var dp_query = userData.get('dp_query');
  var choosed = undefined,
      remind_type = undefined,
      lowestUrl = undefined;
  var now = oinfo.now;
  if (!now.dp_id && now.url_crc && now.site_id) {
    now.dp_id = now.url_crc + '-' + now.site_id;
  }
  if (!now.dp_id) return;
  var url = encodeURIComponent(location.href);
  var nowprice = oinfo['code-server'] && oinfo['code-server'].price || G.dp.price;
  allowedMinPrice = nowprice;
  if (G.aliSite) nowprice = G.dp.price;
  if (!allowedMinPrice) {
    allowedMinPrice = globalFavor['nowprice'];
  }
  var allprice = dp_query && dp_query.b2c.min_price || nowprice;
  nowprice = Number(nowprice.toString().replace(',', ''));
  allprice = Number(allprice.toString().replace(',', ''));
  if (dp_query && dp_query.b2c.product && dp_query.b2c.product.length !== 0) {
    lowestUrl = dp_query.b2c.product[0].url;
  }
  if (G.aliSite) {
    lowestUrl = 'javascript:';
  }
  if (msg.has_remind_type) {
    choosed = true;
  }
  if (msg.is_collected) {
    globalFavor.is_collected = msg.is_collected;
    if (parseInt(msg.notify_site) === 1) nowprice = msg.remind_price;else allprice = msg.remind_price;
  }
  nowprice = nowprice || globalFavor['nowprice'];
  allprice = allprice || nowprice;
  globalFavor.notify_site = msg.notify_site;
  remind_type = msg.remind_type || '0';
  var imgHost = G.imgHost;
  if (G.from_device === 'firefox') {
    imgHost = G.localImg;
  }
  var riyuan = "";
  if (location.host === 'www.amazon.co.jp') {
    riyuan = "日元";
  }
  var views = template.compile(html)({
    choosed: choosed,
    islogin: true,
    email: '',
    emailvalue: '',
    url: url,
    aliSite: G.aliSite,
    imgHost: imgHost,
    lowestUrl: lowestUrl,
    notify_site: globalFavor.notify_site,
    nowprice: nowprice,
    allprice: allprice,
    remind_type: remind_type,
    extName: G.extName,
    money: globalFavor['money'],
    riyuan: riyuan,
    lastprice: Number(globalFavor['nowprice']).toFixed(2),
    price_range: globalFavor['price_range']
  });
  if (globalFavor.notify_site === undefined) {
    setTimeout(function () {
      $('.remind-item-snd .select-item').addClass('selected');
    }, 1000);
  }
  $('#favor_box').remove();
  $(globalFavor['dom']).append(views);
  addRemindEvent();
};

// 未登录
var renderTop = function renderTop(dom, money) {
  var lowestUrl, dp_query, allprice, nowprice, imgHost, riyuan, url, view, CommonLogin;
  return regeneratorRuntime.async(function renderTop$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        __webpack_require__(6).log('login remind render top');
        context$1$0.next = 3;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('dp_query_set'));

      case 3:
        $('#favor_box').remove();
        lowestUrl = undefined;
        dp_query = userData.get('dp_query');

        if (dp_query && dp_query.b2c.product) {
          lowestUrl = dp_query.b2c.product[0].url;
        }
        allprice = dp_query && dp_query.b2c.min_price;

        if (!allprice && dp_query && dp_query.b2c && dp_query.b2c.store) {
          allprice = Math.min.apply(null, dp_query.b2c.store.map(function (store) {
            return Math.min.apply(null, store.product.map(function (x) {
              return parseFloat(x.price);
            }));
          }));
        }
        context$1$0.next = 11;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

      case 11:
        nowprice = context$1$0.sent;

        if (!allprice) {
          allprice = nowprice;
        }
        allprice = parseFloat(allprice);
        imgHost = G.imgHost;

        if (G.from_device === 'firefox') {
          imgHost = G.localImg;
        }
        riyuan = "";

        if (location.host === 'www.amazon.co.jp') {
          riyuan = "日元";
        }
        url = encodeURIComponent(location.href);
        view = template.compile(html)({
          email: G.email,
          emailvalue: '',
          lowestUrl: lowestUrl,
          notify_site: '0',
          nowprice: globalFavor['nowprice'],
          allprice: allprice,
          remind_type: '0',
          url: url,
          imgHost: imgHost,
          extName: G.extName,
          money: money,
          riyuan: riyuan,
          aliSite: G.aliSite,
          lastprice: Number(globalFavor['nowprice']).toFixed(2),
          price_range: globalFavor['price_range']
        });

        $(dom).append(view);
        CommonLogin = __webpack_require__(52)['default'];

        new Vue({
          el: '#gwd-login-remind',
          render: function render(h) {
            return h(CommonLogin, {
              props: {
                position: 'gwd-remind',
                showAlterLogin: true,
                alterLoginPosition: 'row'
              }
            });
          }
        });
        addEvent();
        $('#favor_box .bar-jiangjia-re .select-item').on('click', addLoginBeforeEvent);

      case 25:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var renderAgain = function renderAgain() {
  if (!firstRender) return;
  //if (isRender) return;
  isRender = true;
  $('#favor_box').remove();
  // 加载之前需要获取到提醒方式
  __webpack_require__(51).getRemindStyle(renderTop2);
};

module.exports.init = function (dom, money, info) {
  firstRender = true;
  if (!info.store) {
    return;
  }
  globalFavor['nowprice'] = Number(info['store'][0].current_price);
  var price_ranges = info['store'][0].price_range.split('-');
  globalFavor['price_range'] = Number(price_ranges[0]).toFixed(2) + ' ~ ' + Number(price_ranges[1]).toFixed(2);
  globalFavor['dom'] = dom;
  globalFavor['money'] = money;
  if (G.userLogin) {
    // 如果已经登录，让用户触发加载，因为需要请求网站接口
    $(document).on('renderAgain', function () {
      renderAgain();
    });
  } else {
    // if ($('#favor_box').length) {
    //   renderAgain()
    // } else {
    //   renderTop(dom, money)
    // }
    renderTop(dom, money);
  }
};
module.exports.renderAgain = renderAgain;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5), __webpack_require__(17)["default"]))

/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $, Vue) {

var _this = this;

var userData = __webpack_require__(15);
var template = __webpack_require__(13);
var userCenter = __webpack_require__(31);
var request = __webpack_require__(3);
var log = __webpack_require__(14);
var cnzz = __webpack_require__(12);
var utils = __webpack_require__(11);
var price_remind = __webpack_require__(50);
var globalFavor = {},
    reqCallbacks = [],
    hasReq = undefined;
var getRemindStyle = function getRemindStyle(callback) {
  var dp_id;
  return regeneratorRuntime.async(function getRemindStyle$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!G.remindInfo) {
          context$1$0.next = 3;
          break;
        }

        callback(G.remindInfo);
        return context$1$0.abrupt('return');

      case 3:
        if (!hasReq) {
          context$1$0.next = 6;
          break;
        }

        reqCallbacks.push(callback);
        return context$1$0.abrupt('return');

      case 6:
        hasReq = true;
        // let dp_id = G.now_dp_id;
        // if (dp_id.indexOf('-') === -1) {
        //   dp_id = dp_id + '-' + G.site_id;
        // }
        dp_id = G.dp.itemId;
        context$1$0.next = 10;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('collectionDetailAllowed'));

      case 10:
        userCenter.detail(dp_id).then(function (res) {
          setTimeout(function () {
            if ($('#gwd_mini_remind').is(':hover')) {
              onHoverContent();
            }
          });
          if (!res.data) {
            callback({});
            G.remindInfo = {};
            if (reqCallbacks.length > 0) {
              for (var i = 0; i < reqCallbacks.length; i++) {
                reqCallbacks[i]({});
              }
            }
            return;
          } else {
            var msg = {
              remind_price: res.data.notifier.threshold,
              is_collected: res.data.id,
              has_remind_type: res.data.notifier.type,
              remind_type: res.data.notifier.type,
              notify_site: res.data.notifier.site
            };
            G.remindInfo = msg;
            console.log('remindInfo got');

            callback(msg);
            if (reqCallbacks.length > 0) {
              for (var i = 0; i < reqCallbacks.length; i++) {
                reqCallbacks[i](msg);
              }
            }
          }
        });
        // callback(G.productChecked)
        // let url = `${G.c_server}/api/remind_setting?action=get&email=${G.email}&dp_id=${dp_id}`;
        // request.get(url).done((msg) => {
        //   G.remindInfo = msg;
        //   if (msg.remind_price) {
        //     msg.remind_price = msg.remind_price / 100
        //   }
        //   callback(msg)
        //   if (reqCallbacks.length > 0) {
        //     for (let i = 0; i < reqCallbacks.length; i++) {
        //       reqCallbacks[i](msg)
        //     }
        //   }
        // })

      case 11:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var check_favor = function check_favor(id) {
  return regeneratorRuntime.async(function check_favor$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(!G.userLogin || !id)) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('checked_data_got'));

      case 4:
        if (G.productChecked && G.productChecked.collected) {
          $('#gwd_mini_remind .minibar-btn-box span').text('已添加提醒');
          $('#gwd_mini_remind .minibar-btn-box em').addClass('favored');
          $('#topfavor_detail .topf-head .sp-col').text('收藏成功').addClass('collected');
          $('#ht_favor').text('收藏成功').addClass('collected');
        }
        // })

      case 5:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var loginAfterRender = function loginAfterRender() {
  $('.bjd-login-box, .login-content').hide();
  $('.gwd-common-login').hide();
  $('.bjd-jiangjia-re').show();
  check_favor(G.now_dp_id);
  __webpack_require__(50).renderAgain();
  getRemindStyle(function (msg) {
    if (msg) {
      globalFavor.is_collected = msg.is_collected;
      if (msg.has_remind_type) {
        $('.select-item').removeClass('selected');
        $('#bjd_minifavor_content').addClass('bjd_choosed');
        $('#favor_box').addClass('favor_choosed');
        $('.jj-style .select-item[data-type="' + msg.remind_type + '"]').addClass('selected');
        $('.gwd-del-collection').css('display', 'block');
      } else {
        $('.jj-style .select-item[data-type="1"]').addClass('selected');
      }
      //msg.notify_site = msg.notify_site;
      $('.jj-remind .select-item[data-type="' + msg.notify_site + '"]').addClass('selected');
      if (msg.remind_price) $('.jj-remind .select-item[data-type="' + msg.notify_site + '"]').parent().find('input').val(msg.remind_price);
      $('.jj-style .re-mail').val(G.email);
    }
  });
  $('#gwd-topText').css('display', 'none');
  $('.gwd-not-login').removeClass('gwd-not-login');
  $('#plotArea_' + G.from_device).removeClass('gwd-blurLayer');
};

$('body').on('gwd-login-complete', function (c) {
  var e = c.originalEvent;
  console.log(e);
  // G.email = e.detail.uid;
  // G.userLogin = true;
  utils.setLocal('email', e.detail.uid);
  loginAfterRender();
});

var userLogin = function userLogin() {};

var hasLoginRender = undefined;

var onHoverContent = function onHoverContent() {
  price_remind.getQRcode();
  if (G.userLogin && !hasLoginRender) {
    loginAfterRender();
    hasLoginRender = true;
  }
  $('#gwd_mini_remind').addClass('mshover');
  $('#gwd_mini_remind em').addClass('collect_hover');
  $('html').addClass('bjd-favor-show');
  $('#bjd_minifavor_content').show();
};

var miniFavorEvent = function miniFavorEvent() {
  var forbidHide = undefined;
  var msStyle = 'click';
  if (G.userLogin) msStyle = 'mouseenter';
  $('.remindHint').hide();
  $('#gwd_mini_remind').on(msStyle, function () {
    onHoverContent();
  }).on('mouseleave', function (e) {
    if (forbidHide) return;
    setTimeout(function () {
      $('#gwd_mini_remind').removeClass('mshover');
      $('#gwd_mini_remind em').removeClass('collect_hover');
      $('html').removeClass('bjd-favor-show');
      $('#bjd_minifavor_content').hide();
    }, 200);
  });

  // $('#bjd_minifavor_content').on('mouseenter', () => {
  //   clearTimeout(mTime1);
  //   clearTimeout(mTime2);
  // })
  // $('#bjd_minifavor_content').on('mouseleave', (e) => {
  //   if (forbidHide) return;
  //   mTime2 = setTimeout(function() {
  //     $(`#gwd_mini_remind`).removeClass('mshover')
  //     $(`#gwd_mini_remind em`).removeClass('collect_hover')
  //     $('html').removeClass('bjd-favor-show')
  //     $('#bjd_minifavor_content').hide()
  //   }, 200)
  // })
  $('#bjd_minifavor_content input').on('focus', function () {
    forbidHide = true;
    setTimeout(function () {
      forbidHide = false;
    }, 300);
  });
  $('.jiangjia-left .select-item').on('click', function () {
    $(this).parent().parent().find('.select-item').removeClass('selected');
    $(this).addClass('selected');
  });
  $('#edit_re_style').on('click', function () {
    $('#bjd_minifavor_content').removeClass('bjd_choosed');
  });
  $('#loginClickBtn').on('click', function () {
    var userN = $('#bjd_minifavor_content .username').val();
    var psd = $('#bjd_minifavor_content .password').val();
    if (userN && psd) {
      price_remind.loginRenderTop();
      userLogin(userN, psd);
    } else {
      $('#login_remind_tle').css('display', 'block').fadeOut(5000);
      return;
    }
  });
  $('#subbtn').on('click', function () {
    var ischoosed = $('#bjd_minifavor_content').hasClass('bjd_choosed');
    if (!ischoosed) {
      var remind_email = undefined;
      var remind_type = $('.jj-style .select-item.selected').attr('data-type');
      if (remind_type === '1') {
        remind_email = $('.jj-style .re-mail').val();
        if (!remind_email) {
          $('#error_remind_tle').text('请输入正确的邮箱地址').css('display', 'block').fadeOut(5000);
          return;
        }
      }
    }
    var dom = $('.jj-remind .select-item.selected');
    var notify_site = dom.attr('data-type');
    var price = dom.parent().find('input').val();
    if (price === '') {
      $('#error_remind_tle').text('请输入商品期望价格').css('display', 'block').fadeOut(5000);
      return;
    } else if (Number(price) <= 0 || !price.match(/(?:^\d+$|^\d+\.\d{1,2}$)/)) {
      $('#error_remind_tle').text('请输入正确格式的价格').css('display', 'block').fadeOut(5000);
      return;
    } else if (globalFavor.nowprice && Number(price) > globalFavor.nowprice) {
      $('#error_remind_tle').text('价格不能高于当前商品价格').css('display', 'block').fadeOut(5000);
      return;
    }
    log('mini-favor-detail-btn-click');
    cnzz.log('mini-favor-detail-btn-click');
    /*notify_site => 0 全网 1 当前网站*/
    add_favor(notify_site, price);
    // $('#bjd_minifavor_content').hide().addClass('bjd_choosed')
  });
  $('.jj-remind-logo').on('click', function () {
    log('allsite-lowpri-click');
    cnzz.log('allsite-lowpri-click');
  });

  $('.gwd-del-collection').on('click', function () {
    delFavor();
  });
};

var setNotifyPrice = function setNotifyPrice(notify_site, notify_price) {
  var allAddClass = function allAddClass(selector, className) {
    $(selector).each(function () {
      $(this).addClass(className);
    });
  };
  var allVal = function allVal(selector, value) {
    $(selector).each(function () {
      $(this).val(value);
    });
  };

  G.collectionChanged = true;
  // $(`#${G.extBrand}_add_favor`).text('收藏成功').show().fadeout(2000);
  /*收起价格走势*/
  // $(`#${G.extName}-trend-detail`).hide()
  $('.remindHint').show().fadeOut(2000);
  //设置嵌入页面的内容同步变化
  $('#gwd_mini_remind .minibar-btn-box span').text('已添加提醒');
  $('#gwd_mini_remind .minibar-btn-box em').addClass('favored');

  $('.remind-item.current-selected').removeClass('current-selected');
  $('.remind-item .select-item').removeClass('selected');
  var n = parseInt(notify_site);
  if (n) {
    allAddClass('.remind-item-snd', 'current-selected');
    allAddClass('.remind-item-snd .select-item', 'selected');
    allVal('.remind-item-snd input', notify_price);
  } else {
    allAddClass('.remind-item-fst', 'current-selected');
    allAddClass('.remind-item-fst .select-item', 'selected');
    allVal('.remind-item-fst input', notify_price);
  }
};

var delFavor = function delFavor() {
  userCenter['delete']().then(function (res) {
    if (res.code !== 1) return;
    $('.remind-item.current-selected').removeClass('current-selected');
    $('#gwd_mini_remind .minibar-btn-box em').removeClass('favored');
    $('#gwd_mini_remind .minibar-btn-box span').text('降价提醒');
    $('.gwd-del-collection').css('display', 'none');

    G.remindInfo = {};
    userCenter.clearCurrent();
  });
};

var add_favor = function add_favor(notify_site, notify_price) {
  notify_site = notify_site || '';
  notify_price = notify_price || '';
  var dp_id = globalFavor['dp_query'].dp.dp_id;
  var site_id = globalFavor['dp_query'].dp.site_id;
  var dp = globalFavor['dp_query'].dp;
  var price = G.dp.oldPrice;
  var title = G.dp.name || $('title').html();
  $('#' + G.extBrand + '_add_favor').text('正在收藏');
  if (price == "" || price <= 0) {
    var nprice = G.price;
    price = nprice;
  }
  var is_collected = '0';
  if (globalFavor.is_collected) {
    is_collected = '1';
  }
  if (G.site_id == '83' || G.site_id === '123') dp.dp_id = dp.dp_id + '-' + G.site_id;
  __webpack_require__(31).add(notify_price, notify_site).then(function (msg) {
    $('#' + G.extBrand + '_add_favor').text('收藏该商品');
    if (msg.code === 100 || msg.code <= 0) {
      $('#' + G.extBrand + '_add_favor').hide();
      $('#' + G.extBrand + '_favor_item_list').empty().hide();
      //$('#${G.extBrand}_favor_num').text(' N')
      $('#' + G.extBrand + '-favor-detail .' + G.extBrand + '-login-info').show();
    } else if (msg.code === 1) {
      setNotifyPrice(notify_site, notify_price);
      if (!msg.data) {
        G.remindInfo.remind_price = notify_price;
        G.remindInfo.notify_site = notify_site;
      } else {
        var data = {
          remind_price: msg.data.notifier.threshold,
          is_collected: msg.data.id,
          has_remind_type: msg.data.notifier.type,
          remind_type: msg.data.notifier.type,
          notify_site: msg.data.notifier.site
        };
        G.remindInfo = data;

        $('.gwd-del-collection').css('display', 'block');
      }

      // 更新本地收藏存储
      // utils.addFavorCheck()
    } else if (msg.code === 2) {
        $('#gwd_mini_remind .minibar-btn-box span').text('已添加提醒');
        $('#gwd_mini_remind .minibar-btn-box em').addClass('favored');
      }
  })['catch'](function () {
    $('#' + G.extBrand + '_add_favor').text('收藏商品');
  });
};
var updateTimes = 0;
var updatePrice = function updatePrice() {
  var nowPrice;
  return regeneratorRuntime.async(function updatePrice$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!globalFavor.nowprice) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        if (!(updateTimes > 5)) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return');

      case 4:
        updateTimes++;
        context$1$0.next = 7;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

      case 7:
        nowPrice = context$1$0.sent;

        if (nowPrice && nowPrice > 0 && Number($('.jj-remind .remind-item-snd input').val())) {
          globalFavor.nowprice = nowPrice;
          if (!globalFavor.allprice) {
            globalFavor.allprice = nowPrice;
            $('.jj-remind .remind-item input').val(nowPrice);
          }
          $('.jj-remind .remind-item-snd input').val(nowPrice);
        }

      case 9:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.init = function callee$0$0() {
  var dp_query, other_info, minidom, choosed, remind_type, lowestUrl, emailvalue, url, nowprice, allprice, html;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('dp_query_set'));

      case 2:
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

      case 4:
        dp_query = userData.get('dp_query');
        other_info = userData.get('other_info');

        globalFavor['other_info'] = other_info;
        globalFavor['dp_query'] = dp_query;
        minidom = '#gwd_mini_remind';
        choosed = undefined, remind_type = undefined, lowestUrl = undefined;
        emailvalue = G.email;

        if (other_info.now.dp_id) {
          context$1$0.next = 13;
          break;
        }

        return context$1$0.abrupt('return');

      case 13:
        url = encodeURIComponent(location.href);
        context$1$0.next = 16;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

      case 16:
        nowprice = context$1$0.sent;

        if (G.aliSite && G.dp.price) nowprice = G.dp.price;
        allprice = dp_query.b2c.min_price || nowprice;

        if (!allprice) allprice = nowprice;
        nowprice = Number(nowprice.toString().replace(',', ''));
        allprice = Number(allprice.toString().replace(',', ''));
        if (dp_query.b2c.product && dp_query.b2c.product.length !== 0) {
          lowestUrl = dp_query.b2c.product[0].url;
          log('allsite-lowpri-show');
          cnzz.log('allsite-lowpri-show');
        }
        // else if (dp_query.b2c.store && dp_query.b2c.store.length !== 0) {
        //   lowestUrl = dp_query.b2c.store[0].product[0].url;
        //   log('allsite-lowpri-show');
        //   cnzz.log('allsite-lowpri-show')
        // }
        globalFavor.nowprice = nowprice;

        if (G.userLogin) {
          setTimeout(function () {
            $('#gwdang-trend').hover(function () {
              __webpack_require__(4).setMet('collectionDetailAllowed');
            });
          }, 0);
        }

        html = __webpack_require__(411);
        context$1$0.next = 28;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          return $('#mini_price_history').length;
        }));

      case 28:
        if (G.userLogin) {
          check_favor(other_info.now.dp_id);
          setTimeout(function () {
            $('#gwd_mini_remind').hover(function () {
              __webpack_require__(4).setMet('collectionDetailAllowed');
            });
          }, 0);
          getRemindStyle(function (msg) {
            if (msg.has_remind_type) {
              choosed = true;
            }
            if (msg.is_collected) {
              globalFavor.is_collected = msg.is_collected;
              if (parseInt(msg.notify_site) === 1) nowprice = msg.remind_price;else allprice = msg.remind_price;
            }
            if (!allprice) allprice = nowprice;
            globalFavor.notify_site = msg.notify_site;
            globalFavor.allprice = allprice;
            remind_type = msg.remind_type || '0';
            // if (G.email.indexOf(`${G.extName}.com`) > -1)
            //   emailvalue = '';
            if (G.userLogin) {
              G.email = 1;
            }
            var config = __webpack_require__(26).getMoneyInfo(G.logsite);
            var currency = '元';
            if (config) {
              currency = config[1];
            }
            var dom = template.compile(html)({
              choosed: choosed,
              email: G.email,
              emailvalue: emailvalue,
              url: url,
              lowestUrl: lowestUrl,
              notify_site: globalFavor.notify_site,
              nowprice: nowprice,
              allprice: allprice,
              remind_type: remind_type,
              extName: G.extName,
              currency: currency
            });
            if (globalFavor.notify_site === undefined) {
              setTimeout(function () {
                $('.remind-item-snd .select-item').addClass('selected');
              }, 1000);
            }
            $(minidom).append(dom);
            check_favor(other_info.now.dp_id);
            miniFavorEvent();
          });
        } else {
          (function () {
            var dom = template.compile(html)({
              choosed: choosed,
              email: G.userLogin,
              emailvalue: emailvalue,
              url: url,
              lowestUrl: lowestUrl,
              notify_site: globalFavor.notify_site,
              nowprice: nowprice,
              allprice: allprice,
              remind_type: remind_type,
              extName: G.extName
            });
            $(minidom).append(dom);
            miniFavorEvent();
            var CommonLogin = __webpack_require__(52)['default'];
            new Vue({
              el: '#gwd-login-mini',
              render: function render(h) {
                return h(CommonLogin, {
                  props: {
                    position: 'gwd-mini',
                    showAlterLogin: true,
                    alterLoginPosition: 'row'
                  }
                });
              }
            });
          })();
        }
        // let dom = template.compile(html)({
        //   choosed: choosed,
        //   email: '',
        //   emailvalue: '',
        //   url: url,
        //   lowestUrl: lowestUrl,
        //   notify_site: G.remindInfo.remind_type,
        //   nowprice: nowprice,
        //   allprice: allprice,
        //   remind_type: remind_type,
        //   extName: G.extName
        // })
        // $(minidom).append(dom)
        // miniFavorEvent()
        updatePrice();

      case 30:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.getRemindStyle = getRemindStyle;
module.exports.add_favor = add_favor;
module.exports.setNotifyPrice = setNotifyPrice;

// debugger

// let url = `${G.c_server}/brwext/check_collected?email=${G.email}&dp_id=${id}`
// request.get(url).done((data) => {
//let nowprice = other_info['code-server'] && other_info['code-server'].price || G.dp.price;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 52 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__ = __webpack_require__(412);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CommonLogin_vue_vue_type_script_lang_js__ = __webpack_require__(127);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CommonLogin_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CommonLogin_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CommonLogin_vue_vue_type_style_index_0_id_5efee9c0_scoped_true_lang_less__ = __webpack_require__(415);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CommonLogin_vue_vue_type_style_index_1_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_favor__ = __webpack_require__(418);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__CommonLogin_vue_vue_type_style_index_2_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_remind__ = __webpack_require__(421);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__CommonLogin_vue_vue_type_style_index_3_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_mini__ = __webpack_require__(424);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__CommonLogin_vue_vue_type_style_index_4_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_popup__ = __webpack_require__(427);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);










/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_7__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CommonLogin_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__["staticRenderFns"],
  false,
  null,
  "5efee9c0",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('5efee9c0')) {
      api.createRecord('5efee9c0', component.options)
    } else {
      api.reload('5efee9c0', component.options)
    }
    module.hot.accept("./CommonLogin.vue?vue&type=template&id=5efee9c0&scoped=true", function () {
      api.rerender('5efee9c0', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/CommonLogin.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var widthObj = undefined;

var calB2cWidth = function calB2cWidth() {
  var winWidth = $(window).width();
  var itemlistW = 268;
  var turnpW = 130;
  var storeList = 304;
  var allProductW = winWidth - turnpW * 2 - storeList;
  var showListNum = parseInt(allProductW / itemlistW);
  // 如果使用最小的翻页宽度能再增加一个商品list 就再增加， 宽度动态计算
  if (allProductW - showListNum * itemlistW + 80 > 268) {
    showListNum++;
    turnpW = parseInt((winWidth - showListNum * itemlistW - storeList) / 2);
    allProductW = winWidth - turnpW * 2 - storeList;
  }
  return {
    productW: allProductW,
    turnpW: turnpW,
    showListNum: showListNum
  };
};

module.exports.init = function () {
  if (widthObj) return widthObj;
  var winWidth = $(window).width();
  var itemlistW = 268;
  var turnpW = 147;
  var allProductW = winWidth - turnpW * 2;
  var showListNum = parseInt(allProductW / itemlistW);
  // 如果使用最小的翻页宽度能再增加一个商品list 就再增加， 宽度动态计算

  if (allProductW - showListNum * itemlistW + 92 > 268) {
    showListNum++;
    turnpW = parseInt((winWidth - showListNum * itemlistW) / 2);
    allProductW = winWidth - turnpW * 2;
  }
  if (G.site === 'amazon') {
    turnpW--;
  }
  var B2cW = calB2cWidth();
  widthObj = {
    'allProductW': allProductW,
    'turnpW': turnpW,
    'showListNum': showListNum,
    'b2cProductW': B2cW.productW,
    'b2cTurnpW': B2cW.turnpW,
    'b2cShowListNum': B2cW.showListNum
  };
  return widthObj;
};

module.exports.calBottomBar = function () {
  var logo = $('#bjd_logo').outerWidth();
  var leftCom = $('.left-compare').outerWidth();
  var adinfo = $('.nbt-adinfo').outerWidth();
  var close = $('.nbt-close-btn').outerWidth();
  var rightInfo = $('.right-info').outerWidth();
  var winWidth = $(window).width();
  if (rightInfo < 500) rightInfo = 502;
  // 110 价格走势宽度
  var comBox = winWidth - (logo + leftCom + adinfo + close + rightInfo);
  return comBox;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var callbacks = undefined,
    hasreq = undefined,
    urls = undefined;

var request = __webpack_require__(3);

var getPageInfo = function getPageInfo(info, callback) {
    var infoObj = {};
    if (hasreq) {
        callbacks = callback;
        urls = info.click_url;
        return;
    }
    var itemId = G.dp.itemId;
    if (!itemId && G.site === 'taobao-ju') {
        itemId = location.href.match(/item_id=(\d+)/)[1];
    }
    var obj = {
        itemNumId: itemId
    };
    var url = 'https://acs.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?data=' + encodeURIComponent(JSON.stringify(obj));
    request.getPure(url).done(function (data) {
        try {
            var item = data.data.item;
            var seller = data.data.seller;
            var item2 = JSON.parse(data.data.apiStack[0].value);
            infoObj.title = item.title;
            infoObj.picUrl = item.images[0];
            infoObj.shopName = seller.shopName;
            infoObj.shopLogo = seller.shopIcon;
            infoObj.shopUrl = seller.shopUrl;
            infoObj.biz30Day = item2.item.sellCount;
            infoObj.discountPrice = (Number(item2.skuCore.sku2info['0'].price.priceMoney) / 100).toFixed(2);
        } catch (e) {
            //require('common/extConsole').error(e)
        }
        if (!infoObj.title) {
            infoObj.title = document.title;
        }
        if (!infoObj.title) {
            infoObj.title = $('.tb-detail-hd > h1').text().trim();
        }
        if (!infoObj.picUrl) {
            infoObj.picUrl = $('#J_ImgBooth').attr('src');
        }
        if (!infoObj.discountPrice) {
            infoObj.discountPrice = G.dp.price;
        }
        infoObj.id = itemId;
        infoObj.amount = info.coupon.coupon_money;
        infoObj.effectiveStartTime = info.coupon.start_time;
        infoObj.effectiveEndTime = info.coupon.end_time;
        infoObj.pid = info.pid;
        infoObj.tkl = info.tkl;
        infoObj.tmall = location.host.indexOf('tmall') > -1 ? true : false;
        if (G.site === 'taobao-ju') {
            infoObj.shopName = $('.sellername:eq(0)').text();
        }
        callback(infoObj, info.click_url);
        //console.log(infoObj)
        if (callbacks) {
            callbacks(infoObj, urls);
        }
    });
};

module.exports = getPageInfo;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 55 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 56 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Index_vue_vue_type_template_id_74d4d45d_scoped_true__ = __webpack_require__(677);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Index_vue_vue_type_script_lang_js__ = __webpack_require__(207);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Index_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Index_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Index_vue_vue_type_style_index_0_id_74d4d45d_scoped_true_lang_less__ = __webpack_require__(707);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Index_vue_vue_type_style_index_1_id_74d4d45d_scoped_true_lang_less__ = __webpack_require__(710);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);







/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Index_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Index_vue_vue_type_template_id_74d4d45d_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Index_vue_vue_type_template_id_74d4d45d_scoped_true__["staticRenderFns"],
  false,
  null,
  "74d4d45d",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('74d4d45d')) {
      api.createRecord('74d4d45d', component.options)
    } else {
      api.reload('74d4d45d', component.options)
    }
    module.hot.accept("./Index.vue?vue&type=template&id=74d4d45d&scoped=true", function () {
      api.rerender('74d4d45d', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/Index.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

module.exports = {
  2:      'need dictionary',     /* Z_NEED_DICT       2  */
  1:      'stream end',          /* Z_STREAM_END      1  */
  0:      '',                    /* Z_OK              0  */
  '-1':   'file error',          /* Z_ERRNO         (-1) */
  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */
  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */
  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */
  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */
  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */
};


/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var Times = 0;
var mainW = $(window).width();
var caches = {};

// 计算有多少空间给比价
var calFreeWidth = function calFreeWidth() {
  var head = 300;
  var rightW = 0;
  var ad = 0;
  var compare = $('.bjgext-product-compare').outerWidth();
  if ($('#bijiago-banner-ad').length > 0) {
    ad += 176;
  }
  if ($('#bijiago-banner-ad2').length > 0) {
    ad += 136;
  }
  var freeWidth = mainW - head - rightW - compare - ad;
  return freeWidth;
};
var changeUrl = function changeUrl(start, end, dom) {
  var replaceHref = __webpack_require__(266);
  var urlObj = replaceHref.getInfo();
  for (var i = start; i < end; i++) {
    var item = $(dom).find('.bjgext-item-img').eq(i);
    var href = item.attr('href');
    if (urlObj[href]) {
      item.attr('href', urlObj[href]);
    }
  }
};

module.exports.calCompare = function () {
  var width = calFreeWidth();
  return parseInt(width / 120);
};

module.exports.loadImage = function (start, end, dom) {
  for (var i = start; i < end; i++) {
    var itemimg = $(dom).find('img').eq(i)[0];
    if (!itemimg) return;
    var src = itemimg.getAttribute('data-original') || '';
    var defaultsrc = itemimg.src;
    if (src.indexOf('start.png') > -1 || src.indexOf('blank.png') > -1) {
      $(itemimg).attr('src', G.noImg);
      continue;
    }
    if (src !== defaultsrc) module.exports.checkImage(itemimg, src);
  }
};

module.exports.checkImage = function (dom, src) {
  var image = new Image();
  image.onload = function () {
    $(dom).attr('src', src);
  };
  image.onerror = function () {
    $(dom).attr('src', G.noImg);
  };
  image.src = src;
};

module.exports.calDetailNum = function () {
  var turnpage = 66 * 2;
  var itemW = 190 + 30;
  // 最后一个不需要右边距 所以加30  总距离减两边翻页
  return {
    'num': parseInt((mainW - turnpage) / itemW),
    'width': mainW - turnpage - 1
  };
};

module.exports.changePage = function (o, dom) {
  var parentDom = $(dom).parent().parent();
  var list = parentDom.find('.bjgext-product-box li');
  var len = list.length;
  var curpage = Number(parentDom.find('.bjgext-page-num em').text());
  var perpage = module.exports.calDetailNum().num;
  var totalpage = Math.ceil(len / perpage);
  list.hide();
  if (o == 1) {
    if (curpage === totalpage) {
      curpage = 0;
    }
    for (var i = curpage * perpage, size = (curpage + 1) * perpage > len ? len : (curpage + 1) * perpage; i < size; i++) {
      list.eq(i).show();
    }
    module.exports.loadImage(curpage * perpage, (curpage + 1) * perpage > len ? len : (curpage + 1) * perpage, list);
    curpage++;
  } else {
    if (curpage === 1) {
      curpage = totalpage + 1;
    }
    for (var i = (curpage - 2) * perpage, size = (curpage - 1) * perpage > len ? len : (curpage - 1) * perpage; i < size; i++) {
      list.eq(i).show();
    }
    module.exports.loadImage((curpage - 2) * perpage, (curpage - 1) * perpage > len ? len : (curpage - 1) * perpage, list);
    curpage--;
  }
  parentDom.find('.bjgext-page-num em').text(curpage);
};

module.exports.setSimplePagePos = function (size, dom) {
  var left = dom.offset().left;
  var domw = dom.outerWidth();
  var detail = dom.find('.bjgext-product-detail');
  var width = 220 * size + 2;
  var dleft = left + domw / 2 - width / 2;
  if (dleft < 0) dleft = 0;
  if (dleft + width > mainW) dleft = mainW - width - 2;
  detail.css('left', dleft + 'px');
};

module.exports.autoWidth = function () {
  setTimeout(function () {
    var timer = 0;
    while ($('#bjg-space').width() > 0 && timer < 10) {
      timer++;
      var len = $('.bjgext-item-dp').length;
      if (len === 0) return;
      $('.bjgext-item-dp')[len - 1].remove();
    }
  }, 0);
  if (Times > 10) return;
  var width = calFreeWidth();
  if (width < 0) {
    Times++;
    $('.bjgext-item-dp:last').remove();
    module.exports.autoWidth();
  } else {
    return;
  }
};

module.exports.resizeAutoWidth = function () {
  mainW = $(window).width();
  $('.bjgext-product-detail').remove();
  module.exports.autoWidth();
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var communicate = __webpack_require__(18);
var buildTaobaoUrl = __webpack_require__(28);
var userData = __webpack_require__(15);
var globalData = undefined,
    callbacks = undefined;
var hasrun = false;
var timeOUT = 4000;
var trueClassId = false;
var sitearr = ['vipshop', 'mogujie', 'meilishuo', 'amazon', 'yougou', 'yohobuy', '6pm', 'yintai', 'banggo', 'xiu', 'vancl', 'shopbop', 'shopin', 's', 'masamaso', 'secoo', 'mei', 'gap', 'paixie', 'moonbasa', 'meici', 'macys', 'myhabit', 'zhen', 'gilt', 'mbaobao', 'wangfujing', 'letao', 'camel', 'handu', 'mf910', '5lux', 'd1', 'taoxie', 'm18', "thewatchery", "escentual", 'biccamera', 'zhe800'];
if (location.host.indexOf('amazon') > -1 && location.host.indexOf('cn') == -1) timeOUT = 10000;
var editData = function editData(data) {
  var taobaoarr = [],
      tmallarr = [],
      guessarr = [];
  var dpdata = userData.get('dp_data');
  var nowprice = dpdata && dpdata.now.price;
  if (!nowprice) nowprice = G.dp.price;
  try {
    var info = JSON.parse(data);
    var array = info.mods.itemlist.data.collections;
    if (array.length == 0) return;
    if (array.length == 2 && array[0].title == '外观相似宝贝') {
      var similar = array[0].auctions;
      var len = similar.length > 20 ? 20 : similar.length;
      for (var i = 0; i < len; i++) {
        var item = {};
        var feeDesc = similar[i].view_fee == '0.00' ? '包邮' : '';
        item.nick = similar[i].nick;
        item.num_iid = similar[i].nid;
        item.title = similar[i].title;
        item.price = similar[i].view_price;
        item.item_location = similar[i].item_loc;
        item.store_name = similar[i].nick + feeDesc;
        item.pic_url = 'http:' + similar[i].pic_url;
        item.volume = similar[i].view_sales.replace('人付款', '');
        item.type = 'img_search';
        item.price2 = Number(item.price);
        if (nowprice && item.price2 * 2 < nowprice) continue;

        if (!item.pic_url.match(/jpg_[0-9]+x[0-9]/)) item.pic_url = item.pic_url.replace(/(\.png|\.jpg)/, '$1' + '_100x100.jpg');
        var obj = {
          'source': 'img_search',
          'img_url': 'http:' + similar[i].pic_url,
          'title': similar[i].title,
          'price': similar[i].view_price,
          'shop_name': similar[i].nick + feeDesc,
          'sales': similar[i].view_sales.replace('人付款', ''),
          'id': similar[i].nid,
          'url': 'https:' + similar[i].detail_url,
          'discuss': similar[i].comment_count,
          'istaobao': similar[i].detail_url.indexOf('detail.tmall.com') > -1 ? '0' : '1',
          'dp_id': similar[i].nid + '-' + (similar[i].detail_url.indexOf('detail.tmall.com') > -1) ? '83' : '123',
          'site_id': similar[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'
        };
        item.url = buildTaobaoUrl(obj);
        if (similar[i].detail_url.indexOf('detail.tmall.com') > -1) {
          tmallarr.push(item);
        } else {
          taobaoarr.push(item);
        }
      }
    } else if (array.length == 1 && array[0].title == '您可能会喜欢' || array.length == 2 && array[1].title == '您可能会喜欢') {
      var guess = array[array.length - 1].auctions;
      for (var i = 0; i < guess.length; i++) {
        var item = {};
        item.url = 'https:' + guess[i].detail_url;
        item.pic_url = guess[i].pic_url;
        item.title = guess[i].title;
        item.num_iid = guess[i].nid;
        item.price = guess[i].view_price;
        item.volume = guess[i].view_sales;
        item.nick = guess[i].nick;
        guessarr.push(item);
      }
    }
    taobaoarr = sortData(taobaoarr);
    tmallarr = sortData(tmallarr);
    globalData = {
      'taobao': taobaoarr,
      'tmall': tmallarr,
      'img_s': true,
      'guessfavor': guessarr
    };
    if (callbacks && !hasrun) {
      callbacks(globalData);
      hasrun = true;
    }
  } catch (e) {}
};

var sortData = function sortData(data) {
  if (!data.sort) return;
  data = data.sort(function (value1, value2) {
    if (Number(value1.price) > Number(value2.price)) return 1;else if (Number(value1.price) == Number(value2.price)) return 0;else return -1;
  });
  return data;
};
var getImgSrc = function getImgSrc() {
  var imgsrc = {
    '360buy': '#preview .jqzoom img',
    'gome': '.jqzoom img',
    'suning': '#imgZoom #bigImage',
    'yihaodian': '#J_prodImg',
    'vancl': '#midimg',
    'shopin': '#zoom1 img',
    'secoo': '.jqzoom',
    'mei': '#bigimg',
    'meici': '.zoomPad img',
    'macys': '#mainView_1',
    'taoxie': '#t_PreviewImage img',
    'd1': '.gs_right_spimg img',
    '5lux': '.cloudzoom',
    'mf910': '#op_product_zoom img',
    'handu': '#masterImage',
    'camel': '#img_jqzoom',
    'letao': '#simgouter img',
    'wangfujing': '.zoomPad .lazy-pic',
    'zhen': '#zoom1 .a_max_pic',
    'shopbop': '#productImage',
    'yohobuy': '#img-show',
    'taobao': '#J_ImgBooth',
    'thewatchery': '#detailimage',
    'amazon': '#altImages ul li img',
    'mogujie': '#J_BigImg',
    'escentual': '#zoom1 img',
    'biccamera': '#PROD-CURRENT-IMG',
    'zhe800': '#detail .deteilpic ul li img',
    'vipshop': '#J-mer-ImgReview .zoomPad>img',
    'tmall': '#J_ImgBooth'
  };
  if (imgsrc[G.site]) {
    var src = $(imgsrc[G.site]).eq(0).attr('src');
    if (location.host == 'www.amazon.co.jp' && src && src.match(/SR[0-9]+,[0-9]+/)) {
      src = src.replace(/SR([0-9]+)\,([0-9]+)/, 'SR' + '$1' + '0' + ',' + '$2' + '0');
    } else if (location.host.indexOf('amazon') > -1) {
      return false;
    }
    if (src && !src.match(/(?:http:|https:)/) && src.indexOf('//') > -1) src = 'http:' + src;
    if (G.site === 'zhe800') {
      src = src.replace('58x58.jpg', '220x220.jpg');
    }
    return src;
  }
  return false;
};
var readyImg = function readyImg(trueClassId) {
  var src = getImgSrc();
  if (sitearr.indexOf(G.site) > -1 && location.host != 'www.amazon.cn' || location.host.indexOf('1688') > -1 || trueClassId) {
    trueClassId = true; //发了请求都可以等，为true init里面才不会return
    communicate.trigger({
      type: 'getTaobaoImgInfo',
      src: src
    });
    communicate.on(function (data) {
      if (typeof data === 'string') {
        data = JSON.parse(data);
      }
      if (data.type == 'getTaobaoImgInfo') {
        var text = $('#gwd_img_info').text();
        if (text != '') editData(text);
      }
    });
  }
};
module.exports.ready = function () {
  if (G.site == 'taobao' || G.site == 'tmall' || G.site.indexOf('taobao') > -1) return;
  var dpdata = userData.get('dp_data');
  var classId = dpdata && dpdata['now']['class_id'];
  var code = dpdata && dpdata['code-server']['code'];
  var exact_arr = dpdata && dpdata['exact_arr'];
  if (G.site === 'amazon' && code) return;
  if (classId) classId = classId.slice(0, 2);
  if (G.site === '360buy') {
    var cate_id = G.dp.cat_id;
    if (cate_id) cate_id = cate_id.split('-')[0];
    var cateidArr = ["1620", "1315", "1318", "1672", "1319", "5025", "6144", "11729"];
    if (cateidArr.indexOf && cateidArr.indexOf(cate_id) > -1) {
      trueClassId = true;
    }
  } else {
    if (classId == "13" || classId == "24" || classId == "1A" || classId == '21') trueClassId = true;
  }
  if (G.from_device === 'bijiago' && exact_arr && exact_arr.brand && exact_arr.brand_id) {
    trueClassId = true;
  }

  readyImg(trueClassId);
};
module.exports.uniqPidGetImg = function (callback) {
  readyImg(true);
  callbacks = callback;
};

module.exports.init = function (callback) {
  if (!trueClassId && sitearr.indexOf(G.site) == -1) {
    callback(null);
    return;
  }
  if (globalData) {
    callback(globalData);
    hasrun = true;
  } else callbacks = callback;
  setTimeout(function () {
    if (callbacks && hasrun === false) {
      callbacks(null);
      hasrun = true;
    }
  }, timeOUT);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 60 */
/***/ (function(module, exports) {

module.exports = {"priceUp":{"zh":"价格上涨","en":"Price Increases","zh-tr":"價格上漲"},"priceStable":{"zh":"价格平稳","en":"Keep Stable","zh-tr":"價格平穩"},"priceDecrease":{"zh":"价格下降","en":"Price Declining","zh-tr":"價格下降"},"priceLowest":{"zh":"历史最低价","en":"Lowest Price","zh-tr":"歷史最低價"},"lowestSingleWithSpace":{"zh":"最低(单&nbsp;&nbsp;&nbsp;件):","en":"Lowest Price(single):","zh-tr":"最低(單&nbsp;&nbsp;&nbsp;件):"},"lowestSingle":{"zh":"最低(单件):","en":"Lowest(single):","zh-tr":"最低(單件):"},"lowest":{"zh":"最低:","en":"Lowest:","zh-tr":"最低:"},"textCurrent":{"zh":"现价","en":"Current","zh-tr":"現價"},"textHigh":{"zh":"最高","en":"Highest","zh-tr":"最高"},"textLow":{"zh":"最低","en":"Lowest","zh-tr":"最低"},"day":{"zh":"天","en":" days","zh-tr":"天"},"all":{"zh":"全部","en":"All","zh-tr":"全部"},"single":{"zh":"单&nbsp;&nbsp;&nbsp;件","en":"Single","zh-tr":"單&nbsp;&nbsp;&nbsp;件"},"combine":{"zh":"多&nbsp;&nbsp;&nbsp;件","en":"Combined","zh-tr":"多&nbsp;&nbsp;&nbsp;件"},"pagePrice":{"zh":"页面价","en":"Price","zh-tr":"頁面價"},"onHandPrice":{"zh":"到手价(单件)","en":"Promotion Price","zh-tr":"到手價(單件)"},"combinePrice":{"zh":"到手价(多件)","en":"Combined Price","zh-tr":"到手價(多件)"}}

/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

var getQRCode = __webpack_require__(23);
var qrFailed = __webpack_require__(352);

module.exports = {
  init: function init(newData, url, element, cb) {
    var appended = false;
    $(element).css('visibility', 'hidden');
    var get = function get() {
      return getQRCode(newData, url, function (newData2) {

        if (element === '.bjgext-toptabs .mini-coup-detail > img') {
          qrFailed = qrFailed.replace(/118px/g, '100px').replace(/59px/g, '50px');
        }
        if (newData2[0].etag && parseInt(newData2[0].etag) >= 1 && parseInt(newData2[0].etag) <= 2) {
          $(element).css('visibility', 'hidden');
          var el = $(element).parent();
          if (appended) {
            $(element.replace('img', '.gwd-qr-warn')).show();
            $(element.replace('img', '.gwd-qr-warn img')).css('visibility', 'visible');
            $(element.replace('img', '.gwd-qr-warn img')).attr('src', 'https://cdn.gwdang.com/images/extensions/warn@2x.png');
          } else {
            appended = true;
            $(el).append(qrFailed);
            $(element.replace('> img', '.gwd-qr-reload')).click(function () {
              get();
              $(element.replace('img', '.gwd-qr-warn')).hide();
            });
          }
          // $(element).click(function() {
          //   $(element).css('visibility', 'hidden')
          //   $(element).css('cursor', 'pointer')
          //   get()
          // })
        } else {
            $(element).attr('src', newData2[0].imgSrc);
            $(element).css('visibility', 'visible');
          }
        cb(newData2);
      }, false, false);
    };
    get();
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 62 */
/***/ (function(module, exports) {

exports.L = { bit: 1 }
exports.M = { bit: 0 }
exports.Q = { bit: 3 }
exports.H = { bit: 2 }

function fromString (string) {
  if (typeof string !== 'string') {
    throw new Error('Param is not a string')
  }

  const lcStr = string.toLowerCase()

  switch (lcStr) {
    case 'l':
    case 'low':
      return exports.L

    case 'm':
    case 'medium':
      return exports.M

    case 'q':
    case 'quartile':
      return exports.Q

    case 'h':
    case 'high':
      return exports.H

    default:
      throw new Error('Unknown EC Level: ' + string)
  }
}

exports.isValid = function isValid (level) {
  return level && typeof level.bit !== 'undefined' &&
    level.bit >= 0 && level.bit < 4
}

exports.from = function from (value, defaultValue) {
  if (exports.isValid(value)) {
    return value
  }

  try {
    return fromString(value)
  } catch (e) {
    return defaultValue
  }
}


/***/ }),
/* 63 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__ = __webpack_require__(366);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MemberCouponQr_vue_vue_type_script_lang_js__ = __webpack_require__(108);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MemberCouponQr_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MemberCouponQr_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MemberCouponQr_vue_vue_type_style_index_0_id_498face2_scoped_true_lang_less__ = __webpack_require__(368);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MemberCouponQr_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__["staticRenderFns"],
  false,
  null,
  "498face2",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('498face2')) {
      api.createRecord('498face2', component.options)
    } else {
      api.reload('498face2', component.options)
    }
    module.hot.accept("./MemberCouponQr.vue?vue&type=template&id=498face2&scoped=true", function () {
      api.rerender('498face2', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/MemberCouponQr.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, store_tle = $data.store_tle, min_price = $data.min_price;
    $$out += '<span class="btn-tab-sp">\n  <em class="gwd-bg"></em>\n  <span class="tab-sp1 blkcolor1 fw1">';
    $$out += $escape(store_tle);
    $$out += '</span>\n  <span class="tab-sp2 prifontf">\xA5';
    $$out += $escape(min_price);
    $$out += '</span>\n</span>';
    return $$out;
};

/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime) {

var _this = this;

var getCoupon = __webpack_require__(33);
var globalCondition = __webpack_require__(4);

var globalData = {
  tmall: [],
  taobao: []
};
var minPriceObj = {};
var minPriceStatus = {};
var sizeObj = {},
    totalObj = {};

var renderCoupon = function renderCoupon(data, type, isBottom) {
  sizeObj[type]++;
  if (data && data.data && data.data.coupon.coupon_limit !== '1') globalData[type].push(data.data);
  if (sizeObj[type] === totalObj[type]) {
    if (isBottom) {
      renderProdutBt(type, isBottom);
    } else {
      renderProdut(type);
    }
    if (G.aliSite) {
      // 如果是淘宝天猫，当前商品没有优惠券，需要吧比价结果里面有优惠券的商品在中间展示
      // 元旦红包时暂停显示
      // if (new Date() < new Date('2020-01-10T23:59:59')) {
      //   return
      // }
      if (G.runminiCoup === '1') {
        __webpack_require__(47).init(globalData, '.gwd-minibar-bg');
      } else if (!G.runminiCoup) {
        G.runminiCoupon2 = true;
        $(document).on('runminiCoupon2', function () {
          __webpack_require__(47).init(globalData, '.gwd-minibar-bg');
        });
      }
    }
  }
};
var renderProdutBt = function renderProdutBt(type, bdata) {
  // 渲染底部优惠券
  var arr = globalData[type];

  for (var i = 0; i < bdata.length; i++) {
    for (var j = 0; j < arr.length; j++) {
      if (bdata[i] && arr[j] && bdata[i].num_iid == arr[j].reqid) {
        var lastP = (Number(bdata[i].price) - arr[j].coupon.coupon_money).toFixed(2);
        if (Number(lastP) < 0) continue;
        if (Number(lastP) < minPriceObj[type] && lastP > 0) {
          minPriceObj[type] = lastP;
          minPriceStatus[type] = true;
        }
        var coupon_money = arr[j].coupon.coupon_money;
        bdata[i].url = arr[j].click_url2;
        bdata[i].tspan = '<span class="coupon_span">领' + coupon_money + '元券</span>';
        bdata[i].ta = '<div class="coupon_price">\n                    <span class="coupon_price_span">\n                      <span class="cou-pri-sp1">券后价:</span>\n                      <span class="cou-pri-sp2 prifontf">¥' + lastP + '</span>\n                      <span class="cou-pri-sp3 prifontf">¥' + bdata[i].price + '</span>\n                    </span>\n            </div>';
        break;
      }
    }
  }
  if (minPriceStatus[type]) {
    if (type === 'taobao') {
      $('.compare-list li[data-id="tbcompare"] .com-item-pri').text('¥' + minPriceObj[type]);
    } else {
      $('.compare-list li[data-id="tmcompare"] .com-item-pri').text('¥' + minPriceObj[type]);
    }
  }
  globalCondition.setMet('bottomCouponReady-' + (type === 'taobao' ? 'tbcompare' : 'tmcompare'));
};
var renderProdut = function renderProdut(type) {
  // 渲染顶部优惠券
  var ul = $('#' + type + '-item-list li');
  var len = ul.length;
  var arr = globalData[type];

  var _loop = function (i) {
    var id = ul.eq(i).attr('data-id');
    for (var j = 0; j < arr.length; j++) {
      if (arr[j] && arr[j].reqid == id) {
        if (ul.eq(i).find('.coupon_span').length) {
          console.warn('skipping coupon', ul.eq(i));
          return {
            v: undefined
          };
        }
        ul.eq(i).find('.small-img').append($('<span class="coupon_span">领' + arr[j].coupon.coupon_money + '元券</span>'));

        ul.eq(i).find('a').attr('href', arr[j].click_url2);
        ul.eq(i).find('a').on('click', function (e) {
          e.preventDefault();
          var adzone_id = '10003';
          if (G.aliSite) adzone_id = '10004';
          getCoupon.init(id, adzone_id, function (data) {
            window.open(data.data.click_url2);
          });
        });

        var price = ul.eq(i).find('span.gwd-price').text();
        var lastP = (Number(price.replace(/[¥￥]/g, '')) - arr[j].coupon.coupon_money).toFixed(2);
        if (Number(lastP) < 0) continue;
        if (Number(lastP) < minPriceObj[type]) {
          minPriceObj[type] = lastP;
          minPriceStatus[type] = true;
        }
        ul.eq(i).find('.gwd-price').after($('<div class="coupon_price">\n              <span class="cou-pri-sp1">券后价:</span>\n              <span class="cou-pri-sp2 prifontf">¥' + lastP + '</span>\n              <span class="cou-pri-sp3 prifontf">' + price + '</span>\n            </div>')).remove();
      }
    }
  };

  for (var i = 0; i < len; i++) {
    var _ret = _loop(i);

    if (typeof _ret === 'object') return _ret.v;
  }
  if (minPriceStatus[type]) {
    if (type == 'taobao') {
      $('#tb_compare .tab-sp2').text('¥' + minPriceObj[type]);
    } else {
      $('#tm_compare .tab-sp2').text('¥' + minPriceObj[type]);
    }
  }
};

// 比价结果部分的优惠券
module.exports.init = function callee$0$0(data, type, isBottom, minpri) {
  var direct = arguments.length <= 4 || arguments[4] === undefined ? false : arguments[4];
  var f2, adzone_id, i;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        // forbidCoupon entry部分给的值  可能会针对特定地区屏蔽
        window.gwd_G.aliCouponNotNeedFix = true;

        if (!G.forbidCoupon) {
          context$1$0.next = 3;
          break;
        }

        return context$1$0.abrupt('return');

      case 3:
        if (data) {
          context$1$0.next = 5;
          break;
        }

        return context$1$0.abrupt('return');

      case 5:
        if (data.length) {
          context$1$0.next = 7;
          break;
        }

        return context$1$0.abrupt('return');

      case 7:
        minPriceObj[type] = minpri;
        totalObj[type] = data.length;
        sizeObj[type] = 0;
        if (isBottom) isBottom = data;

        f2 = function f2(newData) {
          renderCoupon(newData, type, isBottom);
        };

        adzone_id = '10003';

        if (G.aliSite) adzone_id = '10004';
        G.arrToCheck = data.map(function (x) {
          return x.num_iid;
        });
        $('#tb_compare').hover(function () {
          globalCondition.setMet('aliCouponAllowed');
        });
        $('#tm_compare').hover(function () {
          globalCondition.setMet('aliCouponAllowed');
        });
        $('.compare-box').hover(function () {
          globalCondition.setMet('aliCouponAllowed');
        });
        $('.compare-list li[data-id="tbcompare"]').hover(function () {
          globalCondition.setMet('aliCouponAllowed');
        });
        $('.compare-list li[data-id="tmcompare"]').hover(function () {
          globalCondition.setMet('aliCouponAllowed');
        });
        context$1$0.next = 22;
        return regeneratorRuntime.awrap(globalCondition.met('aliCouponAllowed'));

      case 22:
        for (i = 0; i < data.length; i++) {
          getCoupon.init(data[i].num_iid, adzone_id, f2, direct);
        }

      case 23:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5)))

/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', isShowPic = $data.isShowPic, $escape = $imports.$escape, url = $data.url, lang = $data.lang, price = $data.price, picUrl = $data.picUrl, isBottom = $data.isBottom;
    $$out += '<span class="coupon-marleft"></span>\n<a id="top_coupon_btn" ';
    if (!isShowPic) {
        $$out += ' href="';
        $$out += $escape(url);
        $$out += '" title="';
        $$out += $escape(lang == 'zh-tr' ? '點擊領取' : '点击领取');
        $$out += '" target="_blank" style="cursor:pointer" ';
    }
    $$out += '>\n';
    if (lang == 'en') {
        $$out += '\n<span class="price-num" style="margin-left: 30px"><span class="price-sm">\xA5</span><span>';
        $$out += $escape(price);
        $$out += '</span> Coupon</span>\n';
    } else {
        $$out += '\n<span class="top-coupon-tle">';
        if (lang == 'zh-tr') {
            $$out += '當前商品領券立減';
        } else {
            $$out += '当前商品领券立减';
        }
        $$out += '</span>\n<span class="price-num"><span class="price-sm">\xA5</span><span>';
        $$out += $escape(price);
        $$out += '</span></span>\n';
    }
    $$out += '\n<em class="link_hand"></em>\n';
    if (picUrl && isShowPic) {
        $$out += '\n<div class="coupon_detail">\n    <img src="';
        $$out += $escape(picUrl);
        $$out += '">\n    <span>';
        if (lang == 'en') {
            $$out += 'Scan with WeChat';
        } else {
            $$out += '淘宝扫码领券';
        }
        $$out += '</span>\n</div>\n';
    }
    $$out += '\n<style>\n    #top_coupon_btn {\n        background: url(https://cdn.gwdang.com/images/extensions/coupon@3x.png) 0 0 no-repeat;\n        display: inline-flex;\n        height: 28px;\n        width: 149px;\n        white-space: nowrap;\n        position: relative;\n        z-index: 999999999999;\n        padding: 0 !important;\n        margin: 3px 40px 4px 0!important;\n        border: none !important;\n        background-size: cover;\n        align-items: center;\n        text-decoration: none!important;\n    }\n</style>\n';
    if (isShowPic) {
        $$out += '\n<style>\n    #top_coupon_btn * {\n        cursor: default;\n    }\n</style>\n';
    } else {
        $$out += '\n<style>\n    #top_coupon_btn * {\n        cursor: pointer;\n    }\n</style>\n';
    }
    $$out += '\n';
    if (isBottom) {
        $$out += '\n<style>\n    .coupon_detail {\n        bottom: 28px;\n    }\n\n    .mini-coup-detail {\n        transform-origin: top center;\n        transform: scale(1.3);\n    }\n</style>\n';
    } else {
        $$out += '\n<style>\n    .coupon_detail {\n        top: 28px;\n    }\n</style>\n';
    }
    $$out += '\n<style type="text/css">\n\n    .coupon_detail {\n        position: absolute;\n        right: 1px;\n        height: 156px;\n        width: 146px;\n        z-index: 99999999999;\n        background: #FFF6F4;\n        border: 1px solid #FF6132;\n        display: none;\n    }\n\n    #bjgext_mainbar .coupon_detail {\n        top: initial!important;\n    }\n\n    #top_coupon_btn:hover .coupon_detail {\n        display: block;\n    }\n\n    .coupon_detail img {\n        width: 118px;\n        height: 118px;\n        float: left;\n        margin-left: 14px;\n        margin-top: 8px;\n    }\n\n    .coupon_detail span {\n        font-size: 14px;\n        color: #FF4335 !important;\n        letter-spacing: 0.22px;\n        font-weight: bold;\n        float: left;\n        height: 14px;\n        line-height: 14px;\n        width: 100%;\n        margin-top: 6px;\n        text-align: center;\n    }\n\n    .coupon-marleft {\n        height: 100%;\n        width: 10px;\n        float: left !important;\n        border-left: 1px solid #edf1f2;\n    }\n\n    .link_hand {\n        display: inline-block;\n        height: 30px;\n        width: 38px;\n        position: absolute;\n        right: -38px;\n        top: -2px;\n        background: url(https://cdn.gwdang.com/images/extensions/newbar/hand.gif) 0px 0px no-repeat;\n    }\n\n    #top_coupon_btn * {\n        color: #fff;\n        /*float: left;*/\n        font-family: "microsoft yahei";\n    }\n\n    #top_coupon_btn .top-coupon-tle {\n        height: 16px;\n        text-align: center;\n        line-height: 16px;\n        margin-left: 2px;\n        font-size: 12px !important;\n        font-weight: normal !important;\n    }\n\n    #top_coupon_btn .price-num {\n        font-size: 14px;\n        color: #FFFFFF;\n        font-weight: bold;\n        width: 46px;\n        height: 22px;\n        text-align: center;\n        margin-left: 3px;\n        line-height: 22px !important;\n        padding: 0px !important;\n        vertical-align: middle;\n    }\n\n    #top_coupon_btn .price-num span {\n        display: inline;\n    }\n\n    #top_coupon_btn .price-sm {\n        font-size: 12px;\n        transform: scale(0.8333);\n        transform-origin: bottom right;\n    }\n\n    .mainbar-fold .coupon-marleft {\n        display: none;\n    }\n</style>\n</a>\n';
    return $$out;
};

/***/ }),
/* 67 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__ = __webpack_require__(529);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BjgBottomWindow_vue_vue_type_script_lang_js__ = __webpack_require__(158);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__BjgBottomWindow_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__BjgBottomWindow_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__BjgBottomWindow_vue_vue_type_style_index_0_id_683c35f8_scoped_true_lang_less__ = __webpack_require__(532);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__BjgBottomWindow_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__["staticRenderFns"],
  false,
  null,
  "683c35f8",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('683c35f8')) {
      api.createRecord('683c35f8', component.options)
    } else {
      api.reload('683c35f8', component.options)
    }
    module.hot.accept("./BjgBottomWindow.vue?vue&type=template&id=683c35f8&scoped=true", function () {
      api.rerender('683c35f8', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/BjgBottomWindow.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  data: function data() {
    return {
      positionStyle: 'left: 0'
    };
  },
  mounted: function mounted() {
    var _this = this;

    this.$el.parentElement.addEventListener('DOMSubtreeModified', function () {
      if (window.innerWidth - _this.$el.offsetLeft <= 564) {
        _this.positionStyle = 'right: -1';
      }
    });
  }
};
module.exports = exports['default'];

/***/ }),
/* 69 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAANlJREFUWEft1jEKAjEQBdDJgtYewSNoJ5LGTiSFRTyP3sdmK/EEsqVH8AamNwRJY2EjM/9DEDYH2P92Ej7jpPFxjfNlBPzXBNa7w6JMX2no+wfr7agm4EN81uBS3OZ2Od8ZCC3gJCJHEUkshApQ/9iHSEWoAWyECcBEmAEsBARgIGAAiqAAEAQNYEWwAbWkak+knPNyuP6ubBrAh/gJ17QkBWANr9cGA5BwGICGQwBGuBnACjcBmOFqADvcAmi7kq22+3nXTWasfVA9AcYS+v0NuIhQ1AhoPoE306mqIT7YeDoAAAAASUVORK5CYII="

/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
//https://github.com/javascript-obfuscator/javascript-obfuscator



Object.defineProperty(exports, '__esModule', {
  value: true
});

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

exports.parseMovementText = parseMovementText;
exports.collectMovement = collectMovement;
exports.packStaticFeatureValue = packStaticFeatureValue;
exports.unpackStaticFeatureValue = unpackStaticFeatureValue;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

var DynamicDetails = (function () {
  function DynamicDetails() {
    _classCallCheck(this, DynamicDetails);

    this.touchPosition = {
      x: 0,
      y: 0
    };
    this.touchEventTrusted = false;
    this.mouseEventCount = 0;
    this.mousePosition = {
      x: 0,
      y: 0
    };
    this.mouseDownCount = 0;
    this.mouseClickPosition = {
      x: 0,
      y: 0
    };
    this.mouseEventTrusted = false;
    this.keyDownCount = 0;
    this.scrollCount = 0;
    this.windowBlur = false;
    this.windowFocus = false;
    this.consoleWindowOpened = false;
    this.ip = 0; //webrtc ipv4 address
    this.batteryLevel = 127;
    this.deviceOrientationExists = false;
    this.features = packStaticFeatureValue();
    this.checkConsoleLoopHandle = 0;
  }

  _createClass(DynamicDetails, [{
    key: 'touchStartFn',
    value: function touchStartFn(e) {
      this.touchEventTrusted = e.isTrusted;
      this.mouseEventCount++;
      var t = e.touches[0];
      this.touchPosition.x = t.clientX | 0;
      this.touchPosition.y = t.clientY | 0;
    }
  }, {
    key: 'touchMoveFn',
    value: function touchMoveFn(e) {
      this.touchEventTrusted = e.isTrusted;
      this.mouseEventCount++;
    }
  }, {
    key: 'mouseMoveFn',
    value: function mouseMoveFn(e) {
      this.mouseEventTrusted = e.isTrusted;
      this.mouseEventCount++;
    }
  }, {
    key: 'mouseDownFn',
    value: function mouseDownFn(e) {
      //数值是不是0, 同时移动没有过界，window.outerHeight跟documentElement.clientHeight 或者document.body.clientHeight是否相等
      this.mouseEventTrusted = e.isTrusted;
      this.mouseEventCount++;
      this.mousePosition.x = e.clientX;
      this.mousePosition.y = e.clientY;
      this.mouseDownCount++;
    }
  }, {
    key: 'mouseClickFn',
    value: function mouseClickFn(e) {
      this.mouseEventTrusted = e.isTrusted;
      this.mouseEventCount++;
      this.mouseClickPosition.x = e.clientX;
      this.mouseClickPosition.y = e.clientY;
    }
  }, {
    key: 'keyDownFn',
    value: function keyDownFn(e) {
      this.keyDownCount++;
    }
  }, {
    key: 'scrollFn',
    value: function scrollFn(e) {
      this.scrollCount++;
    }
  }, {
    key: 'focusFn',
    value: function focusFn(e) {
      this.windowFocus = true;
      this.windowBlur = false;
    }
  }, {
    key: 'blurFn',
    value: function blurFn(e) {
      this.windowBlur = true;
    }
  }, {
    key: 'devtoolsCb',
    value: function devtoolsCb() {
      var details = this;
      var e = new Error();
      Object.defineProperty(e, 'stack', {
        get: function get() {
          clearInterval(details.checkConsoleLoopHandle);
          details.consoleWindowOpened = true;
        }
      });
      console.log(e);
      if (details.consoleWindowOpened) {
        console.clear();
      }
    }
  }, {
    key: 'consoleCheckLoop',
    value: function consoleCheckLoop() {
      // if (process.env.NODE_ENV !== 'debug') {
      //   let func = this.devtoolsCb.bind(this);
      //   func();
      //   this.checkConsoleLoopHandle = setInterval(function (e) {
      //     func();
      //   }, 5e3);
      // }
    }
  }, {
    key: 'getBatteryStatus',
    value: function getBatteryStatus(details) {
      if (!navigator.getBattery) {
        return;
      }
      navigator.getBattery().then(function (battery) {
        if (battery) {
          details.batteryLevel = battery.level * 100 | 0;
        }
      });
    }
  }, {
    key: 'getDeviceOrientation',
    value: function getDeviceOrientation(details) {
      function cb(event) {
        if (event.gamma) {
          details.deviceOrientationExists = true;
        }
        document.removeEventListener("deviceorientation", cb, false);
      }
      window.addEventListener('deviceorientation', cb, false);
    }
  }, {
    key: 'getWebRTCIP',
    value: function getWebRTCIP(details) {
      var t = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
      if (!t) details.ip = 0;
      var r = {
        iceServers: [{
          urls: ["stun:stun.cloudflare.com:3478", "stun:stun.qq.com:3478"]
        }]
      };
      try {
        var a = new t(r);
        setTimeout(function () {
          try {
            a.close();
          } catch (t) {}
        }, 5e3);
        a.onicecandidate = function (t) {
          if (t.candidate) {
            var ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/;
            var match = t.candidate.candidate.match(ipRegex);
            // const ipAddress = t.candidate.candidate.match(ipRegex)?.[1];
            var ipAddress = match ? match[1] : null;
            if (ipAddress && !ipAddress.includes('.local')) {
              r = extractIPFromWebRTCCandidate(ipAddress);
              if (null != r) {
                details.ip = r;
                a.onicecandidate = null;
              }
            }
          }
        };
        a.createDataChannel("");
        a.createOffer().then(function (n) {
          a.setLocalDescription(n);
        })['catch'](function (t) {
          details.ip = 0;
        });
      } catch (e) {
        details.ip = 0;
      }
    }
  }, {
    key: 'pack',
    value: function pack() {
      var group1 = (this.touchPosition.x | 1 << 30) + ',' + this.touchPosition.y + ',' + (this.touchEventTrusted ? 1 : 0);
      var group2 = this.mouseEventCount + ',' + this.mousePosition.x + ',' + this.mousePosition.y + ',' + this.mouseClickPosition.x + ',' + this.mouseClickPosition.y + ',' + this.mouseDownCount + ',' + (this.mouseEventTrusted ? 1 : 0);
      var group3 = this.keyDownCount + ',' + this.scrollCount + ',' + (this.windowBlur ? 1 : 0) + ',' + (this.windowFocus ? 1 : 0);
      var group4 = (this.consoleWindowOpened ? 1 : 0) + ',' + numberToHex(this.ip) + ',' + this.batteryLevel + ',' + (this.deviceOrientationExists ? 1 : 0);
      var group5 = '' + numberToHex(this.features);
      var all = group1 + ';' + group2 + ';' + group3 + ';' + group4 + ';' + group5;
      return all;
    }
  }, {
    key: 'encode',
    value: function encode() {
      return Base64.encode(this.pack());
    }
  }]);

  return DynamicDetails;
})();

exports.DynamicDetails = DynamicDetails;
;

function parseMovementText(text) {
  var _text$split = text.split(";");

  var _text$split2 = _slicedToArray(_text$split, 5);

  var group1 = _text$split2[0];
  var group2 = _text$split2[1];
  var group3 = _text$split2[2];
  var group4 = _text$split2[3];
  var group5 = _text$split2[4];

  var details = new DynamicDetails();

  var _group1$split = group1.split(",");

  var _group1$split2 = _slicedToArray(_group1$split, 3);

  details.touchPosition.x = _group1$split2[0];
  details.touchPosition.y = _group1$split2[1];
  details.touchEventTrusted = _group1$split2[2];

  details.touchEventTrusted = !!parseInt(details.touchEventTrusted);

  var _group2$split = group2.split(",");

  var _group2$split2 = _slicedToArray(_group2$split, 7);

  details.mouseEventCount = _group2$split2[0];
  details.mousePosition.x = _group2$split2[1];
  details.mousePosition.y = _group2$split2[2];
  details.mouseClickPosition.x = _group2$split2[3];
  details.mouseClickPosition.y = _group2$split2[4];
  details.mouseDownCount = _group2$split2[5];
  details.mouseEventTrusted = _group2$split2[6];

  details.mouseEventTrusted = !!parseInt(details.mouseEventTrusted);

  var _group3$split = group3.split(",");

  var _group3$split2 = _slicedToArray(_group3$split, 4);

  details.keyDownCount = _group3$split2[0];
  details.scrollCount = _group3$split2[1];
  details.windowBlur = _group3$split2[2];
  details.windowFocus = _group3$split2[3];

  details.windowBlur = !!parseInt(details.windowBlur);
  details.windowFocus = !!parseInt(details.windowFocus);

  var _group4$split = group4.split(",");

  var _group4$split2 = _slicedToArray(_group4$split, 4);

  details.consoleWindowOpened = _group4$split2[0];
  details.ip = _group4$split2[1];
  details.batteryLevel = _group4$split2[2];
  details.deviceOrientationExists = _group4$split2[3];

  details.consoleWindowOpened = !!parseInt(details.consoleWindowOpened);
  details.deviceOrientationExists = !!parseInt(details.deviceOrientationExists);
  details.ip = int2ip(parseInt(details.ip, 16));
  return [details, group5];
}

function collectMovement(details) {
  var b = document.body;
  if ("ontouchmove" in document) {
    document.addEventListener("touchmove", details.touchMoveFn.bind(details), true);
  }
  b.addEventListener("touchstart", details.touchStartFn.bind(details), true);
  b.addEventListener("mousemove", details.mouseMoveFn.bind(details), true);
  b.addEventListener("mousedown", details.mouseDownFn.bind(details), true);
  b.addEventListener("click", details.mouseClickFn.bind(details), true);
  b.addEventListener("keydown", details.keyDownFn.bind(details), true);
  b.addEventListener("wheel", details.scrollFn.bind(details), true);
  window.addEventListener("focus", details.focusFn.bind(details), true);
  window.addEventListener("blur", details.blurFn.bind(details), true);

  details.getWebRTCIP(details);
  details.getDeviceOrientation(details);
  details.getBatteryStatus(details);
  details.consoleCheckLoop();
}

function extractIPFromWebRTCCandidate(n) {
  var t = /(\d+)\.(\d+)\.(\d+)\.(\d+)/.exec(n);
  return t ? (+t[1] << 24 | +t[2] << 16 | +t[3] << 8 | +t[4]) >>> 0 : null;
}

function int2ip(ipInt) {
  return (ipInt >>> 24) + '.' + (ipInt >> 16 & 255) + '.' + (ipInt >> 8 & 255) + '.' + (ipInt & 255);
}

function numberToHex(number) {
  return parseInt(number).toString(16);
}

function isNativeObject(o) {
  return !!/native code/.test(o.toString.toString()) && !!/native code/.test(o.toString());
}

function isWebGLSupported() {
  try {
    var canvas = document.createElement('canvas');
    var context = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
    return !!context;
  } catch (e) {
    return false;
  }
}

function IsSwiftShader() {
  try {
    var canvas = document.createElement('canvas');
    var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
    if (!gl) return false;

    var debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
    if (!debugInfo) return false;

    var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
    return renderer.includes('SwiftShader');
  } catch (e) {
    return false;
  }
}

function IsSupportLocalStorage() {
  try {
    localStorage.a = "b";
    return localStorage.a === "b";
  } catch (e) {
    return false;
  }
}

function isMP4Supported() {
  var video = document.createElement('video');

  var isSupported = video.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');

  if (isSupported === "probably" || isSupported === "maybe") {
    return true;
  } else {
    return false;
  }
}

// Detect Browser
function getEngine() {
  var x = [].constructor;
  try {
    (-1).toFixed(-1);
  } catch (err) {
    return err.message.length + (x + '').split(x.name).join('').length;
  }
}

var engineIdentifier = getEngine();
var isBlink = engineIdentifier == 80;
var isGecko = engineIdentifier == 58;
var isWebkit = engineIdentifier == 77;

var headStyle = document.head.style;
var isChrome = window.chrome !== undefined;
var isIE = ("ActiveXObject" in window);
var hasWeakMap = "WeakMap" in window.WeakMap && new window.WeakMap();
var ua = navigator.userAgent;

//收集立刻能返回的标志, 通过bit set, 打包进一个interger
var checkFunctions = {
  _1: function _1() {
    //mp4支持
    return isMP4Supported();
  },
  _2: function _2() {
    //chrome
    return isChrome;
  },
  _3: function _3() {
    //safari
    return "safari" in window;
  },
  _4: function _4() {
    //isBlink
    return isBlink;
  },
  _5: function _5() {
    return isGecko;
  },
  _6: function _6() {
    return isWebkit;
  },
  _7: function _7() {
    //IE 9
    return isIE && !window.atob;
  },
  _8: function _8() {
    //device
    return navigator.deviceMemory > 0 && navigator.hardwareConcurrency > 0;
  },
  _9: function _9() {
    //IE >= 11
    return isIE && hasWeakMap && isNativeObject(window.WeakMap);
  },
  _10: function _10() {
    //chrome
    return "Google Inc." === navigator.vendor;
  },
  _11: function _11() {
    //safari
    return "Apple Computer, Inc." === navigator.vendor;
  },
  _12: function _12() {
    //chrome headless
    return window.innerWidth === 800 && window.innerHeight === 600 && window.outerWidth === 0 && window.outerHeight === 0 || navigator.languages == "" || /Headless/i.test(ua);
  },
  _13: function _13() {
    //webgl支持
    return isWebGLSupported();
  },
  _14: function _14() {
    //python
    return (/python/i.test(navigator.appVersion)
    );
  },
  _15: function _15() {
    return IsSupportLocalStorage();
  },
  _16: function _16() {
    return (/Maxthon/i.test(navigator.vendor)
    );
  },
  _17: function _17() {
    //opera
    return "opr" in window || "opera" in window;
  },
  _18: function _18() {
    //chromium based browsers
    return isChrome && /BIDUBrowser/i.test(ua);
  },
  _19: function _19() {
    return isChrome && /LBBROWSER/i.test(ua);
  },
  _20: function _20() {
    return isChrome && /QQBrowser/.test(ua);
  },
  _21: function _21() {
    return isChrome && /UBrowser/i.test(ua);
  },
  _22: function _22() {
    return isChrome && /2345Explorer/.test(ua);
  },
  _23: function _23() {
    return isChrome && /TheWorld/.test(ua);
  },
  _24: function _24() {
    //Not Chrome, it's the Edge browser
    return isChrome && "MSGesture" in window;
  },
  _25: function _25() {
    return isNativeObject(Object.getOwnPropertyDescriptor) && Object.getOwnPropertyDescriptor(navigator) != undefined;
  },
  _26: function _26() {
    //webdriver
    return "$cdc_asdjflasutopfhvcZLmcfl_" in window || navigator.webdriver;
  },
  _27: function _27() {
    //document is hidden
    return document.hidden;
  },
  _28: function _28() {
    //chinese
    return (/zh-cn/i.test(navigator.language || navigator.systemLanguage)
    );
  },
  _29: function _29() {
    //beijing timezone
    return -480 === new Date().getTimezoneOffset();
  },
  _30: function _30() {
    return IsSwiftShader();
  },
  _31: function _31() {
    //document size compare
    //IE8 不支持outerWidth, 同时如果成立表示， 没有显示滚动条
    return window.outerWidth !== null && (window.outerWidth === document.documentElement.clientWidth || document.body.clientWidth);
  }
};

exports.checkFunctions = checkFunctions;

function packStaticFeatureValue() {
  var value = 0;
  for (var i in checkFunctions) {
    var shift = parseInt(i.split("_")[1]) - 1;
    var set = 0;
    try {
      set = checkFunctions[i]() ? 1 : 0;
    } catch (e) {}
    value |= set << shift;
  }
  return value;
}

function unpackStaticFeatureValue(value) {
  var number = parseInt(value, 16);
  var statuses = [];
  for (var i = 0; i < 31; i++) {
    var _status = (number & 1 << i) > 0;
    statuses.push(_status);
  }
  return statuses;
}

//用js实现， 打乱码表
var Base64 = {
  // private property
  _keyStr: "ZLHUPIO4tAok06E/caWCmSFfKusy3nrjJRzDTvBgY7wdMlXp82NViGq=+Qheb91x5",

  // public method for encoding
  encode: function encode(input) {
    var output = "";
    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
    var i = 0;

    input = Base64._utf8_encode(input);

    while (i < input.length) {

      chr1 = input.charCodeAt(i++);
      chr2 = input.charCodeAt(i++);
      chr3 = input.charCodeAt(i++);

      enc1 = chr1 >> 2;
      enc2 = (chr1 & 3) << 4 | chr2 >> 4;
      enc3 = (chr2 & 15) << 2 | chr3 >> 6;
      enc4 = chr3 & 63;

      if (isNaN(chr2)) {
        enc3 = enc4 = 64;
      } else if (isNaN(chr3)) {
        enc4 = 64;
      }

      output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
    }

    return output;
  },

  // public method for decoding
  decode: function decode(input) {
    var output = "";
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;

    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

    while (i < input.length) {

      enc1 = this._keyStr.indexOf(input.charAt(i++));
      enc2 = this._keyStr.indexOf(input.charAt(i++));
      enc3 = this._keyStr.indexOf(input.charAt(i++));
      enc4 = this._keyStr.indexOf(input.charAt(i++));

      chr1 = enc1 << 2 | enc2 >> 4;
      chr2 = (enc2 & 15) << 4 | enc3 >> 2;
      chr3 = (enc3 & 3) << 6 | enc4;

      output = output + String.fromCharCode(chr1);

      if (enc3 != 64) {
        output = output + String.fromCharCode(chr2);
      }
      if (enc4 != 64) {
        output = output + String.fromCharCode(chr3);
      }
    }

    output = Base64._utf8_decode(output);

    return output;
  },

  // private method for UTF-8 encoding
  _utf8_encode: function _utf8_encode(string) {
    string = string.replace(/\r\n/g, "\n");
    var utftext = "";

    for (var n = 0; n < string.length; n++) {

      var c = string.charCodeAt(n);

      if (c < 128) {
        utftext += String.fromCharCode(c);
      } else if (c > 127 && c < 2048) {
        utftext += String.fromCharCode(c >> 6 | 192);
        utftext += String.fromCharCode(c & 63 | 128);
      } else {
        utftext += String.fromCharCode(c >> 12 | 224);
        utftext += String.fromCharCode(c >> 6 & 63 | 128);
        utftext += String.fromCharCode(c & 63 | 128);
      }
    }

    return utftext;
  },

  // private method for UTF-8 decoding
  _utf8_decode: function _utf8_decode(utftext) {
    var string = "";
    var i = 0;
    var c = 0;
    var c2 = 0;
    var c3 = 0;

    while (i < utftext.length) {

      c = utftext.charCodeAt(i);

      if (c < 128) {
        string += String.fromCharCode(c);
        i++;
      } else if (c > 191 && c < 224) {
        c2 = utftext.charCodeAt(i + 1);
        string += String.fromCharCode((c & 31) << 6 | c2 & 63);
        i += 2;
      } else {
        c2 = utftext.charCodeAt(i + 1);
        c3 = utftext.charCodeAt(i + 2);
        string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
        i += 3;
      }
    }

    return string;
  }

};
exports.Base64 = Base64;

/***/ }),
/* 71 */
/***/ (function(module, exports) {

/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
module.exports = __webpack_amd_options__;

/* WEBPACK VAR INJECTION */}.call(exports, {}))

/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _vuex = __webpack_require__(24);

var _vuex2 = _interopRequireDefault(_vuex);

var userModule = __webpack_require__(22);

module.exports = new _vuex2['default'].Store({
  modules: {
    user: {
      namespaced: true,
      state: {
        userLogin: false,
        userName: '',
        userHasWx: false,
        priceProtectEnabled: false
      },
      mutations: {
        setState: function setState(state, payload) {
          Object.keys(payload).forEach(function (key) {
            state[key] = payload[key];
          });
        }
      },
      actions: {
        init: function init(ctx) {

          userModule.hasWx().then(function (res) {
            ctx.commit('setState', {
              userHaxWx: res
            });
          });
        }
      }
    }
  }
});

/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// Note: adler32 takes 12% for level 0 and 2% for level 6.
// It isn't worth it to make additional optimizations as in original.
// Small size is preferable.

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function adler32(adler, buf, len, pos) {
  var s1 = (adler & 0xffff) |0,
      s2 = ((adler >>> 16) & 0xffff) |0,
      n = 0;

  while (len !== 0) {
    // Set limit ~ twice less than 5552, to keep
    // s2 in 31-bits, because we force signed ints.
    // in other case %= will fail.
    n = len > 2000 ? 2000 : len;
    len -= n;

    do {
      s1 = (s1 + buf[pos++]) |0;
      s2 = (s2 + s1) |0;
    } while (--n);

    s1 %= 65521;
    s2 %= 65521;
  }

  return (s1 | (s2 << 16)) |0;
}


module.exports = adler32;


/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// Note: we can't get significant speed boost here.
// So write code to minimize size - no pregenerated tables
// and array tools dependencies.

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

// Use ordinary array, since untyped makes no boost here
function makeTable() {
  var c, table = [];

  for (var n = 0; n < 256; n++) {
    c = n;
    for (var k = 0; k < 8; k++) {
      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
    }
    table[n] = c;
  }

  return table;
}

// Create table on load. Just 255 signed longs. Not a problem.
var crcTable = makeTable();


function crc32(crc, buf, len, pos) {
  var t = crcTable,
      end = pos + len;

  crc ^= -1;

  for (var i = pos; i < end; i++) {
    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
  }

  return (crc ^ (-1)); // >>> 0;
}


module.exports = crc32;


/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// String encode/decode helpers



var utils = __webpack_require__(25);


// Quick check if we can use fast array to bin string conversion
//
// - apply(Array) can fail on Android 2.2
// - apply(Uint8Array) can fail on iOS 5.1 Safari
//
var STR_APPLY_OK = true;
var STR_APPLY_UIA_OK = true;

try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }
try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }


// Table with utf8 lengths (calculated by first byte of sequence)
// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
// because max possible codepoint is 0x10ffff
var _utf8len = new utils.Buf8(256);
for (var q = 0; q < 256; q++) {
  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
}
_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start


// convert string to array (typed, when possible)
exports.string2buf = function (str) {
  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;

  // count binary size
  for (m_pos = 0; m_pos < str_len; m_pos++) {
    c = str.charCodeAt(m_pos);
    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
      c2 = str.charCodeAt(m_pos + 1);
      if ((c2 & 0xfc00) === 0xdc00) {
        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
        m_pos++;
      }
    }
    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
  }

  // allocate buffer
  buf = new utils.Buf8(buf_len);

  // convert
  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
    c = str.charCodeAt(m_pos);
    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
      c2 = str.charCodeAt(m_pos + 1);
      if ((c2 & 0xfc00) === 0xdc00) {
        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
        m_pos++;
      }
    }
    if (c < 0x80) {
      /* one byte */
      buf[i++] = c;
    } else if (c < 0x800) {
      /* two bytes */
      buf[i++] = 0xC0 | (c >>> 6);
      buf[i++] = 0x80 | (c & 0x3f);
    } else if (c < 0x10000) {
      /* three bytes */
      buf[i++] = 0xE0 | (c >>> 12);
      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
      buf[i++] = 0x80 | (c & 0x3f);
    } else {
      /* four bytes */
      buf[i++] = 0xf0 | (c >>> 18);
      buf[i++] = 0x80 | (c >>> 12 & 0x3f);
      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
      buf[i++] = 0x80 | (c & 0x3f);
    }
  }

  return buf;
};

// Helper (used in 2 places)
function buf2binstring(buf, len) {
  // On Chrome, the arguments in a function call that are allowed is `65534`.
  // If the length of the buffer is smaller than that, we can use this optimization,
  // otherwise we will take a slower path.
  if (len < 65534) {
    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
    }
  }

  var result = '';
  for (var i = 0; i < len; i++) {
    result += String.fromCharCode(buf[i]);
  }
  return result;
}


// Convert byte array to binary string
exports.buf2binstring = function (buf) {
  return buf2binstring(buf, buf.length);
};


// Convert binary string (typed, when possible)
exports.binstring2buf = function (str) {
  var buf = new utils.Buf8(str.length);
  for (var i = 0, len = buf.length; i < len; i++) {
    buf[i] = str.charCodeAt(i);
  }
  return buf;
};


// convert array to string
exports.buf2string = function (buf, max) {
  var i, out, c, c_len;
  var len = max || buf.length;

  // Reserve max possible length (2 words per char)
  // NB: by unknown reasons, Array is significantly faster for
  //     String.fromCharCode.apply than Uint16Array.
  var utf16buf = new Array(len * 2);

  for (out = 0, i = 0; i < len;) {
    c = buf[i++];
    // quick process ascii
    if (c < 0x80) { utf16buf[out++] = c; continue; }

    c_len = _utf8len[c];
    // skip 5 & 6 byte codes
    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }

    // apply mask on first byte
    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
    // join the rest
    while (c_len > 1 && i < len) {
      c = (c << 6) | (buf[i++] & 0x3f);
      c_len--;
    }

    // terminated by end of string?
    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }

    if (c < 0x10000) {
      utf16buf[out++] = c;
    } else {
      c -= 0x10000;
      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
      utf16buf[out++] = 0xdc00 | (c & 0x3ff);
    }
  }

  return buf2binstring(utf16buf, out);
};


// Calculate max possible position in utf8 buffer,
// that will not break sequence. If that's not possible
// - (very small limits) return max size as is.
//
// buf[] - utf8 bytes array
// max   - length limit (mandatory);
exports.utf8border = function (buf, max) {
  var pos;

  max = max || buf.length;
  if (max > buf.length) { max = buf.length; }

  // go back from last position, until start of sequence found
  pos = max - 1;
  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }

  // Very small and broken sequence,
  // return max, because we should return something anyway.
  if (pos < 0) { return max; }

  // If we came to start of buffer - that means buffer is too small,
  // return max too.
  if (pos === 0) { return max; }

  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
};


/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function ZStream() {
  /* next input byte */
  this.input = null; // JS specific, because we have no pointers
  this.next_in = 0;
  /* number of bytes available at input */
  this.avail_in = 0;
  /* total number of input bytes read so far */
  this.total_in = 0;
  /* next output byte should be put there */
  this.output = null; // JS specific, because we have no pointers
  this.next_out = 0;
  /* remaining free space at output */
  this.avail_out = 0;
  /* total number of bytes output so far */
  this.total_out = 0;
  /* last error message, NULL if no error */
  this.msg = ''/*Z_NULL*/;
  /* not visible by applications */
  this.state = null;
  /* best guess about the data type: binary or text */
  this.data_type = 2/*Z_UNKNOWN*/;
  /* adler32 value of the uncompressed data */
  this.adler = 0;
}

module.exports = ZStream;


/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

module.exports = {

  /* Allowed flush values; see deflate() and inflate() below for details */
  Z_NO_FLUSH:         0,
  Z_PARTIAL_FLUSH:    1,
  Z_SYNC_FLUSH:       2,
  Z_FULL_FLUSH:       3,
  Z_FINISH:           4,
  Z_BLOCK:            5,
  Z_TREES:            6,

  /* Return codes for the compression/decompression functions. Negative values
  * are errors, positive values are used for special but normal events.
  */
  Z_OK:               0,
  Z_STREAM_END:       1,
  Z_NEED_DICT:        2,
  Z_ERRNO:           -1,
  Z_STREAM_ERROR:    -2,
  Z_DATA_ERROR:      -3,
  //Z_MEM_ERROR:     -4,
  Z_BUF_ERROR:       -5,
  //Z_VERSION_ERROR: -6,

  /* compression levels */
  Z_NO_COMPRESSION:         0,
  Z_BEST_SPEED:             1,
  Z_BEST_COMPRESSION:       9,
  Z_DEFAULT_COMPRESSION:   -1,


  Z_FILTERED:               1,
  Z_HUFFMAN_ONLY:           2,
  Z_RLE:                    3,
  Z_FIXED:                  4,
  Z_DEFAULT_STRATEGY:       0,

  /* Possible values of the data_type field (though see inflate()) */
  Z_BINARY:                 0,
  Z_TEXT:                   1,
  //Z_ASCII:                1, // = Z_TEXT (deprecated)
  Z_UNKNOWN:                2,

  /* The deflate compression method */
  Z_DEFLATED:               8
  //Z_NULL:                 null // Use -1 or null inline, depending on var type
};


/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

module.exports = function (callback) {
  var cc = "?from_device=" + G.from_device + "&callback=?";
  if (G.from_device === 'sogou' || G.from_device === "chrome") cc = '?from_device=' + G.from_device;
  $.getJSON(G.server + '/ip.php' + cc).done(function (data) {
    if (data && data.result instanceof Array) {
      G.forbidWishlit = true;
      G.forbidYFQ = true;
    }
    if (data && data.result && data.result.address && data.result.address.indexOf('北京') > -1) {
      G.forbidWishlit = true;
      //  屏蔽 yifenqian
      G.forbidYFQ = true;
    }
    callback();
  }).fail(function () {
    callback();
  });
};

module.exports.common = function (callback) {
  // let cc = "?from_device=" + G.from_device + "&callback=?"
  // if (G.from_device === 'sogou' || (G.from_device === 'bijiago' && G.chrome_extension))
  //   cc = '?from_device=' + G.from_device;
  // if (G.from_device === 'xdjf')
  //   cc = "?callback=?&district=1"
  callback(null);
  // $.getJSON(G.server + '/ip.php' + cc).then((data) => {
  //   debugger
  //   if (data && data.result && data.result.address) {
  //     callback(data);
  //   } else {
  //     callback(null)
  //   }
  //
  // }).catch(() => {
  //   callback(null)
  // })
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {

var _this = this;

var product = __webpack_require__(264);
var request = __webpack_require__(3);
var util = __webpack_require__(19);
// const loadCss = require('standard/module/loadCss')
var communicate = __webpack_require__(18);
var extConsole = __webpack_require__(6);
var bgClient = __webpack_require__(16);

var markPage = function markPage() {
  $('html').addClass('bd_' + G.site);
  $('html').addClass(G.from_type);
};

var loadCss = function loadCss() {
  // if (G.from_device === 'biyibi') {
  //   return
  // }
  var chrom = undefined;
  try {
    chrom = chrome;
  } catch (e) {
    chrom = null;
  }
  var url = '';
  if (chrom && chrom.extension && chrom.extension.getURL) {
    url = chrom.extension.getURL('css/' + G.cssname);
  } else {
    url = G.s_server + '/css/brwext/' + G.cssname;
  }
  $('head').append('<link type="text/css" href="' + url + '?v=' + G.version + '" rel="stylesheet" />');
  setTimeout(function () {
    var hasGwd = $('html').hasClass('gwd_bottom') || window.disable_gwd_privacy;
    if (!hasGwd) {
      // $(`head`).append(`<link type="text/css" href="https://cdn.bijiago.com/css/brwext/gwdang-notifier-new6.css?v=${G.version}" rel="stylesheet" />`);
    }
  }, 300);
  // $(`head`).append(`<link type="text/css" href="https://cdn.bijiago.com/css/brwext/gwdang-notifier-new6.css?v=${G.version}" rel="stylesheet" />`);
};

var getConfigInfo = function getConfigInfo(callback) {
  var runned = false;
  setTimeout(function () {
    if (!runned) {
      G.show_minibar = '1';
      G.show_inner_low = '0';
      G.show_promo = '1';
      G.show_leftguess = '1';
      G.guess_fold = '0';
      G.main_fold = '1';
      G.lang = 'zh';
      console.log('bjgext start');
      callback();
    }
  }, 1000);
  communicate.on(function (data) {
    if (typeof data === 'string') {
      data = JSON.parse(data);
    }
    if (data.type === 'get_permanent' && (G.from_device === 'bijiago' || G.from_device === 'biyibi')) {
      if (data.value) {
        data = JSON.parse(data.value);
        G.show_minibar = data.show_minibar || '1';
        G.show_inner_low = data.show_inner_low || '0';
        G.show_promo = data.show_promo || '1';
        G.show_leftguess = data.show_leftguess || '1';
        G.guess_fold = data.guess_fold || '0';
        G.guid = data.guid || '';
        G.main_fold = data.main_fold || (G.from_device.includes('biyibi') ? '0' : '1');
        // if in taiwan, set lang to zh-tr
        G.lang = data.lang || (navigator.language === 'zh-TW' ? 'zh-tr' : 'zh');
        if (G.from_device === 'biyibi') {
          G.lang = 'zh';
        }
      } else {
        G.show_minibar = '1';
        G.show_inner_low = '0';
        G.show_promo = '1';
        G.show_leftguess = '1';
        G.guess_fold = '0';
        G.main_fold = G.from_device.includes('biyibi') ? '0' : '1';
        G.lang = navigator.language === 'zh-TW' ? 'zh-tr' : 'zh';
      }
      if (G.lang === 'zh-tr') {
        G.disableLogin = true;
      }
      runned = true;
      callback();
    } else if (data.type === 'get_local_img') {
      G.localImg = data.value;
      if (G.aliSite) {
        G.loadImg = data.value + '120.gif';
        G.noImg = data.value + 'default_load_image.png';
      }
    } else if (data.type === 'user_extension_id') {
      G.userid = data.value;
    } else if (data.type === 'getUnion' && data.value) {
      G.union = data.value;
    }
  });
  communicate.trigger({
    'type': 'user_extension_id'
  });
  communicate.trigger({
    'type': 'get_permanent'
  });
  communicate.trigger({
    'type': 'get_local_img'
  });
  communicate.trigger({
    'type': 'getUnion',
    'value': 'bajbgcodue_fugnhijoknl'
  });
};

var urltimes = 0;
var listenUrlChange = function listenUrlChange() {
  if (urltimes > 99999) return;
  urltimes++;
  var url = location.href;
  if (!window.bjgGlobalStart) {
    window.bjgGlobalStart = Date.now();
  }
  var k = setInterval(function () {
    if (url !== location.href || window.extNeedReload) {
      window.extNeedReload = false;
      __webpack_require__(6).log('ext reload start');
      if (!$('#bjgext_mainbar').length && G.pageInfo.type === 2) {
        url = location.href;
        extConsole.warn('reload exit', G.pageInfo);
        return;
      }
      if (Date.now() - window.bjgGlobalStart < 2000) {
        extConsole.warn('reload exit');
        url = location.href;
        return;
      }
      clearInterval(k);
      extConsole.log('begin reload ', {
        before: url,
        after: location.href
      });
      __webpack_require__(730).init();
    } else {
      // require('common/extConsole').log('match')
    }
  }, 200);
};

module.exports.init = function callee$0$0() {
  var event, installSource;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        request.rawGet('https://cdn.bijiago.com/js/configs/gwdang.json?v=1').then(function (r) {
          __webpack_require__(4).setMet('GwdConfig', r);
        });

        context$1$0.next = 3;
        return regeneratorRuntime.awrap(__webpack_require__(10).sleep(500));

      case 3:
        __webpack_require__(221).reset();
        event = __webpack_require__(743);

        event(G);
        if (G.site === 'amazon') G.site = G.logsite;
        if (G.site) {
          if (G.site === 'apple' || G.site === 'shopee' || G.site === 'taobao' || G.site === '6pm' || G.site.indexOf('amazon') > -1 || G.site.indexOf('tmall') > -1 || G.site.indexOf('lining') > -1) {
            listenUrlChange();
          }
        }

        if (!(G.site === 'shopee')) {
          context$1$0.next = 11;
          break;
        }

        context$1$0.next = 11;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          return $('.product-briefing .flex span').text();
        }));

      case 11:
        if (!G.allowBackgroundRequest) {
          context$1$0.next = 16;
          break;
        }

        context$1$0.next = 14;
        return regeneratorRuntime.awrap(bgClient.get('/getStorage', {
          key: 'install_source'
        }));

      case 14:
        installSource = context$1$0.sent;

        if (installSource) {
          G.union = 'union_bijiago_' + installSource;
        }

      case 16:
        getConfigInfo(function () {
          if (location.hostname.includes('xiaohongshu.com')) {
            __webpack_require__(744).init();
            return;
          }
          util.tongjiLog('page_view');
          util.getPermanent(function () {
            // require('./quanlogo').init()
            util.tongjiLog('union_log:' + G.union);
            __webpack_require__(745).init();
            __webpack_require__(746).init();
            if (G.pageInfo.type === 2) {
              util.tongjiLog('product_page_visit');
              if (G.aliSite) {
                __webpack_require__(85).init2();
                __webpack_require__(82).init();
              }
              product.init();
              __webpack_require__(747).init();
              // if (G.ss_name !== 'priceDog') {
              __webpack_require__(748).init();
              // }
              markPage();
              loadCss();
              __webpack_require__(759).init();
              __webpack_require__(197).init();
              __webpack_require__(221).init();

              if (G.aliSite && !window.gwd_G) {
                // require('standard/module/aliMobilePriceNotifier').init()
              }

              setTimeout(function () {
                if (!window.gwd_G) {
                  __webpack_require__(766).init();
                }
              }, 1000);
            } else if (G.pageInfo.type === 1) {
              markPage();
              __webpack_require__(6).log('instanceId', G.instanceId);
              if (G.from_device === 'biyibi') {
                __webpack_require__(168);
              }
              // if (G.ss_name !== 'priceDog') {
              __webpack_require__(769).init();
              // }
              util.getDicts(function () {
                // 比价狗暂时去掉跳转
                // require('common/setForceInfo')()
              });
              var hosts = location.host;
              if (hosts.indexOf('taobao') > -1 || hosts.indexOf('tmall') > -1) {
                __webpack_require__(773).init();
              }
              if (hosts.includes('.jd.com')) {
                __webpack_require__(774).init();
              }
              __webpack_require__(775).init();
              loadCss();
            }
          });
        });

        window.bjgou_G = G;

        if (location.hostname.includes('.taobao.com')) {
          (function () {
            var tk = '';
            var t = setInterval(function () {
              var token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
              if (token !== tk) {
                tk = token;
                bgClient.get('/setStorage', {
                  taobaoTk: {
                    tk: tk,
                    time: Date.now()
                  }
                });
                clearInterval(t);
              }
            }, 500);
          })();
        }

      case 19:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, classname = $data.classname;
    $each(data, function ($value, $index) {
        $$out += '\n<div class="';
        $$out += $escape(classname);
        $$out += '" data-id="';
        $$out += $escape($value.dp_id);
        $$out += '">\n  <span>\n    <p class="item-pri fontb fontZh">';
        $$out += $escape($value.currency ? $value.currency : '\uFFE5');
        $$out += $escape($value.price);
        $$out += '</p>\n    <p class="item-tle fontZh" style="white-space: nowrap">';
        $$out += $escape($value.site_name2 ? $value.site_name2 : $value.site_name);
        $$out += '</p>\n  </span>\n</div>\n';
    });
    return $$out;
};

/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', pages = $data.pages, $escape = $imports.$escape, b_width = $data.b_width, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, per = $data.per, lang = $data.lang, loadimg = $data.loadimg;
    $$out += '<div class="bjgext-product-detail" style="';
    if (pages != 0) {
        $$out += ' left:0px;';
    }
    $$out += 'width:';
    $$out += $escape(b_width);
    $$out += 'px; height: 245px;" >\n  ';
    if (pages > 1) {
        $$out += '\n  <div class="bjgext-page bjgext-turnleft">\n    <span class="bjgext-bg turnpage-btn"></span>\n  </div>\n  ';
    }
    $$out += '\n  <div class="bjgext-product-box " style="height: 245px;">\n    <ul>\n      ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li ';
        if ($index % per == 0) {
            $$out += ' class="bjgext-margl0" ';
        }
        $$out += '>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '&lang=';
        $$out += $escape(lang);
        $$out += '" target="_blank" class="bjgext-item-img" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n          <img src="';
        $$out += $escape(loadimg);
        $$out += '" data-original="';
        $$out += $escape($value.img_url);
        $$out += '">\n<!--          <span class="bjgext-item-tle">';
        $$out += $escape($value.title);
        $$out += '</span>-->\n          ';
        if ($value.coupon) {
            $$out += '\n          <span class="coupon_span">领';
            $$out += $escape($value.coupon);
            $$out += '元券</span>\n          ';
        }
        $$out += '\n        </a>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '&lang=';
        $$out += $escape(lang);
        $$out += '" target="_blank" title="';
        $$out += $escape($value.title);
        $$out += '" class="bjgext-item-tle" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n          ';
        $$out += $escape($value.title);
        $$out += '\n        </a>\n        <span style="margin-top: 8px;">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n        <span class="bjgext-item-price fontb">\n          ';
        $$out += $escape($value.currency ? $value.currency : '\xA5');
        $$out += $escape($value.price);
        $$out += '\n        </span>\n        ';
        if ($value.rev_cnt != 0 && $value.rev_cnt) {
            $$out += '\n        <span class="bjgext-item-cnv">评论数\uFF1A';
            $$out += $escape($value.rev_cnt);
            $$out += '</span>\n        ';
        }
        $$out += '\n      </li>\n      ';
    });
    $$out += '\n    </ul>\n  </div>\n  ';
    if (pages > 1) {
        $$out += '\n  <div class="bjgext-page bjgext-turnright">\n    <span class="bjgext-page-num"><em>1</em>/';
        $$out += $escape(pages);
        $$out += '</span>\n    <span class="bjgext-bg turnpage-btn"></span>\n  </div>\n  ';
    }
    $$out += '\n</div>\n\n<style>\n  .bjgext-product-detail {\n    box-shadow:0px -2px 2px 0px rgba(37,37,37,0.06);\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var communicate = __webpack_require__(18);
var buildTaobaoUrl = __webpack_require__(28);
var globalData = undefined,
    callbacks = undefined;
var hasrun = false;
var timeOUT = 2500;

var getuniqPid = function getuniqPid(id) {
  if (id == '') return;
  var url = G.server + '/extension?ac=getuniqpid&nid=' + id;
  request.get(url).then(function (data) {
    if (data && data.uniqid) {
      sendPid(id, data.uniqid);
    } else {
      // requestTaobaoImgSearch()
    }
  });
};
var sendPid = function sendPid(id, pid) {
  var info = {
    'nid': id,
    'uniqid': pid
  };
  communicate.trigger({
    'type': 'getTaobaouniq',
    'info': JSON.stringify(info)
  });
  communicate.on(function (data) {
    if (typeof data === 'string') {
      data = JSON.parse(data);
    }
    if (data.type == 'getTaobaouniq') {
      var text = $('#gwd_uniq_info').text();
      if (text != '') editData(text);
    }
  });
};
var sortData = function sortData(data) {
  if (!data.sort) return;
  data = data.sort(function (value1, value2) {
    if (Number(value1.price) > Number(value2.price)) return 1;else if (Number(value1.price) == Number(value2.price)) return 0;else return -1;
  });
  return data;
};
var editData = function editData(txt) {
  try {
    var data = JSON.parse(txt);
    data = data.mods.recitem.data.items;
    var taobaoarr = [],
        tmallarr = [];
    if (!data) return;
    for (var i = 0, len = data.length; i < len; i++) {
      var item = {};
      var feeDesc = data[i].view_fee == '0.00' ? '包邮' : '';
      item.nick = data[i].nick;
      item.num_iid = data[i].nid;
      item.title = data[i].title;
      item.price = data[i].view_price;
      item.item_location = data[i].item_loc;
      item.store_name = data[i].nick + feeDesc;
      item.pic_url = 'http:' + data[i].pic_url;
      item.same_style = true;
      item.volume = data[i].view_sales.replace('人付款', '');
      var obj = {
        'source': 'same_style',
        'img_url': 'http:' + data[i].pic_url,
        'title': data[i].title,
        'price': data[i].view_price,
        'shop_name': data[i].nick + feeDesc,
        'sales': data[i].view_sales.replace('人付款', ''),
        'id': data[i].nid,
        'url': 'https:' + data[i].detail_url,
        'discuss': data[i].comment_count,
        'istaobao': data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '0' : '1',
        'dp_id': data[i].nid + '-' + (data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'),
        'site_id': data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'
      };
      item.url = buildTaobaoUrl(obj);
      if (data[i].detail_url.indexOf('detail.tmall.com') > -1) {
        tmallarr.push(item);
      } else {
        taobaoarr.push(item);
      }
    }
    taobaoarr = sortData(taobaoarr);
    tmallarr = sortData(tmallarr);
    globalData = {
      'taobao': taobaoarr,
      'tmall': tmallarr,
      'uniqPid': true
    };
    if (callbacks && !hasrun) {
      callbacks(globalData);
      hasrun = true;
    }
  } catch (e) {}
};
var requestTaobaoImgSearch = function requestTaobaoImgSearch() {
  /*taobao root_id 筛选需要做图片检索的分类*/
  // let rootIdArr = ["50510002", "50012029", "50013864", "50011397", "50010404", "1625", "50006842", "50006843", "16", "50011740", "50011699", "50008165", "50008163", "30", "50020857", "50020808", "50013886"];
  // let root_id = G.dp.root_id;
  __webpack_require__(59).uniqPidGetImg(function (data) {
    if (callbacks) {
      callbacks(data);
      hasrun = true;
    } else {
      globalData = data;
    }
  });
  timeOUT = 6000;
};
var getNid = function getNid() {
  if (location.host.indexOf('taobao') > -1 || location.host.indexOf('tmall') > -1) {
    var id = location.href.match(/[?&]id=([0-9]+)/);
    if (id && id.length) {
      id = id[1];
      getuniqPid(id);
    }
  }
};
module.exports.init = function () {
  /*淘宝价格走势*/
  if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    communicate.trigger({
      type: 'get_etao_info'
    });
  }
  if (G.site == 'taobao' || G.site == 'tmall') getNid();
};
module.exports.getTaobaouniqData = function (callback) {
  if (globalData) {
    callback(globalData);
    hasrun = true;
    return;
  } else callbacks = callback;
  setTimeout(function () {
    if (callbacks && hasrun === false) {
      callbacks(null);
      hasrun = true;
    }
  }, timeOUT);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime) {

var _this = this;

var getCoupon = __webpack_require__(33);
var getCouponNew = __webpack_require__(38);

var adzoneIdObj = {
  'bjg923253': {
    'adzone_id1': '10021',
    'adzone_id2': '10021'
  },
  'union_bijiago': {
    'adzone_id1': '10019',
    'adzone_id2': '10019'
  },
  'union_bijiago_mogu': {
    'adzone_id1': '10019',
    'adzone_id2': '10019'
  },
  'union_bijiago_uos': {
    'adzone_id1': '10015',
    'adzone_id2': '10013'
  }
};

var pidConfig = __webpack_require__(46);

var globalData = {
  tmall: [],
  taobao: []
};
var sizeObj = {},
    totalObj = {};
var minPriceObj = {};
var minPriceStatus = {};

var cnt = 0;

var renderCoupon = function renderCoupon(data, type, isBottom) {
  cnt++;
  if (cnt > 29) {
    //debugger
  }
  sizeObj[type]++;
  if (data && data.data) globalData[type].push(data.data);
  if (sizeObj[type] === totalObj[type]) {
    if (isBottom) {
      renderProdutBt(type, isBottom);
    } else {
      renderProdut(type);
    }
    if (G.aliSite) {
      if (G.runminiCoup === '1') {
        __webpack_require__(47).init(globalData, "#bjgext_mb_bg");
        __webpack_require__(84).init(globalData);
      } else if (!G.runminiCoup) {
        G.runminiCoupon2 = true;
        $(document).on('runminiCoupon2', function () {
          __webpack_require__(47).init(globalData, "#bjgext_mb_bg");
          __webpack_require__(84).init(globalData);
        });
      }
    }
  }
};
var renderProdutBt = function renderProdutBt(type, bdata) {
  var arr = globalData[type];

  for (var i = 0; i < bdata.length; i++) {
    for (var j = 0; j < arr.length; j++) {
      if (bdata[i] && arr[j] && bdata[i].num_iid == arr[j].reqid) {
        var lastP = (Number(bdata[i].price) - parseFloat(arr[j].coupon.coupon_money)).toFixed(2);
        if (bdata[i].priceCut) {
          lastP = Number(bdata[i].price);
        }
        if (Number(lastP) < minPriceObj[type]) {
          minPriceObj[type] = lastP;
          minPriceStatus[type] = true;
        }
        var coupon_money = arr[j].coupon.coupon_money;
        bdata[i].url = arr[j].click_url2;

        if (lastP < 0) {}
        var ori = bdata[i].price;
        if (bdata[i].priceCut) {
          ori += parseFloat(arr[j].coupon.coupon_money);
        }
        ori = parseFloat(ori);
        lastP = parseFloat(lastP).toFixed(2);
        bdata[i].tspan = '<span class="coupon_span">领' + coupon_money + '元券</span>';
        // bdata[i].ta = `<div class="coupon_price">
        //       <span class="cou-pri-sp1">券后价:</span>
        //       <span class="cou-pri-sp2">￥${lastP}</span>
        //       <span class="cou-pri-sp3">￥${ori.toFixed(2)}</span>
        //     </div>`
        if (G.lang === 'en') {
          bdata[i].tspan = '<span class="coupon_span">' + coupon_money + ' Coupon</span>';
          // bdata[i].ta = `<div class="coupon_price">
          //     <span class="cou-pri-sp1">Price after coupon:</span>
          //     <span class="cou-pri-sp2">￥${lastP}</span>
          //     <span class="cou-pri-sp3">￥${ori.toFixed(2)}</span>
          //   </div>`
        }
        break;
      }
    }
  }

  if (minPriceStatus[type]) {
    $('.bjgext-item-tb[data-id="' + type + '"] .item-pri').text('￥' + parseFloat(minPriceObj[type]).toFixed(2));
  }
};
var renderProdut = function renderProdut(type) {
  var ul = $('#' + type + '-item-list li');
  var len = ul.length;
  var arr = globalData[type];
  for (var i = 0; i < len; i++) {
    var id = ul.eq(i).attr('data-id');
    for (var j = 0; j < arr.length; j++) {
      if (arr[j] && arr[j].reqid == id) {
        ul.eq(i).find('.small-img').append($('<span class="coupon_span">领' + arr[j].coupon.coupon_money + '元券</span>'));
        var price = ul.eq(i).find('span.gwd-price').text();
        var lastP = (Number(price.replace(/[¥￥]/g, '')) - arr[j].coupon.coupon_money).toFixed(2);
        ul.eq(i).find('.gwd-price').after($('<a href="' + arr[j].click_url2 + '" target="_blank" class="coupon_price">\n              <span class="cou-pri-sp1">' + (G.lang === 'en' ? 'Price after coupon' : '券后价') + ':</span>\n              <span class="cou-pri-sp2">￥' + lastP + '</span>\n              <span class="cou-pri-sp3">' + price + '</span>\n            </a>')).remove();
        ul.eq(i).find('a').attr('href', arr[j].click_url2);
      }
    }
  }
};

module.exports.init = function (data, type, isBottom, minpri) {
  if (G.forbidCoupon) {
    __webpack_require__(4).setMet('AliProduct' + type, data);
    return;
  }
  if (!data) return;
  if (!data.length) return;
  minPriceObj[type] = minpri;
  totalObj[type] = data.length;
  sizeObj[type] = 0;
  if (isBottom) isBottom = data;
  var f2 = function f2(newData) {
    renderCoupon(newData, type, isBottom);
  };
  if (!adzoneIdObj[G.union]) {
    adzoneIdObj[G.union] = {
      adzone_id1: 'default',
      adzone_id2: 'default'
    };
  }
  var adzone_id = adzoneIdObj[G.union]['adzone_id2'];
  if (G.aliSite) {
    adzone_id = adzoneIdObj[G.union]['adzone_id1'];
    for (var i = 0; i < data.length; i++) {
      getCoupon.init(data[i].num_iid, adzone_id, f2);
    }
    return;
  }
  Promise.all(data.map(function (product) {
    return new Promise(function callee$2$0(resolve) {
      var coupon;
      return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
        while (1) switch (context$3$0.prev = context$3$0.next) {
          case 0:
            context$3$0.next = 2;
            return regeneratorRuntime.awrap(getCoupon.byIdAndAdzone(product.num_iid, adzone_id));

          case 2:
            coupon = context$3$0.sent;

            if (coupon) {
              renderCoupon(coupon, type, isBottom);
              // product.price = product.price - coupon.data.coupon.coupon_money
              product.priceCut = true;
              product.tspan = '<span class="coupon_span">领' + coupon.data.coupon.coupon_money + '元券</span>';
              // product.ta = `<div class="coupon_price">
              //               <span class="coupon_price_span">
              //                 <span class="cou-pri-sp1">券后价:</span>
              //                 <span class="cou-pri-sp2 prifontf">¥${product.price.toFixed(2)}</span>
              //                 <span class="cou-pri-sp3 prifontf">¥${(parseFloat(product.price) + parseFloat(coupon.data.coupon.coupon_money)).toFixed(2)}</span>
              //               </span>
              //       </div>`
              if (G.lang === 'en') {
                product.tspan = '<span class="coupon_span">' + coupon.data.coupon.coupon_money + ' Coupon</span>';
                // product.ta = `<div class="coupon_price">
                //             <span class="coupon_price_span">
                //               <span class="cou-pri-sp1">Price after coupon:</span>
                //               <span class="cou-pri-sp2 prifontf">¥${product.price.toFixed(2)}</span>
                //               <span class="cou-pri-sp3 prifontf">¥${(parseFloat(product.price) + parseFloat(coupon.data.coupon.coupon_money)).toFixed(2)}</span>
                //             </span>
                //     </div>`
              }
              product.url = coupon.data.click_url2;
            }
            resolve();

          case 5:
          case 'end':
            return context$3$0.stop();
        }
      }, null, _this);
    });
  })).then(function () {
    __webpack_require__(4).setMet('AliProduct' + type, data);
    if (isBottom) {
      renderProdutBt(type, isBottom);
    } else {
      renderProdut(type);
    }
  });
};

// let coupon = await getCouponNew.initWithDpAsync(product.num_iid, pidConfig[G.union], 'compare');
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5)))

/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var cnzz = __webpack_require__(12);
var detect = __webpack_require__(44);
var priceParser = __webpack_require__(36);

var time = 0;
var pageObj = {};
var animateLock = undefined;

var posPattern = {
  'taobao': ["#detail .tb-item-info-l"],
  'tmall': ["#J_DetailMeta .tb-gallery"]
};

module.exports.init = function (data) {
  if (G.forbidCoupon) return;
  if (G.ss_name === 'priceDog') return;
  var tbData = userData.get('tbData');
  time++;
  if (tbData.ss === time) {
    var siteName = G.site;
    var siteId = detect.getSiteId(siteName);
    priceParser.init(siteId, function (price) {
      if (price && price > 0) {
        G.dp.oldPrice = price;
        G.dp.price = price;
      }
      render(data, tbData);
    });
  }
};

var editData = function editData(data, tbData) {
  var newdata = [];
  for (var i = 0; i < data.taobao.length; i++) {
    for (var j = 0; j < tbData.taobao.product.length; j++) {
      var tbitem = tbData.taobao.product[j];
      if (data.taobao[i].reqid === tbitem.num_iid) {
        data.taobao[i].imgUrl = tbitem.pic_url;
        data.taobao[i].l_price = tbitem.price;
        data.taobao[i].title = tbitem.title;
        data.taobao[i].coupon_money = data.taobao[i].coupon.coupon_money;
        data.taobao[i].price = (Number(tbitem.price) - data.taobao[i].coupon.coupon_money).toFixed(2);
        if (Number(tbitem.price) - data.taobao[i].coupon.coupon_money <= G.dp.price) {
          newdata.push(data.taobao[i]);
        }
      }
    }
  }
  for (var i = 0; i < data.tmall.length; i++) {
    for (var j = 0; j < tbData.tmall.product.length; j++) {
      var tmitem = tbData.tmall.product[j];
      if (data.tmall[i].reqid === tmitem.num_iid) {
        data.tmall[i].imgUrl = tmitem.pic_url;
        data.tmall[i].l_price = tmitem.price;
        data.tmall[i].title = tmitem.title;
        data.tmall[i].coupon_money = data.tmall[i].coupon.coupon_money;
        data.tmall[i].price = (Number(tmitem.price) - data.tmall[i].coupon.coupon_money).toFixed(2);
        if (Number(tmitem.price) - data.tmall[i].coupon.coupon_money <= G.dp.price) {
          newdata.push(data.tmall[i]);
        }
      }
    }
  }
  newdata.sort(function (v1, v2) {
    return Number(v1.price) - Number(v2.price);
  });
  return newdata;
};

var render = function render(data, tbData) {
  data = editData(data, tbData);
  var size = data.length;
  if (size === 0) return;
  $('body').addClass('dpc_' + G.site);
  var html = __webpack_require__(270);
  var doms = posPattern[G.site];
  for (var i = 0; i < doms.length; i++) {
    if ($(doms[i]).length > 0) {
      $(doms[i]).append(template.compile(html)({
        data: data,
        s_s: G.s_server,
        size: size,
        lang: G.lang
      }));
      break;
    }
  }
  if (size > 4) {
    pageObj.pages = Math.ceil(size / 4);
    pageObj.nowpage = 1;
  }

  addEvent(size);
};

var turnpage = function turnpage(type) {
  var dom = $('.dpcoupon-bd ul');
  var left = dom.css('left');
  left = Number(left.replace('px', '')) || 0;
  if (type === 1) {
    if (pageObj.nowpage === pageObj.pages) return;
    pageObj.nowpage++;
    left = left - 440;
  } else if (type === -1) {
    if (pageObj.nowpage === 1) return;
    pageObj.nowpage--;
    left = left + 440;
  }
  if (dom.animate) {
    animateLock = true;
    dom.animate({
      left: left + 'px'
    }, 300, function () {
      animateLock = false;
    });
  } else {
    dom.css('left', left + 'px');
  }
};

var addEvent = function addEvent(size) {
  $('.dpcoupon-bd').on('click', function () {
    cnzz.log('dpcouponimg:click');
  });
  $('.dpc-turn-l').on('click', function () {
    if (animateLock) {
      setTimeout(function () {
        turnpage(-1);
      }, 400);
    } else {
      turnpage(-1);
    }
  });
  $('.dpc-turn-r').on('click', function () {
    if (animateLock) {
      setTimeout(function () {
        turnpage(1);
      }, 400);
    } else {
      turnpage(1);
    }
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var communicate = __webpack_require__(18);
var globalObj = undefined,
    callbacks = [];
var hascallback = undefined;
var init = function init() {
  debugger;
  var nowurl = location.href;
  var itemId = nowurl.match(/[?&]id=([0-9]+)/) && nowurl.match(/[?&]id=([0-9]+)/)[1];
  if (!itemId) return;
  var website = G.dp && G.dp.site || G.site;
  if (website.indexOf('95095') > -1) {
    globalObj = {
      'nodata': true
    };
    return;
  }
  if (website == 'ai-taobao') website = 'taobao';
  // let price = Number(G.dp.price)*100;
  // let url = 'https://browserre.taotaosou.com/priceHistory.do?itemId='+ itemId + '&website=' + website + '&price=' + price.toString();
  var url = __webpack_require__(281).init();
  communicate.trigger({
    'type': 'getTaobaoTrend',
    'info': url
  });
  communicate.on(function (data) {
    if (typeof data === 'string') {
      data = JSON.parse(data);
    }
    if (data.type == 'getTaobaoTrend') {
      if (data.value) try {
        globalObj = JSON.parse(data.value).priceHistoryData;
        if (!globalObj) globalObj = {
          'nodata': true
        };
        if (callbacks.length > 0 && !hascallback) {
          //hascallback = true; // debug
          for (var i = 0; i < callbacks.length; i++) {
            callbacks[i](globalObj);
          }
          hascallback = true;
        }
      } catch (e) {}
    }
  });
};

module.exports._init = function () {
  // G.on('pageType=2', () => {
  //   init()
  // })
};
module.exports.init2 = function () {
  // init()
};
module.exports.getTrend = function (callback) {
  if (globalObj) {
    if (globalObj['nodata']) globalObj = null;
    hascallback = true;
    callback(globalObj);
    return;
  } else {
    callbacks.push(callback);
  }
  setTimeout(function () {
    if (!hascallback) {
      hascallback = true;
      callback(null);
    }
  }, 3000);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 86 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var user = __webpack_require__(22);
var globalCondition = __webpack_require__(4);

exports['default'] = {
  data: function data() {
    return {
      productChecked: G.productChecked,
      login: G.userLogin
    };
  },
  methods: {
    checkCollected: function checkCollected() {
      var dpId, token;
      return regeneratorRuntime.async(function checkCollected$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

          case 2:
            dpId = context$1$0.sent;
            context$1$0.next = 5;
            return regeneratorRuntime.awrap(user.hasUserToken());

          case 5:
            token = context$1$0.sent;

            if (token) {
              context$1$0.next = 11;
              break;
            }

            G.userLogin = false;
            this.login = false;
            G.trigger('bjgouFavor');
            return context$1$0.abrupt('return');

          case 11:
            G.userLogin = true;
            this.login = true;
            user.checked(dpId).then(function (res) {
              if (res.code === -3) {
                G.userLogin = false;
                _this.login = false;
                G.trigger('bjgouFavor');
                return;
              }
              if (res.code === 0) {
                _this.productChecked = false;
                G.productChecked = false;
                G.trigger('bjgouFavor');
                return;
              }
              _this.productChecked = res.data.id;
              G.productChecked = res.data.id;
              G.trigger('bjgouFavor');
              // G.productChecked = res.data
            });

          case 14:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    favorClick: function favorClick() {
      var dpId, res;
      return regeneratorRuntime.async(function favorClick$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

          case 2:
            dpId = context$1$0.sent;

            if (this.productChecked) {
              context$1$0.next = 11;
              break;
            }

            context$1$0.next = 6;
            return regeneratorRuntime.awrap(user.collect(dpId));

          case 6:
            res = context$1$0.sent;

            console.log(res);
            if (res.code === 1) {
              this.productChecked = res.data.id;
              G.productChecked = res.data.id;
            }
            context$1$0.next = 16;
            break;

          case 11:
            context$1$0.next = 13;
            return regeneratorRuntime.awrap(user.del(this.productChecked));

          case 13:
            res = context$1$0.sent;

            console.log(res);
            if (res.code === 1) {
              this.productChecked = false;
              G.productChecked = false;
            }

          case 16:
            G.trigger('bjgouFavor');

          case 17:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    goLogin: function goLogin() {
      //location.href = `https://i.bijiago.com/UserUnion/Authorize?utype=2&app_platform=ext&_referer=${encodeURIComponent(location.href)}`
      user.goLogin();
    }
  },
  created: function created() {
    var _this2 = this;

    console.log('created execute');
    var k = setInterval(function callee$1$0() {
      var token;
      return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
        while (1) switch (context$2$0.prev = context$2$0.next) {
          case 0:
            k++;

            if (!(k > 10)) {
              context$2$0.next = 3;
              break;
            }

            return context$2$0.abrupt('return');

          case 3:
            context$2$0.next = 5;
            return regeneratorRuntime.awrap(user.hasUserToken());

          case 5:
            token = context$2$0.sent;

            if (token) {
              context$2$0.next = 11;
              break;
            }

            G.userLogin = false;
            this.login = false;
            G.trigger('bjgouFavor');
            return context$2$0.abrupt('return');

          case 11:
            G.userLogin = true;
            this.login = true;

          case 13:
          case 'end':
            return context$2$0.stop();
        }
      }, null, _this2);
    }, 1000);
    this.checkCollected();
    G.on('bjgouFavor', function () {
      _this2.productChecked = G.productChecked;
      _this2.login = G.userLogin;
    });
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 88 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAwCAYAAAACYxrZAAADaElEQVRYR73YW0gUURgH8O+bXXWTLkYUlUQEGUFREEu7ZbfdQs3LTpBY0ENUdKEeIoOiHqzoIYOsiHqorJfqoSDaWbsZuIfsQSfNILB6EHpQ6AIFGUW2ev6hNJszurq7jrOP83B++z9nzjffOUzj/GsSdVtIyhpmSCb3bh5PrymqVTLROQADDjN1jhvYFNXOEnBkcCBm6rIdBODSRd11QO6wYDFmV4Wt4AchPJ/RfRdAyIQR/2R2bfYFS+ttA18LkdMjv0dAtNqM0VcwlawIbtIH1tGOl6a18ems3ljPUxCWWKax082uAm+g7L3xfMzgK6HNj4GeAZhnSfaOlMwCf6C4y/I8/YytjZFlsZh8QkQzzMm4eZInq2TRyqJv1tHTTqg3RIKSESZgkuUFeeKeopR7vWW/houSFtgswuWQfJsIWaZBme9kTM7d4fV6Y4nmLWVQF9o+SFwBkWJJdtEXDFUyM0ZapJTA5mi4CqBTQ9aF+bg/qJ5J5m1ICgSg6CJyCcABy6B9iqLs9QVCN5LBktqH7e3tmd2fO24RUGFZr99MvNUfDGnJYqOC7UJM7Eb3AwI2WPbSd4U4tHy92pgKNiLY1vh4+p/e2GMAXsse+0RuKvSvUd+kiiUE2xoezf1DsWcgWmCZxg7FxQW+taEP6WDDgi3i4eJe2VdPhNnmQfl1tsdTtDS/8Eu62BCwJarl9xLVETDVssdEThapC1epP8aCmUBdREol5D0CTTCvGd2fNidzW15ecc9YsTioC227BNUS4LZgV30BdT8zSzuwAVAXkV1Sytphqsdpf1CtsgsyxuHmqPYRwMz4AyLJCh/0BdTLdmMDCR0H+6cUwHWjd4wnZR6fKe0HHH1pjESObgsDdXTjx9HEpa0t2+PZaGtpM1BHi3ccTfh5oo/k5iJbP08GOtIHmF3uMt+60hepFodRexpHWwzj34/URDHzHn9QvZls0lETDh5IF9oJKXFySKEnOuZfv6k6GTQl8F9VGrYRJlYu+ANlh21thI0EiVp9Jr7tnpK709ZWP14KnTzMGKijx7X49D6vy6M+WT/0QMpvSckotPVA+j+pg0duA3X0UsFAHb02GVSVXLqIXAOw09Jy2n8xZKpKDeFqSXTUgtp/9WVCo+FDIK5x5HLPgF9GIxV9wHnj+vIv3I3VvNDh44cAAAAASUVORK5CYII="

/***/ }),
/* 89 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js__ = __webpack_require__(90);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['products'],
  data: function data() {
    return {
      currentPage: 0
    };
  },
  methods: {
    nextPage: function nextPage() {
      this.currentPage++;
    },
    prevPage: function prevPage() {
      this.currentPage--;
    }
  },
  computed: {
    totalPage: function totalPage() {
      return Math.ceil(this.products.length / 2);
    },
    showingList: function showingList() {
      var list = [this.products[this.currentPage * 2]];
      if (this.products[this.currentPage * 2 + 1]) {
        list.push(this.products[this.currentPage * 2 + 1]);
      }
      return list;
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 91 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js__ = __webpack_require__(92);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var user = __webpack_require__(22);
var globalCondition = __webpack_require__(4);

exports['default'] = {
  name: "MiniFavor.vue",
  data: function data() {
    return {
      productChecked: G.productChecked,
      clock: __webpack_require__(312),
      checked: __webpack_require__(313),
      qr: G.qr,
      login: G.userLogin
    };
  },
  methods: {
    checkCollected: function checkCollected() {
      var dpId, token;
      return regeneratorRuntime.async(function checkCollected$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

          case 2:
            dpId = context$1$0.sent;
            context$1$0.next = 5;
            return regeneratorRuntime.awrap(user.hasUserToken());

          case 5:
            token = context$1$0.sent;

            if (token) {
              context$1$0.next = 11;
              break;
            }

            G.userLogin = false;
            this.login = false;
            G.trigger('bjgouFavor');
            return context$1$0.abrupt('return');

          case 11:
            G.userLogin = true;
            this.login = true;
            user.checked(dpId).then(function (res) {
              if (res.code === -3) {
                G.userLogin = false;
                _this.login = false;
                G.trigger('bjgouFavor');
                return;
              }
              if (res.code === 0) {
                _this.productChecked = false;
                G.productChecked = false;
                G.trigger('bjgouFavor');
                return;
              }
              _this.productChecked = res.data.id;
              G.productChecked = res.data.id;
              G.trigger('bjgouFavor');
              // G.productChecked = res.data
            });

          case 14:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    favorClick: function favorClick() {
      var dpId, res;
      return regeneratorRuntime.async(function favorClick$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

          case 2:
            dpId = context$1$0.sent;

            if (this.productChecked) {
              context$1$0.next = 11;
              break;
            }

            context$1$0.next = 6;
            return regeneratorRuntime.awrap(user.collect(dpId));

          case 6:
            res = context$1$0.sent;

            console.log(res);
            if (res.code === 1) {
              this.productChecked = res.data.id;
              G.productChecked = res.data.id;
            }
            context$1$0.next = 16;
            break;

          case 11:
            context$1$0.next = 13;
            return regeneratorRuntime.awrap(user.del(this.productChecked));

          case 13:
            res = context$1$0.sent;

            console.log(res);
            if (res.code === 1) {
              this.productChecked = false;
              G.productChecked = false;
            }

          case 16:
            G.trigger('bjgouFavor');

          case 17:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    goLogin: function goLogin() {
      //location.href = `https://i.bijiago.com/UserUnion/Authorize?utype=2&app_platform=ext&_referer=${encodeURIComponent(location.href)}`
      user.goLogin();
    }
  },
  mounted: function mounted() {
    var _this2 = this;

    this.checkCollected();
    G.on('bjgouFavor', function () {
      _this2.productChecked = G.productChecked;
      _this2.login = G.userLogin;
    });
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 93 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js__ = __webpack_require__(94);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime, $) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _SizeHelpVue = __webpack_require__(321);

var _SizeHelpVue2 = _interopRequireDefault(_SizeHelpVue);

var showSize = false;
var k = G.exact_arr.all;
var l = ['男装', '女装', '童装', '鞋', '裤', '裙', '衣'];
l.forEach(function (item) {
  if (k.indexOf(item) > -1) {
    showSize = true;
  }
});

exports['default'] = {
  components: { SizeHelp: _SizeHelpVue2['default'] },
  data: function data() {
    return {
      showSizeHelp: showSize,
      rate: 0,
      price: G.dp.price,
      lang: G.lang
    };
  },
  methods: {
    load: function load() {
      return regeneratorRuntime.async(function load$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    }
  },
  mounted: function mounted() {
    var _this = this;

    __webpack_require__(3).get('https://cdn.bijiago.com/js/configs/outTax.json').then(function (res) {
      Object.keys(res).map(function (item) {
        if (k.indexOf(item) > -1) {
          _this.rate = res[item];
        }
      });
      if (!_this.rate) {
        _this.rate = res['default'];
      }
    });
    if (showSize) {
      $('.main-box .botbar').css('margin-top', '86px');
    }
    if (location.host.indexOf('detail.ju.taobao.com') > -1) {
      if ($('.status-banner').hasClass('status-sku')) {
        // setTimeout(() => {
        //   $('#bjgext_mb_bg').css('margin-left: -10px').css('margin-top', '2px')
        // }, 100)
        var _k = document.createElement('STYLE');
        _k.innerHTML = '\n            #bjgext_mb_bg {\n              margin-left: -10px!important;\n              margin-top: 2px!important;\n            }\n          ';
        document.body.appendChild(_k);
      }
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5), __webpack_require__(1)))

/***/ }),
/* 95 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js__ = __webpack_require__(96);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var request = __webpack_require__(3);

exports['default'] = {
  data: function data() {
    return {
      showing: '',
      list: [],
      src: '',
      lang: G.lang
    };
  },
  mounted: function mounted() {
    var _this = this;

    var link = 'https://cdn.bijiago.com/js/configs/sizeHelp.json';
    if (G.lang === 'en') {
      link = 'https://cdn.bijiago.com/js/configs/sizeHelp_en.json';
    }
    request.get(link).then(function (res) {
      _this.list = res;
      _this.showing = res[0].name;
      _this.src = res[0].url;
    });
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

var _this = this;

var getCoupon = __webpack_require__(33);
var template = __webpack_require__(13);
var html = __webpack_require__(330);
var request = __webpack_require__(3);
var userData = __webpack_require__(15);
var cnzz = __webpack_require__(12);
var log = __webpack_require__(14);
var util = __webpack_require__(19);
var QRReloader = __webpack_require__(61);

var adzoneIdObj = {
  'bjg923253': {
    'adzone_id': '10015',
    'adzone_id2': '10016'
  },
  'union_bijiago': {
    'adzone_id': '10015',
    'adzone_id2': '10013'
  },
  'union_bijiago_mogu': {
    'adzone_id': '10015',
    'adzone_id2': '10013'
  },
  'union_bijiago_uos': {
    'adzone_id': '10015',
    'adzone_id2': '10013'
  },
  'union_biyibi': {
    'adzone_id': '10015',
    'adzone_id2': '10013'
  }
};
var randomNum = undefined;

var renderTop = function renderTop(data) {
  if (!data || data.code !== 200 || !data.data) {
    setTimeout(function callee$1$0() {
      return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
        while (1) switch (context$2$0.prev = context$2$0.next) {
          case 0:
            context$2$0.next = 2;
            return regeneratorRuntime.awrap(__webpack_require__(4).met('noOtherGiftMoney'));

          case 2:
            __webpack_require__(41).init(false);

          case 3:
          case 'end':
            return context$2$0.stop();
        }
      }, null, _this);
    }, 1000);
    __webpack_require__(360).init();
    return;
  }
  __webpack_require__(41).init(true);
  data = data.data;
  data.pid = adzoneIdObj[G.union]['adzone_id2'];
  getPageInfo(data, function (newData, url) {
    var html = __webpack_require__(66);
    var isShowPic = false;
    var tle = "点击领券";
    if (isShowPic) {
      tle = "";
    }
    $('.bjg-coupon-space').after(template.compile(html)({
      price: data.coupon.coupon_money,
      url: __webpack_require__(20).appendTbInfoForUrl(G.tb_server + '/extension/qrpage?union=' + G.union + '&dp_id=' + G.dp.dpId + '&tag=9_chrome&discount=' + data.coupon.coupon_money),
      tle: tle,
      isShowPic: isShowPic,
      picUrl: 'xx',
      isBottom: true,
      lang: G.lang
    }));
    var hasCoupon = false;
    $('#top_coupon_btn .coupon_detail img').css('visibility', 'hidden');
    cnzz.log('淘宝优惠券底部二维码', '曝光');
    __webpack_require__(14)('coupon:show');
    $('#top_coupon_btn').hover(function () {
      if (!hasCoupon) {
        QRReloader.init(newData, url, '#top_coupon_btn .coupon_detail > img', function (newData2) {
          hasCoupon = true;
          cnzz.log('淘宝优惠券底部二维码', '悬浮');
          cnzz.log('track:topcoupon:' + G.from_device);
          util.tongjiLog('track:topcoupon:' + G.from_device);
          addEvent('click:topcoupon:' + G.from_device);
        }, false, false);
      }
    });
  });
};
var renderTop2 = function renderTop2(data) {
  return;
  if (data instanceof Array) {
    return;
  }
  var html = __webpack_require__(66);
  $('.bjg-coupon-space').replace(template.compile(html)({
    price: data.discount,
    url: data.click_url2
  }));
  cnzz.log('track:topcoupon_2:' + G.from_device);
  util.tongjiLog('track:topcoupon_2:' + G.from_device);
  addEvent('click:topcoupon_2:' + G.from_device);
};

var callbacks = undefined,
    hasreq = undefined,
    urls = undefined;
var getPageInfo = __webpack_require__(54);

var getQRcode = __webpack_require__(23);

var addEvent = function addEvent(str) {
  var showQRcode = undefined;
  $('#top_coupon_btn_bjg').on('click', function () {
    cnzz.log(str);
    util.tongjiLog(str);
  });
  $('.coupon-close-btn').on('click', function (e) {
    $('#top_coupon_btn_bjg').remove();
    return false;
  });
  $('#top_coupon_btn_bjg').on('mouseenter', function () {
    if (!showQRcode) {
      cnzz.log("track:coupon:qrcode:top");
      util.tongjiLog("track:coupon:qrcode:top");
      showQRcode = true;
    }
  });
};

var renderMini = function renderMini(data) {
  if (!data || data && data.code !== 200 || data && !data.data) {
    if (G.runminiCoupon2) {
      $(document).trigger('runminiCoupon2');
    } else {
      G.runminiCoup = '1';
    }
    return;
  }
  G.runminiCoup = '2';
  data = data.data;
  data.pid = adzoneIdObj[G.union]['adzone_id'];
  getPageInfo(data, function (newData, url) {
    data.coupon.lastPrice = Number(G.dp.price - data.coupon.coupon_money).toFixed(2);
    var isShowPic = randomNum > -1 ? true : false;
    var str = '';
    var classes = '';
    var str2 = '\n          <div class="mini-coup-detail">\n              <img src="xx">\n              <span style="line-height: initial">微信扫码领券</span>\n          </div>\n      ';
    // if (G.ss_name === 'priceDog') {
    //   require('common/copyTkl').init()
    // }
    if (!isShowPic) {
      str = 'href="' + data.click_url2 + '" target="_blank"';
      str2 = '';
      classes = 'haslink';
    }
    var tle = "点击领券";
    if (G.lang === 'en') tle = 'Get';
    if (isShowPic) {
      tle = "";
    }
    var html2 = __webpack_require__(152);
    var dom = template.compile(html2)({
      data: data,
      isShowPic: false,
      lang: G.lang,
      url: __webpack_require__(20).appendTbInfoForUrl(G.tb_server + '/extension/qrpage?&union=' + G.union + '&dp_id=' + G.dp.dpId + '&tag=9_chrome&discount=' + data.coupon.coupon_money)
    });
    //$(`#bjgext_minibar`).after($(dom))
    $('#bjg-coupon-placeholder').replaceWith($(dom));
    if (!G.showMinibar) {
      $('#bjgext_minibar').css('display', 'inline-block');
      G.showMinibar = true;
    }
    $('.bjgext-mini-trend').addClass('hascoupon');
    cnzz.log('track:minicoupon:' + G.from_device);
    util.tongjiLog('track:minicoupon:' + G.from_device);
    $('#coupon_box').on('click', function () {
      cnzz.log('click:minicoupon:' + G.from_device);
      util.tongjiLog('click:minicoupon:' + G.from_device);
    });
    var showQRcode = undefined;
    $('.bjgext-toptabs .mini-coup-detail img').css('visibility', 'hidden');
    cnzz.log('淘宝优惠券中间二维码', '曝光');
    $('.bjgou-mini-coupon-bar').on('mouseenter', function () {
      if (!showQRcode) {
        QRReloader.init(newData, url, '.bjgou-coupon-box > img', function (newData2) {}, false, false);
        cnzz.log('淘宝优惠券中间二维码', '悬浮');
        cnzz.log("track:coupon:qrcode:mini");
        util.tongjiLog("track:coupon:qrcode:mini");
        showQRcode = true;
      }
    });
  });
};
var renderMini2 = function renderMini2(data) {
  if (data instanceof Array) {
    $(document).trigger('runyifenqian');
    return;
  }
  data = {
    'click_url': data.click_url2,
    'coupon': {
      'coupon_money': data.discount,
      'lastPrice': data.couponPricePC
    }
  };
  var views = template.compile(html)({
    data: data
  });
  $('#bjgext_minibar').append(views);
  if (!G.showMinibar) {
    $('#bjgext_minibar').css('display', 'inline-block');
    G.showMinibar = true;
  }
  cnzz.log('track:topcoupon_2:' + G.from_device);
  util.tongjiLog('track:topcoupon_2:' + G.from_device);
  $('#coupon_box').on('click', function () {
    cnzz.log('click:minicoupon_2:' + G.from_device);
    util.tongjiLog('click:minicoupon_2:' + G.from_device);
  });
};
var getCouponInfo = function getCouponInfo(callback) {
  var dp_id = userData.get('dp_data').now.now_dp_id;
  var url = 'https://browser.bijiago.com/app/quanbtc?dpid=' + dp_id;
  request.get(url).done(function (data) {
    callback(data);
  });
};

var render2 = function render2(data) {
  if (data.length instanceof Array || !data.lt_short_link && !data.click_url) {
    $(document).trigger('runyifenqian');
    return;
  }
  if (data.lt_short_link) data.click_url = data.lt_short_link;
  if (!data.couponPricePC) {
    data.couponPricePC = (Number(data.pcPrice) - Number(data.discount)).toFixed(2);
  }
  __webpack_require__(14)('coupon:show');
  renderMini2(data);
  renderTop2(data);
};

module.exports.init = function (dom) {
  var pIdObj = __webpack_require__(46);
  if (G.forbidCoupon) return;
  if ($('#BIJIA_HAS_BUILT').length > 0) return;
  var dp_id = G.dp.dpId;
  var adzoneItem = adzoneIdObj[G.union];
  if (!adzoneItem) {
    adzoneItem = adzoneIdObj['union_bijiago'];
  }
  // let adzone_id = adzoneItem['adzone_id'];
  randomNum = parseInt(Math.random() * 100);
  var instanceId = window.bjgou_G.instanceId;
  __webpack_require__(512)(dp_id).then(function (r) {
    if (instanceId !== window.bjgou_G.instanceId) return;
    renderMini(r);
    renderTop(r);
  });
  // getCoupon.init(dp_id, adzone_id, renderMini)
  // let adzone_id2 = adzoneItem['adzone_id2'];
  // getCoupon.init(dp_id, adzone_id2, renderTop)
  // let pid = pIdObj[G.union]
  // require('common/getCouponNew').init(pid, "mini", renderMini)
  // require('common/getCouponNew').init(pid, "bottom", renderTop)
};
module.exports.init2 = function () {
  getCouponInfo(render2);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {

const ECLevel = __webpack_require__(62)

const EC_BLOCKS_TABLE = [
// L  M  Q  H
  1, 1, 1, 1,
  1, 1, 1, 1,
  1, 1, 2, 2,
  1, 2, 2, 4,
  1, 2, 4, 4,
  2, 4, 4, 4,
  2, 4, 6, 5,
  2, 4, 6, 6,
  2, 5, 8, 8,
  4, 5, 8, 8,
  4, 5, 8, 11,
  4, 8, 10, 11,
  4, 9, 12, 16,
  4, 9, 16, 16,
  6, 10, 12, 18,
  6, 10, 17, 16,
  6, 11, 16, 19,
  6, 13, 18, 21,
  7, 14, 21, 25,
  8, 16, 20, 25,
  8, 17, 23, 25,
  9, 17, 23, 34,
  9, 18, 25, 30,
  10, 20, 27, 32,
  12, 21, 29, 35,
  12, 23, 34, 37,
  12, 25, 34, 40,
  13, 26, 35, 42,
  14, 28, 38, 45,
  15, 29, 40, 48,
  16, 31, 43, 51,
  17, 33, 45, 54,
  18, 35, 48, 57,
  19, 37, 51, 60,
  19, 38, 53, 63,
  20, 40, 56, 66,
  21, 43, 59, 70,
  22, 45, 62, 74,
  24, 47, 65, 77,
  25, 49, 68, 81
]

const EC_CODEWORDS_TABLE = [
// L  M  Q  H
  7, 10, 13, 17,
  10, 16, 22, 28,
  15, 26, 36, 44,
  20, 36, 52, 64,
  26, 48, 72, 88,
  36, 64, 96, 112,
  40, 72, 108, 130,
  48, 88, 132, 156,
  60, 110, 160, 192,
  72, 130, 192, 224,
  80, 150, 224, 264,
  96, 176, 260, 308,
  104, 198, 288, 352,
  120, 216, 320, 384,
  132, 240, 360, 432,
  144, 280, 408, 480,
  168, 308, 448, 532,
  180, 338, 504, 588,
  196, 364, 546, 650,
  224, 416, 600, 700,
  224, 442, 644, 750,
  252, 476, 690, 816,
  270, 504, 750, 900,
  300, 560, 810, 960,
  312, 588, 870, 1050,
  336, 644, 952, 1110,
  360, 700, 1020, 1200,
  390, 728, 1050, 1260,
  420, 784, 1140, 1350,
  450, 812, 1200, 1440,
  480, 868, 1290, 1530,
  510, 924, 1350, 1620,
  540, 980, 1440, 1710,
  570, 1036, 1530, 1800,
  570, 1064, 1590, 1890,
  600, 1120, 1680, 1980,
  630, 1204, 1770, 2100,
  660, 1260, 1860, 2220,
  720, 1316, 1950, 2310,
  750, 1372, 2040, 2430
]

/**
 * Returns the number of error correction block that the QR Code should contain
 * for the specified version and error correction level.
 *
 * @param  {Number} version              QR Code version
 * @param  {Number} errorCorrectionLevel Error correction level
 * @return {Number}                      Number of error correction blocks
 */
exports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {
  switch (errorCorrectionLevel) {
    case ECLevel.L:
      return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]
    case ECLevel.M:
      return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]
    case ECLevel.Q:
      return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]
    case ECLevel.H:
      return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]
    default:
      return undefined
  }
}

/**
 * Returns the number of error correction codewords to use for the specified
 * version and error correction level.
 *
 * @param  {Number} version              QR Code version
 * @param  {Number} errorCorrectionLevel Error correction level
 * @return {Number}                      Number of error correction codewords
 */
exports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {
  switch (errorCorrectionLevel) {
    case ECLevel.L:
      return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]
    case ECLevel.M:
      return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]
    case ECLevel.Q:
      return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]
    case ECLevel.H:
      return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]
    default:
      return undefined
  }
}


/***/ }),
/* 99 */
/***/ (function(module, exports) {

/**
 * Check if QR Code version is valid
 *
 * @param  {Number}  version QR Code version
 * @return {Boolean}         true if valid version, false otherwise
 */
exports.isValid = function isValid (version) {
  return !isNaN(version) && version >= 1 && version <= 40
}


/***/ }),
/* 100 */
/***/ (function(module, exports) {

const numeric = '[0-9]+'
const alphanumeric = '[A-Z $%*+\\-./:]+'
let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +
  '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +
  '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +
  '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'
kanji = kanji.replace(/u/g, '\\u')

const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+'

exports.KANJI = new RegExp(kanji, 'g')
exports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g')
exports.BYTE = new RegExp(byte, 'g')
exports.NUMERIC = new RegExp(numeric, 'g')
exports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')

const TEST_KANJI = new RegExp('^' + kanji + '$')
const TEST_NUMERIC = new RegExp('^' + numeric + '$')
const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$')

exports.testKanji = function testKanji (str) {
  return TEST_KANJI.test(str)
}

exports.testNumeric = function testNumeric (str) {
  return TEST_NUMERIC.test(str)
}

exports.testAlphanumeric = function testAlphanumeric (str) {
  return TEST_ALPHANUMERIC.test(str)
}


/***/ }),
/* 101 */
/***/ (function(module, exports) {

function hex2rgba (hex) {
  if (typeof hex === 'number') {
    hex = hex.toString()
  }

  if (typeof hex !== 'string') {
    throw new Error('Color should be defined as hex string')
  }

  let hexCode = hex.slice().replace('#', '').split('')
  if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {
    throw new Error('Invalid hex color: ' + hex)
  }

  // Convert from short to long form (fff -> ffffff)
  if (hexCode.length === 3 || hexCode.length === 4) {
    hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {
      return [c, c]
    }))
  }

  // Add default alpha value
  if (hexCode.length === 6) hexCode.push('F', 'F')

  const hexValue = parseInt(hexCode.join(''), 16)

  return {
    r: (hexValue >> 24) & 255,
    g: (hexValue >> 16) & 255,
    b: (hexValue >> 8) & 255,
    a: hexValue & 255,
    hex: '#' + hexCode.slice(0, 6).join('')
  }
}

exports.getOptions = function getOptions (options) {
  if (!options) options = {}
  if (!options.color) options.color = {}

  const margin = typeof options.margin === 'undefined' ||
    options.margin === null ||
    options.margin < 0
    ? 4
    : options.margin

  const width = options.width && options.width >= 21 ? options.width : undefined
  const scale = options.scale || 4

  return {
    width: width,
    scale: width ? 4 : scale,
    margin: margin,
    color: {
      dark: hex2rgba(options.color.dark || '#000000ff'),
      light: hex2rgba(options.color.light || '#ffffffff')
    },
    type: options.type,
    rendererOpts: options.rendererOpts || {}
  }
}

exports.getScale = function getScale (qrSize, opts) {
  return opts.width && opts.width >= qrSize + opts.margin * 2
    ? opts.width / (qrSize + opts.margin * 2)
    : opts.scale
}

exports.getImageWidth = function getImageWidth (qrSize, opts) {
  const scale = exports.getScale(qrSize, opts)
  return Math.floor((qrSize + opts.margin * 2) * scale)
}

exports.qrToImageData = function qrToImageData (imgData, qr, opts) {
  const size = qr.modules.size
  const data = qr.modules.data
  const scale = exports.getScale(size, opts)
  const symbolSize = Math.floor((size + opts.margin * 2) * scale)
  const scaledMargin = opts.margin * scale
  const palette = [opts.color.light, opts.color.dark]

  for (let i = 0; i < symbolSize; i++) {
    for (let j = 0; j < symbolSize; j++) {
      let posDst = (i * symbolSize + j) * 4
      let pxColor = opts.color.light

      if (i >= scaledMargin && j >= scaledMargin &&
        i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {
        const iSrc = Math.floor((i - scaledMargin) / scale)
        const jSrc = Math.floor((j - scaledMargin) / scale)
        pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]
      }

      imgData[posDst++] = pxColor.r
      imgData[posDst++] = pxColor.g
      imgData[posDst++] = pxColor.b
      imgData[posDst] = pxColor.a
    }
  }
}


/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

var request = __webpack_require__(3);
var template = __webpack_require__(13);

module.exports = {
  init: function init() {
    var hasCoupon = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];
    var site, res, config, c, html;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          site = G.site;

          if (site === '360buy') {
            site = 'jd';
          }

          if (!hasCoupon) {
            context$1$0.next = 4;
            break;
          }

          return context$1$0.abrupt('return');

        case 4:
          context$1$0.next = 6;
          return regeneratorRuntime.awrap(request.get(G.server + '/extension?ac=promoActivity&site=' + site));

        case 6:
          res = context$1$0.sent;
          context$1$0.next = 9;
          return regeneratorRuntime.awrap(request.rawGet('https://cdn.bijiago.com/js/configs/activity-bijiago-online.json'));

        case 9:
          config = context$1$0.sent;
          c = config.aliActivity;

          console.log(res);
          if (res.type === 'link') {
            if (window.innerWidth - $('#bjgext_mainbar').outerWidth() > 160) {
              html = '<a href="' + res.link + '" target="_blank" class="rinfo-btn" style="width: initial; margin-left: 8px; margin-right: 8px"><img style="height: 48px" src="' + res.img + '"/></a>';

              $('#bjgext_mainbar .common-banner').after(html);
            }
          } else if (res.type === 'qrcode') {
            (function () {
              var loadQr = function loadQr() {
                if (qrLoaded) return;
                request.get(res.qrcode).then(function (data) {
                  if (data.code === 1 && data.data && data.data.qrImgStr) {
                    $('.gwd-act-qr-img').attr('src', data.data.qrImgStr);
                    qrLoaded = true;
                  }
                });
              };

              if (window.innerWidth - $('#bjgext_mainbar').outerWidth() > 160) {
                // 底部
                var html = template.compile(__webpack_require__(353))({
                  img: res.img,
                  qr: '',
                  extClass: ''
                });
                $('#bjgext_mainbar .common-banner').after(html);
              }

              var html2 = template.compile(__webpack_require__(354))({
                qr: '',
                text: config.aliActivity.middle.text
              });
              $('#bjgext_minibar').append(html2);

              // let html = template.compile(require('art-template-loader!activities/gwd-ali-center.html'))({
              //   img: res.img,
              //   qr: '',
              //   text: c.center.text,
              //   extClass: '',
              //   qrText: c.qrText
              // })
              // $('.bjgext-mini-trend').after(html)
              // $('.gwd-middle-tmall').css('border', '1px solid #f1f1f1')

              var qrLoaded = false;

              $('.gwd-middle-tmall').hover(loadQr);
              $('.gwd-middle-act-bar').hover(loadQr);
              $('.gwd-bottom-tmall').hover(loadQr);
            })();
          }

        case 13:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

// 购物党底部
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 103 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAsCAMAAAA+eDr6AAACTFBMVEUAAAD//////////////7//zMz/1NT/27b/37/mzLPo0bnq1L/r2LHuzLvj1LjmzLPnzrbo0bnp07HqyrXrzLjj0LPkyLblyrDlzLLmzrXnz6/oybLoyrTpzK/jzbHly7Hmza7iy7TjzLDkybPkyq/ly7HlzLLmybHkya7lyrDiyrHjy6/kybLkyq/lyrDly7Hjyq7jyrHjy6/kya7lyK7jyq7lyrDiy7Hiya/jyrHjyq/kyK/kya7kyq/iyK7jybDjyq7kybDkya7kyq/iyrDiyLDjya/jyq/kyK/kybDkya7iyq/iyLDjybDjyq7kybDiyq/jyK7jya/jyrDkyK/kyK/iybDiya7iyq/jyLDjybDiya/iya7iyq/jyK7jyq7kyrDiya7jyK/jyLDjya7jya/kyK7kyq7iyK/iya7jya/jyK/jya7jya/kyK7kyK/iya/iya7jya7jyK/jyK/jya7jya/iyK7iya/jya/jy7DjyK/jya/jyK/jya7iya/iyK7jya7jya7jyK/iyK7jya/jya/jya7jyK/jyK/jya7iya/iyK/iyK7jya7iya7jyK7jya/jya/jyK7jya7jyK/iya7iyK/kya7jya/jya/jyK7iyK/iya7iyK/jya7jya/iyK/iya/iya7iya/jyK7jya/iya7jya/iyK/iya7jyK7iyK7iya7iya/iyq/jya7jya/iyK7iya7jya7iya7iya/jyK7iyK7jyK7jyK/jya/iyK7jyK7jyK/iyK7jyK7jya7jya/iyK7nSBUDAAAAw3RSTlMAAQIDBAUGBwgKCwwNDxIUFRYXGBkbHB0eHyAhIiMkJyksLS8wMTI0OTo+QEJDREVISElMT1JXWFlbXF1fYGJkZWdoaWprbW9wcXJzdHd4enx+f4GCg4SFhoeKjY6PkZSVmJmam5yenp+hoqOkpqeoqaqrrK2ur7Gys7S1tba3uLq9vr/ExcbHyMnKy8zN0NTX2Nna2tvd39/h4uTl5ujq6+7v8PHz9PX19vb29/j4+Pj4+fn5+vr6+/v7+/z8/P39/f7BSztiAAACYUlEQVQYGX3BBVtTYQCG4XfKJmCiohg4CwMDuxvFQuzuYwcqdncHJjYWOlERAxOZsj1/zMP8Bud4bdy33JqP33U3UHpvX3YrxdV0zPFKjNCp8c0UQ9Kw/eW4fD00srFcGg3ZEaBG+GxuVqsWfaaeDlHjXcHQREVlbC4h4mpuWxmtp14g4uWW3qqRsCFMjetzOsmlfV4hEXsbS9qOrWhRF8XQef4tbGe86g/k91RcPQqAsToIa1WvhXBeDyBd9WoGzxQGj+oHCJDRJHeST4Yve2ayDECAjEWfyg4nKMJ7oqx8ngxAgIyBQd7vaShbw/3vCWbJAAQoalwV5ds8UoP8j1SNURQgQLUmV/F5vTybPvBromoBAlRn5k++rFpTQeU01QEEyEjOsawrfwhVU33JsqYkyQAEyFjwHYdvc2UAAmQMfoND6SAZgABFJfptO2GA35aoKECAXCzwywUQIKPb1de2H/D2te1KVxmAABnLgjj8XiIDECCjfcEdWwncv2PblSYDECAXC/xyAVQBXjlZ4JeTFyp0DzrIyQK/nNLgoU7CBDlZ4JfTCDijKXDNI4flQVLldARmKaUURskh49VROfWEUCdpMZR0lINHTr5CyJfU5DYUtVQcDQogkC5b9zK40U6xrQOyFdEvAMV9FUPCamCFjF4vILwyUf9LPQusVa2Mp8D1HnLr/xTY6lGd1seA0MY2qtNiYxiCeR65TAwA75am6B9fznPgcab+l34IW5nll+Sb9BDb7hTFkHkRW/jk8NmPsN3MUhxDLxP1ZLpX8WUeCGErnpGk+qXNKzo32ie3v5uPelAT1dkkAAAAAElFTkSuQmCC"

/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

var _this = this;

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }

var bgClient = __webpack_require__(16);

var getList = function getList() {
  var res;
  return regeneratorRuntime.async(function getList$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(bgClient.get('/getStorage', { key: 'aliSkuHistory' }));

      case 2:
        res = context$1$0.sent;

        if (res) {
          context$1$0.next = 5;
          break;
        }

        return context$1$0.abrupt('return', []);

      case 5:
        return context$1$0.abrupt('return', res);

      case 6:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var setList = function setList(list) {
  return regeneratorRuntime.async(function setList$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(bgClient.get('/setStorage', { 'aliSkuHistory': list }));

      case 2:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var add = function add(item) {
  var list;
  return regeneratorRuntime.async(function add$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(getList());

      case 2:
        list = context$1$0.sent;

        list.push(item);
        list = [].concat(_toConsumableArray(new Set(list)));
        context$1$0.next = 7;
        return regeneratorRuntime.awrap(setList(list));

      case 7:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var remove = function remove(item) {
  var list;
  return regeneratorRuntime.async(function remove$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(getList());

      case 2:
        list = context$1$0.sent;

        list = list.filter(function (i) {
          return i !== item;
        });
        context$1$0.next = 6;
        return regeneratorRuntime.awrap(setList(list));

      case 6:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  getList: getList,
  setList: setList,
  add: add,
  remove: remove
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 105 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, "__esModule", {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _MemberCouponMixin = __webpack_require__(42);

var _MemberCouponMixin2 = _interopRequireDefault(_MemberCouponMixin);

var _MemberCouponQr = __webpack_require__(63);

var _MemberCouponQr2 = _interopRequireDefault(_MemberCouponQr);

exports["default"] = {
  mixins: [_MemberCouponMixin2["default"]],
  components: { MemberCouponQr: _MemberCouponQr2["default"] },
  data: function data() {
    return {
      G: G
    };
  }
};
module.exports = exports["default"];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 107 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAB6lJREFUWMPNWQlsVFUUfdMOFndFEwWXBFQiJKiIW4waF0zUKHs7nRaKCFYUQYJgW1BU1CDuGygC4sKiAaOCgnULKrIoLigiM/P/LJ217Uzb6XTaWXu87/3O8ju/pVWR3uTmZ/7y3nn33XvufXcY6yT7ylk/2ai/xmbUL5aLdU2SgbVLxSx5JFSmseVi1mQzssV8Tj43607MRv3N9hK2y2pkcJXqQB9DOsLK53CXMvA5bSW6XXKJfrQmOJOhX7m9RBd1lrL/BZiW8rk5BpMhr1wFTi7W30ToY2TqowIsW22KJWMmwiTAoZAdIxXrfuTojza4bEtainV7DxA2RjeuthtFIKAvqU3BdDWzGNjjrtK+BY6rezLFgoEtZmTK+i6DoohMPVFRohvVM8skBvME5dr52X8V3WS8AFlQF9ICyCeWZ5wO19O3wbnkBkiTCyAVdjwjYN6Vd6P+o6VwVI6CxahXgGoskH/Dn6VU3OvhgizFLMYBNssa4OwPjUTEYwKXdtLQ719Bnn66sKZtzgWItzQqzxIxtEo/wbVsrADO1TxerF4s0DZvOByLroDj4SthX3ARrDMH0cR54h0BtjuQBhbRBliYh9Cv29FZ6jcvgWkMQ3DvhznPHI9dD6lsAFzPjEXDtpcRNu1CrNGLZDwqFsiX2Z6IIx4KIGzeg9r1VZDvPlNxn14B5Oaf0h8Rn5QDoum7dXA+O7ZjwoxE/TUIbH8VsYATvZForRXOp27pGmSXFpykQ3DX+zkD1n34FNqcB7qcMNbgQZv1Z4T2f47Gr1fBv/kJ1K6dDe/yqfCtnkX31iBBFsyWRLhJbL2mD3cFkDu29b5zye++FFuUaAvBv+0VBKpX5IDiz5LRVtq+BHwbqmAp0sNcqES48MXxil/yq3kc+e+CS4TFs6Vxx9swT+wNwCLFyc2k9nnDCOwQ2BddiWQkrBqY+6l3XaUAmRLvynIBTriKhprHMvjevEc1TsRrIbc6Nje6NQHyyJpyHJp/+RSBbS/BUlIgBuVRnC0NX74BaeZZiDj/TN/jzi/PGUrf9Cda0lIOIh/WWecg0dqc/o4HjvWeM3OjOgcgX4GxgEy+NjPpoZ3CgjUPX4eI+5ASLLs/gGliHoI/bMwJlojjd3rvoNCo51AnNcGzvIxoJh9Rn5z+LhkNw/bA+Wme7RagPO1UNO/bopq4zXWQOG0Q8eBANH6/HvLsIfBmbVOsyYdYsz/HP7lvcrdIK/32vXW/8NFIVrAliUvtC0b0AGDK/4p08Lw+nUxfn/G3/V/Q/XyyHIOjYqQYlEur9RfI9w6Gc+ltKnDxYB1s80cQMZ9NO5BRaeoJsJQegwgtOiXt7UnYKy/NjeQug8SgRJy98nJE6+zpgdzPT1AywJ0DULeugiy9lcj2DBy6laFm4RU5lGMpOw6mcUo0p1SAoPsRn0UF0FE1qhcAU3xIA9ZQhuBbI3xv53qYeBSuuRfBnRsQ3L1Z8GVw9yaE/9yhAtgei6Dlj2/Q8lt1ln5BRD8OElkwVu/IvJskgBWX9h4gVzN91PKHEsHhg98Ki/g/WYooUQN3+ojXTFczZRGXGmAygVitTO+ZFXX/Ja5uChIe0bGAJ+ODxLW2+cN76IOdAZIVg3s2iYG4pQQB00Am7gZFCldaCvNRs+Qm9RZTHpbLiToMeeS7FHxELVJpgfBvecZpiFNgpQFSANnmDOk9QKVyOU84vCDhVTNFIdFIHBgi/+Pq3/KMAO189LocgNK0k8lHByJIkR8P1iLwGfHqpDzivDMQz4r6eEsDBdPAHvBgp5JLmjYALX99pwzSXCcsYpt1Lm1JLJMFiBsttHLnY9d2AkhBQltpIV5tc+xP3/e8bFAs2FGuiXf9Tsh3ndLDTNJRkFrvG4xwBzgu/o+XwXwHUUzVZRR1mXom0RqElXjRUXmZmmaa6+FdPROBT18SqSwlzT9vIQsOQjIrk3BylylwDg/QoPhczeM3qmgg0doE65zBArh93oXCqTvn0tCv25BTh2lIq/QjbHOHIhlrS99r2V8tdqH7YoGjn3w86qgiSdFKug7cuVGpNnhA0JbxYrRH9R4BD2x9Ea7nJ4qyiotvzWw4n7xZnderlysFRrcAaQX2+ReLrVHzRbsYMFVUiuPAgyMI5B5BsOnXRNJvQCsVDP6tz8H5xGjK6/1gup0inoi8bn0FPHSOMRcVUFaqVk3herFQ7M5hyy0+uW3uMJr8h8yWUCrjFU22f4gAIspwLLwcbirxXcvuoDPHVSKt0SkxfSZxU/XteWES3MvGUHCUoPa9CoRpi1V5vuYAZZyTxPs9qgfF5FNOEhUxl9p35irpTSMdipNax0EpfWJLucudJ6oiVdMfafF2KmA1q+ksgCHNgpXUs2IabDzBF/2Ds60xH97XyihnL0DdxirUb1xE14WoffdBqoTKFRcoO147OFTHTjq4W7sh6n9zKE8dQVXFQkoPM7asAPQzi5FaH5P7ZuvDXMweEc0jW19uHvEWF1lxb99rvzGl/Sa6q32sgUlt6Khk1N+o6rJSWZRuAUtHtQXMqAXMyjX71HKRfjSBpCa6TjS2/+8mOm/gyyVsdLed/vTfECXsUdnIgvKR/xsiqPwNwa7ZNyr3b4i/AfH090faFiMcAAAAAElFTkSuQmCC"

/***/ }),
/* 108 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js__ = __webpack_require__(109);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['qr']
};
module.exports = exports['default'];

/***/ }),
/* 110 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js__ = __webpack_require__(111);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _MemberCouponMixin = __webpack_require__(42);

var _MemberCouponMixin2 = _interopRequireDefault(_MemberCouponMixin);

var _MemberCouponQr = __webpack_require__(63);

var _MemberCouponQr2 = _interopRequireDefault(_MemberCouponQr);

var _standardModuleComponentsCommonCouponBarMini = __webpack_require__(377);

var _standardModuleComponentsCommonCouponBarMini2 = _interopRequireDefault(_standardModuleComponentsCommonCouponBarMini);

exports['default'] = {
  mixins: [_MemberCouponMixin2['default']],
  components: { CommonCouponBarMini: _standardModuleComponentsCommonCouponBarMini2['default'] },
  data: function data() {
    return {
      icon: __webpack_require__(461),
      G: G
    };
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 112 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _CouponArrow = __webpack_require__(380);

var _CouponArrow2 = _interopRequireDefault(_CouponArrow);

var _commonComponentsQrError = __webpack_require__(383);

var _commonComponentsQrError2 = _interopRequireDefault(_commonComponentsQrError);

var _WidgetsStamp = __webpack_require__(118);

var _WidgetsStamp2 = _interopRequireDefault(_WidgetsStamp);

var getQRCode = __webpack_require__(23);

exports['default'] = {
  props: ['type', // link, qr,
  'href', 'text', 'icon', 'mainColor', 'secondColor', 'takeBg', 'couponValue', 'qrParams', 'qrTitle', 'qrUrl', 'rebate', 'stamp'],
  components: { CouponArrow: _CouponArrow2['default'], QRError: _commonComponentsQrError2['default'], Stamp: _WidgetsStamp2['default'] },
  data: function data() {
    return {
      loading: false,
      error: false,
      actualQr: '',
      showStampBg: true
    };
  },
  computed: {
    alterHref: function alterHref() {
      return __webpack_require__(20).appendTbInfoForUrl(this.href);
    }
  },
  mounted: function mounted() {
    if (G.aliSite) {
      this.addScrollLink();
    }
    if (this.stamp) {
      this.showStampBg = true;
    }
  },
  methods: {
    addScrollLink: function addScrollLink() {
      return regeneratorRuntime.async(function addScrollLink$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            // await require('common/globalCondition').met('butie')
            setTimeout(function () {
              __webpack_require__(394).add(_this.text, _this.icon, __webpack_require__(20).appendTbInfoForUrl(_this.href), _this.mainColor, _this.secondColor, _this.showStampBg, _this.rebate);
            }, 300);

          case 1:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    over: function over() {
      var _this2 = this;

      this.$emit('over');
      if (this.type !== 'qr' || this.loading) return;
      if (this.qrUrl) {
        this.actualQr = this.qrUrl;
        return;
      }
      this.loading = true;
      getQRCode(this.qrParams, '', function (res) {
        _this2.loading = false;
        if (res[0].etag) {
          _this2.error = true;
        } else {
          _this2.error = false;
          _this2.actualQr = res[0].imgSrc;
        }
      });
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 114 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js__ = __webpack_require__(115);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['color']
};
module.exports = exports['default'];

/***/ }),
/* 116 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__ = __webpack_require__(117);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  methods: {
    click: function click() {
      this.$emit('refresh');
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 118 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stamp_vue_vue_type_template_id_a70db998_scoped_true__ = __webpack_require__(389);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Stamp_vue_vue_type_script_lang_js__ = __webpack_require__(119);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Stamp_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Stamp_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Stamp_vue_vue_type_style_index_0_id_a70db998_scoped_true_lang_less__ = __webpack_require__(391);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Stamp_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Stamp_vue_vue_type_template_id_a70db998_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Stamp_vue_vue_type_template_id_a70db998_scoped_true__["staticRenderFns"],
  false,
  null,
  "a70db998",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('a70db998')) {
      api.createRecord('a70db998', component.options)
    } else {
      api.reload('a70db998', component.options)
    }
    module.hot.accept("./Stamp.vue?vue&type=template&id=a70db998&scoped=true", function () {
      api.rerender('a70db998', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/Widgets/Stamp.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 119 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js__ = __webpack_require__(120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['value']
};
module.exports = exports['default'];

/***/ }),
/* 121 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js__ = __webpack_require__(122);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _WidgetsStamp = __webpack_require__(118);

var _WidgetsStamp2 = _interopRequireDefault(_WidgetsStamp);

exports['default'] = {
  props: ['link', 'icon', 'mainColor', 'secondColor', 'text', 'showStampBg', 'rebate'],
  components: {
    Stamp: _WidgetsStamp2['default']
  }
};
module.exports = exports['default'];

/***/ }),
/* 123 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__ = __webpack_require__(402);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MiniBarCollectionButton_vue_vue_type_script_lang_js__ = __webpack_require__(124);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MiniBarCollectionButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MiniBarCollectionButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MiniBarCollectionButton_vue_vue_type_style_index_0_id_1e4a0206_scoped_true_lang_less__ = __webpack_require__(404);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MiniBarCollectionButton_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__["staticRenderFns"],
  false,
  null,
  "1e4a0206",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('1e4a0206')) {
      api.createRecord('1e4a0206', component.options)
    } else {
      api.reload('1e4a0206', component.options)
    }
    module.hot.accept("./MiniBarCollectionButton.vue?vue&type=template&id=1e4a0206&scoped=true", function () {
      api.rerender('1e4a0206', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/MiniBarCollectionButton.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 124 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js__ = __webpack_require__(125);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

var _vuex = __webpack_require__(24);

exports['default'] = {
  computed: (0, _vuex.mapState)({
    checked: function checked(state) {
      return state.priceRemind.collected;
    },
    id: function id(state) {
      return state.priceRemind.instanceId;
    }
  })
};
module.exports = exports['default'];

/***/ }),
/* 126 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Imljb24vc3RhcmZpbGxlZCI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik0xMS40OTk1IDVMOS4yMDcxIDkuNTk3MDFMNCAxMC4zMzg4TDcuNzcyMDkgMTMuOTYxOUw2Ljg3MDQgMTlMMTEuNDk5NSAxNi41NzU1TDE2LjEyOTUgMTlMMTUuMjM0NSAxMy45NjE5TDE5IDEwLjMzODhMMTMuODIxNyA5LjU5NzAxTDExLjQ5OTUgNVoiIGZpbGw9IiNGRjYxMzIiIHN0cm9rZT0iI0ZGNjEzMiIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L3N2Zz4K"

/***/ }),
/* 127 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js__ = __webpack_require__(128);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var request = __webpack_require__(3);
var userCenter = __webpack_require__(31);

var wechat = userCenter.getQueryString('/UserUnion/Authorize', {
  utype: 2,
  _referer: location.href
});
var qq = userCenter.getQueryString('/UserUnion/Authorize', {
  utype: 1,
  _referer: location.href
});
var weibo = userCenter.getQueryString('/UserUnion/Authorize', {
  utype: 3,
  _referer: location.href
});

exports['default'] = {
  props: ['showAlterLogin', 'alterLoginPosition', 'position'],
  data: function data() {
    return {
      currentLoginMethod: 'phone',
      loginError: false,
      showPassword: false,
      extName: G.extName,
      url: location.href,
      account: '',
      password: '',
      phone: '',
      verifyCode: '',
      countDown: 0,
      remember_me: false,
      smsLoginUrl: '',
      wechat: wechat,
      qq: qq,
      weibo: weibo
    };
  },
  methods: {
    goLogin: function goLogin() {
      if (this.position === 'gwd-popup') {
        window.open('https://www.gwdang.com/user/login');
      } else {
        var u = encodeURIComponent(location.href);
        location.href = 'https://www.gwdang.com/user/login?ext=1&from_url=' + u;
      }
    },
    goLink: function goLink(place) {
      var param = {};
      if (place === 'wechat') {
        param.utype = '2';
      }
      if (place === 'qq') {
        param.utype = '1';
      }
      if (place === 'weibo') {
        param.utype = '3';
      }
      if (this.position === 'gwd-popup') {
        window.open(userCenter.getQueryString('/UserUnion/Authorize', param));
      } else {
        param._referer = location.href;
        location.href = userCenter.getQueryString('/UserUnion/Authorize', param);
      }
    },
    goReg: function goReg() {
      if (this.position === 'gwd-popup') {
        window.open('https://www.gwdang.com/user/register');
      }
      location.href = 'https://www.gwdang.com/user/register';
    },
    sendSms: function sendSms() {
      var _this = this;

      if (this.countDown > 0) {
        return;
      }
      __webpack_require__(31).sendSms(this.phone).then(function (res) {
        _this.countDown = 60;
        _this.smsLoginUrl = res.data.capi;
        var t = setInterval(function () {
          if (_this.countDown === 0) {
            clearInterval(t);
            return;
          }
          _this.countDown--;
        }, 1000);
      });
    },
    login: function login() {
      if (this.currentLoginMethod === 'phone') {
        if (!this.smsLoginUrl) {
          alert('先发送验证码');
          return;
        }
        request.post('' + this.smsLoginUrl, {
          code: this.verifyCode
        }, true).then(function (res) {
          if (res.code === 1) {
            document.body.dispatchEvent(new CustomEvent('gwd-login-complete', { detail: res.data }));
          }
        });
      } else {
        __webpack_require__(31).login(this.account, this.password, this.remember_me).then(function (res) {
          if (res.code === 1) {
            document.body.dispatchEvent(new CustomEvent('gwd-login-complete', { detail: res.data }));
          }
        });
      }
    }
  }

};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

var template = __webpack_require__(13);
var util = __webpack_require__(11);

var lowestIndex = undefined,
    showFold = undefined;

module.exports.init = function (data, nop_data, store, img) {
  render(data, nop_data, store, img);
};

var editData = function editData(originData, nop_data, store) {
  if (!originData) return undefined;
  var data = JSON.parse(JSON.stringify(originData));
  var lowestp = store[0].lowest;
  var storesize = store[0].all_line.length;
  if (storesize > 180) {
    var all_line2 = store[0].all_line.slice(storesize - 180);
    lowestp = Math.min.apply(null, all_line2);
  }
  nop_data = nop_data || [];
  var datal = data.length;
  if (!datal) return undefined;
  var lowest = data[datal - 1].price,
      lowIndex = datal - 1;
  for (var i = datal - 1; i >= 0; i--) {
    for (var j = 0; j < nop_data.length; j++) {
      if (data[i].time === nop_data[j].time) {
        if (data[i].price === nop_data[j].price) {
          data[i] = JSON.parse(JSON.stringify(nop_data[j]));
          data[i].isDSJ = true;
        } else {
          data.splice(i + 1, 0, JSON.parse(JSON.stringify(nop_data[j])));
          data[i + 1].isDSJ = true;
        }
      }
    }
  }
  for (var i = 0; i < data.length; i++) {
    if (data[i].price <= lowest) {
      lowest = data[i].price;
      lowIndex = i;
    }
    if (data[i].msg.coupon) {
      var str = data[i].msg.coupon;
      if (str.match(/\d+-\d+/)) {
        var arr = str.split('-');
        data[i].coupon = '券: ' + '满' + arr[0] + '减' + arr[1];
      } else {
        data[i].coupon = '券: ' + data[i].msg.coupon;
      }
    }
    if (data[i].msg.promotion) {
      data[i].promotion = '促: ' + data[i].msg.promotion;
    }
    var time = data[i].time * 1000;
    var month = new Date(time).getMonth() + 1;
    var day = new Date(time).getDate();
    if (month < 10) {
      month = '0' + month.toString();
    }
    if (day < 10) day = '0' + day.toString();
    data[i].time2 = month + '-' + day;
    // data[i].price = (data[i].price / 100).toFixed(2)
    // data[i].ori_price = (data[i].ori_price / 100).toFixed(2)
  }

  if (lowest / 100 < lowestp) {
    data[lowIndex].isLowest = true;
  }
  data.sort(function (v1, v2) {
    return v2.time - v1.time;
  });

  var lowIndex2 = undefined;
  for (var i = 0; i < data.length; i++) {
    if (data[i].isLowest) {
      lowIndex2 = i;
      data[i].mark = "lowest_now";
    }
    if (!lowIndex2 && lowIndex2 !== 0) {
      data[i].mark = "lowest_before";
    } else if (i > lowIndex2) {
      data[i].mark = "lowest_after";
    }
  }
  lowestIndex = lowIndex2;
  var timestr = util.getTimeNumber(new Date().getTime(), '2');
  if (timestr === data[0].time2) {
    data[0].isnowDay = true;
  }
  return data;
};

module.exports.editData = editData;

var addEvent = function addEvent() {
  $('.show_fold .fold-bar').on('click', function () {
    $('.history-content').removeClass('show_fold');
    showFold = false;
    calLineHeight();
  });
};

var render = function render(originData, nop_data, store, img) {
  var data = editData(originData, nop_data, store);
  if (data.length > 3 && lowestIndex > 1) {
    showFold = true;
  }
  var html = __webpack_require__(432);
  $('#mini_price_history_detail').append(template.compile(html)({
    data: data,
    showFold: showFold,
    img: img
  }));
  addEvent();
};

var calLineHeight = function calLineHeight() {
  setTimeout(function () {
    var mH = 0;
    var doms = $('.history-content>ul li');
    for (var i = 0; i < doms.length - 1; i++) {
      var h = doms.eq(i).height();
      if (h > 0 && doms.eq(i).is(':visible')) {
        mH = mH + h + 22;
      }
    }
    if (showFold) {
      mH += 32;
    }
    $('.history-line').css('height', mH + 'px');
    var firstH = $('.history-content>ul li').eq(0).outerHeight() + 26;
    $('.show_fold .fold-bar').css('top', firstH + 'px');
  }, 10);
};

module.exports.calLineHeight = calLineHeight;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {

var _this = this;

var template = __webpack_require__(13);
var calWidth = __webpack_require__(53);
// const replaceHref = require('common/replaceHref')
var cnzz = __webpack_require__(12);
var log = __webpack_require__(14);

var pInfo = {},
    proInfo = {};
var widthInfo = undefined,
    allink_tb = undefined,
    allink_tm = undefined;

var skipEventAdd = false;

var addEvent = function addEvent() {
  $('.compare-list').off();
  $('.main-compare .tright, .main-compare .tleft').off();
  $('.compare-box').off();
  $('.main-compare .tright').on('click', function () {
    if (pInfo.nowpage + 1 === pInfo.pages) {
      return;
    }
    pInfo.nowpage++;
    $('.compare-list>li').hide();
    for (var i = pInfo.pageNum * pInfo.nowpage; i < pInfo.pageNum * (pInfo.nowpage + 1); i++) {
      $('.compare-list>li').eq(i).show();
    }
  });
  $('.main-compare .tleft').on('click', function () {
    if (pInfo.nowpage === 0) {
      return;
    }
    pInfo.nowpage--;
    $('.compare-list>li').hide();
    for (var i = pInfo.pageNum * pInfo.nowpage; i < pInfo.pageNum * (pInfo.nowpage + 1); i++) {
      $('.compare-list>li').eq(i).show();
    }
  });
  $('.compare-list').on('mouseenter', 'li', function (e) {
    $('.compare-list>li').removeClass('bar-item-hover');
    var id = $(this).attr('data-id');
    if ($(this).find('.btcom-detail').length > 0) {
      $(this).find('.btcom-detail').show();
    } else {
      if (id) {
        renderDetail(id, $(this));
      }
    }
    $(this).addClass('bar-item-hover');
  });
  if (G.site === 'suning') {
    $('.compare-list').on('click', 'a', function (e) {
      if ($(this).attr('href')) {
        window.open($(this).attr('href'));
        e.preventDefault();
      }
    });
  }
  $('.compare-list').on('mouseleave', 'li', function (e) {
    var that = this;
    $(that).removeClass('bar-item-hover');
    $(that).find('.btcom-detail').hide();
  });
  $('.compare-box').on('click', function (e) {
    if (skipEventAdd) {
      return;
    }
    if ($(e.target).hasClass('turnleft')) {
      runTurnPage($(e.target), -1);
    } else if ($(e.target).hasClass('turnright')) {
      runTurnPage($(e.target), 1);
    } else {
      var url = '';
      if (e.target.nodeName === 'A') {
        url = e.target.href;
      } else if (e.target.parentNode.nodeName === 'A') {
        url = e.target.parentNode.href;
      } else if (e.target.parentNode.parentNode.nodeName === 'A') {
        url = e.target.parentNode.parentNode.href;
      }
      if (url.indexOf('uland.taobao.com/coupon') > -1) {
        cnzz.log('click:dpcoupon');
        log('click:dpcoupon');
      }
    }
  });
};

var runTurnPage = function runTurnPage(dom, type) {
  var parentDom = $(dom).parent().parent();
  var lists = parentDom.find('.all-products .btcom-list li');
  var size = lists.length;
  var curpg = Number(parentDom.find('.bjd-pages .current-page').text());
  var totalp = Number(parentDom.find('.bjd-pages .page-num').text());
  parentDom.find('.all-products .btcom-list li').hide();
  if (type === 1) curpg++;else if (type === -1) curpg--;
  if (curpg === 0) curpg = totalp;
  if (curpg === totalp + 1) curpg = 1;
  var end = curpg * widthInfo.showListNum > size ? size : curpg * widthInfo.showListNum;
  for (var i = (curpg - 1) * widthInfo.showListNum; i < end; i++) {
    lists.eq(i).show();
    var img = lists.eq(i).find('.com-item-img img');
    replaceSrc(img);
  }
  parentDom.find('.bjd-pages .current-page').text(curpg);
};

var replaceSrc = function replaceSrc(img) {
  var src = img.attr('data-src');
  if (!src) return;
  var imgObj = new Image();
  imgObj.onload = function () {
    if (imgObj.complete == true) {
      $(img).attr('src', src).attr('data-src', null);
    }
  };
  imgObj.onerror = function (e) {
    var obj = $(img)[0];
    if (!$(img)[0]) return;
    obj.src = G.s_server + '/images/extensions/newbar/no_img.png';
    obj.setAttribute("data-src", G.s_server + '/images/extensions/newbar/no_img.png');
  };
  imgObj.src = src;
};

var editData = function editData(data, tb, tbsite) {
  for (var i = 0; i < data.length; i++) {
    if (data[i].price) {
      data[i].price = Number(data[i].price.toString().replace(',', '')).toFixed(2);
    }
    if (!data[i].img_url) data[i].img_url = data[i].pic_url;
    if (tbsite) {
      data[i].nick2 = data[i].item_location;
    }
    if (!data[i].site_name) data[i].site_name = data[i].nick2 || data[i].nick;
    if (tb && data[i].img_url.match(/_\d+x\d+/)) {
      var match = data[i].img_url.match(/_(\d+)x\d+/);
      if (match) {
        match = Number(match[1]);
        if (match > 200) {
          data[i].img_url = data[i].img_url + '_100x100';
        }
      }
    } else if (tb) {
      data[i].img_url = data[i].img_url + '_100x100';
    }
  }
  return data;
};

var renderDetail = function renderDetail(id, container) {
  var len, showpages, detailW, sale_tle, allink, pages, html, dom, i, img;
  return regeneratorRuntime.async(function renderDetail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        len = proInfo[id].length;
        showpages = undefined;
        detailW = undefined;

        if (len > widthInfo.showListNum) {
          showpages = true;
          detailW = $(window).width();
        } else {
          detailW = len * 268;
        }
        sale_tle = undefined, allink = undefined;

        if (id === 'tmcompare' || id === 'tbcompare') {
          sale_tle = "最近销量";
          if (proInfo[id].from_self === true) sale_tle = "总销量";
        }
        if (id === 'tmcompare') allink = allink_tm;else if (id === 'tbcompare') allink = allink_tb;
        pages = Math.ceil(len / widthInfo.showListNum);

        console.log('coupon ready got', proInfo);
        if (id === 'tmcompare' || id === 'tbcompare') {
          // await Promise.race([require('common/globalCondition').met('bottomCouponReady-' + id), require('common/commonUtil').sleep(600)])
        }
        console.log('done', proInfo);
        html = __webpack_require__(441);
        dom = template.compile(html)({
          data: proInfo[id],
          sale_tle: sale_tle,
          showpages: showpages,
          prowidth: widthInfo.allProductW,
          turnpW: widthInfo.turnpW,
          detailW: detailW,
          link: allink,
          id: id,
          pages: pages
        });

        $(container).append(dom);
        for (i = 0; i < Math.min(widthInfo.showListNum, len); i++) {
          img = $(container).find('.btcom-detail li .com-item-img img').eq(i);

          replaceSrc(img);
        }
        if (!showpages) {
          setSimplePagePos(len, container);
        }

      case 16:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var renderCompareBar = function renderCompareBar(data) {
  if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    return;
  }
  if (!data.store || !data.store[0] || data.store[0].product.length === 0) return;
  var turnpage = (13 + 18 + 20) * 2;
  var comArr = [];
  var totalSize = data.store.length;
  var freeW = calWidth.calBottomBar();
  pInfo.pageNum = parseInt((freeW - turnpage) / 104);
  pInfo.mbarItemShowNum = totalSize > pInfo.pageNum ? pInfo.pageNum : totalSize;
  if (pInfo.pageNum <= 0) pInfo.pageNum = 1;
  for (var i = 0; i < data.store.length; i++) {
    comArr.push(data.store[i].product[0]);
    proInfo[data.store[i].product[0].dp_id] = editData(data.store[i].product);
  }
  var lens = $('.compare-list li').length;
  pInfo.pages = Math.ceil((totalSize + lens) / pInfo.pageNum);
  var html = __webpack_require__(131);
  var views = template.compile(html)({
    data: comArr,
    pageNum: pInfo.pageNum
  });
  $('.compare-list').prepend(views);
  pInfo.nowpage = 0;
  pInfo.totalSize = totalSize;
  $('.compare-box').css('width', pInfo.mbarItemShowNum * 102 + 'px');
  if (pInfo.pages === 1) {
    $('.mbar-turnpage').hide();
  } else {
    $('.mbar-turnpage').show();
  }
  addEvent();
};
var setSimplePagePos = function setSimplePagePos(size, dom) {
  var mainW = $(window).width();
  var left = dom.offset().left;
  var domw = dom.outerWidth();
  var detail = dom.find('.btcom-detail');
  var width = 268 * size + 2;
  var dleft = left + domw / 2 - width / 2;
  if (dleft < 0) dleft = 0;
  if (dleft + width > mainW) dleft = mainW - width - 2;
  detail.css('left', dleft + 'px');
};
var exchangeData = function exchangeData(data) {
  if (!data.product || data.product && data.product.length === 0) return data;
  var b2c = [],
      obj = {};
  for (var i = 0; i < data.product.length; i++) {
    if (!data.product[i].site_name2) {
      data.product[i].site_name2 = data.product[i].site_name;
    }
    if (!obj[data.product[i].site_name2]) {
      obj[data.product[i].site_name2] = {
        product: [data.product[i]]
      };
    } else {
      obj[data.product[i].site_name2]['product'].push(data.product[i]);
    }
  }
  for (var pattern in obj) {
    if (pattern) {
      b2c.push(obj[pattern]);
    }
  }
  return {
    store: b2c
  };
};

var renderTbCompare = function renderTbCompare(data) {
  var html = __webpack_require__(131);
  var insNum = 0;
  if (data.tmall && data.tmall.product) {
    var obj = {
      dp_id: 'tmcompare',
      site_name: '天猫商城',
      price: data.tmall.min_price
    };
    // if (!G.aliSite && G.from_device !== '360')
    //   replaceHref.init('tmall', data.tmall.product, '&column=b2c')
    proInfo['tmcompare'] = editData(data.tmall.product, true);
    var dom = $('.compare-list>li').eq(5);
    if (dom.length === 0) dom = $('.compare-list>li:last-child');
    if (dom.length === 0) {
      $('.compare-list').append(template.compile(html)({
        data: [obj]
      }));
    } else {
      dom.after(template.compile(html)({
        data: [obj]
      }));
    }
    insNum++;
  }
  if (data.taobao && data.taobao.product) {
    var obj = {
      dp_id: 'tbcompare',
      site_name: '淘宝',
      price: data.taobao.min_price
    };
    // if (!G.aliSite && G.from_device !== '360')
    //   replaceHref.init('taobao', data.taobao.product, '&column=b2c')
    proInfo['tbcompare'] = editData(data.taobao.product, true, true);
    $('.compare-list').append(template.compile(html)({
      data: [obj]
    }));
    insNum++;
  }
  pInfo.totalSize = pInfo.totalSize + insNum;
  var pages = Math.ceil(pInfo.totalSize / pInfo.pageNum);
  if (pInfo.pages === 1 || !pInfo.pages) {
    if (pages > 1) {
      $('.mbar-turnpage.tright').show();
      pInfo.pages = pages;
    }
    pInfo.mbarItemShowNum = pInfo.totalSize > pInfo.pageNum ? pInfo.pageNum : pInfo.totalSize;
    $('.compare-box').css('width', pInfo.mbarItemShowNum * 102 + 'px');
    $('.mbar-turnpage').hide();
  } else {
    pInfo.pages = pages;
  }
  addEvent();
};
module.exports.renderBt = function (data) {
  var skipEvent = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];

  if (!(data.taobao instanceof Array) && data.taobao.more_link) allink_tb = data.taobao.more_link;
  if (!(data.tmall instanceof Array) && data.tmall.more_link) allink_tm = data.tmall.more_link;
  if (!widthInfo) widthInfo = calWidth.init();
  if (skipEvent) {
    skipEventAdd = true;
  }
  renderTbCompare(data);
  if (G.from_device !== '360') {
    __webpack_require__(65).init(data.tmall.product, 'tmall', true, data.tmall.min_price);
    __webpack_require__(65).init(data.taobao.product, 'taobao', true, data.taobao.min_price);
  }
};

module.exports.init = function (data) {
  if (data.b2c && data.b2c.store) {
    renderCompareBar(data.b2c);
  } else if (data.b2c_fuzzy) {
    data.b2c2 = exchangeData(data.b2c_fuzzy);
    renderCompareBar(data.b2c2);
  }

  widthInfo = calWidth.init();
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape;
    $each(data, function ($value, $index) {
        $$out += '\n  <li class="index_';
        $$out += $escape($index);
        $$out += '" data-id="';
        $$out += $escape($value.dp_id);
        $$out += '">\n    <div class="item-box-dev">\n      <span class="com-item-pri prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n      <span class="com-item-store blkcolor1">';
        $$out += $escape($value.site_name2 || $value.site_name);
        $$out += '</span>\n    </div>\n  </li>\n';
    });
    return $$out;
};

/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var data = {};

module.exports.get = function (k) {
  return data[k];
};

module.exports.set = function (k, v) {
  data[k] = v;
};

/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var communicate = __webpack_require__(18);
var buildTaobaoUrl = __webpack_require__(28);
var dataShare = __webpack_require__(132);
var globalData = undefined,
    callbacks = undefined;
var hasrun = false;
var timeOUT = 4000;
var trueClassId = false;
var sitearr = ['vipshop', 'mogujie', 'meilishuo', 'amazon', 'yougou', 'yohobuy', '6pm', 'yintai', 'banggo', 'xiu', 'vancl', 'shopbop', 'shopin', 's', 'masamaso', 'secoo', 'mei', 'gap', 'paixie', 'moonbasa', 'meici', 'macys', 'myhabit', 'zhen', 'gilt', 'mbaobao', 'wangfujing', 'letao', 'camel', 'handu', 'mf910', '5lux', 'd1', 'taoxie', 'm18', "thewatchery", "escentual", 'biccamera', 'zhe800', 'yangkeduo'];
if (location.host.indexOf('amazon') > -1 && location.host.indexOf('cn') == -1) timeOUT = 10000;
var editData = function editData(data) {
  var taobaoarr = [],
      tmallarr = [],
      guessarr = [];
  try {
    var info = JSON.parse(data);
    var array = info.mods.itemlist.data.collections;
    if (array.length == 0) return;
    if (array.length == 2 && array[0].title == '外观相似宝贝') {
      var similar = array[0].auctions;
      var len = similar.length > 20 ? 20 : similar.length;
      for (var i = 0; i < len; i++) {
        var item = {};
        var feeDesc = similar[i].view_fee == '0.00' ? '包邮' : '';
        item.nick = similar[i].nick;
        item.num_iid = similar[i].nid;
        item.title = similar[i].title;
        item.price = similar[i].view_price;
        item.item_location = similar[i].item_loc;
        item.store_name = similar[i].nick + feeDesc;
        item.pic_url = 'http:' + similar[i].pic_url;
        item.volume = similar[i].view_sales.replace('人付款', '');
        item.type = 'img_search';
        item.price2 = Number(item.price);
        if (G.dp.price && item.price2 * 2 < G.dp.price) continue;

        if (!item.pic_url.match(/jpg_[0-9]+x[0-9]/)) item.pic_url = item.pic_url.replace(/(\.png|\.jpg)/, '$1' + '_100x100.jpg');
        var obj = {
          'source': 'img_search',
          'img_url': 'http:' + similar[i].pic_url,
          'title': similar[i].title,
          'price': similar[i].view_price,
          'shop_name': similar[i].nick + feeDesc,
          'sales': similar[i].view_sales.replace('人付款', ''),
          'id': similar[i].nid,
          'url': 'https:' + similar[i].detail_url,
          'discuss': similar[i].comment_count,
          'istaobao': similar[i].detail_url.indexOf('detail.tmall.com') > -1 ? '0' : '1',
          'dp_id': similar[i].nid + '-' + (similar[i].detail_url.indexOf('detail.tmall.com') > -1) ? '83' : '123',
          'site_id': similar[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'
        };
        item.url = buildTaobaoUrl(obj);
        if (similar[i].detail_url.indexOf('detail.tmall.com') > -1) {
          tmallarr.push(item);
        } else {
          taobaoarr.push(item);
        }
      }
    } else if (array.length == 1 && array[0].title == '您可能会喜欢' || array.length == 2 && array[1].title == '您可能会喜欢') {
      var guess = array[array.length - 1].auctions;
      for (var i = 0; i < guess.length; i++) {
        var item = {};
        item.url = 'https:' + guess[i].detail_url;
        item.pic_url = guess[i].pic_url;
        item.title = guess[i].title;
        item.num_iid = guess[i].nid;
        item.price = guess[i].view_price;
        item.volume = guess[i].view_sales;
        item.nick = guess[i].nick;
        item.price2 = Number(item.price);
        if (G.dp.price && item.price2 * 2 < G.dp.price) continue;
        guessarr.push(item);
      }
    }
    taobaoarr = sortData(taobaoarr);
    tmallarr = sortData(tmallarr);
    globalData = {
      'taobao': taobaoarr,
      'tmall': tmallarr,
      'guessfavor': guessarr
    };
    if (callbacks && !hasrun) {
      callbacks(globalData);
      hasrun = true;
    }
  } catch (e) {}
};

var sortData = function sortData(data) {
  if (!data.sort) return;
  data = data.sort(function (value1, value2) {
    if (Number(value1.price) > Number(value2.price)) return 1;else if (Number(value1.price) == Number(value2.price)) return 0;else return -1;
  });
  return data;
};
var getImgSrc = function getImgSrc() {
  var imgsrc = {
    '360buy': '#preview .jqzoom img',
    'gome': '.jqzoom img',
    'suning': '#imgZoom #bigImage',
    'yihaodian': '#J_prodImg',
    'vancl': '#midimg',
    'shopin': '#zoom1 img',
    'secoo': '.jqzoom',
    'mei': '#bigimg',
    'meici': '.zoomPad img',
    'macys': '#mainView_1',
    'taoxie': '#t_PreviewImage img',
    'd1': '.gs_right_spimg img',
    '5lux': '.cloudzoom',
    'mf910': '#op_product_zoom img',
    'handu': '#masterImage',
    'camel': '#img_jqzoom',
    'letao': '#simgouter img',
    'wangfujing': '.zoomPad .lazy-pic',
    'zhen': '#zoom1 .a_max_pic',
    'shopbop': '#productImage',
    'yohobuy': '#img-show',
    'taobao': '#J_ImgBooth',
    'thewatchery': '#detailimage',
    'amazon': '#altImages ul li img',
    'mogujie': '#J_BigImg',
    'escentual': '#zoom1 img',
    'biccamera': '#PROD-CURRENT-IMG',
    'zhe800': '#detail .deteilpic ul li img',
    'vipshop': '#J-mer-ImgReview .zoomPad>img',
    'tmall': '#J_ImgBooth',
    '1688': '#mod-detail-bd .content .box-img img',
    'vip': '#J-mer-ImgReview .zoomPad>img',
    'meilishuo': '#picture .item-pic-origin>img',
    'jumei': '#etalage li>img',
    '6pm': '#detailImage img',
    'banggo': '.mainPicContent',
    'vjia': '#FreshDiv_MainPhoto .sp-bigImg img',
    'yougou': '#pD-bimg',
    'yintai': '#J_Magnifier img',
    'okbuy': '#zoom1 img',
    'lovo': '#jqzoom .zoomPad img',
    'moonbasa': '#largeimg',
    'tonlion': '.good_left .jqzoom',
    'xiu': '#imgPic',
    'lamiu': '#op_product_zoom img',
    'masamaso': '.goods_tp_box .zoomPad img',
    's': '.goods-detail-pic a img',
    'paixie': '#zoom1 img',
    'mbaobao': '#goods-zoom img',
    'm18': '#GoodsImage',
    'gap': '#wrap.all-images-box a img',
    'esprit': '#mainImages .m-pic img',
    'yangkeduo': '#banner .islider-outer .islider-active img'
  };
  if (imgsrc[G.site]) {
    var src = $(imgsrc[G.site]).eq(0).attr('src');
    if (location.host == 'www.amazon.co.jp' && src && src.match(/SR[0-9]+,[0-9]+/)) {
      src = src.replace(/SR([0-9]+)\,([0-9]+)/, 'SR' + '$1' + '0' + ',' + '$2' + '0');
    } else if (location.host.indexOf('amazon') > -1) {
      return false;
    }
    if (src && !src.match(/(?:http:|https:)/) && src.indexOf('//') > -1) src = 'http:' + src;
    if (G.site === 'zhe800') {
      src = src.replace('58x58.jpg', '220x220.jpg');
    }
    if (!src || src.indexOf('base64') > -1) {
      return false;
    }
    return src;
  }
  return false;
};
var readyImg = function readyImg(trueClassId) {
  var src = getImgSrc();
  if (sitearr.indexOf(G.site) > -1 && location.host != 'www.amazon.cn' || location.host.indexOf('1688') > -1 || trueClassId) {
    trueClassId = true; //发了请求都可以等，为true init里面才不会return
    communicate.trigger({
      type: 'getTaobaoImgInfo',
      src: src
    });
    communicate.on(function (data) {
      if (typeof data === 'string') {
        data = JSON.parse(data);
      }
      if (data.type == 'getTaobaoImgInfo') {
        var text = $('#gwd_img_info').text();
        if (text != '') editData(text);
      }
    });
  }
};
module.exports.ready = function () {
  if (G.site == 'taobao' || G.site == 'tmall' || G.site.indexOf('taobao') > -1) {
    return;
  }
  var dpdata = dataShare.get('dp_data');
  var classId = dpdata && dpdata['now']['class_id'];
  var code = dpdata && dpdata['code-server']['code'];
  if (G.site === 'amazon' && code) return;
  if (classId) classId = classId.slice(0, 2);
  if (G.site === '360buy') {
    var cate_id = G.dp.cat_id;
    if (cate_id) cate_id = cate_id.split('-')[0];
    var cateidArr = ["1620", "1315", "1318", "1672", "1319", "5025", "6144", "15248", "11729"];
    if (cateidArr.indexOf && cateidArr.indexOf(cate_id) > -1) {
      trueClassId = true;
    }
  } else {
    if (classId == "13" || classId == "24" || classId == "1A" || classId == '21') trueClassId = true;
  }

  readyImg(trueClassId);
};
module.exports.uniqPidGetImg = function (callback) {
  readyImg(true);
  callbacks = callback;
};

module.exports.init = function (callback) {
  if (!trueClassId && sitearr.indexOf(G.site) == -1) {
    callback(null);
    return;
  }
  if (globalData) {
    callback(globalData);
    hasrun = true;
  } else callbacks = callback;
  setTimeout(function () {
    if (callbacks && hasrun === false) {
      callbacks(null);
      hasrun = true;
    }
  }, timeOUT);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

module.exports.init = function (obj) {
  var unionUrl = G.u_server;
  var ukey = 'u.' + G.u_key + '.com';
  if (obj.url.includes('.amazon.')) {
    unionUrl = 'https://u.smartlinkclick.com';
  }
  if (typeof obj != 'object') return;
  if (obj.url.indexOf(ukey) > -1) return obj.url;
  var ext = "";
  if (obj.ext) ext = "-" + obj.ext;
  if (obj.is_mobile) {
    if (obj.isbrowser) return obj.url;else return unionUrl + '/union/go/?site_id=' + obj.site_id + '&target_url=' + encodeURIComponent(obj.url) + '&union=' + obj.union + '&column=' + obj.mod + '-' + obj.dp_id + ext;
  } else {
    return unionUrl + '/union/go/?site_id=' + obj.site_id + '&target_url=' + encodeURIComponent(obj.url) + '&union=' + obj.union + '&column=' + obj.mod + '-' + obj.dp_id + ext;
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 135 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js__ = __webpack_require__(136);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _commonComponentsMemberCouponMixin = __webpack_require__(42);

var _commonComponentsMemberCouponMixin2 = _interopRequireDefault(_commonComponentsMemberCouponMixin);

exports["default"] = {
  mixins: [_commonComponentsMemberCouponMixin2["default"]]
};
module.exports = exports["default"];

/***/ }),
/* 137 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js__ = __webpack_require__(138);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, "__esModule", {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _commonComponentsMemberCouponMixin = __webpack_require__(42);

var _commonComponentsMemberCouponMixin2 = _interopRequireDefault(_commonComponentsMemberCouponMixin);

var _commonComponentsMemberCouponQr = __webpack_require__(63);

var _commonComponentsMemberCouponQr2 = _interopRequireDefault(_commonComponentsMemberCouponQr);

exports["default"] = {
  mixins: [_commonComponentsMemberCouponMixin2["default"]],
  components: { MemberCouponQr: _commonComponentsMemberCouponQr2["default"] },
  data: function data() {
    return {
      G: G
    };
  }
};
module.exports = exports["default"];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime, $, Vue) {

var request = __webpack_require__(3);
var globalCondition = __webpack_require__(4);
var cnzz = __webpack_require__(12);

var getRebate = function getRebate(rate, dp_id, url) {
  if (G.dp.rebate) {
    return new Promise(function (resolve) {
      return resolve({
        rebate: G.dp.rebate
      });
    });
  }
  return request.get(G.server + '/extension/Coupon?rebate=1&' + rate + '&price=' + (G.dp.ori_price ? G.dp.ori_price : G.dp.price) + '&' + dp_id + '&' + url);
};

module.exports = {
  init: function init() {
    var dp_id, url, rate, price, config, duomaiData, t;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!($('body').hasClass('gwd_unfold') || $('html').hasClass('gwd_bottom'))) {
            context$1$0.next = 2;
            break;
          }

          return context$1$0.abrupt('return');

        case 2:
          if (!(G.from_device === 'biyibi')) {
            context$1$0.next = 5;
            break;
          }

          globalCondition.setMet('noOtherGiftMoney');
          return context$1$0.abrupt('return');

        case 5:
          dp_id = G.dp.itemId;

          if (G.aliSite) {
            dp_id = __webpack_require__(10).getParameterByName('id');
            if (G.site === 'tmall') {
              dp_id = dp_id + '-83';
            } else {
              dp_id = dp_id + '-123';
            }
          }
          dp_id = dp_id ? 'dp_id=' + dp_id : '';
          url = encodeURIComponent(location.href);

          url = url ? 'url=' + url : '';
          rate = 'rate=';
          price = G.dp.price;
          context$1$0.next = 14;
          return regeneratorRuntime.awrap(request.rawGet('https://cdn.bijiago.com/js/configs/gwdang.json'));

        case 14:
          config = context$1$0.sent;

          if (!(G.site === '360buy' && config.allowDuomai)) {
            context$1$0.next = 24;
            break;
          }

          __webpack_require__(6).log('duomai before', G.dp.itemId);
          context$1$0.next = 19;
          return regeneratorRuntime.awrap(request.rawGet('https://u.bijiago.com/gyp/jd/item?id=' + G.dp.itemId.replace('-3', ''), false, 30000));

        case 19:
          duomaiData = context$1$0.sent;

          __webpack_require__(6).log('duomai after');
          if (typeof duomaiData === 'string') {
            duomaiData = JSON.parse(duomaiData);
          }
          rate = 'rate=' + (parseFloat(duomaiData.commission_rate) * 100).toFixed(2);
          price = duomaiData.price * (location.href.indexOf('debugExt') > -1 ? 10000 : 1);

        case 24:
          __webpack_require__(6).log('duomai rate', rate);
          t = $('#summary-tips').text();

          if (!(G.site === '360buy' && (t.indexOf('不可使用东券') > -1 || t.indexOf('不可使用京券、东券') > -1))) {
            context$1$0.next = 29;
            break;
          }

          globalCondition.setMet('noOtherGiftMoney');
          return context$1$0.abrupt('return');

        case 29:
          if (!(G.ss_name === 'priceDog')) {
            context$1$0.next = 31;
            break;
          }

          return context$1$0.abrupt('return');

        case 31:
          if (!$('.bjgou-subsidy-bar').length) {
            context$1$0.next = 33;
            break;
          }

          return context$1$0.abrupt('return');

        case 33:
          if (!$('.bjgou-mini-coupon-bar').length) {
            context$1$0.next = 35;
            break;
          }

          return context$1$0.abrupt('return');

        case 35:
          getRebate(rate, dp_id, url).then(function (res) {
            if (!res.rebate) {
              globalCondition.setMet('noOtherGiftMoney');
              return;
            }
            // if ($('.dsj-content').length) {
            //   $('.dsj-content').after('<div id="bjgou-subsidy"></div>')
            // } else {
            //   $('#bjgext_minibar').after('<div id="bjgou-subsidy"></div>')
            // }
            $('#bjg-coupon-placeholder').replaceWith('<div id="bjgou-subsidy"></div>');
            var Subsidy = __webpack_require__(477)['default'];
            cnzz.logOnce((G.site === '360buy' ? 'jd' : 'taobao') + 'GiftMoney:show');

            var jumpLink = G.site === '360buy' ? res.url.replace('/?', '/index.html?') + '&lang=' + G.lang : __webpack_require__(20).appendTbInfoForUrl('https://tb.bijiago.com/extension/qrpage?' + dp_id + '&tag=9_chrome&rebate=1&discount=' + res.rebate + '&union=' + G.union + '&lang=' + G.lang);

            new Vue({
              el: '#bjgou-subsidy',
              render: function render(h) {
                return h(Subsidy, {
                  props: {
                    value: res.rebate,
                    qr: false,
                    url: jumpLink
                  }
                });
              }
            });

            $('#bijiago-banner-ad').remove();
            $('.bjg-coupon-space').after('<div id="bjgou-subsidy-bottom"></div>');
            var SubsidyBottom = __webpack_require__(488)['default'];
            new Vue({
              el: '#bjgou-subsidy-bottom',
              render: function render(h) {
                return h(SubsidyBottom, {
                  props: {
                    value: res.rebate,
                    qr: false,
                    url: jumpLink
                  }
                });
              }
            });

            var text = '领红包下单';
            if (G.lang === 'zh-tr') {
              text = '領紅包下單';
            }
          });

        case 36:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 140 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js__ = __webpack_require__(141);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _QrErrorVue = __webpack_require__(142);

var _QrErrorVue2 = _interopRequireDefault(_QrErrorVue);

var getQRCode = __webpack_require__(23);
var cnzz = __webpack_require__(12);

exports['default'] = {
  name: "Subsidy",
  props: ['value', 'url', 'qr'],
  components: { QrError: _QrErrorVue2['default'] },
  data: function data() {
    return {
      qrcode: '',
      error: false,
      site: G.site
    };
  },
  methods: {
    transText: function transText(text) {
      var map = {
        '点击领取': '點擊領取',
        '店铺红包': '店鋪紅包',
        '立即领取': '立即領取',
        '微信扫码': '微信掃碼',
        '领优惠券': '領優惠券',
        '领礼金': '領禮金'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    click: function click() {
      if (!this.qr) window.open(this.url);
    },
    over: function over() {
      var _this = this;

      if (!this.qr) return;
      if (this.qrcode) return;
      getQRCode({
        id: G.dp.dpId,
        pid: 'bjgou-mini',
        amount: this.value,
        title: '',
        _type: 'rebate'
      }, '', function (res) {
        cnzz.log((G.site === '360buy' ? 'jd' : 'taobao') + 'GiftMoney:hover');
        if (res[0].etag) {
          _this.error = true;
          return;
        } else {
          _this.error = false;
        }
        _this.qrcode = res[0].imgSrc;
      });
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 142 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_8590af9e_scoped_true__ = __webpack_require__(480);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__ = __webpack_require__(143);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__QrError_vue_vue_type_style_index_0_id_8590af9e_scoped_true_lang_less__ = __webpack_require__(482);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_8590af9e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_8590af9e_scoped_true__["staticRenderFns"],
  false,
  null,
  "8590af9e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('8590af9e')) {
      api.createRecord('8590af9e', component.options)
    } else {
      api.reload('8590af9e', component.options)
    }
    module.hot.accept("./QrError.vue?vue&type=template&id=8590af9e&scoped=true", function () {
      api.rerender('8590af9e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/QrError.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 143 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__ = __webpack_require__(144);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  methods: {
    click: function click() {
      this.$emit('refresh');
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 145 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js__ = __webpack_require__(146);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _QrErrorVue = __webpack_require__(142);

var _QrErrorVue2 = _interopRequireDefault(_QrErrorVue);

var getQRCode = __webpack_require__(23);
var cnzz = __webpack_require__(12);

exports['default'] = {
  name: "SubsidyBottom",
  props: ['value', 'url', 'qr'],
  components: { QrError: _QrErrorVue2['default'] },
  data: function data() {
    return {
      qrcode: '',
      error: false
    };
  },
  methods: {
    transText: function transText(text) {
      var map = {
        '点击领取': '點擊領取',
        '店铺红包': '店鋪紅包',
        '立即领取': '立即領取',
        '微信扫码': '微信掃碼',
        '领优惠券': '領優惠券',
        '领礼金': '領禮金',
        '当前商品领红包立减': '當前商品領紅包立減'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    click: function click() {
      if (!this.qr) window.open(this.url);
    },
    over: function over() {
      var _this = this;

      if (!this.qr) return;
      if (this.qrcode) return;
      getQRCode({
        id: G.dp.dpId,
        pid: 'bjgou-mini',
        amount: this.value,
        title: '',
        _type: 'rebate'
      }, '', function (res) {
        cnzz.log((G.site === '360buy' ? 'jd' : 'taobao') + 'GiftMoney:hover');
        if (res[0].etag) {
          _this.error = true;
          return;
        } else {
          _this.error = false;
        }
        _this.qrcode = res[0].imgSrc;
      });
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 147 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js__ = __webpack_require__(148);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _ShopCouponMixin = __webpack_require__(149);

var _ShopCouponMixin2 = _interopRequireDefault(_ShopCouponMixin);

var getQRCode = __webpack_require__(23);
var getCouponInfo = __webpack_require__(54);

exports['default'] = {
  props: ['coupon', 'useTb'],
  mixins: [_ShopCouponMixin2['default']],
  data: function data() {
    return {
      img: '',
      error: false,
      loading: false,
      tag: 5
    };
  },
  mounted: function mounted() {
    __webpack_require__(12).log('店铺券中间二维码', '曝光');
  }
};
module.exports = exports['default'];

/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});
var getCouponInfo = __webpack_require__(54);
var getQRCode = __webpack_require__(23);
exports['default'] = {
  computed: {
    link: function link() {
      return __webpack_require__(20).appendTbInfoForUrl(G.tb_server + '/extension/qrpage?union=' + G.union + '&dp_id=' + (this.dpId ? this.dpId : G.dp.dpId) + '&tag=' + this.tag);
    }
  },
  methods: {
    getText: function getText(text) {
      var map = {
        '当前商品可领券': '當前商品可領券',
        '店铺券(满': '店鋪券(滿',
        '减': '減',
        '立即领取': '立即領取',
        '领券满': '領券滿',
        '淘宝APP扫码': '淘寶APP掃碼',
        '领店铺券': '領店鋪券'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    over: function over(e) {
      var _this = this;

      if (this.img) return;
      if (this.loading) return;
      this.loading = true;
      __webpack_require__(12).log('店铺券中间二维码', '悬浮');
      if (this.useTb) {
        __webpack_require__(3).rawGet(G.u_server + ('/helper/qrcode?event=appQrcode' + (this.tag ? '&tag=' + this.tag : '') + '&dp_id=') + (this.dpId ? this.dpId : G.dp.dpId)).then(function (res) {
          console.log(res);
          if (typeof res === 'string') {
            res = JSON.parse(res);
          }
          _this.img = res.data.qrImgStr;
        });
      } else {
        getCouponInfo({
          pid: 'gwd-middle',
          coupon: {
            coupon_money: this.coupon.discount
          }
        }, function (data) {
          data._type = 'item';
          data.tip = _this.coupon.limit + '-' + _this.coupon.discount;
          getQRCode(data, '', function (res) {
            _this.img = res[0].imgSrc;
          });
        });
      }
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 150 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _ShopCouponMixin = __webpack_require__(149);

var _ShopCouponMixin2 = _interopRequireDefault(_ShopCouponMixin);

var getQRCode = __webpack_require__(23);
var getCouponInfo = __webpack_require__(54);

exports['default'] = {
  props: ['coupon', 'useTb'],
  mixins: [_ShopCouponMixin2['default']],
  data: function data() {
    return {
      img: '',
      error: false,
      loading: false,
      tag: 6
    };
  },
  mounted: function mounted() {
    __webpack_require__(12).log('店铺券顶部二维码', '曝光');
  }
};
module.exports = exports['default'];

/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', isShowPic = $data.isShowPic, $escape = $imports.$escape, url = $data.url, lang = $data.lang, data = $data.data, site = $data.site;
    $$out += '<a class="bjgou-mini-coupon-bar bjg-minibar-visible-component" ';
    if (!isShowPic) {
        $$out += ' href="';
        $$out += $escape(url);
        $$out += '" target="_blank" style="cursor:pointer"';
    }
    $$out += ' title="';
    $$out += $escape(lang == 'zh-tr' ? '點擊領取' : '点击领取');
    $$out += '">\n  ';
    if (lang == 'en') {
        $$out += '\n<span style="margin-left: 6px; font-size: 14px; color: #ff6132; font-weight: bold; line-height: 35px">\xA5';
        $$out += $escape(data.coupon.coupon_money);
        $$out += ' Coupon</span>\n  ';
    } else {
        $$out += '\n  <span class="bjg-coupon-white" style="font-family: Arial; font-size: 14px; font-weight: bold; margin-left: 95px; margin-top: 10px">\xA5</span>\n  <span class="bjg-coupon-white" style="font-size: 30px; font-weight: bold;">';
        $$out += $escape(data.coupon.coupon_money);
        $$out += '</span>\n  <span class="bjg-coupon-white" style="font-size: 18px; font-weight: bold; margin-left: 6px; margin-top: 6px; width: 73px">';
        if (lang == 'zh-tr') {
            $$out += '優惠券';
        } else {
            $$out += '优惠券';
        }
        $$out += '</span>\n<div style="flex: 1"></div>\n  <span class="bjg-coupon-white" style="font-size: 18px; font-weight: bold; margin-right: 22px">';
        $$out += $escape(site === '360buy' ? lang == 'zh-tr' ? '點擊領取' : '点击领取' : lang == 'zh-tr' ? '立即領取' : '立即领取');
        $$out += '</span>\n  ';
    }
    $$out += '\n    ';
    if (isShowPic) {
        $$out += '\n    <div class="bjgou-coupon-box">\n      <img alt="" style="margin-top: 8px; width: 114px; height: 114px; visibility: hidden">\n      <span style="margin-top: 5px; color: #ff6132; font-size: 12px; font-weight: bold; line-height: initial">';
        if (lang == 'en') {
            $$out += 'Scan with WeChat';
        } else {
            $$out += '淘宝扫码领券';
        }
        $$out += '</span>\n    </div>\n    ';
    }
    $$out += '\n</a>\n<style>\n  .bjgou-mini-coupon-bar {\n    margin-top: 5px;\n    width: 442px;\n    height: 67px;\n    line-height: 67px;\n    position: relative;\n    display: inline-flex;\n    align-items: center;\n    background: url(https://cdn.bijiago.com/images/extensions/bijiago/bigCoupon@2x.png);\n    box-sizing: border-box!important;\n    background-size: contain;\n  }\n\n  .bjg-coupon-white {\n    color: #ffffff;\n  }\n\n  .bjgou-mini-coupon-bar:hover {\n    text-decoration: none;\n  }\n\n  .bjgou-coupon-take {\n    background: url("https://cdn.bijiago.com/images/extensions/bijiago/couponTake.svg");\n    width: 95px;\n    height: 24px;\n    margin-left: 12px;\n    margin-right: 12px;\n    display: flex;\n    align-items: center;\n    position: relative;\n  }\n\n  .bjgou-coupon-box {\n    position: absolute;\n    width: 132px;\n    height: 150px;\n    top: 70px;\n    z-index: 9;\n    right: -12px;\n    display: none;\n    flex-direction: column;\n    align-items: center;\n    background: #fff6f4;\n    border: 1px solid #ff6132;\n  }\n\n  .bjgou-mini-coupon-bar:hover .bjgou-coupon-box {\n    display: flex;\n  }\n</style>\n';
    if (lang == 'en') {
        $$out += '\n<style>\n  .bjgou-coupon-take {\n      background: url("https://cdn.bijiago.com/images/extensions/bijiago/couponTake-en.svg");\n  }\n</style>\n';
    }
    $$out += '\n';
    return $$out;
};

/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var communicate = __webpack_require__(18);
var globalData, callbacks;

var getBasicInfo = function getBasicInfo() {
  var product = G.dp;
  var itemID = product.itemId,
      cid = product.cat_id,
      userid = G.guid || product.userid || createUserId(),
      title = encodeURIComponent(product.name),
      price = product.price,
      url = product.url,
      pic = encodeURIComponent(product.pic),
      website = product.website;
  if (!website) return;
  var str = 'itemId=' + itemID + '&title=' + title + '&cid=' + cid + '&price=' + price + '&url=' + encodeURIComponent(url) + '&pic=' + pic + '&website=' + website + '&userId=' + userid + ',';
  return str;
};

var createUserId = function createUserId() {
  var str = '0122';
  var randomstr = '0123456789abcdefghijklmn';
  for (var i = 0; i < 28; i++) {
    str += randomstr[parseInt(Math.random() * 28)];
  }
  return str;
};
module.exports.init = function (callback) {
  if (globalData) {
    callback(globalData);
  } else if (globalData === 0) {
    callback(null);
  } else {
    callbacks = callback;
  }
};

module.exports.ready = function (done) {
  var info = getBasicInfo();
  if (!info) return;
  var url = "http://kksofts.com/api/recomm";
  communicate.on(function (data) {
    try {
      if (data.type == 'taotaosou') {
        globalData = JSON.parse(data.value);
        if (callbacks) callbacks(globalData);
        done(globalData);
      }
    } catch (e) {
      globalData = 0;
    }
  });
  communicate.trigger({
    type: 'taotaosou',
    info: getBasicInfo(),
    url: url
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var parseprice = __webpack_require__(21);
var template = __webpack_require__(13);
var go_union = __webpack_require__(134);

var amazonName = {
  '1': '中国',
  '228': '美国',
  '229': '日本',
  '246': '德国',
  '266': '英国',
  '365': '法国',
  '366': '加拿大'
};
var amazonCurrency = {
  '228': 'USD',
  '229': 'JPY',
  '246': 'EUR',
  '266': 'GBP',
  '365': 'EUR',
  '366': 'CAD'
};
var amazonMoney = {
  '1': '¥',
  '228': '$',
  '229': '円',
  '246': 'EUR',
  '266': '£',
  '365': 'EUR',
  '366': 'CDN$'
};

var reqInfo = function reqInfo(dp_id, callback) {
  var url = G.server + '/extension?ac=amazonGlobal&dp_id=' + dp_id;
  request.get(url).done(function (data) {
    if (data && data.length > 0) {
      callback(data);
    } else {
      $('.bjgext-mini-trend').css('border-right', 'none');
    }
  });
};

var editData = function editData(data) {
  for (var i = 0, len = data.length; i < len; i++) {
    var site_id = data[i].dp_id.split('-')[1];
    if (data[i].nowpage === '1') data[i].siteName = amazonName[site_id] + '亚马逊(当前商城)';else data[i].siteName = amazonName[site_id] + '亚马逊';
    var price = (Number(data[i].pri) / 100).toFixed(2);
    var purePrice = '';
    if (site_id !== "1") {
      var price2 = '';
      if (site_id === '229') price2 = price + amazonMoney[site_id];else price2 = amazonMoney[site_id] + price;
      purePrice = parseprice(price, amazonCurrency[site_id]);
      price = '¥' + purePrice + ('(' + price2 + ')');
    } else {
      purePrice = price;
      price = '¥' + price;
    }
    var obj = {
      'site_id': site_id,
      'url': data[i].url,
      'mod': 'amazon_global',
      'union': G.union.split('_')[1],
      'dp_id': data[i].dp_id
    };
    data[i].url = go_union.init(obj);
    data[i].price = price;
    data[i].purePrice = purePrice;
  }
  data.sort(function (value1, value2) {
    return Number(value1.purePrice) - Number(value2.purePrice);
  });
  return data;
};

var render = function render(data) {
  if (G.showYjht) {
    $('.bjgext-mini-trend').css('border-right', 'none');
    return;
  }
  data = editData(data);
  var dp = data[0];
  var btn = '<a href="' + dp.url + '" target="_blank" id="amazon_global_link">亚马逊海外购：<span>' + dp.price + '</span></a>';
  $('.bjgext-mini-compare').append($(btn)).show();
  $('#bjgext_minibar').css('min-width', '393px');
  if (!G.showMinibar) {
    $('#bjgext_minibar').css('display', 'inline-block');
    G.showMinibar = true;
  }
  G.amazonGlobal = true;
};

module.exports.init = function (dp_id) {
  reqInfo(dp_id, render);
};

module.exports.amazonMoney = amazonMoney;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 155 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__ = __webpack_require__(525);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionBar_vue_vue_type_script_lang_js__ = __webpack_require__(156);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CollectionBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CollectionBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CollectionBar_vue_vue_type_style_index_0_id_617a0842_scoped_true_lang_less__ = __webpack_require__(554);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CollectionBar_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__["staticRenderFns"],
  false,
  null,
  "617a0842",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('617a0842')) {
      api.createRecord('617a0842', component.options)
    } else {
      api.reload('617a0842', component.options)
    }
    module.hot.accept("./CollectionBar.vue?vue&type=template&id=617a0842&scoped=true", function () {
      api.rerender('617a0842', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/CollectionBar.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 156 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js__ = __webpack_require__(157);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _vuex = __webpack_require__(24);

var _BjgBottomWindowVue = __webpack_require__(67);

var _BjgBottomWindowVue2 = _interopRequireDefault(_BjgBottomWindowVue);

var _OrangeButton = __webpack_require__(536);

var _OrangeButton2 = _interopRequireDefault(_OrangeButton);

var _CollectionList = __webpack_require__(542);

var _CollectionList2 = _interopRequireDefault(_CollectionList);

var _mixinsBottomWindowMixin = __webpack_require__(68);

var _mixinsBottomWindowMixin2 = _interopRequireDefault(_mixinsBottomWindowMixin);

var bgClient = __webpack_require__(16);
var user = __webpack_require__(22);

exports['default'] = {
  components: { BjgBottomWindow: _BjgBottomWindowVue2['default'], OrangeButton: _OrangeButton2['default'], CollectionList: _CollectionList2['default'] },
  mixins: [_mixinsBottomWindowMixin2['default']],
  data: function data() {
    return {
      selected: 'all',
      tip: 0
    };
  },
  methods: {
    startLoad: function startLoad() {
      if (this.tip > 0) {
        this.selected = 'reduction';
      }
      this.tip = 0;
      if (this.user) {
        this.$refs['default'].init();
        this.$refs.reduction.init();
      }
    },
    select: function select(item) {
      this.selected = item;
      if (item === 'all') {
        this.$refs['default'].reload();
      } else {
        this.$refs.reduction.reload();
      }
    },
    doLogin: function doLogin() {
      __webpack_require__(22).goLogin();
    }
  },
  computed: _extends({}, (0, _vuex.mapState)({
    userName: function userName(state) {
      return state.user.userName;
    },
    user: function user(state) {
      return state.user.userLogin;
    },
    hasWx: function hasWx(state) {
      return state.user.userHasWx;
    }
  })),
  mounted: function mounted() {
    var _this = this;

    bgClient.get('/collection/tip', {}, function (res) {
      _this.tip = parseInt(res);
    });
    user.init();
  }
};
module.exports = exports['default'];

/***/ }),
/* 158 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 159 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _vuex = __webpack_require__(24);

exports['default'] = {
  props: ['name', 'alwaysShow'],
  data: function data() {
    return {
      from_device: G.from_device
    };
  },
  computed: _extends({
    qrImg: function qrImg() {
      if (this.name === '降价') {
        return 'https://cdn.bijiago.com/images/extensions/bijiago/qr-wechat-hover-down@2x.png';
      }
      return 'https://cdn.bijiago.com/images/extensions/bijiago/qr-wechat-hover@2x.png';
    },
    qrWidth: function qrWidth() {
      if (this.name === '降价') {
        return 125;
      }
      return 116;
    }
  }, (0, _vuex.mapState)({
    userName: function userName(state) {
      return state.user.userName;
    },
    user: function user(state) {
      return state.user.userLogin;
    },
    hasWx: function hasWx(state) {
      return state.user.userHasWx;
    }
  })),
  mounted: function mounted() {},
  methods: {
    imgClick: function imgClick(e) {
      if (e.offsetX >= 140 && e.offsetY <= 20) {
        store.commit('user/setState', {
          userHasWx: true
        });
      }
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 160 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js__ = __webpack_require__(161);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['selected']
};
module.exports = exports['default'];

/***/ }),
/* 162 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAABoCAMAAAANbMR7AAACNFBMVEUAAAD////////////////////f39/j4+Pm5ubo6Ojr6+vt7e3d3d3j4+Pk5OTm5ubn5+fc3Nze3t7g4ODi4uLj4+Pk5OTl5eXd3d3e3t7f39/g4ODh4eHi4uLj4+Pd3d3d3d3e3t7f39/g4ODh4eHh4eHc3Nzd3d3e3t7e3t7g4ODc3Nze3t7g4ODc3Nzd3d3e3t7f39/f39/g4ODd3d3f39/c3Nzd3d3e3t7e3t7f39/f39/c3Nzd3d3d3d3e3t7e3t7f39/c3Nzd3d3d3d3e3t7e3t7e3t7c3Nzd3d3e3t7c3Nzc3Nzd3d3e3t7c3Nzd3d3d3d3e3t7e3t7c3Nzd3d3e3t7e3t7c3Nzd3d3d3d3d3d3c3Nzd3d3d3d3e3t7c3Nzc3Nzd3d3d3d3e3t7d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nzd3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3d3d3c3Nzd3d3d3d3d3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3d3d3c3Nzc3Nzd3d3d3d3d3d3c3Nzc3Nzc3Nzc3Nzd3d3d3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nzc3Nzc3Nzd3d3d3d3d3d3d3d3c3Nzc3Nzc3Nzc3Nzd3d3d3d3d3d3c3Nx5QHe+AAAAu3RSTlMAAQIDBAcICQoLDQ4PEhMUFRYXGRobHB0eHyAhIiMkJSYnKCkqKywtLi8yMzY5Ozw9P0BBREdJTE1OT1BRUlNUVVdYWltcXV5gYmRmZ2lrbm9wc3R2eHp7fH+AgYSGiYqLjI2OkZiZmpudnp+hpqeoqaqrra+wsbO0tba3ubq7vL2+v8DBw8TFxsfIycvMzc7R0tPU1dbX2Nna29zf4OHi4+Tl5ufo6err7O3v8PHy8/T19vf4+fr7/P3+VPFN8wAAA79JREFUGBntwflDk2UAB/CvHFIIiRLXIq4g6aDsICuiw7SUsjLULivtsMMuI7ITm6OCsLwSGxsLGUeIgNpA2Pef63n2rMLtfYfP2Ps+v/D5IH1rP5kcfB4GfEmhFe67TOF9uC9C4VO47wKFL+C+MQrfwn1/UvDCXl33TFcFMs9P4WfYahgn6YWuCu9053qkcorCb7BTN0phGrq6SJ4tRgrHKJyGjeowpU7oukjBXwp7P1EYgLXKIUr966Crm1KgHLaOUBiCJU+Ikr8Y2urGKQU9sPM1hXFYKQtSCpQgDfWjlEKVsNFBYQoWSgKUgmVIS12Y0lA1rH1MIYJkxX9QCnmQpuohSsO1sHSAwiySrOunNFSJtFWGKI3Uw8ojFL5Bkk5Kw9VYBk+Q0lgtrLSdHfzgeiSZpjBSi2UpD1DyQYOX5Fg9lqnET2EGGiq6Zny1WLbifpJdMGB957S3AitWrFixwkp++4/hSILZBHMJriSYX2TC91QOrkHTODPumAdLuudvOiBchSUUDdMR/nyk1kGHvIuUNtEp0SakcN0glUsvlmYhMwqafJRO5sDeG1SCtyGDcvsotcNWwxxjJquQUVURChfLYKebSisy7DVKHbCxlcoPyLS8YUoPwNKaESp3IuPaKA3kwso7VDqQedn9lF6GhcZ5xszfAge0ULpUhmRHqXwIR/RQ+gxJHqcSKYcjNjLmXiTIC1F5Gw45TOlUNq72KpXptXDIrQuUnsNVSi9TeQWOOUjprwIs9hGV8Xw4pixCaR8WuT1K5QU4aB+l2Ur8z0sllAsHFU5S+hz/eZBx2+Co3YxpQtyqk1R+z4aj8s5R8iLuCca1wGFtjLkfMdn9VH6B07LPUOpDzNOMuw+Oa2HMwxCyBqh8Bxf0UDoO4TEq0Tvggo2MaQbQQ+UQXHGY0vdAI5UrNXBFwwKFaA3epPIeXHKQ0l6cprJ765Ke3IDUbmjevLRdlE5gjhqOepDCszO8ZnOglsBq2GqOUgOopxW2vqIOUM8W2OqjDlBPO2yFqAPU8xbsrJqlDlCPD3YaqQXUM18IGy9RC6hpG2wcpxZQkz8HljZRD6jrGVjJOkE9oK4LNbCwl5pAbWfWIMmj1AXq+/VGJNgSoS4wDefuwmK5r1MfmJZDN+NfWZuDTAOYnmjvrrtvWl244aEDo0wLaAhoCGgIaAhoCGgIaAhoCGgIaAhoCGgIaAgWaMQCwjQiDC+N8GInjdiJgvM04HwBsJ0GbIewn67bj5gdU3TV1A7EFe3pnaBLJnr3FEH4BzBNmqCtB3iwAAAAAElFTkSuQmCC"

/***/ }),
/* 163 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js__ = __webpack_require__(164);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _CollectionItem = __webpack_require__(165);

var _CollectionItem2 = _interopRequireDefault(_CollectionItem);

var user = __webpack_require__(22);
var bgClient = __webpack_require__(16);

exports['default'] = {
  data: function data() {
    return {
      list: [],
      loading: false,
      ended: false,
      pg: 1
    };
  },
  props: ['tab'],
  components: { CollectionItem: _CollectionItem2['default'] },
  methods: {
    scroll: function scroll(e) {
      if (e.target.scrollTop + e.target.offsetHeight - e.target.scrollHeight > -100) {
        this.load();
      }
    },
    deleteItem: function deleteItem(id) {
      var _this = this;

      user.del(id).then(function (res) {
        console.log(res);
        if (res.code === 1) {
          _this.list = _this.list.filter(function (x) {
            return x.id !== id;
          });
        }
      });
    },
    load: function load() {
      var _this2 = this;

      if (this.loading || this.ended) return;
      this.loading = true;
      user.getList(this.pg, this.tab).then(function (res) {
        console.log(res);
        _this2.pg += 1;
        _this2.loading = false;
        bgClient.get('/collection/reset');
        _this2.list = _this2.list.concat(res.data);
        if (res.data.length === 0) {
          _this2.ended = true;
        }
      });
    },
    reload: function reload() {
      this.list = [];
      this.pg = 1;
      this.ended = false;
      this.load();
    },
    init: function init() {
      if (!this.list.length) {
        this.load();
      }
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 165 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__ = __webpack_require__(545);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionItem_vue_vue_type_script_lang_js__ = __webpack_require__(166);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CollectionItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CollectionItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CollectionItem_vue_vue_type_style_index_0_id_6af99812_scoped_true_lang_less__ = __webpack_require__(548);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CollectionItem_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__["staticRenderFns"],
  false,
  null,
  "6af99812",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('6af99812')) {
      api.createRecord('6af99812', component.options)
    } else {
      api.reload('6af99812', component.options)
    }
    module.hot.accept("./CollectionItem.vue?vue&type=template&id=6af99812&scoped=true", function () {
      api.rerender('6af99812', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/CollectionItem.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 166 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js__ = __webpack_require__(167);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var _modulesAmazonGlobal = __webpack_require__(154);

exports['default'] = {
  props: ['product', 'last'],
  computed: {
    currencySymbol: function currencySymbol() {
      var s = this.product.site_id;
      if (_modulesAmazonGlobal.amazonMoney[s]) {
        return _modulesAmazonGlobal.amazonMoney[s];
      }
      return '¥';
    }
  },
  methods: {
    open: function open(link) {
      if (G.aliSite && [83, 123, 8].indexOf(parseInt(this.product.site_id)) > -1) {
        window.open(this.product.url);
        return;
      }
      window.open(link);
    },
    deleteClick: function deleteClick(e) {
      e.preventDefault();
      e.stopPropagation();
      this.$emit('delete', this.product.id);
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(558);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("62fcf785", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./biyibi.less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./biyibi.less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 169 */
/***/ (function(module, exports) {

module.exports = {"feedback":{"zh":"反馈","en":"Feedback","zh-tr":"反饋"},"content":{"zh":"反馈内容：","en":"Details:","zh-tr":"反饋內容："},"contact":{"zh":"联系方式：","en":"Contact:","zh-tr":"聯系方式："},"submit":{"zh":"提交","en":"Submit","zh-tr":"提交"},"mail":{"zh":"邮箱 / QQ","en":"E-Mail/QQ","zh-tr":"郵箱"}}

/***/ }),
/* 170 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js__ = __webpack_require__(171);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  data: function data() {
    return {
      lang: G.lang,
      selected: G.lang,
      checked: __webpack_require__(172),
      unChecked: __webpack_require__(173)
    };
  },
  methods: {
    setLang: function setLang(lang) {
      this.selected = lang;
      __webpack_require__(19).settings('lang', lang);
      setTimeout(function () {
        location.reload();
      }, 0);
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 172 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADcUlEQVRIS52WTWgVZxSGn3O+XPX6hymUQmJpmmskIan4k6appavSgkWpgmCahSC6El2JoKuC2FZRuqglEFqliaZJu+lPEqWmVly4dyEqaZArkbRKMIoiCbe5U+b7ZubOzL03FWczA/PNec95z/ueM8ICl3fxndUUZrej+jEiDajWoWYO9aYQM46aEbLLRmXz74+qhZFKL7xfN9RRKBxDdQ8iigoYAyLYZ9XS3egsqt8gK76Q90dn0vHKALwfW7ehDCCyIgpkAysYdSD27oMQgPnPOo3RnbL56rU4SALAG2rZD5xxWacDVsg+Xok9LwU0s1c6x86HIBGAd2HtFlRHbHA/w5CKMGM/QJR9Cix+RqWAqflQOsZsJRbA+6HtNebn7mB0lc08HiikJZGtD2CCJAL6kiDTZJeslXWjMw7g/JoziB4oNTBVgSvf8R4Bhs1OVxv2y5yW9suHxWb/79wkKpko8xepIg60qBZWrYOZ605tPr0isyw19eL1rdmH8K1TTJBNmvd4w9MyXd4Ib52E6asw+V0QPKjU6G7x+nK/IPJJgvuqFYR+COT56nvQegz+GYZ8T4lC+z1+NT/5FdxCpCVpoFTjrOZD/QfvGrqh6QBMDkK+t9yALskb4n2fm0GlXD3LV8PilfDsr8DBAYUmA21HoX4b5PsgH9BSScZGH/oUPUckm7C/fzi3C9YfgZtfQX7IqWdxLWw8Ba9sgLtnIX8uNjYqqErliV/BBKq5hLHCRm76DN7cCVNjcH8U2g7D0nqY6HXZO7U48LgxQ7EYve0D/IHqB64pMSXZQwbaj8PrW0vjZbwH8v3lnCeNFswuuSRef+4QyOkyB0fOrYGOE1D3Edz+Gu5dqGK2CqPEmIPiDTQ1UmTCjo2oglTJNRmobYMnNwPOE1O0MlXGFMmYN9yo6G8aQKW76nheaB+kjVdS01l5e2yfAxhsbqBYvAW+mgIzxT98oX0QzCrnl6dkljXLxt+mSuN6oKULKQ5GvXiZfeCSK6Jmu3RcHo7GdSgRb6j5CJ58+dL7wAbXg9J5pads4ZRAWrtQ7xyq2eSCiTXe0pfeB/qYjOmWd/+8VHVlRiA/r2+gOP85Kp9aJy20D4wWUO1lUea4dF558L9LP37AG2lvpDC/gxrZYn9bROswzKHmb1THMTJCdslwpcBhnP8A1yDBtI3BrUQAAAAASUVORK5CYII="

/***/ }),
/* 173 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAVFBMVEUAAAD////q6urr6+vd3d3h4eHj4+Pd3d3e3t7c3Nzd3d3c3Nzc3Nzc3Nzd3d3d3d3c3Nzc3Nzc3Nzc3Nzc3Nzb29vc3Nzb29vb29vc3Nzc3Nzb29sqcPFAAAAAG3RSTlMABAwNDxEbJiczNFBRdoaUn7u9vtnk7vLz9/7YVHZ/AAAAtElEQVQoz42T2xKDIAxEV6riFfCCFfb//7MPrbZWmpo35kwym80CXCrdD/O6zkOvT6geuddYH1BmIxfXaqV05xZGm71ZMTGYfHvlJnAq9r6Jvvkc1HhOW6+lL48KSk/70hJD862vCfGpaqQ5L2Y4AkDFJT/DfKEG0NOlPHHsAQxsU7DjAGCmTrrJGcBKlYKK62944/3fWFGQuIpogmifbLx4MvnYYkzkgMnRBIBqC3V17RM8AEhvD/Hudt8iAAAAAElFTkSuQmCC"

/***/ }),
/* 174 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime, $) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _vuex = __webpack_require__(24);

var _PriceProtectAuthLoginRequestVue = __webpack_require__(176);

var _PriceProtectAuthLoginRequestVue2 = _interopRequireDefault(_PriceProtectAuthLoginRequestVue);

var _PriceProtectJdLoginVue = __webpack_require__(580);

var _PriceProtectJdLoginVue2 = _interopRequireDefault(_PriceProtectJdLoginVue);

var _JdItemListVue = __webpack_require__(586);

var _JdItemListVue2 = _interopRequireDefault(_JdItemListVue);

var _BjgBottomWindowVue = __webpack_require__(67);

var _BjgBottomWindowVue2 = _interopRequireDefault(_BjgBottomWindowVue);

var _commonComponentsGwdAVue = __webpack_require__(190);

var _commonComponentsGwdAVue2 = _interopRequireDefault(_commonComponentsGwdAVue);

var _mixinsBottomWindowMixin = __webpack_require__(68);

var _mixinsBottomWindowMixin2 = _interopRequireDefault(_mixinsBottomWindowMixin);

var user = __webpack_require__(22);
var client = __webpack_require__(16);
var cnzz = __webpack_require__(12);
// const store = require('../store/index')
// window.store = store

exports['default'] = {
  components: { PriceProtectAuthLoginRequest: _PriceProtectAuthLoginRequestVue2['default'], PriceProtectJdLogin: _PriceProtectJdLoginVue2['default'], JdItemList: _JdItemListVue2['default'], GwdA: _commonComponentsGwdAVue2['default'], BjgBottomWindow: _BjgBottomWindowVue2['default'] },
  mixins: [_mixinsBottomWindowMixin2['default']],
  data: function data() {
    return {
      hide: G.site !== '360buy',
      isJdLogin: false,
      userAgreed: false,
      functionOpened: false,
      forceOpen: location.href.indexOf('forceOpen') > -1,
      settingOpen: false,
      hintShow: true,
      notifyCount: 0,
      recent: false
    };
  },
  computed: (0, _vuex.mapState)({
    userName: function userName(state) {
      return state.user.userName;
    },
    user: function user(state) {
      return state.user.userLogin;
    },
    hasWx: function hasWx(state) {
      return state.user.userHasWx;
    },
    enabled: function enabled(state) {
      return state.user.priceProtectEnabled;
    }
  }),
  methods: {
    ppClick: function ppClick() {
      if (!(this.user && this.userAgreed && this.enabled && this.isJdLogin) && !this.recent) {
        window.open('https://pcsitepp-fm.jd.com/');
      }
      if (this.recent) {
        this.recent = false;
      }
    },
    setEnable: function setEnable() {
      this.enable();
      this.userAgreed = true;
      this.hintShow = false;
    },
    checkUserLogin: function checkUserLogin() {
      return regeneratorRuntime.async(function checkUserLogin$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(user.init());

          case 2:
            client.get('/getStorage', { key: 'enabled' }, function (data) {
              _this.$store.commit('user/setState', {
                priceProtectEnabled: data
              });
              __webpack_require__(4).setMet('PriceProtectReady');
            });
            if (this.user) {
              this.checkUserAgreed();
            } else {
              client.get('/clearUserName');
            }

          case 4:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    disable: function disable(e) {
      this.recent = true;
      e.preventDefault();
      this.settingOpen = false;
      cnzz.log('价格保护', '用户手动关闭');
      client.get('/setStorage', { enabled: false });
      this.$store.commit('user/setState', {
        priceProtectEnabled: false
      });
    },
    enable: function enable() {
      cnzz.log('价格保护', '用户手动开启');
      client.get('/setStorage', { enabled: true });
      this.$store.commit('user/setState', {
        priceProtectEnabled: true
      });
    },
    mouseOver: function mouseOver() {
      this.forceOpen = false;
      this.notifyCount = 0;
      client.get('/clearNotifyCount');
    },
    checkUserAgreed: function checkUserAgreed() {
      var _this2 = this;

      client.get('/getStorage', { key: 'userAgreed' }).then(function (result) {
        _this2.userAgreed = result;
      });
    },
    checkOpened: function checkOpened() {
      var _this3 = this;

      client.get('/getStorage', { key: 'userOpened' }).then(function (result) {
        _this3.userOpened = result;
      });
    },
    checkJdLogin: function checkJdLogin() {
      var _this4 = this;

      client.get('/getLoginStatus', {}, function (res) {
        _this4.isJdLogin = res;
        if ($('a.nickname').text() && !res) {
          _this4.isJdLogin = true;
          client.get('/setLoginStatus', {
            loginStatus: true
          });
        }
      });
    },
    listenOpen: function listenOpen() {
      var _this5 = this;

      document.body.addEventListener('bjgWindowOpen', function () {
        _this5.forceOpen = true;
        _this5.$nextTick(function () {
          setTimeout(function () {
            _this5.$refs.jdItemList.syncNow();
          }, 500);
        });
      });
    }
  },
  mounted: function mounted() {
    var _this6 = this;

    this.checkUserLogin();
    this.checkJdLogin();
    this.listenOpen();
    client.get('/getStorage', { key: 'hintShowed' }).then(function (res) {
      if (res) {
        _this6.hintShow = false;
      } else {
        _this6.hintShow = true;
        client.get('/setStorage', { hintShowed: true });
      }
    });
    client.get('/getNotifyCount', {}).then(function (res) {
      _this6.notifyCount = parseInt(res);
    });
    // this.$el.parentElement.addEventListener('DOMSubtreeModified', () => {
    //   if (window.innerWidth - this.$el.offsetLeft <= 564) {
    //     this.positionStyle = 'right: -1'
    //   }
    // })
    var k = setInterval(function () {
      _this6.checkJdLogin();
    }, 3000);
    setTimeout(function () {
      clearInterval(k);
    }, 9000);
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5), __webpack_require__(1)))

/***/ }),
/* 176 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__ = __webpack_require__(575);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__ = __webpack_require__(177);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PriceProtectAuthLoginRequest_vue_vue_type_style_index_0_id_5d50758c_lang_less__ = __webpack_require__(577);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__["staticRenderFns"],
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('5d50758c')) {
      api.createRecord('5d50758c', component.options)
    } else {
      api.reload('5d50758c', component.options)
    }
    module.hot.accept("./PriceProtectAuthLoginRequest.vue?vue&type=template&id=5d50758c", function () {
      api.rerender('5d50758c', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/PriceProtectAuthLoginRequest.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 177 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__ = __webpack_require__(178);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 178 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

var checkedImg = __webpack_require__(172);
var unCheckedImg = __webpack_require__(173);
var client = __webpack_require__(16);
var cnzz = __webpack_require__(12);

exports['default'] = {
  props: ['login', 'center'],
  data: function data() {
    return {
      checked: true
    };
  },
  computed: {
    img: function img() {
      return this.checked ? checkedImg : unCheckedImg;
    }
  },
  methods: {
    goIntro: function goIntro() {
      window.open('https://www.bijiago.com/priceProtectIntro/');
    },
    submit: function submit(e) {
      var _this = this;

      e.preventDefault();
      if (!this.checked) return;
      cnzz.log('价格保护' + (this.center ? '中心按钮' : ''), this.login ? '用户同意' : '用户登录');
      client.get('/setStorage', {
        userAgreed: true,
        enabled: true
      }).then(function () {
        if (_this.login) {
          _this.$emit('userAgreed');
          return;
        }
        __webpack_require__(22).goLogin(true);
        //location.href = `https://i.bijiago.com/UserUnion/Authorize?utype=2&app_platform=ext&_referer=${encodeURIComponent(location.href + '#forceOpen')}`
      });
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 179 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js__ = __webpack_require__(180);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 180 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  methods: {
    doJdLogin: function doJdLogin() {
      if (G.site !== '360buy') {
        location.href = 'https://pcsitepp-fm.jd.com/';
      } else {
        location.href = 'https://passport.jd.com/new/login.aspx?ReturnUrl=' + encodeURIComponent(location.href.replace('#crumb-wrap', '') + '#forceOpen');
      }
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 181 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 182 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js__ = __webpack_require__(183);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 183 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _SpinLoadingVue = __webpack_require__(594);

var _SpinLoadingVue2 = _interopRequireDefault(_SpinLoadingVue);

var _SectionTitleVue = __webpack_require__(600);

var _SectionTitleVue2 = _interopRequireDefault(_SectionTitleVue);

var _ProductItemVue = __webpack_require__(606);

var _ProductItemVue2 = _interopRequireDefault(_ProductItemVue);

var _commonComponentsGwdAVue = __webpack_require__(190);

var _commonComponentsGwdAVue2 = _interopRequireDefault(_commonComponentsGwdAVue);

var client = __webpack_require__(16);
var cnzz = __webpack_require__(12);

function sleep(time) {
  return new Promise(function (resolve) {
    setTimeout(function () {
      return resolve();
    }, time);
  });
}

exports['default'] = {
  components: { SpinLoading: _SpinLoadingVue2['default'], SectionTitle: _SectionTitleVue2['default'], ProductItem: _ProductItemVue2['default'], GwdA: _commonComponentsGwdAVue2['default'] },
  data: function data() {
    return {
      wait: 1000,
      protectingItems: [],
      outdatedItems: [],
      status: 'syncing' // syncing, complete, needLogin
    };
  },
  methods: {
    syncNow: function syncNow() {
      var data;
      return regeneratorRuntime.async(function syncNow$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (!(location.href.indexOf('https://pcsitepp-fm.jd.com/?goDown') > -1)) {
              context$1$0.next = 2;
              break;
            }

            return context$1$0.abrupt('return');

          case 2:
            cnzz.log('价格保护', '同步按钮点击');
            this.status = 'syncing';
            context$1$0.next = 6;
            return regeneratorRuntime.awrap(client.get('/getDpItemList', {
              reSync: true
            }));

          case 6:
            data = context$1$0.sent;

            this.process(data);

          case 8:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    goIntro: function goIntro() {
      window.open('https://www.bijiago.com/priceProtectIntro/');
    },
    doLogin: function doLogin() {
      if (G.site !== '360buy') {
        location.href = 'https://pcsitepp-fm.jd.com/';
      } else {
        location.href = 'https://passport.jd.com/new/login.aspx?ReturnUrl=' + encodeURIComponent(location.href.replace('#crumb-wrap', '') + '#forceOpen');
      }
    },
    process: function process(data) {
      return regeneratorRuntime.async(function process$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (data) {
              context$1$0.next = 9;
              break;
            }

            if (!(navigator.userAgent.toLowerCase().indexOf('firefox') > -1)) {
              context$1$0.next = 7;
              break;
            }

            context$1$0.next = 4;
            return regeneratorRuntime.awrap(sleep(this.wait));

          case 4:
            this.wait += 1000;
            this.load();
            return context$1$0.abrupt('return');

          case 7:
            this.syncNow();
            return context$1$0.abrupt('return');

          case 9:
            if (!data.needLogin) {
              context$1$0.next = 15;
              break;
            }

            if (!(this.protectingItems.length || this.outdatedItems.length)) {
              context$1$0.next = 13;
              break;
            }

            this.status = 'needLogin';
            return context$1$0.abrupt('return');

          case 13:
            this.$emit('needLogin');
            return context$1$0.abrupt('return');

          case 15:
            this.status = 'complete';
            this.protectingItems = [];
            this.outdatedItems = [];
            data.forEach(function (order) {
              var time = order.ctime;
              order.related.forEach(function (item) {
                item.ctime = time;
                // item.successPrice = 160
                // this.protectingItems.push(item)
                if (item.inTime) {
                  _this.protectingItems.push(item);
                } else {
                  _this.outdatedItems.push(item);
                }
              });
            });

          case 19:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    load: function load() {
      var data;
      return regeneratorRuntime.async(function load$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (!(location.href.indexOf('https://pcsitepp-fm.jd.com/?goDown') > -1)) {
              context$1$0.next = 2;
              break;
            }

            return context$1$0.abrupt('return');

          case 2:
            context$1$0.next = 4;
            return regeneratorRuntime.awrap(client.get('/getDpItemList', {}));

          case 4:
            data = context$1$0.sent;

            this.process(data);
            if (location.href.indexOf('forceOpen') > -1) {
              this.syncNow();
              history.replaceState({}, document.title, location.href.replace('#forceOpen', ''));
            }

          case 7:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    }
  },
  watch: {},
  mounted: function mounted() {
    this.load();
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 184 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js__ = __webpack_require__(185);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 185 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = {};
module.exports = exports["default"];

/***/ }),
/* 186 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js__ = __webpack_require__(187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 187 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = {};
module.exports = exports["default"];

/***/ }),
/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 189 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['product', 'line', 'outdated'],
  methods: {
    goLink: function goLink() {
      window.open('https://pcsitepp-fm.jd.com/');
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__GwdA_vue_vue_type_template_id_15561ebb__ = __webpack_require__(613);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__GwdA_vue_vue_type_script_lang_js__ = __webpack_require__(191);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__GwdA_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__GwdA_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);





/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__GwdA_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__GwdA_vue_vue_type_template_id_15561ebb__["render"],
  __WEBPACK_IMPORTED_MODULE_0__GwdA_vue_vue_type_template_id_15561ebb__["staticRenderFns"],
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('15561ebb')) {
      api.createRecord('15561ebb', component.options)
    } else {
      api.reload('15561ebb', component.options)
    }
    module.hot.accept("./GwdA.vue?vue&type=template&id=15561ebb", function () {
      api.rerender('15561ebb', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/GwdA.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js__ = __webpack_require__(192);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 192 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['href', 'target'],
  methods: {
    onClick: function onClick() {
      if (G.site === 'suning') {
        if (this.target === '_blank') {
          window.open(this.href);
        } else {
          location.href = this.href;
        }
      }
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 193 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js__ = __webpack_require__(194);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 194 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _vuex = __webpack_require__(24);

var _PriceProtectAuthLoginRequestVue = __webpack_require__(176);

var _PriceProtectAuthLoginRequestVue2 = _interopRequireDefault(_PriceProtectAuthLoginRequestVue);

var cnzz = __webpack_require__(12);
var client = __webpack_require__(16);
exports['default'] = {
  components: { PriceProtectAuthLoginRequest: _PriceProtectAuthLoginRequestVue2['default'] },
  data: function data() {
    return {
      ready: false
    };
  },
  methods: {
    init: function init() {
      return regeneratorRuntime.async(function init$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(__webpack_require__(4).met('PriceProtectReady'));

          case 2:
            this.ready = true;
            if (!this.user || !this.enabled) {
              cnzz.log('价格保护中心按钮', '引导提示展示');
            }

          case 4:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    setEnable: function setEnable() {
      this.enable();
      document.body.dispatchEvent(new Event('bjgWindowOpen'));
    },
    over: function over() {
      cnzz.logOnce('价格保护中心按钮', '展示下拉框');
    },
    enable: function enable() {
      cnzz.log('价格保护', '用户手动开启');
      client.get('/setStorage', { enabled: true });
      this.$store.commit('user/setState', {
        priceProtectEnabled: true
      });
    }
  },
  computed: (0, _vuex.mapState)({
    userName: function userName(state) {
      return state.user.userName;
    },
    user: function user(state) {
      return state.user.userLogin;
    },
    hasWx: function hasWx(state) {
      return state.user.userHasWx;
    },
    enabled: function enabled(state) {
      return state.user.priceProtectEnabled;
    }
  }),
  mounted: function mounted() {
    this.init();
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 195 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js__ = __webpack_require__(196);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 196 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _BjgBottomWindow = __webpack_require__(67);

var _BjgBottomWindow2 = _interopRequireDefault(_BjgBottomWindow);

var _CollectionItem = __webpack_require__(165);

var _CollectionItem2 = _interopRequireDefault(_CollectionItem);

var _mixinsBottomWindowMixin = __webpack_require__(68);

var _mixinsBottomWindowMixin2 = _interopRequireDefault(_mixinsBottomWindowMixin);

var request = __webpack_require__(3);
var bgClient = __webpack_require__(16);

exports['default'] = {
  components: { BjgBottomWindow: _BjgBottomWindow2['default'], CollectionItem: _CollectionItem2['default'] },
  mixins: [_mixinsBottomWindowMixin2['default']],
  data: function data() {
    return {
      list: [],
      loading: false,
      loaded: false,
      historyDpIdList: []
    };
  },
  methods: {
    transText: function transText(text) {
      var map = {
        '浏览历史': '瀏覽歷史',
        '清空历史': '清空歷史',
        '暂无浏览历史记录': '暫無瀏覽歷史記錄'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    clearAll: function clearAll() {
      this.list = [];
      this.saveHistory([]);
    },
    deleteItem: function deleteItem(id) {
      this.list = this.list.filter(function (x) {
        return x.id !== id;
      });
      this.saveHistory(this.historyDpIdList.filter(function (x) {
        return x !== id;
      }));
    },
    saveHistory: function saveHistory(newList) {
      bgClient.get('/setStorage', {
        history: JSON.stringify(newList)
      }, function (data) {});
    },
    addCurrent: function addCurrent() {
      var historyDpIdList, dpId, res, newList;
      return regeneratorRuntime.async(function addCurrent$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            context$1$0.next = 2;
            return regeneratorRuntime.awrap(bgClient.get('/getStorage', { key: 'history' }));

          case 2:
            historyDpIdList = context$1$0.sent;

            if (!historyDpIdList) {
              historyDpIdList = [];
            }
            this.historyDpIdList = historyDpIdList;
            context$1$0.next = 7;
            return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

          case 7:
            dpId = context$1$0.sent;
            context$1$0.next = 10;
            return regeneratorRuntime.awrap(request.post('https://i.bijiago.com/UserHistory/Add?app_platform=ext', {
              dp_id: dpId
            }, true));

          case 10:
            res = context$1$0.sent;

            if (!(res.code !== 1)) {
              context$1$0.next = 13;
              break;
            }

            return context$1$0.abrupt('return');

          case 13:
            newList = historyDpIdList.filter(function (x) {
              return x !== dpId;
            });

            newList.unshift(dpId);
            newList = newList.filter(function (item, idx) {
              return idx < 30;
            });
            this.saveHistory(newList);

          case 17:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    },
    startLoad: function startLoad() {
      var historyDpIdList, result, result2;
      return regeneratorRuntime.async(function startLoad$(context$1$0) {
        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (!(this.loading || this.list.length > 0 || this.loaded)) {
              context$1$0.next = 2;
              break;
            }

            return context$1$0.abrupt('return');

          case 2:
            this.loading = true;
            historyDpIdList = this.historyDpIdList;

            if (historyDpIdList.length) {
              context$1$0.next = 7;
              break;
            }

            this.loaded = true;
            return context$1$0.abrupt('return');

          case 7:
            context$1$0.next = 9;
            return regeneratorRuntime.awrap(request.post('https://i.bijiago.com/UserHistory/List?app_platform=ext&union=' + G.union, {
              dp_ids: historyDpIdList.join(',')
            }, true));

          case 9:
            result = context$1$0.sent;

            if (!(historyDpIdList.length > 20)) {
              context$1$0.next = 15;
              break;
            }

            context$1$0.next = 13;
            return regeneratorRuntime.awrap(request.post('https://i.bijiago.com/UserHistory/List?app_platform=ext&union=' + G.union, {
              dp_ids: historyDpIdList.slice(20).join(',')
            }, true));

          case 13:
            result2 = context$1$0.sent;

            result.data = result.data.concat(result2.data);

          case 15:
            this.list = result.data.map(function (item) {
              item.id = item.dp_id;
              return item;
            });
            this.loaded = true;
            this.loading = false;

          case 18:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    }
  },
  mounted: function mounted() {
    this.addCurrent();
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 197 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {

var _this = this;

var detect = __webpack_require__(44);
var priceParser = __webpack_require__(36);
var request = __webpack_require__(3);
var gzip = __webpack_require__(45);

var seprator = ':';

var quanobj = {
  'manjian': {},
  'zhe': {},
  'quanmanjian': {},
  'quanmeimanjian': {},
  'manzhe': {}
},
    promoobj = {
  'manjian': {},
  'meimanjian': {},
  'manzhe': {},
  'manzhe2': {},
  'zhe': {}
};
var disPrice = undefined,
    callbacks = undefined,
    disPrice2 = {};
var coudanObj = {},
    xdljObj = {},
    vipPromo = "";

var dingjinzhekou = {
  "suning": function suning() {
    var dj = Number($('#mainPrice dt:contains("定金") +dd .small-price').text().replace('¥', ''));
    var djdk = $('.deposit-info-small').text().match(/[0-9.]+/);
    if (djdk) djdk = Number(djdk[0]);
    if (dj && djdk) {
      return djdk - dj;
    } else {
      return 0;
    }
  },
  "360buy": function buy() {
    var dj = $('#pingou .summary-price div.dt:contains("定")+.dd .price').text();
    var djdk = $('#pingou .summary-price div.dt:contains("定")+.dd .yy-category').text().match(/[0-9.]+/);
    if (djdk) djdk = Number(djdk[0]);
    if (dj && djdk) {
      return djdk - dj;
    } else {
      return 0;
    }
  },
  'tmall': function tmall() {
    return false;
  }
};

var extractAliPromoText = function extractAliPromoText() {
  var text = $('[class^=CouponInfo--couponText]').text();
  return text ? text.split(' ') : [];
};

var sitePattern = {
  "360buy": function buy() {
    var quan = undefined,
        promo = [];
    // if ($('#pingou .summary-price>.dt').text().replace(/\s/g, '').indexOf("定金") > -1) {
    //   return {
    //     quan: quan,
    //     promo: promo
    //   }
    // }
    var quandom = $('#summary-quan:visible');
    var promodom = $('#prom-one .J-prom:visible');
    if (!promodom.length) {
      promodom = $('#summary-promotion .J-prom:visible');
    }
    if (quandom.length > 0) {
      var arrs = quandom.find('span.' + 'quan-item span.text');
      quan = Array.prototype.map.call(arrs, function (e) {
        return {
          text: $(e).text(),
          title: $(e).parents('.quan-item').attr('title')
        };
      }).filter(function (x) {
        if (x.title) {
          var re = new RegExp('有效期([\\d\\-: ]*)至([\\d\\-: ]*)').exec(x.title);
          if (re && re[1]) {
            if (new Date(re[1].trim()) > new Date()) {
              console.warn('filter early coupon', x);
              return false;
            }
          }
        }
        return true;
      }).map(function (x) {
        return x.text;
      });
    }
    if (promodom.length > 0) {
      var arrs = promodom.find('.prom-item');
      var _process = function _process(e) {
        var strt = $(e).find('.hl_red_bg').text();
        if (strt.indexOf('跨自营/店铺满减进行中') > -1 || strt.indexOf('活动预告') > -1) return '';else {
          var text = $(e).find('.hl_red').text();
          if (!text) {
            text = $(e).find('.mj_red').text();
          }
          if (!text) {
            return '';
          }
          var prepend = '';
          if (strt) {
            prepend = strt + '--';
          }
          var url = $(e).find('a').attr('href');
          if (url) {
            return url + seprator + prepend + text;
          } else {
            return prepend + text;
          }
        }
      };
      promo = Array.prototype.map.call(arrs, _process).filter(function (x) {
        return x;
      });
      // let promo2 = Array.prototype.map.call(arrs2, process)
      // promo = promo.concat(promo2)
    }
    var fanPrice = $('.p-price-fans .price').text();

    if (fanPrice && !$('.fans-price').hasClass('hide')) {
      promo.push('粉丝价' + fanPrice);
    }
    return {
      quan: quan,
      promo: promo
    };
  },
  "suning": function suning() {
    var quan = undefined,
        promo = undefined;
    var quandom = $('#freeCouponTitle .more-juan .p-quan2');
    var promodom = $('.promo-list li>label:contains("满 减")+i+p');
    if (quandom.length > 0) {
      var arrs = quandom.find('span.p-quan-white');
      quan = Array.prototype.map.call(arrs, function (e) {
        var txt = $(e).text();
        if (txt.match(/每\d+用\d+/)) {
          txt = txt + '最多可减' + $(e).prev().prev().text();
        }
        return txt;
      });
    }
    if (promodom.length > 0) {
      var arrs = promodom;
      promo = Array.prototype.map.call(arrs, function (e) {
        var txt = $(e).text();
        if ($(e).children().text()) {
          var txt2 = $(e)[0].childNodes[0].nodeValue;
          if (txt2) {
            txt = txt2;
          }
        }
        return txt;
      });
    }
    return {
      quan: quan,
      promo: promo
    };
  },
  'tmall': function tmall() {
    var promo = [],
        coupon = [];
    $('.tm-shopPromotion-title dd').each(function (idx, item) {
      promo.push(item.innerText);
    });
    var tbNew = $('[class^=PromotionNew--caption]');
    if (tbNew.length) {
      (function () {
        var z = [];
        var texts = tbNew.toArray().map(function (x) {
          return x.innerText;
        });
        texts.forEach(function (item) {
          if (item.indexOf('，') > -1) {
            z = z.concat(item.split('，'));
          } else {
            z.push(item);
          }
        });
        z.forEach(function (item) {
          if (item.indexOf('券') > -1) {
            coupon.push(item);
          } else {
            promo.push(item);
          }
        });
      })();
    }
    var aliPromoText = extractAliPromoText();
    aliPromoText.forEach(function (item) {
      if (item.indexOf('券') > -1) {
        coupon.push(item);
      } else {
        promo.push(item);
      }
    });
    return {
      promo: promo,
      quan: coupon
    };
  },
  'taobao': function taobao() {
    var promo = [],
        coupon = [];
    if ($('.tb-other-discount').length) {
      promo.push($('.tb-other-discount').text().trim());
    }
    var aliPromoText = extractAliPromoText();
    aliPromoText.forEach(function (item) {
      if (item.indexOf('券') > -1) {
        coupon.push(item);
      } else {
        promo.push(item);
      }
    });
    return {
      promo: promo,
      coupon: coupon
    };
  },
  'dangdang': function dangdang() {
    var coupons = $('#coupon-list li a').toArray().map(function (item) {
      return item.innerText.trim();
    });
    return {
      quan: coupons,
      promo: $('.rule .text').toArray().map(function (item) {
        return item.innerText.trim();
      })
    };
  }
};
var pingxingcelue = function pingxingcelue() {
  var arr = ["360buy"];
  if (arr.indexOf(G.site) > -1) {
    return true;
  }
  return false;
};
var getPromoInfoNum = function getPromoInfoNum(pagePrice, arr, type) {
  var infoObj = promoobj;
  var dishead = "促: ";
  if (type === 'quan') {
    infoObj = quanobj;
    dishead = "券: ";
  }
  if (!disPrice) disPrice = {};
  for (var j = 0; j < arr.length; j++) {
    var item = arr[j];
    var _reg0 = /且满[￥￥]?([.\d]{2,})元?(?:售价)?[^件]{0,3}?可?立?减[￥￥]?([.\d]+)/;
    if (_reg0.test(item)) {
      continue;
    }
    var reg00 = /每(\d+)用(\d+)最多可减.?([1-9]\d+)/;
    if (reg00.test(item) && type === 'quan') {
      var qmmjobj = infoObj['quanmeimanjian'];
      var match = item.match(reg00);
      if (match[3]) {
        qmmjobj[match[1] + '-' + match[2] + '-' + match[3]] = dishead + item;
      } else {
        qmmjobj[match[1] + '-' + match[2]] = dishead + item;
      }
      continue;
    }

    var reg0 = /每满([.\d]{2,})元?.{0,3}?可?减([.\d]+)元现金(?:(?:，|,)(?:最多可减|)([.\d]+))?/;
    if (reg0.test(item)) {
      var mmjobj = infoObj['meimanjian'];
      var match = item.match(reg0);
      if (match[3]) {
        mmjobj[match[1] + '-' + match[2] + '-' + match[3]] = dishead + item;
      } else {
        mmjobj[match[1] + '-' + match[2]] = dishead + item;
      }
      continue;
    }

    var reg = /(?:[^每]|^)满[￥￥]?([.\d]{1,})元?(?:售价)?[^件]{0,3}?可?立?减[￥￥]?([.\d]+%?)元?/;
    var _reg = /(?:[^每]|^)满[￥￥]?([.\d]{1,})元?(?:售价)?[^件]{0,3}?可?立?减[￥￥]?([.\d]+%?)元?/g;
    var mjobj = infoObj['manjian'];
    if (reg.test(item)) {
      var _match = item.match(_reg);
      if (_match.length > 1) {
        for (var i = 0; i < _match.length; i++) {
          var m = _match[i].match(reg);
          mjobj[m[1] + '-' + m[2]] = dishead + _match[i].trim().replace(/^[,，;；]/, '');
        }
      } else {
        var match = item.match(reg);
        mjobj[match[1] + '-' + match[2]] = dishead + item;
      }
      continue;
    }
    var reg1 = /满([.\d]{2,})享([.\d]+)折/;
    var mzobj = infoObj['manzhe'];
    if (reg1.test(item)) {
      var match = item.match(reg1);
      mzobj[match[1] + '-' + match[2]] = dishead + item;
      continue;
    }
    var reg2 = /金额达到([.\d]{2,}).*?享受([.\d]+)/;
    if (reg2.test(item)) {
      var match = item.match(reg2);
      mjobj[match[1] + '-' + match[2]] = dishead + item;
      continue;
    }
    var reg3 = /([.\d]{2,})\-([.\d]+)/;
    if (reg3.test(item)) {
      var match = item.match(reg3);
      mjobj[match[1] + '-' + match[2]] = dishead + item;
      continue;
    }

    var zkobj = infoObj['zhe'];
    var reg4 = /满(\d+)件.{0,4}打([.\d]+)折/;
    var _reg4 = /满(\d+)件.{0,4}打([.\d]+)折/g;

    if (reg4.test(item)) {
      var _match = item.match(_reg4);
      if (_match.length > 1) {
        for (var i = 0; i < _match.length; i++) {
          var m = _match[i].match(reg4);
          zkobj[m[1] + '-' + m[2]] = dishead + _match[i];
        }
      } else {
        var match = item.match(reg4);
        zkobj[match[1] + '-' + match[2]] = dishead + item;
      }
      continue;
    }

    var reg4_1 = /满(\d+)件([.\d]+)折/;
    var _reg4_1 = /满(\d+)件([.\d]+)折/g;

    if (reg4_1.test(item)) {
      var _match = item.match(_reg4_1);
      if (_match.length > 1) {
        for (var i = 0; i < _match.length; i++) {
          var m = _match[i].match(reg4_1);
          zkobj[m[1] + '-' + m[2]] = dishead + _match[i];
        }
      } else {
        var match = item.match(reg4_1);
        zkobj[match[1] + '-' + match[2]] = dishead + item;
      }
      continue;
    }

    var quanmj = infoObj['quanmanjian'];
    var reg5 = /满?(\d+)(?:减|用|可用|可减)(\d+)/;
    if (reg5.test(item)) {
      var match = item.match(reg5);
      quanmj[match[1] + '-' + match[2]] = dishead + item;
      continue;
    }

    var mz2Obj = infoObj['manzhe2'];
    var reg6 = /满(\d)件.{1,4}减最低1件商品价格/;
    if (reg6.test(item)) {
      var match = item.match(reg6);
      mz2Obj[match[1]] = dishead + item;
      continue;
    }
  }

  for (var pattern in infoObj) {
    switch (pattern) {
      case "manjian":
        for (var mjitem in infoObj[pattern]) {
          var mjarr = mjitem.split('-');
          // 如果计算的是优惠券且到手价里有促销活动的价格数据   会在到手价的基础上进行计算
          if (type === "quan" && Object.keys(disPrice).length > 0) {
            for (var dis in disPrice) {
              // 京东使用平行式门槛
              // jd 不凑单条件
              var jdtj = pingxingcelue() && xdljObj[dis] && Number(mjarr[0]) <= pagePrice;
              // jd 凑单条件
              var jdcdtj = pingxingcelue() && coudanObj[dis] && coudanObj[dis]["tt1"] > Number(mjarr[0]);
              // 到手价满足起减点
              if (jdtj || Number(mjarr[0]) <= Number(dis) && xdljObj[dis]) {
                var pPrice = Number(dis) - Number(mjarr[1]);
                if (xdljObj[dis]) xdljObj[pPrice] = true;
                disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mjitem]]);
                // 促销活动需要凑单  凑单计算优惠之后的价格大于起减点  或者平行策略  促销活动凑单之后大于优惠券起减点
              } else if (coudanObj[dis] && coudanObj[dis]["tt1"] - coudanObj[dis]["tt2"] > Number(mjarr[0]) || jdcdtj) {
                  var pPrice = undefined;
                  if (coudanObj[dis]["type"] === "manzhe2") {
                    // manzhe2 满多少件减一件商品价格
                    if (pingxingcelue()) {
                      if (coudanObj[dis]["tt1"] >= Number(mjarr[0])) {
                        pPrice = (coudanObj[dis]["tt1"] - Number(mjarr[1]) - pagePrice) / coudanObj[dis]["t2"];
                      } else {
                        var p1 = coudanObj[dis]["tt1"] * (Number(mjarr[1]) / Number(mjarr[0]));
                        pPrice = (coudanObj[dis]["tt1"] - pagePrice - p1) / coudanObj[dis]["t2"];
                      }
                    } else {
                      var price1 = coudanObj[dis]["t1"] > Number(mjarr[0]) ? coudanObj[dis]["t1"] : Number(mjarr[0]);
                      pPrice = (price1 - Number(mjarr[1])) / coudanObj[dis]["t2"];
                    }
                  } else if (coudanObj[dis]["type"] === "zhe") {
                    // 满多少件打多少折
                    if (pingxingcelue()) {
                      pPrice = (coudanObj[dis]["t1"] * coudanObj[dis]["t4"] - Number(mjarr[1])) / coudanObj[dis]["t3"];
                    } else {
                      pPrice = (coudanObj[dis]["t1"] * coudanObj[dis]["t4"] - Number(mjarr[1])) / coudanObj[dis]["t3"];
                    }
                  } else if (coudanObj[dis]["type"] === "manzhe") {
                    // 满多少元打多少折
                    var price1 = coudanObj[dis]["t1"] - coudanObj[dis]["t2"];
                    pPrice = (price1 - Number(mjarr[1])) / (coudanObj[dis]["t1"] / pagePrice);
                  } else {
                    pPrice = (coudanObj[dis]["t1"] - coudanObj[dis]["t2"] - Number(mjarr[1])) / (coudanObj[dis]["t1"] / pagePrice);
                  }
                  pPrice = pPrice.toFixed(4);
                  coudanObj[pPrice] = true;
                  disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mjitem]]);
                  // 折扣力度大于20% 或者 到手价不低于起减点90%  不管促销活动是否凑单  到优惠券计算的时候都不满足条件 都需要凑单
                } else if (Number(mjarr[1]) / Number(mjarr[0]) > 0.2 || dis / Number(mjarr[0]) > 0.9 || coudanObj[dis] && (coudanObj[dis]["tt1"] - coudanObj[dis]["tt2"]) / Number(mjarr[0]) > 0.9 || pingxingcelue() && coudanObj[dis] && coudanObj[dis]["tt1"] / Number(mjarr[0]) > 0.9 || pingxingcelue() && pagePrice / Number(mjarr[0]) > 0.9) {
                    var pPrice = undefined;
                    if (xdljObj[dis] && xdljObj[dis]["type"] === "meimanjian") {
                      //每满减
                      if (pingxingcelue()) {
                        pPrice = xdljObj[dis]["lastp"] - Number(mjarr[1]) * (pagePrice / Number(mjarr[0]));
                      } else {
                        pPrice = xdljObj[dis]["lastp"] - Number(mjarr[1]) * (xdljObj[dis]["lastp"] / Number(mjarr[0]));
                      }
                    } else if (xdljObj) {
                      if (pingxingcelue()) {
                        pPrice = dis - Number(mjarr[1]) * (pagePrice / Number(mjarr[0]));
                      } else {
                        pPrice = dis - Number(mjarr[1]) * (dis / Number(mjarr[0]));
                      }
                    } else if (coudanObj[dis]["type"] === "zhe") {
                      if (pingxingcelue()) {
                        pPrice = (coudanObj[dis]["t1"] * coudanObj[dis]["t4"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] / Number(mjarr[1]))) / coudanObj[dis]["t3"];
                      } else {
                        pPrice = (coudanObj[dis]["t1"] * coudanObj[dis]["t4"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] * coudanObj[dis]["t4"] / Number(mjarr[1]))) / coudanObj[dis]["t3"];
                      }
                    } else if (coudanObj[dis]["type"] === "manzhe") {
                      // 满多少元打多少折
                      if (pingxingcelue()) {
                        pPrice = coudanObj[dis]["t1"] * coudanObj[dis]["t3"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] / Number(mjarr[0]));
                      } else {
                        pPrice = coudanObj[dis]["t1"] * coudanObj[dis]["t3"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] * coudanObj[dis]["t3"] / Number(mjarr[0]));
                      }
                    } else {
                      if (pingxingcelue()) {
                        pPrice = coudanObj[dis]["t1"] - coudanObj[dis]["t2"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] / Number(mjarr[0]));
                      } else {
                        pPrice = coudanObj[dis]["t1"] - coudanObj[dis]["t2"] - Number(mjarr[1]) * (coudanObj[dis]["t1"] - coudanObj[dis]["t2"] / Number(mjarr[0]));
                      }
                    }
                    pPrice = pPrice.toFixed(4);
                    coudanObj[pPrice] = true;
                    disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mjitem]]);
                  }
            }
            // 没有促销活动只针对优惠券计算
          } else if (type === "quan") {
              if (Number(mjarr[0]) <= pagePrice) {
                var pPrice = pagePrice - Number(mjarr[1]);
                xdljObj[pPrice] = true;
                disPrice2[pPrice] = [infoObj[pattern][mjitem]];
              } else if (Number(mjarr[1]) / Number(mjarr[0]) > 0.2 || pagePrice / Number(mjarr[0]) > 0.9) {
                var salePrice = pagePrice - pagePrice * Number(mjarr[1]) / Number(mjarr[0]);
                var pPrice = salePrice.toFixed(4);
                coudanObj[pPrice] = true;
                disPrice2[pPrice] = [infoObj[pattern][mjitem]];
              }
              // 促销活动计算
            } else {
                if (Number(mjarr[0]) <= pagePrice) {
                  if (mjarr[1].indexOf('%') > -1) {
                    mjarr[1] = pagePrice * Number(mjarr[1].replace('%', '')) / 100;
                  }
                  var pPrice = pagePrice - Number(mjarr[1]);
                  xdljObj[pPrice] = true;
                  disPrice[pPrice] = [infoObj[pattern][mjitem]];
                } else {
                  var salePrice = pagePrice - pagePrice * Number(mjarr[1]) / Number(mjarr[0]);
                  var pPrice = salePrice.toFixed(4);
                  if (mjarr[1].indexOf('%') > -1) {
                    pPrice = pagePrice - pagePrice * Number(mjarr[1].replace('%', '')) / 100;
                  }
                  if (coudanObj[pPrice] && typeof coudanObj[pPrice] === 'object' && coudanObj[pPrice].type === 'manjian') {
                    if (Number(mjarr[0]) >= coudanObj[pPrice]["t1"]) {
                      continue;
                    }
                  }
                  coudanObj[pPrice] = {
                    "type": "manjian",
                    "tt1": Number(mjarr[0]),
                    "tt2": Number(mjarr[1]),
                    "t1": Number(mjarr[0]),
                    "t2": Number(mjarr[1])
                  };
                  disPrice[pPrice] = [infoObj[pattern][mjitem]];
                }
              }
        }
        break;
      case "meimanjian":
        for (var mmjitem in infoObj[pattern]) {
          var mmjarr = mmjitem.split('-');
          if (Number(mmjarr[0]) <= pagePrice) {
            var num = parseInt(pagePrice / Number(mmjarr[0]));
            var disp = num * Number(mmjarr[1]);
            if (Number(mmjarr[2]) && Number(mmjarr[2]) < disp) disp = Number(mmjarr[2]);
            var pPrice = pagePrice - disp;
            xdljObj[pPrice] = {
              "type": "meimanjian",
              "tt1": pagePrice,
              "tt2": disp,
              "t1": Number(mmjarr[0]),
              "t2": Number(mmjarr[1]),
              "disp": disp,
              "lastp": pPrice
            };
            disPrice[pPrice] = [infoObj[pattern][mmjitem]];
          } else {
            var salePrice = pagePrice - pagePrice * Number(mmjarr[1]) / Number(mmjarr[0]);
            var pPrice = salePrice.toFixed(4);
            coudanObj[pPrice] = {
              "type": "meimanjian",
              "tt1": Number(mmjarr[0]),
              "tt2": Number(mmjarr[1]),
              "t1": Number(mmjarr[0]),
              "t2": Number(mmjarr[1])
            };
            disPrice[pPrice] = [infoObj[pattern][mmjitem]];
          }
        }
        break;
      case "quanmeimanjian":
        for (var qmmjitem in infoObj[pattern]) {
          var qmmjarr = qmmjitem.split('-');
          if (Object.keys(disPrice).length > 0) {
            for (var dis in disPrice) {
              if (coudanObj[dis]['type'] == 'zhe') {
                if (coudanObj[dis]['t1'] * coudanObj[dis]['t4'] >= Number(qmmjarr[0]) || pingxingcelue() && coudanObj[dis]['t1'] >= Number(qmmjarr[0])) {
                  var nums = coudanObj[dis]['t3'];
                  var pPrice = (coudanObj[dis]['t1'] * coudanObj[dis]['t4'] - Number(qmmjarr[0])) / nums;
                  coudanObj[pPrice] = true;
                  disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][qmmjitem]]);
                }
              }
            }
          } else {
            var pPrice = undefined;
            if (Number(qmmjarr[0]) > pagePrice) {
              if (Number(qmmjarr[1]) / Number(qmmjarr[0]) > 0.2) {
                pPrice = (Number(qmmjarr[0]) - Number(qmmjarr[1])) / (Number(qmmjarr[0]) / pagePrice);
                coudanObj[pPrice] = true;
              }
            } else {
              var nums1 = parseInt(pagePrice / Number(qmmjarr[0]));
              var nums2 = 99999;
              if (Number(qmmjarr[2])) {
                nums2 = parseInt(Number(qmmjarr[2]) / Number(qmmjarr[1]));
              }
              if (nums1 < nums2) {
                pPrice = pagePrice - nums1 * Number(qmmjarr[1]);
              } else {
                pPrice = pagePrice - nums2 * Number(qmmjarr[1]);
              }
            }
            if (pPrice) disPrice2[pPrice] = [infoObj[pattern][qmmjitem]];
          }
        }
        break;
      case "zhe":
        for (var zheitem in infoObj[pattern]) {
          var zhearr = zheitem.split('-');
          var point = Number(zhearr[1]) / 10;
          var pPrice = (pagePrice * point).toFixed(4);
          if (Number(zhearr[0]) > 1) {
            coudanObj[pPrice] = {
              "type": "zhe",
              "tt1": Number(zhearr[0]) * pagePrice,
              "tt2": Number(zhearr[0]),
              "t1": Number(zhearr[0]) * pagePrice,
              "t3": Number(zhearr[0]),
              "t4": Number(zhearr[1]) / 10,
              "t2": Number(zhearr[0]) * pagePrice * (1 - Number(zhearr[1]) / 10)
            };
          } else {
            xdljObj[pPrice] = true;
          }
          disPrice[pPrice] = [infoObj[pattern][zheitem]];
        }
        break;
      case "manzhe":
        for (var mzitem in infoObj[pattern]) {
          var mzarr = mzitem.split('-');
          if (type === "quan" && Object.keys(disPrice).length > 0) {
            for (var dis in disPrice) {
              var jd1 = coudanObj[dis] && Number(mzarr[0]) <= coudanObj[dis]['tt1'];
              var jd2 = xdljObj[dis];
              if (Number(mzarr[0]) <= Number(dis) || pingxingcelue() && (jd1 || jd2)) {
                var pPrice = undefined;
                if (pingxingcelue() && coudanObj[dis]) {
                  var p2 = coudanObj[dis]['tt1'] - coudanObj[dis]['tt2'] - coudanObj[dis]['tt1'] * (1 - Number(mzarr[1]) / 10);
                  pPrice = p2 / (coudanObj[dis]['tt1'] / pagePrice);
                } else if (pingxingcelue() && xdljObj[dis]) {
                  pPrice = dis - pagePrice * (1 - Number(mzarr[1]) / 10);
                } else {
                  pPrice = Number(dis) * (Number(mzarr[1]) / 10);
                }
                if (coudanObj[dis]) coudanObj[pPrice] = true;
                if (xdljObj[dis]) xdljObj[pPrice] = true;
                disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mzitem]]);
              } else if (Number(mzarr[1]) <= 8 || dis / Number(mzarr[0]) > 0.9) {
                var pPrice = Number(dis) * (Number(mzarr[1]) / 10);
                disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mzitem]]);
                coudanObj[pPrice] = true;
              } else if (coudanObj[dis] && Number(mzarr[0]) <= coudanObj[dis]) {
                var pPrice = Number(dis) * (Number(mzarr[1]) / 10);
                coudanObj[pPrice] = true;
                disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][mzitem]]);
              }
            }
          } else if (type === "quan") {
            if (Number(mzarr[0]) <= pagePrice) {
              var pPrice = pagePrice * (Number(mzarr[1]) / 10);
              xdljObj[pPrice] = true;
              disPrice2[pPrice] = [infoObj[pattern][mzitem]];
            } else if (Number(mzarr[1]) < 9 || pagePrice / Number(mzarr[0]) > 0.9) {
              var pPrice = pagePrice * (Number(mzarr[1]) / 10);
              coudanObj[pPrice] = true;
              disPrice2[pPrice] = [infoObj[pattern][mzitem]];
            }
          } else {
            if (Number(mzarr[0]) <= pagePrice) {
              var pPrice = pagePrice * (Number(mzarr[1]) / 10);
              xdljObj[pPrice] = true;
              disPrice[pPrice] = [infoObj[pattern][mzitem]];
            } else {
              var pPrice = pagePrice * (Number(mzarr[1]) / 10);
              coudanObj[pPrice] = {
                "type": "manzhe",
                "tt1": Number(mzarr[0]),
                "tt2": Number(mzarr[0]) - pPrice,
                "t1": Number(mzarr[0]),
                "t2": Number(mzarr[0]) - pPrice,
                "t3": Number(mzarr[1]) / 10
              };
              disPrice[pPrice] = [infoObj[pattern][mzitem]];
            }
          }
        }
        break;
      case "manzhe2":
        for (var mzitem in infoObj[pattern]) {
          var pPrice = pagePrice * (Number(mzitem) - 1) / Number(mzitem);
          coudanObj[pPrice] = {
            "type": "manzhe2",
            "tt1": pagePrice * Number(mzitem),
            "tt2": pagePrice,
            "t1": pagePrice * (Number(mzitem) - 1),
            "t2": Number(mzitem)
          };
          disPrice[pPrice] = [infoObj[pattern][mzitem]];
        }
        break;
      case "quanmanjian":
        for (var quanmjitem in infoObj[pattern]) {
          var quanmjarr = quanmjitem.split('-');
          if (Object.keys(disPrice).length > 0) {
            for (var dis in disPrice) {
              if (Number(dis) >= Number(quanmjarr[0]) || pingxingcelue() && pagePrice >= Number(quanmjarr[0])) {
                var pPrice = Number(dis) - Number(quanmjarr[1]);
                xdljObj[pPrice] = true;
                disPrice2[pPrice] = disPrice[dis].concat([infoObj[pattern][quanmjitem]]);
              }
            }
          } else {
            if (Number(quanmjarr[0]) <= pagePrice) {
              var pPrice = pagePrice - Number(quanmjarr[1]);
              xdljObj[pPrice] = true;
              disPrice2[pPrice] = [infoObj[pattern][quanmjitem]];
            } else if (Number(quanmjarr[1]) / Number(quanmjarr[0]) > 0.2) {
              var pPrice = (Number(quanmjarr[0]) - Number(quanmjarr[1])) / (Number(quanmjarr[0]) / pagePrice);
              coudanObj[pPrice] = true;
              disPrice2[pPrice] = [infoObj[pattern][quanmjitem]];
            }
          }
        }
    }
  }
};
var vipPrice = function vipPrice(price) {
  var PLUSDom = $('.plus-price .price');
  if (PLUSDom.length === 0) {
    PLUSDom = $('.p-price-plus .price');
  }
  if (G.site === '360buy' && PLUSDom.length > 0) {
    var price1 = PLUSDom.text().replace(/[￥¥\s]+/g, '');
    price1 = price1 && Number(price1);
    if (price1) {
      price = price1;
      vipPromo = "PLUS会员专享价" + price1;
    }
  }
  return price;
};

module.exports.getPrice = function (callback) {
  // if (disPrice) callback(disPrice, coudanObj, xdljObj)
  // else callbacks = callback
  __webpack_require__(11).waitForConditionFn(function () {
    return disPrice;
  }).then(function () {
    callback(disPrice, coudanObj, xdljObj);
  });
};

module.exports.reload = function (cb) {
  disPrice = null;
  module.exports.init();
  cb();
};

var domRequired = {
  '360buy': function buy() {
    if (location.hostname.includes('.jkcsjd.com')) {
      return true;
    }
    return $('#summary-quan').length || $('#J-summary-topcjmj').length;
  },
  'tmall': function tmall() {
    return $('[class^=Price--root]').length || $('.tb-wrap').length;
  }
};

var uploadLinkData = function uploadLinkData(linkData) {
  var batchName = 'jd_batch-' + pageConfig.product.skuid;
  var toUpload = {};
  toUpload[batchName] = {
    stockInfo: linkData.stockInfo,
    couponInfo: linkData.couponInfo,
    promotion: linkData.promotion,
    price: linkData.price
  };
  var payload = String.fromCharCode.apply(null, __webpack_require__(45).gZip(toUpload));
  __webpack_require__(3).post(G.server + '/extension/PluginHelper?op=jdPromoData&t=' + Date.now(), btoa(payload));
};

var fillPromoWithLinkData = function fillPromoWithLinkData(info, promoLinkData) {
  info.promo = info.promo.map(function (item) {
    promoLinkData.forEach(function (promo) {
      if (item.indexOf(promo.value) > -1 && (item.indexOf('.jd.com') === -1 || item.indexOf('item.jd.com/') > -1)) {
        item = item.replaceAll(':', '_').replaceAll(';', '_');
        if (item.indexOf(seprator) > -1) {
          item = item.split(seprator)[1];
        }
        if (promo.promoId) {
          item = 'https://search.jd.com/Search?activity_id=' + promo.promoId + '&sku=' + pageConfig.product.skuid + seprator + item;
        }
      }
    });
    return item;
  });
};

var fillPromoWithCouponLinkData = function fillPromoWithCouponLinkData(info, couponLinkData) {
  info.quan = info.quan.map(function (item) {
    var stritem = item.toString();
    var theCoupon = null;
    couponLinkData.forEach(function (coupon) {
      if (stritem.indexOf(coupon.couponValue) > -1 && stritem.indexOf('.jd.com') === -1) {
        theCoupon = coupon;
        // item = `https://search.jd.com/Search?coupon_batch=${coupon.batchId}&sku=${pageConfig.product.skuid}:${item}`
        item = coupon.batchId + '_' + coupon.roleId + '_' + coupon.encryptedKey + seprator + stritem;
      }
      if ((stritem.indexOf(coupon.quota + '元减') > -1 || stritem.indexOf(coupon.quota + '减') > -1) && stritem.indexOf('.jd.com') === -1) {
        theCoupon = coupon;
        // item = `https://search.jd.com/Search?coupon_batch=${coupon.batchId}&sku=${pageConfig.product.skuid}:${item}`
        item = coupon.batchId + '_' + coupon.roleId + '_' + coupon.encryptedKey + seprator + stritem;
      }
    });

    if (theCoupon && new Date(theCoupon.beginTime + ' ' + theCoupon.beginHour) > new Date()) {
      return;
    }

    return item;
  }).filter(function (x) {
    return !!x;
  });
};

var init2 = function init2() {
  var info, pagePrice, plusPrice, toSend, loginCoupon, coupon, linkData, count, k, promoText, globalCondition, dp_id, skuid;
  return regeneratorRuntime.async(function init2$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!domRequired[G.site]) {
          context$1$0.next = 3;
          break;
        }

        context$1$0.next = 3;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(domRequired[G.site]));

      case 3:
        info = sitePattern[G.site]();
        pagePrice = __webpack_require__(20).productPattern[G.site]().price;
        plusPrice = vipPrice(pagePrice);
        toSend = [];

        if (plusPrice !== pagePrice) {
          toSend.push('plus:' + plusPrice);
        }
        if (!info.promo) info.promo = [];
        if (!info.quan) info.quan = [];

        if (!(G.site === '360buy')) {
          context$1$0.next = 19;
          break;
        }

        context$1$0.next = 13;
        return regeneratorRuntime.awrap(__webpack_require__(642).init());

      case 13:
        loginCoupon = context$1$0.sent;

        if (loginCoupon instanceof Array) {
          info.quan = loginCoupon;
        }
        context$1$0.next = 17;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('coupon'));

      case 17:
        coupon = context$1$0.sent;

        if (coupon && info.quan.indexOf(coupon) === -1) {
          info.quan.push(coupon);
        }

      case 19:
        // if (G.aliSite) {
        //   let coupon = await require('common/globalCondition').met('coupon')
        //   if (coupon) {
        //     info.quan.push(coupon + '元券')
        //   }
        // }
        info.promo = __webpack_require__(11).arrayUnique(info.promo);

        if (!(G.site === '360buy')) {
          context$1$0.next = 44;
          break;
        }

        context$1$0.prev = 21;
        linkData = null, count = 0;

      case 23:
        if (linkData) {
          context$1$0.next = 38;
          break;
        }

        if (!(count > 10)) {
          context$1$0.next = 26;
          break;
        }

        return context$1$0.abrupt('break', 38);

      case 26:
        context$1$0.prev = 26;

        count++;
        context$1$0.next = 30;
        return regeneratorRuntime.awrap(request.jdRequest(pageConfig.product.skuid));

      case 30:
        linkData = context$1$0.sent;
        context$1$0.next = 36;
        break;

      case 33:
        context$1$0.prev = 33;
        context$1$0.t0 = context$1$0['catch'](26);

        console.log(context$1$0.t0);

      case 36:
        context$1$0.next = 23;
        break;

      case 38:

        if (linkData) {
          uploadLinkData(linkData);
          if (linkData.promotion && linkData.promotion.activity) {
            fillPromoWithLinkData(info, linkData.promotion.activity);
          }
          if (linkData.couponInfo) {
            fillPromoWithCouponLinkData(info, linkData.couponInfo);
          }
        }
        context$1$0.next = 44;
        break;

      case 41:
        context$1$0.prev = 41;
        context$1$0.t1 = context$1$0['catch'](21);

        __webpack_require__(6).error(context$1$0.t1);

      case 44:
        toSend = toSend.concat(info.promo.map(function (x) {
          return '促: ' + x.replace('http://', '//').replace('https://', '//');
        })).concat(info.quan.map(function (x) {
          return '券: ' + x.toString().replace('http://', '//').replace('https://', '//');
        }));

        //if (true) {
        k = $('.J-prom > .prom-item > img').attr('src');

        if (k && k.indexOf('6223615cd83592b5') > -1) {
          toSend.push('会员特权:9.5折');
        }
        promoText = encodeURIComponent(toSend.join(';'));
        globalCondition = __webpack_require__(4);
        context$1$0.next = 51;
        return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

      case 51:
        dp_id = context$1$0.sent;

        if (!(G.priceTextCollectedFromPage && (G.priceTextCollectedFromPage.includes('券后') || G.priceTextCollectedFromPage.includes('折后')))) {
          context$1$0.next = 54;
          break;
        }

        return context$1$0.abrupt('return');

      case 54:
        skuid = __webpack_require__(10).getParameterByName('skuId');

        request.get(G.server + '/extension/InTimePromotion?dp_id=' + dp_id + '&price=' + pagePrice + '&promo_text=' + promoText + (skuid ? '&sku_id=' + skuid : '')).then(function (res) {
          __webpack_require__(4).setMet('promoGot', res.data);
          __webpack_require__(4).setMet('localPromoGot', info);
          __webpack_require__(4).setMet('remoteUrlMap', res._map);
          // if (callbacks) {
          //   callbacks(res.data)
          // }
          disPrice = res.data;

          if (res.data) {
            G.dp.promoPrice = res.data.current_price;
          }
        });
        //此处需要优先计算促销活动 再计算优惠券
        // pagePrice = vipPrice(pagePrice)
        // if (info.promo)
        //   getPromoInfoNum(pagePrice, info.promo, "promo")
        // if (info.quan)
        //   getPromoInfoNum(pagePrice, info.quan, "quan")
        // for (let dis2 in disPrice2) {
        //   disPrice[dis2] = disPrice2[dis2]
        // }
        // let dk = dingjinzhekou[G.site]();
        // if (dk || vipPromo) {
        //   for (let disp in disPrice) {
        //     let newdisp = disp - dk;
        //     if (vipPromo) {
        //       disPrice[disp].push(vipPromo)
        //     }
        //     if (Number(newdisp) !== Number(disp)) {
        //       disPrice[newdisp] = disPrice[disp];
        //     }
        //   }
        // }
        // if (callbacks)
        //   callbacks(disPrice, coudanObj, xdljObj)

      case 56:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this, [[21, 41], [26, 33]]);
};

module.exports.init = function callee$0$0() {
  var instanceId, perform;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    var _this2 = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        disPrice = 0;

        if (!(['360buy', 'suning', 'tmall', 'dangdang', 'taobao'].indexOf(G.site) === -1)) {
          context$1$0.next = 3;
          break;
        }

        return context$1$0.abrupt('return');

      case 3:
        instanceId = G.instanceId;

        perform = function perform() {
          var siteName = G.site;
          var siteId = detect.getSiteId(siteName);
          priceParser.init(siteId, function callee$2$0(price) {
            return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
              while (1) switch (context$3$0.prev = context$3$0.next) {
                case 0:
                  context$3$0.next = 2;
                  return regeneratorRuntime.awrap(__webpack_require__(4).met('productInfoReady'));

                case 2:
                  if (G.dp) {
                    context$3$0.next = 4;
                    break;
                  }

                  return context$3$0.abrupt('return');

                case 4:
                  if (!(G.instanceId && instanceId !== G.instanceId)) {
                    context$3$0.next = 6;
                    break;
                  }

                  return context$3$0.abrupt('return');

                case 6:
                  if (price && price > 0) {
                    G.dp.oldPrice = price;
                    G.dp.price = price;
                  }
                  init2();

                case 8:
                case 'end':
                  return context$3$0.stop();
              }
            }, null, this);
          });
        };

        if (!(G.site === '360buy')) {
          context$1$0.next = 12;
          break;
        }

        if (!location.hostname.includes('.jd.com')) {
          context$1$0.next = 9;
          break;
        }

        context$1$0.next = 9;
        return regeneratorRuntime.awrap((function callee$1$0() {
          var now;
          return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
            while (1) switch (context$2$0.prev = context$2$0.next) {
              case 0:
                now = Date.now();
                context$2$0.next = 3;
                return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                  return $('.prom-item').length || $('.quan-item').length || Date.now() - now > 8000;
                }));

              case 3:
              case 'end':
                return context$2$0.stop();
            }
          }, null, _this2);
        })());

      case 9:
        perform();
        context$1$0.next = 13;
        break;

      case 12:
        setTimeout(perform, 4000);

      case 13:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

// 京东plus价格参加实际计算
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 198 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', lang = $data.lang, $escape = $imports.$escape, pri = $data.pri, tle = $data.tle, desc = $data.desc;
    $$out += '<div class="bjgou-component dsj-content bjg-minibar-visible-component" style="display: flex; clear: both;">\n  <em class="setting-bg"></em>\n  <span class="dsj-pri-info">\n    <span class="dsj-sp1">\n      ';
    if (lang == 'zh-tr') {
        $$out += '到手價';
    } else {
        $$out += '到手价';
    }
    $$out += ':\n    </span>\n    <span class="dsj-sp2">\xA5';
    $$out += $escape(pri);
    $$out += '</span>\n    ';
    if (tle) {
        $$out += '\n    <span class="dsj-sp3">(';
        $$out += $escape(tle);
        $$out += ')</span>\n    ';
    }
    $$out += '\n  </span>\n  <span class="dsj-promo-link" style="flex: 1">\n    ';
    $$out += desc;
    $$out += '\n    <div id="bjg-pp" style="position: absolute"></div>\n    <div id="bjg-pp-hoverhelper"></div>\n  </span>\n  <span class="dsj-remind-icon setting-bg"></span>\n  <div class="dsj-content-detail" style="font-size: 12px;">\n    ';
    if (lang == 'zh-tr') {
        $$out += '到手價指促銷活動完美湊單和使用優惠券後的理論到手價\uFF0C不代表您的實際支付價格\u3002';
    } else {
        $$out += '到手价指促销活动完美凑单和使用优惠券后的理论到手价\uFF0C不代表您的实际支付价格\u3002';
    }
    $$out += '</div>\n  <style type="text/css">\n    #bjg-pp-hoverhelper {\n      position: absolute;\n      top: 34px;\n      bottom: -6px;\n      left: 0;\n      right: 0;\n    }\n\n    .bjgou-component.dsj-content {\n      border: 1px solid transparent;\n      margin-top: 2px;\n    }\n\n    .bjgou-component.dsj-content:hover {\n      border: 1px solid #e6e9eb;\n      background: white;\n    }\n\n    .dsj-content>em {\n      float: left;\n      width:16px;\n      height:16px;\n      margin: 9px 10px 9px 12px;\n      background-position: -251px -111px;\n    }\n    .dsj-content {\n      width:460px;\n      height:34px;\n      position: relative;\n      line-height: 34px;\n      border: 1px solid #e6e9eb;\n      border-top: none;\n      background: transparent;\n    }\n    .dsj-pri-info {\n      margin-right: 10px;\n    }\n    .dsj-content * {\n      font-family: \'Microsoft YaHei\';\n    }\n    .dsj-pri-info span {\n      line-height: 34px;\n      height: 34px;\n    }\n    .dsj-sp1, .dsj-sp2 {\n      color: #E4393C;\n      font-size: 13px;\n      height: 17px;\n      width: auto;\n      font-weight: bold;\n    }\n    .dsj-sp2 {\n      margin-right: 10px;\n      margin-left: 3px;\n    }\n    .dsj-sp3, .dsj-promo-link {\n      font-size: 12px;\n      color: #7D7E80;\n    }\n    .dsj-promo-link {\n      width: 210px;\n      height: 34px;\n      line-height: 34px;\n      overflow: hidden;\n      text-decoration: none!important;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n    }\n    .dsj-promo-link:hover {\n      cursor: text;\n    }\n    .dsj-content:hover .gwd-promo-plan {\n      display: block;\n    }\n    .dsj-promo-link.islink:hover {\n      cursor: pointer;\n      color: #f30213;\n    }\n    .dsj-content .dsj-remind-icon {\n      width:14px;\n      height:14px;\n      float: right;\n      margin-right: 12px;\n      margin-top: 10px;\n      background-position: -272px -112px;\n    }\n    .dsj-content .dsj-content-detail {\n      position: absolute;\n      height: 73px;\n      width: 132px;\n      line-height: 18px;\n      padding: 10px;\n      text-align: left;\n      color: #999;\n      top: 31px;\n      right: 3px;\n      background: rgba(254,255,247,1);\n      border: 1px solid #e5e5e5;\n      z-index: 9999999;\n      display: none;\n    }\n    .dsj-content .dsj-remind-icon:hover+.dsj-content-detail {\n      display: block;\n    }\n    .dsj-content .dsj-content-detail:before {\n      display: block;\n      content: "";\n      width: 0;\n      height: 0;\n      border-width: 0px 5px 5px;\n      border-style: solid;\n      border-color: transparent transparent #b4b4b4;\n      position: absolute;\n      top: -5px;\n      left: 142px;\n      margin-left: -10px;\n    }\n    .dsj-content .dsj-content-detail:after {\n      display: block;\n      content: "";\n      width: 0;\n      height: 0;\n      border-width: 0 5px 5px;\n      border-style: solid;\n      border-color: transparent transparent #fff;\n      position: absolute;\n      top: -4px;\n      left: 132px;\n    }\n  </style>\n  <style>\n    .bjgou-component .setting-bg {\n      background: url("https://cdn.bijiago.com/images/extensions/bijiago/bell@2x.png");\n      background-size: contain;\n    }\n\n    .bjgou-component .dsj-sp1, .bjgou-component .dsj-sp2 {\n      color: #ff6132;\n      font-size: 13px;\n      font-weight: bold;\n    }\n\n    .bjgou-component .dsj-sp3\uFF0C .bjgou-component .dsj-promo-link {\n      color: #8c847b;\n      font-size: 12px;\n    }\n\n    .bjgou-component .dsj-remind-icon {\n      background: url("https://cdn.bijiago.com/images/extensions/bijiago/quest@2x.png");\n      background-size: contain;\n      background-position: initial!important;\n    }\n  </style>\n  ';
    if (lang == 'en') {
        $$out += '\n  <style>\n      .dsj-content .dsj-content-detail {\n          height: 113px;\n      }\n  </style>\n  ';
    }
    $$out += '\n</div>';
    return $$out;
};

/***/ }),
/* 199 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js__ = __webpack_require__(200);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 200 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _MemberCouponMixin = __webpack_require__(42);

var _MemberCouponMixin2 = _interopRequireDefault(_MemberCouponMixin);

exports['default'] = {
  mixins: [_MemberCouponMixin2['default']],
  props: ['data'],
  data: function data() {
    return {
      G: G
    };
  },
  computed: {},
  methods: {
    getText: function getText(text) {
      var map = {
        '购买方案': '購買方案',
        '实付总价': '實付總價',
        '折合每件': '折合每件',
        '使用的促销': '使用的促銷',
        '扫码 参加活动': '掃碼 參加活動',
        '淘宝APP': '淘寶APP'
      };
      if (G.lang === 'zh-tr') {
        return map[text];
      }
      return text;
    },
    link2: function link2(u, src) {
      if (src.indexOf('//') === 0) {
        return u.replace('$URL', encodeURIComponent('https:' + src)).replace('ext_promo_plan', 'promo_calc_plan');
      }
      return u.replace('$URL', encodeURIComponent(src)).replace('ext_promo_plan', 'promo_calc_all');
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 201 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxMyAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IiYjMjI5OyYjMTU1OyYjMTkwOyYjMjMwOyYjMTYwOyYjMTM1Oy8mIzIyOTsmIzEzMzsmIzEyOTsmIzIzMjsmIzE3NDsmIzE4NDsiPgo8Y2lyY2xlIGlkPSJFbGxpcHNlIDM0IiBjeD0iNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiM0NENDNjYiLz4KPGcgaWQ9Imljb24vIiBjbGlwLXBhdGg9InVybCgjY2xpcDBfNjA0XzQ4MjUpIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzIDBIMFYxM0gxM1YwWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4wMSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik00IDYuNUw2IDguNUwxMCA0LjUiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L2c+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfNjA0XzQ4MjUiPgo8cmVjdCB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="

/***/ }),
/* 202 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxMyAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IiYjMjI5OyYjMTU1OyYjMTkwOyYjMjMwOyYjMTYwOyYjMTM1Oy8mIzIzMTsmIzE2NjsmIzEyOTsmIzIzMDsmIzE3MzsmIzE2MjsiPgo8Y2lyY2xlIGlkPSJFbGxpcHNlIDMzIiBjeD0iNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGRjQ0NDkiLz4KPGcgaWQ9Imljb24vY2xvc2UvbW9kYWwvbm9ybWFsIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTkuODgyOTUgMy4xMTcwOUMxMC4wNjY5IDMuMzAxMDQgMTAuMDY2OSAzLjYwMDE0IDkuODgyOTUgMy43ODQwOUwzLjc4NDIxIDkuODgyODNDMy42MDAyNiAxMC4wNjY4IDMuMzAxMTYgMTAuMDY2OCAzLjExNzIxIDkuODgyODNDMi45MzMyNiA5LjY5ODg4IDIuOTMzMjYgOS4zOTk3OCAzLjExNzIxIDkuMjE1ODNMOS4yMTU5NSAzLjExNzA5QzkuMzk5OSAyLjkzMzE0IDkuNjk5IDIuOTMzMTQgOS44ODI5NSAzLjExNzA5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggaWQ9IlZlY3Rvcl8yIiBkPSJNMy4xMTcyMSAzLjExNzA5QzMuMzAxMTYgMi45MzMxNCAzLjYwMDI2IDIuOTMzMTQgMy43ODQyMSAzLjExNzA5TDkuODgyOTUgOS4yMTU4M0MxMC4wNjY5IDkuMzk5NzggMTAuMDY2OSA5LjY5ODg4IDkuODgyOTUgOS44ODI4M0M5LjY5OSAxMC4wNjY4IDkuMzk5OSAxMC4wNjY4IDkuMjE1OTUgOS44ODI4M0wzLjExNzIxIDMuNzg0MDlDMi45MzMyNiAzLjYwMDE0IDIuOTMzMjYgMy4zMDEwNCAzLjExNzIxIDMuMTE3MDlaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjwvZz4KPC9zdmc+Cg=="

/***/ }),
/* 203 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js__ = __webpack_require__(204);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['data'],
  data: function data() {
    return {
      currentSelect: '',
      question: '',
      radioA: '',
      radioB: '',
      innerData: {}
    };
  },
  methods: {
    submit: function submit() {
      var _this = this;

      if (!this.currentSelect) return;
      this.question = '';
      this.data.catalogQas.forEach(function (item) {
        var selected = item[_this.currentSelect];
        if (selected.brief) {
          _this.innerData.catShptBrief = selected.brief;
        }
        if (selected.catEmbargoSe) {
          _this.innerData.catEmbargoSe = selected.catEmbargoSe;
        }
        if (selected.catEmbargoAir) {
          _this.innerData.catEmbargoAir = selected.catEmbargoAir;
        }
        if (selected.catCcMaxQty === '0') {
          _this.innerData.catEmbargoSe = '1';
          _this.innerData.catEmbargoAir = '1';
        }
      });
    }
  },
  mounted: function mounted() {
    this.innerData = this.data;
    if (this.data.catalogQas && this.data.catalogQas.length) {
      this.question = this.data.catalogQas[0].qaTitle;
      this.radioA = this.data.catalogQas[0].qaRadioA.text;
      this.radioB = this.data.catalogQas[0].qaRadioB.text;
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 205 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js__ = __webpack_require__(206);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _IndexVue = __webpack_require__(56);

var _IndexVue2 = _interopRequireDefault(_IndexVue);

var arrowImg = __webpack_require__(69);

exports['default'] = {
  props: ['img', 'site', 'price'],
  data: function data() {
    return {
      arrow: arrowImg
    };
  },
  methods: {
    transText: __webpack_require__(32),
    openApp: function openApp() {
      var _this = this;

      if (!window.gwdImgApp) {
        var el = document.createElement('div');
        document.body.appendChild(el);
        window.gwdImgApp = new Vue({
          el: el,
          render: function render(h) {
            return h(_IndexVue2['default'], {
              props: {
                img: _this.img,
                price: _this.price
              },
              ref: 'index'
            });
          }
        });
      }
      window.gwdImgApp.$refs.index.open();
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17)["default"]))

/***/ }),
/* 207 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js__ = __webpack_require__(208);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 208 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _PriceVue = __webpack_require__(209);

var _PriceVue2 = _interopRequireDefault(_PriceVue);

var _ProductItemVue = __webpack_require__(686);

var _ProductItemVue2 = _interopRequireDefault(_ProductItemVue);

var _ErrorVue = __webpack_require__(692);

var _ErrorVue2 = _interopRequireDefault(_ErrorVue);

var extConsole = __webpack_require__(6);
var util = __webpack_require__(11);
var bgClient = __webpack_require__(16);

var _transText = __webpack_require__(32);

var siteMap = {
  tb: _transText('淘宝'),
  jd: _transText('京东'),
  pdd: '拼多多',
  1688: '1688',
  amazon: '亚马逊'
};

var sortMap = {
  'default': _transText('相似度'),
  price: _transText('价格从低到高'),
  sales: _transText('销量从高到低')
};

var SiteStatus = {
  pending: 'pending',
  finish: 'finish',
  loading: '加载中...',
  empty: _transText('暂无同款'),
  error: _transText('加载失败'),
  needLogin: 'needLogin',
  needVisit: 'needVisit'
};

var apis = {
  tb: __webpack_require__(700),
  jd: __webpack_require__(702),
  1688: __webpack_require__(703),
  amazon: __webpack_require__(704)
};

var makeDefaultStatus = function makeDefaultStatus() {
  return {
    status: SiteStatus.pending,
    list: [],
    statusDetail: ''
  };
};

if (window.gwd_G && window.gwd_G.apiReplace) {
  Object.keys(window.gwd_G.apiReplace).forEach(function (key) {
    apis[key] = window.gwd_G.apiReplace[key];
  });
}

var showedAlert = false;

exports['default'] = {
  components: {
    Price: _PriceVue2['default'], ProductItem: _ProductItemVue2['default'], Error: _ErrorVue2['default']
  },
  props: ['img', 'price'],
  data: function data() {
    return {
      logo: G.lang === 'zh-tr' ? __webpack_require__(705) : __webpack_require__(706),
      isBjg: G.from_device === 'bijiago',
      is1688: location.hostname.includes('.1688.com'),
      firefox: navigator.userAgent.indexOf('Firefox') > -1,
      siteMap: siteMap,
      SiteStatus: SiteStatus,
      show: true,
      xhs: location.hostname.includes('xiaohongshu.com'),
      style: G.from_device === 'bijiago' ? 'bottom' : G.style,
      expanded: false,
      hasPermission: true,
      sites: G.site === '360buy' ? ['jd', 'tb'] : ['tb', 'jd'],
      currentViewing: location.hostname.includes('.1688.com') ? '1688' : G.site === '360buy' ? 'jd' : 'tb',
      permissionTextOnly: false,
      currentSort: 'default',
      sortOptions: ['default', 'price', 'sales'],
      products: {
        tb: makeDefaultStatus(),
        jd: makeDefaultStatus(),
        pdd: makeDefaultStatus(),
        1688: makeDefaultStatus(),
        amazon: makeDefaultStatus()
      }
    };
  },
  methods: {
    overlayClick: function overlayClick(e) {
      if (e.target === this.$refs.overlay) {
        this.close();
      }
    },
    transText: function transText(text) {
      return _transText(text);
    },
    getSiteName: function getSiteName(site) {
      return siteMap[site];
    },
    getSortName: function getSortName(sort) {
      if ((this.currentViewing === 'jd' || this.currentViewing === 'amazon') && sort === 'sales') {
        return _transText('评论数从高到低');
      }
      return sortMap[sort];
    },
    close: function close() {
      this.show = false;
      document.body.style.overflow = 'auto';
    },
    open: function open() {
      this.show = true;
      document.body.style.overflow = 'hidden';
    },
    reset: function reset() {
      this.products.tb.status = SiteStatus.pending;
      this.products.jd.status = SiteStatus.pending;

      this.products.tb.list = [];
      this.products.jd.list = [];

      this.products.tb.statusDetail = '';
      this.products.jd.statusDetail = '';
    },
    doSearch: function doSearch(site) {
      var canRetry = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
      var permissionResult;
      return regeneratorRuntime.async(function doSearch$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (!(this.products[site].status === SiteStatus.loading)) {
              context$1$0.next = 2;
              break;
            }

            return context$1$0.abrupt('return');

          case 2:
            if (this.img) {
              context$1$0.next = 4;
              break;
            }

            return context$1$0.abrupt('return');

          case 4:
            if (!(G.from_device === 'bijiago')) {
              context$1$0.next = 16;
              break;
            }

            context$1$0.next = 7;
            return regeneratorRuntime.awrap(bgClient.get('/checkPermission'));

          case 7:
            permissionResult = context$1$0.sent;

            extConsole.log('permissionResult', permissionResult);

            if (!(permissionResult !== 'ok')) {
              context$1$0.next = 16;
              break;
            }

            this.products[site].status = SiteStatus.error;
            this.products[site].statusDetail = '没有权限';
            if (!showedAlert) {
              showedAlert = true;
              this.permissionTextOnly = true;
            }
            this.hasPermission = false;
            bgClient.get('/requestTb').then(function (permissionResult) {
              _this.permissionTextOnly = false;
              if (permissionResult) {
                _this.hasPermission = true;
              }
            });
            return context$1$0.abrupt('return');

          case 16:
            this.products[site].status = SiteStatus.loading;
            apis[site].get(this.img).then(function (res) {
              extConsole.log(res);
              if (res instanceof Array) {
                _this.products[site].list = res;
                _this.products[site].status = res.length ? SiteStatus.finish : SiteStatus.empty;
              } else if (res === 'needLogin') {
                _this.products[site].status = SiteStatus.needLogin;
              } else if (res === 'needVisit') {
                _this.products[site].status = SiteStatus.needVisit;
              } else {
                if (canRetry && res.includes('fail-')) {
                  setTimeout(function () {
                    _this.products[site].status = SiteStatus.pending;
                    _this.doSearch(site, false);
                  }, 200);
                  return;
                }
                _this.products[site].status = SiteStatus.error;
                _this.products[site].statusDetail = res;
                console.error('imgSearch', res);
              }
            })['catch'](function (err) {
              extConsole.error('imgSearch', err);
              _this.products[site].status = SiteStatus.error;
            });

          case 18:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    }
  },
  computed: {
    unit: function unit() {
      return G.site === 'amazon' ? '$' : '¥';
    },
    currentSiteResult: function currentSiteResult() {
      if (!this.products[this.currentViewing]) {
        console.error('imgSearch not found', this.currentViewing);
        console.log(this.products[this.currentViewing]);
        return makeDefaultStatus();
      }
      return this.products[this.currentViewing];
    },
    sortedList: function sortedList() {
      var _this2 = this;

      this.$nextTick(function () {
        _this2.$refs.list.scrollTop = 0;
      });
      return JSON.parse(JSON.stringify(this.currentSiteResult.list)).sort(function (a, b) {
        if (_this2.currentSort === 'default') {
          return 0;
        } else if (_this2.currentSort === 'price') {
          return parseFloat(a.price) - parseFloat(b.price);
        } else if (_this2.currentSort === 'sales') {
          return util.stringToNumber(b.salesAmount) - util.stringToNumber(a.salesAmount);
        }
      });
    }
  },
  watch: {
    currentViewing: function currentViewing(newVal) {
      extConsole.log('site load start', newVal);
      this.currentSort = 'default';
      if (this.currentSiteResult.status === SiteStatus.pending) {
        this.doSearch(newVal);
      }
    }
  },
  mounted: function mounted() {
    this.currentViewing = this.is1688 ? '1688' : G.site === '360buy' ? 'jd' : 'tb';
    if (this.is1688) {
      this.sites.unshift('1688');
    }
    if (G.site === 'amazon') {
      this.sites = this.sites.filter(function (site) {
        return site === 'tb';
      });
      this.sites.unshift('1688');
      this.sites.unshift('amazon');
      this.currentViewing = 'amazon';
    }
    this.doSearch(this.currentViewing);
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 209 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Price_vue_vue_type_template_id_26424954_scoped_true__ = __webpack_require__(681);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Price_vue_vue_type_script_lang_js__ = __webpack_require__(210);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Price_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Price_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Price_vue_vue_type_style_index_0_id_26424954_scoped_true_lang_less__ = __webpack_require__(683);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Price_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Price_vue_vue_type_template_id_26424954_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Price_vue_vue_type_template_id_26424954_scoped_true__["staticRenderFns"],
  false,
  null,
  "26424954",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('26424954')) {
      api.createRecord('26424954', component.options)
    } else {
      api.reload('26424954', component.options)
    }
    module.hot.accept("./Price.vue?vue&type=template&id=26424954&scoped=true", function () {
      api.rerender('26424954', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/Price.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 210 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js__ = __webpack_require__(211);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 211 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = {
  props: ['price', 'fontSize', 'unit']
};
module.exports = exports['default'];

/***/ }),
/* 212 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__ = __webpack_require__(213);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 213 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _PriceVue = __webpack_require__(209);

var _PriceVue2 = _interopRequireDefault(_PriceVue);

var util = __webpack_require__(11);

exports['default'] = {
  components: { Price: _PriceVue2['default'] },
  props: ['item'],
  data: function data() {
    return {
      isBjg: G.from_device === 'bijiago'
    };
  },
  methods: {
    transText: __webpack_require__(32),
    getPromoText: function getPromoText(promo) {
      if (promo.tag === "coupon" && promo.text.indexOf('减') > -1) {
        return promo.text.split('减')[1] + '元券';
      }
      return promo.text;
    }
  },
  computed: {
    unit: function unit() {
      return this.item.dpId.endsWith('-228') ? '$' : '¥';
    },
    link: function link() {
      var isAli = this.item.dpId.endsWith('-83') || this.item.dpId.endsWith('-123');
      if (G.aliSite && isAli) {
        // append title, pic, shop, price
        var dpParams = '&title=' + encodeURIComponent(this.item.title) + '&img=' + encodeURIComponent(this.item.img) + '&shopName=' + encodeURIComponent(this.item.shopName) + '&price=' + encodeURIComponent(this.item.price) + '&sellAmount=' + encodeURIComponent(this.salesText);
        var domain = G.from_device === 'bijiago' ? 'bijiago' : 'gwdang';
        return 'https://tb.' + domain + '.com/extension/qrpage?directLink=1&dp_id=' + this.item.dpId + '&from=img_search&union=' + G.union + '&from_device=' + G.from_device + '&position=extImgSame' + dpParams;
        // return `https://item.taobao.com/item.htm?id=${this.item.dpId.replace('-83', '').replace('-123', '')}`
      }
      if (isAli) {
        return G.u_server + '/redirect/tao?id=' + this.item.dpId.replace('-83', '').replace('-123', '') + '&from=img_search&union=' + G.union + '&from_device=' + G.from_device;
      }
      var siteId = this.item.dpId.split('-')[1];
      if (siteId === '3') {
        return G.u_server + '/redirect/common?dp_id=' + this.item.dpId + '&from=img_search&s=dm';
      }
      return G.u_server + '/union/go/?site_id=' + siteId + '&target_url=' + encodeURIComponent(this.item.url) + '&union=gwdang&column=img_search';
      // if (this.item.dpId.endsWith('-370')) {
      //   return `https://item.taobao.com/item.htm?id=${this.item.dpId.replace('-83', '')}`
      // }
      // return `https://item.jd.com/${this.item.id}.html`
    },
    minHeight: function minHeight() {
      if (this.item.dpId.endsWith('-3')) {
        return '350px';
      }
      return '321px';
    },
    salesText: function salesText() {
      return util.numberToString(this.item.salesAmount, 1);
    },
    siteId: function siteId() {
      return this.item.dpId.split('-')[1];
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 214 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js__ = __webpack_require__(215);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 215 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var bgClient = __webpack_require__(16);

exports['default'] = {
  props: ['site', 'siteMap', 'error', 'errorDetail', 'permissionTextOnly', 'hasPermission'],
  data: function data() {
    return {
      verifyLink: 'https://world.taobao.com/wow/tmg-fc/tmw/search_image?spm=a2141.241046-global.d_1_0.1.3acc5adbZx9B6y&similarItemId=650001079385&picSearchUrl=https%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi3%2F2081957625%2FO1CN01SdvaIp26CIgmFR0nd_!!0-item_pic.jpg',
      bjg: G.from_device === 'bijiago'
    };
  },
  methods: {
    transText: __webpack_require__(32),
    index: function index(site) {
      switch (site) {
        case 'jd':
          return 'https://www.jd.com/';
        case 'tb':
          return 'https://www.taobao.com/';
        case '1688':
          return 'https://www.1688.com/';
      }
      return '';
    },
    login: function login() {
      // switch(this.site) {
      //   case 'jd':
      //     window.open('https://passport.jd.com/new/login.aspx?ReturnUrl=https%3A%2F%2Fwww.jd.com%2F')
      //     break;
      //   case 'tb':
      //     window.open('https://login.taobao.com/member/login.jhtml')
      //     break;
      //   case 'pdd':
      //     window.open('https://mobile.yangkeduo.com/login.html')
      //     break;
      // }
      window.open(this.index(this.site));
    },
    retry: function retry() {
      this.$emit('retry');
    }
  },
  mounted: function mounted() {
    var _this = this;

    __webpack_require__(4).met('GwdConfig').then(function (config) {
      if (config.tbImgVerifyLink) {
        _this.verifyLink = config.tbImgVerifyLink;
      }
    });
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 216 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G) {

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _this = this;

var request = __webpack_require__(3);
var extConsole = __webpack_require__(6);
var fillPriceAndPromo = function fillPriceAndPromo(list) {
  var dpIds, priceInfos;
  return regeneratorRuntime.async(function fillPriceAndPromo$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        dpIds = list.map(function (item) {
          return item.dpId;
        }).join(',');
        context$1$0.next = 3;
        return regeneratorRuntime.awrap(request.post(G.server + "/extension/ProductFilter?scene=img ", {
          dp_ids: dpIds
        }, true));

      case 3:
        priceInfos = context$1$0.sent.list;

        extConsole.log('priceInfos', priceInfos);
        return context$1$0.abrupt("return", list.map(function (item) {
          var itemDpId = item.dpId.replace('-123', '-83');
          if (!item.price) {
            item.price = priceInfos[itemDpId] ? priceInfos[itemDpId].pri / 100 : '';
          }
          item.promos = priceInfos[itemDpId] && priceInfos[itemDpId].promo && priceInfos[itemDpId].promo.promo_list || [];
          return item;
        }).filter(function (x) {
          return x.price;
        }));

      case 6:
      case "end":
        return context$1$0.stop();
    }
  }, null, _this);
};

exports["default"] = fillPriceAndPromo;
module.exports = exports["default"];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 217 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js__ = __webpack_require__(218);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 218 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _IndexVue = __webpack_require__(56);

var _IndexVue2 = _interopRequireDefault(_IndexVue);

var arrowImg = __webpack_require__(69);

exports['default'] = {
  props: ['img', 'site', 'price'],
  data: function data() {
    return {
      arrow: arrowImg
    };
  },
  methods: {
    transText: __webpack_require__(32),
    openApp: function openApp() {
      var _this = this;

      if (!window.gwdImgApp) {
        var el = document.createElement('div');
        document.body.appendChild(el);
        window.gwdImgApp = new Vue({
          el: el,
          render: function render(h) {
            return h(_IndexVue2['default'], {
              props: {
                img: _this.img,
                price: _this.price
              },
              ref: 'index'
            });
          }
        });
      }
      window.gwdImgApp.$refs.index.open();
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17)["default"]))

/***/ }),
/* 219 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js__ = __webpack_require__(220);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 220 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _IndexVue = __webpack_require__(56);

var _IndexVue2 = _interopRequireDefault(_IndexVue);

var arrowImg = __webpack_require__(69);

exports['default'] = {
  props: ['img', 'site', 'price'],
  data: function data() {
    return {
      arrow: arrowImg
    };
  },
  methods: {
    openApp: function openApp() {
      var _this = this;

      if (!window.gwdImgApp) {
        var el = document.createElement('div');
        document.body.appendChild(el);
        window.gwdImgApp = new Vue({
          el: el,
          render: function render(h) {
            return h(_IndexVue2['default'], {
              props: {
                img: _this.img,
                price: _this.price
              },
              ref: 'index'
            });
          }
        });
      }
      window.gwdImgApp.$refs.index.open();
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17)["default"]))

/***/ }),
/* 221 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, $, G, Vue) {

var _require = __webpack_require__(731);

var MiniSameList = _require['default'];

var extConsole = __webpack_require__(6);

module.exports = {
  init: function init() {
    var price, items, skuId, sku, existedShops, data, el, miniBarEl;
    return regeneratorRuntime.async(function init$(context$1$0) {
      var _this2 = this;

      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          $('body > #gwd_mini_compare').remove();
          context$1$0.next = 3;
          return regeneratorRuntime.awrap(__webpack_require__(4).met('dpSlist'));

        case 3:
          context$1$0.next = 5;
          return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

        case 5:
          price = context$1$0.sent;

          if (G.dp.price && price > G.dp.price) {
            price = G.dp.price;
          }
          items = G.dp.slist.filter(function (x) {
            return x.url_crc;
          });
          skuId = __webpack_require__(10).getParameterByName('skuId');

          if (G.site === 'taobao' && window.Hub) {
            sku = Hub.config.get('sku');

            skuId = sku.skuId;
          }
          if (skuId && G.allowBackgroundRequest) {
            // try {
            //   const tbHighValueSameItems = await require('common/thirdPartyApis/taobaoHighValueUserSameItem').get(G.dp.itemId, skuId)
            //   if (tbHighValueSameItems && tbHighValueSameItems.data && tbHighValueSameItems.data.result) {
            //     const newItems = (tbHighValueSameItems.data.result.filter(item => item.rebate).map(item => {
            //       item.is_tmall = item.shopTag.includes('XXXXXX-16')
            //       item.title = item.itemTitle
            //       item.price = item.zkPrice
            //       item.shop = item.shopName
            //       item.dpId = `${item.itemId}-${item.is_tmall ? '83': '123'}`
            //       return item
            //     }))
            //     items = items.concat(newItems)
            //   }
            // } catch (e) {
            //   console.error(e)
            // }
          }
          __webpack_require__(4).setMet('miniItemList', items);
          existedShops = [];
          data = items.map(function (item) {
            item.site = item.is_tmall ? '83' : '123';
            item.view_price = item.price;
            item.shopName = item.shop;
            if (!item.dpId) {
              item.dpId = item.url_crc + '-' + item.site;
            }
            if (!item.soldNum) {
              item.soldNum = item.sales;
            }
            item.url = G.tb_server + '/extension/qrpage?directLink=1&dp_id=' + item.dpId + '&title=' + encodeURIComponent(item.title) + '&price=' + item.view_price + '&shopName=' + encodeURIComponent(item.shopName) + '&img=' + encodeURIComponent(item.img) + '&sellAmount=' + encodeURIComponent(item.soldNum) + '&union=' + G.union;
            return item;
          }).filter(function (item) {
            if (existedShops.includes(item.shopName)) {
              return false;
            }
            if (item.dpId.split('-')[0] === G.dp.dpId.split('-')[0]) {
              return false;
            }
            existedShops.push(item.shopName);
            return true;
          });

          data.sort(function (a, b) {
            return a.view_price - b.view_price;
          });
          el = '#gwd_mini_compare';

          if (!(G.aliUIVersion !== '0.2.55')) {
            context$1$0.next = 19;
            break;
          }

          context$1$0.next = 19;
          return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
            return !$('.miniPanel').length;
          }));

        case 19:
          miniBarEl = undefined;

          if (!data.length) {
            context$1$0.next = 23;
            break;
          }

          context$1$0.next = 23;
          return regeneratorRuntime.awrap((function callee$1$0() {
            var position, bodyOffset, miniBarApp, app;
            return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  position = {};

                  if (!(G.aliUIVersion !== '0.2.55')) {
                    context$2$0.next = 18;
                    break;
                  }

                  context$2$0.next = 4;
                  return regeneratorRuntime.awrap(__webpack_require__(10).sleep(100));

                case 4:
                  context$2$0.next = 6;
                  return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                    return $(el).length;
                  }));

                case 6:
                  bodyOffset = __webpack_require__(10).getBodyOffset(el);
                  miniBarApp = new Vue({
                    el: el,
                    render: function render(h) {
                      return h(MiniSameList, {
                        props: {
                          data: data,
                          pri: parseFloat(price),
                          position: {}
                        }
                      });
                    }
                  });

                  miniBarEl = miniBarApp.$el;

                  el = document.createElement('div');
                  el.style.position = 'absolute';
                  el.style.top = bodyOffset.top + 'px';
                  el.style.left = bodyOffset.left + 'px';
                  document.body.appendChild(el);
                  position.top = bodyOffset.top;
                  position.left = bodyOffset.left;
                  position.width = bodyOffset.width;
                  position.height = bodyOffset.height;

                case 18:
                  app = new Vue({
                    el: el,
                    data: function data() {
                      return {
                        position: position
                      };
                    },
                    render: function render(h) {
                      return h(MiniSameList, {
                        props: {
                          data: data,
                          pri: parseFloat(price),
                          position: position
                        }
                      });
                    },
                    mounted: function mounted() {
                      var _this = this;

                      // when window resize, update position
                      var posReset = function posReset() {
                        var bodyOffset = __webpack_require__(10).getBodyOffset(miniBarEl);
                        _this.position.top = bodyOffset.top;
                        _this.position.left = bodyOffset.left;
                        _this.position.width = bodyOffset.width;
                        _this.position.height = bodyOffset.height;
                      };
                      window.addEventListener('resize', posReset);
                      setTimeout(function () {
                        posReset();
                      }, 500);
                    }
                  });

                  G.miniCompareApp = app;

                case 20:
                case 'end':
                  return context$2$0.stop();
              }
            }, null, _this2);
          })());

        case 23:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  },
  reset: function reset() {
    $('#gwd_mini_compare').remove();
    G.miniCompareApp = null;
  }
};

// if (G.from_device === 'bijiago' && !$(el).length) {
//   el = document.createElement('div')
//   el.style.borderRight = '1px solid #e6e9eb'
//   $('.bjgext-mini-trend').after(el)
//   $('.gwd-middle-tmall').remove()
// }

// data = [...data, ...data]
// for (let i = 0; i < 18; i++) {
//   data.push(data[0])
// }

// 这个仅作为占位，实际悬浮后的组件位于body下面

// await require('common/commonUtil').sleep(100)
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(1), __webpack_require__(0), __webpack_require__(17)["default"]))

/***/ }),
/* 222 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js__ = __webpack_require__(223);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 223 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var log = __webpack_require__(14);

exports['default'] = {
  props: ['data', 'pri', 'position'],
  data: function data() {
    return {
      isBjg: G.from_device === 'bijiago'
    };
  },
  mounted: function mounted() {
    log('miniCompare:length', this.data.length);
  },
  methods: {
    transText: function transText(text) {
      var map = {
        '更低价': '更低價',
        '暂无结果': '暫無結果',
        '其他': '其他',
        '家报价': '家報價'
      };
      if (G.lang === 'zh-tr') {
        return map[text] || text;
      } else {
        return text;
      }
    },
    logLink: function logLink() {
      log('miniCompare:linkClick');
    },
    logHover: function logHover() {
      log('miniCompare:hover');
    },
    mouseover: function mouseover() {
      if (this.position.top) {
        $('.gwd-minibar-bg #gwd_mini_compare').addClass('ms-tab-enter');
        if (G.from_device.includes('bijiago')) {
          $('#bjgext_minibar #gwd_mini_compare').addClass('bjg-hover-bg');
        }
      }
    },
    mouseleave: function mouseleave() {
      if (this.position.top) {
        $('.gwd-minibar-bg #gwd_mini_compare').removeClass('ms-tab-enter');
        if (G.from_device.includes('bijiago')) {
          $('#bjgext_minibar #gwd_mini_compare').removeClass('bjg-hover-bg');
        }
      }
    }
  },
  computed: {
    style: function style() {
      if (this.position.top) {
        var style = {
          top: this.position.top + 'px',
          left: this.position.left + 'px',
          width: this.position.width + 1 + 'px',
          height: this.position.height + 'px',
          position: 'absolute'
        };
        if (G.from_device.includes('bijiago')) {
          style.background = 'transparent';
          style.borderRight = 'none';
        }
        return style;
      }
      return {};
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 224 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js__ = __webpack_require__(225);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, '__esModule', {
  value: true
});

function copyTextToClipboard(text) {
  var textArea = document.createElement('textarea');
  textArea.value = text;
  document.body.appendChild(textArea);
  textArea.select();
  document.execCommand('copy');
  document.body.removeChild(textArea);
}

exports['default'] = {
  props: ['getTKL'],
  data: function data() {
    return {
      tkl: '',
      copied: false
    };
  },
  methods: {
    transText: __webpack_require__(32),
    click: function click() {
      var _this = this;

      if (!this.tkl) {
        console.log(this.getTKL);
        this.getTKL(function (data) {
          if (data) {
            _this.tkl = '7' + data;
          } else {
            _this.tkl = location.href;
          }
        });
      } else {
        this.copyTkl();
      }
    },
    copyTkl: function copyTkl() {
      copyTextToClipboard(this.tkl);
      this.copied = true;
    }
  }
};
module.exports = exports['default'];

/***/ }),
/* 226 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js__ = __webpack_require__(227);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_script_lang_js___default.a); 

/***/ }),
/* 227 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime) {

Object.defineProperty(exports, '__esModule', {
  value: true
});

var commonUtil = __webpack_require__(10);

exports['default'] = {
  props: ['data', 'top', 'additionalClass'],
  data: function data() {
    return {
      mt: 0,
      debugMode: !!window.GwdToolkit,
      // debugMode: false,
      search: $('#key').val(),
      content: '',
      from: location.hostname === 'search.jd.com' || location.hostname === 'list.jd.com' ? '京东搜索结果页' : '商品详情页',
      rankName: '',
      id: parseInt(Math.random() * 10000)
    };
  },
  mounted: function mounted() {
    if (this.top) {
      this.mt = this.top;
    }
    if (!window.gwdRank) {
      window.gwdRank = this;
    }
  },
  methods: {
    rankClick: function rankClick(item) {
      var link, contentId, rankType, payload, url, res, search;
      return regeneratorRuntime.async(function rankClick$(context$1$0) {
        var _this = this;

        while (1) switch (context$1$0.prev = context$1$0.next) {
          case 0:
            if (!location.hostname.includes('.jd.com')) {
              window.open(item.rurl);
            }
            link = commonUtil.getParameterByName('target_url', item.rurl);
            contentId = commonUtil.getParameterByName('contentId', link);
            rankType = commonUtil.getParameterByName('rankType', link);
            payload = {
              functionId: 'getRankLanding',
              appid: 'JDReactRankingList',
              body: JSON.stringify({
                version: '109',
                rankType: rankType,
                source: 'dacu',
                rankId: contentId,
                extraParam: {},
                fromName: '-100',
                hasVenderRank: '1'
              }),
              clientVersion: '9.4.2',
              client: 'wh5',
              uuid: Date.now() * 1000 + parseInt(Math.random() * 1000),
              area: '1_2802_54747_0'
            };
            url = __webpack_require__(3).buildUrl('https://api.m.jd.com/client.action', payload);
            context$1$0.next = 8;
            return regeneratorRuntime.awrap(__webpack_require__(3).requestXHR(url));

          case 8:
            res = context$1$0.sent;

            this.content = JSON.stringify(res.result.products.map(function (item) {
              item.zyTag = parseInt(item.zyTag);
              return item;
            }));
            this.rankName = item.rname;
            search = $('#key').val();

            this.search = search ? search : 'fake';
            this.$nextTick(function () {
              $('#gwd-jdrank-submit-' + _this.id).click();
            });

          case 14:
          case 'end':
            return context$1$0.stop();
        }
      }, null, this);
    }
  },
  computed: {
    addition: function addition() {
      return this.data.length ? this.data.filter(function (item, idx) {
        return idx > 0;
      }) : [];
    }
  }
};
module.exports = exports['default'];
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5)))

/***/ }),
/* 228 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pagetype = $data.pagetype, data = $data.data, housecode = $data.housecode, server = $data.server, s_server = $data.s_server;
    $$out += '<div class="house-trend-box ';
    $$out += $escape(pagetype);
    $$out += ' trend-box';
    $$out += $escape(data.trend);
    $$out += '">\n  <div class="houset-btn">\n    <a class="house-trend-bg" title="撸房价"></a>\n    <div class="ht-trend-desc">\n      <span class="h-color';
    $$out += $escape(data.trend);
    $$out += '">';
    $$out += $escape(data.trendMsg);
    $$out += '</span>\n      <em class="trend-icon';
    $$out += $escape(data.trend);
    $$out += ' house-trend-bg"></em>\n    </div>\n    <div class="ht-price-remind" data-id="';
    $$out += $escape(housecode);
    $$out += '">\n      <em class="house-trend-bg"></em>\n      <span>降价提醒</span>  \n    </div>\n  </div>\n  <div class="houset-detail">\n    <div class="house-trend-img" id="house-trend-';
    $$out += $escape(housecode);
    $$out += '" >\n       <img data-src="';
    $$out += $escape(server);
    $$out += $escape(data.trendImg);
    $$out += '&width=460&height=210&plotFontSize=10">\n    </div>\n    <div class="house-price-qrcode">\n      <span class="mgtop">每日成交行情</span>\n      <span class="red-pri">最新降价房源</span>\n      <img src="';
    $$out += $escape(s_server);
    $$out += '/images/extensions/newbar/housepri-qrcode2.png">\n      <p>扫码关注撸房价</p>\n      <p class="house-p-p2">降价提醒你</p>\n    </div>\n    <div class="price-range">\n      ';
    if (data.maxPrice == data.minPrice) {
        $$out += '\n        <span >现价\uFF1A';
        $$out += $escape(data.maxPrice);
        $$out += '万</span>\n      ';
    } else {
        $$out += '\n        <span class="toppri">最高价:';
        $$out += $escape(data.maxPrice);
        $$out += '万</span>\n        <span class="lowpri">最低价:';
        $$out += $escape(data.minPrice);
        $$out += '万</span>\n      ';
    }
    $$out += '\n    </div>\n    <div class="change_trend_btn">\n      <div>\n        <span class="bjg-house-trend-b trend-choose">房源行情</span>\n        <span class="bjg-community-trend-b">小区行情</span>\n      </div>\n      \n    </div>\n    <div class="community-price" id="bjg-community-';
    $$out += $escape(housecode);
    $$out += '" data-u="';
    $$out += $escape(server);
    $$out += $escape(data.communityPrice);
    $$out += '" data-c="';
    $$out += $escape(data.community);
    $$out += '"></div>\n  </div>\n  <div class="ht-wxqrcode">\n    <span class="ht-wx-sp1">关注公众号</span>\n    <span class="ht-wx-sp2">房源降价实时提醒</span>\n    <img src="';
    $$out += $escape(s_server);
    $$out += '/images/extensions/newbar/housepri-qrcode2.png">\n    <span class="ht-wx-sp3">不再提示</span>\n  </div>\n\n</div>';
    return $$out;
};

/***/ }),
/* 229 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, Vue, G, $) {

var bgClient = __webpack_require__(16);
(function callee$0$0() {
  var Vuex, installSource, allowList, cnzz;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        Vuex = __webpack_require__(24);

        Vue.use(Vuex);
        'use strict';
        __webpack_require__(230);
        // require('bjgou/modules/util').settings('lang', 'zh-tr')
        // G.ss_name = 'priceDog'
        // G.lang = 'zh-tr'
        // G.disableLogin = true
        __webpack_require__(231).init();
        __webpack_require__(35).init();
        __webpack_require__(232).init();
        __webpack_require__(19).tongjiLog('bdvisit');
        console.log('bjgou init', location.href);
        window.bjgouBg = __webpack_require__(16);
        context$1$0.next = 12;
        return regeneratorRuntime.awrap(bjgouBg.get('/getStorage', {
          key: 'install_source'
        }));

      case 12:
        installSource = context$1$0.sent;

        if (installSource) {
          G.union = 'union_bijiago_' + installSource;
        }
        console.log(window.bjgouHasBg);

        G.instanceId = parseInt(Math.random() * 10000);
        __webpack_require__(6).log('set instance id', G.instanceId);
        $('html').attr('data-bjg-id', G.instanceId);

        __webpack_require__(238).init();
        allowList = ['www.xiaohongshu.com'];

        if (!(G.pageInfo.type === 0 && !allowList.includes(location.hostname))) {
          context$1$0.next = 22;
          break;
        }

        return context$1$0.abrupt('return');

      case 22:
        cnzz = __webpack_require__(12);

        if (cnzz) cnzz.init(G.bd_cnzz);
        if (location.host === 'm.fine3q.com') __webpack_require__(259).init();
        __webpack_require__(260);
        console.time('bjgou');
        __webpack_require__(261).init(function () {
          if (__webpack_require__(262)) return;
          if (G.site == 'iqiyi') G.set_force = false;
          console.timeEnd('bjgou');
          __webpack_require__(78).common(function (data) {
            if (data && data.result instanceof Array) {
              G.set_force = false;
              G.forbidCoupon = true;
            } else if (data && data.result) {
              var result = data.result.address;
              if (result.indexOf('北京') > -1 || result.indexOf('上海') > -1 || result.indexOf('广州') > -1 || result.indexOf('深圳') > -1 || result.indexOf('杭州') > -1) {
                G.set_force = false;
                G.forbidAd = true;
              } else if (result.indexOf('南京') > -1) {
                G.set_force = false;
              }
              if (result.indexOf('北京') > -1 || result.indexOf('上海') > -1) {
                G.forbidTkl = true;
              }
              if (result.indexOf('北京') > -1 || result.indexOf('杭州') > -1) {
                G.forbidCoupon = true;
                G.forbidApp = true;
              }
            }

            __webpack_require__(21).getRate(function () {
              __webpack_require__(79).init();
            });
          });
        });

      case 28:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this);
})();
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(17)["default"], __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 230 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {//添加基本的参数配置和函数


var protocol = location.protocol === 'https:' ? 'https:' : 'http:';
G.extend({
  crc64: 1,
  server: protocol + '//browser.bijiago.com',
  s_server: protocol + '//cdn.bijiago.com',
  u_server: protocol + '//u.bijiago.com',
  tb_server: 'https://tb.bijiago.com',
  img_server: 'http://f67dfe7ee7e63.cdn.sohucs.com',
  img64_server: 'http://645568b71d6b6.cdn.sohucs.com',
  loadImg: protocol + '//cdn.bijiago.com/template/aug/images/new/120.gif',
  noImg: protocol + '//cdn.bijiago.com/images/extensions/default_load_image.png',
  bd_cnzz: 'https://s22.cnzz.com/z_stat.php?id=1273747289&web_id=1273747289',
  specialUnion: protocol + "//u.smartlinkclick.com/union/go/",
  u_house: protocol + '//api.lufangjia.com',
  cssname: "bjext2-new.css",
  union: "union_bijiago",
  from_device: "bijiago",
  gwd_h: $('head').append,
  from_type: "bjg_chm",
  show_wishlist: 1,
  // chrome_extension: true,
  set_force: true,
  extBrand: 'bd',
  extName: 'bjext',
  ss_name: 'bijiago',
  ut: '&trans=1',
  subsite_id: '',
  force: [],
  href: window.location ? window.location.href : '',
  gwd_cnzz: '',
  allowBackgroundRequest: true
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 231 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var bgClient = __webpack_require__(16);

module.exports.init = function () {
  if (location.href.indexOf('www.bijiago.com/login') > -1) {
    (function () {
      var t = setInterval(function () {
        if (window.res) {
          clearInterval(t);
          console.log('found', window.res);
          console.log(window.to);
          bgClient.get('/cookies/set', {
            token: window.res.data.token,
            time: parseInt(new Date(window.res.data.time.replace(' ', 'T')).getTime() / 1000).toString(),
            expire: window.res.data.expire
          }).then(function (res) {
            location.href = window.to;
          });
        }
      }, 300);
    })();
  }
};

/***/ }),
/* 232 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var DynamicDetails = __webpack_require__(70).DynamicDetails;
var collectMovement = __webpack_require__(70).collectMovement;
var communicate = __webpack_require__(18);
var Fingerprint2 = __webpack_require__(233);

function readLocalStorage() {
  return new Promise(function (resolve) {});
}

module.exports.init = function () {
  var details = new DynamicDetails();
  try {
    (function () {
      var k = localStorage.getItem('gwdang-dfp-obj');
      var r = JSON.parse(k);
      Object.keys(r).forEach(function (item) {
        details[item] = r[item];
      });
    })();
  } catch (e) {}
  if (window.requestIdleCallback) {
    requestIdleCallback(function () {
      collectMovement(details);
    });
  } else {
    setTimeout(function () {
      collectMovement(details);
    }, 500);
  }

  var fp = '';
  Fingerprint2.get({
    fonts: {
      extendedJsFonts: false
    },
    excludes: {
      userAgent: true,
      enumerateDevices: true,
      pixelRatio: true,
      doNotTrack: true,
      fontsFlash: true
    }
  }, function (components) {
    var values = components.map(function (component) {
      return component.value;
    });
    var murmur = Fingerprint2.x64hash128(values.join(''), 31);
    fp = murmur;
    communicate.trigger({
      type: 'fp',
      value: fp
    });
    localStorage.setItem('gwdang-fp', fp);
  });

  var k = setInterval(function () {
    var collected = details.encode();
    localStorage.setItem('gwdang-dfp-obj', JSON.stringify(details));
    communicate.trigger({
      type: 'fingerprint',
      value: collected
    });
    localStorage.setItem('gwdang-dfp', collected);
  }, 2000);

  setTimeout(function () {
    clearInterval(k);
  }, 300000);
};

/***/ }),
/* 233 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
* Fingerprintjs2 2.1.4 - Modern & flexible browser fingerprint library v2
* https://github.com/fingerprintjs/fingerprintjs
* Copyright (c) 2020 Valentin Vasilyev (valentin@fingerprintjs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL VALENTIN VASILYEV BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This software contains code from open-source projects:
* MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)
*/

/* global define */
(function (name, context, definition) {
  'use strict'
  if (typeof window !== 'undefined' && "function" === 'function' && __webpack_require__(71)) { !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) } else if (typeof module !== 'undefined' && module.exports) { module.exports = definition() } else if (context.exports) { context.exports = definition() } else { context[name] = definition() }
})('Fingerprint2', this, function () {
  'use strict'

  // detect if object is array
  // only implement if no native implementation is available
  if (typeof Array.isArray === 'undefined') {
    Array.isArray = function (obj) {
      return Object.prototype.toString.call(obj) === '[object Array]'
    }
  };

  /// MurmurHash3 related functions

  //
  // Given two 64bit ints (as an array of two 32bit ints) returns the two
  // added together as a 64bit int (as an array of two 32bit ints).
  //
  var x64Add = function (m, n) {
    m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
    n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
    var o = [0, 0, 0, 0]
    o[3] += m[3] + n[3]
    o[2] += o[3] >>> 16
    o[3] &= 0xffff
    o[2] += m[2] + n[2]
    o[1] += o[2] >>> 16
    o[2] &= 0xffff
    o[1] += m[1] + n[1]
    o[0] += o[1] >>> 16
    o[1] &= 0xffff
    o[0] += m[0] + n[0]
    o[0] &= 0xffff
    return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
  }

  //
  // Given two 64bit ints (as an array of two 32bit ints) returns the two
  // multiplied together as a 64bit int (as an array of two 32bit ints).
  //
  var x64Multiply = function (m, n) {
    m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
    n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
    var o = [0, 0, 0, 0]
    o[3] += m[3] * n[3]
    o[2] += o[3] >>> 16
    o[3] &= 0xffff
    o[2] += m[2] * n[3]
    o[1] += o[2] >>> 16
    o[2] &= 0xffff
    o[2] += m[3] * n[2]
    o[1] += o[2] >>> 16
    o[2] &= 0xffff
    o[1] += m[1] * n[3]
    o[0] += o[1] >>> 16
    o[1] &= 0xffff
    o[1] += m[2] * n[2]
    o[0] += o[1] >>> 16
    o[1] &= 0xffff
    o[1] += m[3] * n[1]
    o[0] += o[1] >>> 16
    o[1] &= 0xffff
    o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0])
    o[0] &= 0xffff
    return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
  }
  //
  // Given a 64bit int (as an array of two 32bit ints) and an int
  // representing a number of bit positions, returns the 64bit int (as an
  // array of two 32bit ints) rotated left by that number of positions.
  //
  var x64Rotl = function (m, n) {
    n %= 64
    if (n === 32) {
      return [m[1], m[0]]
    } else if (n < 32) {
      return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
    } else {
      n -= 32
      return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
    }
  }
  //
  // Given a 64bit int (as an array of two 32bit ints) and an int
  // representing a number of bit positions, returns the 64bit int (as an
  // array of two 32bit ints) shifted left by that number of positions.
  //
  var x64LeftShift = function (m, n) {
    n %= 64
    if (n === 0) {
      return m
    } else if (n < 32) {
      return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]
    } else {
      return [m[1] << (n - 32), 0]
    }
  }
  //
  // Given two 64bit ints (as an array of two 32bit ints) returns the two
  // xored together as a 64bit int (as an array of two 32bit ints).
  //
  var x64Xor = function (m, n) {
    return [m[0] ^ n[0], m[1] ^ n[1]]
  }
  //
  // Given a block, returns murmurHash3's final x64 mix of that block.
  // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the
  // only place where we need to right shift 64bit ints.)
  //
  var x64Fmix = function (h) {
    h = x64Xor(h, [0, h[0] >>> 1])
    h = x64Multiply(h, [0xff51afd7, 0xed558ccd])
    h = x64Xor(h, [0, h[0] >>> 1])
    h = x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53])
    h = x64Xor(h, [0, h[0] >>> 1])
    return h
  }

  //
  // Given a string and an optional seed as an int, returns a 128 bit
  // hash using the x64 flavor of MurmurHash3, as an unsigned hex.
  //
  var x64hash128 = function (key, seed) {
    key = key || ''
    seed = seed || 0
    var remainder = key.length % 16
    var bytes = key.length - remainder
    var h1 = [0, seed]
    var h2 = [0, seed]
    var k1 = [0, 0]
    var k2 = [0, 0]
    var c1 = [0x87c37b91, 0x114253d5]
    var c2 = [0x4cf5ad43, 0x2745937f]
    for (var i = 0; i < bytes; i = i + 16) {
      k1 = [((key.charCodeAt(i + 4) & 0xff)) | ((key.charCodeAt(i + 5) & 0xff) << 8) | ((key.charCodeAt(i + 6) & 0xff) << 16) | ((key.charCodeAt(i + 7) & 0xff) << 24), ((key.charCodeAt(i) & 0xff)) | ((key.charCodeAt(i + 1) & 0xff) << 8) | ((key.charCodeAt(i + 2) & 0xff) << 16) | ((key.charCodeAt(i + 3) & 0xff) << 24)]
      k2 = [((key.charCodeAt(i + 12) & 0xff)) | ((key.charCodeAt(i + 13) & 0xff) << 8) | ((key.charCodeAt(i + 14) & 0xff) << 16) | ((key.charCodeAt(i + 15) & 0xff) << 24), ((key.charCodeAt(i + 8) & 0xff)) | ((key.charCodeAt(i + 9) & 0xff) << 8) | ((key.charCodeAt(i + 10) & 0xff) << 16) | ((key.charCodeAt(i + 11) & 0xff) << 24)]
      k1 = x64Multiply(k1, c1)
      k1 = x64Rotl(k1, 31)
      k1 = x64Multiply(k1, c2)
      h1 = x64Xor(h1, k1)
      h1 = x64Rotl(h1, 27)
      h1 = x64Add(h1, h2)
      h1 = x64Add(x64Multiply(h1, [0, 5]), [0, 0x52dce729])
      k2 = x64Multiply(k2, c2)
      k2 = x64Rotl(k2, 33)
      k2 = x64Multiply(k2, c1)
      h2 = x64Xor(h2, k2)
      h2 = x64Rotl(h2, 31)
      h2 = x64Add(h2, h1)
      h2 = x64Add(x64Multiply(h2, [0, 5]), [0, 0x38495ab5])
    }
    k1 = [0, 0]
    k2 = [0, 0]
    switch (remainder) {
      case 15:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 14)], 48))
      // fallthrough
      case 14:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 13)], 40))
      // fallthrough
      case 13:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 12)], 32))
      // fallthrough
      case 12:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 11)], 24))
      // fallthrough
      case 11:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 10)], 16))
      // fallthrough
      case 10:
        k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 9)], 8))
      // fallthrough
      case 9:
        k2 = x64Xor(k2, [0, key.charCodeAt(i + 8)])
        k2 = x64Multiply(k2, c2)
        k2 = x64Rotl(k2, 33)
        k2 = x64Multiply(k2, c1)
        h2 = x64Xor(h2, k2)
      // fallthrough
      case 8:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 7)], 56))
      // fallthrough
      case 7:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 6)], 48))
      // fallthrough
      case 6:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 5)], 40))
      // fallthrough
      case 5:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 4)], 32))
      // fallthrough
      case 4:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 3)], 24))
      // fallthrough
      case 3:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 2)], 16))
      // fallthrough
      case 2:
        k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 1)], 8))
      // fallthrough
      case 1:
        k1 = x64Xor(k1, [0, key.charCodeAt(i)])
        k1 = x64Multiply(k1, c1)
        k1 = x64Rotl(k1, 31)
        k1 = x64Multiply(k1, c2)
        h1 = x64Xor(h1, k1)
      // fallthrough
    }
    h1 = x64Xor(h1, [0, key.length])
    h2 = x64Xor(h2, [0, key.length])
    h1 = x64Add(h1, h2)
    h2 = x64Add(h2, h1)
    h1 = x64Fmix(h1)
    h2 = x64Fmix(h2)
    h1 = x64Add(h1, h2)
    h2 = x64Add(h2, h1)
    return ('00000000' + (h1[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h1[1] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[1] >>> 0).toString(16)).slice(-8)
  }

  var defaultOptions = {
    preprocessor: null,
    audio: {
      timeout: 1000,
      // On iOS 11, audio context can only be used in response to user interaction.
      // We require users to explicitly enable audio fingerprinting on iOS 11.
      // See https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088
      excludeIOS11: true
    },
    fonts: {
      swfContainerId: 'fingerprintjs2',
      swfPath: 'flash/compiled/FontList.swf',
      userDefinedFonts: [],
      extendedJsFonts: false
    },
    screen: {
      // To ensure consistent fingerprints when users rotate their mobile devices
      detectScreenOrientation: true
    },
    plugins: {
      sortPluginsFor: [/palemoon/i],
      excludeIE: false
    },
    extraComponents: [],
    excludes: {
      // Unreliable on Windows, see https://github.com/fingerprintjs/fingerprintjs/issues/375
      'enumerateDevices': true,
      // devicePixelRatio depends on browser zoom, and it's impossible to detect browser zoom
      'pixelRatio': true,
      // DNT depends on incognito mode for some browsers (Chrome) and it's impossible to detect incognito mode
      'doNotTrack': true,
      // uses js fonts already
      'fontsFlash': true,
      // Extensions (including AdBlock) are disabled by default in Incognito mod of Chrome and Firefox
      // See https://github.com/fingerprintjs/fingerprintjs/issues/405
      'adBlock': true
    },
    NOT_AVAILABLE: 'not available',
    ERROR: 'error',
    EXCLUDED: 'excluded'
  }

  var each = function (obj, iterator) {
    if (Array.prototype.forEach && obj.forEach === Array.prototype.forEach) {
      obj.forEach(iterator)
    } else if (obj.length === +obj.length) {
      for (var i = 0, l = obj.length; i < l; i++) {
        iterator(obj[i], i, obj)
      }
    } else {
      for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
          iterator(obj[key], key, obj)
        }
      }
    }
  }

  var map = function (obj, iterator) {
    var results = []
    // Not using strict equality so that this acts as a
    // shortcut to checking for `null` and `undefined`.
    if (obj == null) {
      return results
    }
    if (Array.prototype.map && obj.map === Array.prototype.map) { return obj.map(iterator) }
    each(obj, function (value, index, list) {
      results.push(iterator(value, index, list))
    })
    return results
  }

  var extendSoft = function (target, source) {
    if (source == null) { return target }
    var value
    var key
    for (key in source) {
      value = source[key]
      if (value != null && !(Object.prototype.hasOwnProperty.call(target, key))) {
        target[key] = value
      }
    }
    return target
  }

  // https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices
  var enumerateDevicesKey = function (done, options) {
    if (!isEnumerateDevicesSupported()) {
      return done(options.NOT_AVAILABLE)
    }
    navigator.mediaDevices.enumerateDevices().then(function (devices) {
      done(devices.map(function (device) {
        return 'id=' + device.deviceId + ';gid=' + device.groupId + ';' + device.kind + ';' + device.label
      }))
    }).catch(function (error) {
      done(error)
    })
  }

  var isEnumerateDevicesSupported = function () {
    return (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices)
  }
  // Inspired by and based on https://github.com/cozylife/audio-fingerprint
  var audioKey = function (done, options) {
    var audioOptions = options.audio
    if (audioOptions.excludeIOS11 && navigator.userAgent.match(/OS 11.+Version\/11.+Safari/)) {
      // See comment for excludeUserAgent and https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088
      return done(options.EXCLUDED)
    }

    var AudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext

    if (AudioContext == null) {
      return done(options.NOT_AVAILABLE)
    }

    var context = new AudioContext(1, 44100, 44100)

    var oscillator = context.createOscillator()
    oscillator.type = 'triangle'
    oscillator.frequency.setValueAtTime(10000, context.currentTime)

    var compressor = context.createDynamicsCompressor()
    each([
      ['threshold', -50],
      ['knee', 40],
      ['ratio', 12],
      ['reduction', -20],
      ['attack', 0],
      ['release', 0.25]
    ], function (item) {
      if (compressor[item[0]] !== undefined && typeof compressor[item[0]].setValueAtTime === 'function') {
        compressor[item[0]].setValueAtTime(item[1], context.currentTime)
      }
    })

    oscillator.connect(compressor)
    compressor.connect(context.destination)
    oscillator.start(0)
    context.startRendering()

    var audioTimeoutId = setTimeout(function () {
      console.warn('Audio fingerprint timed out. Please report bug at https://github.com/fingerprintjs/fingerprintjs with your user agent: "' + navigator.userAgent + '".')
      context.oncomplete = function () { }
      context = null
      return done('audioTimeout')
    }, audioOptions.timeout)

    context.oncomplete = function (event) {
      var fingerprint
      try {
        clearTimeout(audioTimeoutId)
        fingerprint = event.renderedBuffer.getChannelData(0)
          .slice(4500, 5000)
          .reduce(function (acc, val) { return acc + Math.abs(val) }, 0)
          .toString()
        oscillator.disconnect()
        compressor.disconnect()
      } catch (error) {
        done(error)
        return
      }
      done(fingerprint)
    }
  }
  var UserAgent = function (done) {
    done(navigator.userAgent)
  }
  var webdriver = function (done, options) {
    done(navigator.webdriver == null ? options.NOT_AVAILABLE : navigator.webdriver)
  }
  var languageKey = function (done, options) {
    done(navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || options.NOT_AVAILABLE)
  }
  var colorDepthKey = function (done, options) {
    done(window.screen.colorDepth || options.NOT_AVAILABLE)
  }
  var deviceMemoryKey = function (done, options) {
    done(navigator.deviceMemory || options.NOT_AVAILABLE)
  }
  var pixelRatioKey = function (done, options) {
    done(window.devicePixelRatio || options.NOT_AVAILABLE)
  }
  var screenResolutionKey = function (done, options) {
    done(getScreenResolution(options))
  }
  var getScreenResolution = function (options) {
    var resolution = [window.screen.width, window.screen.height]
    if (options.screen.detectScreenOrientation) {
      resolution.sort().reverse()
    }
    return resolution
  }
  var availableScreenResolutionKey = function (done, options) {
    done(getAvailableScreenResolution(options))
  }
  var getAvailableScreenResolution = function (options) {
    if (window.screen.availWidth && window.screen.availHeight) {
      var available = [window.screen.availHeight, window.screen.availWidth]
      if (options.screen.detectScreenOrientation) {
        available.sort().reverse()
      }
      return available
    }
    // headless browsers
    return options.NOT_AVAILABLE
  }
  var timezoneOffset = function (done) {
    done(new Date().getTimezoneOffset())
  }
  var timezone = function (done, options) {
    if (window.Intl && window.Intl.DateTimeFormat) {
      done(new window.Intl.DateTimeFormat().resolvedOptions().timeZone || options.NOT_AVAILABLE)
      return
    }
    done(options.NOT_AVAILABLE)
  }
  var sessionStorageKey = function (done, options) {
    done(hasSessionStorage(options))
  }
  var localStorageKey = function (done, options) {
    done(hasLocalStorage(options))
  }
  var indexedDbKey = function (done, options) {
    done(hasIndexedDB(options))
  }
  var addBehaviorKey = function (done) {
    done(!!window.HTMLElement.prototype.addBehavior)
  }
  var openDatabaseKey = function (done) {
    done(!!window.openDatabase)
  }
  var cpuClassKey = function (done, options) {
    done(getNavigatorCpuClass(options))
  }
  var platformKey = function (done, options) {
    done(getNavigatorPlatform(options))
  }
  var doNotTrackKey = function (done, options) {
    done(getDoNotTrack(options))
  }
  var canvasKey = function (done, options) {
    if (isCanvasSupported()) {
      done(getCanvasFp(options))
      return
    }
    done(options.NOT_AVAILABLE)
  }
  var webglKey = function (done, options) {
    if (isWebGlSupported()) {
      done(getWebglFp())
      return
    }
    done(options.NOT_AVAILABLE)
  }
  var webglVendorAndRendererKey = function (done) {
    if (isWebGlSupported()) {
      done(getWebglVendorAndRenderer())
      return
    }
    done()
  }
  var adBlockKey = function (done) {
    done(getAdBlock())
  }
  var hasLiedLanguagesKey = function (done) {
    done(getHasLiedLanguages())
  }
  var hasLiedResolutionKey = function (done) {
    done(getHasLiedResolution())
  }
  var hasLiedOsKey = function (done) {
    done(getHasLiedOs())
  }
  var hasLiedBrowserKey = function (done) {
    done(getHasLiedBrowser())
  }
  // flash fonts (will increase fingerprinting time 20X to ~ 130-150ms)
  var flashFontsKey = function (done, options) {
    // we do flash if swfobject is loaded
    if (!hasSwfObjectLoaded()) {
      return done('swf object not loaded')
    }
    if (!hasMinFlashInstalled()) {
      return done('flash not installed')
    }
    if (!options.fonts.swfPath) {
      return done('missing options.fonts.swfPath')
    }
    loadSwfAndDetectFonts(function (fonts) {
      done(fonts)
    }, options)
  }
  // kudos to http://www.lalit.org/lab/javascript-css-font-detect/
  var jsFontsKey = function (done, options) {
    // a font will be compared against all the three default fonts.
    // and if it doesn't match all 3 then that font is not available.
    var baseFonts = ['monospace', 'sans-serif', 'serif']

    var fontList = [
      'Andale Mono', 'Arial', 'Arial Black', 'Arial Hebrew', 'Arial MT', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS',
      'Bitstream Vera Sans Mono', 'Book Antiqua', 'Bookman Old Style',
      'Calibri', 'Cambria', 'Cambria Math', 'Century', 'Century Gothic', 'Century Schoolbook', 'Comic Sans', 'Comic Sans MS', 'Consolas', 'Courier', 'Courier New',
      'Geneva', 'Georgia',
      'Helvetica', 'Helvetica Neue',
      'Impact',
      'Lucida Bright', 'Lucida Calligraphy', 'Lucida Console', 'Lucida Fax', 'LUCIDA GRANDE', 'Lucida Handwriting', 'Lucida Sans', 'Lucida Sans Typewriter', 'Lucida Sans Unicode',
      'Microsoft Sans Serif', 'Monaco', 'Monotype Corsiva', 'MS Gothic', 'MS Outlook', 'MS PGothic', 'MS Reference Sans Serif', 'MS Sans Serif', 'MS Serif', 'MYRIAD', 'MYRIAD PRO',
      'Palatino', 'Palatino Linotype',
      'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Light', 'Segoe UI Semibold', 'Segoe UI Symbol',
      'Tahoma', 'Times', 'Times New Roman', 'Times New Roman PS', 'Trebuchet MS',
      'Verdana', 'Wingdings', 'Wingdings 2', 'Wingdings 3'
    ]

    if (options.fonts.extendedJsFonts) {
      var extendedFontList = [
        'Abadi MT Condensed Light', 'Academy Engraved LET', 'ADOBE CASLON PRO', 'Adobe Garamond', 'ADOBE GARAMOND PRO', 'Agency FB', 'Aharoni', 'Albertus Extra Bold', 'Albertus Medium', 'Algerian', 'Amazone BT', 'American Typewriter',
        'American Typewriter Condensed', 'AmerType Md BT', 'Andalus', 'Angsana New', 'AngsanaUPC', 'Antique Olive', 'Aparajita', 'Apple Chancery', 'Apple Color Emoji', 'Apple SD Gothic Neo', 'Arabic Typesetting', 'ARCHER',
        'ARNO PRO', 'Arrus BT', 'Aurora Cn BT', 'AvantGarde Bk BT', 'AvantGarde Md BT', 'AVENIR', 'Ayuthaya', 'Bandy', 'Bangla Sangam MN', 'Bank Gothic', 'BankGothic Md BT', 'Baskerville',
        'Baskerville Old Face', 'Batang', 'BatangChe', 'Bauer Bodoni', 'Bauhaus 93', 'Bazooka', 'Bell MT', 'Bembo', 'Benguiat Bk BT', 'Berlin Sans FB', 'Berlin Sans FB Demi', 'Bernard MT Condensed', 'BernhardFashion BT', 'BernhardMod BT', 'Big Caslon', 'BinnerD',
        'Blackadder ITC', 'BlairMdITC TT', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bodoni MT', 'Bodoni MT Black', 'Bodoni MT Condensed', 'Bodoni MT Poster Compressed',
        'Bookshelf Symbol 7', 'Boulder', 'Bradley Hand', 'Bradley Hand ITC', 'Bremen Bd BT', 'Britannic Bold', 'Broadway', 'Browallia New', 'BrowalliaUPC', 'Brush Script MT', 'Californian FB', 'Calisto MT', 'Calligrapher', 'Candara',
        'CaslonOpnface BT', 'Castellar', 'Centaur', 'Cezanne', 'CG Omega', 'CG Times', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charlesworth', 'Charter Bd BT', 'Charter BT', 'Chaucer',
        'ChelthmITC Bk BT', 'Chiller', 'Clarendon', 'Clarendon Condensed', 'CloisterBlack BT', 'Cochin', 'Colonna MT', 'Constantia', 'Cooper Black', 'Copperplate', 'Copperplate Gothic', 'Copperplate Gothic Bold',
        'Copperplate Gothic Light', 'CopperplGoth Bd BT', 'Corbel', 'Cordia New', 'CordiaUPC', 'Cornerstone', 'Coronet', 'Cuckoo', 'Curlz MT', 'DaunPenh', 'Dauphin', 'David', 'DB LCD Temp', 'DELICIOUS', 'Denmark',
        'DFKai-SB', 'Didot', 'DilleniaUPC', 'DIN', 'DokChampa', 'Dotum', 'DotumChe', 'Ebrima', 'Edwardian Script ITC', 'Elephant', 'English 111 Vivace BT', 'Engravers MT', 'EngraversGothic BT', 'Eras Bold ITC', 'Eras Demi ITC', 'Eras Light ITC', 'Eras Medium ITC',
        'EucrosiaUPC', 'Euphemia', 'Euphemia UCAS', 'EUROSTILE', 'Exotc350 Bd BT', 'FangSong', 'Felix Titling', 'Fixedsys', 'FONTIN', 'Footlight MT Light', 'Forte',
        'FrankRuehl', 'Fransiscan', 'Freefrm721 Blk BT', 'FreesiaUPC', 'Freestyle Script', 'French Script MT', 'FrnkGothITC Bk BT', 'Fruitger', 'FRUTIGER',
        'Futura', 'Futura Bk BT', 'Futura Lt BT', 'Futura Md BT', 'Futura ZBlk BT', 'FuturaBlack BT', 'Gabriola', 'Galliard BT', 'Gautami', 'Geeza Pro', 'Geometr231 BT', 'Geometr231 Hv BT', 'Geometr231 Lt BT', 'GeoSlab 703 Lt BT',
        'GeoSlab 703 XBd BT', 'Gigi', 'Gill Sans', 'Gill Sans MT', 'Gill Sans MT Condensed', 'Gill Sans MT Ext Condensed Bold', 'Gill Sans Ultra Bold', 'Gill Sans Ultra Bold Condensed', 'Gisha', 'Gloucester MT Extra Condensed', 'GOTHAM', 'GOTHAM BOLD',
        'Goudy Old Style', 'Goudy Stout', 'GoudyHandtooled BT', 'GoudyOLSt BT', 'Gujarati Sangam MN', 'Gulim', 'GulimChe', 'Gungsuh', 'GungsuhChe', 'Gurmukhi MN', 'Haettenschweiler', 'Harlow Solid Italic', 'Harrington', 'Heather', 'Heiti SC', 'Heiti TC', 'HELV',
        'Herald', 'High Tower Text', 'Hiragino Kaku Gothic ProN', 'Hiragino Mincho ProN', 'Hoefler Text', 'Humanst 521 Cn BT', 'Humanst521 BT', 'Humanst521 Lt BT', 'Imprint MT Shadow', 'Incised901 Bd BT', 'Incised901 BT',
        'Incised901 Lt BT', 'INCONSOLATA', 'Informal Roman', 'Informal011 BT', 'INTERSTATE', 'IrisUPC', 'Iskoola Pota', 'JasmineUPC', 'Jazz LET', 'Jenson', 'Jester', 'Jokerman', 'Juice ITC', 'Kabel Bk BT', 'Kabel Ult BT', 'Kailasa', 'KaiTi', 'Kalinga', 'Kannada Sangam MN',
        'Kartika', 'Kaufmann Bd BT', 'Kaufmann BT', 'Khmer UI', 'KodchiangUPC', 'Kokila', 'Korinna BT', 'Kristen ITC', 'Krungthep', 'Kunstler Script', 'Lao UI', 'Latha', 'Leelawadee', 'Letter Gothic', 'Levenim MT', 'LilyUPC', 'Lithograph', 'Lithograph Light', 'Long Island',
        'Lydian BT', 'Magneto', 'Maiandra GD', 'Malayalam Sangam MN', 'Malgun Gothic',
        'Mangal', 'Marigold', 'Marion', 'Marker Felt', 'Market', 'Marlett', 'Matisse ITC', 'Matura MT Script Capitals', 'Meiryo', 'Meiryo UI', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Tai Le',
        'Microsoft Uighur', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU', 'MingLiU_HKSCS', 'MingLiU_HKSCS-ExtB', 'MingLiU-ExtB', 'Minion', 'Minion Pro', 'Miriam', 'Miriam Fixed', 'Mistral', 'Modern', 'Modern No. 20', 'Mona Lisa Solid ITC TT', 'Mongolian Baiti',
        'MONO', 'MoolBoran', 'Mrs Eaves', 'MS LineDraw', 'MS Mincho', 'MS PMincho', 'MS Reference Specialty', 'MS UI Gothic', 'MT Extra', 'MUSEO', 'MV Boli',
        'Nadeem', 'Narkisim', 'NEVIS', 'News Gothic', 'News GothicMT', 'NewsGoth BT', 'Niagara Engraved', 'Niagara Solid', 'Noteworthy', 'NSimSun', 'Nyala', 'OCR A Extended', 'Old Century', 'Old English Text MT', 'Onyx', 'Onyx BT', 'OPTIMA', 'Oriya Sangam MN',
        'OSAKA', 'OzHandicraft BT', 'Palace Script MT', 'Papyrus', 'Parchment', 'Party LET', 'Pegasus', 'Perpetua', 'Perpetua Titling MT', 'PetitaBold', 'Pickwick', 'Plantagenet Cherokee', 'Playbill', 'PMingLiU', 'PMingLiU-ExtB',
        'Poor Richard', 'Poster', 'PosterBodoni BT', 'PRINCETOWN LET', 'Pristina', 'PTBarnum BT', 'Pythagoras', 'Raavi', 'Rage Italic', 'Ravie', 'Ribbon131 Bd BT', 'Rockwell', 'Rockwell Condensed', 'Rockwell Extra Bold', 'Rod', 'Roman', 'Sakkal Majalla',
        'Santa Fe LET', 'Savoye LET', 'Sceptre', 'Script', 'Script MT Bold', 'SCRIPTINA', 'Serifa', 'Serifa BT', 'Serifa Th BT', 'ShelleyVolante BT', 'Sherwood',
        'Shonar Bangla', 'Showcard Gothic', 'Shruti', 'Signboard', 'SILKSCREEN', 'SimHei', 'Simplified Arabic', 'Simplified Arabic Fixed', 'SimSun', 'SimSun-ExtB', 'Sinhala Sangam MN', 'Sketch Rockwell', 'Skia', 'Small Fonts', 'Snap ITC', 'Snell Roundhand', 'Socket',
        'Souvenir Lt BT', 'Staccato222 BT', 'Steamer', 'Stencil', 'Storybook', 'Styllo', 'Subway', 'Swis721 BlkEx BT', 'Swiss911 XCm BT', 'Sylfaen', 'Synchro LET', 'System', 'Tamil Sangam MN', 'Technical', 'Teletype', 'Telugu Sangam MN', 'Tempus Sans ITC',
        'Terminal', 'Thonburi', 'Traditional Arabic', 'Trajan', 'TRAJAN PRO', 'Tristan', 'Tubular', 'Tunga', 'Tw Cen MT', 'Tw Cen MT Condensed', 'Tw Cen MT Condensed Extra Bold',
        'TypoUpright BT', 'Unicorn', 'Univers', 'Univers CE 55 Medium', 'Univers Condensed', 'Utsaah', 'Vagabond', 'Vani', 'Vijaya', 'Viner Hand ITC', 'VisualUI', 'Vivaldi', 'Vladimir Script', 'Vrinda', 'Westminster', 'WHITNEY', 'Wide Latin',
        'ZapfEllipt BT', 'ZapfHumnst BT', 'ZapfHumnst Dm BT', 'Zapfino', 'Zurich BlkEx BT', 'Zurich Ex BT', 'ZWAdobeF']
      fontList = fontList.concat(extendedFontList)
    }

    fontList = fontList.concat(options.fonts.userDefinedFonts)

    // remove duplicate fonts
    fontList = fontList.filter(function (font, position) {
      return fontList.indexOf(font) === position
    })

    // we use m or w because these two characters take up the maximum width.
    // And we use a LLi so that the same matching fonts can get separated
    var testString = 'mmmmmmmmmmlli'

    // we test using 72px font size, we may use any size. I guess larger the better.
    var testSize = '72px'

    var h = document.getElementsByTagName('body')[0]

    // div to load spans for the base fonts
    var baseFontsDiv = document.createElement('div')

    // div to load spans for the fonts to detect
    var fontsDiv = document.createElement('div')

    var defaultWidth = {}
    var defaultHeight = {}

    // creates a span where the fonts will be loaded
    var createSpan = function () {
      var s = document.createElement('span')
      /*
       * We need this css as in some weird browser this
       * span elements shows up for a microSec which creates a
       * bad user experience
       */
      s.style.position = 'absolute'
      s.style.left = '-9999px'
      s.style.fontSize = testSize

      // css font reset to reset external styles
      s.style.fontStyle = 'normal'
      s.style.fontWeight = 'normal'
      s.style.letterSpacing = 'normal'
      s.style.lineBreak = 'auto'
      s.style.lineHeight = 'normal'
      s.style.textTransform = 'none'
      s.style.textAlign = 'left'
      s.style.textDecoration = 'none'
      s.style.textShadow = 'none'
      s.style.whiteSpace = 'normal'
      s.style.wordBreak = 'normal'
      s.style.wordSpacing = 'normal'

      s.innerHTML = testString
      return s
    }

    // creates a span and load the font to detect and a base font for fallback
    var createSpanWithFonts = function (fontToDetect, baseFont) {
      var s = createSpan()
      s.style.fontFamily = "'" + fontToDetect + "'," + baseFont
      return s
    }

    // creates spans for the base fonts and adds them to baseFontsDiv
    var initializeBaseFontsSpans = function () {
      var spans = []
      for (var index = 0, length = baseFonts.length; index < length; index++) {
        var s = createSpan()
        s.style.fontFamily = baseFonts[index]
        baseFontsDiv.appendChild(s)
        spans.push(s)
      }
      return spans
    }

    // creates spans for the fonts to detect and adds them to fontsDiv
    var initializeFontsSpans = function () {
      var spans = {}
      for (var i = 0, l = fontList.length; i < l; i++) {
        var fontSpans = []
        for (var j = 0, numDefaultFonts = baseFonts.length; j < numDefaultFonts; j++) {
          var s = createSpanWithFonts(fontList[i], baseFonts[j])
          fontsDiv.appendChild(s)
          fontSpans.push(s)
        }
        spans[fontList[i]] = fontSpans // Stores {fontName : [spans for that font]}
      }
      return spans
    }

    // checks if a font is available
    var isFontAvailable = function (fontSpans) {
      var detected = false
      for (var i = 0; i < baseFonts.length; i++) {
        detected = (fontSpans[i].offsetWidth !== defaultWidth[baseFonts[i]] || fontSpans[i].offsetHeight !== defaultHeight[baseFonts[i]])
        if (detected) {
          return detected
        }
      }
      return detected
    }

    // create spans for base fonts
    var baseFontsSpans = initializeBaseFontsSpans()

    // add the spans to the DOM
    h.appendChild(baseFontsDiv)

    // get the default width for the three base fonts
    for (var index = 0, length = baseFonts.length; index < length; index++) {
      defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth // width for the default font
      defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight // height for the default font
    }

    // create spans for fonts to detect
    var fontsSpans = initializeFontsSpans()

    // add all the spans to the DOM
    h.appendChild(fontsDiv)

    // check available fonts
    var available = []
    for (var i = 0, l = fontList.length; i < l; i++) {
      if (isFontAvailable(fontsSpans[fontList[i]])) {
        available.push(fontList[i])
      }
    }

    // remove spans from DOM
    h.removeChild(fontsDiv)
    h.removeChild(baseFontsDiv)
    done(available)
  }
  var pluginsComponent = function (done, options) {
    if (isIE()) {
      if (!options.plugins.excludeIE) {
        done(getIEPlugins(options))
      } else {
        done(options.EXCLUDED)
      }
    } else {
      done(getRegularPlugins(options))
    }
  }
  var getRegularPlugins = function (options) {
    if (navigator.plugins == null) {
      return options.NOT_AVAILABLE
    }

    var plugins = []
    // plugins isn't defined in Node envs.
    for (var i = 0, l = navigator.plugins.length; i < l; i++) {
      if (navigator.plugins[i]) { plugins.push(navigator.plugins[i]) }
    }

    // sorting plugins only for those user agents, that we know randomize the plugins
    // every time we try to enumerate them
    if (pluginsShouldBeSorted(options)) {
      plugins = plugins.sort(function (a, b) {
        if (a.name > b.name) { return 1 }
        if (a.name < b.name) { return -1 }
        return 0
      })
    }
    return map(plugins, function (p) {
      var mimeTypes = map(p, function (mt) {
        return [mt.type, mt.suffixes]
      })
      return [p.name, p.description, mimeTypes]
    })
  }
  var getIEPlugins = function (options) {
    var result = []
    if ((Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) || ('ActiveXObject' in window)) {
      var names = [
        'AcroPDF.PDF', // Adobe PDF reader 7+
        'Adodb.Stream',
        'AgControl.AgControl', // Silverlight
        'DevalVRXCtrl.DevalVRXCtrl.1',
        'MacromediaFlashPaper.MacromediaFlashPaper',
        'Msxml2.DOMDocument',
        'Msxml2.XMLHTTP',
        'PDF.PdfCtrl', // Adobe PDF reader 6 and earlier, brrr
        'QuickTime.QuickTime', // QuickTime
        'QuickTimeCheckObject.QuickTimeCheck.1',
        'RealPlayer',
        'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)',
        'RealVideo.RealVideo(tm) ActiveX Control (32-bit)',
        'Scripting.Dictionary',
        'SWCtl.SWCtl', // ShockWave player
        'Shell.UIHelper',
        'ShockwaveFlash.ShockwaveFlash', // flash plugin
        'Skype.Detection',
        'TDCCtl.TDCCtl',
        'WMPlayer.OCX', // Windows media player
        'rmocx.RealPlayer G2 Control',
        'rmocx.RealPlayer G2 Control.1'
      ]
      // starting to detect plugins in IE
      result = map(names, function (name) {
        try {
          // eslint-disable-next-line no-new
          new window.ActiveXObject(name)
          return name
        } catch (e) {
          return options.ERROR
        }
      })
    } else {
      result.push(options.NOT_AVAILABLE)
    }
    if (navigator.plugins) {
      result = result.concat(getRegularPlugins(options))
    }
    return result
  }
  var pluginsShouldBeSorted = function (options) {
    var should = false
    for (var i = 0, l = options.plugins.sortPluginsFor.length; i < l; i++) {
      var re = options.plugins.sortPluginsFor[i]
      if (navigator.userAgent.match(re)) {
        should = true
        break
      }
    }
    return should
  }
  var touchSupportKey = function (done) {
    done(getTouchSupport())
  }
  var hardwareConcurrencyKey = function (done, options) {
    done(getHardwareConcurrency(options))
  }
  var hasSessionStorage = function (options) {
    try {
      return !!window.sessionStorage
    } catch (e) {
      return options.ERROR // SecurityError when referencing it means it exists
    }
  }

  // https://bugzilla.mozilla.org/show_bug.cgi?id=781447
  var hasLocalStorage = function (options) {
    try {
      return !!window.localStorage
    } catch (e) {
      return options.ERROR // SecurityError when referencing it means it exists
    }
  }
  var hasIndexedDB = function (options) {
    // IE and Edge don't allow accessing indexedDB in private mode, therefore IE and Edge will have different
    // fingerprints in normal and private modes.
    if (isIEOrOldEdge()) {
      return options.EXCLUDED
    }
    try {
      return !!window.indexedDB
    } catch (e) {
      return options.ERROR // SecurityError when referencing it means it exists
    }
  }
  var getHardwareConcurrency = function (options) {
    if (navigator.hardwareConcurrency) {
      return navigator.hardwareConcurrency
    }
    return options.NOT_AVAILABLE
  }
  var getNavigatorCpuClass = function (options) {
    return navigator.cpuClass || options.NOT_AVAILABLE
  }
  var getNavigatorPlatform = function (options) {
    if (navigator.platform) {
      return navigator.platform
    } else {
      return options.NOT_AVAILABLE
    }
  }
  var getDoNotTrack = function (options) {
    if (navigator.doNotTrack) {
      return navigator.doNotTrack
    } else if (navigator.msDoNotTrack) {
      return navigator.msDoNotTrack
    } else if (window.doNotTrack) {
      return window.doNotTrack
    } else {
      return options.NOT_AVAILABLE
    }
  }
  // This is a crude and primitive touch screen detection.
  // It's not possible to currently reliably detect the  availability of a touch screen
  // with a JS, without actually subscribing to a touch event.
  // http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
  // https://github.com/Modernizr/Modernizr/issues/548
  // method returns an array of 3 values:
  // maxTouchPoints, the success or failure of creating a TouchEvent,
  // and the availability of the 'ontouchstart' property

  var getTouchSupport = function () {
    var maxTouchPoints = 0
    var touchEvent
    if (typeof navigator.maxTouchPoints !== 'undefined') {
      maxTouchPoints = navigator.maxTouchPoints
    } else if (typeof navigator.msMaxTouchPoints !== 'undefined') {
      maxTouchPoints = navigator.msMaxTouchPoints
    }
    try {
      document.createEvent('TouchEvent')
      touchEvent = true
    } catch (_) {
      touchEvent = false
    }
    var touchStart = 'ontouchstart' in window
    return [maxTouchPoints, touchEvent, touchStart]
  }
  // https://www.browserleaks.com/canvas#how-does-it-work

  var getCanvasFp = function (options) {
    var result = []
    // Very simple now, need to make it more complex (geo shapes etc)
    var canvas = document.createElement('canvas')
    canvas.width = 2000
    canvas.height = 200
    canvas.style.display = 'inline'
    var ctx = canvas.getContext('2d')
    // detect browser support of canvas winding
    // http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/
    // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/canvas/winding.js
    ctx.rect(0, 0, 10, 10)
    ctx.rect(2, 2, 6, 6)
    result.push('canvas winding:' + ((ctx.isPointInPath(5, 5, 'evenodd') === false) ? 'yes' : 'no'))

    ctx.textBaseline = 'alphabetic'
    ctx.fillStyle = '#f60'
    ctx.fillRect(125, 1, 62, 20)
    ctx.fillStyle = '#069'
    // https://github.com/fingerprintjs/fingerprintjs/issues/66
    if (options.dontUseFakeFontInCanvas) {
      ctx.font = '11pt Arial'
    } else {
      ctx.font = '11pt no-real-font-123'
    }
    ctx.fillText('Cwm fjordbank glyphs vext quiz, \ud83d\ude03', 2, 15)
    ctx.fillStyle = 'rgba(102, 204, 0, 0.2)'
    ctx.font = '18pt Arial'
    ctx.fillText('Cwm fjordbank glyphs vext quiz, \ud83d\ude03', 4, 45)

    // canvas blending
    // http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
    // http://jsfiddle.net/NDYV8/16/
    ctx.globalCompositeOperation = 'multiply'
    ctx.fillStyle = 'rgb(255,0,255)'
    ctx.beginPath()
    ctx.arc(50, 50, 50, 0, Math.PI * 2, true)
    ctx.closePath()
    ctx.fill()
    ctx.fillStyle = 'rgb(0,255,255)'
    ctx.beginPath()
    ctx.arc(100, 50, 50, 0, Math.PI * 2, true)
    ctx.closePath()
    ctx.fill()
    ctx.fillStyle = 'rgb(255,255,0)'
    ctx.beginPath()
    ctx.arc(75, 100, 50, 0, Math.PI * 2, true)
    ctx.closePath()
    ctx.fill()
    ctx.fillStyle = 'rgb(255,0,255)'
    // canvas winding
    // http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/
    // http://jsfiddle.net/NDYV8/19/
    ctx.arc(75, 75, 75, 0, Math.PI * 2, true)
    ctx.arc(75, 75, 25, 0, Math.PI * 2, true)
    ctx.fill('evenodd')

    if (canvas.toDataURL) { result.push('canvas fp:' + canvas.toDataURL()) }
    return result
  }
  var getWebglFp = function () {
    var gl
    var fa2s = function (fa) {
      gl.clearColor(0.0, 0.0, 0.0, 1.0)
      gl.enable(gl.DEPTH_TEST)
      gl.depthFunc(gl.LEQUAL)
      gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
      return '[' + fa[0] + ', ' + fa[1] + ']'
    }
    var maxAnisotropy = function (gl) {
      var ext = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic') || gl.getExtension('MOZ_EXT_texture_filter_anisotropic')
      if (ext) {
        var anisotropy = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT)
        if (anisotropy === 0) {
          anisotropy = 2
        }
        return anisotropy
      } else {
        return null
      }
    }

    gl = getWebglCanvas()
    if (!gl) { return null }
    // WebGL fingerprinting is a combination of techniques, found in MaxMind antifraud script & Augur fingerprinting.
    // First it draws a gradient object with shaders and convers the image to the Base64 string.
    // Then it enumerates all WebGL extensions & capabilities and appends them to the Base64 string, resulting in a huge WebGL string, potentially very unique on each device
    // Since iOS supports webgl starting from version 8.1 and 8.1 runs on several graphics chips, the results may be different across ios devices, but we need to verify it.
    var result = []
    var vShaderTemplate = 'attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}'
    var fShaderTemplate = 'precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}'
    var vertexPosBuffer = gl.createBuffer()
    gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer)
    var vertices = new Float32Array([-0.2, -0.9, 0, 0.4, -0.26, 0, 0, 0.732134444, 0])
    gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW)
    vertexPosBuffer.itemSize = 3
    vertexPosBuffer.numItems = 3
    var program = gl.createProgram()
    var vshader = gl.createShader(gl.VERTEX_SHADER)
    gl.shaderSource(vshader, vShaderTemplate)
    gl.compileShader(vshader)
    var fshader = gl.createShader(gl.FRAGMENT_SHADER)
    gl.shaderSource(fshader, fShaderTemplate)
    gl.compileShader(fshader)
    gl.attachShader(program, vshader)
    gl.attachShader(program, fshader)
    gl.linkProgram(program)
    gl.useProgram(program)
    program.vertexPosAttrib = gl.getAttribLocation(program, 'attrVertex')
    program.offsetUniform = gl.getUniformLocation(program, 'uniformOffset')
    gl.enableVertexAttribArray(program.vertexPosArray)
    gl.vertexAttribPointer(program.vertexPosAttrib, vertexPosBuffer.itemSize, gl.FLOAT, !1, 0, 0)
    gl.uniform2f(program.offsetUniform, 1, 1)
    gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertexPosBuffer.numItems)
    try {
      result.push(gl.canvas.toDataURL())
    } catch (e) {
      /* .toDataURL may be absent or broken (blocked by extension) */
    }
    result.push('extensions:' + (gl.getSupportedExtensions() || []).join(';'))
    result.push('webgl aliased line width range:' + fa2s(gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)))
    result.push('webgl aliased point size range:' + fa2s(gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE)))
    result.push('webgl alpha bits:' + gl.getParameter(gl.ALPHA_BITS))
    result.push('webgl antialiasing:' + (gl.getContextAttributes().antialias ? 'yes' : 'no'))
    result.push('webgl blue bits:' + gl.getParameter(gl.BLUE_BITS))
    result.push('webgl depth bits:' + gl.getParameter(gl.DEPTH_BITS))
    result.push('webgl green bits:' + gl.getParameter(gl.GREEN_BITS))
    result.push('webgl max anisotropy:' + maxAnisotropy(gl))
    result.push('webgl max combined texture image units:' + gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS))
    result.push('webgl max cube map texture size:' + gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE))
    result.push('webgl max fragment uniform vectors:' + gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS))
    result.push('webgl max render buffer size:' + gl.getParameter(gl.MAX_RENDERBUFFER_SIZE))
    result.push('webgl max texture image units:' + gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS))
    result.push('webgl max texture size:' + gl.getParameter(gl.MAX_TEXTURE_SIZE))
    result.push('webgl max varying vectors:' + gl.getParameter(gl.MAX_VARYING_VECTORS))
    result.push('webgl max vertex attribs:' + gl.getParameter(gl.MAX_VERTEX_ATTRIBS))
    result.push('webgl max vertex texture image units:' + gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS))
    result.push('webgl max vertex uniform vectors:' + gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS))
    result.push('webgl max viewport dims:' + fa2s(gl.getParameter(gl.MAX_VIEWPORT_DIMS)))
    result.push('webgl red bits:' + gl.getParameter(gl.RED_BITS))
    result.push('webgl renderer:' + gl.getParameter(gl.RENDERER))
    result.push('webgl shading language version:' + gl.getParameter(gl.SHADING_LANGUAGE_VERSION))
    result.push('webgl stencil bits:' + gl.getParameter(gl.STENCIL_BITS))
    result.push('webgl vendor:' + gl.getParameter(gl.VENDOR))
    result.push('webgl version:' + gl.getParameter(gl.VERSION))

    try {
      // Add the unmasked vendor and unmasked renderer if the debug_renderer_info extension is available
      var extensionDebugRendererInfo = gl.getExtension('WEBGL_debug_renderer_info')
      if (extensionDebugRendererInfo) {
        result.push('webgl unmasked vendor:' + gl.getParameter(extensionDebugRendererInfo.UNMASKED_VENDOR_WEBGL))
        result.push('webgl unmasked renderer:' + gl.getParameter(extensionDebugRendererInfo.UNMASKED_RENDERER_WEBGL))
      }
    } catch (e) { /* squelch */ }

    if (!gl.getShaderPrecisionFormat) {
      loseWebglContext(gl)
      return result
    }

    each(['FLOAT', 'INT'], function (numType) {
      each(['VERTEX', 'FRAGMENT'], function (shader) {
        each(['HIGH', 'MEDIUM', 'LOW'], function (numSize) {
          each(['precision', 'rangeMin', 'rangeMax'], function (key) {
            var format = gl.getShaderPrecisionFormat(gl[shader + '_SHADER'], gl[numSize + '_' + numType])[key]
            if (key !== 'precision') {
              key = 'precision ' + key
            }
            var line = ['webgl ', shader.toLowerCase(), ' shader ', numSize.toLowerCase(), ' ', numType.toLowerCase(), ' ', key, ':', format].join('')
            result.push(line)
          })
        })
      })
    })
    loseWebglContext(gl)
    return result
  }
  var getWebglVendorAndRenderer = function () {
    /* This a subset of the WebGL fingerprint with a lot of entropy, while being reasonably browser-independent */
    try {
      var glContext = getWebglCanvas()
      var extensionDebugRendererInfo = glContext.getExtension('WEBGL_debug_renderer_info')
      var params = glContext.getParameter(extensionDebugRendererInfo.UNMASKED_VENDOR_WEBGL) + '~' + glContext.getParameter(extensionDebugRendererInfo.UNMASKED_RENDERER_WEBGL)
      loseWebglContext(glContext)
      return params
    } catch (e) {
      return null
    }
  }
  var getAdBlock = function () {
    var ads = document.createElement('div')
    ads.innerHTML = '&nbsp;'
    ads.className = 'adsbox'
    var result = false
    try {
      // body may not exist, that's why we need try/catch
      document.body.appendChild(ads)
      result = document.getElementsByClassName('adsbox')[0].offsetHeight === 0
      document.body.removeChild(ads)
    } catch (e) {
      result = false
    }
    return result
  }
  var getHasLiedLanguages = function () {
    // We check if navigator.language is equal to the first language of navigator.languages
    // navigator.languages is undefined on IE11 (and potentially older IEs)
    if (typeof navigator.languages !== 'undefined') {
      try {
        var firstLanguages = navigator.languages[0].substr(0, 2)
        if (firstLanguages !== navigator.language.substr(0, 2)) {
          return true
        }
      } catch (err) {
        return true
      }
    }
    return false
  }
  var getHasLiedResolution = function () {
    return window.screen.width < window.screen.availWidth || window.screen.height < window.screen.availHeight
  }
  var getHasLiedOs = function () {
    var userAgent = navigator.userAgent.toLowerCase()
    var oscpu = navigator.oscpu
    var platform = navigator.platform.toLowerCase()
    var os
    // We extract the OS from the user agent (respect the order of the if else if statement)
    if (userAgent.indexOf('windows phone') >= 0) {
      os = 'Windows Phone'
    } else if (userAgent.indexOf('windows') >= 0 || userAgent.indexOf('win16') >= 0 || userAgent.indexOf('win32') >= 0 || userAgent.indexOf('win64') >= 0 || userAgent.indexOf('win95') >= 0 || userAgent.indexOf('win98') >= 0 || userAgent.indexOf('winnt') >= 0 || userAgent.indexOf('wow64') >= 0) {
      os = 'Windows'
    } else if (userAgent.indexOf('android') >= 0) {
      os = 'Android'
    } else if (userAgent.indexOf('linux') >= 0 || userAgent.indexOf('cros') >= 0 || userAgent.indexOf('x11') >= 0) {
      os = 'Linux'
    } else if (userAgent.indexOf('iphone') >= 0 || userAgent.indexOf('ipad') >= 0 || userAgent.indexOf('ipod') >= 0 || userAgent.indexOf('crios') >= 0 || userAgent.indexOf('fxios') >= 0) {
      os = 'iOS'
    } else if (userAgent.indexOf('macintosh') >= 0 || userAgent.indexOf('mac_powerpc)') >= 0) {
      os = 'Mac'
    } else {
      os = 'Other'
    }
    // We detect if the person uses a touch device
    var mobileDevice = (('ontouchstart' in window) ||
      (navigator.maxTouchPoints > 0) ||
      (navigator.msMaxTouchPoints > 0))

    if (mobileDevice && os !== 'Windows' && os !== 'Windows Phone' && os !== 'Android' && os !== 'iOS' && os !== 'Other' && userAgent.indexOf('cros') === -1) {
      return true
    }

    // We compare oscpu with the OS extracted from the UA
    if (typeof oscpu !== 'undefined') {
      oscpu = oscpu.toLowerCase()
      if (oscpu.indexOf('win') >= 0 && os !== 'Windows' && os !== 'Windows Phone') {
        return true
      } else if (oscpu.indexOf('linux') >= 0 && os !== 'Linux' && os !== 'Android') {
        return true
      } else if (oscpu.indexOf('mac') >= 0 && os !== 'Mac' && os !== 'iOS') {
        return true
      } else if ((oscpu.indexOf('win') === -1 && oscpu.indexOf('linux') === -1 && oscpu.indexOf('mac') === -1) !== (os === 'Other')) {
        return true
      }
    }

    // We compare platform with the OS extracted from the UA
    if (platform.indexOf('win') >= 0 && os !== 'Windows' && os !== 'Windows Phone') {
      return true
    } else if ((platform.indexOf('linux') >= 0 || platform.indexOf('android') >= 0 || platform.indexOf('pike') >= 0) && os !== 'Linux' && os !== 'Android') {
      return true
    } else if ((platform.indexOf('mac') >= 0 || platform.indexOf('ipad') >= 0 || platform.indexOf('ipod') >= 0 || platform.indexOf('iphone') >= 0) && os !== 'Mac' && os !== 'iOS') {
      return true
    } else if (platform.indexOf('arm') >= 0 && os === 'Windows Phone') {
      return false
    } else if (platform.indexOf('pike') >= 0 && userAgent.indexOf('opera mini') >= 0) {
      return false
    } else {
      var platformIsOther = platform.indexOf('win') < 0 &&
        platform.indexOf('linux') < 0 &&
        platform.indexOf('mac') < 0 &&
        platform.indexOf('iphone') < 0 &&
        platform.indexOf('ipad') < 0 &&
        platform.indexOf('ipod') < 0
      if (platformIsOther !== (os === 'Other')) {
        return true
      }
    }

    return typeof navigator.plugins === 'undefined' && os !== 'Windows' && os !== 'Windows Phone'
  }
  var getHasLiedBrowser = function () {
    var userAgent = navigator.userAgent.toLowerCase()
    var productSub = navigator.productSub

    // we extract the browser from the user agent (respect the order of the tests)
    var browser
    if (userAgent.indexOf('edge/') >= 0 || userAgent.indexOf('iemobile/') >= 0) {
      // Unreliable, different versions use EdgeHTML, Webkit, Blink, etc.
      return false
    } else if (userAgent.indexOf('opera mini') >= 0) {
      // Unreliable, different modes use Presto, WebView, Webkit, etc.
      return false
    } else if (userAgent.indexOf('firefox/') >= 0) {
      browser = 'Firefox'
    } else if (userAgent.indexOf('opera/') >= 0 || userAgent.indexOf(' opr/') >= 0) {
      browser = 'Opera'
    } else if (userAgent.indexOf('chrome/') >= 0) {
      browser = 'Chrome'
    } else if (userAgent.indexOf('safari/') >= 0) {
      if (userAgent.indexOf('android 1.') >= 0 || userAgent.indexOf('android 2.') >= 0 || userAgent.indexOf('android 3.') >= 0 || userAgent.indexOf('android 4.') >= 0) {
        browser = 'AOSP'
      } else {
        browser = 'Safari'
      }
    } else if (userAgent.indexOf('trident/') >= 0) {
      browser = 'Internet Explorer'
    } else {
      browser = 'Other'
    }

    if ((browser === 'Chrome' || browser === 'Safari' || browser === 'Opera') && productSub !== '20030107') {
      return true
    }

    // eslint-disable-next-line no-eval
    var tempRes = eval.toString().length
    if (tempRes === 37 && browser !== 'Safari' && browser !== 'Firefox' && browser !== 'Other') {
      return true
    } else if (tempRes === 39 && browser !== 'Internet Explorer' && browser !== 'Other') {
      return true
    } else if (tempRes === 33 && browser !== 'Chrome' && browser !== 'AOSP' && browser !== 'Opera' && browser !== 'Other') {
      return true
    }

    // We create an error to see how it is handled
    var errFirefox
    try {
      // eslint-disable-next-line no-throw-literal
      throw 'a'
    } catch (err) {
      try {
        err.toSource()
        errFirefox = true
      } catch (errOfErr) {
        errFirefox = false
      }
    }
    return errFirefox && browser !== 'Firefox' && browser !== 'Other'
  }
  var isCanvasSupported = function () {
    var elem = document.createElement('canvas')
    return !!(elem.getContext && elem.getContext('2d'))
  }
  var isWebGlSupported = function () {
    // code taken from Modernizr
    if (!isCanvasSupported()) {
      return false
    }

    var glContext = getWebglCanvas()
    var isSupported = !!window.WebGLRenderingContext && !!glContext
    loseWebglContext(glContext)
    return isSupported
  }
  var isIE = function () {
    if (navigator.appName === 'Microsoft Internet Explorer') {
      return true
    } else if (navigator.appName === 'Netscape' && /Trident/.test(navigator.userAgent)) { // IE 11
      return true
    }
    return false
  }
  var isIEOrOldEdge = function () {
    // The properties are checked to be in IE 10, IE 11 and Edge 18 and not to be in other browsers
    return ('msWriteProfilerMark' in window) + ('msLaunchUri' in navigator) + ('msSaveBlob' in navigator) >= 2
  }
  var hasSwfObjectLoaded = function () {
    return typeof window.swfobject !== 'undefined'
  }
  var hasMinFlashInstalled = function () {
    return window.swfobject.hasFlashPlayerVersion('9.0.0')
  }
  var addFlashDivNode = function (options) {
    var node = document.createElement('div')
    node.setAttribute('id', options.fonts.swfContainerId)
    document.body.appendChild(node)
  }
  var loadSwfAndDetectFonts = function (done, options) {
    var hiddenCallback = '___fp_swf_loaded'
    window[hiddenCallback] = function (fonts) {
      done(fonts)
    }
    var id = options.fonts.swfContainerId
    addFlashDivNode()
    var flashvars = { onReady: hiddenCallback }
    var flashparams = { allowScriptAccess: 'always', menu: 'false' }
    window.swfobject.embedSWF(options.fonts.swfPath, id, '1', '1', '9.0.0', false, flashvars, flashparams, {})
  }
  var getWebglCanvas = function () {
    var canvas = document.createElement('canvas')
    var gl = null
    try {
      gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl')
    } catch (e) { /* squelch */ }
    if (!gl) { gl = null }
    return gl
  }
  var loseWebglContext = function (context) {
    var loseContextExtension = context.getExtension('WEBGL_lose_context')
    if (loseContextExtension != null) {
      loseContextExtension.loseContext()
    }
  }

  var components = [
    { key: 'userAgent', getData: UserAgent },
    { key: 'webdriver', getData: webdriver },
    { key: 'language', getData: languageKey },
    { key: 'colorDepth', getData: colorDepthKey },
    { key: 'deviceMemory', getData: deviceMemoryKey },
    { key: 'pixelRatio', getData: pixelRatioKey },
    { key: 'hardwareConcurrency', getData: hardwareConcurrencyKey },
    { key: 'screenResolution', getData: screenResolutionKey },
    { key: 'availableScreenResolution', getData: availableScreenResolutionKey },
    { key: 'timezoneOffset', getData: timezoneOffset },
    { key: 'timezone', getData: timezone },
    { key: 'sessionStorage', getData: sessionStorageKey },
    { key: 'localStorage', getData: localStorageKey },
    { key: 'indexedDb', getData: indexedDbKey },
    { key: 'addBehavior', getData: addBehaviorKey },
    { key: 'openDatabase', getData: openDatabaseKey },
    { key: 'cpuClass', getData: cpuClassKey },
    { key: 'platform', getData: platformKey },
    { key: 'doNotTrack', getData: doNotTrackKey },
    { key: 'plugins', getData: pluginsComponent },
    { key: 'canvas', getData: canvasKey },
    { key: 'webgl', getData: webglKey },
    { key: 'webglVendorAndRenderer', getData: webglVendorAndRendererKey },
    { key: 'adBlock', getData: adBlockKey },
    { key: 'hasLiedLanguages', getData: hasLiedLanguagesKey },
    { key: 'hasLiedResolution', getData: hasLiedResolutionKey },
    { key: 'hasLiedOs', getData: hasLiedOsKey },
    { key: 'hasLiedBrowser', getData: hasLiedBrowserKey },
    { key: 'touchSupport', getData: touchSupportKey },
    { key: 'fonts', getData: jsFontsKey, pauseBefore: true },
    { key: 'fontsFlash', getData: flashFontsKey, pauseBefore: true },
    { key: 'audio', getData: audioKey },
    { key: 'enumerateDevices', getData: enumerateDevicesKey }
  ]

  var Fingerprint2 = function (options) {
    throw new Error("'new Fingerprint()' is deprecated, see https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200")
  }

  Fingerprint2.get = function (options, callback) {
    if (!callback) {
      callback = options
      options = {}
    } else if (!options) {
      options = {}
    }
    extendSoft(options, defaultOptions)
    options.components = options.extraComponents.concat(components)

    var keys = {
      data: [],
      addPreprocessedComponent: function (key, value) {
        if (typeof options.preprocessor === 'function') {
          value = options.preprocessor(key, value)
        }
        keys.data.push({ key: key, value: value })
      }
    }

    var i = -1
    var chainComponents = function (alreadyWaited) {
      i += 1
      if (i >= options.components.length) { // on finish
        callback(keys.data)
        return
      }
      var component = options.components[i]

      if (options.excludes[component.key]) {
        chainComponents(false) // skip
        return
      }

      if (!alreadyWaited && component.pauseBefore) {
        i -= 1
        setTimeout(function () {
          chainComponents(true)
        }, 1)
        return
      }

      try {
        component.getData(function (value) {
          keys.addPreprocessedComponent(component.key, value)
          chainComponents(false)
        }, options)
      } catch (error) {
        // main body error
        keys.addPreprocessedComponent(component.key, String(error))
        chainComponents(false)
      }
    }

    chainComponents(false)
  }

  Fingerprint2.getPromise = function (options) {
    return new Promise(function (resolve, reject) {
      Fingerprint2.get(options, resolve)
    })
  }

  Fingerprint2.getV18 = function (options, callback) {
    if (callback == null) {
      callback = options
      options = {}
    }
    return Fingerprint2.get(options, function (components) {
      var newComponents = []
      for (var i = 0; i < components.length; i++) {
        var component = components[i]
        if (component.value === (options.NOT_AVAILABLE || 'not available')) {
          newComponents.push({ key: component.key, value: 'unknown' })
        } else if (component.key === 'plugins') {
          newComponents.push({
            key: 'plugins',
            value: map(component.value, function (p) {
              var mimeTypes = map(p[2], function (mt) {
                if (mt.join) { return mt.join('~') }
                return mt
              }).join(',')
              return [p[0], p[1], mimeTypes].join('::')
            })
          })
        } else if (['canvas', 'webgl'].indexOf(component.key) !== -1 && Array.isArray(component.value)) {
          // sometimes WebGL returns error in headless browsers (during CI testing for example)
          // so we need to join only if the values are array
          newComponents.push({ key: component.key, value: component.value.join('~') })
        } else if (['sessionStorage', 'localStorage', 'indexedDb', 'addBehavior', 'openDatabase'].indexOf(component.key) !== -1) {
          if (component.value) {
            newComponents.push({ key: component.key, value: 1 })
          } else {
            // skip
            continue
          }
        } else {
          if (component.value) {
            newComponents.push(component.value.join ? { key: component.key, value: component.value.join(';') } : component)
          } else {
            newComponents.push({ key: component.key, value: component.value })
          }
        }
      }
      var murmur = x64hash128(map(newComponents, function (component) { return component.value }).join('~~~'), 31)
      callback(murmur, newComponents)
    })
  }

  Fingerprint2.x64hash128 = x64hash128
  Fingerprint2.VERSION = '2.1.4'
  return Fingerprint2
})


/***/ }),
/* 234 */
/***/ (function(module, exports) {

/**
 * Recognize (:<name>regexp) format named captures.
 * and replace exec method of returned RegExp object.
 *
 * This function does not used with normal captures.
 */
function named (regexp) {
	var names = [];
	var ret = new RegExp(regexp.source.replace(/\(:<(\w+)>/g, function (_, name) {
			names.push(name);
			return '(';
		}),
		(regexp.global     ? 'g' : '') +
		(regexp.ignoreCase ? 'i' : '') +
		(regexp.multiline  ? 'm' : '')
	);

	var captures = function (matched) {
		if (!matched) return matched;
		var captures = {};
		for (var i = 0, len = names.length; i < len; i++) {
			var name = names[i];
			if (!captures[name]) captures[name] = [];
			captures[name].push(matched[i + 1]);
		}
		matched.captures = captures;
		matched.capture = function (name) {
			return captures[name][ captures[name].length - 1 ];
		};
		return matched;
	};

	// override RegExp#exec
	ret.exec = function (string) {
		return captures(RegExp.prototype.exec.call(this, string));
	};

	// like String#replace
	ret.replace = function (string, replace) {
		if (typeof replace == 'function') {
			return string.replace(this, function () {
				return replace(captures(Array.prototype.slice.call(arguments)));
			});
		} else {
			return string.replace(this, replace);
		}
	};

	return ret;
}

this.named = named;



/***/ }),
/* 235 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function (txt) {

    var m = '';
    for (var i = 0; i < txt.length; i++) m = m + "_" + txt.charCodeAt(i).toString(8);
    return m;
};

// let decode = function(txt) {
//     var m = '';
//     var s = txt.split("_");
//     for (var i = 1; i < s.length; i++)
//       m += String.fromCharCode(parseInt(s[i], 8));
//     return m;
//   }

/***/ }),
/* 236 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

var pagerParser = {
  timeout: 1000,
  tleEdit: function tleEdit(tle) {
    tle = tle || '';
    tle = tle.replace('[广告]', '');
    return tle;
  },
  priceFormatter: function priceFormatter(price, radixPoint, split, site_id) {
    radixPoint = radixPoint || '.';
    split = split || ',';
    price = '' + price;
    var temp = price.replace(split, '').replace(radixPoint, '.');
    temp = temp.match(/[0-9.]+/);
    if (temp) {
      try {
        return parseFloat(temp);
      } catch (e) {
        return -1;
      }
    }
  },

  template: function template(items_sel, href_sel, price_sel, tle_sel) {
    var items = document.querySelectorAll(items_sel);
    var r = [];
    for (var i = 0; i < items.length; ++i) {
      try {
        var href = items[i].querySelector(href_sel).href;
        var pridom = items[i].querySelector(price_sel);
        if (!pridom) continue;
        var price = pridom.textContent.trim();
        if (!price) continue;
        if (tle_sel) {
          var tledom = items[i].querySelector(tle_sel);
          if (!tledom) continue;
          var tle = tledom.textContent.trim();
        }
        r.push({
          'url': href,
          'price': pagerParser.priceFormatter(price),
          'tle': tle || '',
          'crc32': ''
        });
      } catch (e) {
        continue;
      }
    }
    return r;
  }
};

//amazon
pagerParser[1] = function (document) {
  var r = [];
  var items = document.querySelectorAll('.s-result-item');
  for (var i = 0; i < items.length; ++i) {
    try {
      var img = items[i].querySelector('.s-access-image');
      while (!img.parentNode.href && img.parentNode != document.body) {
        img = img.parentNode;
      }
      if (img.parentNode == document.body) {
        continue;
      }
      var href = img.parentNode.href;
      var price = items[i].querySelector('div>.a-spacing-mini>.a-spacing-none>a>span.a-color-price');
      var tle = items[i].querySelector('div>.a-spacing-mini>.a-spacing-none>a.s-color-twister-title-link h2');
      if (!price) {
        price = items[i].querySelector('span.a-color-price');
      }
      tle = pagerParser.tleEdit(tle.textContent);
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price.textContent),
        'tle': tle,
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//dangdang
pagerParser[2] = function (document) {
  var items = document.querySelectorAll('#search_nature_rg li');
  if (!items.length) {
    items = document.querySelectorAll('#content .shop_box');
  }
  if (!items.length) {
    items = document.querySelectorAll('.shoplist>ul>li');
  }
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a.pic').href;
      var price = items[i].querySelector('.price>span').textContent;
      var tle = items[i].querySelector('p.name>a').textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'tle': tle,
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//jd
pagerParser[3] = function (document) {
  return pagerParser.template('.m-list .gl-warp>li', '.p-img>a', '.p-price em+i', '.p-name>a>em');
};

//ouku
pagerParser[6] = function (document) {
  return pagerParser.template('.item-block', 'a.ctr-track', 'a.price');
};

//newegg
pagerParser[7] = function (document) {
  return pagerParser.template('.main .prolist>li', 'a', 'span.price');
};

//m18
pagerParser[10] = function (document) {
  return pagerParser.template('.item', 'a.thmb', '.prc>strong');
};

//sephora
pagerParser[12] = function (document) {
  return pagerParser.template('#searchResultListDiv li', '.proPic>a', '.proPrice');
};

//lefeng
pagerParser[13] = function (document) {
  return pagerParser.template('#productDivGroup>.pruwrap', 'a', 'span.price');
};

//s.cn
pagerParser[14] = function (document) {
  return pagerParser.template('.product_list>dl', 'dt>a', 'i.price');
};

//menglu
pagerParser[16] = function (document) {
  return pagerParser.template('.smList>ul>li', '.pro155 a', 'span.off');
};

//moonbase
pagerParser[17] = function (document) {
  return pagerParser.template('.chapList dl', 'a', 'span>font');
};

//keede
pagerParser[18] = function (document) {
  return pagerParser.template('#goodsPanel li[class]', 'a', '.classify_price>span');
};

//vancl
pagerParser[19] = function (document) {
  return pagerParser.template('#vanclproducts>ul>li', '.pic a', '.Sprice');
};

//okbuy
pagerParser[21] = function (document) {
  return pagerParser.template('.gl-item', '.gl-img>a', '.okprice');
};

//letao
pagerParser[22] = function (document) {
  return pagerParser.template('.pro_list ul li', '.pro_img>a', '.pro_price');
};

//taoxie
pagerParser[24] = function (document) {
  return pagerParser.template('#list>ul>li', '.pic>a', '.real-price>em');
};

//suning
pagerParser[25] = function (document) {
  setTimeout(function () {
    document._links = pagerParser.template('.product-list li', 'a.sellPoint', '.price-box .def-price', '.title-selling-point');
  }, 2000);
  return {
    wait: true
  };
};

//lusen
pagerParser[27] = function (document) {
  return pagerParser.template('.shows', 'a', '.new');
};

//gome
pagerParser[28] = function (document) {
  return pagerParser.template('#product-box>li', 'a.item-link', '.price');
};

//yhd
pagerParser[31] = function (document) {
  return pagerParser.template('#itemSearchList .mod_search_pro', '.proImg a', '.proPrice .num');
};

//leyou
pagerParser[33] = function (document) {
  return pagerParser.template('.propicList .products', '.pic>a', '.disPrice');
};

//shopin
pagerParser[34] = function (document) {
  return pagerParser.template('.content ul li', 'a', 'strong.price');
};

//xiu
pagerParser[35] = function (document) {
  return pagerParser.template('.item', '.pic>a', 'span.showprice');
};

//mbaobao
pagerParser[36] = function (document) {
  return pagerParser.template('#js-goods-list>ul>li', 'a', 'strong.red');
};

//qinqinbaby
pagerParser[39] = function (document) {
  return pagerParser.template('#proactive>li', '.pro-img a', '.price b.fontYHei');
};

//chunshuitang
pagerParser[40] = function (document) {
  return pagerParser.template('.L_boxlist', 'dt>a', '.L_rmb_xuj');
};

//x
pagerParser[41] = function (document) {
  return pagerParser.template('.s_pro_list li', '.pic>a', '.price');
};

//guopi
pagerParser[42] = function (document) {
  var tr = document.querySelectorAll('#main_table>tbody>tr.img,#main_table>tbody>tr.price');
  var r = [];
  for (var i = 0; i < tr.length; i += 2) {
    try {
      var imgs = tr[i].querySelectorAll('td');
      var prices = tr[i + 1].querySelectorAll('td');
      for (var j = 0; j < imgs.length; ++j) {
        var href = imgs[j].querySelector('a').href;
        var price = prices[j].querySelector('span.price').textContent;
        r.push({
          'url': href,
          'price': pagerParser.priceFormatter(price),
          'crc32': ''
        });
      }
    } catch (e) {
      continue;
    }
  }
  return r;
};

//no5
pagerParser[43] = function (document) {
  return pagerParser.template('.cplist>dl', 'dt a', '.pro-price>span>span');
};

//sasa
pagerParser[45] = function (document) {
  return pagerParser.template('#gallery_show>ul>li', '.arrivals-pic a', 'span.price');
};

//m6go
pagerParser[51] = function (document) {
  return pagerParser.template('.result>ul>li', 'a.pica', '.price-info strong');
};

//likeface
pagerParser[52] = function (document) {
  return pagerParser.template('ul.tLst2 li', 'a.tImg', 'span.tPrc');
};

//morefood
pagerParser[54] = function (document) {
  return pagerParser.template('.goods_list', '.img>a', 'span[datatype="price"]');
};

//99read
pagerParser[59] = function (document) {
  return pagerParser.template('.list_r_list', 'h1 a', '.f-Price:last-child');
};

//chinapub
pagerParser[60] = function (document) {
  return pagerParser.template('.search_result table', '.result_name a', '.book_dis b');
};

//bookschina
pagerParser[61] = function (document) {
  return pagerParser.template('.bookContent', '.titlein', 'span.red12');
};

//winxuan
pagerParser[62] = function (document) {
  return pagerParser.template('#list>li', '.img a', '.price-n');
};

//efeihu
pagerParser[63] = function (document) {
  return pagerParser.template('#Jlist>li', '.ui_pimg>a', '.ui_pprice_e>em');
};

//yintai
pagerParser[66] = function (document) {
  return pagerParser.template('.p-listInfo', '.p-listImgBig a', '.p-listPrice strong');
};

//hapigo
pagerParser[72] = function (document) {
  return pagerParser.template('.sl_list_ul>li', '.goods-pic>a', '.sl_price1>span');
};

//gap
pagerParser[73] = function (document) {
  return pagerParser.template('.categoryProductItem', '.product-image>a', '.special-price .price>.price');
};

//5lux
pagerParser[75] = function (document) {
  var items = document.querySelectorAll('.stblock_body>dl>dd');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.coc2a67d').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};
// tmall
pagerParser[83] = function (document) {
  var items = document.querySelectorAll('#J_ItemList div.product');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a.productImg').href;
      var price = items[i].querySelector('.productPrice em').textContent;
      var tle = items[i].querySelector('.productTitle a').textContent.trim();
      r.push({
        'url': href,
        'tle': tle,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};
//tiantian
pagerParser[84] = function (document) {
  return pagerParser.template('.rg_sl_list>ul>li', '.list1', '.list3>span');
};

//xijie
pagerParser[85] = function (document) {
  return pagerParser.template('.goods_one', '.com_link', '.xj_list_pro_text2>.xj_list_pro_text2');
};

//jumei
pagerParser[86] = function (document) {
  return pagerParser.template('.products_wrap>ul>li', '.s_l_pic>a', '.search_list_price>span');
};

//yougou
pagerParser[93] = function (document) {
  return pagerParser.template('#proList>li', 'a', '.price_sc>em>i');
};

//111
pagerParser[94] = function (document) {
  setTimeout(function () {
    document._links = pagerParser.template('#itemSearchList>li', ':not(.none) a', ':not(.none) .price>span:first-child');
  }, pagerParser.timeout);
  return {
    wait: true
  };
};

//jianke
pagerParser[97] = function (document) {
  return pagerParser.template('.pro-con>li', 'a.pro-check', '.pro-botxt span');
};

//muyingzhijia
pagerParser[98] = function (document) {
  setTimeout(function () {
    document._links = pagerParser.template('.goods_list>li', 'a', 'span[data-type="price"]');
  }, pagerParser.timeout);
  return {
    wait: true
  };
};

//lingshi
pagerParser[99] = function (document) {
  var items = document.querySelectorAll('.snack_wrap>ul>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.price').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//banggo
pagerParser[100] = function (document) {
  return pagerParser.template('.mbshop_listPdCon', 'a', '.mbshop_listPdText>b');
};

//yesmywine
pagerParser[101] = function (document) {
  return pagerParser.template('.piclist>li', 'a', '.price strong');
};

//jiumei
pagerParser[102] = function (document) {
  return pagerParser.template('.gn_m_list_a', 'a', '.gn_m_list_price .b>span');
};

//jiuxian
pagerParser[103] = function (document) {
  return pagerParser.template('.proListSearch>ul>li', 'a', '.price');
};

//gjw
pagerParser[108] = function (document) {
  return pagerParser.template('.main_wrap>.min_in', '.productImg-wrap a', '.productPrice>em>strong');
};

//okhqb
pagerParser[109] = function (document) {
  return pagerParser.template('.result_list_container>ul>li', '.thumb_picture a', '.price_i>em');
};

//bookuu
pagerParser[110] = function (document) {
  return pagerParser.template('.books-list', 'a', '.ll>b');
};

//d1
pagerParser[115] = function (document) {
  return pagerParser.template('#r_list .libox', '.g_simg>a', '.g_mprice font');
};

//rayi
pagerParser[120] = function (document) {
  return pagerParser.template('.GoodsSearchWrap>table>tbody>tr>td', '.goodpic>a', '.price1');
};

//paixie
pagerParser[122] = function (document) {
  return pagerParser.template('.prolist>li', '.probox>a', '.info>b');
};
//taobao
pagerParser[123] = function (document) {
  var items = document.querySelectorAll('#mainsrp-itemlist div.items>.item');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var id = items[i].querySelector('.pic-box a.pic-link').getAttribute('data-nid');
      var href = 'https://item.taobao.com/item.htm?id=' + id;
      var price = items[i].querySelector('.ctx-box .price').textContent;
      var tle = items[i].querySelector('.ctx-box .title .J_ClickStat').textContent.trim();
      var uniqPid = $(items[i]).find('.similars a[href]:contains(同款)').attr('href');
      if (uniqPid) uniqPid = uniqPid.match(/&uniqpid=([0-9-]+)/)[1];

      r.push({
        'nid': id,
        'uniqpid': uniqPid || '',
        'url': href,
        'tle': tle,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};
//homevv
pagerParser[124] = function (document) {
  return pagerParser.template('.list_pic>.item', '.goods-pic a', '.sale-price');
};

//jxdyf
pagerParser[125] = function (document) {
  return pagerParser.template('#searchPList>ul>li', '.pImg a', '.price');
};

//sfbest
pagerParser[126] = function (document) {
  return pagerParser.template('.list-all>li', '.pic a', '.price strong');
};

//benlai
pagerParser[127] = function (document) {
  return pagerParser.template('#Content>dl', '.pic a', 'p.price');
};

//tuotuo
pagerParser[128] = function (document) {
  return pagerParser.template('#list_goodslist>li', '.pro_img>a', '.pro_price>b');
};

//vip
pagerParser[129] = function (document) {
  return pagerParser.template('#J_searchCatList>.goods-list-item', '.goods-image>a', '.price');
};

//vmall
pagerParser[134] = function (document) {
  return pagerParser.template('.pro-list>ul>li', 'a', '.p-price>b');
};

//lenovo
pagerParser[135] = function (document) {
  return pagerParser.template('#productList>li', '.search_pro_img', '.search_pro_price');
};

//zm7
pagerParser[138] = function (document) {
  return pagerParser.template('.goods_table_list>ul>li', '.g_t_list_m>a', '.goods_table_list .fl');
};

//zhiwo
pagerParser[140] = function (document) {
  return pagerParser.template('#bfd_show_fu>li', '.goods_img a', '.price_day');
};

//j1
pagerParser[141] = function (document) {
  return pagerParser.template('.listsearch-one', '.listsearch-ztimg a', '.listsearch-price>span');
};

//wangjiu
pagerParser[142] = function (document) {
  return pagerParser.template('.shop_list_item>ul>li', '.p_i a', '.p_m');
};

//lamiu
pagerParser[146] = function (document) {
  return pagerParser.template('#gallery_show ul>li', '.goods-pic a', 'ins.price');
};

//aimer
pagerParser[147] = function (document) {
  return pagerParser.template('.infoShop>li', 'div>a', 'span.track');
};

//wbiao
pagerParser[153] = function (document) {
  return pagerParser.template('#search_goods_list>ul>li', 'dd:not([class])>a', 'dt .s_price');
};

//handu
pagerParser[154] = function (document) {
  return pagerParser.template('#tile li', '.boxCont>a', '.price');
};

//ehaier
pagerParser[155] = function (document) {
  return pagerParser.template('.prolist-box>ul>li', 'a', '.strong-price');
};

//secoo
pagerParser[156] = function (document) {
  return pagerParser.template('.commodity-list>dl', 'a', '.dl_price>span');
};

//camel
pagerParser[157] = function (document) {
  return pagerParser.template('.pro_list_ul>li', 'a', '.salePrice');
};

//masamaso
pagerParser[158] = function (document) {
  return pagerParser.template('.in_masa:not([id]) ul>li', '.in_masa_up a', '.in_price>em>span:nth-of-type(2)');
};

//xifuquan
pagerParser[164] = function (document) {
  return pagerParser.template('.ullistcont>li', 'a', 'strong');
};

//mi
pagerParser[167] = function (document) {
  var items = document.querySelectorAll('.goods-list>div');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.price').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//lemall
pagerParser[168] = function (document) {
  var items = document.querySelectorAll('.result_list>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('.pro_img a').getAttribute('data-url');
      var price = items[i].querySelector('.pro_price>span.red').textContent.trim();
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
};

// //meituan
// pagerParser[172] = function (document) {
//   return pagerParser.template('.item', 'a', '.price>strong')
// }

//yiguo
pagerParser[174] = function (document) {
  setTimeout(function () {
    document._links = pagerParser.template('.product_item', '.p_img a', '.price>strong');
  }, pagerParser.timeout);
  return {
    wait: true
  };
};

//fruitday
pagerParser[178] = function (document) {
  return pagerParser.template('.f-list .leftpart>ul>li', 'a', '.s-info>.s-unit');
};

//feiniu
pagerParser[180] = function (document) {
  return pagerParser.template('.u-m-goods>ul>li', '.p-img.J_p_img a', '.J_now_price');
};

//zuipin
pagerParser[182] = function (document) {
  return pagerParser.template('.tea_products .products_box', '.pro_img>span>a', '.zp_price>span');
};

//yohobuy
pagerParser[184] = function (document) {
  return pagerParser.template('.goods-container>div.good-info', 'a[href*="item"]', '.price>span:last-child');
};

//bestkeep
pagerParser[188] = function (document) {
  return pagerParser.template('.listTable>li', 'a', '.goods-price');
};

//mf910
pagerParser[194] = function (document) {
  return pagerParser.template('#J_goodsList>ul>li', 'a', '.p-price>strong>i');
};

//miyabaobei
pagerParser[195] = function (document) {
  return pagerParser.template('.Lcon.content>div.block', 'a', 'span[id^="sale_price"]');
};

//ule
pagerParser[196] = function (document) {
  setTimeout(function () {
    document._links = pagerParser.template('.goodsListBlock>ul>li', '.img>a', '.ulePrice>strong');
  }, pagerParser.timeout);
  return {
    wait: true
  };
};

//minshengec
pagerParser[197] = function (document) {
  return pagerParser.template('.itemList>div.product', 'a', 'em[name="price"]');
};

//wangfujing
// pagerParser[198] = function (document) {
//   return pagerParser.template('.itemList>li', 'a[id^="catalogEntry_img"]', 'dl .nprice')
// }

//meilele
pagerParser[201] = function (document) {
  return pagerParser.template('.list-goods:first-child>li', 'a', '.JS_async_price');
};

//supuy
pagerParser[210] = function (document) {
  return pagerParser.template('#ul_content>li', '.list_good_img>a', '.list_good_price_new');
};

//lining
pagerParser[213] = function (document) {
  return pagerParser.template('.cate_search_content .selItem', 'a', '.hprice.price');
};

//rrs
pagerParser[217] = function (document) {
  return pagerParser.template('.product_list>li', 'a', 'div>b');
};

//coocaa
pagerParser[218] = function (document) {
  var items = document.querySelectorAll('#tv_list>ul>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href.replace('get', 'goodsDetailBuy');
      var price = items[i].querySelector('.product_show_right_price').textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//lifevc
pagerParser[220] = function (document) {
  return pagerParser.template('.productPic', 'a.proPic', '.productPrice');
};

//kzj365
pagerParser[222] = function (document) {
  var items = document.querySelectorAll('.goodsItem>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.price').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//kaola
pagerParser[223] = function (document) {
  return pagerParser.template('#result>li', 'a', '.cur');
};

//ymatou
pagerParser[224] = function (document) {
  return pagerParser.template('#product-list >li', 'a.product-img', '.price');
};

//metao
pagerParser[225] = function (document) {
  if (document.querySelectorAll('.special-ul').length) {
    return pagerParser.template('.special-ul>li', 'a', '.s-product-sale-price');
  }
  var items = document.querySelectorAll('.prod-list.prod-cols3-list:first-child>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.price').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//kjt
pagerParser[226] = function (document) {
  return pagerParser.template('.prolist.listhover>li', '.img a', '.price.price16');
};

//logitech
pagerParser[227] = function (document) {
  return pagerParser.template('.productList-list-ul>li', '.p-img a', '.price>strong');
};

//amazon_us
pagerParser[228] = pagerParser[1];

//amazon_jp
pagerParser[229] = pagerParser[1];

//xiji
pagerParser[232] = function (document) {
  return pagerParser.template('.gallery-grid ul>li', 'a', '.goods-price ins.price');
};

//nike
pagerParser[233] = function (document) {
  return pagerParser.template('.grid-item', '.grid-item-image a', '.prices>.local');
};

//360kad
pagerParser[234] = function (document) {
  return pagerParser.template('.Productlist>li', '.pic>a', '.pri');
};

//lbxcn
pagerParser[235] = function (document) {
  return pagerParser.template('.search_cholist>ul>li', '.ucol_p_img>a', '.ucol_p_wod span:nth-child(1)');
};

//meici
pagerParser[236] = function (document) {
  return pagerParser.template('#product-list>ul>li', 'a', '.product_p .c_purple, .product_p .product_active');
};

//beibei
pagerParser[237] = function (document) {
  var items = document.querySelectorAll('.view-ItemListItem');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = [items[i].querySelector('.price-int').textContent.trim(), items[i].querySelector('.price-decimal').textContent.trim()].join('');

      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//6pm
pagerParser[238] = function (document) {
  // return pagerParser.template('#searchResults>a','','.price-6pm')
  var items = document.querySelectorAll('#searchResults>a');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].href;
      var price = items[i].querySelector('.price-6pm').textContent.trim();

      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//shopbop
pagerParser[241] = function (document) {
  return pagerParser.template('.product-list>ul>li', 'a.photo', '.retail-price');
};

//amazon_de
pagerParser[246] = function (document) {
  var r = [];
  var items = document.querySelectorAll('.s-result-item');
  for (var i = 0; i < items.length; ++i) {
    try {
      var img = items[i].querySelector('.s-access-image');
      while (!img.parentNode.href && img.parentNode != document.body) {
        img = img.parentNode;
      }
      if (img.parentNode == document.body) {
        continue;
      }
      var href = img.parentNode.href;
      var price = items[i].querySelector('div>.a-spacing-mini>.a-spacing-none>a>span');
      if (!price) {
        price = items[i].querySelector('span.a-color-price');
      }
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price.textContent, ',', '.', 246),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//ashford
pagerParser[247] = function (document) {
  return pagerParser.template('.automaticScrollProductsList>div', 'a', '.product-price');
};

//lookfantastic
pagerParser[248] = function (document) {
  return pagerParser.template('#divSearchResults>div>div', '.product-image>a:first-child', '.item_price');
};

//vsigo
pagerParser[252] = function (document) {
  return pagerParser.template('.search_lst>ul>li', '.Npro_img>a', '.sigoprice');
};

//100yue
pagerParser[256] = function (document) {
  return pagerParser.template('.cont-gd>li', 'a', '.new-price>span:first-child');
};

//amazon_uk
pagerParser[266] = function (document) {
  return pagerParser.template('#resultsCol ul.s-result-list>li', 'a.a-link-normal', '.a-color-price');
};

//daling
pagerParser[267] = function (document) {
  return pagerParser.template('.searchlist>ul>li', 'a', '.now-price');
};

//fengqu
pagerParser[268] = function (document) {
  return pagerParser.template('.product-1-list>li', 'a', 'strong');
};

//mei
pagerParser[269] = function (document) {
  return pagerParser.template('#contentDiv>div.listproduct', 'a', 'span.red');
};

//showjoy
pagerParser[270] = function (document) {
  return pagerParser.template('.widget-brick-item', '.brick-pic', '.price');
};

//ocj
pagerParser[271] = function (document) {
  if (document.querySelectorAll('.pv_shop_list_content.normal_list').length) {
    return pagerParser.template('.pv_shop_list_content>div.item1', 'a', '.price>em');
  }
  return pagerParser.template('.item1', '.image a', '.price>em');
};

//sundan
pagerParser[272] = function (document) {
  return pagerParser.template('#gallery_show ul>li', '.goods-pic>a', '.price');
};

//easeeyes
pagerParser[273] = function (document) {
  return pagerParser.template('.itemSearchResult.box-items-result>ul>li', '.images a', '.price>strong');
};

//yunhou
pagerParser[274] = function (document) {
  return pagerParser.template('.goods-lists>div', 'a.goods-img', '.p-normal');
};

//haituncun
pagerParser[275] = function (document) {
  return pagerParser.template('.products-grid>li', 'a.product-image', '.regular-price');
};

//walmart
pagerParser[276] = function (document) {
  return pagerParser.template('#tile-container>div', '.js-product-title', '.price-display');
};

//vmei
pagerParser[277] = function (document) {
  return pagerParser.template('.product_list.product_list_v2>ul>li', '.pic', '.price>strong');
};

//51din
pagerParser[279] = function (document) {
  return pagerParser.template('#result>ul', 'a.img_figure', '.boutique_price');
};

//aidai
pagerParser[280] = function (document) {
  var items = document.querySelectorAll('#proNum>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a[href^="/Pro"]').href;
      var price = items[i].querySelector('.proprice');
      price = price.childNodes[price.childNodes.length - 1].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//boqii
pagerParser[281] = function (document) {
  return pagerParser.template('.product_list>li', 'a', 'strong[id^="priceat"]');
};

//spider
pagerParser[284] = function (document) {
  if (document.querySelectorAll('.rsltAll').length) {
    return pagerParser.template('.rsltAll>ul>li', 'a', '.red2');
  }
  if (document.querySelectorAll('.produclb_cp1').length) {
    return pagerParser.template('.produclb_cp>.produclb_cp1', 'a', '.font14_red');
  }
  //http://www.spider.com.cn/461970-323-100120.html
  return pagerParser.template('.prstgdlist>li', 'a', '.f18');
};

//jiae
pagerParser[286] = function (document) {
  return pagerParser.template('.j-item-list-li', '.a-pic', '.item-price');
};

//zazhipu
pagerParser[287] = function (document) {
  return pagerParser.template('#itemList>li', 'a', '.mod_price:first-child');
};

//xgdq
pagerParser[288] = function (document) {
  return pagerParser.template('#gallery_show ul>li', 'a', '.goods-price ins');
};

//xtep
pagerParser[289] = function (document) {
  var doc = document.querySelector('iframe#m').contentWindow.document;
  var items = doc.querySelectorAll('.pro_list>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('.pro_img').href;
      var price = items[i].querySelector('.pro_price>span>b').textContent.trim();

      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//midea
pagerParser[290] = function (document) {
  return pagerParser.template('.hproduct', 'a', '.price>em');
};

//staples
pagerParser[291] = function (document) {
  return pagerParser.template('.cg_mainContent>div.cg_pro', 'a', '.pro_price>strong');
};

//efotile
pagerParser[292] = function (document) {
  return pagerParser.template('.result>ul>li', 'a', '.item-price');
};

//lovo
pagerParser[294] = function (document) {
  return pagerParser.template('.prolistitems', '.ad-image-wrapper a', 'big.jiacu');
};

//hua
pagerParser[295] = function (document) {
  return pagerParser.template('.grid-item', '.img-box a', '.price-num');
};

//tuhu
pagerParser[299] = function (document) {
  return pagerParser.template('.List tr', 'a.DisplayName', '.price>strong');
};

//taqu
pagerParser[313] = function (document) {
  return pagerParser.template('.p-list>li.p-item', '.p-pic a', '.p-price-current');
};

//bl
pagerParser[347] = function (document) {
  return pagerParser.template('.pro-class>li', '.pro-img>a', '.money-fl');
};

//bestinfoods
pagerParser[348] = function (document) {
  return pagerParser.template('.items-gallery', 'a', '.price1');
};

//163
pagerParser[349] = function (document) {
  return pagerParser.template('#j-searchList>li', '.hd>a', '.price>span');
};

//guojimami
pagerParser[351] = function (document) {
  return pagerParser.template('.gmg', 'a', '.shop_prices');
};

//baiyangwang
pagerParser[352] = function (document) {
  return pagerParser.template('.g-d-ul>li', '.pic', 'span[id^="JgoodsPrice"]');
};

//tao3c
/*
 pagerParser[111] = function(document) {
 return pagerParser.merge(
 pagerParser.slice.call(document.querySelectorAll('#plist a>img'))
 .map(function(v){ return v.parentNode.href }) ,
 pagerParser.slice.call(document.querySelectorAll('#plist .pd4>span'))
 .map(function(v) {return v.textContent })
 )
 }
 */

//feifei
pagerParser[181] = function (document) {
  var items = document.querySelectorAll('.sku-ul>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('a').href;
      var price = items[i].querySelector('.wsl-price.j-wsl-price').childNodes[0].textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//purcotton
pagerParser[364] = function (document) {
  var items = document.querySelectorAll('#productResultList>li');
  var r = [];
  var MallPath = 'http://www.purcotton.com';
  for (var i = 0; i < items.length; ++i) {
    try {
      var a = items[i].querySelector('a[onclick^="toDetail"]');
      var prodNo = a.getAttribute('onclick').match(/[\d-]+/)[0];
      var number = prodNo.substr(prodNo.length - 3);
      var href = MallPath + "/detail/" + number + "/" + prodNo + ".html";
      var price = items[i].querySelector('.aprice').textContent;
      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//amazon_fr
pagerParser[365] = function (document) {
  var items = document.querySelectorAll('#s-results-list-atf>li');
  var r = [];
  for (var i = 0; i < items.length; ++i) {
    try {
      var href = items[i].querySelector('.a-link-normal').href;
      var price = items[i].querySelector('.a-color-price').textContent.trim();

      r.push({
        'url': href,
        'price': pagerParser.priceFormatter(price, ',', '.'),
        'crc32': ''
      });
    } catch (e) {
      continue;
    }
  }
  return r;
};

//amazon_ca
pagerParser[366] = pagerParser[1];

//wstx
pagerParser[367] = function (document) {
  return pagerParser.template('.goods-item', '.figure-img>a', '.price>b');
};

//hisense
pagerParser[368] = function (document) {
  return pagerParser.template('.product-list>ul>li', 'a', '.price>.red');
};

//zhongjiu
pagerParser[369] = function (document) {
  return pagerParser.template('.list-h>li', '.p-img>a', '.p-price>strong');
};

//kaluli
pagerParser[370] = function (document) {
  return pagerParser.template('.p-l-grid>ul>li', 'a', '.price .red');
};

//to8to
pagerParser[371] = function (document) {
  return pagerParser.template('#goodsList:first-child>li', 'a', '.cur_pric .pri_msg .f_arial');
};

//opposhop
pagerParser[372] = function (document) {
  return pagerParser.template('.grid-special>.box', 'a', '.box-price strong');
};

//baobeigezi
pagerParser[373] = function (document) {
  return pagerParser.template('#main_list > .pro_item', '.pro_infor_img', '.pro_price');
};

//yao123
pagerParser[374] = function (document) {
  return pagerParser.template('.product-list>ul>li', '.items>a:nth-child(1)', '.opr');
};

//gionee
pagerParser[376] = function (document) {
  return pagerParser.template('ul#JmobileList>li', 'a.ui_pimg', '.ui_pprice');
};

//suanjuzi
pagerParser[377] = function (document) {
  return pagerParser.template('#gallery_show ul>li', '.goods-pic>a', 'ins.price');
};

//aomygod
pagerParser[378] = function (document) {
  return pagerParser.template('.goods-lists>div', 'a.goods-img', '.goods-price>.p-normal');
};

//luolai
pagerParser[379] = function (document) {
  return pagerParser.template('.gallery-grid>ul>li', '.goods-pic>a', 'ins.price');
};

//vivo
pagerParser[380] = function (document) {
  return pagerParser.template('.prod-list>li', 'a', 'p');
};

//dixintong
pagerParser[381] = function (document) {
  return pagerParser.template('.GoodsList>li', 'a', '.goodsprice>span');
};

//coolpad
pagerParser[382] = function (document) {
  return pagerParser.template('.goods-ul-box li', 'a', '.price');
};

//skg
pagerParser[383] = function (document) {
  return pagerParser.template('.goods_list.clearfix>li', 'a.gimg', 'p.gprice');
};

//aolaigo
pagerParser[385] = function (document) {
  return pagerParser.template('.pro>ul>li', 'dl>dd:nth-child(1)>a', '.valc-n>span:nth-child(2)');
};

module.exports = pagerParser;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 237 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function (isbn) {
  /*isbn 十位转 13位    odd jishu  even 偶数*/
  var odd = 0,
      even = 0,
      newNum;
  isbn = isbn.toString();
  if (isbn.length > 10) return isbn;
  var str = isbn.slice(0, 9);
  str = '978' + str;
  for (var i = 0; i < str.length; i++) {
    /*因为从零开始的 所以奇偶交换*/
    if (i % 2 === 0) {
      odd += Number(str[i]);
    } else {
      even += Number(str[i]);
    }
    newNum = 10 - (odd + even * 3) % 10;
  }
  str += newNum.toString();
  return str;
};

/***/ }),
/* 238 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var util = __webpack_require__(19);
var user = __webpack_require__(22);

module.exports = {
  init: function init() {
    // if (location.href.indexOf('trade.jd.com/shopping/order/getOrderInfo.action') > -1) {
    //   require('common/infoCollect/jdCart').init()
    // }
    if (location.href.indexOf('https://pcsitepp-fm.jd.com/?goDown') > -1) {
      setTimeout(function () {
        __webpack_require__(248).init();
      }, 5000);
    }

    window.bjgAutoPriceProtect = true;

    if (location.href.indexOf('https://passport.jd.com/new/login.aspx') > -1) {
      __webpack_require__(16).get('/setLoginStatus', {
        loginStatus: false
      });
    }
    // if (location.href.indexOf('success.jdpay.com') > -1) {
    //   (async function() {
    //     let cart = await util.getStorage('cartItem')
    //     const isUserLogin = await user.hasUserToken()
    //     let allowPriceProtect = await util.getStorage('allowPriceProtect')
    //
    //     let el = document.createElement('div')
    //     document.body.appendChild(el)
    //     const PriceProtectBanner = require('../components/PriceProtectBanner.vue').default
    //     new Vue({
    //       el: el,
    //       render: h => h(PriceProtectBanner)
    //     })
    //   })()
    // }
  }
};

/***/ }),
/* 239 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var communicate = __webpack_require__(18);
var browsertype = __webpack_require__(240);
var minibrowser = browsertype.getBrowser();
var globalObj = {};

var haslog = undefined;
var renderInfo = function renderInfo(info) {
  if (!info) return;
  if (!G.site) return;
  if (haslog) return;
  if (info.type === 'user_extension_id') {
    haslog = true;
    __webpack_require__(14)('browser_user:' + G.logsite + ':extType:' + getExtType());
  }
};
var getExtType = function getExtType() {
  var type = '';
  if (G.from_device === 'default') type = minibrowser.utype;else type = G.from_device;
  return type;
};
module.exports.init = function () {
  if (G.userid) {
    renderInfo({
      type: 'user_extension_id'
    });
    return;
  }
  communicate.trigger({
    type: 'user_extension_id'
  });
  communicate.on(function (info) {
    try {
      if (info && info.type === 'browser_setinfo') {
        if (info.value && info.value instanceof Object) {
          for (var p in info.value) {
            globalObj[p] = info.value[p];
          }
        }
      } else if (info.type) {
        globalObj[info.type] = info.value;
        renderInfo(info);
      }
    } catch (e) {}
  });
};

module.exports.getInfo = function (type) {
  return globalObj[type];
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 240 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var browser = {
  'url': '',
  'utype': ''
};
var chromeType = navigator.userAgent.toLowerCase();

module.exports.getBrowser = function () {
  if ("ActiveXObject" in window) {
    //mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; slcc2; .net clr 2.0.50727; .net clr 3.5.30729; .net clr 3.0.30729; .net4.0c; infopath.3; .net4.0e)
    browser.utype = "ie";
    browser.utitle = "IE";
    browser.background = "-401px -81px";
  } else if (chromeType.indexOf('firefox') > -1) {
    //mozilla/5.0 (windows nt 6.1; wow64; rv:42.0) gecko/20100101 firefox/42.0
    browser.utype = "firefox";
    browser.utitle = "火狐";
    browser.background = "-401px -44px";
  } else if (chromeType.indexOf('opera') > -1 || chromeType.indexOf('opr') > -1) {
    //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/46.0.2490.86 safari/537.36 opr/33.0.1990.115
    browser.utype = "opera";
    browser.utitle = "Opera";
    browser.background = "-2px -120px";
  } else if (chromeType.indexOf('safari') > -1 && chromeType.indexOf('chrome') == -1) {
    //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/534.57.2 (khtml, like gecko) version/5.1.7 safari/534.57.2
    browser.utype = "safari";
    browser.utitle = "Safari";
    browser.background = "-301px -44px";
  } else if (chromeType.indexOf('chrome') > -1) {
    var check360 = checkChromeWeight();
    if (chromeType.indexOf('qqbrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/45.0.2454.87 safari/537.36 qqbrowser/9.2.5542.400
      browser.utype = "qq";
      browser.utitle = "QQ";
      browser.background = "-104px -81px";
    } else if (chromeType.indexOf('maxthon') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) maxthon/4.4.8.1000 chrome/30.0.1599.101 safari/537.36
      browser.utype = "maxthon";
      browser.utitle = "傲游";
      browser.background = "-401px -4px";
    } else if (chromeType.indexOf('bidubrowser') > -1) {
      //mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; bidubrowser 8.1)
      browser.utype = 'baidu';
      browser.utitle = '百度';
      browser.background = "-104px -120px";
    } else if (chromeType.indexOf('ubrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/44.0.2403.157 ubrowser/5.5.6743.207 safari/537.36
      browser.utype = 'uc';
      browser.utitle = "UC";
      browser.background = "-2px -44px";
    } else if (chromeType.indexOf('lbbrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/42.0.2311.154 safari/537.36 lbbrowser
      browser.utype = 'liebao';
      browser.utitle = "猎豹安全";
      browser.background = "-301px -4px";
    } else if (chromeType.indexOf('taobrowser') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/3.5 Safari/536.11
      browser.utype = 'taobao';
      browser.utitle = "淘宝";
      browser.background = "-104px -44px";
    } else if (chromeType.indexOf('2345explorer') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345Explorer/6.4.0.10356
      browser.utype = '2345';
      browser.utitle = "2345王牌";
      browser.background = "-301px -81px";
    } else if (chromeType.indexOf('2345chrome') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/39.0.2171.99 safari/537.36 2345chrome v3.0.0.9739
      browser.utype = '2345jiasu';
      browser.utitle = "2345加速";
    } else if (chromeType.indexOf('coolnovo') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 CoolNovo/2.0.9.20
      browser.utype = 'fengshu';
      browser.utitle = "枫树";
      browser.background = "-2px -81px";
    } else if (chromeType.indexOf('greenbrowser') > -1) {
      //Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; .NET4.0E; GreenBrowser)
      browser.utype = 'gb';
      browser.utitle = "GB";
      browser.background = "-203px -81px";
    } else if (check360 === "Chrome") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/46.0.2490.80 safari/537.36
      browser.utype = 'chrome';
      browser.utitle = 'Chrome';
      browser.background = "-2px -4px";
    } else if (check360 === "360SE") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/31.0.1650.63 safari/537.36
      browser.utype = '360se';
      browser.utitle = '360安全';
      browser.background = "-203px -4px";
    } else if (check360 === "360EE") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/45.0.2454.101 safari/537.36
      browser.utype = '360se';
      browser.utitle = '360极速 ';
      browser.background = "-104px -4px";
    } else if (chromeType.indexOf('se') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/38.0.2125.122 safari/537.36 se 2.x metasr 1.0
      browser.utype = 'sogou';
      browser.utitle = "搜狗";
      browser.background = "-401px -120px";
    } else {
      browser.utype = 'chrome';
      browser.utitle = 'Chromium内核';
    }
  } else {
    browser.utype = 'chrome';
    browser.utitle = '未知浏览器';
  }
  return browser;
};

var chrome_weight = {
  "result": "Chrome",
  "details": {
    "Chrome": 5,
    "Chromium": 0,
    "_360SE": 0,
    "_360EE": 0
  },
  "sorted": ["Chrome", "360SE", "360EE", "Chromium"],
  "exec": function exec(results) {
    var details = {
      "Chrome": 5,
      "Chromium": 0,
      "_360SE": 0,
      "_360EE": 0
    };
    var _ua = window.navigator.userAgent;
    if (/Chrome\/([\d.])+\sSafari\/([\d.])+$/.test(_ua)) {
      if (window.navigator.platform == "Win32") {
        if (!window.clientInformation.languages) {
          details._360SE += 8;
        }
        if (/zh/i.test(navigator.language)) {
          details._360SE += 3;
          details._360EE += 3;
        }
        if (window.clientInformation.languages) {
          var lang_len = window.clientInformation.languages.length;
          if (lang_len >= 3) {
            details.Chrome += 10;
            details.Chromium += 6;
          } else if (lang_len == 2) {
            details.Chrome += 3;
            details.Chromium += 6;
            details._360EE += 6;
          } else if (lang_len == 1) {
            details.Chrome += 4;
            details.Chromium += 4;
          }
        }
        for (var i in window.navigator.plugins) {
          if (window.navigator.plugins[i].filename == "np-mswmp.dll") {
            details._360SE += 20;
            details._360EE += 20;
          }
        }
        if (Object.keys(window.chrome.webstore).length <= 1) {
          details._360SE += 7;
        } else if (Object.keys(window.chrome.webstore).length == 2) {
          details._360SE += 4;
          details.Chromium += 3;
        }

        if (window.navigator.plugins.length >= 30) {
          details._360EE += 7;
          details._360SE += 7;
          details.Chrome += 7;
        } else if (window.navigator.plugins.length < 30 && window.navigator.plugins.length > 10) {
          details._360EE += 3;
          details._360SE += 3;
          details.Chrome += 3;
        } else if (window.navigator.plugins.length <= 10) {
          details.Chromium += 6;
        }
      } else {
        details._360SE -= 50;
        details._360EE -= 50;
        if (/Linux/i.test(window.navigator.userAgent)) {
          details.Chromium += 5;
        }
      }
      var found = 0;
      var respdf = undefined;
      for (var i in window.navigator.plugins) {
        if (!!(respdf = /^(.+) PDF Viewer$/.exec(window.navigator.plugins[i].name))) {
          if (respdf[1] == "Chrome") {
            details.Chrome += 6;
            details._360SE += 6;
            found = 1;
            break;
          }
          if (respdf[1] == "Chromium") {
            details.Chromium += 10;
            details._360EE += 6;
            found = 1;
            break;
          }
        }
      }
      if (!found) {
        details.Chromium += 9;
      }
    }
    var chrome_result = new Object();
    chrome_result['Chrome'] = details.Chrome;
    chrome_result['Chromium'] = details.Chromium;
    chrome_result['360SE'] = details._360SE;
    chrome_result['360EE'] = details._360EE;
    var sortable = [];
    for (var value in chrome_result) {
      sortable.push([value, chrome_result[value]]);
    }sortable.sort(function (a, b) {
      return b[1] - a[1];
    });
    this.sorted = sortable;
    this.details = details;
    this.result = sortable[0][0];
    if (results == "result") {
      return sortable[0][0];
    } else if (results == "details") {
      return chrome_result;
    } else if (results == "sorted") {
      return sortable;
    }
  }

};

var checkChromeWeight = function checkChromeWeight() {
  var _ua = window.navigator.userAgent;
  try {
    chrome_weight.exec();
    if (/Chrome\/([\d.])+\sSafari\/([\d.])+$/.test(_ua)) {
      return chrome_weight.result;
    } else {}
  } catch (e) {
    return;
  }
};

module.exports.getChromeVersion = function () {
  var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
  return raw ? parseInt(raw[2], 10) : false;
};

/***/ }),
/* 241 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var browser = {
  'url': '',
  'utype': ''
};
var chromeType = navigator.userAgent.toLowerCase();

module.exports.getBrowser = function () {
  if ("ActiveXObject" in window) {
    //mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; slcc2; .net clr 2.0.50727; .net clr 3.5.30729; .net clr 3.0.30729; .net4.0c; infopath.3; .net4.0e)
    browser.url = G.c_server + ('/files/ext/' + G.extName + '_install_IE.exe');
    browser.utype = "ie";
    browser.utitle = "IE";
    browser.background = "-401px -81px";
  } else if (chromeType.indexOf('firefox') > -1) {
    //mozilla/5.0 (windows nt 6.1; wow64; rv:42.0) gecko/20100101 firefox/42.0
    browser.url = "https://addons.mozilla.org/firefox/downloads/latest/405940/addon-405940-latest.xpi?src=dp-btn-primary";
    browser.bjgUrl = "https://addons.mozilla.org/zh-CN/firefox/addon/%E6%AF%94%E4%BB%B7%E7%8B%97-%E7%BD%91%E8%B4%AD%E7%9C%81%E9%92%B1%E7%A5%9E%E5%99%A8/?src=search";
    browser.utype = "firefox";
    browser.utitle = "火狐";
    browser.background = "-401px -44px";
  } else if (chromeType.indexOf('opera') > -1 || chromeType.indexOf('opr') > -1) {
    //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/46.0.2490.86 safari/537.36 opr/33.0.1990.115
    browser.url = G.c_server + "/files/ext/opera.crx";
    browser.utype = "opera";
    browser.utitle = "Opera";
    browser.background = "-2px -120px";
  } else if (chromeType.indexOf('safari') > -1 && chromeType.indexOf('chrome') == -1) {
    //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/534.57.2 (khtml, like gecko) version/5.1.7 safari/534.57.2
    browser.url = G.c_server + ('/files/ext/' + G.extName + '.safariextz');
    browser.utype = "safari";
    browser.utitle = "Safari";
    browser.background = "-301px -44px";
  } else if (chromeType.indexOf('chrome') > -1) {
    var check360 = checkChromeWeight();
    if (chromeType.indexOf('qqbrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/45.0.2454.87 safari/537.36 qqbrowser/9.2.5542.400
      browser.url = "https://pcbrowser.dd.qq.com/pcbrowserbig/qbextension/update/20160122/jgphnjokjhjlcnnajmfjlacjnjkhleah.crx";
      browser.bjgUrl = "https://pcbrowser.dd.qq.com/pcbrowserbig/qbextension/update/20180615/lpmlfjjccfdcnfplffgcmnkaafcigoil.crx";
      browser.utype = "qq";
      browser.utitle = "QQ";
      browser.background = "-104px -81px";
    } else if (chromeType.indexOf('maxthon') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) maxthon/4.4.8.1000 chrome/30.0.1599.101 safari/537.36
      browser.url = "http://extension.maxthon.cn/detail/index.php?view_id=358";
      browser.utype = "maxthon";
      browser.utitle = "傲游";
      browser.background = "-401px -4px";
    } else if (chromeType.indexOf('bidubrowser') > -1) {
      //mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; bidubrowser 8.1)
      browser.url = "http://chajian.baidu.com/2015/#all/39/mcgoibhhihpolaiioggajoipieefgmoa";
      browser.utype = 'baidu';
      browser.utitle = '百度';
      browser.background = "-104px -120px";
    } else if (chromeType.indexOf('ubrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/44.0.2403.157 ubrowser/5.5.6743.207 safari/537.36
      browser.url = "http://extensions.uc.cn/newindex.htm#!detail/bpdlhpjkjbdiflnankpohpfepecdjgag";
      browser.bjgUrl = "https://www.bijiago.com/static/extensions/chrome_bijiago_uc.crx";
      browser.utype = 'uc';
      browser.utitle = "UC";
      browser.background = "-2px -44px";
    } else if (chromeType.indexOf('lbbrowser') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/42.0.2311.154 safari/537.36 lbbrowser
      browser.url = "http://store.liebao.cn/admin/extensions/201511/ea878d5a4d2a008ad78978a94eea62a1.crx";
      browser.utype = 'liebao';
      browser.utitle = "猎豹安全";
      browser.background = "-301px -4px";
    } else if (chromeType.indexOf('taobrowser') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/3.5 Safari/536.11
      browser.url = G.c_server + "/files/ext/chrome.crx";
      browser.utype = 'taobao';
      browser.utitle = "淘宝";
      browser.background = "-104px -44px";
    } else if (chromeType.indexOf('2345explorer') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345Explorer/6.4.0.10356
      browser.url = "http://extension.ie.2345.com/#nfbikdkjfjcejddbdcpbafnclkfdhijd";
      browser.utype = '2345';
      browser.utitle = "2345王牌";
      browser.background = "-301px -81px";
    } else if (chromeType.indexOf('2345chrome') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/39.0.2171.99 safari/537.36 2345chrome v3.0.0.9739
      browser.url = "http://extension.chrome.2345.com/#nfbikdkjfjcejddbdcpbafnclkfdhijd";
      browser.utype = '2345jiasu';
      browser.utitle = "2345加速";
    } else if (chromeType.indexOf('coolnovo') > -1) {
      //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 CoolNovo/2.0.9.20
      browser.url = G.c_server + "/files/ext/chrome.crx";
      browser.utype = 'fengshu';
      browser.utitle = "枫树";
      browser.background = "-2px -81px";
    } else if (chromeType.indexOf('greenbrowser') > -1) {
      //Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; .NET4.0E; GreenBrowser)
      browser.url = G.c_server + ('/files/ext/' + G.extName + '_for_greenbrowser.zip');
      browser.utype = 'gb';
      browser.utitle = "GB";
      browser.background = "-203px -81px";
    } else if (check360 === "Chrome") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/46.0.2490.80 safari/537.36
      browser.url = G.c_server + "/app/extension?from_device=" + G.from_device_num;
      browser.bjgUrl = "https://www.bijiago.com/chromeGuide/";
      browser.utype = 'chrome';
      browser.utitle = 'Chrome';
      browser.background = "-2px -4px";
    } else if (check360 === "360SE") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/31.0.1650.63 safari/537.36
      browser.url = "https://ext.se.360.cn/webstore/detail/nfbikdkjfjcejddbdcpbafnclkfdhijd";
      browser.bjgUrl = "https://ext.se.360.cn/webstore/detail/dikcgfcdhfcmnicjknpmaakimonplclf";
      browser.utype = '360se';
      browser.utitle = '360安全';
      browser.background = "-203px -4px";
    } else if (check360 === "360EE") {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/45.0.2454.101 safari/537.36
      browser.url = "https://ext.chrome.360.cn/webstore/detail/nfbikdkjfjcejddbdcpbafnclkfdhijd";
      browser.bjgUrl = "https://ext.se.360.cn/webstore/detail/dikcgfcdhfcmnicjknpmaakimonplclf";
      browser.utype = '360se';
      browser.utitle = '360极速 ';
      browser.background = "-104px -4px";
    } else if (chromeType.indexOf('se') > -1) {
      //mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/38.0.2125.122 safari/537.36 se 2.x metasr 1.0
      browser.url = "http://ie.sogou.com/tools/tool_337.html";
      browser.bjgUrl = "http://ie.sogou.com/app/s/YXBwXzU5Njc=";
      browser.utype = 'sogou';
      browser.utitle = "搜狗";
      browser.background = "-401px -120px";
    } else {
      browser.url = G.c_server + "/app/extension";
      browser.bjgUrl = "https://www.bijiago.com/chromeGuide/";
      browser.utype = 'chrome';
      browser.utitle = 'Chromium内核';
    }
  } else {
    browser.url = G.c_server + "/app/extension";
    browser.bjgUrl = "https://www.bijiago.com/chromeGuide/";
    browser.utype = 'chrome';
    browser.utitle = '未知浏览器';
  }
  return browser;
};

var chrome_weight = {
  "result": "Chrome",
  "details": {
    "Chrome": 5,
    "Chromium": 0,
    "_360SE": 0,
    "_360EE": 0
  },
  "sorted": ["Chrome", "360SE", "360EE", "Chromium"],
  "exec": function exec(results) {
    var details = {
      "Chrome": 5,
      "Chromium": 0,
      "_360SE": 0,
      "_360EE": 0
    };
    var _ua = window.navigator.userAgent;
    if (/Chrome\/([\d.])+\sSafari\/([\d.])+$/.test(_ua)) {
      if (window.navigator.platform == "Win32") {
        if (!window.clientInformation.languages) {
          details._360SE += 8;
        }
        if (/zh/i.test(navigator.language)) {
          details._360SE += 3;
          details._360EE += 3;
        }
        if (window.clientInformation.languages) {
          var lang_len = window.clientInformation.languages.length;
          if (lang_len >= 3) {
            details.Chrome += 10;
            details.Chromium += 6;
          } else if (lang_len == 2) {
            details.Chrome += 3;
            details.Chromium += 6;
            details._360EE += 6;
          } else if (lang_len == 1) {
            details.Chrome += 4;
            details.Chromium += 4;
          }
        }
        for (var i in window.navigator.plugins) {
          if (window.navigator.plugins[i].filename == "np-mswmp.dll") {
            details._360SE += 20;
            details._360EE += 20;
          }
        }
        if (Object.keys(window.chrome.webstore).length <= 1) {
          details._360SE += 7;
        } else if (Object.keys(window.chrome.webstore).length == 2) {
          details._360SE += 4;
          details.Chromium += 3;
        }

        if (window.navigator.plugins.length >= 30) {
          details._360EE += 7;
          details._360SE += 7;
          details.Chrome += 7;
        } else if (window.navigator.plugins.length < 30 && window.navigator.plugins.length > 10) {
          details._360EE += 3;
          details._360SE += 3;
          details.Chrome += 3;
        } else if (window.navigator.plugins.length <= 10) {
          details.Chromium += 6;
        }
      } else {
        details._360SE -= 50;
        details._360EE -= 50;
        if (/Linux/i.test(window.navigator.userAgent)) {
          details.Chromium += 5;
        }
      }
      var found = 0;
      var respdf = undefined;
      for (var i in window.navigator.plugins) {
        if (!!(respdf = /^(.+) PDF Viewer$/.exec(window.navigator.plugins[i].name))) {
          if (respdf[1] == "Chrome") {
            details.Chrome += 6;
            details._360SE += 6;
            found = 1;
            break;
          }
          if (respdf[1] == "Chromium") {
            details.Chromium += 10;
            details._360EE += 6;
            found = 1;
            break;
          }
        }
      }
      if (!found) {
        details.Chromium += 9;
      }
    }
    var chrome_result = new Object();
    chrome_result['Chrome'] = details.Chrome;
    chrome_result['Chromium'] = details.Chromium;
    chrome_result['360SE'] = details._360SE;
    chrome_result['360EE'] = details._360EE;
    var sortable = [];
    for (var value in chrome_result) {
      sortable.push([value, chrome_result[value]]);
    }sortable.sort(function (a, b) {
      return b[1] - a[1];
    });
    this.sorted = sortable;
    this.details = details;
    this.result = sortable[0][0];
    if (results == "result") {
      return sortable[0][0];
    } else if (results == "details") {
      return chrome_result;
    } else if (results == "sorted") {
      return sortable;
    }
  }

};

var checkChromeWeight = function checkChromeWeight() {
  var _ua = window.navigator.userAgent;
  try {
    chrome_weight.exec();
    if (/Chrome\/([\d.])+\sSafari\/([\d.])+$/.test(_ua)) {
      return chrome_weight.result;
    } else {}
  } catch (e) {
    return;
  }
};

module.exports.getChromeVersion = function () {
  var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
  return raw ? parseInt(raw[2], 10) : false;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 242 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(243);
if(typeof content === 'string') content = [[module.i, content, '']];
// add the styles to the DOM
var update = __webpack_require__(37)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../../node_modules/css-loader/index.js!./haitao.css", function() {
			var newContent = require("!!../../../node_modules/css-loader/index.js!./haitao.css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}

/***/ }),
/* 243 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, " #gwd_ht_main a{\n      display: inline-block;\n    }\n    .gwd_haitao {\n      font-size: 12px;\n      font-family: 'Microsoft Yahei'\n    }\n    #gwd_ht_main{\n      width: 376px;\n      height: 198px;\n      font-size: 13px;\n      display: inline-block;\n      border: 1px solid #e6e9eb;\n      border-radius: 18px;\n      box-shadow: 0px 5px 19px 0px #d7d8d9;\n    }\n    #gwd_ht_load img {\n      position: relative;\n      top: 91px;\n      left: 74px;\n    }\n    .ht_6pm{\n      position: relative;\n      margin: 0 auto;\n    }\n    #gwd_ht_main .ht_head{\n      height: 36px;\n      position: relative;\n    }\n    #gwd_ht_main .gwd_site_icon{\n      display: inline-block;\n      background: url('http://s1.gwdang.com/images/extensions/haitao_siteicon.png') 13px 7px no-repeat;\n      background-size: 24px 22px;\n      height: 36px;\n      width: 52px;\n      float: left;\n      cursor: pointer;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect{\n      border: 1px solid #f07860;\n      cursor: pointer;\n      height: 24px;\n      line-height: 24px;\n      text-align: center;\n      width: 77px;\n      border-radius: 12px;\n      background-color: #fff;\n      margin-bottom: 6px;\n      margin-top: 4px;\n      color: #f07860;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect.trend_wait.c_adding{\n      background-color: #f07860;\n      color: #fff;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect.trend_wait.c_added{\n      background-color: #f07860;\n      color: #fff;\n    }\n    .unit_price > span {\n      font-size: 14px;\n    }\n    .price_tle {\n      margin-left: 12px;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect:hover {\n      text-decoration: none;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect:hover span {\n      text-decoration: underline;\n    }\n    .gwd_haitao .price_num{\n      color: #778e99;\n      display: inline-block;\n      width: 89px;\n      font-weight: bold;\n      font-size: 16px;\n      margin-left: 10px;\n    }\n    .gwd_haitao .ht_getprice{\n      width: 322px;\n      height: 35px;\n      line-height: 35px;\n      font-size: 16px;\n      text-align: center;\n      float: left;\n      color: #454A4D;\n      border-left: 1px solid #e6e9eb;\n    }\n    .fontf_Arial {\n      font-family: \"Arial\";\n      font-weight: bold;\n    }\n    .ht_getprice_num {\n      font-weight: bold;\n      color: #EB2F2F;\n      font-size: 18px;\n    }\n    .unit_price{\n      text-align: left;\n    }\n    .on_Or_Off {\n      position: absolute;\n      top: 52px;\n      right: 0px;\n      height: 20px;\n      line-height: 20px;\n      width: 20px;\n      color: red;\n    }\n    .translate_detail {\n      top: 64px;\n      left: 350px;\n    }\n    a.trans_help {\n      color: #40ace6;\n      font-size: 14px;\n      margin-left: 40px;\n      margin-right: 330px;\n    }\n    .trans_help:hover {\n      color: #2b7299;\n      text-decoration: none;\n    }\n    .gwd_haitao .content_default_left .tariff_remind_detail {\n      right: 247px;\n      height: 90px;\n      top: -27px;\n    }\n    .gwd_haitao .div_detail {\n      display: none;\n      position: absolute;\n      width: 146px;\n      border: 1px solid #e6e9eb;\n      background-color: #fff;\n      z-index: 99;\n      line-height: 19px;\n      font-size: 12px;\n      color: #888;\n      padding: 6px 6px 9px 6px;\n      box-shadow: 2px 2px 12px 2px #e6e9eb;\n      height: auto;\n    }\n    .gwd_haitao .content_default_left .weight_type_detail  {\n      top: 7px;\n      left: 156px;\n      position: absolute;\n      width: 113px;\n      height: 24px;\n      line-height: 22px;\n      padding: 0px 6px;\n    }\n    .collect_detail  {\n      top: -7px;\n      left: 244px;\n      text-align: left;\n    }\n    .gwd_haitao .transport_remind_detail {\n      padding: 0px 6px;\n      top: 9px;\n      left: 241px;\n      width: 112px;\n    }\n    .gwd_haitao .tariff_info_detail {\n      padding: 0 6px;\n      width: 110px;\n      top: 9px;\n      left: 241px;\n    }\n    .pro_type_detail {\n      top: 9px;\n      left: 350px;\n    }\n    .gwd_haitao .pro_type_detail.div_detail {\n      padding: 0 6px;\n      width: 134px;\n    }\n    .mail_type_detail {\n      top: 33px;\n      left: 350px;\n    }\n    #ht_trans_input{\n      position: relative;\n      top: 8px;\n      cursor: pointer;\n    }\n    .size_detail {\n      top: 130px;\n      left: 350px;\n    }\n    .gwd_haitao .size_detail.div_detail {\n      padding: 0px 6px;\n      width: 110px;\n    }\n    .trans_label{\n      height: 30px;\n      line-height: 30px;\n      font-weight: normal;\n    }\n    .ht_translate:hover {\n      cursor: text;\n    }\n    .ht_translate,.pro_type,.mail_type{\n      text-align: left;\n    }\n    .pro_type:hover,.mail_type:hover {\n      cursor: text;\n    }\n    .gwd_haitao .ht_getprice:hover{\n      text-decoration: none;\n      color: #454A4D;\n    }\n    .gwd_haitao .ht_weight_num{\n      height: 20px;\n      width: 54px;\n      float: left;\n      border-radius: inherit;\n      border-bottom-left-radius: 4px;\n      border-top-left-radius: 4px;\n      border-right: none;\n      position: relative;\n      margin-top: 9px;\n      margin-left: 15px;\n      padding: 0 3px;\n      display: inline-block;\n      border: 1px solid #47befe;\n      box-sizing: initial;\n      font-size: 12px;\n    }\n    .gwd_haitao .weight_type{\n      display: inline-block;\n      height: 22px;\n      width: 24px;\n      background-color: #47befe;\n      color: #fff;\n      text-align: center;\n      line-height: 22px;\n      position: relative;\n      margin-top: 9px;\n      border-top-right-radius: 4px;\n      cursor: pointer;\n      border-bottom-right-radius: 4px;\n    }\n    .gwd_haitao .content_default_left{\n      height: 160px;\n      width: 254px;\n      border-right: 1px solid #e6e9eb;\n      float: left;\n      display: inline-block;\n    }\n    .gwd_haitao .ht_weight span {\n      float: left;\n      font-size: 14px;\n    }\n    .ht_weight .weight_tle {\n      margin-left: 12px;\n    } \n    .content_default_left div{\n      height: 40px;\n      line-height: 40px;\n      color: #373737;\n      position: relative;\n      border-bottom: 1px solid #e6e9eb\n    }\n    .gwd_haitao .content_default_left div.ht_tariff {\n      border-bottom: none;\n    }\n    .gwd_haitao .ht_transport_btn,.gwd_haitao .ht_tariff_btn{\n      float: right;\n      margin-right: 15px;\n      cursor: pointer;\n      color: #40ace6;\n    }\n    .gwd_haitao .ht_transport_btn:hover,.ht_tariff_btn:hover{\n      text-decoration: none;\n      color: #40ace6;\n    }\n    .gwd_haitao .ht_freight_num{\n      display: inline-block;\n      width: 42px;\n      color: #778e99;\n      font-size: 14px;\n    }\n    .gwd_haitao .ht_freight,.gwd_haitao .del_line{\n      display: inline-block;\n      text-align: left;\n      font-size: 14px;\n      margin-left: 12px;\n    }\n    a.ht_transport_btn span, .ht_tariff_btn span {\n      display: inline-block;\n      width: 60px;\n      height: 40px;\n      overflow: hidden;\n      float: left;\n      font-size: 12px;\n      margin-right: 5px;\n    }\n    a.ht_transport_btn span:hover, .ht_tariff_btn span:hover {\n      text-decoration: underline;\n    }\n    .gwd_haitao .point_icon{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_downblueicon.png') 0px 0px no-repeat;\n      background-size: 9px 6px;\n      display: inline-block;\n      height: 9px;\n      width: 10px;\n      position: relative;\n      top: 1px;\n    }\n    .gwd_haitao .del_line{\n      cursor: pointer;\n      display: inline-block;\n      width: 98px;\n    }\n    .gwd_haitao .del_line .ht_tariff_num {\n      text-decoration: line-through;\n      color: #778e99;\n      font-size: 14px;\n    }\n    .gwd_haitao .del_line .ht_tariff_num em {\n      font-style: normal;\n    }\n    .gwd_haitao .content_default_right{\n      display: inline-block;\n      height: 160px;\n      width: 119px;\n    }\n    .gwd_haitao .content_default_right a{\n      width: 120px;\n      height: 40px;\n      line-height: 40px;\n      color: #383835;\n      border-bottom: 1px solid #e6e9eb;\n      padding: 0 0 0 14px;\n      text-decoration: none;\n    }\n    .gwd_haitao .content_default_right a span {\n      font-size: 12px;\n      margin-left: 7px;\n    }\n    .gwd_haitao .content_default_right a:hover{\n      text-decoration: none;\n      color: #383835;\n    }\n    #gwd_ht_main .size_help{\n      cursor: pointer;\n      border-bottom: none;\n    }\n    #gwd_ht_main .size_help span {\n      text-decoration: none;\n      color: #5aa4cc;\n    }\n    #gwd_ht_main .size_help span:hover {\n      text-decoration: underline;\n    }\n    .gwd_haitao .content_default_right em{\n      display: inline-block;\n      width: 20px;\n      height: 20px;\n      position: relative;\n      top: 5px;\n    }\n    .gwd_haitao .size_help em{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_sizeicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .ht_translate em{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_transicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .pro_type .ziying{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_ziyingicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .pro_type .sanfang{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_sanicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .mail_type .zhiyou{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_zhiicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .mail_type .feizhiyou{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_zhuanicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .same-style em {\n      background: url('http://s1.gwdang.com/images/extensions/haitao_samestyle.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .vip_tle em {\n      background: url('http://s1.gwdang.com/images/extensions/haitao_vipicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .gwd_wishlist_trend_detail_wrapper{\n      float: left;\n    }\n    .gwd_haitao .ht_content{\n      height: 162px;\n      border-top: 1px solid #e6e9eb;\n      position: relative;\n    }\n    .content_default {\n      float: left;\n    }\n    .content_default:after, .gwd_haitao .content_default_right:after {\n      content: \"\";\n      display: block;\n      clear: both;\n    }\n    /* 关税分类选择 */\n    #tariff_detail{\n      position: absolute;\n      display:none;\n      background-color: #fff;\n      z-index: 99999999;\n      top: 0px;\n      left: 0px;\n      width: 290px;\n      height: 180px;\n      border: 1px solid #e6e9eb;\n      box-shadow: 0px 5px 19px 0px #d7d8d9;\n    }\n    #tariff_detail .xialabox a{\n      display:block;\n      color: #5c6266;\n      margin-left: 7px;\n      width: 98px;\n      height: 25px;\n      line-height: 25px;\n      overflow: hidden;\n    }\n    #tariff_detail .xialabox a:hover{\n      color: #47befe;\n      text-decoration: underline;\n    }\n    #tariff_detail .tar_head{\n      height: 40px;\n      border-bottom: 1px solid #e6e9eb;\n    }\n    #tariff_detail .tar_desc , #tariff_detail .tar_head {\n      font-size: 14px;\n    }\n    #tariff_detail .tar_head span{\n      display: inline-block;\n      height: 34px;\n      line-height: 35px;\n      font-size: 14px;\n      text-align: center;\n      width: 271px;\n    }\n    #tariff_detail .ht_tariff_num, .ht_tariff_cate {\n      color: #40ace6;\n    }\n    .ht_tariff_cate {\n      width: 70px;\n      height: 20px;\n      overflow: hidden;\n      display: inline-block;\n      line-height: 20px;\n      position: relative;\n      top: 5px;\n    }\n    #tariff_detail .del_line {\n      width: 118px;\n    }\n    .gwd_haitao .tar_desc{\n      line-height: 35px;\n    }\n    .gwd_haitao .tar_desc .del_line{\n      margin: 0 0 0 20px;\n    }\n    .gwd_haitao .tar_desc .desc_t{\n      margin-left: 9px;\n    }\n    #cate_select_box{\n      text-align: center;\n      margin-top: 4px;\n      position: relative;\n    }\n    .gwd_haitao #cate_select_box input{\n      height: 30px;\n      width: 109px;\n      background: url('http://s1.gwdang.com/images/extensions/haitao_downgrayicon.png') no-repeat 89px 11px;\n      background-size: 12px 7px;\n      cursor: pointer;\n      border: 1px solid #fff;\n      box-shadow: none;\n      box-sizing: border-box;\n      padding: 3px 7px;\n      border-radius: 4px;\n      color: #9ca7ad;\n      font-size: 12px;\n    }\n    .gwd_haitao #cate_select_box input.sel_info{\n      background-color: #e1e1e1;\n    }\n    .gwd_haitao #cate_select_box input.input_hover{\n      border-bottom: 1px solid #fff;\n      color: #9ca7ad;\n    }\n    .gwd_haitao .cate_select_1{\n      display: inline-block;\n      float: left;\n      margin-left: 22px;\n      border: 1px solid #969899;\n      border-radius: 4px;\n      position: relative;\n    }\n    .gwd_haitao .cate_select_1.select_hover , .gwd_haitao .cate_select_2.select_hover{\n      height: 218px;\n      z-index: 9999;\n      background-color: #fff;\n\n    }\n    .gwd_haitao .cate_select_2{\n      margin-left: 16px;\n      display: inline-block;\n      border: 1px solid #969899;\n      border-radius: 4px;\n      position: relative;\n      float: left;\n    }\n    .gwd_haitao .xialabox{\n      display: none;\n      background-color: #fff;\n      overflow-y: scroll;\n      overflow-x: hidden;\n      height: 185px;\n      text-align: left;\n      border-top: none;\n      position: absolute;\n      width: 109px;\n      font-size: 12px;\n    }\n    .ie_hack.gwd_haitao .xialabox {\n      width: 111px;\n    }\n    .gwd_haitao #select_btn{\n      display: inline-block;\n      width: 60px;\n      height: 24px;\n      background-color: #47befe;\n      border-radius: 12px;\n      margin: 0 auto;\n      color: #fff;\n      text-align: center;\n      line-height: 23px;\n      cursor: pointer;\n      position: absolute;\n      top: 54px;\n      left: 116px;\n    }\n    #transport_detail{\n      position: fixed;\n      width: 755px;\n      height: 314px;\n      border: 1px solid #e6e9eb;\n      background-color: #fff;\n      top: 400px;\n      left: 400px;\n      display: none;\n      z-index: 99999;\n      box-shadow: 0px 5px 19px 0px #d7d8d9;\n    }\n    #transport_detail *{\n      box-sizing: border-box;\n    }\n    #transport_detail .trans_nav .span_0 {\n      margin-left: 10px;\n    }\n    #transport_detail .trans_nav .span_1{\n      text-align: left;\n      width: 146px;\n      margin-left: 17px;\n    }\n    #transport_detail .trans_nav .span_2{\n      text-align: left;\n      width: 147px;\n      margin-left: 4px;\n    }\n    .ht_trans_detail .trans_head{\n      height: 51px;\n      border-bottom: 1px solid #e6e9eb;\n    }\n    .gwd_haitao .closebar{\n      display: inline-block;\n      text-align: center;\n      font-size: 30px;\n      position: absolute;\n      top: 4px;\n      right: 7px;\n      color: #666;\n      cursor: pointer;\n    }\n    .gwd_haitao .closebar.closebg {\n      background: url(\"http://s1.gwdang.com/images/extensions/haitao_closeicon.png\") 6px 6px no-repeat;\n      background-size: 9px 9px;\n      height: 22px;\n      width: 22px;\n      top: 1px;\n      right: 1px;\n    }\n    .gwd_haitao .closebar.closebg:hover {\n      background: url(\"http://s1.gwdang.com/images/extensions/haitao_closehovericon.png\") 3px 3px no-repeat;\n      background-size: 15px 15px;\n    }\n    .ht_trans_detail .trans_nav{\n      display:inline-block;\n      float: left;\n      width: 753px;\n    }\n    .ht_trans_detail .trans_nav>span{\n      width: 120px;\n      color: #5c6266;\n      font-size: 16px;\n      height: 48px;\n      font-weight: bold;\n      float: left;\n      line-height: 48px;\n      text-align: center;\n    }\n    .ht_trans_detail .trans_nav .span_3 {\n      width: 196px;\n      text-align: left;\n      color: #406980;\n      margin-left: 35px;\n    }\n    .ht_trans_detail .trans_nav .trans_w{\n      text-align: left;\n      position: absolute;\n      top: 14px;\n      left: 352px;\n      height: 20px;\n    }\n    .ht_trans_detail .trans_w .weight_type{\n      height: 20px;\n      width: 26px;\n      margin-top: 0px;\n      line-height: 20px;\n      font-size: 14px;\n      float: left;\n      font-weight: normal;\n    }\n    .ht_trans_detail .trans_w .ht_weight_num{\n      height: 20px;\n      position: static;\n      width: 49px;\n      margin-top: 0px;\n      font-size: 12px;\n      border-color: #8dc2e5;\n    }\n    .gwd_haitao .trans_content {\n      height: 210px;\n      width: 751px;\n      overflow-y: scroll;\n    }\n    .ht_trans_detail .trans_foot,.size_desc {\n      color: #9f9f9f;\n      line-height: 35px;\n    }\n    .ht_trans_detail .trans_foot {\n      height: 50px;\n      border-top: 1px solid #e6e9eb;\n      line-height: 50px;\n    }\n    .gwd_haitao .red{\n      color: #e72030;\n    }\n    .gwd_haitao span.red {\n      background: url('http://s1.gwdang.com/images/extensions/haitao_staricon.png') 0px 1px no-repeat;\n      background-size: 8px 9px;\n      height: 10px;\n      width: 10px;\n      display: inline-block;\n    }\n    .ht_trans_detail .trans_foot .red+span{\n      color: #919699;\n    }\n    .ht_trans_detail #trans_list{\n      margin: 0px;\n      padding: 0px;\n    }\n    .ht_trans_detail #trans_list li{\n      list-style: none;\n      display: block;\n      color: #333;\n      cursor: pointer;\n      text-align: left;\n      background-color: #fff;\n    }\n    .ht_trans_detail #trans_list li:after{\n      display:block;\n      clear:both;\n      content:\"\";\n      visibility:hidden;\n      height:0;\n    }\n    .gwd_haitao #trans_list li:hover{\n      background-color: #E1E1E6;\n    }\n    .ht_trans_detail #trans_list li>span, .ht_trans_detail #trans_list li>a{\n      display:inline-block;\n      margin-top: 8px;\n      margin-bottom: 8px;\n      float: left;\n      text-align: left;\n      white-space: pre-wrap;\n      color: #5c6266;\n    }\n    .ht_trans_detail #trans_list li a:hover {\n      text-decoration: none;\n    }\n    span.sale_tle {\n      width: 225px;\n      margin-left: 36px;\n      line-height: 16px;\n    }\n    span.sale_tle a{\n      color: #40ace6;\n    }\n    span.sale_tle a:hover {\n      color: #2b7299;\n    }\n    .ht_trans_detail .lo_center{\n      margin-left: 24px;\n      width: 120px;\n      line-height: 16px;\n    }\n    .ht_trans_detail span.trans_cate {\n      width: 130px;\n      margin-left: 16px;\n    }\n    .ht_trans_detail span.trans_pr {\n      width: 146px;\n      margin-left: 30px;\n      line-height: 16px;\n    }\n    .ht_trans_detail a.trans_com {\n      width: 85px;\n      margin-left: 39px;\n      line-height: 16px;\n      color: #333;\n    }\n    .ht_trans_detail a.trans_com:hover {\n      color: #0066c0;\n      text-decoration: none;\n    }\n    /* 没有优惠政策的情况 */\n    #transport_detail.no_sale {\n      width: 490px;\n    }\n    .no_sale.ht_trans_detail .trans_nav {\n      width: 436px;\n    }\n    .no_sale.gwd_haitao .trans_content {\n      width: 444px;\n    }\n    .no_sale.ht_trans_detail .trans_nav .span_3 {\n      display: none;\n    }\n    #transport_detail.no_sale span.sale_tle {\n      display: none;\n    }\n    /* 尺码帮助 */\n    #size_detail{\n      width: 618px;\n      height: 440px;\n      position: fixed;\n      top: 400px;\n      left: 400px;\n      display: none;\n      text-align: left;\n      z-index: 9999999;\n      box-sizing: border-box;\n      background-color: #fff;\n      border: 1px solid #e6e9eb; \n      box-shadow: 0px 5px 19px 0px #d7d8d9;       \n    }\n    .ht_size_detail .shangyi, .tongzhuang0, .tongxie0{\n      position: absolute;\n      left: 38px;\n    }\n    .ht_size_detail .xiazhuang, .tongzhuang4, .tongxie4{\n      position: absolute;\n      top: 50px;\n      left: 38px;\n    }\n    .ht_size_detail .shoes,.ht_size_detail .tongzhuang, .ht_size_detail .tongxie{\n      display: none;\n    }\n    .ht_size_detail span.shoes {\n      position: absolute;\n      top: 39px;\n      left: 38px;\n      color: #fff;\n      background-color: #47befe;\n      border:  1px solid #47befe;\n    }\n    .ht_size_detail .shangyi.size_hover,.ht_size_detail .xiazhuang.size_hover, .ht_size_detail .xiazhuang.size_hover, .ht_size_detail .tongzhuang.size_hover, .ht_size_detail .tongxie.size_hover{\n      background-color: #47befe;\n      border:  1px solid #47befe;\n      color: #fff;\n    }\n    .ht_size_detail .shangyi,.ht_size_detail .xiazhuang,.ht_size_detail .shoes,.ht_size_detail .tongzhuang, .ht_size_detail .tongxie{\n      height: 30px;\n      width: 60px;\n      text-align: center;\n      line-height: 30px;\n      cursor: pointer;\n      border-radius: 15px;\n      border:  1px solid #969899;\n      color: #8A9499;\n    }\n    .ht_size_detail .cloth_icon{\n      position: absolute;\n      top: 100px;\n      left: 22px;\n    }\n    \n    .ht_size_detail .manshangzhuang {\n      background: url('http://s1.gwdang.com/images/extensions/man_shangzhuang.png') -4px 0px no-repeat;\n      height: 191px;\n      width: 93px;\n    }\n    .ht_size_detail .womanshangzhuang {\n      background: url('http://s1.gwdang.com/images/extensions/woman_shangzhuang.png') 0px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n    }\n    .ht_size_detail .kid0 {\n      background: url('http://s1.gwdang.com/images/extensions/kids0_4.png') 0px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n      margin-left: 8px;\n    }\n    .ht_size_detail .kid4 {\n      background: url('http://s1.gwdang.com/images/extensions/kids4_12.png') -2px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n      margin-left: 0px;\n    }\n    .ht_size_detail .manxiazhuang {\n      background: url('http://s1.gwdang.com/images/extensions/man_xiazhuang.png') -17px 0px no-repeat;\n      height: 216px;\n      width: 63px;\n      margin-left: 13px;\n    }\n    .ht_size_detail .womanxiazhuang {\n      background: url('http://s1.gwdang.com/images/extensions/woman_xiazhuang.png') 0px 0px no-repeat;\n      height: 220px;\n      width: 66px;\n      margin-left: 11px;\n    }\n    \n    .ht_size_detail .ht_shoes.man_foot {\n      background: url('http://s1.gwdang.com/images/extensions/man_foot.png') 4px 0px no-repeat;\n      height: 170px;\n      width: 111px;\n    }\n    .ht_size_detail .ht_shoes.woman_foot {\n      background: url('http://s1.gwdang.com/images/extensions/woman_foot.png') 4px 0px no-repeat;\n      height: 170px;\n      width: 111px;\n    }\n    .ht_size_detail .ht_shoes.kids_foot {\n      background: url('http://s1.gwdang.com/images/extensions/kid_shoes.png') 0px 0px no-repeat;\n      height: 171px;\n      width: 131px;\n      left: 4px;\n    }\n    .ht_size_detail .clothes_nav{\n      margin-top: 13px;\n      line-height: 30px;\n      height: 30px;\n      width: 567px;\n      margin-left: 55px;\n    }\n    .ht_size_detail .clothes_nav ul{\n      padding: 0;\n      margin: 0px;\n    }\n    .ht_size_detail .size_s{\n      height: 40px;\n      display: inline-block;\n      border-right: 2px solid #e6e9eb;\n    }\n    .detail_left {\n      float: left;\n      width: 136px;\n      height: 367px;\n      position: relative;\n    }\n    .detail_left span {\n      display: inline-block;\n    }\n    .ht_size_detail #size_item{\n      height: 180px;\n      width: 452px;\n      overflow-y: scroll;\n      border: 1px solid #e6e9eb;\n    }\n    .ht_size_detail .clothes_nav ul li{\n      list-style: none;\n      float: left;\n      font-size: 16px;\n      width: 32px;\n      margin-right: 57px;\n      color: #000;\n      cursor: pointer;\n      border-bottom: 3px solid #fff;\n    }\n    .ht_size_detail .clothes_nav ul li:hover {\n      color: #47befe;\n    }\n    .ht_size_detail .clothes_nav ul li.select{\n      border-bottom: 3px solid #47befe;\n      color: #47befe;\n    }\n    .ht_size_detail .size_head{\n      height: 60px;\n    }\n    .ht_size_detail .unit_desc{\n      display: inline-block;\n      float: right;\n      margin-right: 27px;\n      margin-top: 8px;\n      position: relative;\n    }\n    .ht_size_detail .size_con{\n      text-align: right;\n      margin-top: 16px;\n      margin-bottom: 11px;\n      margin-right: 26px;\n      color: #575e61;\n    }\n    .ht_size_detail .size_op{\n      width: 440px;\n      display: inline-block;\n      position: relative;\n    }\n\n    .ht_size_detail .size_op input+input {\n     margin-left: 0px; \n    }\n    #first_size+.first_xiala {\n     position: absolute;\n     right: 267px;\n    }\n    .ht_size_detail .size_op input{\n      width: 100px;\n      height: 31px;\n      box-sizing: border-box;\n    }\n    #first_size, #second_size {\n      border-radius: 4px;\n      outline: none;\n      padding: 0 7px;\n      border: 1px solid #969899;\n      box-shadow: none;\n    }\n    #first_size:focus, #second_size:focus {\n      border-color: #47befe;\n    }\n    .ht_size_detail .size_xialabox {\n      display: none;\n      width: 60px;\n      height: 190px;\n      border: 1px solid #999;\n      border-bottom: none;\n      position: absolute;\n      text-align: left;\n      line-height: 19px;\n      top: -189px;\n      right: 267px;\n      box-sizing: border-box;\n      background-color: #fff;\n      border-top-left-radius: 4px;\n      border-top-right-radius: 4px;\n    }\n    #second_size+.second_xiala{\n      position: absolute;\n      right: -14px;\n    }\n    .ht_size_detail #second_size+input+.size_xialabox{\n      right: -14px;\n    }\n    .ht_size_detail .size_xialabox a{\n      display: block;\n      padding-left: 7px;\n      color: #5c6266;\n    }\n    .ht_size_detail .size_xialabox a:hover{\n      text-decoration: underline;\n      color: #47befe;\n    }\n    .ht_size_detail .size_op .size_xiala{\n      width: 60px;\n      border: 1px solid #999;\n      padding-left: 7px;\n      border-radius: 4px;\n      color: #8a9499;\n    }\n    .ht_size_detail .size_op .size_xiala.msHover {\n      border-radius: 0px;\n      border-bottom-left-radius: 4px;\n      border-bottom-right-radius: 4px;\n      background: url('http://s1.gwdang.com/images/extensions/haitao_upgrayicon.png') no-repeat 42px 12px;\n      background-size: 12px 7px;\n    }\n    .ht_size_detail .size_xiala{\n      background: url('http://s1.gwdang.com/images/extensions/haitao_downgrayicon.png') no-repeat 42px 12px;\n      background-size: 12px 7px;\n      cursor: pointer;\n    }\n    .ht_size_detail .conversion{\n      margin: 0 30px 0 105px;\n    }\n    /* fanyi */\n    .ht_fanyi{\n      display: block;\n      position: absolute;\n      width: 200px;\n      z-index: 99;\n      background: #fff url('http://s1.gwdang.com/images/extensions/haitao_fanyi_icon.png') 0px 0px no-repeat;\n      border: 1px solid #47befe;\n      border-radius: 8px;\n      min-height: 25px;\n      color: #494b4d;\n      text-indent: 32px;\n      padding: 2px 12px;\n      line-height: 19px;\n    }\n    .ht_fanyi a{\n      display: block;\n      width: 130px;\n      text-decoration: none;\n      color: #494b4d;\n    }\n    .ht_fanyi a:hover{\n      text-decoration: none;\n      color: #494b4d;\n    }\n    #ht_top{\n      position: absolute;\n      width: 0px;\n      height: 0px;\n      line-height: 0px;\n      border-bottom: 8px solid #278ac9;\n      border-left: 9px solid transparent;\n      border-right: 9px solid transparent;\n      left: 58px;\n      top: -8px;\n    }\n    #ht_top:after {\n      content: \"\";\n      display: block;\n      position: absolute;\n      width: 0px;\n      height: 0px;\n      line-height: 0px;\n      border-bottom: 7px solid #fff;\n      border-left: 8px solid transparent;\n      border-right: 8px solid transparent;\n      left: -8px;\n      top: 1px;\n    }\n    /* 滚动条样式 */\n    .gwd_haitao ::-webkit-scrollbar {width:6px;height: 6px;}\n    .gwd_haitao ::-webkit-scrollbar-track {background:#f0f0f0;}\n    .gwd_haitao ::-webkit-scrollbar-thumb {\n      background: #cdcdcd;\n      border-radius: 4px;\n    }\n    #size_detail ::-webkit-scrollbar {width:2px;height: 6px;}\n    /* 亚马逊遮挡 */\n    div#actionPanelWrapper.burj {\n      overflow: visible!important;\n    }\n\n    /* amazonGlobal */\n    #globalInnerDetail {\n      display: none;\n    }\n    #globalInnerDetail .content_default_left {\n      text-align: center;\n    }\n    #globalInnerDetail .inner-tle  {\n      color: #666;\n    }\n    #globalInnerDetail .inner-img img {\n      max-height: 100px;\n      max-width: 150px;\n    }\n    #globalInnerDetail .inner-tle {\n      font-size: 12px;\n      line-height: 14px;\n      width: 230px;\n      height: 28px;\n      overflow: hidden;\n    }\n    #globalInnerDetail .inner-btn {\n      color: #fff;\n      background-color: #46c0fe;\n      height: 22px;\n      line-height: 22px;\n      text-align: center;\n      display: inline-block;\n      width: 78px;\n      border-radius: 5px;\n      text-decoration: none;\n      margin-top: 2px;\n    }\n    #globalInnerDetail .pro_type:hover .pro_type_detail {\n      display: block !important;\n    }\n    #globalInnerDetail .mail_type:hover .mail_type_detail {\n      display: block !important;\n    }\n    #globalInnerDetail .vip_tle:hover .vip_tle_detail {\n      display: block !important;\n    }\n    #globalInnerDetail .same-style:hover .same-style_detail {\n      display: block !important;\n    }\n    #globalInnerDetail .same-style_detail {\n      left: 350px;\n      top: 81px;\n    }", ""]);

// exports


/***/ }),
/* 244 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data, c_server = $data.c_server;
    $$out += '<div id="gwd_ht_main" class="gwd_haitao ';
    $$out += $escape(data.pageclass);
    $$out += '" >\n    <div  class="ht_head">\n      <a href="';
    $$out += $escape(c_server);
    $$out += '" class="gwd_site_icon" target="_blank" title="购物党"></a>\n      <a class="ht_getprice item_hover">到手价\uFF1A<span class="ht_getprice_num fontf_Arial">\xA5';
    $$out += $escape(data.getprice);
    $$out += '</span></a>\n    </div>\n    <div class="ht_content">\n      <div class="content_default" id="ht_content_info">\n        <div class="content_default_left">\n          <div class="unit_price">\n            <span class="price_tle">单价\uFF1A</span>\n            <span class="price_num fontf_Arial">\xA5';
    $$out += $escape(data.unit_price);
    $$out += '</span>\n            <a id="ht_addcollect" class="trend_wait" ><span>降价提醒</span>\n              <div class="collect_detail div_detail">\n                点击加入收藏夹\uFF0C商品降价有提醒\n              </div>\n            </a>\n          </div>\n          <div class="ht_weight">\n            <span class="weight_tle">重量\uFF1A</span>\n            <input type="text" value="';
    $$out += $escape(data.he_weight);
    $$out += '" class="ht_weight_num">\n            <span class="weight_type">KG</span>\n            <div class="weight_type_detail div_detail">\n                点击转换重量单位\n            </div>\n          </div>\n          <div class="ht_transport">\n            <span class="ht_freight">转运费\uFF1A<span class="ht_freight_num fontf_Arial">\xA50</span></span>\n            <a class="ht_transport_btn">\n              <span >转运商家</span>\n              <em class="point_icon"></em>\n              <div class="transport_remind_detail div_detail">\n                点击选择转运公司\n              </div>\n            </a>\n          </div>\n          <div class="ht_tariff">\n            <span class="del_line" data-del="1">行邮税\uFF1A<span class="ht_tariff_num fontf_Arial" data-price="0">&nbsp;<em>未知</em>&nbsp;</span>\n              <div class="tariff_remind_detail div_detail">\n                个人行李和邮递物品进口税\uFF08关税\u3001进口环节增值税及消费税三者合一税种\uFF09\n              </div>\n            </span>\n            <a class="ht_tariff_btn">\n              <span>选择分类</span>\n              <em class="point_icon"></em>\n              <div class="tariff_info_detail div_detail">\n                点击选择商品类别\n              </div>\n            </a>\n          </div>\n        </div>\n        <div class="content_default_right">\n          <a class="pro_type">\n            <em class="';
    $$out += $escape(data.protype);
    $$out += '"></em>\n            <span class="pro_t_tle" >';
    $$out += $escape(data.protype == 'ziying' ? '自营' : '第三方');
    $$out += '</span>\n            <div class="pro_type_detail div_detail">\n              ';
    $$out += $escape(data.protype == 'ziying' ? data.site + '直接销售' : data.site + '第三方商家销售');
    $$out += '\n            </div>\n          </a>\n          <a class="mail_type" >\n            <em class="';
    $$out += $escape(data.mailtype);
    $$out += '"></em>\n            <span >';
    $$out += $escape(data.mailtype == 'zhiyou' ? '可直邮' : '需转运');
    $$out += '</span>\n            <div class="mail_type_detail div_detail">\n              ';
    if (data.mailtype == 'zhiyou') {
        $$out += '\n                该商品直邮支持直邮中国\uFF0C到手时间约8~16天\n              ';
    } else if (data.hosts == 'www.amazon.com') {
        $$out += '\n                该商品不支持直邮中国\uFF0C需转运公司转运\uFF0C到手时间大约20~35天\n              ';
    } else if (data.hosts == 'www.amazon.co.jp') {
        $$out += '\n                该商品不支持直邮中国\uFF0C需转运公司转运\uFF0C到手时间大约7~30天\n              ';
    } else if (data.hosts == 'www.amazon.de') {
        $$out += '\n                该商品不支持直邮中国\uFF0C需转运公司转运\uFF0C到手时间大约25~40天\n              ';
    } else {
        $$out += '\n                该商品不支持直邮中国\uFF0C需转运公司转运\uFF0C到手时间大约20~35天\n              ';
    }
    $$out += '\n            </div>\n          </a>\n          <a class="ht_translate">\n            <em></em>\n            <span>翻译帮助</span>\n            <div class="translate_detail div_detail">\n              已为您开启划词翻译\uFF0C鼠标选中相关文字\uFF0C即可翻译\n            </div>\n          </a>\n          <a class="size_help">\n            <em></em>\n            <span>尺码帮助</span>\n            <div class="size_detail div_detail">\n              点击查看尺码帮助\n            </div>\n          </a>\n        </div>\n      </div>\n      <div style="clear:both"></div>\n      <div id="tariff_detail">\n        <span class="closebar closebg" title="关闭"></span>\n        <div class="tar_head">\n          <span>选择商品分类</span>\n        </div>\n        <div class="tar_desc">\n          <span class="del_line">商品\uFF1A<span class="ht_tariff_cate">请选择分类</span></span>\n          <span class="desc_t">单件行邮税\uFF1A<span class="ht_tariff_num">未知</span> </span>\n        </div>\n        <div id="cate_select_box">\n          <div class="cate_select_1">\n            <input type="text" value="请选择分类" id="cate_big" class="icon_down" readonly>\n            <div class="xialabox" id="big_xiala">\n              <a cate="cate1"  href="javascript:void(0);">食品</a>\n              <a cate="cate2"  href="javascript:void(0);">服饰</a>\n              <a cate="cate3"  href="javascript:void(0);">鞋\u3001箱包</a>\n              <a cate="cate4"  href="javascript:void(0);">手表</a>\n              <a cate="cate5"  href="javascript:void(0);">厨房\u3001餐厅</a>\n              <a cate="cate6"  href="javascript:void(0);">家电</a>\n              <a cate="cate7"  href="javascript:void(0);">个人护理</a>\n              <a cate="cate8"  href="javascript:void(0);">美容</a>\n              <a cate="cate9"  href="javascript:void(0);">手机及配件</a>\n              <a cate="cate10" href="javascript:void(0);">办公用品</a>\n              <a cate="cate11" href="javascript:void(0);">照相机\u3001摄像机</a>\n              <a cate="cate12" href="javascript:void(0);">电子数码</a>\n              <a cate="cate13" href="javascript:void(0);">游戏机/游戏碟</a>\n              <a cate="cate14" href="javascript:void(0);">音箱</a>\n              <a cate="cate15" href="javascript:void(0);">个人电脑</a>\n              <a cate="cate16" href="javascript:void(0);">电子书设备</a>\n              <a cate="cate17" href="javascript:void(0);">玩具</a>\n              <a cate="cate18" href="javascript:void(0);">婴儿用品</a>\n            </div>\n          </div>\n          <div class="cate_select_2">\n            <input type="text" value="请选择分类" id="cate_small" maxlength="5" class="icon_down sel_info" readonly>\n            <div class="xialabox" id="small_xiala"></div>\n          </div>\n          <div id="select_btn" data-tariff="-1">确认</div>\n        </div>\n      </div>\n      \n    </div>\n</div>\n';
    return $$out;
};

/***/ }),
/* 245 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/*! art-template@runtime | https://github.com/aui/art-template */

var globalThis = typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};

var runtime = Object.create(globalThis);
var ESCAPE_REG = /["&'<>]/;

/**
 * 编码模板输出的内容
 * @param  {any}        content
 * @return {string}
 */
runtime.$escape = function (content) {
    return xmlEscape(toString(content));
};

/**
 * 迭代器，支持数组与对象
 * @param {array|Object} data
 * @param {function}     callback
 */
runtime.$each = function (data, callback) {
    if (Array.isArray(data)) {
        for (var i = 0, len = data.length; i < len; i++) {
            callback(data[i], i);
        }
    } else {
        for (var _i in data) {
            callback(data[_i], _i);
        }
    }
};

// 将目标转成字符
function toString(value) {
    if (typeof value !== 'string') {
        if (value === undefined || value === null) {
            value = '';
        } else if (typeof value === 'function') {
            value = toString(value.call(value));
        } else {
            value = JSON.stringify(value);
        }
    }

    return value;
}

// 编码 HTML 内容
function xmlEscape(content) {
    var html = '' + content;
    var regexResult = ESCAPE_REG.exec(html);
    if (!regexResult) {
        return content;
    }

    var result = '';
    var i = void 0,
        lastIndex = void 0,
        char = void 0;
    for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {
        switch (html.charCodeAt(i)) {
            case 34:
                char = '&#34;';
                break;
            case 38:
                char = '&#38;';
                break;
            case 39:
                char = '&#39;';
                break;
            case 60:
                char = '&#60;';
                break;
            case 62:
                char = '&#62;';
                break;
            default:
                continue;
        }

        if (lastIndex !== i) {
            result += html.substring(lastIndex, i);
        }

        lastIndex = i + 1;
        result += char;
    }

    if (lastIndex !== i) {
        return result + html.substring(lastIndex, i);
    } else {
        return result;
    }
}

module.exports = runtime;

/***/ }),
/* 246 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pos = $data.pos;
    $$out += '<div id="size_detail" class="ht_size_detail gwd_haitao" style="top: ';
    $$out += $escape(pos.posy);
    $$out += 'px;left: ';
    $$out += $escape(pos.posx);
    $$out += 'px;">\n    <span class="closebar closebg" title="关闭"></span>\n    \n    <div class="size_head">\n        <div class="clothes_nav">\n          <ul>\n            <li class="select">男装</li>\n            <li>女装</li>\n            <li>童装</li>\n            <li>男鞋</li>\n            <li>女鞋</li>\n            <li>童鞋</li>\n          </ul>\n        </div>\n        <div class="unit_desc unit_cm">单位\uFF1A厘米(CM)</div>\n        <div class="unit_desc unit_mm">单位\uFF1A毫米(MM)</div>\n    </div>\n    <div class="size_content">\n      <div class="detail_left">\n        <span class="shangyi size_hover">上装</span>\n        <span class="xiazhuang">下装</span>\n        <span class="tongzhuang tongzhuang0">0 ~ 4岁</span>\n        <span class="tongzhuang tongzhuang4">4 ~ 12岁</span>\n        <span class="shoes">鞋子</span>\n        <span class="tongxie tongxie0">0 ~ 4岁</span>\n        <span class="tongxie tongxie4">4 ~ 12岁</span>\n        <span class="cloth_icon ht_shangyi manshangzhuang"></span>\n      </div>\n      <div class="detail_right">\n        <div class="content_center">\n          <div class="size_s">\n          </div>\n          <div id="size_item">\n            <a class="size_item_img"></a>\n          </div>\n          \n        </div>\n        <div class="size_desc">\n          <span class="red"></span>\n          <span >此尺码为一般尺码\uFF0C不同品牌可能会存在相应不同</span>\n        </div>\n      </div>\n    </div>\n    <div class="size_foot">\n        <div class="size_con">在线尺寸转换工具</div>\n        <div class="size_op">\n          <input id="first_size" type="text">\n          <input class="size_xiala first_xiala" value="厘米" readonly>\n          <div class="size_xialabox" data-size="first_xiala">\n            <a href="javascript:void(0);"></a>\n            <a href="javascript:void(0);">米</a>\n            <a href="javascript:void(0);">厘米</a>\n            <a href="javascript:void(0);">毫米</a>\n            <a href="javascript:void(0);">英尺</a>\n            <a href="javascript:void(0);">英寸</a>\n            <a href="javascript:void(0);">码</a>\n            <a href="javascript:void(0);">尺</a>\n            <a href="javascript:void(0);">寸</a>\n            <a href="javascript:void(0);">分</a>\n            <a href="javascript:void(0);">厘</a>\n          </div>\n          <span class="conversion">转换为</span>\n          <input id="second_size">\n          <input class="size_xiala second_xiala" value="英寸" readonly>\n          <div class="size_xialabox" data-size="second_xiala">\n            <a href="javascript:void(0);"></a>\n            <a href="javascript:void(0);">米</a>\n            <a href="javascript:void(0);">厘米</a>\n            <a href="javascript:void(0);">毫米</a>\n            <a href="javascript:void(0);">英尺</a>\n            <a href="javascript:void(0);">英寸</a>\n            <a href="javascript:void(0);">码</a>\n            <a href="javascript:void(0);">尺</a>\n            <a href="javascript:void(0);">寸</a>\n            <a href="javascript:void(0);">分</a>\n            <a href="javascript:void(0);">厘</a>\n          </div>\n        </div>\n    </div>\n      </div>';
    return $$out;
};

/***/ }),
/* 247 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pos = $data.pos, ht_weight = $data.ht_weight, c_server = $data.c_server;
    $$out += '<div id="transport_detail" class="ht_trans_detail gwd_haitao" style="top: ';
    $$out += $escape(pos.posy);
    $$out += 'px;left: ';
    $$out += $escape(pos.posx);
    $$out += 'px;">\n        <div class="trans_head">\n          <div class="trans_nav">\n            <span class="span_0">转运商家</span>\n            <span class="span_1">商家仓库</span>\n            <span class="span_2">转运费</span>\n            <span class="span_3">购物党独家优惠</span>\n            <span class="trans_w">\n              <input type="text" value="';
    $$out += $escape(ht_weight);
    $$out += '" class="ht_weight_num">\n              <span class="weight_type">KG</span>\n            </span>\n          </div>\n        </div>\n        <div class="trans_content">\n          <ul id="trans_list">\n          </ul>\n        </div>\n        <div class="trans_foot">\n          <a href="';
    $$out += $escape(c_server);
    $$out += '/app/haitao_intr" class="trans_help" title="海淘转运攻略" target="_blank">海淘转运攻略</a>\n          <span class="red"></span>\n          <span >具体转运优惠政策和费用以您选择的转运公司为准</span>\n        </div>\n        <span class="closebar closebg" title="关闭"></span>\n        \n</div>';
    return $$out;
};

/***/ }),
/* 248 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime) {

function addScheme(url) {
  if (url.indexOf('http') === 0) {
    return url;
  }
  return 'https:' + url;
}

var client = __webpack_require__(16);

var getOrders = function getOrders(config) {
  var arrs = $('.co-th').toArray();
  console.log(arrs);
  var related = arrs.map(function (x) {
    var d = x.id.split('_');
    var errText = $(x).find('.show-detail').text().trim().split('申请价保失败，');
    if (errText.length > 1) {
      errText = errText[1].replace('查看详细规则', '');
    } else {
      errText = '';
    }
    if (errText.indexOf('此商品未发生降价') > -1) {
      errText = '';
    }
    if (x.innerText.indexOf('商品为赠品') > -1) {
      errText = '商品为赠品，不支持价保';
    }
    var skuId = $(x).attr('skuid');
    var product = {
      title: $(x).find('.p-name a').text().trim(),
      url: addScheme('https://item.jd.com/' + skuId + '.html'),
      img: addScheme($(x).find('img').attr('src')),
      price: parseFloat($(x).find('.price').text().replace('￥', '').replace(/,/g, '').trim()) * 100,
      buy_cnt: parseInt($(x).find('.count').text().replace('x', '').trim()),
      dp_id: d[2] + '-3',
      order: d[1],
      inTime: x.innerText.indexOf('已超过价保周期') === -1 && errText.length === 0,
      errorText: errText
    };
    if (product.inTime && config.autoClick) {
      window.skuApply(product.order, d[2], 1, 'Others');
    }
    //product.price = product.price / product.buy_cnt
    product.total_price = product.price * product.buy_cnt;
    return product;
  });
  var getTime = function getTime(orderId) {
    var t = $('.tr-th').toArray().filter(function (x) {
      return x.innerText.indexOf(orderId) > -1;
    });
    return $(t[0]).find('.time').text();
  };
  return __webpack_require__(11).arrayUnique(related.map(function (x) {
    return x.order;
  })).map(function (x) {
    var data = related.filter(function (y) {
      return y.order === x;
    });
    return {
      orderNo: x,
      ctime: getTime(x),
      related: data,
      total_price: data.map(function (x) {
        return x.price * x.buy_cnt;
      }).reduce(function (a, b) {
        return a + b;
      }),
      pay_price: data.map(function (x) {
        return x.total_price;
      }).reduce(function (a, b) {
        return a + b;
      })
    };
  });
};

function sleep(time) {
  return new Promise(function (resolve) {
    setTimeout(function () {
      return resolve();
    }, time);
  });
}

module.exports = {
  init: function init() {
    var config, payload, done, page, orders;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          context$1$0.next = 2;
          return regeneratorRuntime.awrap(__webpack_require__(3).requestXHR('https://cdn.bijiago.com/js/configs/priceProtect-bijiago.json', false));

        case 2:
          config = context$1$0.sent;
          payload = [];
          done = false;
          page = 1;

        case 6:
          orders = getOrders(config);

          if (!(orders.length === 0)) {
            context$1$0.next = 9;
            break;
          }

          return context$1$0.abrupt('break', 17);

        case 9:
          console.log('第' + page + '页', orders);
          orders.forEach(function (item) {
            if (Date.now() - new Date(item.ctime).getTime() > 30 * 24 * 3600000) {
              done = true;
              item.related.forEach(function (x) {
                return x.inTime = false;
              });
            }
          });
          payload = payload.concat(orders);
          page++;
          window.mescroll.optUp.callback({ num: page, size: 10, time: null }); // 价保页面用这个翻页
          context$1$0.next = 16;
          return regeneratorRuntime.awrap(sleep(400));

        case 16:
          if (!done) {
            context$1$0.next = 6;
            break;
          }

        case 17:
          console.log(payload);
          client.get('/setDpItemList', {
            items: payload
          });
          payload = payload.filter(function (x) {
            return x.related[0].inTime;
          });
          payload = __webpack_require__(249).bytesToBase64(__webpack_require__(45).gZip(payload));
          console.log(payload);
          //let allowPriceProtect = await require('bjgou/modules/util.js').getStorage('allowPriceProtect')
          if (config.sync) {
            __webpack_require__(22).sendCartLog(payload).then(function (res) {
              return console.log(res);
            });
          }
          client.get('/setLoginStatus', {
            loginStatus: true
          }, function () {});

        case 24:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5)))

/***/ }),
/* 249 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/*
MIT License

Copyright (c) 2020 Egor Nepomnyaschih

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*
// This constant can also be computed with the following algorithm:
const base64abc = [],
	A = "A".charCodeAt(0),
	a = "a".charCodeAt(0),
	n = "0".charCodeAt(0);
for (let i = 0; i < 26; ++i) {
	base64abc.push(String.fromCharCode(A + i));
}
for (let i = 0; i < 26; ++i) {
	base64abc.push(String.fromCharCode(a + i));
}
for (let i = 0; i < 10; ++i) {
	base64abc.push(String.fromCharCode(n + i));
}
base64abc.push("+");
base64abc.push("/");
*/


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.bytesToBase64 = bytesToBase64;
exports.base64ToBytes = base64ToBytes;
exports.base64encode = base64encode;
exports.base64decode = base64decode;
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];

/*
// This constant can also be computed with the following algorithm:
const l = 256, base64codes = new Uint8Array(l);
for (let i = 0; i < l; ++i) {
	base64codes[i] = 255; // invalid character
}
base64abc.forEach((char, index) => {
	base64codes[char.charCodeAt(0)] = index;
});
base64codes["=".charCodeAt(0)] = 0; // ignored anyway, so we just need to prevent an error
*/
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];

function getBase64Code(charCode) {
  if (charCode >= base64codes.length) {
    throw new Error("Unable to parse base64 string.");
  }
  var code = base64codes[charCode];
  if (code === 255) {
    throw new Error("Unable to parse base64 string.");
  }
  return code;
}

function bytesToBase64(bytes) {
  var result = '',
      i = undefined,
      l = bytes.length;
  for (i = 2; i < l; i += 3) {
    result += base64abc[bytes[i - 2] >> 2];
    result += base64abc[(bytes[i - 2] & 0x03) << 4 | bytes[i - 1] >> 4];
    result += base64abc[(bytes[i - 1] & 0x0F) << 2 | bytes[i] >> 6];
    result += base64abc[bytes[i] & 0x3F];
  }
  if (i === l + 1) {
    // 1 octet yet to write
    result += base64abc[bytes[i - 2] >> 2];
    result += base64abc[(bytes[i - 2] & 0x03) << 4];
    result += "==";
  }
  if (i === l) {
    // 2 octets yet to write
    result += base64abc[bytes[i - 2] >> 2];
    result += base64abc[(bytes[i - 2] & 0x03) << 4 | bytes[i - 1] >> 4];
    result += base64abc[(bytes[i - 1] & 0x0F) << 2];
    result += "=";
  }
  return result;
}

function base64ToBytes(str) {
  if (str.length % 4 !== 0) {
    throw new Error("Unable to parse base64 string.");
  }
  var index = str.indexOf("=");
  if (index !== -1 && index < str.length - 2) {
    throw new Error("Unable to parse base64 string.");
  }
  var missingOctets = str.endsWith("==") ? 2 : str.endsWith("=") ? 1 : 0,
      n = str.length,
      result = new Uint8Array(3 * (n / 4)),
      buffer = undefined;
  for (var i = 0, j = 0; i < n; i += 4, j += 3) {
    buffer = getBase64Code(str.charCodeAt(i)) << 18 | getBase64Code(str.charCodeAt(i + 1)) << 12 | getBase64Code(str.charCodeAt(i + 2)) << 6 | getBase64Code(str.charCodeAt(i + 3));
    result[j] = buffer >> 16;
    result[j + 1] = buffer >> 8 & 0xFF;
    result[j + 2] = buffer & 0xFF;
  }
  return result.subarray(0, result.length - missingOctets);
}

function base64encode(str) {
  var encoder = arguments.length <= 1 || arguments[1] === undefined ? new TextEncoder() : arguments[1];

  return bytesToBase64(encoder.encode(str));
}

function base64decode(str) {
  var decoder = arguments.length <= 1 || arguments[1] === undefined ? new TextDecoder() : arguments[1];

  return decoder.decode(base64ToBytes(str));
}

/***/ }),
/* 250 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// Top level file is just a mixin of submodules & constants


var assign    = __webpack_require__(25).assign;

var deflate   = __webpack_require__(251);
var inflate   = __webpack_require__(254);
var constants = __webpack_require__(77);

var pako = {};

assign(pako, deflate, inflate, constants);

module.exports = pako;


/***/ }),
/* 251 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";



var zlib_deflate = __webpack_require__(252);
var utils        = __webpack_require__(25);
var strings      = __webpack_require__(75);
var msg          = __webpack_require__(57);
var ZStream      = __webpack_require__(76);

var toString = Object.prototype.toString;

/* Public constants ==========================================================*/
/* ===========================================================================*/

var Z_NO_FLUSH      = 0;
var Z_FINISH        = 4;

var Z_OK            = 0;
var Z_STREAM_END    = 1;
var Z_SYNC_FLUSH    = 2;

var Z_DEFAULT_COMPRESSION = -1;

var Z_DEFAULT_STRATEGY    = 0;

var Z_DEFLATED  = 8;

/* ===========================================================================*/


/**
 * class Deflate
 *
 * Generic JS-style wrapper for zlib calls. If you don't need
 * streaming behaviour - use more simple functions: [[deflate]],
 * [[deflateRaw]] and [[gzip]].
 **/

/* internal
 * Deflate.chunks -> Array
 *
 * Chunks of output data, if [[Deflate#onData]] not overridden.
 **/

/**
 * Deflate.result -> Uint8Array|Array
 *
 * Compressed result, generated by default [[Deflate#onData]]
 * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
 * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you
 * push a chunk with explicit flush (call [[Deflate#push]] with
 * `Z_SYNC_FLUSH` param).
 **/

/**
 * Deflate.err -> Number
 *
 * Error code after deflate finished. 0 (Z_OK) on success.
 * You will not need it in real life, because deflate errors
 * are possible only on wrong options or bad `onData` / `onEnd`
 * custom handlers.
 **/

/**
 * Deflate.msg -> String
 *
 * Error message, if [[Deflate.err]] != 0
 **/


/**
 * new Deflate(options)
 * - options (Object): zlib deflate options.
 *
 * Creates new deflator instance with specified params. Throws exception
 * on bad params. Supported options:
 *
 * - `level`
 * - `windowBits`
 * - `memLevel`
 * - `strategy`
 * - `dictionary`
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Additional options, for internal needs:
 *
 * - `chunkSize` - size of generated data chunks (16K by default)
 * - `raw` (Boolean) - do raw deflate
 * - `gzip` (Boolean) - create gzip wrapper
 * - `to` (String) - if equal to 'string', then result will be "binary string"
 *    (each char code [0..255])
 * - `header` (Object) - custom header for gzip
 *   - `text` (Boolean) - true if compressed data believed to be text
 *   - `time` (Number) - modification time, unix timestamp
 *   - `os` (Number) - operation system code
 *   - `extra` (Array) - array of bytes with extra data (max 65536)
 *   - `name` (String) - file name (binary string)
 *   - `comment` (String) - comment (binary string)
 *   - `hcrc` (Boolean) - true if header crc should be added
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
 *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
 *
 * var deflate = new pako.Deflate({ level: 3});
 *
 * deflate.push(chunk1, false);
 * deflate.push(chunk2, true);  // true -> last chunk
 *
 * if (deflate.err) { throw new Error(deflate.err); }
 *
 * console.log(deflate.result);
 * ```
 **/
function Deflate(options) {
  if (!(this instanceof Deflate)) return new Deflate(options);

  this.options = utils.assign({
    level: Z_DEFAULT_COMPRESSION,
    method: Z_DEFLATED,
    chunkSize: 16384,
    windowBits: 15,
    memLevel: 8,
    strategy: Z_DEFAULT_STRATEGY,
    to: ''
  }, options || {});

  var opt = this.options;

  if (opt.raw && (opt.windowBits > 0)) {
    opt.windowBits = -opt.windowBits;
  }

  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
    opt.windowBits += 16;
  }

  this.err    = 0;      // error code, if happens (0 = Z_OK)
  this.msg    = '';     // error message
  this.ended  = false;  // used to avoid multiple onEnd() calls
  this.chunks = [];     // chunks of compressed data

  this.strm = new ZStream();
  this.strm.avail_out = 0;

  var status = zlib_deflate.deflateInit2(
    this.strm,
    opt.level,
    opt.method,
    opt.windowBits,
    opt.memLevel,
    opt.strategy
  );

  if (status !== Z_OK) {
    throw new Error(msg[status]);
  }

  if (opt.header) {
    zlib_deflate.deflateSetHeader(this.strm, opt.header);
  }

  if (opt.dictionary) {
    var dict;
    // Convert data if needed
    if (typeof opt.dictionary === 'string') {
      // If we need to compress text, change encoding to utf8.
      dict = strings.string2buf(opt.dictionary);
    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
      dict = new Uint8Array(opt.dictionary);
    } else {
      dict = opt.dictionary;
    }

    status = zlib_deflate.deflateSetDictionary(this.strm, dict);

    if (status !== Z_OK) {
      throw new Error(msg[status]);
    }

    this._dict_set = true;
  }
}

/**
 * Deflate#push(data[, mode]) -> Boolean
 * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be
 *   converted to utf8 byte sequence.
 * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
 *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
 *
 * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
 * new compressed chunks. Returns `true` on success. The last data block must have
 * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
 * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you
 * can use mode Z_SYNC_FLUSH, keeping the compression context.
 *
 * On fail call [[Deflate#onEnd]] with error code and return false.
 *
 * We strongly recommend to use `Uint8Array` on input for best speed (output
 * array format is detected automatically). Also, don't skip last param and always
 * use the same type in your code (boolean or number). That will improve JS speed.
 *
 * For regular `Array`-s make sure all elements are [0..255].
 *
 * ##### Example
 *
 * ```javascript
 * push(chunk, false); // push one of data chunks
 * ...
 * push(chunk, true);  // push last chunk
 * ```
 **/
Deflate.prototype.push = function (data, mode) {
  var strm = this.strm;
  var chunkSize = this.options.chunkSize;
  var status, _mode;

  if (this.ended) { return false; }

  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);

  // Convert data if needed
  if (typeof data === 'string') {
    // If we need to compress text, change encoding to utf8.
    strm.input = strings.string2buf(data);
  } else if (toString.call(data) === '[object ArrayBuffer]') {
    strm.input = new Uint8Array(data);
  } else {
    strm.input = data;
  }

  strm.next_in = 0;
  strm.avail_in = strm.input.length;

  do {
    if (strm.avail_out === 0) {
      strm.output = new utils.Buf8(chunkSize);
      strm.next_out = 0;
      strm.avail_out = chunkSize;
    }
    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */

    if (status !== Z_STREAM_END && status !== Z_OK) {
      this.onEnd(status);
      this.ended = true;
      return false;
    }
    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {
      if (this.options.to === 'string') {
        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
      } else {
        this.onData(utils.shrinkBuf(strm.output, strm.next_out));
      }
    }
  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);

  // Finalize on the last chunk.
  if (_mode === Z_FINISH) {
    status = zlib_deflate.deflateEnd(this.strm);
    this.onEnd(status);
    this.ended = true;
    return status === Z_OK;
  }

  // callback interim results if Z_SYNC_FLUSH.
  if (_mode === Z_SYNC_FLUSH) {
    this.onEnd(Z_OK);
    strm.avail_out = 0;
    return true;
  }

  return true;
};


/**
 * Deflate#onData(chunk) -> Void
 * - chunk (Uint8Array|Array|String): output data. Type of array depends
 *   on js engine support. When string output requested, each chunk
 *   will be string.
 *
 * By default, stores data blocks in `chunks[]` property and glue
 * those in `onEnd`. Override this handler, if you need another behaviour.
 **/
Deflate.prototype.onData = function (chunk) {
  this.chunks.push(chunk);
};


/**
 * Deflate#onEnd(status) -> Void
 * - status (Number): deflate status. 0 (Z_OK) on success,
 *   other if not.
 *
 * Called once after you tell deflate that the input stream is
 * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
 * or if an error happened. By default - join collected chunks,
 * free memory and fill `results` / `err` properties.
 **/
Deflate.prototype.onEnd = function (status) {
  // On success - join
  if (status === Z_OK) {
    if (this.options.to === 'string') {
      this.result = this.chunks.join('');
    } else {
      this.result = utils.flattenChunks(this.chunks);
    }
  }
  this.chunks = [];
  this.err = status;
  this.msg = this.strm.msg;
};


/**
 * deflate(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * Compress `data` with deflate algorithm and `options`.
 *
 * Supported options are:
 *
 * - level
 * - windowBits
 * - memLevel
 * - strategy
 * - dictionary
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Sugar (options):
 *
 * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
 *   negative windowBits implicitly.
 * - `to` (String) - if equal to 'string', then result will be "binary string"
 *    (each char code [0..255])
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
 *
 * console.log(pako.deflate(data));
 * ```
 **/
function deflate(input, options) {
  var deflator = new Deflate(options);

  deflator.push(input, true);

  // That will never happens, if you don't cheat with options :)
  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }

  return deflator.result;
}


/**
 * deflateRaw(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * The same as [[deflate]], but creates raw data, without wrapper
 * (header and adler32 crc).
 **/
function deflateRaw(input, options) {
  options = options || {};
  options.raw = true;
  return deflate(input, options);
}


/**
 * gzip(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to compress.
 * - options (Object): zlib deflate options.
 *
 * The same as [[deflate]], but create gzip wrapper instead of
 * deflate one.
 **/
function gzip(input, options) {
  options = options || {};
  options.gzip = true;
  return deflate(input, options);
}


exports.Deflate = Deflate;
exports.deflate = deflate;
exports.deflateRaw = deflateRaw;
exports.gzip = gzip;


/***/ }),
/* 252 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils   = __webpack_require__(25);
var trees   = __webpack_require__(253);
var adler32 = __webpack_require__(73);
var crc32   = __webpack_require__(74);
var msg     = __webpack_require__(57);

/* Public constants ==========================================================*/
/* ===========================================================================*/


/* Allowed flush values; see deflate() and inflate() below for details */
var Z_NO_FLUSH      = 0;
var Z_PARTIAL_FLUSH = 1;
//var Z_SYNC_FLUSH    = 2;
var Z_FULL_FLUSH    = 3;
var Z_FINISH        = 4;
var Z_BLOCK         = 5;
//var Z_TREES         = 6;


/* Return codes for the compression/decompression functions. Negative values
 * are errors, positive values are used for special but normal events.
 */
var Z_OK            = 0;
var Z_STREAM_END    = 1;
//var Z_NEED_DICT     = 2;
//var Z_ERRNO         = -1;
var Z_STREAM_ERROR  = -2;
var Z_DATA_ERROR    = -3;
//var Z_MEM_ERROR     = -4;
var Z_BUF_ERROR     = -5;
//var Z_VERSION_ERROR = -6;


/* compression levels */
//var Z_NO_COMPRESSION      = 0;
//var Z_BEST_SPEED          = 1;
//var Z_BEST_COMPRESSION    = 9;
var Z_DEFAULT_COMPRESSION = -1;


var Z_FILTERED            = 1;
var Z_HUFFMAN_ONLY        = 2;
var Z_RLE                 = 3;
var Z_FIXED               = 4;
var Z_DEFAULT_STRATEGY    = 0;

/* Possible values of the data_type field (though see inflate()) */
//var Z_BINARY              = 0;
//var Z_TEXT                = 1;
//var Z_ASCII               = 1; // = Z_TEXT
var Z_UNKNOWN             = 2;


/* The deflate compression method */
var Z_DEFLATED  = 8;

/*============================================================================*/


var MAX_MEM_LEVEL = 9;
/* Maximum value for memLevel in deflateInit2 */
var MAX_WBITS = 15;
/* 32K LZ77 window */
var DEF_MEM_LEVEL = 8;


var LENGTH_CODES  = 29;
/* number of length codes, not counting the special END_BLOCK code */
var LITERALS      = 256;
/* number of literal bytes 0..255 */
var L_CODES       = LITERALS + 1 + LENGTH_CODES;
/* number of Literal or Length codes, including the END_BLOCK code */
var D_CODES       = 30;
/* number of distance codes */
var BL_CODES      = 19;
/* number of codes used to transfer the bit lengths */
var HEAP_SIZE     = 2 * L_CODES + 1;
/* maximum heap size */
var MAX_BITS  = 15;
/* All codes must not exceed MAX_BITS bits */

var MIN_MATCH = 3;
var MAX_MATCH = 258;
var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);

var PRESET_DICT = 0x20;

var INIT_STATE = 42;
var EXTRA_STATE = 69;
var NAME_STATE = 73;
var COMMENT_STATE = 91;
var HCRC_STATE = 103;
var BUSY_STATE = 113;
var FINISH_STATE = 666;

var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */
var BS_BLOCK_DONE     = 2; /* block flush performed */
var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */

var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.

function err(strm, errorCode) {
  strm.msg = msg[errorCode];
  return errorCode;
}

function rank(f) {
  return ((f) << 1) - ((f) > 4 ? 9 : 0);
}

function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }


/* =========================================================================
 * Flush as much pending output as possible. All deflate() output goes
 * through this function so some applications may wish to modify it
 * to avoid allocating a large strm->output buffer and copying into it.
 * (See also read_buf()).
 */
function flush_pending(strm) {
  var s = strm.state;

  //_tr_flush_bits(s);
  var len = s.pending;
  if (len > strm.avail_out) {
    len = strm.avail_out;
  }
  if (len === 0) { return; }

  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
  strm.next_out += len;
  s.pending_out += len;
  strm.total_out += len;
  strm.avail_out -= len;
  s.pending -= len;
  if (s.pending === 0) {
    s.pending_out = 0;
  }
}


function flush_block_only(s, last) {
  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
  s.block_start = s.strstart;
  flush_pending(s.strm);
}


function put_byte(s, b) {
  s.pending_buf[s.pending++] = b;
}


/* =========================================================================
 * Put a short in the pending buffer. The 16-bit value is put in MSB order.
 * IN assertion: the stream state is correct and there is enough room in
 * pending_buf.
 */
function putShortMSB(s, b) {
//  put_byte(s, (Byte)(b >> 8));
//  put_byte(s, (Byte)(b & 0xff));
  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
  s.pending_buf[s.pending++] = b & 0xff;
}


/* ===========================================================================
 * Read a new buffer from the current input stream, update the adler32
 * and total number of bytes read.  All deflate() input goes through
 * this function so some applications may wish to modify it to avoid
 * allocating a large strm->input buffer and copying from it.
 * (See also flush_pending()).
 */
function read_buf(strm, buf, start, size) {
  var len = strm.avail_in;

  if (len > size) { len = size; }
  if (len === 0) { return 0; }

  strm.avail_in -= len;

  // zmemcpy(buf, strm->next_in, len);
  utils.arraySet(buf, strm.input, strm.next_in, len, start);
  if (strm.state.wrap === 1) {
    strm.adler = adler32(strm.adler, buf, len, start);
  }

  else if (strm.state.wrap === 2) {
    strm.adler = crc32(strm.adler, buf, len, start);
  }

  strm.next_in += len;
  strm.total_in += len;

  return len;
}


/* ===========================================================================
 * Set match_start to the longest match starting at the given string and
 * return its length. Matches shorter or equal to prev_length are discarded,
 * in which case the result is equal to prev_length and match_start is
 * garbage.
 * IN assertions: cur_match is the head of the hash chain for the current
 *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
 * OUT assertion: the match length is not greater than s->lookahead.
 */
function longest_match(s, cur_match) {
  var chain_length = s.max_chain_length;      /* max hash chain length */
  var scan = s.strstart; /* current string */
  var match;                       /* matched string */
  var len;                           /* length of current match */
  var best_len = s.prev_length;              /* best match length so far */
  var nice_match = s.nice_match;             /* stop if match long enough */
  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;

  var _win = s.window; // shortcut

  var wmask = s.w_mask;
  var prev  = s.prev;

  /* Stop when cur_match becomes <= limit. To simplify the code,
   * we prevent matches with the string of window index 0.
   */

  var strend = s.strstart + MAX_MATCH;
  var scan_end1  = _win[scan + best_len - 1];
  var scan_end   = _win[scan + best_len];

  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
   * It is easy to get rid of this optimization if necessary.
   */
  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");

  /* Do not waste too much time if we already have a good match: */
  if (s.prev_length >= s.good_match) {
    chain_length >>= 2;
  }
  /* Do not look for matches beyond the end of the input. This is necessary
   * to make deflate deterministic.
   */
  if (nice_match > s.lookahead) { nice_match = s.lookahead; }

  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");

  do {
    // Assert(cur_match < s->strstart, "no future");
    match = cur_match;

    /* Skip to next match if the match length cannot increase
     * or if the match length is less than 2.  Note that the checks below
     * for insufficient lookahead only occur occasionally for performance
     * reasons.  Therefore uninitialized memory will be accessed, and
     * conditional jumps will be made that depend on those values.
     * However the length of the match is limited to the lookahead, so
     * the output of deflate is not affected by the uninitialized values.
     */

    if (_win[match + best_len]     !== scan_end  ||
        _win[match + best_len - 1] !== scan_end1 ||
        _win[match]                !== _win[scan] ||
        _win[++match]              !== _win[scan + 1]) {
      continue;
    }

    /* The check at best_len-1 can be removed because it will be made
     * again later. (This heuristic is not always a win.)
     * It is not necessary to compare scan[2] and match[2] since they
     * are always equal when the other bytes match, given that
     * the hash keys are equal and that HASH_BITS >= 8.
     */
    scan += 2;
    match++;
    // Assert(*scan == *match, "match[2]?");

    /* We check for insufficient lookahead only every 8th comparison;
     * the 256th check will be made at strstart+258.
     */
    do {
      /*jshint noempty:false*/
    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
             scan < strend);

    // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");

    len = MAX_MATCH - (strend - scan);
    scan = strend - MAX_MATCH;

    if (len > best_len) {
      s.match_start = cur_match;
      best_len = len;
      if (len >= nice_match) {
        break;
      }
      scan_end1  = _win[scan + best_len - 1];
      scan_end   = _win[scan + best_len];
    }
  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);

  if (best_len <= s.lookahead) {
    return best_len;
  }
  return s.lookahead;
}


/* ===========================================================================
 * Fill the window when the lookahead becomes insufficient.
 * Updates strstart and lookahead.
 *
 * IN assertion: lookahead < MIN_LOOKAHEAD
 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
 *    At least one byte has been read, or avail_in == 0; reads are
 *    performed for at least two bytes (required for the zip translate_eol
 *    option -- not supported here).
 */
function fill_window(s) {
  var _w_size = s.w_size;
  var p, n, m, more, str;

  //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");

  do {
    more = s.window_size - s.lookahead - s.strstart;

    // JS ints have 32 bit, block below not needed
    /* Deal with !@#$% 64K limit: */
    //if (sizeof(int) <= 2) {
    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
    //        more = wsize;
    //
    //  } else if (more == (unsigned)(-1)) {
    //        /* Very unlikely, but possible on 16 bit machine if
    //         * strstart == 0 && lookahead == 1 (input done a byte at time)
    //         */
    //        more--;
    //    }
    //}


    /* If the window is almost full and there is insufficient lookahead,
     * move the upper half to the lower one to make room in the upper half.
     */
    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {

      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
      s.match_start -= _w_size;
      s.strstart -= _w_size;
      /* we now have strstart >= MAX_DIST */
      s.block_start -= _w_size;

      /* Slide the hash table (could be avoided with 32 bit values
       at the expense of memory usage). We slide even when level == 0
       to keep the hash table consistent if we switch back to level > 0
       later. (Using level 0 permanently is not an optimal usage of
       zlib, so we don't care about this pathological case.)
       */

      n = s.hash_size;
      p = n;
      do {
        m = s.head[--p];
        s.head[p] = (m >= _w_size ? m - _w_size : 0);
      } while (--n);

      n = _w_size;
      p = n;
      do {
        m = s.prev[--p];
        s.prev[p] = (m >= _w_size ? m - _w_size : 0);
        /* If n is not on any hash chain, prev[n] is garbage but
         * its value will never be used.
         */
      } while (--n);

      more += _w_size;
    }
    if (s.strm.avail_in === 0) {
      break;
    }

    /* If there was no sliding:
     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
     *    more == window_size - lookahead - strstart
     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
     * => more >= window_size - 2*WSIZE + 2
     * In the BIG_MEM or MMAP case (not yet supported),
     *   window_size == input_size + MIN_LOOKAHEAD  &&
     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
     * Otherwise, window_size == 2*WSIZE so more >= 2.
     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
     */
    //Assert(more >= 2, "more < 2");
    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
    s.lookahead += n;

    /* Initialize the hash value now that we have some input: */
    if (s.lookahead + s.insert >= MIN_MATCH) {
      str = s.strstart - s.insert;
      s.ins_h = s.window[str];

      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
//#if MIN_MATCH != 3
//        Call update_hash() MIN_MATCH-3 more times
//#endif
      while (s.insert) {
        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;

        s.prev[str & s.w_mask] = s.head[s.ins_h];
        s.head[s.ins_h] = str;
        str++;
        s.insert--;
        if (s.lookahead + s.insert < MIN_MATCH) {
          break;
        }
      }
    }
    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
     * but this is not important since only literal bytes will be emitted.
     */

  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);

  /* If the WIN_INIT bytes after the end of the current data have never been
   * written, then zero those bytes in order to avoid memory check reports of
   * the use of uninitialized (or uninitialised as Julian writes) bytes by
   * the longest match routines.  Update the high water mark for the next
   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
   */
//  if (s.high_water < s.window_size) {
//    var curr = s.strstart + s.lookahead;
//    var init = 0;
//
//    if (s.high_water < curr) {
//      /* Previous high water mark below current data -- zero WIN_INIT
//       * bytes or up to end of window, whichever is less.
//       */
//      init = s.window_size - curr;
//      if (init > WIN_INIT)
//        init = WIN_INIT;
//      zmemzero(s->window + curr, (unsigned)init);
//      s->high_water = curr + init;
//    }
//    else if (s->high_water < (ulg)curr + WIN_INIT) {
//      /* High water mark at or above current data, but below current data
//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
//       * to end of window, whichever is less.
//       */
//      init = (ulg)curr + WIN_INIT - s->high_water;
//      if (init > s->window_size - s->high_water)
//        init = s->window_size - s->high_water;
//      zmemzero(s->window + s->high_water, (unsigned)init);
//      s->high_water += init;
//    }
//  }
//
//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
//    "not enough room for search");
}

/* ===========================================================================
 * Copy without compression as much as possible from the input stream, return
 * the current block state.
 * This function does not insert new strings in the dictionary since
 * uncompressible data is probably not useful. This function is used
 * only for the level=0 compression option.
 * NOTE: this function should be optimized to avoid extra copying from
 * window to pending_buf.
 */
function deflate_stored(s, flush) {
  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
   * to pending_buf_size, and each stored block has a 5 byte header:
   */
  var max_block_size = 0xffff;

  if (max_block_size > s.pending_buf_size - 5) {
    max_block_size = s.pending_buf_size - 5;
  }

  /* Copy as much as possible from input to output: */
  for (;;) {
    /* Fill the window as much as possible: */
    if (s.lookahead <= 1) {

      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
      //  s->block_start >= (long)s->w_size, "slide too late");
//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
//        s.block_start >= s.w_size)) {
//        throw  new Error("slide too late");
//      }

      fill_window(s);
      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }

      if (s.lookahead === 0) {
        break;
      }
      /* flush the current block */
    }
    //Assert(s->block_start >= 0L, "block gone");
//    if (s.block_start < 0) throw new Error("block gone");

    s.strstart += s.lookahead;
    s.lookahead = 0;

    /* Emit a stored block if pending_buf will be full: */
    var max_start = s.block_start + max_block_size;

    if (s.strstart === 0 || s.strstart >= max_start) {
      /* strstart == 0 is possible when wraparound on 16-bit machine */
      s.lookahead = s.strstart - max_start;
      s.strstart = max_start;
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/


    }
    /* Flush if we may have to slide, otherwise block_start may become
     * negative and the data will be gone:
     */
    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }

  s.insert = 0;

  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }

  if (s.strstart > s.block_start) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }

  return BS_NEED_MORE;
}

/* ===========================================================================
 * Compress as much as possible from the input stream, return the current
 * block state.
 * This function does not perform lazy evaluation of matches and inserts
 * new strings in the dictionary only for unmatched strings or for short
 * matches. It is used only for the fast compression options.
 */
function deflate_fast(s, flush) {
  var hash_head;        /* head of the hash chain */
  var bflush;           /* set if current block must be flushed */

  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    if (s.lookahead < MIN_LOOKAHEAD) {
      fill_window(s);
      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) {
        break; /* flush the current block */
      }
    }

    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    hash_head = 0/*NIL*/;
    if (s.lookahead >= MIN_MATCH) {
      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
      s.head[s.ins_h] = s.strstart;
      /***/
    }

    /* Find the longest match, discarding those <= prev_length.
     * At this point we have always match_length < MIN_MATCH
     */
    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
      /* To simplify the code, we prevent matches with the string
       * of window index 0 (in particular we have to avoid a match
       * of the string with itself at the start of the input file).
       */
      s.match_length = longest_match(s, hash_head);
      /* longest_match() sets match_start */
    }
    if (s.match_length >= MIN_MATCH) {
      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only

      /*** _tr_tally_dist(s, s.strstart - s.match_start,
                     s.match_length - MIN_MATCH, bflush); ***/
      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);

      s.lookahead -= s.match_length;

      /* Insert new strings in the hash table only if the match length
       * is not too large. This saves time but degrades compression.
       */
      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
        s.match_length--; /* string at strstart already in table */
        do {
          s.strstart++;
          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
          s.head[s.ins_h] = s.strstart;
          /***/
          /* strstart never exceeds WSIZE-MAX_MATCH, so there are
           * always MIN_MATCH bytes ahead.
           */
        } while (--s.match_length !== 0);
        s.strstart++;
      } else
      {
        s.strstart += s.match_length;
        s.match_length = 0;
        s.ins_h = s.window[s.strstart];
        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;

//#if MIN_MATCH != 3
//                Call UPDATE_HASH() MIN_MATCH-3 more times
//#endif
        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
         * matter since it will be recomputed at next deflate call.
         */
      }
    } else {
      /* No match, output a literal byte */
      //Tracevv((stderr,"%c", s.window[s.strstart]));
      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);

      s.lookahead--;
      s.strstart++;
    }
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* ===========================================================================
 * Same as above, but achieves better compression. We use a lazy
 * evaluation for matches: a match is finally adopted only if there is
 * no better match at the next window position.
 */
function deflate_slow(s, flush) {
  var hash_head;          /* head of hash chain */
  var bflush;              /* set if current block must be flushed */

  var max_insert;

  /* Process the input block. */
  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the next match, plus MIN_MATCH bytes to insert the
     * string following the next match.
     */
    if (s.lookahead < MIN_LOOKAHEAD) {
      fill_window(s);
      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) { break; } /* flush the current block */
    }

    /* Insert the string window[strstart .. strstart+2] in the
     * dictionary, and set hash_head to the head of the hash chain:
     */
    hash_head = 0/*NIL*/;
    if (s.lookahead >= MIN_MATCH) {
      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
      s.head[s.ins_h] = s.strstart;
      /***/
    }

    /* Find the longest match, discarding those <= prev_length.
     */
    s.prev_length = s.match_length;
    s.prev_match = s.match_start;
    s.match_length = MIN_MATCH - 1;

    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
      /* To simplify the code, we prevent matches with the string
       * of window index 0 (in particular we have to avoid a match
       * of the string with itself at the start of the input file).
       */
      s.match_length = longest_match(s, hash_head);
      /* longest_match() sets match_start */

      if (s.match_length <= 5 &&
         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {

        /* If prev_match is also MIN_MATCH, match_start is garbage
         * but we will ignore the current match anyway.
         */
        s.match_length = MIN_MATCH - 1;
      }
    }
    /* If there was a match at the previous step and the current
     * match is not better, output the previous match:
     */
    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
      max_insert = s.strstart + s.lookahead - MIN_MATCH;
      /* Do not insert strings in hash table beyond this. */

      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);

      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
                     s.prev_length - MIN_MATCH, bflush);***/
      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
      /* Insert in hash table all strings up to the end of the match.
       * strstart-1 and strstart are already inserted. If there is not
       * enough lookahead, the last two strings are not inserted in
       * the hash table.
       */
      s.lookahead -= s.prev_length - 1;
      s.prev_length -= 2;
      do {
        if (++s.strstart <= max_insert) {
          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
          s.head[s.ins_h] = s.strstart;
          /***/
        }
      } while (--s.prev_length !== 0);
      s.match_available = 0;
      s.match_length = MIN_MATCH - 1;
      s.strstart++;

      if (bflush) {
        /*** FLUSH_BLOCK(s, 0); ***/
        flush_block_only(s, false);
        if (s.strm.avail_out === 0) {
          return BS_NEED_MORE;
        }
        /***/
      }

    } else if (s.match_available) {
      /* If there was no match at the previous position, output a
       * single literal. If there was a match but the current match
       * is longer, truncate the previous match to a single literal.
       */
      //Tracevv((stderr,"%c", s->window[s->strstart-1]));
      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);

      if (bflush) {
        /*** FLUSH_BLOCK_ONLY(s, 0) ***/
        flush_block_only(s, false);
        /***/
      }
      s.strstart++;
      s.lookahead--;
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
    } else {
      /* There is no previous match to compare with, wait for
       * the next step to decide.
       */
      s.match_available = 1;
      s.strstart++;
      s.lookahead--;
    }
  }
  //Assert (flush != Z_NO_FLUSH, "no flush?");
  if (s.match_available) {
    //Tracevv((stderr,"%c", s->window[s->strstart-1]));
    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);

    s.match_available = 0;
  }
  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }

  return BS_BLOCK_DONE;
}


/* ===========================================================================
 * For Z_RLE, simply look for runs of bytes, generate matches only of distance
 * one.  Do not maintain a hash table.  (It will be regenerated if this run of
 * deflate switches away from Z_RLE.)
 */
function deflate_rle(s, flush) {
  var bflush;            /* set if current block must be flushed */
  var prev;              /* byte at distance one to match */
  var scan, strend;      /* scan goes up to strend for length of run */

  var _win = s.window;

  for (;;) {
    /* Make sure that we always have enough lookahead, except
     * at the end of the input file. We need MAX_MATCH bytes
     * for the longest run, plus one for the unrolled loop.
     */
    if (s.lookahead <= MAX_MATCH) {
      fill_window(s);
      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
        return BS_NEED_MORE;
      }
      if (s.lookahead === 0) { break; } /* flush the current block */
    }

    /* See how many times the previous byte repeats */
    s.match_length = 0;
    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
      scan = s.strstart - 1;
      prev = _win[scan];
      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
        strend = s.strstart + MAX_MATCH;
        do {
          /*jshint noempty:false*/
        } while (prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 prev === _win[++scan] && prev === _win[++scan] &&
                 scan < strend);
        s.match_length = MAX_MATCH - (strend - scan);
        if (s.match_length > s.lookahead) {
          s.match_length = s.lookahead;
        }
      }
      //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
    }

    /* Emit match if have run of MIN_MATCH or longer, else emit literal */
    if (s.match_length >= MIN_MATCH) {
      //check_match(s, s.strstart, s.strstart - 1, s.match_length);

      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);

      s.lookahead -= s.match_length;
      s.strstart += s.match_length;
      s.match_length = 0;
    } else {
      /* No match, output a literal byte */
      //Tracevv((stderr,"%c", s->window[s->strstart]));
      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);

      s.lookahead--;
      s.strstart++;
    }
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = 0;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* ===========================================================================
 * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
 * (It will be regenerated if this run of deflate switches away from Huffman.)
 */
function deflate_huff(s, flush) {
  var bflush;             /* set if current block must be flushed */

  for (;;) {
    /* Make sure that we have a literal to write. */
    if (s.lookahead === 0) {
      fill_window(s);
      if (s.lookahead === 0) {
        if (flush === Z_NO_FLUSH) {
          return BS_NEED_MORE;
        }
        break;      /* flush the current block */
      }
    }

    /* Output a literal byte */
    s.match_length = 0;
    //Tracevv((stderr,"%c", s->window[s->strstart]));
    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
    s.lookahead--;
    s.strstart++;
    if (bflush) {
      /*** FLUSH_BLOCK(s, 0); ***/
      flush_block_only(s, false);
      if (s.strm.avail_out === 0) {
        return BS_NEED_MORE;
      }
      /***/
    }
  }
  s.insert = 0;
  if (flush === Z_FINISH) {
    /*** FLUSH_BLOCK(s, 1); ***/
    flush_block_only(s, true);
    if (s.strm.avail_out === 0) {
      return BS_FINISH_STARTED;
    }
    /***/
    return BS_FINISH_DONE;
  }
  if (s.last_lit) {
    /*** FLUSH_BLOCK(s, 0); ***/
    flush_block_only(s, false);
    if (s.strm.avail_out === 0) {
      return BS_NEED_MORE;
    }
    /***/
  }
  return BS_BLOCK_DONE;
}

/* Values for max_lazy_match, good_match and max_chain_length, depending on
 * the desired pack level (0..9). The values given below have been tuned to
 * exclude worst case performance for pathological files. Better values may be
 * found for specific files.
 */
function Config(good_length, max_lazy, nice_length, max_chain, func) {
  this.good_length = good_length;
  this.max_lazy = max_lazy;
  this.nice_length = nice_length;
  this.max_chain = max_chain;
  this.func = func;
}

var configuration_table;

configuration_table = [
  /*      good lazy nice chain */
  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */
  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */
  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */
  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */

  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */
  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */
  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */
  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */
  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */
  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */
];


/* ===========================================================================
 * Initialize the "longest match" routines for a new zlib stream
 */
function lm_init(s) {
  s.window_size = 2 * s.w_size;

  /*** CLEAR_HASH(s); ***/
  zero(s.head); // Fill with NIL (= 0);

  /* Set the default configuration parameters:
   */
  s.max_lazy_match = configuration_table[s.level].max_lazy;
  s.good_match = configuration_table[s.level].good_length;
  s.nice_match = configuration_table[s.level].nice_length;
  s.max_chain_length = configuration_table[s.level].max_chain;

  s.strstart = 0;
  s.block_start = 0;
  s.lookahead = 0;
  s.insert = 0;
  s.match_length = s.prev_length = MIN_MATCH - 1;
  s.match_available = 0;
  s.ins_h = 0;
}


function DeflateState() {
  this.strm = null;            /* pointer back to this zlib stream */
  this.status = 0;            /* as the name implies */
  this.pending_buf = null;      /* output still pending */
  this.pending_buf_size = 0;  /* size of pending_buf */
  this.pending_out = 0;       /* next pending byte to output to the stream */
  this.pending = 0;           /* nb of bytes in the pending buffer */
  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
  this.gzhead = null;         /* gzip header information to write */
  this.gzindex = 0;           /* where in extra, name, or comment */
  this.method = Z_DEFLATED; /* can only be DEFLATED */
  this.last_flush = -1;   /* value of flush param for previous deflate call */

  this.w_size = 0;  /* LZ77 window size (32K by default) */
  this.w_bits = 0;  /* log2(w_size)  (8..16) */
  this.w_mask = 0;  /* w_size - 1 */

  this.window = null;
  /* Sliding window. Input bytes are read into the second half of the window,
   * and move to the first half later to keep a dictionary of at least wSize
   * bytes. With this organization, matches are limited to a distance of
   * wSize-MAX_MATCH bytes, but this ensures that IO is always
   * performed with a length multiple of the block size.
   */

  this.window_size = 0;
  /* Actual size of window: 2*wSize, except when the user input buffer
   * is directly used as sliding window.
   */

  this.prev = null;
  /* Link to older string with same hash index. To limit the size of this
   * array to 64K, this link is maintained only for the last 32K strings.
   * An index in this array is thus a window index modulo 32K.
   */

  this.head = null;   /* Heads of the hash chains or NIL. */

  this.ins_h = 0;       /* hash index of string to be inserted */
  this.hash_size = 0;   /* number of elements in hash table */
  this.hash_bits = 0;   /* log2(hash_size) */
  this.hash_mask = 0;   /* hash_size-1 */

  this.hash_shift = 0;
  /* Number of bits by which ins_h must be shifted at each input
   * step. It must be such that after MIN_MATCH steps, the oldest
   * byte no longer takes part in the hash key, that is:
   *   hash_shift * MIN_MATCH >= hash_bits
   */

  this.block_start = 0;
  /* Window position at the beginning of the current output block. Gets
   * negative when the window is moved backwards.
   */

  this.match_length = 0;      /* length of best match */
  this.prev_match = 0;        /* previous match */
  this.match_available = 0;   /* set if previous match exists */
  this.strstart = 0;          /* start of string to insert */
  this.match_start = 0;       /* start of matching string */
  this.lookahead = 0;         /* number of valid bytes ahead in window */

  this.prev_length = 0;
  /* Length of the best match at previous step. Matches not greater than this
   * are discarded. This is used in the lazy match evaluation.
   */

  this.max_chain_length = 0;
  /* To speed up deflation, hash chains are never searched beyond this
   * length.  A higher limit improves compression ratio but degrades the
   * speed.
   */

  this.max_lazy_match = 0;
  /* Attempt to find a better match only when the current match is strictly
   * smaller than this value. This mechanism is used only for compression
   * levels >= 4.
   */
  // That's alias to max_lazy_match, don't use directly
  //this.max_insert_length = 0;
  /* Insert new strings in the hash table only if the match length is not
   * greater than this length. This saves time but degrades compression.
   * max_insert_length is used only for compression levels <= 3.
   */

  this.level = 0;     /* compression level (1..9) */
  this.strategy = 0;  /* favor or force Huffman coding*/

  this.good_match = 0;
  /* Use a faster search when the previous match is longer than this */

  this.nice_match = 0; /* Stop searching when current match exceeds this */

              /* used by trees.c: */

  /* Didn't use ct_data typedef below to suppress compiler warning */

  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */

  // Use flat array of DOUBLE size, with interleaved fata,
  // because JS does not support effective
  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);
  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);
  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);
  zero(this.dyn_ltree);
  zero(this.dyn_dtree);
  zero(this.bl_tree);

  this.l_desc   = null;         /* desc. for literal tree */
  this.d_desc   = null;         /* desc. for distance tree */
  this.bl_desc  = null;         /* desc. for bit length tree */

  //ush bl_count[MAX_BITS+1];
  this.bl_count = new utils.Buf16(MAX_BITS + 1);
  /* number of codes at each bit length for an optimal tree */

  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */
  zero(this.heap);

  this.heap_len = 0;               /* number of elements in the heap */
  this.heap_max = 0;               /* element of largest frequency */
  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
   * The same heap array is used to build all trees.
   */

  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
  zero(this.depth);
  /* Depth of each subtree used as tie breaker for trees of equal frequency
   */

  this.l_buf = 0;          /* buffer index for literals or lengths */

  this.lit_bufsize = 0;
  /* Size of match buffer for literals/lengths.  There are 4 reasons for
   * limiting lit_bufsize to 64K:
   *   - frequencies can be kept in 16 bit counters
   *   - if compression is not successful for the first block, all input
   *     data is still in the window so we can still emit a stored block even
   *     when input comes from standard input.  (This can also be done for
   *     all blocks if lit_bufsize is not greater than 32K.)
   *   - if compression is not successful for a file smaller than 64K, we can
   *     even emit a stored file instead of a stored block (saving 5 bytes).
   *     This is applicable only for zip (not gzip or zlib).
   *   - creating new Huffman trees less frequently may not provide fast
   *     adaptation to changes in the input data statistics. (Take for
   *     example a binary file with poorly compressible code followed by
   *     a highly compressible string table.) Smaller buffer sizes give
   *     fast adaptation but have of course the overhead of transmitting
   *     trees more frequently.
   *   - I can't count above 4
   */

  this.last_lit = 0;      /* running index in l_buf */

  this.d_buf = 0;
  /* Buffer index for distances. To simplify the code, d_buf and l_buf have
   * the same number of elements. To use different lengths, an extra flag
   * array would be necessary.
   */

  this.opt_len = 0;       /* bit length of current block with optimal trees */
  this.static_len = 0;    /* bit length of current block with static trees */
  this.matches = 0;       /* number of string matches in current block */
  this.insert = 0;        /* bytes at end of window left to insert */


  this.bi_buf = 0;
  /* Output buffer. bits are inserted starting at the bottom (least
   * significant bits).
   */
  this.bi_valid = 0;
  /* Number of valid bits in bi_buf.  All bits above the last valid bit
   * are always zero.
   */

  // Used for window memory init. We safely ignore it for JS. That makes
  // sense only for pointers and memory check tools.
  //this.high_water = 0;
  /* High water mark offset in window for initialized bytes -- bytes above
   * this are set to zero in order to avoid memory check warnings when
   * longest match routines access bytes past the input.  This is then
   * updated to the new high water mark.
   */
}


function deflateResetKeep(strm) {
  var s;

  if (!strm || !strm.state) {
    return err(strm, Z_STREAM_ERROR);
  }

  strm.total_in = strm.total_out = 0;
  strm.data_type = Z_UNKNOWN;

  s = strm.state;
  s.pending = 0;
  s.pending_out = 0;

  if (s.wrap < 0) {
    s.wrap = -s.wrap;
    /* was made negative by deflate(..., Z_FINISH); */
  }
  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
  strm.adler = (s.wrap === 2) ?
    0  // crc32(0, Z_NULL, 0)
  :
    1; // adler32(0, Z_NULL, 0)
  s.last_flush = Z_NO_FLUSH;
  trees._tr_init(s);
  return Z_OK;
}


function deflateReset(strm) {
  var ret = deflateResetKeep(strm);
  if (ret === Z_OK) {
    lm_init(strm.state);
  }
  return ret;
}


function deflateSetHeader(strm, head) {
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
  strm.state.gzhead = head;
  return Z_OK;
}


function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
  if (!strm) { // === Z_NULL
    return Z_STREAM_ERROR;
  }
  var wrap = 1;

  if (level === Z_DEFAULT_COMPRESSION) {
    level = 6;
  }

  if (windowBits < 0) { /* suppress zlib wrapper */
    wrap = 0;
    windowBits = -windowBits;
  }

  else if (windowBits > 15) {
    wrap = 2;           /* write gzip wrapper instead */
    windowBits -= 16;
  }


  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
    strategy < 0 || strategy > Z_FIXED) {
    return err(strm, Z_STREAM_ERROR);
  }


  if (windowBits === 8) {
    windowBits = 9;
  }
  /* until 256-byte window bug fixed */

  var s = new DeflateState();

  strm.state = s;
  s.strm = strm;

  s.wrap = wrap;
  s.gzhead = null;
  s.w_bits = windowBits;
  s.w_size = 1 << s.w_bits;
  s.w_mask = s.w_size - 1;

  s.hash_bits = memLevel + 7;
  s.hash_size = 1 << s.hash_bits;
  s.hash_mask = s.hash_size - 1;
  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);

  s.window = new utils.Buf8(s.w_size * 2);
  s.head = new utils.Buf16(s.hash_size);
  s.prev = new utils.Buf16(s.w_size);

  // Don't need mem init magic for JS.
  //s.high_water = 0;  /* nothing written to s->window yet */

  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */

  s.pending_buf_size = s.lit_bufsize * 4;

  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
  //s->pending_buf = (uchf *) overlay;
  s.pending_buf = new utils.Buf8(s.pending_buf_size);

  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
  s.d_buf = 1 * s.lit_bufsize;

  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
  s.l_buf = (1 + 2) * s.lit_bufsize;

  s.level = level;
  s.strategy = strategy;
  s.method = method;

  return deflateReset(strm);
}

function deflateInit(strm, level) {
  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
}


function deflate(strm, flush) {
  var old_flush, s;
  var beg, val; // for gzip header write only

  if (!strm || !strm.state ||
    flush > Z_BLOCK || flush < 0) {
    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
  }

  s = strm.state;

  if (!strm.output ||
      (!strm.input && strm.avail_in !== 0) ||
      (s.status === FINISH_STATE && flush !== Z_FINISH)) {
    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
  }

  s.strm = strm; /* just in case */
  old_flush = s.last_flush;
  s.last_flush = flush;

  /* Write the header */
  if (s.status === INIT_STATE) {

    if (s.wrap === 2) { // GZIP header
      strm.adler = 0;  //crc32(0L, Z_NULL, 0);
      put_byte(s, 31);
      put_byte(s, 139);
      put_byte(s, 8);
      if (!s.gzhead) { // s->gzhead == Z_NULL
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, 0);
        put_byte(s, s.level === 9 ? 2 :
                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                     4 : 0));
        put_byte(s, OS_CODE);
        s.status = BUSY_STATE;
      }
      else {
        put_byte(s, (s.gzhead.text ? 1 : 0) +
                    (s.gzhead.hcrc ? 2 : 0) +
                    (!s.gzhead.extra ? 0 : 4) +
                    (!s.gzhead.name ? 0 : 8) +
                    (!s.gzhead.comment ? 0 : 16)
        );
        put_byte(s, s.gzhead.time & 0xff);
        put_byte(s, (s.gzhead.time >> 8) & 0xff);
        put_byte(s, (s.gzhead.time >> 16) & 0xff);
        put_byte(s, (s.gzhead.time >> 24) & 0xff);
        put_byte(s, s.level === 9 ? 2 :
                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
                     4 : 0));
        put_byte(s, s.gzhead.os & 0xff);
        if (s.gzhead.extra && s.gzhead.extra.length) {
          put_byte(s, s.gzhead.extra.length & 0xff);
          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
        }
        if (s.gzhead.hcrc) {
          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
        }
        s.gzindex = 0;
        s.status = EXTRA_STATE;
      }
    }
    else // DEFLATE header
    {
      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
      var level_flags = -1;

      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
        level_flags = 0;
      } else if (s.level < 6) {
        level_flags = 1;
      } else if (s.level === 6) {
        level_flags = 2;
      } else {
        level_flags = 3;
      }
      header |= (level_flags << 6);
      if (s.strstart !== 0) { header |= PRESET_DICT; }
      header += 31 - (header % 31);

      s.status = BUSY_STATE;
      putShortMSB(s, header);

      /* Save the adler32 of the preset dictionary: */
      if (s.strstart !== 0) {
        putShortMSB(s, strm.adler >>> 16);
        putShortMSB(s, strm.adler & 0xffff);
      }
      strm.adler = 1; // adler32(0L, Z_NULL, 0);
    }
  }

//#ifdef GZIP
  if (s.status === EXTRA_STATE) {
    if (s.gzhead.extra/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */

      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            break;
          }
        }
        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
        s.gzindex++;
      }
      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (s.gzindex === s.gzhead.extra.length) {
        s.gzindex = 0;
        s.status = NAME_STATE;
      }
    }
    else {
      s.status = NAME_STATE;
    }
  }
  if (s.status === NAME_STATE) {
    if (s.gzhead.name/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */
      //int val;

      do {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            val = 1;
            break;
          }
        }
        // JS specific: little magic to add zero terminator to end of string
        if (s.gzindex < s.gzhead.name.length) {
          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
        } else {
          val = 0;
        }
        put_byte(s, val);
      } while (val !== 0);

      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (val === 0) {
        s.gzindex = 0;
        s.status = COMMENT_STATE;
      }
    }
    else {
      s.status = COMMENT_STATE;
    }
  }
  if (s.status === COMMENT_STATE) {
    if (s.gzhead.comment/* != Z_NULL*/) {
      beg = s.pending;  /* start of bytes to update crc */
      //int val;

      do {
        if (s.pending === s.pending_buf_size) {
          if (s.gzhead.hcrc && s.pending > beg) {
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
          }
          flush_pending(strm);
          beg = s.pending;
          if (s.pending === s.pending_buf_size) {
            val = 1;
            break;
          }
        }
        // JS specific: little magic to add zero terminator to end of string
        if (s.gzindex < s.gzhead.comment.length) {
          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
        } else {
          val = 0;
        }
        put_byte(s, val);
      } while (val !== 0);

      if (s.gzhead.hcrc && s.pending > beg) {
        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
      }
      if (val === 0) {
        s.status = HCRC_STATE;
      }
    }
    else {
      s.status = HCRC_STATE;
    }
  }
  if (s.status === HCRC_STATE) {
    if (s.gzhead.hcrc) {
      if (s.pending + 2 > s.pending_buf_size) {
        flush_pending(strm);
      }
      if (s.pending + 2 <= s.pending_buf_size) {
        put_byte(s, strm.adler & 0xff);
        put_byte(s, (strm.adler >> 8) & 0xff);
        strm.adler = 0; //crc32(0L, Z_NULL, 0);
        s.status = BUSY_STATE;
      }
    }
    else {
      s.status = BUSY_STATE;
    }
  }
//#endif

  /* Flush as much pending output as possible */
  if (s.pending !== 0) {
    flush_pending(strm);
    if (strm.avail_out === 0) {
      /* Since avail_out is 0, deflate will be called again with
       * more output space, but possibly with both pending and
       * avail_in equal to zero. There won't be anything to do,
       * but this is not an error situation so make sure we
       * return OK instead of BUF_ERROR at next call of deflate:
       */
      s.last_flush = -1;
      return Z_OK;
    }

    /* Make sure there is something to do and avoid duplicate consecutive
     * flushes. For repeated and useless calls with Z_FINISH, we keep
     * returning Z_STREAM_END instead of Z_BUF_ERROR.
     */
  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
    flush !== Z_FINISH) {
    return err(strm, Z_BUF_ERROR);
  }

  /* User must not provide more input after the first FINISH: */
  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
    return err(strm, Z_BUF_ERROR);
  }

  /* Start a new block or continue the current one.
   */
  if (strm.avail_in !== 0 || s.lookahead !== 0 ||
    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
      (s.strategy === Z_RLE ? deflate_rle(s, flush) :
        configuration_table[s.level].func(s, flush));

    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
      s.status = FINISH_STATE;
    }
    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
      if (strm.avail_out === 0) {
        s.last_flush = -1;
        /* avoid BUF_ERROR next call, see above */
      }
      return Z_OK;
      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
       * of deflate should use the same flush parameter to make sure
       * that the flush is complete. So we don't have to output an
       * empty block here, this will be done at next call. This also
       * ensures that for a very small output buffer, we emit at most
       * one empty block.
       */
    }
    if (bstate === BS_BLOCK_DONE) {
      if (flush === Z_PARTIAL_FLUSH) {
        trees._tr_align(s);
      }
      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */

        trees._tr_stored_block(s, 0, 0, false);
        /* For a full flush, this empty block will be recognized
         * as a special marker by inflate_sync().
         */
        if (flush === Z_FULL_FLUSH) {
          /*** CLEAR_HASH(s); ***/             /* forget history */
          zero(s.head); // Fill with NIL (= 0);

          if (s.lookahead === 0) {
            s.strstart = 0;
            s.block_start = 0;
            s.insert = 0;
          }
        }
      }
      flush_pending(strm);
      if (strm.avail_out === 0) {
        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
        return Z_OK;
      }
    }
  }
  //Assert(strm->avail_out > 0, "bug2");
  //if (strm.avail_out <= 0) { throw new Error("bug2");}

  if (flush !== Z_FINISH) { return Z_OK; }
  if (s.wrap <= 0) { return Z_STREAM_END; }

  /* Write the trailer */
  if (s.wrap === 2) {
    put_byte(s, strm.adler & 0xff);
    put_byte(s, (strm.adler >> 8) & 0xff);
    put_byte(s, (strm.adler >> 16) & 0xff);
    put_byte(s, (strm.adler >> 24) & 0xff);
    put_byte(s, strm.total_in & 0xff);
    put_byte(s, (strm.total_in >> 8) & 0xff);
    put_byte(s, (strm.total_in >> 16) & 0xff);
    put_byte(s, (strm.total_in >> 24) & 0xff);
  }
  else
  {
    putShortMSB(s, strm.adler >>> 16);
    putShortMSB(s, strm.adler & 0xffff);
  }

  flush_pending(strm);
  /* If avail_out is zero, the application will call deflate again
   * to flush the rest.
   */
  if (s.wrap > 0) { s.wrap = -s.wrap; }
  /* write the trailer only once! */
  return s.pending !== 0 ? Z_OK : Z_STREAM_END;
}

function deflateEnd(strm) {
  var status;

  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
    return Z_STREAM_ERROR;
  }

  status = strm.state.status;
  if (status !== INIT_STATE &&
    status !== EXTRA_STATE &&
    status !== NAME_STATE &&
    status !== COMMENT_STATE &&
    status !== HCRC_STATE &&
    status !== BUSY_STATE &&
    status !== FINISH_STATE
  ) {
    return err(strm, Z_STREAM_ERROR);
  }

  strm.state = null;

  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
}


/* =========================================================================
 * Initializes the compression dictionary from the given byte
 * sequence without producing any compressed output.
 */
function deflateSetDictionary(strm, dictionary) {
  var dictLength = dictionary.length;

  var s;
  var str, n;
  var wrap;
  var avail;
  var next;
  var input;
  var tmpDict;

  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
    return Z_STREAM_ERROR;
  }

  s = strm.state;
  wrap = s.wrap;

  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
    return Z_STREAM_ERROR;
  }

  /* when using zlib wrappers, compute Adler-32 for provided dictionary */
  if (wrap === 1) {
    /* adler32(strm->adler, dictionary, dictLength); */
    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
  }

  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */

  /* if dictionary would fill window, just replace the history */
  if (dictLength >= s.w_size) {
    if (wrap === 0) {            /* already empty otherwise */
      /*** CLEAR_HASH(s); ***/
      zero(s.head); // Fill with NIL (= 0);
      s.strstart = 0;
      s.block_start = 0;
      s.insert = 0;
    }
    /* use the tail */
    // dictionary = dictionary.slice(dictLength - s.w_size);
    tmpDict = new utils.Buf8(s.w_size);
    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
    dictionary = tmpDict;
    dictLength = s.w_size;
  }
  /* insert dictionary into window and hash */
  avail = strm.avail_in;
  next = strm.next_in;
  input = strm.input;
  strm.avail_in = dictLength;
  strm.next_in = 0;
  strm.input = dictionary;
  fill_window(s);
  while (s.lookahead >= MIN_MATCH) {
    str = s.strstart;
    n = s.lookahead - (MIN_MATCH - 1);
    do {
      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;

      s.prev[str & s.w_mask] = s.head[s.ins_h];

      s.head[s.ins_h] = str;
      str++;
    } while (--n);
    s.strstart = str;
    s.lookahead = MIN_MATCH - 1;
    fill_window(s);
  }
  s.strstart += s.lookahead;
  s.block_start = s.strstart;
  s.insert = s.lookahead;
  s.lookahead = 0;
  s.match_length = s.prev_length = MIN_MATCH - 1;
  s.match_available = 0;
  strm.next_in = next;
  strm.input = input;
  strm.avail_in = avail;
  s.wrap = wrap;
  return Z_OK;
}


exports.deflateInit = deflateInit;
exports.deflateInit2 = deflateInit2;
exports.deflateReset = deflateReset;
exports.deflateResetKeep = deflateResetKeep;
exports.deflateSetHeader = deflateSetHeader;
exports.deflate = deflate;
exports.deflateEnd = deflateEnd;
exports.deflateSetDictionary = deflateSetDictionary;
exports.deflateInfo = 'pako deflate (from Nodeca project)';

/* Not implemented
exports.deflateBound = deflateBound;
exports.deflateCopy = deflateCopy;
exports.deflateParams = deflateParams;
exports.deflatePending = deflatePending;
exports.deflatePrime = deflatePrime;
exports.deflateTune = deflateTune;
*/


/***/ }),
/* 253 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

/* eslint-disable space-unary-ops */

var utils = __webpack_require__(25);

/* Public constants ==========================================================*/
/* ===========================================================================*/


//var Z_FILTERED          = 1;
//var Z_HUFFMAN_ONLY      = 2;
//var Z_RLE               = 3;
var Z_FIXED               = 4;
//var Z_DEFAULT_STRATEGY  = 0;

/* Possible values of the data_type field (though see inflate()) */
var Z_BINARY              = 0;
var Z_TEXT                = 1;
//var Z_ASCII             = 1; // = Z_TEXT
var Z_UNKNOWN             = 2;

/*============================================================================*/


function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }

// From zutil.h

var STORED_BLOCK = 0;
var STATIC_TREES = 1;
var DYN_TREES    = 2;
/* The three kinds of block type */

var MIN_MATCH    = 3;
var MAX_MATCH    = 258;
/* The minimum and maximum match lengths */

// From deflate.h
/* ===========================================================================
 * Internal compression state.
 */

var LENGTH_CODES  = 29;
/* number of length codes, not counting the special END_BLOCK code */

var LITERALS      = 256;
/* number of literal bytes 0..255 */

var L_CODES       = LITERALS + 1 + LENGTH_CODES;
/* number of Literal or Length codes, including the END_BLOCK code */

var D_CODES       = 30;
/* number of distance codes */

var BL_CODES      = 19;
/* number of codes used to transfer the bit lengths */

var HEAP_SIZE     = 2 * L_CODES + 1;
/* maximum heap size */

var MAX_BITS      = 15;
/* All codes must not exceed MAX_BITS bits */

var Buf_size      = 16;
/* size of bit buffer in bi_buf */


/* ===========================================================================
 * Constants
 */

var MAX_BL_BITS = 7;
/* Bit length codes must not exceed MAX_BL_BITS bits */

var END_BLOCK   = 256;
/* end of block literal code */

var REP_3_6     = 16;
/* repeat previous bit length 3-6 times (2 bits of repeat count) */

var REPZ_3_10   = 17;
/* repeat a zero length 3-10 times  (3 bits of repeat count) */

var REPZ_11_138 = 18;
/* repeat a zero length 11-138 times  (7 bits of repeat count) */

/* eslint-disable comma-spacing,array-bracket-spacing */
var extra_lbits =   /* extra bits for each length code */
  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];

var extra_dbits =   /* extra bits for each distance code */
  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];

var extra_blbits =  /* extra bits for each bit length code */
  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];

var bl_order =
  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
/* eslint-enable comma-spacing,array-bracket-spacing */

/* The lengths of the bit length codes are sent in order of decreasing
 * probability, to avoid transmitting the lengths for unused bit length codes.
 */

/* ===========================================================================
 * Local data. These are initialized only once.
 */

// We pre-fill arrays with 0 to avoid uninitialized gaps

var DIST_CODE_LEN = 512; /* see definition of array dist_code below */

// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
var static_ltree  = new Array((L_CODES + 2) * 2);
zero(static_ltree);
/* The static literal tree. Since the bit lengths are imposed, there is no
 * need for the L_CODES extra codes used during heap construction. However
 * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
 * below).
 */

var static_dtree  = new Array(D_CODES * 2);
zero(static_dtree);
/* The static distance tree. (Actually a trivial tree since all codes use
 * 5 bits.)
 */

var _dist_code    = new Array(DIST_CODE_LEN);
zero(_dist_code);
/* Distance codes. The first 256 values correspond to the distances
 * 3 .. 258, the last 256 values correspond to the top 8 bits of
 * the 15 bit distances.
 */

var _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);
zero(_length_code);
/* length code for each normalized match length (0 == MIN_MATCH) */

var base_length   = new Array(LENGTH_CODES);
zero(base_length);
/* First normalized length for each code (0 = MIN_MATCH) */

var base_dist     = new Array(D_CODES);
zero(base_dist);
/* First normalized distance for each code (0 = distance of 1) */


function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {

  this.static_tree  = static_tree;  /* static tree or NULL */
  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */
  this.extra_base   = extra_base;   /* base index for extra_bits */
  this.elems        = elems;        /* max number of elements in the tree */
  this.max_length   = max_length;   /* max bit length for the codes */

  // show if `static_tree` has data or dummy - needed for monomorphic objects
  this.has_stree    = static_tree && static_tree.length;
}


var static_l_desc;
var static_d_desc;
var static_bl_desc;


function TreeDesc(dyn_tree, stat_desc) {
  this.dyn_tree = dyn_tree;     /* the dynamic tree */
  this.max_code = 0;            /* largest code with non zero frequency */
  this.stat_desc = stat_desc;   /* the corresponding static tree */
}



function d_code(dist) {
  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
}


/* ===========================================================================
 * Output a short LSB first on the stream.
 * IN assertion: there is enough room in pendingBuf.
 */
function put_short(s, w) {
//    put_byte(s, (uch)((w) & 0xff));
//    put_byte(s, (uch)((ush)(w) >> 8));
  s.pending_buf[s.pending++] = (w) & 0xff;
  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
}


/* ===========================================================================
 * Send a value on a given number of bits.
 * IN assertion: length <= 16 and value fits in length bits.
 */
function send_bits(s, value, length) {
  if (s.bi_valid > (Buf_size - length)) {
    s.bi_buf |= (value << s.bi_valid) & 0xffff;
    put_short(s, s.bi_buf);
    s.bi_buf = value >> (Buf_size - s.bi_valid);
    s.bi_valid += length - Buf_size;
  } else {
    s.bi_buf |= (value << s.bi_valid) & 0xffff;
    s.bi_valid += length;
  }
}


function send_code(s, c, tree) {
  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
}


/* ===========================================================================
 * Reverse the first len bits of a code, using straightforward code (a faster
 * method would use a table)
 * IN assertion: 1 <= len <= 15
 */
function bi_reverse(code, len) {
  var res = 0;
  do {
    res |= code & 1;
    code >>>= 1;
    res <<= 1;
  } while (--len > 0);
  return res >>> 1;
}


/* ===========================================================================
 * Flush the bit buffer, keeping at most 7 bits in it.
 */
function bi_flush(s) {
  if (s.bi_valid === 16) {
    put_short(s, s.bi_buf);
    s.bi_buf = 0;
    s.bi_valid = 0;

  } else if (s.bi_valid >= 8) {
    s.pending_buf[s.pending++] = s.bi_buf & 0xff;
    s.bi_buf >>= 8;
    s.bi_valid -= 8;
  }
}


/* ===========================================================================
 * Compute the optimal bit lengths for a tree and update the total bit length
 * for the current block.
 * IN assertion: the fields freq and dad are set, heap[heap_max] and
 *    above are the tree nodes sorted by increasing frequency.
 * OUT assertions: the field len is set to the optimal bit length, the
 *     array bl_count contains the frequencies for each bit length.
 *     The length opt_len is updated; static_len is also updated if stree is
 *     not null.
 */
function gen_bitlen(s, desc)
//    deflate_state *s;
//    tree_desc *desc;    /* the tree descriptor */
{
  var tree            = desc.dyn_tree;
  var max_code        = desc.max_code;
  var stree           = desc.stat_desc.static_tree;
  var has_stree       = desc.stat_desc.has_stree;
  var extra           = desc.stat_desc.extra_bits;
  var base            = desc.stat_desc.extra_base;
  var max_length      = desc.stat_desc.max_length;
  var h;              /* heap index */
  var n, m;           /* iterate over the tree elements */
  var bits;           /* bit length */
  var xbits;          /* extra bits */
  var f;              /* frequency */
  var overflow = 0;   /* number of elements with bit length too large */

  for (bits = 0; bits <= MAX_BITS; bits++) {
    s.bl_count[bits] = 0;
  }

  /* In a first pass, compute the optimal bit lengths (which may
   * overflow in the case of the bit length tree).
   */
  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */

  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {
    n = s.heap[h];
    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
    if (bits > max_length) {
      bits = max_length;
      overflow++;
    }
    tree[n * 2 + 1]/*.Len*/ = bits;
    /* We overwrite tree[n].Dad which is no longer needed */

    if (n > max_code) { continue; } /* not a leaf node */

    s.bl_count[bits]++;
    xbits = 0;
    if (n >= base) {
      xbits = extra[n - base];
    }
    f = tree[n * 2]/*.Freq*/;
    s.opt_len += f * (bits + xbits);
    if (has_stree) {
      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
    }
  }
  if (overflow === 0) { return; }

  // Trace((stderr,"\nbit length overflow\n"));
  /* This happens for example on obj2 and pic of the Calgary corpus */

  /* Find the first bit length which could increase: */
  do {
    bits = max_length - 1;
    while (s.bl_count[bits] === 0) { bits--; }
    s.bl_count[bits]--;      /* move one leaf down the tree */
    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
    s.bl_count[max_length]--;
    /* The brother of the overflow item also moves one step up,
     * but this does not affect bl_count[max_length]
     */
    overflow -= 2;
  } while (overflow > 0);

  /* Now recompute all bit lengths, scanning in increasing frequency.
   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
   * lengths instead of fixing only the wrong ones. This idea is taken
   * from 'ar' written by Haruhiko Okumura.)
   */
  for (bits = max_length; bits !== 0; bits--) {
    n = s.bl_count[bits];
    while (n !== 0) {
      m = s.heap[--h];
      if (m > max_code) { continue; }
      if (tree[m * 2 + 1]/*.Len*/ !== bits) {
        // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
        tree[m * 2 + 1]/*.Len*/ = bits;
      }
      n--;
    }
  }
}


/* ===========================================================================
 * Generate the codes for a given tree and bit counts (which need not be
 * optimal).
 * IN assertion: the array bl_count contains the bit length statistics for
 * the given tree and the field len is set for all tree elements.
 * OUT assertion: the field code is set for all tree elements of non
 *     zero code length.
 */
function gen_codes(tree, max_code, bl_count)
//    ct_data *tree;             /* the tree to decorate */
//    int max_code;              /* largest code with non zero frequency */
//    ushf *bl_count;            /* number of codes at each bit length */
{
  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */
  var code = 0;              /* running code value */
  var bits;                  /* bit index */
  var n;                     /* code index */

  /* The distribution counts are first used to generate the code values
   * without bit reversal.
   */
  for (bits = 1; bits <= MAX_BITS; bits++) {
    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
  }
  /* Check that the bit counts in bl_count are consistent. The last code
   * must be all ones.
   */
  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
  //        "inconsistent bit counts");
  //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

  for (n = 0;  n <= max_code; n++) {
    var len = tree[n * 2 + 1]/*.Len*/;
    if (len === 0) { continue; }
    /* Now reverse the bits */
    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);

    //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
  }
}


/* ===========================================================================
 * Initialize the various 'constant' tables.
 */
function tr_static_init() {
  var n;        /* iterates over tree elements */
  var bits;     /* bit counter */
  var length;   /* length value */
  var code;     /* code value */
  var dist;     /* distance index */
  var bl_count = new Array(MAX_BITS + 1);
  /* number of codes at each bit length for an optimal tree */

  // do check in _tr_init()
  //if (static_init_done) return;

  /* For some embedded targets, global variables are not initialized: */
/*#ifdef NO_INIT_GLOBAL_POINTERS
  static_l_desc.static_tree = static_ltree;
  static_l_desc.extra_bits = extra_lbits;
  static_d_desc.static_tree = static_dtree;
  static_d_desc.extra_bits = extra_dbits;
  static_bl_desc.extra_bits = extra_blbits;
#endif*/

  /* Initialize the mapping length (0..255) -> length code (0..28) */
  length = 0;
  for (code = 0; code < LENGTH_CODES - 1; code++) {
    base_length[code] = length;
    for (n = 0; n < (1 << extra_lbits[code]); n++) {
      _length_code[length++] = code;
    }
  }
  //Assert (length == 256, "tr_static_init: length != 256");
  /* Note that the length 255 (match length 258) can be represented
   * in two different ways: code 284 + 5 bits or code 285, so we
   * overwrite length_code[255] to use the best encoding:
   */
  _length_code[length - 1] = code;

  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
  dist = 0;
  for (code = 0; code < 16; code++) {
    base_dist[code] = dist;
    for (n = 0; n < (1 << extra_dbits[code]); n++) {
      _dist_code[dist++] = code;
    }
  }
  //Assert (dist == 256, "tr_static_init: dist != 256");
  dist >>= 7; /* from now on, all distances are divided by 128 */
  for (; code < D_CODES; code++) {
    base_dist[code] = dist << 7;
    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
      _dist_code[256 + dist++] = code;
    }
  }
  //Assert (dist == 256, "tr_static_init: 256+dist != 512");

  /* Construct the codes of the static literal tree */
  for (bits = 0; bits <= MAX_BITS; bits++) {
    bl_count[bits] = 0;
  }

  n = 0;
  while (n <= 143) {
    static_ltree[n * 2 + 1]/*.Len*/ = 8;
    n++;
    bl_count[8]++;
  }
  while (n <= 255) {
    static_ltree[n * 2 + 1]/*.Len*/ = 9;
    n++;
    bl_count[9]++;
  }
  while (n <= 279) {
    static_ltree[n * 2 + 1]/*.Len*/ = 7;
    n++;
    bl_count[7]++;
  }
  while (n <= 287) {
    static_ltree[n * 2 + 1]/*.Len*/ = 8;
    n++;
    bl_count[8]++;
  }
  /* Codes 286 and 287 do not exist, but we must include them in the
   * tree construction to get a canonical Huffman tree (longest code
   * all ones)
   */
  gen_codes(static_ltree, L_CODES + 1, bl_count);

  /* The static distance tree is trivial: */
  for (n = 0; n < D_CODES; n++) {
    static_dtree[n * 2 + 1]/*.Len*/ = 5;
    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
  }

  // Now data ready and we can init static trees
  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);
  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);
  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);

  //static_init_done = true;
}


/* ===========================================================================
 * Initialize a new block.
 */
function init_block(s) {
  var n; /* iterates over tree elements */

  /* Initialize the trees. */
  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }

  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
  s.opt_len = s.static_len = 0;
  s.last_lit = s.matches = 0;
}


/* ===========================================================================
 * Flush the bit buffer and align the output on a byte boundary
 */
function bi_windup(s)
{
  if (s.bi_valid > 8) {
    put_short(s, s.bi_buf);
  } else if (s.bi_valid > 0) {
    //put_byte(s, (Byte)s->bi_buf);
    s.pending_buf[s.pending++] = s.bi_buf;
  }
  s.bi_buf = 0;
  s.bi_valid = 0;
}

/* ===========================================================================
 * Copy a stored block, storing first the length and its
 * one's complement if requested.
 */
function copy_block(s, buf, len, header)
//DeflateState *s;
//charf    *buf;    /* the input data */
//unsigned len;     /* its length */
//int      header;  /* true if block header must be written */
{
  bi_windup(s);        /* align on byte boundary */

  if (header) {
    put_short(s, len);
    put_short(s, ~len);
  }
//  while (len--) {
//    put_byte(s, *buf++);
//  }
  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
  s.pending += len;
}

/* ===========================================================================
 * Compares to subtrees, using the tree depth as tie breaker when
 * the subtrees have equal frequency. This minimizes the worst case length.
 */
function smaller(tree, n, m, depth) {
  var _n2 = n * 2;
  var _m2 = m * 2;
  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
}

/* ===========================================================================
 * Restore the heap property by moving down the tree starting at node k,
 * exchanging a node with the smallest of its two sons if necessary, stopping
 * when the heap property is re-established (each father smaller than its
 * two sons).
 */
function pqdownheap(s, tree, k)
//    deflate_state *s;
//    ct_data *tree;  /* the tree to restore */
//    int k;               /* node to move down */
{
  var v = s.heap[k];
  var j = k << 1;  /* left son of k */
  while (j <= s.heap_len) {
    /* Set j to the smallest of the two sons: */
    if (j < s.heap_len &&
      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
      j++;
    }
    /* Exit if v is smaller than both sons */
    if (smaller(tree, v, s.heap[j], s.depth)) { break; }

    /* Exchange v with the smallest son */
    s.heap[k] = s.heap[j];
    k = j;

    /* And continue down the tree, setting j to the left son of k */
    j <<= 1;
  }
  s.heap[k] = v;
}


// inlined manually
// var SMALLEST = 1;

/* ===========================================================================
 * Send the block data compressed using the given Huffman trees
 */
function compress_block(s, ltree, dtree)
//    deflate_state *s;
//    const ct_data *ltree; /* literal tree */
//    const ct_data *dtree; /* distance tree */
{
  var dist;           /* distance of matched string */
  var lc;             /* match length or unmatched char (if dist == 0) */
  var lx = 0;         /* running index in l_buf */
  var code;           /* the code to send */
  var extra;          /* number of extra bits to send */

  if (s.last_lit !== 0) {
    do {
      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);
      lc = s.pending_buf[s.l_buf + lx];
      lx++;

      if (dist === 0) {
        send_code(s, lc, ltree); /* send a literal byte */
        //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
      } else {
        /* Here, lc is the match length - MIN_MATCH */
        code = _length_code[lc];
        send_code(s, code + LITERALS + 1, ltree); /* send the length code */
        extra = extra_lbits[code];
        if (extra !== 0) {
          lc -= base_length[code];
          send_bits(s, lc, extra);       /* send the extra length bits */
        }
        dist--; /* dist is now the match distance - 1 */
        code = d_code(dist);
        //Assert (code < D_CODES, "bad d_code");

        send_code(s, code, dtree);       /* send the distance code */
        extra = extra_dbits[code];
        if (extra !== 0) {
          dist -= base_dist[code];
          send_bits(s, dist, extra);   /* send the extra distance bits */
        }
      } /* literal or match pair ? */

      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
      //       "pendingBuf overflow");

    } while (lx < s.last_lit);
  }

  send_code(s, END_BLOCK, ltree);
}


/* ===========================================================================
 * Construct one Huffman tree and assigns the code bit strings and lengths.
 * Update the total bit length for the current block.
 * IN assertion: the field freq is set for all tree elements.
 * OUT assertions: the fields len and code are set to the optimal bit length
 *     and corresponding code. The length opt_len is updated; static_len is
 *     also updated if stree is not null. The field max_code is set.
 */
function build_tree(s, desc)
//    deflate_state *s;
//    tree_desc *desc; /* the tree descriptor */
{
  var tree     = desc.dyn_tree;
  var stree    = desc.stat_desc.static_tree;
  var has_stree = desc.stat_desc.has_stree;
  var elems    = desc.stat_desc.elems;
  var n, m;          /* iterate over heap elements */
  var max_code = -1; /* largest code with non zero frequency */
  var node;          /* new node being created */

  /* Construct the initial heap, with least frequent element in
   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
   * heap[0] is not used.
   */
  s.heap_len = 0;
  s.heap_max = HEAP_SIZE;

  for (n = 0; n < elems; n++) {
    if (tree[n * 2]/*.Freq*/ !== 0) {
      s.heap[++s.heap_len] = max_code = n;
      s.depth[n] = 0;

    } else {
      tree[n * 2 + 1]/*.Len*/ = 0;
    }
  }

  /* The pkzip format requires that at least one distance code exists,
   * and that at least one bit should be sent even if there is only one
   * possible code. So to avoid special checks later on we force at least
   * two codes of non zero frequency.
   */
  while (s.heap_len < 2) {
    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
    tree[node * 2]/*.Freq*/ = 1;
    s.depth[node] = 0;
    s.opt_len--;

    if (has_stree) {
      s.static_len -= stree[node * 2 + 1]/*.Len*/;
    }
    /* node is 0 or 1 so it does not have extra bits */
  }
  desc.max_code = max_code;

  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
   * establish sub-heaps of increasing lengths:
   */
  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }

  /* Construct the Huffman tree by repeatedly combining the least two
   * frequent nodes.
   */
  node = elems;              /* next internal node of the tree */
  do {
    //pqremove(s, tree, n);  /* n = node of least frequency */
    /*** pqremove ***/
    n = s.heap[1/*SMALLEST*/];
    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
    pqdownheap(s, tree, 1/*SMALLEST*/);
    /***/

    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */

    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
    s.heap[--s.heap_max] = m;

    /* Create a new node father of n and m */
    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;

    /* and insert the new node in the heap */
    s.heap[1/*SMALLEST*/] = node++;
    pqdownheap(s, tree, 1/*SMALLEST*/);

  } while (s.heap_len >= 2);

  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];

  /* At this point, the fields freq and dad are set. We can now
   * generate the bit lengths.
   */
  gen_bitlen(s, desc);

  /* The field len is now set, we can generate the bit codes */
  gen_codes(tree, max_code, s.bl_count);
}


/* ===========================================================================
 * Scan a literal or distance tree to determine the frequencies of the codes
 * in the bit length tree.
 */
function scan_tree(s, tree, max_code)
//    deflate_state *s;
//    ct_data *tree;   /* the tree to be scanned */
//    int max_code;    /* and its largest code of non zero frequency */
{
  var n;                     /* iterates over all tree elements */
  var prevlen = -1;          /* last emitted length */
  var curlen;                /* length of current code */

  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */

  var count = 0;             /* repeat count of the current code */
  var max_count = 7;         /* max repeat count */
  var min_count = 4;         /* min repeat count */

  if (nextlen === 0) {
    max_count = 138;
    min_count = 3;
  }
  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */

  for (n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;

    if (++count < max_count && curlen === nextlen) {
      continue;

    } else if (count < min_count) {
      s.bl_tree[curlen * 2]/*.Freq*/ += count;

    } else if (curlen !== 0) {

      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;

    } else if (count <= 10) {
      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;

    } else {
      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
    }

    count = 0;
    prevlen = curlen;

    if (nextlen === 0) {
      max_count = 138;
      min_count = 3;

    } else if (curlen === nextlen) {
      max_count = 6;
      min_count = 3;

    } else {
      max_count = 7;
      min_count = 4;
    }
  }
}


/* ===========================================================================
 * Send a literal or distance tree in compressed form, using the codes in
 * bl_tree.
 */
function send_tree(s, tree, max_code)
//    deflate_state *s;
//    ct_data *tree; /* the tree to be scanned */
//    int max_code;       /* and its largest code of non zero frequency */
{
  var n;                     /* iterates over all tree elements */
  var prevlen = -1;          /* last emitted length */
  var curlen;                /* length of current code */

  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */

  var count = 0;             /* repeat count of the current code */
  var max_count = 7;         /* max repeat count */
  var min_count = 4;         /* min repeat count */

  /* tree[max_code+1].Len = -1; */  /* guard already set */
  if (nextlen === 0) {
    max_count = 138;
    min_count = 3;
  }

  for (n = 0; n <= max_code; n++) {
    curlen = nextlen;
    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;

    if (++count < max_count && curlen === nextlen) {
      continue;

    } else if (count < min_count) {
      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);

    } else if (curlen !== 0) {
      if (curlen !== prevlen) {
        send_code(s, curlen, s.bl_tree);
        count--;
      }
      //Assert(count >= 3 && count <= 6, " 3_6?");
      send_code(s, REP_3_6, s.bl_tree);
      send_bits(s, count - 3, 2);

    } else if (count <= 10) {
      send_code(s, REPZ_3_10, s.bl_tree);
      send_bits(s, count - 3, 3);

    } else {
      send_code(s, REPZ_11_138, s.bl_tree);
      send_bits(s, count - 11, 7);
    }

    count = 0;
    prevlen = curlen;
    if (nextlen === 0) {
      max_count = 138;
      min_count = 3;

    } else if (curlen === nextlen) {
      max_count = 6;
      min_count = 3;

    } else {
      max_count = 7;
      min_count = 4;
    }
  }
}


/* ===========================================================================
 * Construct the Huffman tree for the bit lengths and return the index in
 * bl_order of the last bit length code to send.
 */
function build_bl_tree(s) {
  var max_blindex;  /* index of last bit length code of non zero freq */

  /* Determine the bit length frequencies for literal and distance trees */
  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);

  /* Build the bit length tree: */
  build_tree(s, s.bl_desc);
  /* opt_len now includes the length of the tree representations, except
   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
   */

  /* Determine the number of bit length codes to send. The pkzip format
   * requires that at least 4 bit length codes be sent. (appnote.txt says
   * 3 but the actual value used is 4.)
   */
  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
      break;
    }
  }
  /* Update opt_len to include the bit length tree and counts */
  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
  //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
  //        s->opt_len, s->static_len));

  return max_blindex;
}


/* ===========================================================================
 * Send the header for a block using dynamic Huffman trees: the counts, the
 * lengths of the bit length codes, the literal tree and the distance tree.
 * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 */
function send_all_trees(s, lcodes, dcodes, blcodes)
//    deflate_state *s;
//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
{
  var rank;                    /* index in bl_order */

  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  //        "too many codes");
  //Tracev((stderr, "\nbl counts: "));
  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
  send_bits(s, dcodes - 1,   5);
  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */
  for (rank = 0; rank < blcodes; rank++) {
    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
  }
  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));

  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));

  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
}


/* ===========================================================================
 * Check if the data type is TEXT or BINARY, using the following algorithm:
 * - TEXT if the two conditions below are satisfied:
 *    a) There are no non-portable control characters belonging to the
 *       "black list" (0..6, 14..25, 28..31).
 *    b) There is at least one printable character belonging to the
 *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
 * - BINARY otherwise.
 * - The following partially-portable control characters form a
 *   "gray list" that is ignored in this detection algorithm:
 *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
 * IN assertion: the fields Freq of dyn_ltree are set.
 */
function detect_data_type(s) {
  /* black_mask is the bit mask of black-listed bytes
   * set bits 0..6, 14..25, and 28..31
   * 0xf3ffc07f = binary 11110011111111111100000001111111
   */
  var black_mask = 0xf3ffc07f;
  var n;

  /* Check for non-textual ("black-listed") bytes. */
  for (n = 0; n <= 31; n++, black_mask >>>= 1) {
    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
      return Z_BINARY;
    }
  }

  /* Check for textual ("white-listed") bytes. */
  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
    return Z_TEXT;
  }
  for (n = 32; n < LITERALS; n++) {
    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
      return Z_TEXT;
    }
  }

  /* There are no "black-listed" or "white-listed" bytes:
   * this stream either is empty or has tolerated ("gray-listed") bytes only.
   */
  return Z_BINARY;
}


var static_init_done = false;

/* ===========================================================================
 * Initialize the tree data structures for a new zlib stream.
 */
function _tr_init(s)
{

  if (!static_init_done) {
    tr_static_init();
    static_init_done = true;
  }

  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);
  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);
  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);

  s.bi_buf = 0;
  s.bi_valid = 0;

  /* Initialize the first block of the first file: */
  init_block(s);
}


/* ===========================================================================
 * Send a stored block
 */
function _tr_stored_block(s, buf, stored_len, last)
//DeflateState *s;
//charf *buf;       /* input block */
//ulg stored_len;   /* length of input block */
//int last;         /* one if this is the last block for a file */
{
  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */
  copy_block(s, buf, stored_len, true); /* with header */
}


/* ===========================================================================
 * Send one empty static block to give enough lookahead for inflate.
 * This takes 10 bits, of which 7 may remain in the bit buffer.
 */
function _tr_align(s) {
  send_bits(s, STATIC_TREES << 1, 3);
  send_code(s, END_BLOCK, static_ltree);
  bi_flush(s);
}


/* ===========================================================================
 * Determine the best encoding for the current block: dynamic trees, static
 * trees or store, and output the encoded block to the zip file.
 */
function _tr_flush_block(s, buf, stored_len, last)
//DeflateState *s;
//charf *buf;       /* input block, or NULL if too old */
//ulg stored_len;   /* length of input block */
//int last;         /* one if this is the last block for a file */
{
  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */
  var max_blindex = 0;        /* index of last bit length code of non zero freq */

  /* Build the Huffman trees unless a stored block is forced */
  if (s.level > 0) {

    /* Check if the file is binary or text */
    if (s.strm.data_type === Z_UNKNOWN) {
      s.strm.data_type = detect_data_type(s);
    }

    /* Construct the literal and distance trees */
    build_tree(s, s.l_desc);
    // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
    //        s->static_len));

    build_tree(s, s.d_desc);
    // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
    //        s->static_len));
    /* At this point, opt_len and static_len are the total bit lengths of
     * the compressed block data, excluding the tree representations.
     */

    /* Build the bit length tree for the above two trees, and get the index
     * in bl_order of the last bit length code to send.
     */
    max_blindex = build_bl_tree(s);

    /* Determine the best encoding. Compute the block lengths in bytes. */
    opt_lenb = (s.opt_len + 3 + 7) >>> 3;
    static_lenb = (s.static_len + 3 + 7) >>> 3;

    // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
    //        s->last_lit));

    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }

  } else {
    // Assert(buf != (char*)0, "lost buf");
    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
  }

  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
    /* 4: two words for the lengths */

    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
     * Otherwise we can't have processed more than WSIZE input bytes since
     * the last block flush, because compression would have been
     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
     * transform a block into a stored block.
     */
    _tr_stored_block(s, buf, stored_len, last);

  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {

    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
    compress_block(s, static_ltree, static_dtree);

  } else {
    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
    compress_block(s, s.dyn_ltree, s.dyn_dtree);
  }
  // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
  /* The above check is made mod 2^32, for files larger than 512 MB
   * and uLong implemented on 32 bits.
   */
  init_block(s);

  if (last) {
    bi_windup(s);
  }
  // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
  //       s->compressed_len-7*last));
}

/* ===========================================================================
 * Save the match info and tally the frequency counts. Return true if
 * the current block must be flushed.
 */
function _tr_tally(s, dist, lc)
//    deflate_state *s;
//    unsigned dist;  /* distance of matched string */
//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
{
  //var out_length, in_length, dcode;

  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;
  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;

  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
  s.last_lit++;

  if (dist === 0) {
    /* lc is the unmatched char */
    s.dyn_ltree[lc * 2]/*.Freq*/++;
  } else {
    s.matches++;
    /* Here, lc is the match length - MIN_MATCH */
    dist--;             /* dist = match distance - 1 */
    //Assert((ush)dist < (ush)MAX_DIST(s) &&
    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
    //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");

    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;
    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
  }

// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility

//#ifdef TRUNCATE_BLOCK
//  /* Try to guess if it is profitable to stop the current block here */
//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
//    /* Compute an upper bound for the compressed length */
//    out_length = s.last_lit*8;
//    in_length = s.strstart - s.block_start;
//
//    for (dcode = 0; dcode < D_CODES; dcode++) {
//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
//    }
//    out_length >>>= 3;
//    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
//    //       s->last_lit, in_length, out_length,
//    //       100L - out_length*100L/in_length));
//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
//      return true;
//    }
//  }
//#endif

  return (s.last_lit === s.lit_bufsize - 1);
  /* We avoid equality with lit_bufsize because of wraparound at 64K
   * on 16 bit machines and because stored blocks are restricted to
   * 64K-1 bytes.
   */
}

exports._tr_init  = _tr_init;
exports._tr_stored_block = _tr_stored_block;
exports._tr_flush_block  = _tr_flush_block;
exports._tr_tally = _tr_tally;
exports._tr_align = _tr_align;


/***/ }),
/* 254 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";



var zlib_inflate = __webpack_require__(255);
var utils        = __webpack_require__(25);
var strings      = __webpack_require__(75);
var c            = __webpack_require__(77);
var msg          = __webpack_require__(57);
var ZStream      = __webpack_require__(76);
var GZheader     = __webpack_require__(258);

var toString = Object.prototype.toString;

/**
 * class Inflate
 *
 * Generic JS-style wrapper for zlib calls. If you don't need
 * streaming behaviour - use more simple functions: [[inflate]]
 * and [[inflateRaw]].
 **/

/* internal
 * inflate.chunks -> Array
 *
 * Chunks of output data, if [[Inflate#onData]] not overridden.
 **/

/**
 * Inflate.result -> Uint8Array|Array|String
 *
 * Uncompressed result, generated by default [[Inflate#onData]]
 * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
 * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you
 * push a chunk with explicit flush (call [[Inflate#push]] with
 * `Z_SYNC_FLUSH` param).
 **/

/**
 * Inflate.err -> Number
 *
 * Error code after inflate finished. 0 (Z_OK) on success.
 * Should be checked if broken data possible.
 **/

/**
 * Inflate.msg -> String
 *
 * Error message, if [[Inflate.err]] != 0
 **/


/**
 * new Inflate(options)
 * - options (Object): zlib inflate options.
 *
 * Creates new inflator instance with specified params. Throws exception
 * on bad params. Supported options:
 *
 * - `windowBits`
 * - `dictionary`
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information on these.
 *
 * Additional options, for internal needs:
 *
 * - `chunkSize` - size of generated data chunks (16K by default)
 * - `raw` (Boolean) - do raw inflate
 * - `to` (String) - if equal to 'string', then result will be converted
 *   from utf8 to utf16 (javascript) string. When string output requested,
 *   chunk length can differ from `chunkSize`, depending on content.
 *
 * By default, when no options set, autodetect deflate/gzip data format via
 * wrapper header.
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
 *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
 *
 * var inflate = new pako.Inflate({ level: 3});
 *
 * inflate.push(chunk1, false);
 * inflate.push(chunk2, true);  // true -> last chunk
 *
 * if (inflate.err) { throw new Error(inflate.err); }
 *
 * console.log(inflate.result);
 * ```
 **/
function Inflate(options) {
  if (!(this instanceof Inflate)) return new Inflate(options);

  this.options = utils.assign({
    chunkSize: 16384,
    windowBits: 0,
    to: ''
  }, options || {});

  var opt = this.options;

  // Force window size for `raw` data, if not set directly,
  // because we have no header for autodetect.
  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
    opt.windowBits = -opt.windowBits;
    if (opt.windowBits === 0) { opt.windowBits = -15; }
  }

  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
      !(options && options.windowBits)) {
    opt.windowBits += 32;
  }

  // Gzip header has no info about windows size, we can do autodetect only
  // for deflate. So, if window size not set, force it to max when gzip possible
  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
    // bit 3 (16) -> gzipped data
    // bit 4 (32) -> autodetect gzip/deflate
    if ((opt.windowBits & 15) === 0) {
      opt.windowBits |= 15;
    }
  }

  this.err    = 0;      // error code, if happens (0 = Z_OK)
  this.msg    = '';     // error message
  this.ended  = false;  // used to avoid multiple onEnd() calls
  this.chunks = [];     // chunks of compressed data

  this.strm   = new ZStream();
  this.strm.avail_out = 0;

  var status  = zlib_inflate.inflateInit2(
    this.strm,
    opt.windowBits
  );

  if (status !== c.Z_OK) {
    throw new Error(msg[status]);
  }

  this.header = new GZheader();

  zlib_inflate.inflateGetHeader(this.strm, this.header);

  // Setup dictionary
  if (opt.dictionary) {
    // Convert data if needed
    if (typeof opt.dictionary === 'string') {
      opt.dictionary = strings.string2buf(opt.dictionary);
    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
      opt.dictionary = new Uint8Array(opt.dictionary);
    }
    if (opt.raw) { //In raw mode we need to set the dictionary early
      status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);
      if (status !== c.Z_OK) {
        throw new Error(msg[status]);
      }
    }
  }
}

/**
 * Inflate#push(data[, mode]) -> Boolean
 * - data (Uint8Array|Array|ArrayBuffer|String): input data
 * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
 *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
 *
 * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
 * new output chunks. Returns `true` on success. The last data block must have
 * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
 * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you
 * can use mode Z_SYNC_FLUSH, keeping the decompression context.
 *
 * On fail call [[Inflate#onEnd]] with error code and return false.
 *
 * We strongly recommend to use `Uint8Array` on input for best speed (output
 * format is detected automatically). Also, don't skip last param and always
 * use the same type in your code (boolean or number). That will improve JS speed.
 *
 * For regular `Array`-s make sure all elements are [0..255].
 *
 * ##### Example
 *
 * ```javascript
 * push(chunk, false); // push one of data chunks
 * ...
 * push(chunk, true);  // push last chunk
 * ```
 **/
Inflate.prototype.push = function (data, mode) {
  var strm = this.strm;
  var chunkSize = this.options.chunkSize;
  var dictionary = this.options.dictionary;
  var status, _mode;
  var next_out_utf8, tail, utf8str;

  // Flag to properly process Z_BUF_ERROR on testing inflate call
  // when we check that all output data was flushed.
  var allowBufError = false;

  if (this.ended) { return false; }
  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);

  // Convert data if needed
  if (typeof data === 'string') {
    // Only binary strings can be decompressed on practice
    strm.input = strings.binstring2buf(data);
  } else if (toString.call(data) === '[object ArrayBuffer]') {
    strm.input = new Uint8Array(data);
  } else {
    strm.input = data;
  }

  strm.next_in = 0;
  strm.avail_in = strm.input.length;

  do {
    if (strm.avail_out === 0) {
      strm.output = new utils.Buf8(chunkSize);
      strm.next_out = 0;
      strm.avail_out = chunkSize;
    }

    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */

    if (status === c.Z_NEED_DICT && dictionary) {
      status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);
    }

    if (status === c.Z_BUF_ERROR && allowBufError === true) {
      status = c.Z_OK;
      allowBufError = false;
    }

    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
      this.onEnd(status);
      this.ended = true;
      return false;
    }

    if (strm.next_out) {
      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {

        if (this.options.to === 'string') {

          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);

          tail = strm.next_out - next_out_utf8;
          utf8str = strings.buf2string(strm.output, next_out_utf8);

          // move tail
          strm.next_out = tail;
          strm.avail_out = chunkSize - tail;
          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }

          this.onData(utf8str);

        } else {
          this.onData(utils.shrinkBuf(strm.output, strm.next_out));
        }
      }
    }

    // When no more input data, we should check that internal inflate buffers
    // are flushed. The only way to do it when avail_out = 0 - run one more
    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.
    // Here we set flag to process this error properly.
    //
    // NOTE. Deflate does not return error in this case and does not needs such
    // logic.
    if (strm.avail_in === 0 && strm.avail_out === 0) {
      allowBufError = true;
    }

  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);

  if (status === c.Z_STREAM_END) {
    _mode = c.Z_FINISH;
  }

  // Finalize on the last chunk.
  if (_mode === c.Z_FINISH) {
    status = zlib_inflate.inflateEnd(this.strm);
    this.onEnd(status);
    this.ended = true;
    return status === c.Z_OK;
  }

  // callback interim results if Z_SYNC_FLUSH.
  if (_mode === c.Z_SYNC_FLUSH) {
    this.onEnd(c.Z_OK);
    strm.avail_out = 0;
    return true;
  }

  return true;
};


/**
 * Inflate#onData(chunk) -> Void
 * - chunk (Uint8Array|Array|String): output data. Type of array depends
 *   on js engine support. When string output requested, each chunk
 *   will be string.
 *
 * By default, stores data blocks in `chunks[]` property and glue
 * those in `onEnd`. Override this handler, if you need another behaviour.
 **/
Inflate.prototype.onData = function (chunk) {
  this.chunks.push(chunk);
};


/**
 * Inflate#onEnd(status) -> Void
 * - status (Number): inflate status. 0 (Z_OK) on success,
 *   other if not.
 *
 * Called either after you tell inflate that the input stream is
 * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
 * or if an error happened. By default - join collected chunks,
 * free memory and fill `results` / `err` properties.
 **/
Inflate.prototype.onEnd = function (status) {
  // On success - join
  if (status === c.Z_OK) {
    if (this.options.to === 'string') {
      // Glue & convert here, until we teach pako to send
      // utf8 aligned strings to onData
      this.result = this.chunks.join('');
    } else {
      this.result = utils.flattenChunks(this.chunks);
    }
  }
  this.chunks = [];
  this.err = status;
  this.msg = this.strm.msg;
};


/**
 * inflate(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * Decompress `data` with inflate/ungzip and `options`. Autodetect
 * format via wrapper header by default. That's why we don't provide
 * separate `ungzip` method.
 *
 * Supported options are:
 *
 * - windowBits
 *
 * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
 * for more information.
 *
 * Sugar (options):
 *
 * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
 *   negative windowBits implicitly.
 * - `to` (String) - if equal to 'string', then result will be converted
 *   from utf8 to utf16 (javascript) string. When string output requested,
 *   chunk length can differ from `chunkSize`, depending on content.
 *
 *
 * ##### Example:
 *
 * ```javascript
 * var pako = require('pako')
 *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
 *   , output;
 *
 * try {
 *   output = pako.inflate(input);
 * } catch (err)
 *   console.log(err);
 * }
 * ```
 **/
function inflate(input, options) {
  var inflator = new Inflate(options);

  inflator.push(input, true);

  // That will never happens, if you don't cheat with options :)
  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }

  return inflator.result;
}


/**
 * inflateRaw(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * The same as [[inflate]], but creates raw data, without wrapper
 * (header and adler32 crc).
 **/
function inflateRaw(input, options) {
  options = options || {};
  options.raw = true;
  return inflate(input, options);
}


/**
 * ungzip(data[, options]) -> Uint8Array|Array|String
 * - data (Uint8Array|Array|String): input data to decompress.
 * - options (Object): zlib inflate options.
 *
 * Just shortcut to [[inflate]], because it autodetects format
 * by header.content. Done for convenience.
 **/


exports.Inflate = Inflate;
exports.inflate = inflate;
exports.inflateRaw = inflateRaw;
exports.ungzip  = inflate;


/***/ }),
/* 255 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils         = __webpack_require__(25);
var adler32       = __webpack_require__(73);
var crc32         = __webpack_require__(74);
var inflate_fast  = __webpack_require__(256);
var inflate_table = __webpack_require__(257);

var CODES = 0;
var LENS = 1;
var DISTS = 2;

/* Public constants ==========================================================*/
/* ===========================================================================*/


/* Allowed flush values; see deflate() and inflate() below for details */
//var Z_NO_FLUSH      = 0;
//var Z_PARTIAL_FLUSH = 1;
//var Z_SYNC_FLUSH    = 2;
//var Z_FULL_FLUSH    = 3;
var Z_FINISH        = 4;
var Z_BLOCK         = 5;
var Z_TREES         = 6;


/* Return codes for the compression/decompression functions. Negative values
 * are errors, positive values are used for special but normal events.
 */
var Z_OK            = 0;
var Z_STREAM_END    = 1;
var Z_NEED_DICT     = 2;
//var Z_ERRNO         = -1;
var Z_STREAM_ERROR  = -2;
var Z_DATA_ERROR    = -3;
var Z_MEM_ERROR     = -4;
var Z_BUF_ERROR     = -5;
//var Z_VERSION_ERROR = -6;

/* The deflate compression method */
var Z_DEFLATED  = 8;


/* STATES ====================================================================*/
/* ===========================================================================*/


var    HEAD = 1;       /* i: waiting for magic header */
var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */
var    TIME = 3;       /* i: waiting for modification time (gzip) */
var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */
var    EXLEN = 5;      /* i: waiting for extra length (gzip) */
var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */
var    NAME = 7;       /* i: waiting for end of file name (gzip) */
var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */
var    HCRC = 9;       /* i: waiting for header crc (gzip) */
var    DICTID = 10;    /* i: waiting for dictionary check value */
var    DICT = 11;      /* waiting for inflateSetDictionary() call */
var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */
var        STORED = 14;    /* i: waiting for stored size (length and complement) */
var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */
var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */
var        TABLE = 17;     /* i: waiting for dynamic block table lengths */
var        LENLENS = 18;   /* i: waiting for code length code lengths */
var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */
var            LEN_ = 20;      /* i: same as LEN below, but only first time in */
var            LEN = 21;       /* i: waiting for length/lit/eob code */
var            LENEXT = 22;    /* i: waiting for length extra bits */
var            DIST = 23;      /* i: waiting for distance code */
var            DISTEXT = 24;   /* i: waiting for distance extra bits */
var            MATCH = 25;     /* o: waiting for output space to copy string */
var            LIT = 26;       /* o: waiting for output space to write literal */
var    CHECK = 27;     /* i: waiting for 32-bit check value */
var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */
var    DONE = 29;      /* finished check, done -- remain here until reset */
var    BAD = 30;       /* got a data error -- remain here until reset */
var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */
var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */

/* ===========================================================================*/



var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);

var MAX_WBITS = 15;
/* 32K LZ77 window */
var DEF_WBITS = MAX_WBITS;


function zswap32(q) {
  return  (((q >>> 24) & 0xff) +
          ((q >>> 8) & 0xff00) +
          ((q & 0xff00) << 8) +
          ((q & 0xff) << 24));
}


function InflateState() {
  this.mode = 0;             /* current inflate mode */
  this.last = false;          /* true if processing last block */
  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
  this.havedict = false;      /* true if dictionary provided */
  this.flags = 0;             /* gzip header method and flags (0 if zlib) */
  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */
  this.check = 0;             /* protected copy of check value */
  this.total = 0;             /* protected copy of output count */
  // TODO: may be {}
  this.head = null;           /* where to save gzip header information */

  /* sliding window */
  this.wbits = 0;             /* log base 2 of requested window size */
  this.wsize = 0;             /* window size or zero if not using window */
  this.whave = 0;             /* valid bytes in the window */
  this.wnext = 0;             /* window write index */
  this.window = null;         /* allocated sliding window, if needed */

  /* bit accumulator */
  this.hold = 0;              /* input bit accumulator */
  this.bits = 0;              /* number of bits in "in" */

  /* for string and stored block copying */
  this.length = 0;            /* literal or length of data to copy */
  this.offset = 0;            /* distance back to copy string from */

  /* for table and code decoding */
  this.extra = 0;             /* extra bits needed */

  /* fixed and dynamic code tables */
  this.lencode = null;          /* starting table for length/literal codes */
  this.distcode = null;         /* starting table for distance codes */
  this.lenbits = 0;           /* index bits for lencode */
  this.distbits = 0;          /* index bits for distcode */

  /* dynamic table building */
  this.ncode = 0;             /* number of code length code lengths */
  this.nlen = 0;              /* number of length code lengths */
  this.ndist = 0;             /* number of distance code lengths */
  this.have = 0;              /* number of code lengths in lens[] */
  this.next = null;              /* next available space in codes[] */

  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
  this.work = new utils.Buf16(288); /* work area for code table building */

  /*
   because we don't have pointers in js, we use lencode and distcode directly
   as buffers so we don't need codes
  */
  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */
  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */
  this.sane = 0;                   /* if false, allow invalid distance too far */
  this.back = 0;                   /* bits back of last unprocessed length/lit */
  this.was = 0;                    /* initial length of match */
}

function inflateResetKeep(strm) {
  var state;

  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  strm.total_in = strm.total_out = state.total = 0;
  strm.msg = ''; /*Z_NULL*/
  if (state.wrap) {       /* to support ill-conceived Java test suite */
    strm.adler = state.wrap & 1;
  }
  state.mode = HEAD;
  state.last = 0;
  state.havedict = 0;
  state.dmax = 32768;
  state.head = null/*Z_NULL*/;
  state.hold = 0;
  state.bits = 0;
  //state.lencode = state.distcode = state.next = state.codes;
  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);

  state.sane = 1;
  state.back = -1;
  //Tracev((stderr, "inflate: reset\n"));
  return Z_OK;
}

function inflateReset(strm) {
  var state;

  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  state.wsize = 0;
  state.whave = 0;
  state.wnext = 0;
  return inflateResetKeep(strm);

}

function inflateReset2(strm, windowBits) {
  var wrap;
  var state;

  /* get the state */
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;

  /* extract wrap request from windowBits parameter */
  if (windowBits < 0) {
    wrap = 0;
    windowBits = -windowBits;
  }
  else {
    wrap = (windowBits >> 4) + 1;
    if (windowBits < 48) {
      windowBits &= 15;
    }
  }

  /* set number of window bits, free window if different */
  if (windowBits && (windowBits < 8 || windowBits > 15)) {
    return Z_STREAM_ERROR;
  }
  if (state.window !== null && state.wbits !== windowBits) {
    state.window = null;
  }

  /* update state and reset the rest of it */
  state.wrap = wrap;
  state.wbits = windowBits;
  return inflateReset(strm);
}

function inflateInit2(strm, windowBits) {
  var ret;
  var state;

  if (!strm) { return Z_STREAM_ERROR; }
  //strm.msg = Z_NULL;                 /* in case we return an error */

  state = new InflateState();

  //if (state === Z_NULL) return Z_MEM_ERROR;
  //Tracev((stderr, "inflate: allocated\n"));
  strm.state = state;
  state.window = null/*Z_NULL*/;
  ret = inflateReset2(strm, windowBits);
  if (ret !== Z_OK) {
    strm.state = null/*Z_NULL*/;
  }
  return ret;
}

function inflateInit(strm) {
  return inflateInit2(strm, DEF_WBITS);
}


/*
 Return state with length and distance decoding tables and index sizes set to
 fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 If BUILDFIXED is defined, then instead this routine builds the tables the
 first time it's called, and returns those tables the first time and
 thereafter.  This reduces the size of the code by about 2K bytes, in
 exchange for a little execution time.  However, BUILDFIXED should not be
 used for threaded applications, since the rewriting of the tables and virgin
 may not be thread-safe.
 */
var virgin = true;

var lenfix, distfix; // We have no pointers in JS, so keep tables separate

function fixedtables(state) {
  /* build fixed huffman tables if first call (may not be thread safe) */
  if (virgin) {
    var sym;

    lenfix = new utils.Buf32(512);
    distfix = new utils.Buf32(32);

    /* literal/length table */
    sym = 0;
    while (sym < 144) { state.lens[sym++] = 8; }
    while (sym < 256) { state.lens[sym++] = 9; }
    while (sym < 280) { state.lens[sym++] = 7; }
    while (sym < 288) { state.lens[sym++] = 8; }

    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });

    /* distance table */
    sym = 0;
    while (sym < 32) { state.lens[sym++] = 5; }

    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });

    /* do this just once */
    virgin = false;
  }

  state.lencode = lenfix;
  state.lenbits = 9;
  state.distcode = distfix;
  state.distbits = 5;
}


/*
 Update the window with the last wsize (normally 32K) bytes written before
 returning.  If window does not exist yet, create it.  This is only called
 when a window is already in use, or when output has been written during this
 inflate call, but the end of the deflate stream has not been reached yet.
 It is also called to create a window for dictionary data when a dictionary
 is loaded.

 Providing output buffers larger than 32K to inflate() should provide a speed
 advantage, since only the last 32K of output is copied to the sliding window
 upon return from inflate(), and since all distances after the first 32K of
 output will fall in the output data, making match copies simpler and faster.
 The advantage may be dependent on the size of the processor's data caches.
 */
function updatewindow(strm, src, end, copy) {
  var dist;
  var state = strm.state;

  /* if it hasn't been done already, allocate space for the window */
  if (state.window === null) {
    state.wsize = 1 << state.wbits;
    state.wnext = 0;
    state.whave = 0;

    state.window = new utils.Buf8(state.wsize);
  }

  /* copy state->wsize or less output bytes into the circular window */
  if (copy >= state.wsize) {
    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
    state.wnext = 0;
    state.whave = state.wsize;
  }
  else {
    dist = state.wsize - state.wnext;
    if (dist > copy) {
      dist = copy;
    }
    //zmemcpy(state->window + state->wnext, end - copy, dist);
    utils.arraySet(state.window, src, end - copy, dist, state.wnext);
    copy -= dist;
    if (copy) {
      //zmemcpy(state->window, end - copy, copy);
      utils.arraySet(state.window, src, end - copy, copy, 0);
      state.wnext = copy;
      state.whave = state.wsize;
    }
    else {
      state.wnext += dist;
      if (state.wnext === state.wsize) { state.wnext = 0; }
      if (state.whave < state.wsize) { state.whave += dist; }
    }
  }
  return 0;
}

function inflate(strm, flush) {
  var state;
  var input, output;          // input/output buffers
  var next;                   /* next input INDEX */
  var put;                    /* next output INDEX */
  var have, left;             /* available input and output */
  var hold;                   /* bit buffer */
  var bits;                   /* bits in bit buffer */
  var _in, _out;              /* save starting available input and output */
  var copy;                   /* number of stored or match bytes to copy */
  var from;                   /* where to copy match bytes from */
  var from_source;
  var here = 0;               /* current decoding table entry */
  var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
  //var last;                   /* parent table entry */
  var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
  var len;                    /* length to copy for repeats, bits to drop */
  var ret;                    /* return code */
  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */
  var opts;

  var n; // temporary var for NEED_BITS

  var order = /* permutation of code lengths */
    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];


  if (!strm || !strm.state || !strm.output ||
      (!strm.input && strm.avail_in !== 0)) {
    return Z_STREAM_ERROR;
  }

  state = strm.state;
  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */


  //--- LOAD() ---
  put = strm.next_out;
  output = strm.output;
  left = strm.avail_out;
  next = strm.next_in;
  input = strm.input;
  have = strm.avail_in;
  hold = state.hold;
  bits = state.bits;
  //---

  _in = have;
  _out = left;
  ret = Z_OK;

  inf_leave: // goto emulation
  for (;;) {
    switch (state.mode) {
      case HEAD:
        if (state.wrap === 0) {
          state.mode = TYPEDO;
          break;
        }
        //=== NEEDBITS(16);
        while (bits < 16) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */
          state.check = 0/*crc32(0L, Z_NULL, 0)*/;
          //=== CRC2(state.check, hold);
          hbuf[0] = hold & 0xff;
          hbuf[1] = (hold >>> 8) & 0xff;
          state.check = crc32(state.check, hbuf, 2, 0);
          //===//

          //=== INITBITS();
          hold = 0;
          bits = 0;
          //===//
          state.mode = FLAGS;
          break;
        }
        state.flags = 0;           /* expect zlib header */
        if (state.head) {
          state.head.done = false;
        }
        if (!(state.wrap & 1) ||   /* check if zlib header allowed */
          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
          strm.msg = 'incorrect header check';
          state.mode = BAD;
          break;
        }
        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
          strm.msg = 'unknown compression method';
          state.mode = BAD;
          break;
        }
        //--- DROPBITS(4) ---//
        hold >>>= 4;
        bits -= 4;
        //---//
        len = (hold & 0x0f)/*BITS(4)*/ + 8;
        if (state.wbits === 0) {
          state.wbits = len;
        }
        else if (len > state.wbits) {
          strm.msg = 'invalid window size';
          state.mode = BAD;
          break;
        }
        state.dmax = 1 << len;
        //Tracev((stderr, "inflate:   zlib header ok\n"));
        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
        state.mode = hold & 0x200 ? DICTID : TYPE;
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        break;
      case FLAGS:
        //=== NEEDBITS(16); */
        while (bits < 16) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.flags = hold;
        if ((state.flags & 0xff) !== Z_DEFLATED) {
          strm.msg = 'unknown compression method';
          state.mode = BAD;
          break;
        }
        if (state.flags & 0xe000) {
          strm.msg = 'unknown header flags set';
          state.mode = BAD;
          break;
        }
        if (state.head) {
          state.head.text = ((hold >> 8) & 1);
        }
        if (state.flags & 0x0200) {
          //=== CRC2(state.check, hold);
          hbuf[0] = hold & 0xff;
          hbuf[1] = (hold >>> 8) & 0xff;
          state.check = crc32(state.check, hbuf, 2, 0);
          //===//
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = TIME;
        /* falls through */
      case TIME:
        //=== NEEDBITS(32); */
        while (bits < 32) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if (state.head) {
          state.head.time = hold;
        }
        if (state.flags & 0x0200) {
          //=== CRC4(state.check, hold)
          hbuf[0] = hold & 0xff;
          hbuf[1] = (hold >>> 8) & 0xff;
          hbuf[2] = (hold >>> 16) & 0xff;
          hbuf[3] = (hold >>> 24) & 0xff;
          state.check = crc32(state.check, hbuf, 4, 0);
          //===
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = OS;
        /* falls through */
      case OS:
        //=== NEEDBITS(16); */
        while (bits < 16) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if (state.head) {
          state.head.xflags = (hold & 0xff);
          state.head.os = (hold >> 8);
        }
        if (state.flags & 0x0200) {
          //=== CRC2(state.check, hold);
          hbuf[0] = hold & 0xff;
          hbuf[1] = (hold >>> 8) & 0xff;
          state.check = crc32(state.check, hbuf, 2, 0);
          //===//
        }
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = EXLEN;
        /* falls through */
      case EXLEN:
        if (state.flags & 0x0400) {
          //=== NEEDBITS(16); */
          while (bits < 16) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          state.length = hold;
          if (state.head) {
            state.head.extra_len = hold;
          }
          if (state.flags & 0x0200) {
            //=== CRC2(state.check, hold);
            hbuf[0] = hold & 0xff;
            hbuf[1] = (hold >>> 8) & 0xff;
            state.check = crc32(state.check, hbuf, 2, 0);
            //===//
          }
          //=== INITBITS();
          hold = 0;
          bits = 0;
          //===//
        }
        else if (state.head) {
          state.head.extra = null/*Z_NULL*/;
        }
        state.mode = EXTRA;
        /* falls through */
      case EXTRA:
        if (state.flags & 0x0400) {
          copy = state.length;
          if (copy > have) { copy = have; }
          if (copy) {
            if (state.head) {
              len = state.head.extra_len - state.length;
              if (!state.head.extra) {
                // Use untyped array for more convenient processing later
                state.head.extra = new Array(state.head.extra_len);
              }
              utils.arraySet(
                state.head.extra,
                input,
                next,
                // extra field is limited to 65536 bytes
                // - no need for additional size check
                copy,
                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
                len
              );
              //zmemcpy(state.head.extra + len, next,
              //        len + copy > state.head.extra_max ?
              //        state.head.extra_max - len : copy);
            }
            if (state.flags & 0x0200) {
              state.check = crc32(state.check, input, copy, next);
            }
            have -= copy;
            next += copy;
            state.length -= copy;
          }
          if (state.length) { break inf_leave; }
        }
        state.length = 0;
        state.mode = NAME;
        /* falls through */
      case NAME:
        if (state.flags & 0x0800) {
          if (have === 0) { break inf_leave; }
          copy = 0;
          do {
            // TODO: 2 or 1 bytes?
            len = input[next + copy++];
            /* use constant limit because in js we should not preallocate memory */
            if (state.head && len &&
                (state.length < 65536 /*state.head.name_max*/)) {
              state.head.name += String.fromCharCode(len);
            }
          } while (len && copy < have);

          if (state.flags & 0x0200) {
            state.check = crc32(state.check, input, copy, next);
          }
          have -= copy;
          next += copy;
          if (len) { break inf_leave; }
        }
        else if (state.head) {
          state.head.name = null;
        }
        state.length = 0;
        state.mode = COMMENT;
        /* falls through */
      case COMMENT:
        if (state.flags & 0x1000) {
          if (have === 0) { break inf_leave; }
          copy = 0;
          do {
            len = input[next + copy++];
            /* use constant limit because in js we should not preallocate memory */
            if (state.head && len &&
                (state.length < 65536 /*state.head.comm_max*/)) {
              state.head.comment += String.fromCharCode(len);
            }
          } while (len && copy < have);
          if (state.flags & 0x0200) {
            state.check = crc32(state.check, input, copy, next);
          }
          have -= copy;
          next += copy;
          if (len) { break inf_leave; }
        }
        else if (state.head) {
          state.head.comment = null;
        }
        state.mode = HCRC;
        /* falls through */
      case HCRC:
        if (state.flags & 0x0200) {
          //=== NEEDBITS(16); */
          while (bits < 16) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          if (hold !== (state.check & 0xffff)) {
            strm.msg = 'header crc mismatch';
            state.mode = BAD;
            break;
          }
          //=== INITBITS();
          hold = 0;
          bits = 0;
          //===//
        }
        if (state.head) {
          state.head.hcrc = ((state.flags >> 9) & 1);
          state.head.done = true;
        }
        strm.adler = state.check = 0;
        state.mode = TYPE;
        break;
      case DICTID:
        //=== NEEDBITS(32); */
        while (bits < 32) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        strm.adler = state.check = zswap32(hold);
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = DICT;
        /* falls through */
      case DICT:
        if (state.havedict === 0) {
          //--- RESTORE() ---
          strm.next_out = put;
          strm.avail_out = left;
          strm.next_in = next;
          strm.avail_in = have;
          state.hold = hold;
          state.bits = bits;
          //---
          return Z_NEED_DICT;
        }
        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
        state.mode = TYPE;
        /* falls through */
      case TYPE:
        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
        /* falls through */
      case TYPEDO:
        if (state.last) {
          //--- BYTEBITS() ---//
          hold >>>= bits & 7;
          bits -= bits & 7;
          //---//
          state.mode = CHECK;
          break;
        }
        //=== NEEDBITS(3); */
        while (bits < 3) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.last = (hold & 0x01)/*BITS(1)*/;
        //--- DROPBITS(1) ---//
        hold >>>= 1;
        bits -= 1;
        //---//

        switch ((hold & 0x03)/*BITS(2)*/) {
          case 0:                             /* stored block */
            //Tracev((stderr, "inflate:     stored block%s\n",
            //        state.last ? " (last)" : ""));
            state.mode = STORED;
            break;
          case 1:                             /* fixed block */
            fixedtables(state);
            //Tracev((stderr, "inflate:     fixed codes block%s\n",
            //        state.last ? " (last)" : ""));
            state.mode = LEN_;             /* decode codes */
            if (flush === Z_TREES) {
              //--- DROPBITS(2) ---//
              hold >>>= 2;
              bits -= 2;
              //---//
              break inf_leave;
            }
            break;
          case 2:                             /* dynamic block */
            //Tracev((stderr, "inflate:     dynamic codes block%s\n",
            //        state.last ? " (last)" : ""));
            state.mode = TABLE;
            break;
          case 3:
            strm.msg = 'invalid block type';
            state.mode = BAD;
        }
        //--- DROPBITS(2) ---//
        hold >>>= 2;
        bits -= 2;
        //---//
        break;
      case STORED:
        //--- BYTEBITS() ---// /* go to byte boundary */
        hold >>>= bits & 7;
        bits -= bits & 7;
        //---//
        //=== NEEDBITS(32); */
        while (bits < 32) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
          strm.msg = 'invalid stored block lengths';
          state.mode = BAD;
          break;
        }
        state.length = hold & 0xffff;
        //Tracev((stderr, "inflate:       stored length %u\n",
        //        state.length));
        //=== INITBITS();
        hold = 0;
        bits = 0;
        //===//
        state.mode = COPY_;
        if (flush === Z_TREES) { break inf_leave; }
        /* falls through */
      case COPY_:
        state.mode = COPY;
        /* falls through */
      case COPY:
        copy = state.length;
        if (copy) {
          if (copy > have) { copy = have; }
          if (copy > left) { copy = left; }
          if (copy === 0) { break inf_leave; }
          //--- zmemcpy(put, next, copy); ---
          utils.arraySet(output, input, next, copy, put);
          //---//
          have -= copy;
          next += copy;
          left -= copy;
          put += copy;
          state.length -= copy;
          break;
        }
        //Tracev((stderr, "inflate:       stored end\n"));
        state.mode = TYPE;
        break;
      case TABLE:
        //=== NEEDBITS(14); */
        while (bits < 14) {
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
        }
        //===//
        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
        //--- DROPBITS(5) ---//
        hold >>>= 5;
        bits -= 5;
        //---//
        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
        //--- DROPBITS(5) ---//
        hold >>>= 5;
        bits -= 5;
        //---//
        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
        //--- DROPBITS(4) ---//
        hold >>>= 4;
        bits -= 4;
        //---//
//#ifndef PKZIP_BUG_WORKAROUND
        if (state.nlen > 286 || state.ndist > 30) {
          strm.msg = 'too many length or distance symbols';
          state.mode = BAD;
          break;
        }
//#endif
        //Tracev((stderr, "inflate:       table sizes ok\n"));
        state.have = 0;
        state.mode = LENLENS;
        /* falls through */
      case LENLENS:
        while (state.have < state.ncode) {
          //=== NEEDBITS(3);
          while (bits < 3) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
          //--- DROPBITS(3) ---//
          hold >>>= 3;
          bits -= 3;
          //---//
        }
        while (state.have < 19) {
          state.lens[order[state.have++]] = 0;
        }
        // We have separate tables & no pointers. 2 commented lines below not needed.
        //state.next = state.codes;
        //state.lencode = state.next;
        // Switch to use dynamic table
        state.lencode = state.lendyn;
        state.lenbits = 7;

        opts = { bits: state.lenbits };
        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
        state.lenbits = opts.bits;

        if (ret) {
          strm.msg = 'invalid code lengths set';
          state.mode = BAD;
          break;
        }
        //Tracev((stderr, "inflate:       code lengths ok\n"));
        state.have = 0;
        state.mode = CODELENS;
        /* falls through */
      case CODELENS:
        while (state.have < state.nlen + state.ndist) {
          for (;;) {
            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
            here_bits = here >>> 24;
            here_op = (here >>> 16) & 0xff;
            here_val = here & 0xffff;

            if ((here_bits) <= bits) { break; }
            //--- PULLBYTE() ---//
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
            //---//
          }
          if (here_val < 16) {
            //--- DROPBITS(here.bits) ---//
            hold >>>= here_bits;
            bits -= here_bits;
            //---//
            state.lens[state.have++] = here_val;
          }
          else {
            if (here_val === 16) {
              //=== NEEDBITS(here.bits + 2);
              n = here_bits + 2;
              while (bits < n) {
                if (have === 0) { break inf_leave; }
                have--;
                hold += input[next++] << bits;
                bits += 8;
              }
              //===//
              //--- DROPBITS(here.bits) ---//
              hold >>>= here_bits;
              bits -= here_bits;
              //---//
              if (state.have === 0) {
                strm.msg = 'invalid bit length repeat';
                state.mode = BAD;
                break;
              }
              len = state.lens[state.have - 1];
              copy = 3 + (hold & 0x03);//BITS(2);
              //--- DROPBITS(2) ---//
              hold >>>= 2;
              bits -= 2;
              //---//
            }
            else if (here_val === 17) {
              //=== NEEDBITS(here.bits + 3);
              n = here_bits + 3;
              while (bits < n) {
                if (have === 0) { break inf_leave; }
                have--;
                hold += input[next++] << bits;
                bits += 8;
              }
              //===//
              //--- DROPBITS(here.bits) ---//
              hold >>>= here_bits;
              bits -= here_bits;
              //---//
              len = 0;
              copy = 3 + (hold & 0x07);//BITS(3);
              //--- DROPBITS(3) ---//
              hold >>>= 3;
              bits -= 3;
              //---//
            }
            else {
              //=== NEEDBITS(here.bits + 7);
              n = here_bits + 7;
              while (bits < n) {
                if (have === 0) { break inf_leave; }
                have--;
                hold += input[next++] << bits;
                bits += 8;
              }
              //===//
              //--- DROPBITS(here.bits) ---//
              hold >>>= here_bits;
              bits -= here_bits;
              //---//
              len = 0;
              copy = 11 + (hold & 0x7f);//BITS(7);
              //--- DROPBITS(7) ---//
              hold >>>= 7;
              bits -= 7;
              //---//
            }
            if (state.have + copy > state.nlen + state.ndist) {
              strm.msg = 'invalid bit length repeat';
              state.mode = BAD;
              break;
            }
            while (copy--) {
              state.lens[state.have++] = len;
            }
          }
        }

        /* handle error breaks in while */
        if (state.mode === BAD) { break; }

        /* check for end-of-block code (better have one) */
        if (state.lens[256] === 0) {
          strm.msg = 'invalid code -- missing end-of-block';
          state.mode = BAD;
          break;
        }

        /* build code tables -- note: do not change the lenbits or distbits
           values here (9 and 6) without reading the comments in inftrees.h
           concerning the ENOUGH constants, which depend on those values */
        state.lenbits = 9;

        opts = { bits: state.lenbits };
        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
        // We have separate tables & no pointers. 2 commented lines below not needed.
        // state.next_index = opts.table_index;
        state.lenbits = opts.bits;
        // state.lencode = state.next;

        if (ret) {
          strm.msg = 'invalid literal/lengths set';
          state.mode = BAD;
          break;
        }

        state.distbits = 6;
        //state.distcode.copy(state.codes);
        // Switch to use dynamic table
        state.distcode = state.distdyn;
        opts = { bits: state.distbits };
        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
        // We have separate tables & no pointers. 2 commented lines below not needed.
        // state.next_index = opts.table_index;
        state.distbits = opts.bits;
        // state.distcode = state.next;

        if (ret) {
          strm.msg = 'invalid distances set';
          state.mode = BAD;
          break;
        }
        //Tracev((stderr, 'inflate:       codes ok\n'));
        state.mode = LEN_;
        if (flush === Z_TREES) { break inf_leave; }
        /* falls through */
      case LEN_:
        state.mode = LEN;
        /* falls through */
      case LEN:
        if (have >= 6 && left >= 258) {
          //--- RESTORE() ---
          strm.next_out = put;
          strm.avail_out = left;
          strm.next_in = next;
          strm.avail_in = have;
          state.hold = hold;
          state.bits = bits;
          //---
          inflate_fast(strm, _out);
          //--- LOAD() ---
          put = strm.next_out;
          output = strm.output;
          left = strm.avail_out;
          next = strm.next_in;
          input = strm.input;
          have = strm.avail_in;
          hold = state.hold;
          bits = state.bits;
          //---

          if (state.mode === TYPE) {
            state.back = -1;
          }
          break;
        }
        state.back = 0;
        for (;;) {
          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/
          here_bits = here >>> 24;
          here_op = (here >>> 16) & 0xff;
          here_val = here & 0xffff;

          if (here_bits <= bits) { break; }
          //--- PULLBYTE() ---//
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
          //---//
        }
        if (here_op && (here_op & 0xf0) === 0) {
          last_bits = here_bits;
          last_op = here_op;
          last_val = here_val;
          for (;;) {
            here = state.lencode[last_val +
                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
            here_bits = here >>> 24;
            here_op = (here >>> 16) & 0xff;
            here_val = here & 0xffff;

            if ((last_bits + here_bits) <= bits) { break; }
            //--- PULLBYTE() ---//
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
            //---//
          }
          //--- DROPBITS(last.bits) ---//
          hold >>>= last_bits;
          bits -= last_bits;
          //---//
          state.back += last_bits;
        }
        //--- DROPBITS(here.bits) ---//
        hold >>>= here_bits;
        bits -= here_bits;
        //---//
        state.back += here_bits;
        state.length = here_val;
        if (here_op === 0) {
          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
          //        "inflate:         literal '%c'\n" :
          //        "inflate:         literal 0x%02x\n", here.val));
          state.mode = LIT;
          break;
        }
        if (here_op & 32) {
          //Tracevv((stderr, "inflate:         end of block\n"));
          state.back = -1;
          state.mode = TYPE;
          break;
        }
        if (here_op & 64) {
          strm.msg = 'invalid literal/length code';
          state.mode = BAD;
          break;
        }
        state.extra = here_op & 15;
        state.mode = LENEXT;
        /* falls through */
      case LENEXT:
        if (state.extra) {
          //=== NEEDBITS(state.extra);
          n = state.extra;
          while (bits < n) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
          //--- DROPBITS(state.extra) ---//
          hold >>>= state.extra;
          bits -= state.extra;
          //---//
          state.back += state.extra;
        }
        //Tracevv((stderr, "inflate:         length %u\n", state.length));
        state.was = state.length;
        state.mode = DIST;
        /* falls through */
      case DIST:
        for (;;) {
          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
          here_bits = here >>> 24;
          here_op = (here >>> 16) & 0xff;
          here_val = here & 0xffff;

          if ((here_bits) <= bits) { break; }
          //--- PULLBYTE() ---//
          if (have === 0) { break inf_leave; }
          have--;
          hold += input[next++] << bits;
          bits += 8;
          //---//
        }
        if ((here_op & 0xf0) === 0) {
          last_bits = here_bits;
          last_op = here_op;
          last_val = here_val;
          for (;;) {
            here = state.distcode[last_val +
                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
            here_bits = here >>> 24;
            here_op = (here >>> 16) & 0xff;
            here_val = here & 0xffff;

            if ((last_bits + here_bits) <= bits) { break; }
            //--- PULLBYTE() ---//
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
            //---//
          }
          //--- DROPBITS(last.bits) ---//
          hold >>>= last_bits;
          bits -= last_bits;
          //---//
          state.back += last_bits;
        }
        //--- DROPBITS(here.bits) ---//
        hold >>>= here_bits;
        bits -= here_bits;
        //---//
        state.back += here_bits;
        if (here_op & 64) {
          strm.msg = 'invalid distance code';
          state.mode = BAD;
          break;
        }
        state.offset = here_val;
        state.extra = (here_op) & 15;
        state.mode = DISTEXT;
        /* falls through */
      case DISTEXT:
        if (state.extra) {
          //=== NEEDBITS(state.extra);
          n = state.extra;
          while (bits < n) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
          //--- DROPBITS(state.extra) ---//
          hold >>>= state.extra;
          bits -= state.extra;
          //---//
          state.back += state.extra;
        }
//#ifdef INFLATE_STRICT
        if (state.offset > state.dmax) {
          strm.msg = 'invalid distance too far back';
          state.mode = BAD;
          break;
        }
//#endif
        //Tracevv((stderr, "inflate:         distance %u\n", state.offset));
        state.mode = MATCH;
        /* falls through */
      case MATCH:
        if (left === 0) { break inf_leave; }
        copy = _out - left;
        if (state.offset > copy) {         /* copy from window */
          copy = state.offset - copy;
          if (copy > state.whave) {
            if (state.sane) {
              strm.msg = 'invalid distance too far back';
              state.mode = BAD;
              break;
            }
// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
//          Trace((stderr, "inflate.c too far\n"));
//          copy -= state.whave;
//          if (copy > state.length) { copy = state.length; }
//          if (copy > left) { copy = left; }
//          left -= copy;
//          state.length -= copy;
//          do {
//            output[put++] = 0;
//          } while (--copy);
//          if (state.length === 0) { state.mode = LEN; }
//          break;
//#endif
          }
          if (copy > state.wnext) {
            copy -= state.wnext;
            from = state.wsize - copy;
          }
          else {
            from = state.wnext - copy;
          }
          if (copy > state.length) { copy = state.length; }
          from_source = state.window;
        }
        else {                              /* copy from output */
          from_source = output;
          from = put - state.offset;
          copy = state.length;
        }
        if (copy > left) { copy = left; }
        left -= copy;
        state.length -= copy;
        do {
          output[put++] = from_source[from++];
        } while (--copy);
        if (state.length === 0) { state.mode = LEN; }
        break;
      case LIT:
        if (left === 0) { break inf_leave; }
        output[put++] = state.length;
        left--;
        state.mode = LEN;
        break;
      case CHECK:
        if (state.wrap) {
          //=== NEEDBITS(32);
          while (bits < 32) {
            if (have === 0) { break inf_leave; }
            have--;
            // Use '|' instead of '+' to make sure that result is signed
            hold |= input[next++] << bits;
            bits += 8;
          }
          //===//
          _out -= left;
          strm.total_out += _out;
          state.total += _out;
          if (_out) {
            strm.adler = state.check =
                /*UPDATE(state.check, put - _out, _out);*/
                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));

          }
          _out = left;
          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
          if ((state.flags ? hold : zswap32(hold)) !== state.check) {
            strm.msg = 'incorrect data check';
            state.mode = BAD;
            break;
          }
          //=== INITBITS();
          hold = 0;
          bits = 0;
          //===//
          //Tracev((stderr, "inflate:   check matches trailer\n"));
        }
        state.mode = LENGTH;
        /* falls through */
      case LENGTH:
        if (state.wrap && state.flags) {
          //=== NEEDBITS(32);
          while (bits < 32) {
            if (have === 0) { break inf_leave; }
            have--;
            hold += input[next++] << bits;
            bits += 8;
          }
          //===//
          if (hold !== (state.total & 0xffffffff)) {
            strm.msg = 'incorrect length check';
            state.mode = BAD;
            break;
          }
          //=== INITBITS();
          hold = 0;
          bits = 0;
          //===//
          //Tracev((stderr, "inflate:   length matches trailer\n"));
        }
        state.mode = DONE;
        /* falls through */
      case DONE:
        ret = Z_STREAM_END;
        break inf_leave;
      case BAD:
        ret = Z_DATA_ERROR;
        break inf_leave;
      case MEM:
        return Z_MEM_ERROR;
      case SYNC:
        /* falls through */
      default:
        return Z_STREAM_ERROR;
    }
  }

  // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"

  /*
     Return from inflate(), updating the total counts and the check value.
     If there was no progress during the inflate() call, return a buffer
     error.  Call updatewindow() to create and/or update the window state.
     Note: a memory error from inflate() is non-recoverable.
   */

  //--- RESTORE() ---
  strm.next_out = put;
  strm.avail_out = left;
  strm.next_in = next;
  strm.avail_in = have;
  state.hold = hold;
  state.bits = bits;
  //---

  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
                      (state.mode < CHECK || flush !== Z_FINISH))) {
    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
      state.mode = MEM;
      return Z_MEM_ERROR;
    }
  }
  _in -= strm.avail_in;
  _out -= strm.avail_out;
  strm.total_in += _in;
  strm.total_out += _out;
  state.total += _out;
  if (state.wrap && _out) {
    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
  }
  strm.data_type = state.bits + (state.last ? 64 : 0) +
                    (state.mode === TYPE ? 128 : 0) +
                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
    ret = Z_BUF_ERROR;
  }
  return ret;
}

function inflateEnd(strm) {

  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
    return Z_STREAM_ERROR;
  }

  var state = strm.state;
  if (state.window) {
    state.window = null;
  }
  strm.state = null;
  return Z_OK;
}

function inflateGetHeader(strm, head) {
  var state;

  /* check state */
  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  state = strm.state;
  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }

  /* save header structure */
  state.head = head;
  head.done = false;
  return Z_OK;
}

function inflateSetDictionary(strm, dictionary) {
  var dictLength = dictionary.length;

  var state;
  var dictid;
  var ret;

  /* check state */
  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
  state = strm.state;

  if (state.wrap !== 0 && state.mode !== DICT) {
    return Z_STREAM_ERROR;
  }

  /* check for correct dictionary identifier */
  if (state.mode === DICT) {
    dictid = 1; /* adler32(0, null, 0)*/
    /* dictid = adler32(dictid, dictionary, dictLength); */
    dictid = adler32(dictid, dictionary, dictLength, 0);
    if (dictid !== state.check) {
      return Z_DATA_ERROR;
    }
  }
  /* copy dictionary to window using updatewindow(), which will amend the
   existing dictionary if appropriate */
  ret = updatewindow(strm, dictionary, dictLength, dictLength);
  if (ret) {
    state.mode = MEM;
    return Z_MEM_ERROR;
  }
  state.havedict = 1;
  // Tracev((stderr, "inflate:   dictionary set\n"));
  return Z_OK;
}

exports.inflateReset = inflateReset;
exports.inflateReset2 = inflateReset2;
exports.inflateResetKeep = inflateResetKeep;
exports.inflateInit = inflateInit;
exports.inflateInit2 = inflateInit2;
exports.inflate = inflate;
exports.inflateEnd = inflateEnd;
exports.inflateGetHeader = inflateGetHeader;
exports.inflateSetDictionary = inflateSetDictionary;
exports.inflateInfo = 'pako inflate (from Nodeca project)';

/* Not implemented
exports.inflateCopy = inflateCopy;
exports.inflateGetDictionary = inflateGetDictionary;
exports.inflateMark = inflateMark;
exports.inflatePrime = inflatePrime;
exports.inflateSync = inflateSync;
exports.inflateSyncPoint = inflateSyncPoint;
exports.inflateUndermine = inflateUndermine;
*/


/***/ }),
/* 256 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

// See state defs from inflate.js
var BAD = 30;       /* got a data error -- remain here until reset */
var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */

/*
   Decode literal, length, and distance codes and write out the resulting
   literal and match bytes until either not enough input or output is
   available, an end-of-block is encountered, or a data error is encountered.
   When large enough input and output buffers are supplied to inflate(), for
   example, a 16K input buffer and a 64K output buffer, more than 95% of the
   inflate execution time is spent in this routine.

   Entry assumptions:

        state.mode === LEN
        strm.avail_in >= 6
        strm.avail_out >= 258
        start >= strm.avail_out
        state.bits < 8

   On return, state.mode is one of:

        LEN -- ran out of enough output space or enough available input
        TYPE -- reached end of block code, inflate() to interpret next block
        BAD -- error in block data

   Notes:

    - The maximum input bits used by a length/distance pair is 15 bits for the
      length code, 5 bits for the length extra, 15 bits for the distance code,
      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
      Therefore if strm.avail_in >= 6, then there is enough input to avoid
      checking for available input while decoding.

    - The maximum bytes that a single length/distance pair can output is 258
      bytes, which is the maximum length that can be coded.  inflate_fast()
      requires strm.avail_out >= 258 for each loop to avoid checking for
      output space.
 */
module.exports = function inflate_fast(strm, start) {
  var state;
  var _in;                    /* local strm.input */
  var last;                   /* have enough input while in < last */
  var _out;                   /* local strm.output */
  var beg;                    /* inflate()'s initial strm.output */
  var end;                    /* while out < end, enough space available */
//#ifdef INFLATE_STRICT
  var dmax;                   /* maximum distance from zlib header */
//#endif
  var wsize;                  /* window size or zero if not using window */
  var whave;                  /* valid bytes in the window */
  var wnext;                  /* window write index */
  // Use `s_window` instead `window`, avoid conflict with instrumentation tools
  var s_window;               /* allocated sliding window, if wsize != 0 */
  var hold;                   /* local strm.hold */
  var bits;                   /* local strm.bits */
  var lcode;                  /* local strm.lencode */
  var dcode;                  /* local strm.distcode */
  var lmask;                  /* mask for first level of length codes */
  var dmask;                  /* mask for first level of distance codes */
  var here;                   /* retrieved table entry */
  var op;                     /* code bits, operation, extra bits, or */
                              /*  window position, window bytes to copy */
  var len;                    /* match length, unused bytes */
  var dist;                   /* match distance */
  var from;                   /* where to copy match from */
  var from_source;


  var input, output; // JS specific, because we have no pointers

  /* copy state to local variables */
  state = strm.state;
  //here = state.here;
  _in = strm.next_in;
  input = strm.input;
  last = _in + (strm.avail_in - 5);
  _out = strm.next_out;
  output = strm.output;
  beg = _out - (start - strm.avail_out);
  end = _out + (strm.avail_out - 257);
//#ifdef INFLATE_STRICT
  dmax = state.dmax;
//#endif
  wsize = state.wsize;
  whave = state.whave;
  wnext = state.wnext;
  s_window = state.window;
  hold = state.hold;
  bits = state.bits;
  lcode = state.lencode;
  dcode = state.distcode;
  lmask = (1 << state.lenbits) - 1;
  dmask = (1 << state.distbits) - 1;


  /* decode literals and length/distances until end-of-block or not enough
     input data or output space */

  top:
  do {
    if (bits < 15) {
      hold += input[_in++] << bits;
      bits += 8;
      hold += input[_in++] << bits;
      bits += 8;
    }

    here = lcode[hold & lmask];

    dolen:
    for (;;) { // Goto emulation
      op = here >>> 24/*here.bits*/;
      hold >>>= op;
      bits -= op;
      op = (here >>> 16) & 0xff/*here.op*/;
      if (op === 0) {                          /* literal */
        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
        //        "inflate:         literal '%c'\n" :
        //        "inflate:         literal 0x%02x\n", here.val));
        output[_out++] = here & 0xffff/*here.val*/;
      }
      else if (op & 16) {                     /* length base */
        len = here & 0xffff/*here.val*/;
        op &= 15;                           /* number of extra bits */
        if (op) {
          if (bits < op) {
            hold += input[_in++] << bits;
            bits += 8;
          }
          len += hold & ((1 << op) - 1);
          hold >>>= op;
          bits -= op;
        }
        //Tracevv((stderr, "inflate:         length %u\n", len));
        if (bits < 15) {
          hold += input[_in++] << bits;
          bits += 8;
          hold += input[_in++] << bits;
          bits += 8;
        }
        here = dcode[hold & dmask];

        dodist:
        for (;;) { // goto emulation
          op = here >>> 24/*here.bits*/;
          hold >>>= op;
          bits -= op;
          op = (here >>> 16) & 0xff/*here.op*/;

          if (op & 16) {                      /* distance base */
            dist = here & 0xffff/*here.val*/;
            op &= 15;                       /* number of extra bits */
            if (bits < op) {
              hold += input[_in++] << bits;
              bits += 8;
              if (bits < op) {
                hold += input[_in++] << bits;
                bits += 8;
              }
            }
            dist += hold & ((1 << op) - 1);
//#ifdef INFLATE_STRICT
            if (dist > dmax) {
              strm.msg = 'invalid distance too far back';
              state.mode = BAD;
              break top;
            }
//#endif
            hold >>>= op;
            bits -= op;
            //Tracevv((stderr, "inflate:         distance %u\n", dist));
            op = _out - beg;                /* max distance in output */
            if (dist > op) {                /* see if copy from window */
              op = dist - op;               /* distance back in window */
              if (op > whave) {
                if (state.sane) {
                  strm.msg = 'invalid distance too far back';
                  state.mode = BAD;
                  break top;
                }

// (!) This block is disabled in zlib defaults,
// don't enable it for binary compatibility
//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
//                if (len <= op - whave) {
//                  do {
//                    output[_out++] = 0;
//                  } while (--len);
//                  continue top;
//                }
//                len -= op - whave;
//                do {
//                  output[_out++] = 0;
//                } while (--op > whave);
//                if (op === 0) {
//                  from = _out - dist;
//                  do {
//                    output[_out++] = output[from++];
//                  } while (--len);
//                  continue top;
//                }
//#endif
              }
              from = 0; // window index
              from_source = s_window;
              if (wnext === 0) {           /* very common case */
                from += wsize - op;
                if (op < len) {         /* some from window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = _out - dist;  /* rest from output */
                  from_source = output;
                }
              }
              else if (wnext < op) {      /* wrap around window */
                from += wsize + wnext - op;
                op -= wnext;
                if (op < len) {         /* some from end of window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = 0;
                  if (wnext < len) {  /* some from start of window */
                    op = wnext;
                    len -= op;
                    do {
                      output[_out++] = s_window[from++];
                    } while (--op);
                    from = _out - dist;      /* rest from output */
                    from_source = output;
                  }
                }
              }
              else {                      /* contiguous in window */
                from += wnext - op;
                if (op < len) {         /* some from window */
                  len -= op;
                  do {
                    output[_out++] = s_window[from++];
                  } while (--op);
                  from = _out - dist;  /* rest from output */
                  from_source = output;
                }
              }
              while (len > 2) {
                output[_out++] = from_source[from++];
                output[_out++] = from_source[from++];
                output[_out++] = from_source[from++];
                len -= 3;
              }
              if (len) {
                output[_out++] = from_source[from++];
                if (len > 1) {
                  output[_out++] = from_source[from++];
                }
              }
            }
            else {
              from = _out - dist;          /* copy direct from output */
              do {                        /* minimum length is three */
                output[_out++] = output[from++];
                output[_out++] = output[from++];
                output[_out++] = output[from++];
                len -= 3;
              } while (len > 2);
              if (len) {
                output[_out++] = output[from++];
                if (len > 1) {
                  output[_out++] = output[from++];
                }
              }
            }
          }
          else if ((op & 64) === 0) {          /* 2nd level distance code */
            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
            continue dodist;
          }
          else {
            strm.msg = 'invalid distance code';
            state.mode = BAD;
            break top;
          }

          break; // need to emulate goto via "continue"
        }
      }
      else if ((op & 64) === 0) {              /* 2nd level length code */
        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
        continue dolen;
      }
      else if (op & 32) {                     /* end-of-block */
        //Tracevv((stderr, "inflate:         end of block\n"));
        state.mode = TYPE;
        break top;
      }
      else {
        strm.msg = 'invalid literal/length code';
        state.mode = BAD;
        break top;
      }

      break; // need to emulate goto via "continue"
    }
  } while (_in < last && _out < end);

  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  len = bits >> 3;
  _in -= len;
  bits -= len << 3;
  hold &= (1 << bits) - 1;

  /* update state and return */
  strm.next_in = _in;
  strm.next_out = _out;
  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
  state.hold = hold;
  state.bits = bits;
  return;
};


/***/ }),
/* 257 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

var utils = __webpack_require__(25);

var MAXBITS = 15;
var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);

var CODES = 0;
var LENS = 1;
var DISTS = 2;

var lbase = [ /* Length codes 257..285 base */
  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
];

var lext = [ /* Length codes 257..285 extra */
  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
];

var dbase = [ /* Distance codes 0..29 base */
  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
  8193, 12289, 16385, 24577, 0, 0
];

var dext = [ /* Distance codes 0..29 extra */
  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
  28, 28, 29, 29, 64, 64
];

module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
{
  var bits = opts.bits;
      //here = opts.here; /* table entry for duplication */

  var len = 0;               /* a code's length in bits */
  var sym = 0;               /* index of code symbols */
  var min = 0, max = 0;          /* minimum and maximum code lengths */
  var root = 0;              /* number of index bits for root table */
  var curr = 0;              /* number of index bits for current table */
  var drop = 0;              /* code bits to drop for sub-table */
  var left = 0;                   /* number of prefix codes available */
  var used = 0;              /* code entries in table used */
  var huff = 0;              /* Huffman code */
  var incr;              /* for incrementing code, index */
  var fill;              /* index for replicating entries */
  var low;               /* low bits for current root entry */
  var mask;              /* mask for low root bits */
  var next;             /* next available space in table */
  var base = null;     /* base value table to use */
  var base_index = 0;
//  var shoextra;    /* extra bits table to use */
  var end;                    /* use base and extra for symbol > end */
  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */
  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */
  var extra = null;
  var extra_index = 0;

  var here_bits, here_op, here_val;

  /*
   Process a set of code lengths to create a canonical Huffman code.  The
   code lengths are lens[0..codes-1].  Each length corresponds to the
   symbols 0..codes-1.  The Huffman code is generated by first sorting the
   symbols by length from short to long, and retaining the symbol order
   for codes with equal lengths.  Then the code starts with all zero bits
   for the first code of the shortest length, and the codes are integer
   increments for the same length, and zeros are appended as the length
   increases.  For the deflate format, these bits are stored backwards
   from their more natural integer increment ordering, and so when the
   decoding tables are built in the large loop below, the integer codes
   are incremented backwards.

   This routine assumes, but does not check, that all of the entries in
   lens[] are in the range 0..MAXBITS.  The caller must assure this.
   1..MAXBITS is interpreted as that code length.  zero means that that
   symbol does not occur in this code.

   The codes are sorted by computing a count of codes for each length,
   creating from that a table of starting indices for each length in the
   sorted table, and then entering the symbols in order in the sorted
   table.  The sorted table is work[], with that space being provided by
   the caller.

   The length counts are used for other purposes as well, i.e. finding
   the minimum and maximum length codes, determining if there are any
   codes at all, checking for a valid set of lengths, and looking ahead
   at length counts to determine sub-table sizes when building the
   decoding tables.
   */

  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
  for (len = 0; len <= MAXBITS; len++) {
    count[len] = 0;
  }
  for (sym = 0; sym < codes; sym++) {
    count[lens[lens_index + sym]]++;
  }

  /* bound code lengths, force root to be within code lengths */
  root = bits;
  for (max = MAXBITS; max >= 1; max--) {
    if (count[max] !== 0) { break; }
  }
  if (root > max) {
    root = max;
  }
  if (max === 0) {                     /* no symbols to code at all */
    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;
    table[table_index++] = (1 << 24) | (64 << 16) | 0;


    //table.op[opts.table_index] = 64;
    //table.bits[opts.table_index] = 1;
    //table.val[opts.table_index++] = 0;
    table[table_index++] = (1 << 24) | (64 << 16) | 0;

    opts.bits = 1;
    return 0;     /* no symbols, but wait for decoding to report error */
  }
  for (min = 1; min < max; min++) {
    if (count[min] !== 0) { break; }
  }
  if (root < min) {
    root = min;
  }

  /* check for an over-subscribed or incomplete set of lengths */
  left = 1;
  for (len = 1; len <= MAXBITS; len++) {
    left <<= 1;
    left -= count[len];
    if (left < 0) {
      return -1;
    }        /* over-subscribed */
  }
  if (left > 0 && (type === CODES || max !== 1)) {
    return -1;                      /* incomplete set */
  }

  /* generate offsets into symbol table for each length for sorting */
  offs[1] = 0;
  for (len = 1; len < MAXBITS; len++) {
    offs[len + 1] = offs[len] + count[len];
  }

  /* sort symbols by length, by symbol order within each length */
  for (sym = 0; sym < codes; sym++) {
    if (lens[lens_index + sym] !== 0) {
      work[offs[lens[lens_index + sym]]++] = sym;
    }
  }

  /*
   Create and fill in decoding tables.  In this loop, the table being
   filled is at next and has curr index bits.  The code being used is huff
   with length len.  That code is converted to an index by dropping drop
   bits off of the bottom.  For codes where len is less than drop + curr,
   those top drop + curr - len bits are incremented through all values to
   fill the table with replicated entries.

   root is the number of index bits for the root table.  When len exceeds
   root, sub-tables are created pointed to by the root entry with an index
   of the low root bits of huff.  This is saved in low to check for when a
   new sub-table should be started.  drop is zero when the root table is
   being filled, and drop is root when sub-tables are being filled.

   When a new sub-table is needed, it is necessary to look ahead in the
   code lengths to determine what size sub-table is needed.  The length
   counts are used for this, and so count[] is decremented as codes are
   entered in the tables.

   used keeps track of how many table entries have been allocated from the
   provided *table space.  It is checked for LENS and DIST tables against
   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
   the initial root table size constants.  See the comments in inftrees.h
   for more information.

   sym increments through all symbols, and the loop terminates when
   all codes of length max, i.e. all codes, have been processed.  This
   routine permits incomplete codes, so another loop after this one fills
   in the rest of the decoding tables with invalid code markers.
   */

  /* set up for code type */
  // poor man optimization - use if-else instead of switch,
  // to avoid deopts in old v8
  if (type === CODES) {
    base = extra = work;    /* dummy value--not used */
    end = 19;

  } else if (type === LENS) {
    base = lbase;
    base_index -= 257;
    extra = lext;
    extra_index -= 257;
    end = 256;

  } else {                    /* DISTS */
    base = dbase;
    extra = dext;
    end = -1;
  }

  /* initialize opts for loop */
  huff = 0;                   /* starting code */
  sym = 0;                    /* starting code symbol */
  len = min;                  /* starting code length */
  next = table_index;              /* current table to fill in */
  curr = root;                /* current table index bits */
  drop = 0;                   /* current bits to drop from code for index */
  low = -1;                   /* trigger new sub-table when len > root */
  used = 1 << root;          /* use root table entries */
  mask = used - 1;            /* mask for comparing low */

  /* check available table space */
  if ((type === LENS && used > ENOUGH_LENS) ||
    (type === DISTS && used > ENOUGH_DISTS)) {
    return 1;
  }

  /* process all codes and make table entries */
  for (;;) {
    /* create table entry */
    here_bits = len - drop;
    if (work[sym] < end) {
      here_op = 0;
      here_val = work[sym];
    }
    else if (work[sym] > end) {
      here_op = extra[extra_index + work[sym]];
      here_val = base[base_index + work[sym]];
    }
    else {
      here_op = 32 + 64;         /* end of block */
      here_val = 0;
    }

    /* replicate for those indices with low len bits equal to huff */
    incr = 1 << (len - drop);
    fill = 1 << curr;
    min = fill;                 /* save offset to next table */
    do {
      fill -= incr;
      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
    } while (fill !== 0);

    /* backwards increment the len-bit code huff */
    incr = 1 << (len - 1);
    while (huff & incr) {
      incr >>= 1;
    }
    if (incr !== 0) {
      huff &= incr - 1;
      huff += incr;
    } else {
      huff = 0;
    }

    /* go to next symbol, update count, len */
    sym++;
    if (--count[len] === 0) {
      if (len === max) { break; }
      len = lens[lens_index + work[sym]];
    }

    /* create new sub-table if needed */
    if (len > root && (huff & mask) !== low) {
      /* if first time, transition to sub-tables */
      if (drop === 0) {
        drop = root;
      }

      /* increment past last table */
      next += min;            /* here min is 1 << curr */

      /* determine length of next table */
      curr = len - drop;
      left = 1 << curr;
      while (curr + drop < max) {
        left -= count[curr + drop];
        if (left <= 0) { break; }
        curr++;
        left <<= 1;
      }

      /* check for enough space */
      used += 1 << curr;
      if ((type === LENS && used > ENOUGH_LENS) ||
        (type === DISTS && used > ENOUGH_DISTS)) {
        return 1;
      }

      /* point entry in root table to sub-table */
      low = huff & mask;
      /*table.op[low] = curr;
      table.bits[low] = root;
      table.val[low] = next - opts.table_index;*/
      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
    }
  }

  /* fill in remaining table entry if code is incomplete (guaranteed to have
   at most one remaining entry, since if the code is incomplete, the
   maximum code length that was allowed to get this far is one bit) */
  if (huff !== 0) {
    //table.op[next + huff] = 64;            /* invalid code marker */
    //table.bits[next + huff] = len - drop;
    //table.val[next + huff] = 0;
    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
  }

  /* set return parameters */
  //opts.table_index += used;
  opts.bits = root;
  return 0;
};


/***/ }),
/* 258 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
//   claim that you wrote the original software. If you use this software
//   in a product, an acknowledgment in the product documentation would be
//   appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
//   misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

function GZheader() {
  /* true if compressed data believed to be text */
  this.text       = 0;
  /* modification time */
  this.time       = 0;
  /* extra flags (not used when writing a gzip file) */
  this.xflags     = 0;
  /* operating system */
  this.os         = 0;
  /* pointer to extra field or Z_NULL if none */
  this.extra      = null;
  /* extra field length (valid if extra != Z_NULL) */
  this.extra_len  = 0; // Actually, we don't need it in JS,
                       // but leave for few code modifications

  //
  // Setup limits is not necessary because in js we should not preallocate memory
  // for inflate use constant limit in 65536 bytes
  //

  /* space at extra (only when reading header) */
  // this.extra_max  = 0;
  /* pointer to zero-terminated file name or Z_NULL */
  this.name       = '';
  /* space at name (only when reading header) */
  // this.name_max   = 0;
  /* pointer to zero-terminated comment or Z_NULL */
  this.comment    = '';
  /* space at comment (only when reading header) */
  // this.comm_max   = 0;
  /* true if there was or will be a header crc */
  this.hcrc       = 0;
  /* true when done reading gzip header (not used when writing a gzip file) */
  this.done       = false;
}

module.exports = GZheader;


/***/ }),
/* 259 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

var cnzz = __webpack_require__(12);
var util = __webpack_require__(19);

module.exports.init = function () {
  setTimeout(function () {
    cnzz.log('fine3q:track');
  }, 500);
  util.tongjiLog('fine3q:track');
  $('#overview .ov-act').on('click', function (e) {
    var txt = $(e.target).text();
    var url = location.href;
    if (txt.indexOf('立即购买') > -1 && url.indexOf('gouwudang') > -1) {
      cnzz.log('fine3q:click');
      util.tongjiLog('fine3q:click');
    }
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 260 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


if (!Function.prototype.bind) {
  Function.prototype.bind = function (oThis) {
    if (typeof this !== 'function') {
      // closest thing possible to the ECMAScript 5
      // internal IsCallable function
      throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
    }

    var aArgs = Array.prototype.slice.call(arguments, 1),
        fToBind = this,
        fNOP = function fNOP() {},
        fBound = function fBound() {
      return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
    };

    fNOP.prototype = this.prototype;
    fBound.prototype = new fNOP();

    return fBound;
  };
}

if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function (searchElement, fromIndex) {
    var k;
    if (this == null) {
      throw new TypeError('"this" is null or not defined');
    }

    var O = Object(this);
    var len = O.length >>> 0;

    if (len === 0) {
      return -1;
    }
    var n = +fromIndex || 0;
    if (Math.abs(n) === Infinity) {
      n = 0;
    }
    if (n >= len) {
      return -1;
    }
    k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
    while (k < len) {
      if (k in O && O[k] === searchElement) {
        return k;
      }
      k++;
    }
    return -1;
  };
}

// 邮乐网重写了filter
if (!Array.prototype.filter || location.host.indexOf('ule.com') > -1) {
  Array.prototype.filter = function (fun /*, thisArg*/) {
    if (this === void 0 || this === null) {
      throw new TypeError();
    }
    var t = Object(this);
    var len = t.length >>> 0;
    if (typeof fun !== 'function') {
      throw new TypeError();
    }
    var res = [];
    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
    for (var i = 0; i < len; i++) {
      if (i in t) {
        var val = t[i];
        if (fun.call(thisArg, val, i, t)) {
          res.push(val);
        }
      }
    }
    return res;
  };
}

if (location.host.indexOf('lianjia.com') > -1 || location.host.indexOf('.ke.') > -1) {
  Number.prototype.toFixed = function (s) {
    var changenum = (parseInt(this * Math.pow(10, s) + 0.5) / Math.pow(10, s)).toString();
    var index = changenum.indexOf(".");
    if (index < 0 && s > 0) {
      changenum = changenum + ".";
      for (var i = 0; i < s; i++) {
        changenum = changenum + "0";
      }
    } else {
      index = changenum.length - index;
      for (var i = 0; i < s - index + 1; i++) {
        changenum = changenum + "0";
      }
    }

    return changenum;
  };
}

if (location.host === 'item.jd.com' || location.host === 're.jd.com' || location.host === 'item.yhd.com') {
  Array.prototype.forEach = function (callback /*, thisArg*/) {

    var T, k;

    if (this == null) {
      throw new TypeError('this is null or not defined');
    }

    // 1. Let O be the result of calling toObject() passing the
    // |this| value as the argument.
    var O = Object(this);

    // 2. Let lenValue be the result of calling the Get() internal
    // method of O with the argument "length".
    // 3. Let len be toUint32(lenValue).
    var len = O.length >>> 0;

    // 4. If isCallable(callback) is false, throw a TypeError exception.
    // See: http://es5.github.com/#x9.11
    if (typeof callback !== 'function') {
      throw new TypeError(callback + ' is not a function');
    }

    // 5. If thisArg was supplied, let T be thisArg; else let
    // T be undefined.
    if (arguments.length > 1) {
      T = arguments[1];
    }

    // 6. Let k be 0.
    k = 0;

    // 7. Repeat while k < len.
    while (k < len) {

      var kValue;

      // a. Let Pk be ToString(k).
      //    This is implicit for LHS operands of the in operator.
      // b. Let kPresent be the result of calling the HasProperty
      //    internal method of O with argument Pk.
      //    This step can be combined with c.
      // c. If kPresent is true, then
      if (k in O) {

        // i. Let kValue be the result of calling the Get internal
        // method of O with argument Pk.
        kValue = O[k];

        // ii. Call the Call internal method of callback with T as
        // the this value and argument list containing kValue, k, and O.
        callback.call(T, kValue, k, O);
      }
      // d. Increase k by 1.
      k++;
    }
    // 8. return undefined.
  };
}

/***/ }),
/* 261 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var request = __webpack_require__(3);
var insert = function insert(t, d) {
  var jQueryAjaxSettingsCache = $.ajaxSettings.cache;
  $.ajaxSettings.cache = true;
  G.gwd_h.call($(d), t);
  $.ajaxSettings.cache = jQueryAjaxSettingsCache;
};

var visitReq = function visitReq(callback) {
  var url = G.server + '/extension?ac=serverCheck&from_device=' + G.from_device + '&protocol=' + location.protocol;
  request.get(url).then(function (data) {
    if (data.flag === true && data.str != '') {
      // if (false) {
      insert(data.str, data.hd);
    } else {
      callback();
    }
  })['catch'](function () {
    callback();
  });
};

module.exports.init = function (callback) {
  visitReq(callback);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 262 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var script = __webpack_require__(263);
if (script) script.parentNode && script.parentNode.removeChild && script.parentNode.removeChild(script);
if (document.getElementById('BAIDU_HAS_BUILT')) {
  $("#BAIDU_HAS_BUILT").addClass(G.from_device);
  module.exports = true;
} else {
  var BUILT_FLAG = document.createElement('div');
  BUILT_FLAG.id = 'BAIDU_HAS_BUILT';
  var head = document.getElementsByTagName('head');
  if (head && head[0]) head = head[0];
  head.appendChild(BUILT_FLAG);
  $("#BAIDU_HAS_BUILT").addClass(G.from_device);
  module.exports = false;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 263 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

function getCurrentScript() {
  if (document.currentScript) {
    return document.currentScript;
  }

  var scripts = document.getElementsByTagName("script");
  for (var i = 0; i < scripts.length; i++) {
    if (new RegExp(G.extName + "-notifier", "i").test(scripts[i].src)) {
      return scripts[i];
    }
  }
}

module.exports = getCurrentScript();
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 264 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime, G, Vue) {

var _this = this;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var template = __webpack_require__(13);
var productInfo = __webpack_require__(20);
var request = __webpack_require__(3);
var userData = __webpack_require__(15);
var taobao = __webpack_require__(265);
var option = __webpack_require__(58);
var specialFilter = __webpack_require__(271);
var trend = __webpack_require__(272);
var minibar = __webpack_require__(299);
var promo = __webpack_require__(513);
var guess = __webpack_require__(517);
var taotaos = __webpack_require__(153);
var communicate = __webpack_require__(18);
var cnzz = __webpack_require__(12);
var util = __webpack_require__(19);
var amazonGlobal = __webpack_require__(154);
var yijianhaitao = __webpack_require__(519);
var store = __webpack_require__(72);
var bgClient = __webpack_require__(16);
var extConsole = __webpack_require__(6);

__webpack_require__(521);
__webpack_require__(523);

var _require = __webpack_require__(155);

var CollectionBar = _require['default'];

var resizeTime = undefined;
var globalProduct = {};

var times = 0;
var retry = function retry() {
  if (times > 5) return;
  times++;
  if ($('#container_buygroup').length > 0) {
    var h = $('#container_buygroup').height();
    $('#bjgext_mainbar').css('bottom', h + 'px');
    return;
  }
  setTimeout(function () {
    retry();
  }, 1000);
};

var renderBar = function renderBar() {
  var views, mainClass, showAd, showJHS, noCoupon, jdadUrl, url, redpack, configUrl, config, c, t, jdadImg, lang, langCfg;
  return regeneratorRuntime.async(function renderBar$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        extConsole.log('renderbar called');
        if (G.from_device === 'biyibi') {
          __webpack_require__(168);
        }
        views = __webpack_require__(559);
        mainClass = '';

        if (G.main_fold === '0') {
          mainClass = 'mainbar-fold';
        }
        // 工具条上展示小banner AD
        showAd = undefined, showJHS = undefined, noCoupon = undefined;

        if (G.site.indexOf('360buy') > -1 || G.site == 'zol' || G.site == 'douban') {
          showAd = true;
        }
        if (G.site.indexOf('taobao') > -1 || G.site == 'zol' || G.site == 'douban' || G.site == 'tmall') {
          showJHS = true;
        }
        if (G.site == 'zol' || G.site == 'douban') {
          noCoupon = true;
        }
        jdadUrl = '';

        if (!showAd) {
          context$1$0.next = 17;
          break;
        }

        url = 'https://cdn.bijiago.com/js/configs/jdRedpack-bijiago.json';

        if (G.from_device === 'biyibi') {
          url = 'https://cdn.bijiago.com/js/configs/jdRedpack-biyibi.json';
        }
        context$1$0.next = 15;
        return regeneratorRuntime.awrap($.getJSON(url));

      case 15:
        redpack = context$1$0.sent;

        if (redpack.url) {
          jdadUrl = redpack.url;
        }

      case 17:
        configUrl = 'https://cdn.bijiago.com/js/configs/activity-bijiago-online.json';

        if (G.from_device === 'biyibi') {
          configUrl = 'https://cdn.bijiago.com/js/configs/activity-biyibi.json';
        }
        context$1$0.next = 21;
        return regeneratorRuntime.awrap(request.rawGet(configUrl));

      case 21:
        config = context$1$0.sent;
        c = config.jdActivity;
        t = new Date();
        jdadImg = 'https://cdn.bijiago.com/images/extensions/ad1111/bijiago_go.png';

        if (t < new Date(c.end) && t > new Date(c.start)) {
          jdadUrl = c.bottom.link;
          jdadImg = c.bottom.img;
        }
        if (G.site === 'vipshop' && t < new Date('2023-10-31T10:00:00') && t > new Date('2023-10-20T10:00:00')) {
          showAd = true;
          jdadUrl = 'https://tb.bijiago.com/static_page/activity_scan/vip.html';
          jdadImg = 'https://cdn.bijiago.com/images/extensions/activity/vipBottom.png';
        }
        if (G.ss_name === 'priceDog') {
          showAd = false;
        }
        lang = __webpack_require__(39);
        langCfg = __webpack_require__(169);

        $('body').append(template.compile(views)({
          from_device: G.from_device,
          title: G.from_device === 'biyibi' ? '比一比' : '比价狗',
          setting: G.server + '/brwext/setting_feedback?set=1',
          feedback: G.server + '/brwext/setting_feedback?fed=1',
          mainClass: mainClass,
          showJHS: showJHS,
          noCoupon: noCoupon,
          showAd: showAd,
          jdadUrl: jdadUrl,
          jdadImg: jdadImg,
          feedbackText: lang.getString(langCfg, 'feedback')
        }));
        setTimeout(function () {
          __webpack_require__(560).init();
        }, 0);
        if (G.lang === 'en') {
          $('.bjgext-feedback').css('width', '120px');
        }
        if (G.ss_name === 'priceDog') {
          $('.bd-head-icon').attr('title', 'PriceDog');
        }
        new Vue({
          el: '#pricedog-setting',
          store: store,
          render: function render(h) {
            return h(__webpack_require__(561)['default']);
          }
        });
        // if (G.site === 'lenovo') {
        //   retry()
        // }
        addFootEvent();
        if (window.bjgAutoPriceProtect && !G.disableLogin && false) {
          (function () {
            var PriceProtectBar = __webpack_require__(568)['default'];
            new Vue({
              el: '#bjgou-price-protect',
              store: store,
              render: function render(h) {
                return h(PriceProtectBar);
              }
            });
            if (location.hostname === 'pcsitepp-fm.jd.com') {
              (function () {
                $('.jb-tab ul').after('<div id="bjgou-priceprotect-button"></div>');
                var PriceProtectPageButton = __webpack_require__(623)['default'];
                new Vue({
                  el: '#bjgou-priceprotect-button',
                  store: store,
                  render: function render(h) {
                    return h(PriceProtectPageButton);
                  }
                });
              })();
            }
          })();
        }
        if (G.allowBackgroundRequest) {
          bgClient.get('/bgVer').then(function (res) {
            G.bgVer = parseFloat(res);
            if (parseFloat(res) > 1 && G.ss_name !== 'priceDog') {
              (function () {
                if (G.from_device !== 'biyibi' && !G.disableLogin) {
                  (function () {
                    var CollectionBar = __webpack_require__(155)['default'];
                    new Vue({
                      el: '#bjgou-collection',
                      store: store,
                      render: function render(h) {
                        return h(CollectionBar);
                      }
                    });
                  })();
                } else {
                  $('#bjgou-collection').remove();
                }
                var HistoryBar = __webpack_require__(633)['default'];
                new Vue({
                  el: '#bjgou-history',
                  store: store,
                  render: function render(h) {
                    return h(HistoryBar);
                  }
                });
              })();
            }
          });
        }
        return context$1$0.abrupt('return', new Promise(function (resolve) {
          return resolve();
        }));

      case 39:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var addFootEvent = function addFootEvent() {
  $('.bjgext-closeBtn').on('click', function () {
    if (G.main_fold === '1') {
      G.main_fold = '0';
      $('#bjgext_mainbar').addClass('mainbar-fold');
    } else {
      G.main_fold = '1';
      $('#bjgext_mainbar').removeClass('mainbar-fold');
    }
    util.settings('main_fold', G.main_fold);
  });

  $('#bjgext_mainbar').on('click', function (e) {
    var href = undefined;
    if (e.target.nodeName === 'A') {
      href = e.target.href;
    } else if (e.target.parentNode.nodeName === 'A') {
      href = e.target.parentNode.href;
    }
    if (href && href.indexOf('javascript:') === -1) {
      util.tongji('4', 'click', href);
    }
  });

  $(window).resize(function () {
    clearTimeout(resizeTime);
    resizeTime = setTimeout(function () {
      option.resizeAutoWidth();
      trend.resizeSetLeft();
    }, 1000);
  });
};
var renderBarData = function renderBarData(data) {
  if (G.site === 'steampowered') {
    return;
  }
  // if (require('common/haitao').isHaitao()) {
  //   return
  // }
  setTimeout(function () {
    __webpack_require__(641).init(data.now.dp_id);
  }, 0);

  /* b2c b2cfuzzy*/
  if (G.aliSite) return;
  var b2c;
  if (data.b2c && data.b2c.store) {
    b2c = data.b2c;
  } else if (data.b2c_fuzzy) {
    b2c = exchangeDataFormat(data.b2c_fuzzy);
  }
  if (!b2c) return;
  var newstore = [];
  for (var i = 0; i < b2c.store.length; i++) {
    var item = b2c.store[i].product[0];
    var site_id = item.dp_id.match(/\d+-(\d+)$/) && item.dp_id.match(/\d+-(\d+)$/)[1];
    newstore.push(b2c.store[i]);
  }

  __webpack_require__(6).log('mainbar flex d');
  $('#bjgext_mainbar').css('display', 'flex');
  G.showMainbar = true;
  util.tongji('4', 'show');
  var num = option.calCompare() || newstore.length;
  renderItemProduct(newstore.slice(0, num));
  option.autoWidth();
};
//把模糊匹配的b2c转化成正规的b2c商城内容
var exchangeDataFormat = function exchangeDataFormat(b2cFuzzy) {
  var b2c = {};
  var fuzzy = b2cFuzzy.product;
  fuzzy = specialFilter(fuzzy);
  for (var fuzzyIndex in fuzzy) {
    if (fuzzy[fuzzyIndex].more == '1') {
      var product = fuzzy[fuzzyIndex].all;

      for (var productIndex in product) {
        var site_name = product[productIndex].site_name;
        if (b2c[site_name] == null) {
          b2c[site_name] = [];
        }
        b2c[site_name].push(product[productIndex]);
      }
    } else {
      var site_name = fuzzy[fuzzyIndex].site_name;
      if (b2c[site_name] == null) {
        b2c[site_name] = [];
      }
      b2c[site_name].push(fuzzy[fuzzyIndex]);
    }
  }
  var returnB2c = {
    'store': []
  };
  for (var b2cIndex in b2c) {
    if (typeof b2c[b2cIndex][0].fee != 'undefined') {
      var store = {
        'product': b2c[b2cIndex],
        'fee': b2c[b2cIndex][0].fee
      };
      returnB2c.store.push(store);
    }
  }
  return returnB2c;
};

var renderItemProduct = function renderItemProduct(data) {
  var productArr = [];
  for (var i = 0; i < data.length; i++) {
    if (Number(data[i].product[0].price)) {
      data[i].product[0].price = parseFloat(data[i].product[0].price).toFixed(2);
      data[i].product[0].currency = __webpack_require__(26).getMoneyInfo(data[i].product[0]['site_name'])[0];
      productArr.push(data[i].product[0]);
      globalProduct[data[i].product[0].dp_id] = data[i].product;
    }
  }
  var view = __webpack_require__(80);
  var dom = template.compile(view)({
    data: productArr,
    classname: 'bjgext-item-dp'
  });
  $('.bjgext-product-compare').append('<div id="bjg-space" style="flex: 1"></div>');
  $('.bjgext-product-compare').append(dom).css('display', 'flex');
  var start = Date.now(),
      counter = 0;
  var t = setInterval(function () {
    while ($('#bjg-space').width() > 0) {
      var len = $('.bjgext-item-dp').length;
      $('.bjgext-item-dp')[len - 1].remove();
    }
    counter++;
    if (Date.now() - start > 1000) {
      clearInterval(t);
      __webpack_require__(6).log('run ', counter);
    }
  }, 30);
  addEvent();
};

var renderDetail = function renderDetail(dom, id) {
  var pages, width, itemDetail, len, itemPageInfo, itemPageNum, html;
  return regeneratorRuntime.async(function renderDetail$(context$1$0) {
    var _this2 = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        pages = 0;
        width = $(window).width();
        itemDetail = globalProduct[id];
        len = itemDetail.length;
        itemPageInfo = option.calDetailNum();
        itemPageNum = itemPageInfo.num;

        if (len > itemPageNum) {
          pages = Math.ceil(len / itemPageNum);
        }
        if (pages <= 1) width = 220 * len;
        html = __webpack_require__(81);
        context$1$0.next = 11;
        return regeneratorRuntime.awrap(Promise.race([Promise.all(itemDetail.map(function (item) {
          return new Promise(function callee$2$0(resolve) {
            var pidConfig, coupon, m;
            return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
              while (1) switch (context$3$0.prev = context$3$0.next) {
                case 0:
                  if (!(item.dp_id.indexOf('-83') > -1 || item.dp_id.indexOf('-123') > -1)) {
                    context$3$0.next = 9;
                    break;
                  }

                  pidConfig = __webpack_require__(46);
                  context$3$0.next = 4;
                  return regeneratorRuntime.awrap(__webpack_require__(38).initWithDpAsync(item.dp_id, pidConfig[G.union], 'compare'));

                case 4:
                  coupon = context$3$0.sent;

                  if (coupon && coupon.data) {
                    m = coupon.data.coupon.coupon_money;

                    item.coupon = m;
                  }
                  resolve();
                  context$3$0.next = 10;
                  break;

                case 9:
                  resolve();

                case 10:
                case 'end':
                  return context$3$0.stop();
              }
            }, null, _this2);
          });
        })), __webpack_require__(10).sleep(500)]));

      case 11:
        dom.append(template.compile(html)({
          data: itemDetail,
          'per': itemPageNum,
          'loadimg': G.loadImg,
          'b_width': width,
          pages: pages,
          lang: G.lang
        }));
        if (len > itemPageNum) {
          dom.find('.bjgext-product-box').width(itemPageInfo.width);
          turnpageEvent(dom);
          option.loadImage(0, itemPageNum, dom.find('.bjgext-product-box'));
        } else {
          option.loadImage(0, len, dom.find('.bjgext-product-box'));
          option.setSimplePagePos(len, dom);
        }
        __webpack_require__(651).init();

      case 14:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var turnpageEvent = function turnpageEvent(dom) {
  dom.find('.bjgext-turnleft .turnpage-btn').on('click', function () {
    option.changePage(-1, this);
  });
  dom.find('.bjgext-turnright .turnpage-btn').on('click', function () {
    option.changePage(1, this);
  });
};

var addEvent = function addEvent() {
  var time1;
  $('.bjgext-item-dp').on('mouseenter', function () {
    clearTimeout(time1);
    $('.bjgext-product-detail').hide();
    var dom = $(this);
    var detail = dom.find('.bjgext-product-detail');
    if (detail.length > 0) {
      detail.show();
    } else {
      var id = dom.attr('data-id');
      if (id) {
        renderDetail(dom, id);
      }
    }
  });
  $('.bjgext-item-dp').on('mouseleave', function () {
    var that = this;
    time1 = setTimeout(function () {
      $(that).find('.bjgext-product-detail').hide();
    }, 100);
  });
};

var editData = function editData(style, data) {
  // 针对b2c数据的提前处理
  if (G.aliSite) return data;
  if (data.b2c instanceof Array) {
    data.b2c = data.b2c.filter(function (x) {
      return x.price;
    });
  }
  if (data.b2c && data.b2c.length !== 0) {
    __webpack_require__(14)('b2ccompare:show');
    if (style === 'top') {
      var storeLen = data.b2c.store.length;
      for (var i = storeLen - 1; i >= 0; i--) {
        if (data.b2c.store[i].is_third && data.b2c.store[i].shop_name) {
          data.b2c.store[i].site_name2 = data.b2c.store[i].site_name;
          data.b2c.store[i].site_name = data.b2c.store[i].site_name.replace("第三方", "") + '-' + data.b2c.store[i].shop_name;
        }
        data.b2c.store[i].price = (Number(data.b2c.store[i].price) / 100).toFixed(2);
        data.b2c.store[i].price2 = data.b2c.store[i].price;
        if (!data.b2c.store[i].title || !data.b2c.store[i].img_url) {
          data.b2c.store.splice(i, 1);
        }
      }

      data.b2c.store2 = data.b2c.store.slice(0, 6);
      var productLen = data.b2c.product.length;
      for (var i = productLen - 1; i >= 0; i--) {
        if (data.b2c.product[i].is_third && data.b2c.product[i].shop_name) {
          data.b2c.product[i].site_name2 = data.b2c.product[i].site_name;
          data.b2c.product[i].site_name = data.b2c.product[i].site_name.replace("第三方", "") + '-' + data.b2c.product[i].shop_name;
        }
        var pitem = data.b2c.product[i];
        if (pitem.promotions && pitem.fee && pitem.fee.indexOf('缺货') === -1) {
          pitem.promo2 = [];
          pitem.coupon2 = [];
          pitem.yushou2 = [];
          for (var k = 0; k < pitem.promotions.length; k++) {
            if (pitem.promotions[k].type === "promo") {
              if (pitem.promotions[k].tag === '预售') {
                pitem.yushou2.push(pitem.promotions[k].text);
              } else {
                pitem.promo2.push(pitem.promotions[k].text);
              }
            } else {
              pitem.coupon2.push(pitem.promotions[k].text);
            }
          }
          if (pitem.promo2.length === 0) pitem.promo2 = null;
          if (pitem.coupon2.length === 0) pitem.coupon2 = null;
          if (pitem.yushou2.length === 0) pitem.yushou2 = null;
        }

        data.b2c.product[i].url = (data.b2c.product[i].url.includes('?') ? data.b2c.product[i].url : data.b2c.product[i].url + '?') + '&lang=' + G.lang;
        data.b2c.product[i].price = (Number(data.b2c.product[i].price) / 100).toFixed(2);
        if (!data.b2c.product[i].title || !data.b2c.product[i].img_url) {
          data.b2c.product.splice(i, 1);
        }
      }
      data.b2c.min_price = (Number(data.b2c.min_price) / 100).toFixed(2);
    } else {
      var storeLen = data.b2c.store.length;
      for (var i = storeLen - 1; i >= 0; i--) {
        if (!data.b2c.store[i].product) continue;
        var productiLen = data.b2c.store[i].product.length;
        for (var j = productiLen - 1; j >= 0; j--) {
          if (data.b2c.store[i].product[j].is_third && data.b2c.store[i].product[j].shop_name) {
            data.b2c.store[i].product[j].site_name2 = data.b2c.store[i].product[j].site_name;
            data.b2c.store[i].product[j].site_name = data.b2c.store[i].product[j].site_name.replace("第三方", "") + '-' + data.b2c.store[i].product[j].shop_name;
          }
          data.b2c.store[i].product[j].url = __webpack_require__(10).urlFix(data.b2c.store[i].product[j].url) + '&lang=' + G.lang;
          data.b2c.store[i].product[j].price = (Number(data.b2c.store[i].product[j].price) / 100).toFixed(2);
          data.b2c.store[i].product[j].l_price = (Number(data.b2c.store[i].product[j].l_price) / 100).toFixed(2);
          var pitem = data.b2c.store[i].product[j];
          if (pitem.promotions && pitem.fee && pitem.fee.indexOf('缺货') === -1) {
            pitem.promo2 = [];
            pitem.coupon2 = [];
            pitem.yushou2 = [];
            for (var k = 0; k < pitem.promotions.length; k++) {
              if (pitem.promotions[k].type === "promo") {
                if (pitem.promotions[k].tag === '预售') {
                  pitem.yushou2.push(pitem.promotions[k].text);
                } else {
                  pitem.promo2.push(pitem.promotions[k].text);
                }
              } else {
                pitem.coupon2.push(pitem.promotions[k].text);
              }
            }
            if (pitem.promo2.length === 0) pitem.promo2 = null;
            if (pitem.coupon2.length === 0) pitem.coupon2 = null;
            if (pitem.yushou2.length === 0) pitem.yushou2 = null;
          }
          if (!data.b2c.store[i].product[j].title || !data.b2c.store[i].product[j].img_url) {
            data.b2c.store[i].product.splice(j, 1);
          }
        }
      }
    }
  } else if (data.b2c_fuzzy && data.b2c_fuzzy.length !== 0) {
    __webpack_require__(14)('b2ccompare:show');
    var productLen = data.b2c_fuzzy.product.length;
    for (var i = productLen - 1; i >= 0; i--) {
      if (data.b2c_fuzzy.product[i].is_third && data.b2c_fuzzy.product[i].shop_name) {
        data.b2c_fuzzy.product[i].site_name2 = data.b2c_fuzzy.product[i].site_name;
        data.b2c_fuzzy.product[i].site_name = data.b2c_fuzzy.product[i].site_name.replace("第三方", "") + '-' + data.b2c_fuzzy.product[i].shop_name;
      }
      var pitem = data.b2c_fuzzy.product[i];
      if (pitem.promotions && pitem.fee && pitem.fee.indexOf('缺货') === -1) {
        pitem.promo2 = [];
        pitem.coupon2 = [];
        pitem.yushou2 = [];
        for (var k = 0; k < pitem.promotions.length; k++) {
          if (pitem.promotions[k].type === "promo") {
            if (pitem.promotions[k].tag === '预售') {
              pitem.yushou2.push(pitem.promotions[k].text);
            } else {
              pitem.promo2.push(pitem.promotions[k].text);
            }
          } else {
            pitem.coupon2.push(pitem.promotions[k].text);
          }
        }
        if (pitem.promo2.length === 0) pitem.promo2 = null;
        if (pitem.coupon2.length === 0) pitem.coupon2 = null;
        if (pitem.yushou2.length === 0) pitem.yushou2 = null;
      }
      data.b2c_fuzzy.product[i].price = (Number(data.b2c_fuzzy.product[i].price) / 100).toFixed(2);
      data.b2c_fuzzy.product[i].img_url2 = data.b2c_fuzzy.product[i].img_url && data.b2c_fuzzy.product[i].img_url.replace('s100x100', 's140x140');
      if (!data.b2c_fuzzy.product[i].title || !data.b2c_fuzzy.product[i].img_url) {
        data.b2c_fuzzy.product.splice(i, 1);
      }
    }
    data.b2c_fuzzy.min_price = (Number(data.b2c_fuzzy.min_price) / 100).toFixed(2);
  }
  return data;
};

var priceFormat = function priceFormat(data) {
  if (!(data.b2c instanceof Array) && data.b2c.store) {
    for (var i = 0; i < data.b2c.store.length; i++) {
      var item = data.b2c.store[i];
      item.min_price = util.formatPrice(data.b2c.min_price);
      for (var j = 0; j < item.product.length; j++) {
        var itemJ = item.product[j];
        itemJ.price = util.formatPrice(itemJ.price);
      }
    }
  } else if (data.b2c_fuzzy && data.b2c_fuzzy.product) {
    data.b2c_fuzzy.min_price = util.formatPrice(data.b2c_fuzzy.min_price);
    for (var i = 0; i < data.b2c_fuzzy.product.length; i++) {
      data.b2c_fuzzy.product[i].price = util.formatPrice(data.b2c_fuzzy.product[i].price);
    }
  }
};
var getProductInfo = function getProductInfo(callback) {
  var dp = G.dp;
  var href = G.dp.url || window.location.href;
  var url = encodeURIComponent(G.dp.url);
  var name = encodeURIComponent(G.dp.name);
  var keyword = encodeURIComponent(G.dp.keyword);
  var skeyword = encodeURIComponent(G.dp.skeyword);
  var cat_id = typeof G.dp.cat_id != 'undefined' ? G.dp.cat_id : '';
  var pic = typeof G.dp.pic != 'undefined' ? encodeURIComponent(G.dp.pic) : '';
  var cat_name = encodeURIComponent(G.dp.cat_name);
  var brand_string = encodeURIComponent(G.dp.brand_string);
  //let url = `${G.server}/brwext/product?union=${G.union}&url=${encodeURIComponent(href)}&site=${dp.site}&isbn=${dp.isbn}&name=${encodeURIComponent(dp.name)}&keyword=${encodeURIComponent(dp.keyword)}&id=${dp.id}&price=${dp.price}&cat_id=${dp.cat_id}&userid=${dp.userid}&shop_name=${dp.userid}&cat_name=${encodeURIComponent(dp.cat_name)}&brand_string=${encodeURIComponent(dp.brand_string)}`;
  var dp_interfavce_url = G.server + '/brwext/dp_query_latest?permanent_id=' + G.p_id + '&union=' + G.union + '&url=' + url + '&site=' + G.dp.site + '&isbn=' + G.dp.isbn + '&name=' + name + '&keyword=' + keyword + '&skeyword=' + skeyword + '&id=' + G.dp.id + '&price=' + G.dp.price + '&stock=' + G.dp.inventory + '&province_id=' + G.province_id + '&subsite_id=' + G.subsite_id + '&cat_id=' + cat_id + '&pic=' + pic + '&userid=' + G.dp.userid + '&shop_name=' + G.dp.shop_name + '&shop_addres=' + G.dp.shop_addres + '&cat_name=' + cat_name + '&brand_string=' + brand_string + '&style=bottom';
  var other_info_url = G.server + '/brwext/prepare?permanent_id=' + G.p_id + '&union=' + G.union + '&url=' + url + '&site=' + G.dp.site + '&isbn=' + G.dp.isbn + '&name=' + name + '&keyword=' + keyword + '&skeyword=' + skeyword + '&id=' + G.dp.id + '&price=' + G.dp.price + '&stock=' + G.dp.inventory + '&province_id=' + G.province_id + '&subsite_id=' + G.subsite_id + '&cat_id=' + cat_id + '&pic=' + pic + '&userid=' + G.dp.userid + '&shop_name=' + G.dp.shop_name + '&shop_addres=' + G.dp.shop_addres + '&cat_name=' + cat_name + '&brand_string=' + brand_string;
  // request.get(url).done(data => {
  //   priceFormat(data)
  //   G.save_dp_query = data;
  //   userData.set('dp_data', data)
  //   callback(data)
  // })
  if (location.href === 'https://pcsitepp-fm.jd.com/' || location.href === 'https://pcsitepp-fm.jd.com/#forceOpen') {
    renderBarData({
      now: {
        dp_id: '0-3'
      },
      b2c: {
        store: []
      }
    });
  }
  Promise.all([request.get(dp_interfavce_url), request.get(other_info_url)]).then(function (res) {
    var data = _extends({}, res[0], res[1]);
    G.dp.dpId = data.dp.dp_id;
    G.exact_arr = data.exact_arr;
    editData('bottom', data);
    priceFormat(data);
    G.save_dp_query = data;
    userData.set('dp_data', data);
    callback(data);
  });
};
var renderSpecial = function renderSpecial(data) {
  taobao.init2(data.product);
  userData.set('dp_query', data);
  minibar.init();
  guess.init();
  if (data.price.list.length > 0) trend.init2(data.price.list[0]);
};
var saveHistory = function saveHistory(data) {
  var dp_id = data.dp_id;
  __webpack_require__(4).setMet('GwdDpIdGot', data.dp_id);
  if (dp_id.indexOf('-83') && location.host.indexOf('taobao') > -1) {
    dp_id = dp_id.split('-')[0] + "-123";
  }
  var price = data.price || G.dp.price;
  communicate.trigger({
    'type': 'saveHistory',
    'dp_id': dp_id,
    'price': price
  });
};

module.exports.init = function callee$0$0() {
  var installSource;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    var _this3 = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        extConsole.log('product init');

        if (!G.allowBackgroundRequest) {
          context$1$0.next = 6;
          break;
        }

        context$1$0.next = 4;
        return regeneratorRuntime.awrap(bgClient.get('/getStorage', {
          key: 'install_source'
        }));

      case 4:
        installSource = context$1$0.sent;

        if (installSource) {
          G.union = 'union_bijiago_' + installSource;
        }

      case 6:
        context$1$0.next = 8;
        return regeneratorRuntime.awrap(renderBar());

      case 8:
        __webpack_require__(652).init();
        productInfo.get(function () {
          getProductInfo(function callee$2$0(data) {
            var bgVer;
            return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
              while (1) switch (context$3$0.prev = context$3$0.next) {
                case 0:
                  extConsole.log('productInfo got');
                  if (!G.allowBackgroundRequest) {
                    G.disableLogin = true;
                  }

                  if (!(location.href.indexOf('smzdm.com') > -1)) {
                    context$3$0.next = 4;
                    break;
                  }

                  return context$3$0.abrupt('return');

                case 4:
                  if (G.site === 'amazon-com' || G.site === 'amazon-uk' || G.site === 'amazon-jp' || G.site === '6pm') {
                    amazonGlobal.init(data.now.now_dp_id);
                    __webpack_require__(21).getRate(yijianhaitao.init);
                  }
                  saveHistory(data.now);
                  if (__webpack_require__(27).isHaitao()) {
                    data.b2c.store = [];
                  }
                  renderBarData(data);

                  __webpack_require__(655).init(data.now.dp_id, '.bjg-coupon-space', '.bjgext-toptabs');
                  userData.set('dp_query', data);
                  if (G.site !== 'steampowered') {
                    minibar.init();
                    promo.init();
                    taobao.init(data);
                    // require('common/common_lowest').init(data)
                    __webpack_require__(658).init(data);
                  }
                  if (G.ss_name === 'priceDog' && data.transport) {
                    __webpack_require__(661).init(data.transport);
                  }
                  trend.init(data.b2c.all_dp_ids, data.now_dp_id || data.now.dp_id || data.now.now_dp_id);
                  // require('standard/module/priceTrend2').init()
                  __webpack_require__(670).init();
                  __webpack_require__(59).ready();
                  __webpack_require__(672).init();
                  if (['360buy', 'taobao', 'tmall'].indexOf(G.site) === -1) {
                    if (G.ss_name === 'priceDog') {
                      __webpack_require__(102).init(false);
                    }
                  }

                  context$3$0.next = 19;
                  return regeneratorRuntime.awrap(__webpack_require__(16).get('/bgVer'));

                case 19:
                  context$3$0.t0 = context$3$0.sent;
                  bgVer = parseFloat(context$3$0.t0);

                  if (!window.gwd_G && bgVer >= 1.3) {
                    __webpack_require__(673).init();
                  }

                case 22:
                case 'end':
                  return context$3$0.stop();
              }
            }, null, _this3);
          });
        });

      case 10:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5), __webpack_require__(0), __webpack_require__(17)["default"]))

/***/ }),
/* 265 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {

var template = __webpack_require__(13);
var request = __webpack_require__(3);
var option = __webpack_require__(58);
var util = __webpack_require__(19);
var buildTaobaoUrl = __webpack_require__(28);
var userData = __webpack_require__(15);
// const replaceHref = require('common/replaceHref')
var tbhtml = __webpack_require__(267);
var globalCondition = __webpack_require__(4);
var globalProduct = {};

var renderTaobao = function renderTaobao(name, title, price, tts) {
  var view = __webpack_require__(80);
  var obj = {
    dp_id: name,
    price: parseFloat(price).toFixed(2),
    site_name: title
  };
  var dom = template.compile(view)({
    data: [obj],
    classname: 'bjgext-item-tb'
  });

  $('.bjgext-product-compare').append(dom).css('display', 'flex');
  option.autoWidth();
  addEvent(tts);
};
var editData = function editData(data, id, tts) {
  var newdata = [];
  for (var i = 0; i < data.length; i++) {
    if (!data[i].title || !data[i].pic_url || !data[i].price || !data[i].url) continue;
    data[i].img_url = data[i].pic_url;
    if (data[i].img_url.match(/_\d+x\d+/)) {
      var match = data[i].img_url.match(/_(\d+)x\d+/);
      if (match) {
        match = Number(match[1]);
        if (match > 200) {
          data[i].img_url = data[i].img_url + '_100x100';
        }
      }
    } else {
      data[i].img_url = data[i].img_url + '_100x100';
    }
    // if (data[i].num_iid && !G.aliSite) {
    //   data[i].oldUrl = data[i].url;
    //   let type = data[i].type ? ('&type=' + data[i].type) : '';
    //   data[i].url = `https://browser.bijiago.com/coupon_redirect?id=${data[i].num_iid}${type}&column=bijiago&union=${G.union}`;
    // }
    data[i].rev_cnt = 0;
    newdata.push(data[i]);
  }
  return newdata;
};
var renderDetail = function renderDetail(dom, id, tts) {
  var pages = 0;
  var width = $(window).width();
  var itemDetail = editData(globalProduct[id], id, tts);
  var len = itemDetail.length;
  var itemPageInfo = option.calDetailNum();
  var itemPageNum = itemPageInfo.num;
  if (len >= itemPageNum) {
    pages = Math.ceil(len / itemPageNum);
  }
  if (pages <= 1) width = 220 * len;

  var html = __webpack_require__(81);
  if (id === "tmall" || id === "taobao") html = tbhtml;
  if (id === 'taobao') {
    itemDetail.forEach(function (x) {
      x.nick = x.item_location;
    });
  }
  dom.append(template.compile(html)({
    data: itemDetail,
    'per': itemPageNum,
    'loadimg': G.loadImg,
    'b_width': width,
    pages: pages,
    sale: G.lang === 'en' ? 'Sales:' : '最近销量'
  }));
  if (len > itemPageNum) {
    dom.find('.bjgext-product-box').width(itemPageInfo.width);
    turnpageEvent(dom);
    option.loadImage(0, itemPageNum, dom.find('.bjgext-product-box'));
  } else {
    option.loadImage(0, len, dom.find('.bjgext-product-box'));
    option.setSimplePagePos(len, dom);
  }
  var lastClick = Date.now();
  dom.find('.bjgext-product-box').on('click', 'a', function callee$1$0(e) {
    var now, k, href, id;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          now = Date.now();

          console.log('time between', now - lastClick);

          if (!(now - lastClick < 100)) {
            context$2$0.next = 4;
            break;
          }

          return context$2$0.abrupt('return');

        case 4:
          lastClick = now;
          e.preventDefault();
          console.log(e.target);
          k = e.target;
          href = '';
          id = '';

          if (k.tagName === 'IMG') {
            href = $(k).parents('a').attr('href');
            id = $(k).parents('a').attr('data-id');
          } else {
            href = k.href;
            id = $(k).attr('data-id');
          }
          // https://u.bijiago.com/redirect/tao?id=623934330690&site=&source=common&from_device=bijiago&union=union_bijiago_mogu
          if (G.aliSite) {
            window.open(href);
          } else {
            window.open(G.u_server + '/redirect/tao?id=' + id + '&site=&source=common&from_device=' + G.from_device + '&union=' + G.union);
          }
          // if (href.indexOf('coupon') > -1) {
          //   console.log($(e.target).attr('data-id'))
          //   let pidConfig = require('bjgou/modules/pidConfig');
          //   let coupon = await require('common/getCouponNew').initWithDpAsync(id, pidConfig[G.union], 'compare');
          //   console.log('window open', Date.now())
          //   window.open(coupon.data.click_url2)
          // } else {
          //   window.open(href)
          // }

        case 12:
        case 'end':
          return context$2$0.stop();
      }
    }, null, this);
  });
};
var turnpageEvent = function turnpageEvent(dom) {
  dom.find('.bjgext-turnleft .turnpage-btn').on('click', function () {
    option.changePage(-1, this);
  });
  dom.find('.bjgext-turnright .turnpage-btn').on('click', function () {
    option.changePage(1, this);
  });
};
var addEvent = function addEvent(tts) {
  var time1;
  $('.bjgext-item-tb').on('mouseenter', function () {
    clearTimeout(time1);
    $('.bjgext-product-detail').hide();
    var dom = $(this);
    var detail = dom.find('.bjgext-product-detail');
    if (detail.length > 0) {
      detail.show();
    } else {
      var id = dom.attr('data-id');
      if (id) {
        renderDetail(dom, id, tts);
      }
    }
  });
  $('.bjgext-item-tb').on('mouseleave', function () {
    var that = this;
    time1 = setTimeout(function () {
      $(that).find('.bjgext-product-detail').hide();
    }, 100);
  });
  $('.bjgext-item-tb').on('click', function (e) {
    var href1 = $(e.target).attr('href');
    var href2 = $(e.target).parent().attr('href');
    if (href1 || href2) {
      href1 = href1 || href2;
      util.tongjiLog('tbuniontotal');
      if (href1.indexOf('redirect.simba.taobao.com') > -1) {
        util.tongjiLog('tbunionsuccess');
      }
    }
  });
};
var getTbres = function getTbres(data, callback) {
  if (location.href.indexOf('pcsitepp-fm.jd.com') > -1) return;
  var msg = data.exact_arr;
  var code_server = '1';
  var code = data['code-server'];
  if (!code) {
    code = {};
    code_server = '0';
  }
  var price = data.now.price * 100;
  if (!price) {
    price = G.dp.price * 100;
  }
  var url = G.server + '/brwext/tbres?union=' + G.union + '&url=' + encodeURIComponent(msg.url) + '&site=' + msg.site + '&isbn=' + msg.isbn + '&keywords=' + encodeURIComponent(msg.keywords) + '&brand=' + encodeURIComponent(msg.brand) + '&type=' + encodeURIComponent(msg.type) + '&price=' + price + '&class_id=' + msg.class_id + '&name=' + encodeURIComponent(G.dp.name) + '&code_brand_id=' + code.brand_id + '&code_clean_title=' + encodeURIComponent(code.clean_title) + '&code_code=' + code.code + '&code_display_brand=' + encodeURIComponent(code.display_brand) + '&code_brand=' + encodeURIComponent(code.brand) + '&code_class_id=' + encodeURIComponent(code.class_id) + '&code_price=' + encodeURIComponent(code.price) + '&code_spec=' + encodeURIComponent(code.spec) + '&code-server=' + code_server;
  request.get(url).done(function (data) {
    if (G.site == 'taobao' || G.site == 'tmall') {
      getUniqPid(data, function (mm) {
        callback(mm);
      });
    } else {
      getImgSearch(data, function (mm) {
        callback(mm);
      });
    }
  });
};

var renderTTSdata = function renderTTSdata(data) {
  var tmalls = [],
      taobaos = [];
  for (var i = 0; i < data.length; i++) {
    data[i].pic_url = data[i].originalimage;
    data[i].price = data[i].cutprice.toFixed(2);
    if (data[i].sitename === '淘宝') taobaos.push(data[i]);else tmalls.push(data[i]);
  }
  var obj = {};
  if (taobaos.length > 0) {
    var lp = taobaos[0].price,
        hp = taobaos[taobaos.length - 1].price;
    if (lp === hp) obj.taobao = lp;else obj.taobao = lp + '~' + hp;
    globalProduct.taobao = taobaos;
  }
  if (tmalls.length > 0) {
    var lp = tmalls[0].price,
        hp = tmalls[tmalls.length - 1].price;
    if (lp === hp) obj.tmall = lp;else obj.tmall = lp + '~' + hp;
    globalProduct.tmall = tmalls;
  }
  return obj;
};
var getImgSearch = function getImgSearch(msg, callback) {
  msg = buildTaobaoUrl.buildCommon(msg);
  var exact_arr = userData.get('dp_data') && userData.get('dp_data')['exact_arr'];
  if (exact_arr.type && exact_arr.brand && (!msg.taobao.sort || !msg.tmall.sort)) {
    // 在京东有brand 有比价结果的情况下， 不走图片检索
    callback(msg);
    return;
  }
  __webpack_require__(59).init(function (data) {
    if (data) {
      if (msg.tmall.sort) msg.tmall = {};
      if (data.tmall.length > 0) {
        msg.tmall.min_price = data.tmall[0].price;
        msg.tmall.max_price = data.tmall[data.tmall.length - 1].price;
        msg.tmall.store = data.tmall;
        msg.tmall.product = data.tmall;
      }
      if (msg.taobao.sort) msg.taobao = {};
      if (data.taobao.length > 0) {
        msg.taobao.product = data.taobao;
        msg.taobao.store = data.taobao;
        msg.taobao.min_price = data.taobao[0].price;
        msg.taobao.max_price = data.taobao[data.taobao.length - 1].price;
      }
      callback(msg);
    } else {
      callback(msg);
    }
  });
};
var getUniqPid = function getUniqPid(msg, callback) {
  msg = buildTaobaoUrl.buildCommon(msg);
  var exact_arr = userData.get('dp_data') && userData.get('dp_data')['exact_arr'];
  __webpack_require__(82).getTaobaouniqData(function (data) {
    if (data && data.img_s && exact_arr.type && exact_arr.brand && (!msg.taobao.sort || !msg.tmall.sort)) {
      callback(msg);
      return;
    }
    if (data) {
      if (msg.tmall.sort) {
        msg.tmall = {};
      }
      if (data.tmall.length > 0) {
        msg.tmall.min_price = data.tmall[0].price;
        msg.tmall.max_price = data.tmall[data.tmall.length - 1].price;
        msg.tmall.store = data.tmall;
        msg.tmall.product = data.tmall;
      }
      if (msg.taobao.sort) {
        msg.taobao = {};
      }
      if (data.taobao.length > 0) {
        msg.taobao.product = data.taobao;
        msg.taobao.store = data.taobao;
        msg.taobao.min_price = data.taobao[0].price;
        msg.taobao.max_price = data.taobao[data.taobao.length - 1].price;
      }
      callback(msg);
    } else {
      callback(msg);
    }
  });
};

module.exports.init = function (data) {
  if (__webpack_require__(27).isHaitao() && G.ss_name === 'priceDog') {
    return;
  }
  getTbres(data, function (info) {
    info.ss = 0;
    if (!(info.tmall instanceof Array) && info.tmall.product && info.tmall.product.length > 0) {
      if (!G.showMainbar && $('#bjgext_mainbar').length) {
        __webpack_require__(6).log('mainbar flex c');
        $('#bjgext_mainbar').css('display', 'flex');
        G.showMainbar = true;
        util.tongji('mainbar', 'show');
        __webpack_require__(6).log('mainbar', $('#bjgext_mainbar')[0]);
      }
      var price = info.tmall.min_price;
      if (info.tmall.min_price === info.tmall.max_price) {
        price = info.tmall.min_price;
      }
      renderTaobao('tmall', '天猫', price);
      info.ss++;
      info.tmm = true;
      __webpack_require__(83).init(info.tmall.product, 'tmall', true, info.tmall.min_price);
      globalProduct.tmall = info.tmall.product;
      // replaceHref.init('tmall', globalProduct.tmall)
    } else {
        __webpack_require__(4).setMet('AliProducttmall', []);
      }
    if (info.taobao || info.tmall) {
      __webpack_require__(14)('tbcompare:show');
    }
    if (!(info.taobao instanceof Array) && info.taobao.product && info.taobao.product.length > 0) {
      if (!G.showMainbar) {
        __webpack_require__(6).log('mainbar flex f');
        $('#bjgext_mainbar').css('display', 'flex');
        G.showMainbar = true;
        util.tongji('mainbar', 'show');
      }
      var price = info.taobao.min_price;
      if (info.taobao.min_price === info.taobao.max_price) {
        price = info.taobao.min_price;
      }
      renderTaobao('taobao', '淘宝', price);
      info.ss++;
      info.tbb = true;
      __webpack_require__(83).init(info.taobao.product, 'taobao', true, info.taobao.min_price);
      globalProduct.taobao = info.taobao.product;
      // replaceHref.init('taobao', globalProduct.taobao)
    } else {
        __webpack_require__(4).setMet('AliProducttaobao', []);
      }
    userData.set('tbData', info);
  });
};

module.exports.init2 = function (data) {
  if (__webpack_require__(27).isHaitao() && G.ss_name === 'priceDog') {
    return;
  }
  var info = renderTTSdata(data);
  if (info.taobao) {
    renderTaobao('taobao', '淘宝', info.taobao, true);
    if (!G.showMainbar) {
      __webpack_require__(6).log('mainbar flex a');
      $('#bjgext_mainbar').css('display', 'flex');
      G.showMainbar = true;
      util.tongji('mainbar', 'show');
    }
  }
  if (info.tmall) {
    renderTaobao('tmall', '天猫', info.tmall, true);
    if (!G.showMainbar) {
      __webpack_require__(6).log('mainbar flex b');
      $('#bjgext_mainbar').css('display', 'flex');
      G.showMainbar = true;
      util.tongji('mainbar', 'show');
    }
  }
  if (info.taobao || info.tmall) {
    __webpack_require__(14)('tbcompare:show');
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 266 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var getTransInfo = function getTransInfo(name, data, str) {
  for (var i = 0; i < data.length; i++) {
    if (data[i].num_iid) {
      data[i].oldUrl = data[i].url;
      // let type = data[i].type ? ('&type=' + data[i].type) : '';
      data[i].url = G.u_server + '/redirect/tao?id=' + data[i].num_iid + '&source=' + data[i].source + '&from_device=' + G.from_device;
    }
  }
};

module.exports.init = function (name, data, str) {
  if (!data || !(data instanceof Array) || G.aliSite) return;
  str = str || '';
  getTransInfo(name, data, str);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 267 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', pages = $data.pages, $escape = $imports.$escape, b_width = $data.b_width, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, per = $data.per, loadimg = $data.loadimg, sale = $data.sale;
    $$out += '<div class="bjgext-product-detail" style="';
    if (pages != 0) {
        $$out += ' left:0px;';
    }
    $$out += 'width:';
    $$out += $escape(b_width);
    $$out += 'px;" >\n  ';
    if (pages > 1) {
        $$out += '\n  <div class="bjgext-page bjgext-turnleft">\n    <span class="bjgext-bg turnpage-btn"></span>\n  </div>\n  ';
    }
    $$out += '\n  <div class="bjgext-product-box">\n    <ul>\n      ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li ';
        if ($index % per == 0) {
            $$out += ' class="bjgext-margl0" ';
        }
        $$out += '>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="bjgext-item-img" style="margin-top: 12px" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n          <img src="';
        $$out += $escape(loadimg);
        $$out += '" data-original="';
        $$out += $escape($value.img_url);
        $$out += '">\n          ';
        if ($value.tspan) {
            $$out += '\n                ';
            $$out += $value.tspan;
            $$out += '\n            ';
        }
        $$out += '\n        </a>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" title="';
        $$out += $escape($value.title);
        $$out += '" class="bjgext-item-tle" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n          ';
        $$out += $escape($value.title);
        $$out += '\n        </a>\n        <span style="margin-top: 8px">';
        $$out += $escape($value.nick);
        $$out += '</span>\n        <span style="margin-top: 4px; font-size: 12px; color: #969899">';
        $$out += $escape(sale);
        $$out += $escape($value.volume);
        $$out += '</span>\n        ';
        if ($value.ta) {
            $$out += '\n              ';
            $$out += $value.ta;
            $$out += '\n            ';
        } else {
            $$out += '\n              <span class="bjgext-item-price fontb"> \n                \uFFE5';
            $$out += $escape($value.price);
            $$out += '\n              </span>\n            ';
        }
        $$out += '\n        \n      </li>\n      ';
    });
    $$out += '\n    </ul>\n  </div>\n  ';
    if (pages > 1) {
        $$out += '\n  <div class="bjgext-page bjgext-turnright">\n    <span class="bjgext-page-num"><em>1</em>/';
        $$out += $escape(pages);
        $$out += '</span>\n    <span class="bjgext-bg turnpage-btn"></span>\n  </div>\n  ';
    }
    $$out += '\n</div>';
    return $$out;
};

/***/ }),
/* 268 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var pidmid1 = [{
  "token": "f9d03911-a442-43bd-af1a-ed5683cc12fe",
  "pid": ["mm_426650165_525500037_108931700165", "mm_426650165_525500037_108930000270", "mm_426650165_525500037_108932000092", "mm_426650165_525500037_108930250277", "mm_426650165_525500037_108931900125", "mm_426650165_525500037_108931350207", "mm_426650165_525500037_108929850311", "mm_426650165_525500037_108930250279", "mm_426650165_525500037_108931800131", "mm_426650165_525500037_108931300207", "mm_426650165_525250037_108931150245", "mm_426650165_525250037_108930500276", "mm_426650165_525250037_108930750263", "mm_426650165_525250037_108932100083", "mm_426650165_525250037_108931950119", "mm_426650165_525250037_108930950262", "mm_426650165_525250037_108930350261", "mm_426650165_525250037_108930250283", "mm_426650165_525250037_108930200282", "mm_426650165_525250037_108931250201", "mm_426650165_523350136_108931850127", "mm_426650165_523350136_108930650280", "mm_426650165_523350136_108930350264", "mm_426650165_523350136_108930950268", "mm_426650165_523350136_108930100317", "mm_426650165_523350136_108931850128", "mm_426650165_523350136_108929950293", "mm_426650165_523350136_108930200286", "mm_426650165_523350136_108930650283", "mm_426650165_523350136_108930500281", "mm_426650165_525850029_108930200296", "mm_426650165_525850029_108931500221", "mm_426650165_525850029_108930800276", "mm_426650165_525850029_108930100327", "mm_426650165_525850029_108930950280", "mm_426650165_525850029_108929900309", "mm_426650165_525850029_108929750355", "mm_426650165_525850029_108930800277", "mm_426650165_525850029_108931050272", "mm_426650165_525850029_108931100254", "mm_426650165_524650046_108931050276", "mm_426650165_524650046_108931300221", "mm_426650165_524650046_108930150290", "mm_426650165_524650046_108931700195", "mm_426650165_524650046_108930750296", "mm_426650165_524650046_108931200274", "mm_426650165_524650046_108931250221", "mm_426650165_524650046_108930200304", "mm_426650165_524650046_108930700319", "mm_426650165_524650046_108931050278"]
}, {
  "token": "7a538f42-b7d5-40fc-ab9f-d57fd8c64b36",
  "pid": ["mm_426760139_523800144_108930850330", "mm_426760139_523800144_108930000320", "mm_426760139_523800144_108932100150", "mm_426760139_523800144_108930850334", "mm_426760139_523800144_108930650350", "mm_426760139_523800144_108929800387", "mm_426760139_523800144_108930650351", "mm_426760139_523800144_108932000150", "mm_426760139_523800144_108931450292", "mm_426760139_523800144_108930300340", "mm_426760139_525850033_108931450296", "mm_426760139_525850033_108931150315", "mm_426760139_525850033_108931150316", "mm_426760139_525850033_108931900190", "mm_426760139_525850033_108930950330", "mm_426760139_525850033_108931450297", "mm_426760139_525850033_108931650225", "mm_426760139_525850033_108930900342", "mm_426760139_525850033_108931000359", "mm_426760139_525850033_108930000332", "mm_426760139_524350044_108930950334", "mm_426760139_524350044_108929800394", "mm_426760139_524350044_108930100388", "mm_426760139_524350044_108931250285", "mm_426760139_524350044_108930550360", "mm_426760139_524350044_108930500350", "mm_426760139_524350044_108930350341", "mm_426760139_524350044_108931350291", "mm_426760139_524350044_108931900199", "mm_426760139_524350044_108931150325", "mm_426760139_526050036_108929950378", "mm_426760139_526050036_108931350297", "mm_426760139_526050036_108931950197", "mm_426760139_526050036_108930250377", "mm_426760139_526050036_108929900387", "mm_426760139_526050036_108929800400", "mm_426760139_526050036_108930200364", "mm_426760139_526050036_108931900204", "mm_426760139_526050036_108930150355", "mm_426760139_526050036_108930500355", "mm_426760139_524750051_108930450351", "mm_426760139_524750051_108931050335", "mm_426760139_524750051_108930350352", "mm_426760139_524750051_108929850398", "mm_426760139_524750051_108930750363", "mm_426760139_524750051_108931550267", "mm_426760139_524750051_108931550269", "mm_426760139_524750051_108931450321", "mm_426760139_524750051_108930450353", "mm_426760139_524750051_108931000377"]
}];

var pidTop1 = [{
  "token": "7fe96ce2-ebbf-40f6-907e-40134566f3f6",
  "pid": ["mm_133413248_524550053_108930250422", "mm_133413248_524550053_108930650424", "mm_133413248_524550053_108930450404", "mm_133413248_524550053_108930050434", "mm_133413248_524550053_108930550425", "mm_133413248_524550053_108931900263", "mm_133413248_524550053_108930050436", "mm_133413248_524550053_108929900448", "mm_133413248_524550053_108931850274", "mm_133413248_524550053_108931200388", "mm_133413248_525150043_108930900405", "mm_133413248_525150043_108930750414", "mm_133413248_525150043_108931400338", "mm_133413248_525150043_108930200432", "mm_133413248_525150043_108932100233", "mm_133413248_525150043_108929750461", "mm_133413248_525150043_108931500336", "mm_133413248_525150043_108930100453", "mm_133413248_525150043_108931850277", "mm_133413248_525150043_108929750465", "mm_133413248_525350045_108932100242", "mm_133413248_525350045_108930550432", "mm_133413248_525350045_108931100386", "mm_133413248_525350045_108930500412", "mm_133413248_525350045_108930400403", "mm_133413248_525350045_108930350414", "mm_133413248_525350045_108930400404", "mm_133413248_525350045_108930750421", "mm_133413248_525350045_108931650312", "mm_133413248_525350045_108931950258"]
}];

var pidBtm1 = [{
  "token": "7fe96ce2-ebbf-40f6-907e-40134566f3f6",
  "pid": ["mm_133413248_526050048_108929950446", "mm_133413248_526050048_108929900455", "mm_133413248_526050048_108930850407", "mm_133413248_526050048_108931200400", "mm_133413248_526050048_108930500415", "mm_133413248_526050048_108930700435", "mm_133413248_526050048_108931250349", "mm_133413248_526050048_108930100461", "mm_133413248_526050048_108931800304", "mm_133413248_526050048_108931450393", "mm_133413248_524950051_108931200402", "mm_133413248_524950051_108930350419", "mm_133413248_524950051_108931950262", "mm_133413248_524950051_108930150419", "mm_133413248_524950051_108931200403", "mm_133413248_524950051_108930250435", "mm_133413248_524950051_108929850463", "mm_133413248_524950051_108930900414", "mm_133413248_524950051_108930700436", "mm_133413248_524950051_108931500348", "mm_133413248_524950051_108929950449"]
}];

var pidmid2 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_523450142_108931900339", "mm_132165438_523450142_108931450464", "mm_132165438_523450142_108932500014", "mm_132165438_523450142_108932700006", "mm_132165438_523450142_108930950466", "mm_132165438_523450142_108932250042", "mm_132165438_523450142_108930900479", "mm_132165438_523450142_108931900341", "mm_132165438_523450142_108931950352", "mm_132165438_523450142_108931600361"]
}];

var pidBtm2 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_525550053_108932050318", "mm_132165438_525550053_108930900480", "mm_132165438_525550053_108931900343", "mm_132165438_525550053_108931350424", "mm_132165438_525550053_108932800003"]
}];

var pidmid3 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_525550053_108931750377", "mm_132165438_525550053_108932500018", "mm_132165438_525550053_108930400476", "mm_132165438_525550053_108930900484", "mm_132165438_525550053_108931200474"]
}];

var pidBtm3 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_525550053_108930500500", "mm_132165438_525550053_108932300028", "mm_132165438_525550053_108931950357", "mm_132165438_525550053_108930400480", "mm_132165438_525550053_108932850003"]
}];

var pidmid4 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_525200048_108930300464", "mm_132165438_525200048_108930450468", "mm_132165438_525200048_108931150438", "mm_132165438_525200048_108930400439", "mm_132165438_525200048_108931850324", "mm_132165438_525200048_108931650353", "mm_132165438_525200048_108931850325", "mm_132165438_525200048_108932150015", "mm_132165438_525200048_108930300466", "mm_132165438_525200048_108930850465"]
}];

var pidmid5 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_523350143_108930500465", "mm_132165438_523350143_108931350393", "mm_132165438_523350143_108932000281", "mm_132165438_523350143_108931350393", "mm_132165438_523350143_108930900458", "mm_132165438_523350143_108929900491", "mm_132165438_523350143_108930250479", "mm_132165438_523350143_108931600334", "mm_132165438_523350143_108930250481", "mm_132165438_523350143_108932150018", "mm_132165438_523350143_108931350397", "mm_132165438_523350143_108930550484"]
}];
var pidmid6 = [{
  "token": "93a5dde6-d424-4f2c-9041-f1b38a3929f4",
  "pid": ["mm_132165438_524800058_108931150444", "mm_132165438_524800058_108930000457", "mm_132165438_524800058_108931800348", "mm_132165438_524800058_108930400446", "mm_132165438_524800058_108930400448", "mm_132165438_524800058_108931900316", "mm_132165438_524800058_108931550374", "mm_132165438_524800058_108929900495", "mm_132165438_524800058_108931200451", "mm_132165438_524800058_108930250485"]
}];

// pid-1 gwd  pid-2 bjg   pid-3 bjg-923253  pid-4 kuaik pid-5 east  pid-6 universal
var pidPattern = {
  "pid-1": {
    "mini": pidmid1,
    "top": pidTop1,
    "bottom": pidBtm1
  },
  "pid-2": {
    "mini": pidmid2,
    "bottom": pidBtm2
  },
  "pid-3": {
    "mini": pidmid3,
    "bottom": pidBtm3
  },
  "pid-4": {
    "mini": pidmid4,
    "bottom": pidmid4
  },
  "pid-5": {
    "mini": pidmid5,
    "bottom": pidmid5
  },
  "pid-6": {
    "mini": pidmid6,
    "bottom": pidmid6
  },
  "pid-ChenHong": {
    "mini": [{
      "token": "198d49fd-cdf1-414b-9ed3-bfd52052b07f",
      "pid": ["mm_556360192_1116550153_109805450078"]
    }]
  },
  "pid-firefox": {
    "top": [{
      "token": "873b666f-a598-4860-95ef-1844a9450574",
      "pid": ["mm_556360192_1246500082_109939250379", "mm_556360192_1246500082_109940900274", "mm_556360192_1246500082_109948350097", "mm_556360192_1246500082_109945700200", "mm_556360192_1246500082_109941150299"]
    }],
    "mini": [{
      "token": "873b666f-a598-4860-95ef-1844a9450574",
      "pid": ["mm_556360192_1246500082_109941750278", "mm_556360192_1246500082_109946850177", "mm_556360192_1246500082_110011050405", "mm_556360192_1246500082_109940200335", "mm_556360192_1246500082_109941100285"]
    }]
  },
  "pid-bjg-923253": {
    "mini": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110035950035", "mm_890050030_1305700395_110035100074", "mm_890050030_1305700395_110033050148", "mm_890050030_1305700395_110030550187", "mm_890050030_1305700395_110028400296"]
    }],
    "bottom": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110026800374", "mm_890050030_1305700395_110026900375", "mm_890050030_1305700395_110030600222", "mm_890050030_1305700395_110030350240", "mm_890050030_1305700395_110031350190"]
    }],
    "search": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110036400016", "mm_890050030_1305700395_110027400349", "mm_890050030_1305700395_110027150373", "mm_890050030_1305700395_110035800045", "mm_890050030_1305700395_110032600159"]
    }],
    "compare": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110036350026", "mm_890050030_1305700395_110035250074", "mm_890050030_1305700395_110031550184", "mm_890050030_1305700395_110031550183", "mm_890050030_1305700395_110027850312"]
    }]
  },
  "pid-bjg-union": {
    "mini": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110033000160", "mm_890050030_1305700395_110033100166", "mm_890050030_1305700395_110034350087", "mm_890050030_1305700395_110034500107", "mm_890050030_1305700395_110034650096"]
    }],
    "bottom": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110034700080", "mm_890050030_1305700395_110031850193", "mm_890050030_1305700395_110030450207", "mm_890050030_1305700395_110029050242", "mm_890050030_1305700395_110028800257"]
    }],
    "search": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110027500316", "mm_890050030_1305700395_110026700416", "mm_890050030_1305700395_110025850493", "mm_890050030_1305700395_110029450239", "mm_890050030_1305700395_110034600075"]
    }],
    "compare": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110035750063", "mm_890050030_1305700395_110033250122", "mm_890050030_1305700395_110032550136", "mm_890050030_1305700395_110027200337", "mm_890050030_1305700395_110026000397"]
    }]
  },
  "pid-bjg-union-uos": {
    "mini": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110033000160", "mm_890050030_1305700395_110033100166", "mm_890050030_1305700395_110034350087", "mm_890050030_1305700395_110034500107", "mm_890050030_1305700395_110034650096"]
    }],
    "bottom": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110034700080", "mm_890050030_1305700395_110031850193", "mm_890050030_1305700395_110030450207", "mm_890050030_1305700395_110029050242", "mm_890050030_1305700395_110028800257"]
    }],
    "search": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110027500316", "mm_890050030_1305700395_110026700416", "mm_890050030_1305700395_110025850493", "mm_890050030_1305700395_110029450239", "mm_890050030_1305700395_110034600075"]
    }],
    "compare": [{
      "token": "f1c0d7fb-0724-4956-8e70-e8347d0cf895",
      "pid": ["mm_890050030_1305700395_110035750063", "mm_890050030_1305700395_110033250122", "mm_890050030_1305700395_110032550136", "mm_890050030_1305700395_110027200337", "mm_890050030_1305700395_110026000397"]
    }]
  },
  "pid-kuaik": {
    "default": [{
      "token": "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      "pid": ["mm_890410049_1303100468_110036350166", "mm_890410049_1303100468_110034400195", "mm_890410049_1303100468_110031800316", "mm_890410049_1303100468_110031000338", "mm_890410049_1303100468_110029600371"]
    }]
  },
  'pid-east': {
    mini: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110036150169", "mm_890410049_1303100468_110031250275", "mm_890410049_1303100468_110031150310", "mm_890410049_1303100468_110027200475", "mm_890410049_1303100468_110027200474"]
    }],
    compare: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110035500181", "mm_890410049_1303100468_110033450257", "mm_890410049_1303100468_110031850331", "mm_890410049_1303100468_110030300359", "mm_890410049_1303100468_110029800314"]
    }]
  },
  'pid-universal': {
    mini: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110035150208", "mm_890410049_1303100468_110033150297", "mm_890410049_1303100468_110030900315", "mm_890410049_1303100468_110030200333", "mm_890410049_1303100468_110029600368"]
    }],
    compare: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110033650243", "mm_890410049_1303100468_110033100283", "mm_890410049_1303100468_110032900269", "mm_890410049_1303100468_110032600287", "mm_890410049_1303100468_110028700393"]
    }]
  },
  'pid-cchrome': {
    mini: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110036700108", "mm_890410049_1303100468_110034500228", "mm_890410049_1303100468_110031400306", "mm_890410049_1303100468_110029350360", "mm_890410049_1303100468_110028500408"]
    }],
    search: [{
      token: "f18dd54e-ad55-4726-8e7c-5d662cb7f59a",
      pid: ["mm_890410049_1303100468_110035750202", "mm_890410049_1303100468_110034300231", "mm_890410049_1303100468_110032950285", "mm_890410049_1303100468_110031750311", "mm_890410049_1303100468_110027300479"]
    }]
  }
};

module.exports.init = function (id, style) {
  style = style || "mini";
  if (!id) return;
  var pidItemObj = pidPattern[id];
  var pidItem = pidItemObj[style];
  if (pidItem.length === 1) {
    pidItem = pidItem[0];
  } else {
    pidItem = pidItem[parseInt(Math.random() * 2)];
  }
  var pids = pidItem.pid;
  var size = pids.length;
  var pid1 = pids[parseInt(Math.random() * size)];
  var pitem = {
    token: pidItem.token,
    pid: pid1
  };
  return pitem;
};

/***/ }),
/* 269 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, fmdv = $data.fmdv, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, lang = $data.lang;
    $$out += '<div id="miniCouponCom" class="';
    $$out += $escape(fmdv);
    $$out += '">\n  <ul>\n    ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li ';
        if ($value.same_style) {
            $$out += ' class="isSamestyle" ';
        }
        $$out += '>\n        <span class="samestyle">';
        if (lang == 'en') {
            $$out += 'Same product';
        } else {
            $$out += '同款';
        }
        $$out += '</span>\n        <img src="';
        $$out += $escape($value.sicon);
        $$out += '" class="mini-site-icon mini-site-icon1">\n        <a href="';
        $$out += $escape($value.click_url2);
        $$out += '" target="_blank" class="mini-cc-tle">';
        $$out += $escape($value.title);
        $$out += '</a>\n        <div class="cc-other-info">\n          <img src="';
        $$out += $escape($value.sicon);
        $$out += '" class="mini-site-icon">\n          <span class="cc-now-price">';
        if (lang == 'en') {
            $$out += 'Price after coupon';
        } else {
            $$out += '券后价';
        }
        $$out += '\uFF1A\uFFE5';
        $$out += $escape($value.promoPri);
        $$out += '</span>\n          <span class="cc-old-price">\uFFE5';
        $$out += $escape($value.price);
        $$out += '</span>\n          <a class="click2get2" href="';
        $$out += $escape($value.click_url2);
        $$out += '" target="_blank">\n            <span class="c2g2-sp1">\uFFE5';
        $$out += $escape($value.coupon_money);
        $$out += '</span>\n            <span class="c2g2-sp2">';
        if (lang == 'en') {
            $$out += 'Take';
        } else {
            $$out += '领取';
        }
        $$out += '</span>\n          </a>\n          <em class="coupon_gif"></em>\n        </div>\n      </li>\n    ';
    });
    $$out += '\n  </ul>\n  <style type="text/css">\n    #miniCouponCom {\n      width: 460px;\n      height: 62px;\n      float: left;\n      background: #FFFFFF;\n      overflow: hidden;\n      position: relative;\n      border: 1px solid #E6E9EB;\n      top: -1px;\n    }\n    #miniCouponCom.east #miniCouponCom.universal {\n      top: 0px;\n    }\n    .gwd_kaola #miniCouponCom {\n      float: none;\n    }\n    #miniCouponCom * {\n      font-family: "Microsoft YaHei";\n    }\n    #miniCouponCom ul {\n      position: absolute;\n      top: 0px;\n    }\n    #miniCouponCom ul li {\n      list-style: none;\n      height: 62px;\n      width:  460px;\n    }\n    #miniCouponCom ul li>* {\n      float: left;\n    }\n    #miniCouponCom .samestyle+.mini-site-icon {\n      margin-top: 8px;\n    }\n    #miniCouponCom .mini-site-icon {\n      margin-left: 12px;\n      margin-right: 11px;\n      margin-top: 4px;\n    }\n    .cc-other-info .mini-site-icon {\n      display: none;\n    }\n    .isSamestyle .cc-other-info .mini-site-icon {\n      display: inline-block;\n    }\n    #miniCouponCom .mini-cc-tle {\n      width: 398px;\n      height: 32px;\n      overflow: hidden;\n      line-height: 32px;\n      font-size: 12px;\n      color: #404547;\n      letter-spacing: 0;\n      text-decoration: none;\n    }\n    #miniCouponCom .cc-now-price {\n      font-size: 12px;\n      color: #FF3B5C;\n      letter-spacing: 0;\n      font-weight: bold;\n      margin-right: 8px;\n      margin-left: 12px;\n    }\n    #miniCouponCom .isSamestyle .cc-now-price {\n      margin-left: 0px;\n    }\n    #miniCouponCom .coupon_gif {\n      background: url(\'https://cdn.gwdang.com/images/extensions/newbar/turn.gif\') 0px 0px no-repeat;\n      float: right!important;\n      height: 20px;\n      width: 56px;\n      margin-top: 5px;\n      margin-right: 11px;\n    }\n    #miniCouponCom .click2get2 {\n      background: url(\'https://cdn.gwdang.com/images/extensions/newbar/coupon_01.png\') 0px 0px no-repeat;\n      float: right!important;\n      height: 30px;\n      width: 96px;\n      margin-right: 12px;\n    }\n    #miniCouponCom .click2get2 span {\n      height: 24px;\n      float: left;\n      margin-left: 1px;\n    }\n    #miniCouponCom .c2g2-sp1 {\n      width: 50px;\n      color: #FF3B5C;\n      text-align: center;\n      font-size: 14px;\n      line-height: 24px!important;\n    }\n    #miniCouponCom .c2g2-sp2 {\n      width: 44px;\n      line-height: 24px!important;\n      color: #fff!important;\n      text-align: center;\n    }\n    #miniCouponCom .cc-other-info {\n      width: 100%;\n      line-height: 24px;\n    }\n    #miniCouponCom .cc-other-info * {\n      float: left;\n    }\n    #miniCouponCom .cc-old-price {\n      font-size: 12px;\n      color: #7D7E80;\n      text-decoration: line-through;\n    }\n    #miniCouponCom .samestyle {\n      background: #FFF1F4;\n      border: 1px solid #FF3B5C;\n      width: 30px;\n      height: 16px;\n      line-height: 16px;\n      text-align: center;\n      margin-left: 12px;\n      margin-right: 11px;\n      margin-top: 7px;\n      font-size: 12px;\n      color: #FF3B5C;\n      display: none;\n    }\n    #miniCouponCom .isSamestyle .samestyle {\n      display: inline-block;\n    }\n    #miniCouponCom .isSamestyle .mini-site-icon1 {\n      display: none;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 270 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', lang = $data.lang, size = $data.size, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, s_s = $data.s_s;
    $$out += '<div id="dpCouponImg" class="dpcoupon-box">\n  <div class="dpcoupon-hd">\n    <span class="dpc-hd-sp1"></span>\n    <span class="dpc-title">';
    if (lang == 'zh-tr') {
        $$out += '商品同款';
    } else {
        $$out += '商品同款';
    }
    $$out += '</span>\n    ';
    if (size > 4) {
        $$out += '\n    <div class="dpc-turn-pg">\n      <span class="dpc-bg dpc-turn-l"></span>\n      <span class="dpc-bg dpc-turn-r"></span>\n    </div>\n    ';
    }
    $$out += '\n  </div>\n  <div class="dpcoupon-bd">\n    <ul style="left: 0px;">\n      ';
    $each(data, function ($value, $index) {
        $$out += '\n        <li class="dpc-item">\n          <a href="';
        $$out += $escape($value.click_url2);
        $$out += '" target="_blank" class="dpc-img" title="';
        $$out += $escape($value.title);
        $$out += '">\n            <img src="';
        $$out += $escape($value.imgUrl);
        $$out += '">\n            <span class="dpc-tip dpc-bg">\xA5';
        $$out += $escape($value.coupon_money);
        if (lang == 'zh-tr') {
            $$out += '券';
        } else {
            $$out += '券';
        }
        $$out += '</span>\n          </a>\n          <div class="dpc-pri-box">\n            <span class="dpc-pri-box-sp">\n              <span class="dpc-sp1">券';
        if (lang == 'zh-tr') {
            $$out += '後';
        } else {
            $$out += '后';
        }
        $$out += '</span>\n              <span class="dpc-sp2">';
        $$out += $escape($value.price);
        $$out += '</span>\n            </span>\n\n          </div>\n        </li>\n      ';
    });
    $$out += '\n    </ul>\n  </div>\n\n  <style type="text/css">\n  .dpc-bg {\n    background: url("';
    $$out += $escape(s_s);
    $$out += '/images/extensions/xbt/dp-same-style.png");\n  }\n  .dpcoupon-box {\n    width: 418px;\n    height: 138px;\n    float: left;\n    position: relative;\n    z-index: 99999999;\n  }\n  .dpc_taobao .dpcoupon-box {\n    margin-top: 8px;\n  }\n  .dpcoupon-hd {\n    width: 100%;\n    height: 14px;\n  }\n  .dpc-hd-sp1 {\n    height: 10px;\n    width: 3px;\n    background-color: #ff4335;\n    float: left;\n    margin-right: 4px;\n    margin-top: 2px;\n  }\n  .dpcoupon-bd {\n    margin-top: 11px;\n    height: 112px;\n    width: 100%;\n    overflow: hidden;\n    position: relative;\n  }\n  .dpcoupon-bd ul {\n    position: absolute;\n    top: 0px;\n  }\n  .dpc-title {\n    font-size: 12px;\n    color: #838383;\n    height: 14px;\n    float: left;\n    line-height: 14px;\n    font-family: "microsoft yahei";\n  }\n  .dpc-turn-pg {\n    float: right;\n    width: 40px;\n    height: 14px;\n  }\n  .dpc-turn-pg span {\n    float: left;\n    width: 14px;\n    height: 14px;\n    cursor: pointer;\n  }\n  .dpc-turn-l {\n    background-position: -4px -4px;\n  }\n  .dpc-turn-l:hover {\n    background-position: -40px -4px;\n  }\n  .dpc-turn-r {\n    background-position: -22px -4px;\n    margin-left: 12px;\n  }\n  .dpc-turn-r:hover {\n    background-position: -58px -4px;\n  }\n  .dpcoupon-bd ul li {\n    float: left;\n    margin-left: 22px;\n    height: 112px;\n    width: 88px;\n  }\n  .dpcoupon-bd ul li:first-child {\n    margin-left: 0px;\n  }\n  .dpcoupon-bd .dpc-img {\n    width: 88px;\n    height: 88px;\n    float: left;\n    position: relative;\n  }\n  .dpcoupon-bd .dpc-img .dpc-tip {\n    position: absolute;\n    width: 42px;\n    height: 14px;\n    line-height: 13px;\n    text-align: center;\n    color: #fff;\n    right: 0px;\n    top: 0px;\n    font-size: 12px;\n    font-family: HelveticaNeue,microsoft yahei;\n    background-position: -4px -22px;\n  }\n  .dpcoupon-bd .dpc-img img {\n    width: 100%;\n    height: 100%;\n  }\n  .dpc-pri-box {\n    float: left;\n    text-align: center;\n    width: 88px;\n    height: 17px;\n    margin-top: 6px;\n  }\n  .dpc-pri-box-sp {\n    margin: 0 auto;\n    height: 17px;\n    width: auto;\n    display: inline-block;\n  }\n  .dpc-pri-box-sp span {\n    float: left;\n  }\n  .dpc-pri-box .dpc-sp1 {\n    font-family: "microsoft yahei"!important;\n    line-height: 17px;\n    font-size: 12px;\n    color: #777;\n    margin-right: 4px;\n  }\n  .dpc-pri-box .dpc-sp2 {\n    font-size: 14px;\n    color: #ff3434;\n    font-family: "Helvetica";\n    font-weight: bold;\n    line-height: 17px;\n  }\n\n\n  </style>\n</div>\n';
    return $$out;
};

/***/ }),
/* 271 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

var parseprice = __webpack_require__(21);
module.exports = function (data) {
  var newdata = [];
  var dp_price = G.dp.price || 0;
  if (G.site === '189') {
    for (var i = 0; i < data.length; i++) {
      if (parseprice(data[i].price) >= dp_price) newdata.push(data[i]);
    }
    return newdata;
  } else {
    return data;
  }
};
module.exports.tb = function (data) {
  if (data instanceof Array) return data;
  var newdata = [];
  var product = data.product;
  var dp_price = G.dp.price || 0;
  for (var i = 0; i < product.length; i++) {
    if (product[i].img_url && !product[i].img_url.match(/_\d+x\d+/)) {
      product[i].img_url = product[i].img_url + '_100x100';
    }
    if (product[i].pic_url && !product[i].pic_url.match(/_\d+x\d+/)) {
      product[i].pic_url = product[i].pic_url + '_100x100';
    }
  }
  if (G.site === '189') {
    for (var i = 0; i < product.length; i++) {
      if (parseprice(product[i].price) >= dp_price) newdata.push(product[i]);
    }
    data.min_price = newdata[0] && newdata[0].price;
    data.product = newdata;
  }
  return data;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 272 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, Vue, regeneratorRuntime) {

var _this = this;

var request = __webpack_require__(3);
var template = __webpack_require__(13);
var newtrend = __webpack_require__(273);
var taobaotrend = __webpack_require__(85);
var parse_price = __webpack_require__(21);
var option = __webpack_require__(58);
var userData = __webpack_require__(15);
var oneHour = 3600000;
var oneDay = 24 * oneHour;
var util = __webpack_require__(19);
var lang = __webpack_require__(39);
var langCfg = __webpack_require__(60);

__webpack_require__(10).appendCss('\n  .gwd-trend-hover-p .information-wrap { overflow: visible!important; }\n');

// let supportSite = G.supportSite;

var edit_nopuzzle_promo = function edit_nopuzzle_promo(data) {
  var time0 = data[0].time;
  var lowest = data[0].price,
      lowIndex = 0;
  var lastloop = undefined;
  for (var i = 0; i < data.length; i++) {
    var num = Math.abs(data[i].time - time0) / 86400;
    data[i].time2 = new Date(data[i].time * 1000);
    if (num < 10) {
      if (data[i].price < lowest) {
        lowest = data[i].price;
        lowIndex = i;
      }
    } else {
      lastloop = lowIndex;
      data[lowIndex].showCircle = true;
      lowIndex = i;
      lowest = data[i].price;
      time0 = data[i].time;
    }
  }
  if (lastloop + 1 < lowIndex) {
    data[lowIndex].showCircle = true;
  }
};

var render = function render(data) {
  if (!data.store) {
    renderMini(null);
  }
  if (data.store[0].all_line.length === 0) {
    renderBar(null);
    renderMini(null);
  } else {
    if (G.site === 'steampowered') {
      // 如果当前页面是steam网站 就加载steam价格走势
      __webpack_require__(282).init(data);
      return;
    }

    // 美亚和英亚不显示主工具条， 所以这个地方不能显示
    if (!G.showMainbar && G.site !== 'amazon-uk' && G.site !== 'amazon-com' && G.site !== 'amazon-jp') {
      __webpack_require__(6).log('mainbar flex trend');
      $('#bjgext_mainbar').css('display', 'flex');
      G.showMainbar = true;
      util.tongji('mainbar', 'show');
    }
    if (!G.showMinibar) {
      $('#bjgext_minibar').css('display', 'inline-block');
      G.showMinibar = true;
    }
    if (data.nopuzzle_promo && data.nopuzzle_promo.length > 0) {
      edit_nopuzzle_promo(data.nopuzzle_promo);
    }
    newtrend.init(data, 'dpPage', false, {
      baidu: false
    });
    renderBar(data);
    if (G.site !== '6pm') renderMini(data);
  }
};
var isLowestPrice = function isLowestPrice(msg) {
  try {
    var cur_price = parseInt(msg.store[0]['current_price'].toString().replace(",", ""));
    var storeAll = msg.store[0].all_line;
    cur_price = storeAll[storeAll.length - 1];
    //var least_price = parseInt(msg.store[0]['price_range'].split("-", 1)[0].replace(",", ""))
    var least_price = Math.min.apply(null, msg.store[0].all_line);
    if (cur_price == least_price) {
      return true;
    } else {
      return false;
    }
  } catch (e) {
    return false;
  }
};

var renderyanzhengmaBtm = function renderyanzhengmaBtm(url) {
  var c_width = document.documentElement.clientWidth > 0 ? document.documentElement.clientWidth : document.body.clientWidth;
  var w1 = c_width - 321;
  var html = __webpack_require__(286);
  var btntxt = '<span class="blkcolor1" style="width: 100%; text-align: center">访问异常</span>';
  $('.bjgext-trend').append($(btntxt));
  $('.trend-box-dev').remove();
  //$('#gwdang-pri-trend-chart').css('width', w1 + 'px')
  $('#bjgext_maintrend_detail').empty().append(template.compile(html)({
    url: url
  }));
  $('.bjgext-trend').css("display", "block");
  $('.bjgext-trend .bjgext-trend-icon').remove();
  $('.bjgext-trend .bjgext-trend-tle').remove();
};

var renderyanzhengmaMini = function renderyanzhengmaMini(url) {
  // 中间部分访问异常情况
  var html = __webpack_require__(287);
  var btntxt = '<span class="blkcolor1" style="text-align: center; width: 100%">访问异常</span>';
  $('.bjgext-mini-trend').empty().append($(btntxt));
  $('.bjgext-mini-trend').append(template.compile(html)({
    url: url
  })).show();
};

var renderBar = function renderBar(data) {
  $('#bjgext_mainbar').css('display', 'flex');
  if (data) {
    if (data.price_status === 1) {
      $('.bjgext-trend .bjgext-trend-icon').addClass('bjgext-trend-up');
      $('.bjgext-trend .bjgext-trend-tle').text(lang.getString(langCfg, 'priceUp'));
    } else if (data.price_status === 0) {
      $('.bjgext-trend .bjgext-trend-icon').addClass('bjgext-trend-stable');
      $('.bjgext-trend .bjgext-trend-tle').text(lang.getString(langCfg, 'priceStable'));
    } else if (data.price_status < 0) {
      var txt = lang.getString(langCfg, 'priceDecrease');
      if (isLowestPrice(data) || data.store[0].islowest) txt = lang.getString(langCfg, 'priceLowest');
      $('.bjgext-trend .bjgext-trend-icon').addClass('bjgext-trend-low');
      $('.bjgext-trend .bjgext-trend-tle').text(txt);
    }
    $('.bjgext-trend').show();
    if (G.lang === 'en') {
      $('.bjgext-trend').css('width', '160px');
    }
    option.autoWidth();
  }
};
var renderMini = function renderMini(data) {
  if (data) {
    $('.bjgext-mini-trend em').addClass('bjgext-bg');
    if (data.price_status === 1) {
      $('.bjgext-mini-trend em').addClass('bjgext-trend-up');
      $('.bjgext-mini-trend>span').text(lang.getString(langCfg, 'priceUp'));
    } else if (data.price_status === 0) {
      $('.bjgext-mini-trend em').addClass('bjgext-trend-stable');
      $('.bjgext-mini-trend>span').text(lang.getString(langCfg, 'priceStable'));
    } else if (data.price_status < 0) {
      var txt = lang.getString(langCfg, 'priceDecrease');
      if (isLowestPrice(data) || data.store[0].islowest) txt = lang.getString(langCfg, 'priceLowest');
      $('.bjgext-mini-trend em').addClass('bjgext-trend-low');
      $('.bjgext-mini-trend>span').text(txt);
    }
  } else {
    $('.bjgext-mini-trend em').hide();
    $('.bjgext-mini-trend').addClass('no_info').off();
    $('.bjgext-mini-trend').css('background', '#f8f8f8');
    $('.bjgext-mini-trend>span').css('color', '#a1a2a9');
    $('.bjgext-mini-trend>span').text(G.lang === 'zh-tr' ? '暫無價格走勢' : '暂无价格走势');
    $('.bjgext-mini-trend').css('text-align', 'center');
  }
  $('.bjgext-mini-trend').show();
};
var getTrendData = function getTrendData(dp_ids, dp_id, callback) {
  var price = (G.dp.price * 100).toFixed(2);
  var url = G.server + '/extension/price_towards?dp_ids=' + dp_ids + '&dp_id=' + dp_id + '&price=' + price + '&ver=1';
  if (location.href.indexOf('detail.tmall.com') > -1 && location.href.indexOf('skuId') > -1) {
    var skuId = __webpack_require__(10).getParameterByName('skuId', location.href);
    var dp = __webpack_require__(10).getParameterByName('id', location.href);
    var link = 'https://sku-taobao.com/item.htm?id=' + dp + '-' + skuId;
    url = G.server + '/extension/price_towards?dp_ids=' + dp_ids + '&url=' + encodeURIComponent(link) + '&price=' + price + '&ver=1';
  }
  if (G.site === 'taobao') {
    try {
      var sku = Hub.config.get('sku');
      var skuId = sku.skuId;
      var dp = __webpack_require__(10).getParameterByName('id', location.href);
      if (skuId && dp) {
        var link = 'https://sku-taobao.com/item.htm?id=' + dp + '-' + skuId;
        url = G.server + '/extension/price_towards?dp_ids=' + dp_ids + '&url=' + encodeURIComponent(link) + '&price=' + price + '&ver=1';
      }
    } catch (e) {
      __webpack_require__(6).warn(e);
    }
  }
  request.get(url).done(function (data) {
    // data = {
    //   is_ban: true,
    //   action: {
    //     method: 'redirect',
    //     to: 'https://www.baidu.com'
    //   }
    // }
    if (data.is_ban && data.action && data.action.method === 'redirect' && data.action.to) {
      // data.action = {
      //   to: 'https://www.baidu.com'
      // }
      // if (true) {
      renderyanzhengmaBtm(data.action.to);
      renderyanzhengmaMini(data.action.to);
      return;
    }
    //data.store = data.store.slice(0, 1)
    if (data.store && data.store[1] && data.store[1].name === "到手价" && data.promo) {
      data.store[1].name = "凑单到手价";
    } else if (data.store) {
      data.store.length = 1;
    }
    if ((!parseFloat(price) || !G.dp.price) && data.store) {
      G.dp.price = parseFloat(data.store[0].current_price);
    }
    __webpack_require__(4).setMet('NowPrice', G.dp.price);
    // console.log('dp price trend', G.dp.price)
    callback(data);
  });
};
var renderDetail = function renderDetail() {
  renerMainBarDetail();
  renderMiniDetail();
};
var renerMainBarDetail = function renerMainBarDetail() {
  var c_width = document.documentElement.clientWidth > 0 ? document.documentElement.clientWidth : document.body.clientWidth;

  var detail = '\n    <div id="bjgext_maintrend_detail">\n      <div id="bjg-pri-trend-chart" style="flex: 1; height:270px; position: relative; border-bottom: 1px solid #edf1f2" class="chart">\n        <div id="big_tooltip_bjg_top" class="big_tooltip_bjg_box"></div>\n        <div id="bar_trend_legend_btn_bjg" class="legend-btn-box" style="text-align: center">\n          <span class="price-trend-sp pt-sp1 " data-id="days180">\n            <em style="margin-left: 0; margin-top: 11px"></em>\n            <span>到手价(单件)</span>\n          </span>\n          <span class="review-trend-sp" data-id="plotSpecial">\n            <em style="margin-left: 0; margin-top: 11px"></em>\n            <span>到手价(多件)</span>\n          </span>\n        </div>\n      </div>\n      <div style="width: 322px; border-left: 1px solid #edf1f2">\n        <div id="bjgouBottomFavor"></div>\n      </div>\n    </div>';
  if (navigator.userAgent.toLowerCase().indexOf('metasr') === -1) {
    detail = '\n    <div id="bjgext_maintrend_detail">\n      <div id="bjg-pri-trend-chart" style="flex: 1; height:270px; position: relative; border-bottom: 1px solid #edf1f2" class="chart">\n        <div id="big_tooltip_bjg_top" class="big_tooltip_bjg_box"></div>\n        <div id="bar_trend_legend_btn_bjg" class="gwd-row gwd-jcc legend-btn-box" style="text-align: center">\n          <span class="price-trend-sp pt-sp1 " data-id="days180" style="margin-left: 0>\n            <em style="margin-left: 0; margin-top: 11px"></em>\n            <span>' + lang.getString(langCfg, 'onHandPrice') + '</span>\n          </span>\n          <span class="review-trend-sp" data-id="plotSpecial">\n            <em style="margin-left: 0; margin-top: 11px"></em>\n            <span>' + lang.getString(langCfg, 'combinePrice') + '</span>\n          </span>\n        </div>\n      </div>\n      <div style="width: 322px; border-left: 1px solid #edf1f2">\n        <div id="bjgouBottomFavor"></div>\n      </div>\n    </div>';
  }
  $('.bjgext-trend').append(template.compile(detail)());
  $('.bjgext-trend').on('mouseleave', function () {
    $('#bjgext_maintrend_detail').hide();
  });
  if (G.disableLogin) {
    $('#bjgouBottomFavor').parent().remove();
    setDetailLeft();
    return;
  }
  var bottomFavor = __webpack_require__(288)['default'];
  setTimeout(function () {
    new Vue({
      el: '#bjgouBottomFavor',
      render: function render(h) {
        return h(bottomFavor);
      }
    });
  }, 0);
  setDetailLeft();
};
var setDetailLeft = function setDetailLeft() {
  var dom = $('#bjgext_maintrend_detail');
  if (dom.length === 0) return;
  var winW = $(window).width();
  var trendW = 1101;
  var left = 0;
  if (winW < trendW + 106) {
    left = (winW - trendW) / 2;
    dom.css('left', left + 'px');
  }
  if (winW < trendW) {
    dom.width(winW - 2);
    dom.css('left', '0px');
  }
  if (winW < 1000) {
    dom.remove();
  }
};

var parsePrice = function parsePrice(price) {
  if (parseInt(price) > 999999) {
    return parseInt(price);
  } else {
    return price;
  }
};

var renderMiniDetail = function renderMiniDetail() {
  var dpdata, showapp, showList, detail, store, newData, storeSize, new_icon_site_ids, i, product, dp_id, site_id, icon_format;
  return regeneratorRuntime.async(function renderMiniDetail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        dpdata = userData.get('dp_query');

        if (!(G.site == 'amazon' || G.site == '6pm')) {
          context$1$0.next = 3;
          break;
        }

        return context$1$0.abrupt('return');

      case 3:
        showapp = false;
        showList = false;

        if (!G.forbidCoupon) {
          showapp = true;
        }
        if (G.IE7 || G.IE8 || G.IE9 || G.IE10 || G.IE11) {
          showapp = false;
        }
        if (dpdata && dpdata.b2c && !(dpdata.b2c instanceof Array)) {
          showapp = false;
          showList = dpdata.b2c;
        }
        if (G.aliSite) {
          showapp = false;
        }

        detail = __webpack_require__(295);
        context$1$0.next = 12;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          return $('.bjgext-mini-trend').length;
        }));

      case 12:
        if (!(dpdata.b2c && dpdata.b2c.store && dpdata.b2c.store.length)) {
          context$1$0.next = 37;
          break;
        }

        store = dpdata.b2c.store;
        newData = [];
        storeSize = store.length;
        new_icon_site_ids = [1, 103, 108, 123, 124, 126, 129, 134, 136, 14, 141, 15, 167, 168, 19, 2, 21, 25, 26, 28, 3, 31, 34, 35, 41, 6, 66, 7, 86, 93, 9];
        i = 0;

      case 18:
        if (!(i < store.length && i < 6)) {
          context$1$0.next = 31;
          break;
        }

        product = store[i].product && store[i].product[0] || store[i];
        dp_id = product.dp_id || '';
        site_id = product.site_id;
        icon_format = new_icon_site_ids.indexOf(Number(site_id)) > -1 ? '.png' : '.ico';

        if (site_id) {
          context$1$0.next = 25;
          break;
        }

        return context$1$0.abrupt('continue', 28);

      case 25:
        product.price = parsePrice(product.price.replace(/,/g, ""));
        product.icourl = G.s_server + '/images/favicon/' + site_id + icon_format;
        newData.push(product);

      case 28:
        i++;
        context$1$0.next = 18;
        break;

      case 31:
        if (G.ss_name === 'priceDog') {
          showapp = false;
          if (__webpack_require__(27).isHaitao() && G.ss_name === 'priceDog') {
            showList = false;
          }
        }
        if (G.from_device === 'biyibi') {
          showapp = false;
        }
        $('.bjgext-mini-trend').append(template.compile(detail)({
          showapp: showapp,
          showList: showList && newData.length ? newData : false,
          allLink: G.c_server + '/dp' + dpdata.dp_id,
          storeLen: store.length,
          onHandPrice: lang.getString(langCfg, 'onHandPrice'),
          single: lang.getString(langCfg, 'single'),
          combinePrice: lang.getString(langCfg, 'combinePrice'),
          cmp: G.lang === 'zh-tr' ? '同款比價' : '同款比价'
        }));
        if (showList && newData.length) {
          $('#mini_price_history_bjg_detail').css('width', '675px');
        }
        context$1$0.next = 41;
        break;

      case 37:
        if (!G.forbidCoupon) {
          showapp = true;
        }
        if (G.aliSite) {
          showapp = false;
        }
        if (G.ss_name === 'priceDog' || G.from_device !== 'bijiago') {
          showapp = false;
        }
        $('.bjgext-mini-trend').append(template.compile(detail)({
          showapp: showapp,
          showList: false,
          onHandPrice: lang.getString(langCfg, 'onHandPrice'),
          single: lang.getString(langCfg, 'single'),
          combinePrice: lang.getString(langCfg, 'combinePrice')
        }));

      case 41:

        // let detail = `<div id="bjgext_minitrend_detail">
        //   <div id="bjgext_mini_trendbox">
        //     <div class="trend-max-min-price">
        //       <span class="t-max-pri"></span>
        //       <span class="t-min-pri"></span>
        //     </div>
        //   </div>
        // </div>`;
        if (showapp) {
          $('.bjgext-mini-trend').addClass('showapp');
        }
        $('.bjgext-mini-trend').on('mouseenter', function () {
          $('#bjgext_minibar').addClass('_mshover');
        });
        $('.bjgext-mini-trend').on('mouseleave', function () {
          $('#mini_price_history_bjg_detail').hide();
          $('body').removeClass('gwd-trend-hover-p');
          $('#bjgext_minibar').removeClass('_mshover');
        });
        renerQrcode();

      case 45:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var renerQrcode = function renerQrcode() {
  if (G.aliSite && G.forbidApp) return;
  var html = __webpack_require__(296);
  var src = 'https://cdn.bijiago.com/images/extensions/apptg181019/bjg-app.png';
  var dom = template.compile(html)({
    src: src,
    s_server: G.s_server
  });
  $('#bjgext_minitrend_detail').addClass('addqrcode');
  $('#bjgext_minitrend_detail').append(dom);
  $('.wxqrcode_close').on('click', function () {
    util.setPermanent('set_qrcode', 'qrcode', '0');
    $('.wxqrcode').remove();
  });
};
var getPriceStatus = function getPriceStatus(trenddata) {
  var price_status = 0;
  var price_num = trenddata.length;
  var priceArr = trenddata.map(function (i) {
    return i[1];
  });
  var lowest = Math.min.apply(undefined, priceArr);
  var price_last = trenddata[price_num - 1][1];
  var islowest = false;
  var change_range = 20;
  var time_length = 0;
  for (var i = price_num - 1; i >= 0; i--) {
    var now_price = trenddata[i][1];
    if (i > 0) {
      time_length += (trenddata[i][0] - trenddata[i - 1][0]) / 86400000;
    }
    if (now_price == 0) {
      continue;
    }
    if (price_last == now_price) {
      if (time_length > 180) {
        break;
      }
      continue;
    } else if (parseFloat(price_last) > parseFloat(now_price) && i >= price_num - change_range - 1) {
      price_status = 1;
      break;
    } else if (parseFloat(price_last) < parseFloat(now_price)) {
      price_status = -1;
      if (price_last === lowest) islowest = true;
      break;
    }
  }
  return {
    price_status: price_status,
    islowest: islowest,
    price_last: price_last
  };
};

module.exports.getPriceStatus = getPriceStatus;

var amazonPriEdit = function amazonPriEdit(msg) {
  var currentCurrency = 'USD';
  if (location.host == 'www.amazon.co.jp') {
    currentCurrency = 'JPY';
  }
  if (['www.amazon.fr', 'www.amazon.de', 'www.amazon.es', 'www.amazon.nl', 'www.amazon.it'].indexOf(location.host) > -1) {
    currentCurrency = 'EUR';
  }
  if (location.host == 'www.amazon.ca') {
    currentCurrency = 'CAD';
  }
  if (location.host == 'www.amazon.co.uk') currentCurrency = 'GBP';
  msg.store[0].currency = currentCurrency;
};

var getSitePrice = function getSitePrice(site) {
  var price = '';
  if (site == 'taobao') {
    price = $('#J_PromoPriceNum').text();
    if (price == '' && $('#J_PromoPriceNum').length == 0) {
      price = $('#J_StrPrice .tb-rmb-num').text();
    }
  }
  if (site == 'tmall') {
    if (price == "") {
      price = $('#J_DetailMeta #J_PromoPrice span.tm-price').text();
    }
    if (price == "") {
      price = $('span.tm-price').text();
    }
    if (location.host === 'detail.tmall.hk') {
      price = $('span.tm-price:eq(1)').text();
    }
    if ($(".tb-wrTuan-num").text()) {
      price = $(".tb-wrTuan-num").text();
    }
  }
  if (site == 'taobao-95095') {
    price = $('#J_PromoPrice .tm-price').text();
    if (price == "") {
      price = $('#J_StrPriceModBox .tm-price').text();
    }
  }
  if (site == 'ai-taobao') {
    if (!G.chrome_extension) {
      price = window.pageconfig.promoPrice;
    } else {
      var pageconfig = $('.aitaobao-edetail-header script').text();
      price = /promoPrice":"([\d\.]+)"/.exec(pageconfig);
      if (price) price = price[1];
    }
    if (price == '' || !price) {
      price = $('.price-wrap .price-single .price-promo strong').text();
    }
  }
  if (price.indexOf('-') > -1) {
    price = price.split('-')[0];
  }
  return parse_price(price);
};
var dealWithEtaoData = function dealWithEtaoData(msg, callback) {
  if (!msg) return;
  if (!msg.list) return;
  var islowest = undefined,
      lowest = undefined,
      highest = undefined,
      currentTime = undefined,
      price_trend = undefined;
  var listSize = msg.list.length;
  var trenddata = [];
  currentTime = new Date(msg.curTime).getTime();
  lowest = highest = msg.list[0].price;
  try {
    for (var i = 0; i < listSize; i++) {
      var item = msg.list[i];
      trenddata.push([new Date(item.time).getTime(), item.price]);
      if (item.price > highest) highest = item.price;
      if (item.price < lowest) lowest = item.price;
    }
    /*补点*/
    for (var i = listSize - 1; i > 0; i--) {
      if (trenddata[i][0] - trenddata[i - 1][0] > 86400000) {
        var itemTrend = [trenddata[i][0] - 86400000, trenddata[i - 1][1]];
        trenddata.splice(i, 0, itemTrend);
      }
    }
    /*判断当前时间是否大于最后一个点，如果大于， 则补最后一个点*/
    var lastData = trenddata[trenddata.length - 1];
    if (lastData[0] < currentTime) {
      var lstprice = lastData[1];
      var pagePrice = getSitePrice(G.site);
      if (currentTime - lastData[0] > 86400000) trenddata.push([currentTime - 86400000, lstprice]);
      if (pagePrice && lstprice != pagePrice) {
        if (pagePrice > highest) highest = pagePrice;
        if (pagePrice < lowest) lowest = pagePrice;
        trenddata.push([currentTime, pagePrice]);
      }
    }

    // setTimeout(function() {
    // 修正最后一个点的价格
    var sitePrice = getSitePrice(G.site);
    if (sitePrice) {
      trenddata[trenddata.length - 1][1] = sitePrice;
    }

    //判断价格历史走势
    var result = getPriceStatus(trenddata);
    var price_status = result.price_status;
    var price_last = result.price_last;
    islowest = result.islowest;

    var price_range = lowest + "-" + highest;
    var startD = new Date(msg.startTime).getDate();
    var startM = new Date(msg.startTime).getMonth();
    var startY = new Date(msg.startTime).getFullYear();
    var allLine = [];
    var now_day = new Date();
    var getDataFromTime = function getDataFromTime(time) {
      for (var i = 0; i < trenddata.length - 1; i++) {
        if (time >= trenddata[i][0] && time < trenddata[i + 1][0]) {
          return trenddata[i][1];
        }
      }
      return trenddata[trenddata.length - 1][1];
    };
    var start = trenddata[0][0];
    while (start <= now_day.getTime()) {
      var s = getDataFromTime(start);
      allLine.push(parseFloat(s.toFixed(2)));
      start += oneDay;
    }
    var year_line = null;
    if (allLine.length >= 365) {
      year_line = allLine.slice(allLine.length - 365);
    }
    var month_line = null;
    if (allLine.length >= 31) {
      month_line = allLine.slice(allLine.length - 31);
    }
    var short_day_line = null;
    if (allLine.length >= 6) {
      var dayline = allLine.slice(allLine.length - 6);
      short_day_line = [];
      for (var i = 0; i < dayline.length - 1; i++) {
        var newArr = [];
        for (var n = 0; n < 24; n++) {
          newArr.push(dayline[i]);
        }
        short_day_line = short_day_line.concat(newArr);
      }
      short_day_line.push(dayline[dayline.length - 1]);
    }
    var now_time = new Date();
    price_trend = {
      "price_status": price_status,
      "startD": startD,
      "startM": startM,
      "startY": startY,
      "now_day": now_day.getTime(),
      "extra": 'start from another',
      "store": [{
        "current_price": price_last,
        "all_line": allLine,
        "all_line_begin_time": trenddata[0][0] + 8 * oneHour,
        "year_line": year_line,
        "year_line_time": now_day.getTime() - 365 * oneDay,
        "month_line": month_line,
        "month_line_time": now_day.getTime() - 30 * oneDay,
        "short_day_line": short_day_line,
        "short_day_line_begin_time": now_time.getTime() + 8 * oneHour - 5 * oneDay,
        "min_stamp": "0",
        "islowest": islowest,
        "name": getSiteName(),
        "price_range": price_range,
        "promo": [],
        "all_equal_short": false
      }]
    };
    callback(price_trend);
    // }, 1000);
    //return price_trend
  } catch (e) {}
};
var controllers = function controllers(dp_ids, dp_id) {
  if (G.site === 'tmall' || G.site === 'taobao-95095' || G.site === 'ai-taobao' || G.site === 'taobao') {
    getTrendData(dp_ids, dp_id, function (d) {
      render(d);
    });
    $('li').on('click', function (e) {
      if (!$(e.target).parents('.tb-key-sku').length) {
        return;
      }
      try {
        setTimeout(function () {
          window.extNeedReload = true;
        }, 0);
      } catch (e) {
        __webpack_require__(6).warn(e);
      }
    });
  } else {
    getTrendData(dp_ids, dp_id, function (data) {
      if (G.site === 'amazon-com' || G.site === 'amazon-uk' || G.site === 'amazon-jp') amazonPriEdit(data);
      render(data);
    });
  }
};
var getSiteName = function getSiteName() {
  var siteName = "";
  var dict = {
    'taobao': "淘宝",
    'tmall': '天猫',
    '360buy': '京东商城',
    '51buy': '易迅网',
    'suning': '苏宁易购',
    'yihaodian': '一号店',
    'dangdang': '当当网',
    'gome': '国美在线',
    'lefeng': '乐蜂网',
    'xiu': '走秀网',
    'philips': '飞利浦',
    'tcl': 'TCL商城',
    'e-changhong': '长虹商城',
    'konka': '康佳商城',
    'hisense': '海信商城',
    'ineigo': '爱内购',
    'skg': 'SKG商城',
    'k-touch': '天语手机官网',
    'gionee': '金立',
    'oppo': 'OPPO',
    'gfive': '基伍官方商城',
    'vivo': 'vivo',
    'meilishuo': '美丽说',
    'mogujie': '蘑菇街',
    'xiaomi': '小米官网',
    'lemall': '乐视商城',
    'grainger': '固安捷官网',
    'piao': '网易电影票',
    '163': '网易商城',
    'dianping': '点评团',
    'nuomi': '百度糯米',
    'meituan': '美团',
    'bookuu': '博库文具',
    'bookschina': '中国图书网',
    '1688': '阿里巴巴',
    'zol': '中关村商城',
    'amazon': '亚马逊',
    'tiantian': '天天网',
    'womai': '我买网',
    'yougou': '优购网',
    'vmall': '华为商城',
    'paixie': '拍鞋网',
    'newegg': '新蛋商城',
    'vancl': '凡客诚品'
  };
  try {
    var site = G.site,
        sites = ['360buy', 'gome', 'suning', 'taobao', 'yihaodian', 'womai', 'bookschina', 'paixie', 'bookuu', 'tiantian'];
    for (var i = 0; i < sites.length; i++) {
      if (site.indexOf(sites[i]) > -1) {
        site = sites[i];
        break;
      }
    }
    siteName = dict[site];
  } catch (e) {
    if (G.debug) {
      throw e;
    }
  }
  if (typeof siteName == "undefined") {
    siteName = "";
  }
  if (siteName == "淘宝") {
    if (window.location.host.toString().indexOf("tmall") > -1) {
      siteName = "天猫";
    }
  }
  return siteName;
};

module.exports.init = function (dp_ids, dp_id) {
  __webpack_require__(297);
  if (!dp_id) return;
  if (dp_id.match(/^0-[0-9]+/)) {
    return;
  }
  // if (dp_ids) {
  //   let dparr = dp_ids.split('|');
  //   if (dp_id && dparr.indexOf(dp_id) === -1) {
  //     dparr.push(dp_id)
  //   }
  //   let newArr = [];
  //   //  不支持的网站价格走势不显示
  //   for (let i = 0; i < dparr.length; i++) {
  //     let site_id = dparr[i].match(/\d+-(\d+)/)[1];
  //     if (supportSite.indexOf(site_id) > -1) {
  //       newArr.push(dparr[i])
  //     }
  //   }
  //   dp_ids = newArr.join(',');
  // }

  renderDetail();
  controllers(dp_ids, dp_id);
};
module.exports.init2 = function (trend) {
  renderDetail();
  trend.list = trend.monthtrend;
  trend.curTime = trend.lastday;
  trend.startTime = new Date(new Date(trend.monthtrend[0].time) - 1000 * 3600 * 24 * 30);
  dealWithEtaoData(trend, function (data) {
    if (data) render(data);
  });
};
module.exports.resizeSetLeft = function () {
  setDetailLeft();
};

//这几个网站做了新的图标
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"], __webpack_require__(5)))

/***/ }),
/* 273 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, Highcharts, $, regeneratorRuntime) {var __WEBPACK_AMD_DEFINE_RESULT__;

var _this2 = this;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  var today = new Date();
  var chart = undefined;

  var viewTest = __webpack_require__(274);
  var parsePrice = __webpack_require__(21);
  var getMidDay = __webpack_require__(275);
  var $ = __webpack_require__(1);
  var template = __webpack_require__(13);
  var cnzz = __webpack_require__(12);
  var log = __webpack_require__(14);
  var util = __webpack_require__(19);
  var userData = __webpack_require__(15);
  var countryConfig = __webpack_require__(26);
  var lang = __webpack_require__(39);
  var config = __webpack_require__(60);

  var chartBox = '#biggraph_' + G.from_device;

  var oneDay = 3600 * 24 * 1000;

  var needFold = false;
  var foldValue = undefined; // 折叠后的原价线Y轴坐标
  var foldChange = undefined; // Y轴坐标与实际原价之差
  var coudanSeries = undefined;
  var toolTipDom = undefined,
      moneyInfo = undefined;
  var discountInfo = {},
      discountInfo2 = {};
  var nopuzzlePpromo = undefined,
      lowHighInfoObj = {},
      hideCoudanManage = {};
  var noTbTrend = undefined;

  // highcharts的tooltip并没有消失时的onHide选项,给它加上
  Highcharts.wrap(Highcharts.Tooltip.prototype, 'hide', function (proceed) {
    proceed && proceed.apply && proceed.apply(this);
    this.chart.tooltip.options.onHide && this.chart.tooltip.options.onHide.apply && this.chart.tooltip.options.onHide.apply(this);
  });

  var currentSymbol = {
    folded: 'smallRect',
    extended: 'rect'
  };

  if (G.IE7 || G.IE8) {
    currentSymbol.folded = 'circle';
    currentSymbol.extended = 'circle';
  }

  var currentShowing = 'plotAll';
  var showingCenter = false;

  // 控制商城的显示
  var showingManager = (function () {
    var showList = [];
    var o = {
      inList: function inList(name) {
        return showList.indexOf(name) > -1;
      },
      add: function add(name) {
        if (showList.indexOf(name) > -1) {
          return;
        } else {
          showList.push(name);
        }
      },
      remove: function remove(name) {
        var pos = showList.indexOf(name);
        if (pos > -1) {
          showList.splice(pos, 1);
        }
      }
    };
    return o;
  })();

  // 用于为商城分配颜色
  var generateColorForStore = (function () {
    var colorList = {};
    colorList['评论数'] = '#ca60a6';
    var availableColors = ['#5ACFFB', '#eb46eb', '#ffad06', '#21c1db', '#b88ae6', '#b37036', '#b9db0f', '#ffd91c'];
    var i = 0;
    return function (storeName) {
      if (colorList[storeName]) {
        return colorList[storeName];
      } else {
        if (i < availableColors.length) {
          colorList[storeName] = availableColors[i++];
          return colorList[storeName];
        } else {
          colorList[storeName] = '#' + parseInt(Math.random() * 256 * 256 * 256).toString(16);
          return colorList[storeName];
        }
      }
    };
  })();

  // qrcode log
  var doLog = (function () {
    var hasLogged = false;
    return function () {
      if (!hasLogged) {
        hasLogged = true;
        cnzz.log('trend-qrcode-show');
        log('trend-qrcode-show');
      }
    };
  })();

  var copy = function copy(origin) {
    return JSON.parse(JSON.stringify(origin));
  };

  var originPrice = 0;
  var showHour = false;
  var store = undefined;
  var currentTime = undefined;
  var originData = undefined;
  var currentLineShowing = undefined;
  var plotWidth = undefined;

  originPrice = __webpack_require__(276);

  // 原始的价格数据大多是一天一个数据的,但是如果数据点过少,鼠标滑动时就会有卡顿感,因此绘制走势图时需要增大数据点的数目
  // 填充好数据后，由于走势图上的点是连续的,和原始数据并不一致
  // 例如3天的价格分别为1、2、3,走势图上第一天和第二天之间的数据为1.5,但是实际上并不存在这个价格,鼠标移到该位置时在tooltip中应该显示为1
  // 此函数用于从实际走势图中的位置找到对应的原始价格
  var getNearestPriceFromOriginData = function getNearestPriceFromOriginData(name, price, position, time) {
    var store = originData.store.filter(function (i) {
      return i.name === name;
    })[0];
    if (store == undefined) {
      return price;
    }
    var arr = store[currentLineShowing];
    if (!arr) {
      return price;
    }
    if (!store.all_equal_short && currentLineShowing !== 'short_day_line' && time) {
      var firstDay = undefined,
          days = undefined;

      switch (currentLineShowing) {
        case 'all_line':
          firstDay = store.all_line_begin_time;
          break;
        case 'half_year_line':
          firstDay = store.half_year_line_time;
          break;
        case 'month_line':
          firstDay = store.month_line_time;
          break;
      }
      firstDay = new Date(firstDay - 8 * 3600000);
      firstDay = new Date(firstDay.getYear() + 1900, firstDay.getMonth(), firstDay.getDate());
      days = time - firstDay.getTime();
      return arr[parseInt(days / oneDay)];
    }
    //return arr[diff.indexOf(minVal)];
    var intPos = parseInt(arr.length * position - 1);
    if (intPos < 0) {
      intPos += 1;
    }
    var toSelect = undefined;
    if (intPos >= 1) {
      toSelect = [arr[intPos - 1], arr[intPos], arr[intPos + 1]];
    } else {
      toSelect = [arr[intPos], arr[intPos + 1]];
    }
    toSelect = toSelect.filter(function (x) {
      return x !== undefined;
    });
    var diff = toSelect.map(function (i) {
      return Math.abs(i - price);
    });
    var p = diff.indexOf(Math.min.apply(null, diff));
    return toSelect[p];
  };

  var mousePosition = {
    x: 0,
    y: 0
  };

  Highcharts.setOptions({
    global: {
      timezoneOffset: 8
    }
  });

  // Highcharts选项
  var obj = {
    chart: {
      renderTo: 'plotArea_' + G.from_device,
      type: 'line',
      animation: false,
      marginRight: 290,
      marginLeft: 70,
      backgroundColor: 'white',
      events: {
        load: function load() {
          var firstSeries = this.series[0];
          var pointStart = this.xAxis[0].max - oneDay * 5;
          if (firstSeries.options.pointStart > pointStart) {
            pointStart = firstSeries.options.pointStart;
          }
          console.log('showingCenter', showingCenter);
          var waterMarkSrc = showingCenter ? 'https://cdn.bijiago.com/images/extensions/bijiago/bjg-logo@2x.png' : 'https://cdn.bijiago.com/images/extensions/bijiago/bjg-logo-big@2x.png';
          if (G.ss_name === 'priceDog') {
            waterMarkSrc = 'https://cdn.bijiago.com/images/extensions/bijiago/pricedog-logo@2x.png';
          }
          if (G.from_device === 'biyibi') {
            waterMarkSrc = 'https://cdn.bijiago.com/images/extensions/biyibi/watermark@2x.png';
          }
          var img = G.from_device === 'biyibi' ? this.renderer.image(waterMarkSrc, showingCenter ? '50%' : '50%', this.xAxis[0].top + 30, 412 * (showingCenter ? 0.7 : 1), 140 * (showingCenter ? 0.7 : 1)) : this.renderer.image(waterMarkSrc, '50%', this.xAxis[0].top + 35, showingCenter ? 241 : 375, showingCenter ? 110 : 159);
          img.add();
          if (showingCenter) {
            img.attr({
              transform: 'translate(-120, 0)'
            });
          } else {
            img.attr({
              transform: 'translate(-187.5, -25)'
            });
          }
          var series = this.series;
          // 让一个外部变量可访问，方便控制显示隐藏
          if (series && series[1] && series[1].name === '凑单到手价') {
            coudanSeries = series[1];
          }
          plotWidth = this.plotWidth;
          var theData = series[0].data;
          // theData.forEach((i) => {
          // 	if (i.y !== originPrice) {
          // 		originSeriesShouldShow = true;
          // 	}
          // });
          var days = 0;
          switch (currentShowing) {
            case 'plotYear':
              days = 180;
              break;
            case 'plotMonth':
              days = 30;
              break;
            case 'plot5Day':
              days = 5;
              break;
          }
          if (currentShowing !== 'plotAll' && !showingCenter) {
            this.xAxis[0].update({
              min: currentTime - days * oneDay,
              max: currentTime
            });
          }
          var currentShowingSeries = series.filter(function (item) {
            return item.visible && item.name !== 'max' && item.name !== 'min';
          });
          if (currentShowingSeries.length === 0) {
            return;
          }

          var arr = currentShowingSeries.map(function (i) {
            return i.options.pointStart;
          }).filter(function (i) {
            return i;
          });
          var minStart = Math.min.apply(null, arr);
          if (currentShowing !== 'plotAll' && !showingCenter) {
            minStart = currentTime - days * oneDay;
          }
          for (var i = 0; i < series.length; i++) {
            if (series[i].data.length) {
              theData = series[i].data;
              break;
            }
          }
          var lastPoint = theData[theData.length - 1];
          this.xAxis[0].update({
            min: minStart,
            max: lastPoint ? lastPoint.x : today.getTime()
          });
          var lmin = undefined,
              lmax = undefined;
          lmin = Math.floor(this.yAxis[0].dataMin);
          lmax = Math.ceil(this.yAxis[0].dataMax);
          var interv2 = Math.pow(10, lmin.toString().length - 2);
          var tkinterv = undefined;
          if (this.yAxis[0].dataMax < 1) {
            lmin = this.yAxis[0].dataMin;
            lmax = this.yAxis[0].dataMax;
            tkinterv = (lmax - lmin) / 2;
          } else if (this.yAxis[0].dataMin === this.yAxis[0].dataMax) {
            lmin = Math.floor(lmin / interv2) * interv2;
            lmax = lmin * 2;
            lmin = 0;
            tkinterv = parseInt((lmax - lmin) / 2);
          } else {
            lmin = Math.floor(lmin / interv2) * interv2;
            lmax = Math.ceil(lmax / interv2) * interv2;
            tkinterv = parseInt((lmax - lmin) / 5);
          }
          // 调整最大最小值 使曲线看起来分布均匀
          var tkinterv2 = Math.pow(10, parseInt(tkinterv).toString().length - 1);
          if (tkinterv < 1) {
            tkinterv2 = tkinterv;
          }
          tkinterv = Math.ceil(tkinterv / tkinterv2) * tkinterv2;
          this.yAxis[0].update({
            min: lmin,
            max: lmax,
            tickInterval: tkinterv || 1
          });

          // if (this.yAxis.length > 1) {
          // 	if (this.yAxis[0].dataMin == this.yAxis[0].dataMax) {
          // 		let interv = parseInt(this.yAxis[0].dataMin * 0.2);
          // 		if (interv > 100) {
          // 			interv = Math.round(interv / 100) * 100
          // 		}
          // 		this.yAxis[0].update({
          // 			min: parseInt(this.yAxis[0].dataMin * 0.5),
          // 			max: parseInt(this.yAxis[0].dataMin * 1.5),
          // 			tickInterval: interv
          // 		});
          // 	}
          // 	this.yAxis[1].update({
          // 		min: this.yAxis[1].dataMin,
          // 		max: this.yAxis[1].dataMax,
          // 		tickInterval: parseInt(this.yAxis[1].dataMax / 5) || 1
          // 	});
          // 	this.xAxis[0].update({
          // 		min: this.series[1].data[0].category
          // 	});
          // }
        }
      }
    },
    credits: {
      enabled: false
    },
    title: {
      text: null,
      style: {
        fontWeight: 'bold',
        fontFamily: 'Microsoft YaHei',
        fontSize: 16
      }
    },
    xAxis: {
      offset: 0,
      type: 'datetime',
      dateTimeLabelFormats: {
        minute: '%m/%d',
        hour: '%m/%d',
        day: '%m/%d',
        week: '%m/%d',
        month: '%y/%m'
      },
      crosshair: {
        dashStyle: 'ShortDash',
        snap: false,
        zIndex: 999,
        color: '#444'
      },
      minorGridLineColor: '#dfdfdf',
      labels: {
        rotation: 0,
        y: 30,
        style: {
          fontSize: '12px',
          fontFamily: 'Helvetica',
          color: '#969899'
        },
        align: 'center'
      },
      gridLineColor: '#e6e9eb',
      lineColor: '#e6e9eb',
      gridLineWidth: 1,
      tickLength: 0,
      minTickInterval: oneDay,
      startOnTick: false,
      tickPositioner: function tickPositioner() {
        var positions = [];
        var min = this.min;
        var max = this.max;
        var minDate = new Date(min);
        var tick = 0;
        var mode = undefined;
        var months = 1;
        if (max - min > 300 * oneDay) {
          var s = new Date(1900 + minDate.getYear(), minDate.getMonth() + 1, 2);
          tick = s.getTime();
          var widthPerMonth = plotWidth / ((max - min) / (30 * oneDay));
          while (months * widthPerMonth < 100) {
            months++;
          }
          mode = 'nmonth';
        } else if (max - min > 64 * oneDay) {
          var s = new Date(1900 + minDate.getYear(), minDate.getMonth() + 1, 2);
          tick = s.getTime();
          mode = 'month';
        } else if (max - min > 10 * oneDay) {
          tick = min;
          mode = 'day';
        } else {
          var s = new Date(1900 + minDate.getYear(), minDate.getMonth(), minDate.getDate() + 1);
          tick = s.getTime();
          mode = 'hour';
        }
        while (tick - 3600000 * 15 <= max) {
          positions.push(tick - 3600000 * 15);
          switch (mode) {
            case 'month':
              var s = new Date(tick);
              var s1 = new Date(1900 + s.getYear(), s.getMonth() + 1, 2);
              tick = s1.getTime();
              break;
            case 'day':
              tick += 5 * oneDay;
              break;
            case 'hour':
              tick += oneDay;
              break;
            case 'nmonth':
              s = new Date(tick);
              s1 = new Date(1900 + s.getYear(), s.getMonth() + months, 2);
              tick = s1.getTime();
              break;
          }
        }
        if (showingCenter) {
          var i = 0;
          while (positions[i] < this.min) i++;
          positions = [positions[i], positions[positions.length - 1]];
        }

        switch (mode) {
          case 'month':
          case 'nmonth':
            positions.info = {
              unitName: 'month',
              higherRanks: {}
            };
            break;
          default:
            positions.info = {
              unitName: 'day',
              higherRanks: {}
            };
        }
        // positions.forEach((i) => {
        //
        // });
        return positions;
      }
    },
    yAxis: {
      offset: 0,
      labels: {
        align: 'right',
        style: {
          fontSize: '12px',
          fontFamily: 'Helvetica',
          color: '#969899'
        },
        formatter: function formatter() {
          var valStr = undefined;
          if (!needFold || this.value < foldValue) {
            valStr = Highcharts.numberFormat(this.value, 2);
          } else {
            valStr = Highcharts.numberFormat(this.value + foldChange, 2);
          }
          // if (valStr[valStr.length - 1] === '.') {
          // 	valStr += '00';
          // }
          valStr = valStr.replace(',', '');
          if (Number(valStr) > 9999) {
            valStr = Number(valStr);
          } else if (Number(valStr) > 10) {
            valStr = parseInt(valStr);
          }
          var min = this.axis.tickPositions[0];
          if (this.axis.tickInterval === parseInt(this.axis.tickInterval) && min === parseInt(min)) {
            valStr = valStr.toString().replace('.00', '');
          }
          // let valNum = Number(valStr.replace(/,/g, ''))
          // if (valNum/100000 > 1) {
          // 	valStr = valNum/10000 + '万'
          // }
          return valStr;
        }
      },
      align: 'high',
      gridLineColor: '#e6e9eb',
      minorGridLineWidth: 0,
      title: {
        text: null,
        rotation: 0,
        y: -20,
        x: -13,
        align: 'high',
        offset: 0,
        style: {
          fontFamily: 'Microsoft YaHei',
          fontSize: 12,
          color: '#969899'
        }
      }
    },
    legend: {
      enabled: false
    },
    plotOptions: {
      series: {
        turboThreshold: 0,
        states: {
          hover: {
            enabled: true,
            halo: {
              size: 0
            }
          }
        },
        marker: {
          enabled: false
        },
        dataGrouping: {
          enabled: false
        },
        animation: false
      },
      line: {
        states: {
          hover: {
            enabled: true,
            lineWidth: 1
          }
        }
      }
    },
    tooltip: {
      shadow: false,
      shared: true,
      valueSuffix: '元',
      hideDelay: 0,
      shape: 'square',
      followPointer: false,
      dateTimeLabelFormats: {
        day: '%Y/%m/%e',
        minute: '%Y/%m/%e',
        second: '%Y/%m/%e',
        hour: '%Y/%m/%e %H:%M'
      },
      useHTML: true,
      positioner: function positioner(boxWidth, boxHeight, point) {
        if (point.plotX + boxWidth > this.chart.plotWidth + 12) {
          return {
            x: point.plotX - boxWidth + this.chart.plotLeft,
            y: this.chart.plotHeight / 2 - boxHeight / 2 + 45
          };
        }
        return {
          x: point.plotX + this.chart.plotLeft,
          y: this.chart.plotHeight / 2 - boxHeight / 2 + 45
        };
      },
      onHide: function onHide() {
        renderTooltip('hide');
      },
      formatter: function formatter() {
        var tipObj = {};
        tipObj.x = this.x;
        var x = new Date(this.x - 3600000 * 8);
        var year = x.getFullYear();

        var month = x.getMonth() + 1;
        var day = x.getDate();
        var hour = x.getHours();
        var hasdiscount = undefined;
        if (month < 10) month = '0' + month;
        if (day < 10) day = '0' + day;
        //showHour = true;
        var timeStr = year + '/' + month + '/' + day + (showHour ? ' ' + hour + ':00' : '');
        tipObj.time = timeStr.replace(/\//g, '.');
        var result1 = "";
        var filtered = this.points.sort(function (a, b) {
          var s = getNearestPriceFromOriginData(b.series.name, b.y, (b.point.index + 1) / b.series.data.length, b.x - 8 * 3600000) - getNearestPriceFromOriginData(a.series.name, a.y, (a.point.index + 1) / a.series.data.length, b.x - 8 * 3600000);
          return s;
        }).filter(function (item) {
          if (item.series.name === 'max' || item.series.name === 'min') {
            return false;
          }
          return true;
        });
        if (filtered.length === 0) {
          return false;
        }

        filtered.forEach(function (i, index) {
          var showName = i.point.series.name;
          var showPrice = getNearestPriceFromOriginData(showName, i.point.y, (i.point.index + 1) / i.point.series.data.length, i.point.x - 8 * 3600000);
          showPrice = Highcharts.numberFormat(showPrice, 2);
          if (showPrice[showPrice.length - 1] === '.') {
            showPrice += '00';
          }
          if (showName == '页面价') {
            tipObj.pagePrice = showPrice.replace(/,/g, '');
          } else if (showName == '凑单到手价') {
            tipObj.addpro = showPrice.replace(/,/g, '');
          }

          if (showName === "凑单到手价" && i.y === filtered[0].y && i.y === Number(tipObj.pagePrice)) {
            result1 += "";
          } else {
            if (showName === "凑单到手价") hasdiscount = true;
          }
        });
        if (hasdiscount) {
          var promoObj = discountInfo[(this.points[0].x - 3600000 * 19).toString()];
          var promotion = promoObj && promoObj["promotion"] || "";
          var quan = promoObj && promoObj["coupon"] && promoObj["coupon"].replace("领券:", "");
          var promoStr = "";
          if (quan) {
            if (quan.match(/\d+-\d+/)) {
              var quanarr = quan.split('-');
              promoStr += '券:&nbsp;满' + quanarr[0] + '减' + quanarr[1] + ' ';
            } else {
              promoStr += '券:&nbsp;' + quan + ' ';
            }
          }
          if (promotion) {
            promoStr += '促:&nbsp;' + promotion;
          }
          tipObj.promo1 = promoStr;
        }
        if (noTbTrend) {
          var time = util.getTimeNumber(new Date().getTime(), '5');
          // 不用highchart默认的tooltip  使用自定义的
          if (timeStr === time) {
            renderTooltip(null, tipObj);
          } else {
            renderTooltip('hide');
          }
        } else {
          renderTooltip(null, tipObj);
        }

        return;
      },
      backgroundColor: 'rgba(255,255,255,0.94)',
      borderColor: '#d5d5d5',
      borderWidth: 1,
      style: {
        padding: 0
      }
    },
    series: []
  };

  if (G.IE7 || G.IE8) {
    obj.tooltip.style = {
      width: '400px'
    };
  }

  var getEarlistDay = function getEarlistDay(store) {
    if (!store.length) {
      return false;
    }
    if (store.length === 1) {
      return store[0].all_line_begin_time;
    }
    return store.reduce(function (prev, next) {
      if (typeof prev == 'number') {
        return Math.min(prev, next.all_line_begin_time);
      } else {
        return Math.min(prev.all_line_begin_time, next.all_line_begin_time);
      }
    });
  };

  var seriesList = {
    plotAll: [],
    plotYear: [],
    plotMonth: [],
    plot5Day: [],
    plotSpecial: [],
    days180: []
  };

  var setXAxisMinInterval = function setXAxisMinInterval(x) {
    obj.xAxis.minTickInterval = x;
  };

  var qrlogged = false;

  var showSeries = function showSeries(series, isCenter, obj, minibar) {
    if (isCenter === undefined) isCenter = false;

    $('#gwd-topText').hide();
    $('.gwd-blurLayer').removeClass('gwd-blurLayer');
    var series2 = series;
    showingCenter = isCenter;
    if (hideCoudanManage && hideCoudanManage[series]) {
      $('#mini_price_history_bjg_detail_btn').addClass('no-review');
      $('.discount-price-re').hide();
      $('#bar_trend_legend_btn_bjg').addClass('no-review');
    } else if (hideCoudanManage) {
      $('#mini_price_history_bjg_detail_btn').removeClass('no-review');
      $('.discount-price-re').show();
      $('#bar_trend_legend_btn_bjg').removeClass('no-review');
    }
    if (series === 'center') {
      series = 'plotAll';
    }
    if (series !== 'days180') {
      // 加载概况 最高最低等信息
      renderBarTrendInfo(series);
    }
    obj.series = seriesList[series];
    if (series === 'days180') series = 'plotAll';
    $('.floatButtons-bjg>a').removeClass('activePlot');
    $('.floatButtons-bjg>#' + series).addClass('activePlot');
    //new Highcharts.Chart(obj);
    var theSeries = seriesList[series2];
    if (series === 'plot5Day') {
      setXAxisMinInterval(oneDay);
      showHour = true;
      currentLineShowing = 'short_day_line';
    } else {
      showHour = false;
    }
    if (series === 'plotMonth') {
      setXAxisMinInterval(5 * oneDay);
      currentLineShowing = 'month_line';
    }

    $('.gwd-not-login').removeClass('gwd-not-login');

    if (series === 'plotAll') {
      if (minibar) {
        obj.chart.marginBottom = 23;
      }
      var dayLength = Math.max.apply(null, theSeries.map(function (i) {
        return i.data.length;
      }));

      if (!G.email) {
        // $('.max-min-priinfo').addClass('gwd-not-login')
        // $('.barTrendInfoBox').addClass('gwd-not-login')
      } else {
          $('.gwd-not-login').removeClass('gwd-not-login');
        }

      if (dayLength > 30) {
        setXAxisMinInterval(30 * oneDay);
      } else if (dayLength > 5) {
        setXAxisMinInterval(5 * oneDay);
      } else {
        setXAxisMinInterval(oneDay);
      }
      currentLineShowing = 'all_line';
      if (store[0].all_equal_short || store[0].all_line.length < 5 && store.length == 1) {
        currentLineShowing = 'short_day_line';
        showHour = true;
        if (store[0].all_line.length < 5 && store.length == 1) {
          obj.series[0].pointStart = today.getTime() + 8 * 3600000 - (store[0].all_line.length - 1) * oneDay;
        }
      }
    }
    if (series === 'plotYear') {
      setXAxisMinInterval(30 * oneDay);
      currentLineShowing = 'half_year_line';
    }
    if (isCenter) {
      //currentShowing = 'center';
    } else {
        currentShowing = series;
      }
    chart = new Highcharts.Chart(obj);
  };

  var enablePlot = function enablePlot(plotName) {
    $('.floatButtons-bjg>' + plotName).removeClass('bjd-hidden');
  };

  var doBind = function doBind() {
    $('.floatButtons-bjg').on('click', 'a', function (e) {
      showSeries(e.target.id, false, util.deepCopy(obj));
    });
  };
  var doMainBind = function doMainBind() {
    var hidecoudanBar = undefined;
    $('#bar_trend_legend_btn_bjg').on('click', function (e) {
      var id = $(e.target).attr('data-id');
      if (!id) id = $(e.target).parent().attr('data-id');
      if (id === 'plotSpecial') {
        if (!hidecoudanBar) {
          hidecoudanBar = true;
          coudanSeries.hide();
          $('#bar_trend_legend_btn_bjg').addClass('hideserires');
        } else {
          coudanSeries.show();
          hidecoudanBar = false;
          $('#bar_trend_legend_btn_bjg').removeClass('hideserires');
        }
      }
    });
  };
  var doMiniBind = function doMiniBind() {
    var hidecoudan = undefined;
    $('#mini_price_history_bjg_detail_btn').on('click', function (e) {
      var id = $(e.target).attr('data-id');
      if (!id) id = $(e.target).parent().attr('data-id');
      if (id === 'plotSpecial') {
        if (!hidecoudan) {
          hidecoudan = true;
          coudanSeries.hide();
          $('#mini_price_history_bjg_detail_btn').addClass('hideserires');
        } else {
          coudanSeries.show();
          hidecoudan = false;
          $('#mini_price_history_bjg_detail_btn').removeClass('hideserires');
        }
      }
    });
  };
  var resetData = function resetData(i) {
    return {
      y: i,
      marker: {
        enabled: false
      }
    };
  };
  // 加载价格走势最高最低信息
  var renderBarTrendInfo = function renderBarTrendInfo(series) {
    var showcoudan = undefined;
    var obj1 = lowHighInfoObj[series + '0'];
    if (!obj1) {
      obj1 = lowHighInfoObj['plotAll' + '0'];
    }
    if (typeof obj1.lowestDate === 'number') obj1.lowestDate = util.getTimeNumber(obj1.lowestDate);
    var obj2 = lowHighInfoObj[series + '1'];
    if (obj2) {
      if (obj2.Plowest < obj1.Plowest) showcoudan = true;
      if (typeof obj2.lowestDate === 'number') obj2.lowestDate = util.getTimeNumber(obj2.lowestDate);
      if (moneyInfo) {
        obj2.display_nowprice = obj2.nowprice ? moneyInfo[0] + obj2.nowprice : obj2.nowprice;
        obj2.display_Phighest = obj2.Phighest ? moneyInfo[0] + obj2.Phighest : obj2.Phighest;
        obj2.display_Plowest = obj2.Plowest ? moneyInfo[0] + obj2.Plowest : obj2.Plowest;
      } else {
        obj2.display_nowprice = '¥' + obj2.nowprice;
        obj2.display_Phighest = '¥' + obj2.Phighest;
        obj2.display_Plowest = '¥' + obj2.Plowest;
      }
    }
    if (moneyInfo) {
      obj1.display_nowprice = obj1.nowprice ? moneyInfo[0] + obj1.nowprice : obj1.nowprice;
      obj1.display_Phighest = obj1.Phighest ? moneyInfo[0] + obj1.Phighest : obj1.Phighest;
      obj1.display_Plowest = obj1.Plowest ? moneyInfo[0] + obj1.Plowest : obj1.Plowest;
    } else {
      obj1.display_nowprice = '¥' + obj1.nowprice;
      obj1.display_Phighest = '¥' + obj1.Phighest;
      obj1.display_Plowest = '¥' + obj1.Plowest;
    }
    var html = __webpack_require__(277);
    $('.barTrendInfoBox').remove();
    var lowtle = lang.getString(config, 'lowestSingleWithSpace');
    if (G.aliSite) {
      lowtle = lang.getString(config, 'lowest');
    } else if (!hideCoudanManage || !obj2) {
      lowtle = lang.getString(config, 'lowestSingle');
    }
    var oinfo = userData.get('other_info');
    var dp_id = oinfo && oinfo.now && oinfo.now.dp_id;
    var promoUrl = undefined;
    if (dp_id) {
      promoUrl = 'https://www.gwdang.com/trend/' + dp_id + '.html?static=true';
    }
    if (obj1 && obj2 && obj1.Plowest === obj2.Plowest && obj1.lowestDate === obj2.lowestDate) {
      obj2 = null;
    }
    if (!G.h_nopuzzle_promo) {
      promoUrl = null;
    }
    $('#bjg-pri-trend-chart').append(template.compile(html)({
      d1: obj1,
      d2: obj2,
      aliSite: G.aliSite,
      promoUrl: promoUrl,
      lowtle: lowtle,
      showcoudan: showcoudan,
      textCurrent: lang.getString(config, 'textCurrent'),
      textHigh: lang.getString(config, 'textHigh'),
      textLow: lang.getString(config, 'textLow'),
      Combine: lang.getString(config, 'combine')
    }));
    setTimeout(function () {
      // 为了上下对齐， 需要手动计算一次上面的距离给下面
      var ppiW = $('#bjgext_maintrend_detail .opi-sp1').outerWidth() + $('#bjgext_maintrend_detail .opi-sp2').outerWidth();
      $('#bjgext_maintrend_detail .ppi-sp1').width(Math.ceil(ppiW) + 2);
    }, 100);
  };
  var getLowestDate2 = function getLowestDate2(ki, data) {
    var store = data.store[ki];
    if (ki === 1) {
      var origin_st = data.store[0].all_line;
      if (store.all_line.join("") === origin_st.join("")) {
        return;
      }
    }
    getLowestDate('plotAll', ki, store.all_line, store.all_equal_short, store.all_line_begin_time, data.promo);
    if (store.half_year_line && store.half_year_line.length > 0) {
      if (ki === 1) {
        var origin_st = data.store[0].half_year_line;
        if (store.half_year_line.join("") === origin_st.join("")) {
          return;
        }
      }
      getLowestDate('plotYear', ki, store.half_year_line, store.all_equal_short, store.half_year_line_time, data.promo);
    }
    var newStsize = store.all_line.length;
    if (newStsize > 180) {
      newStsize = store.all_line.length;
      var newSt = store.all_line.slice(newStsize - 180);
      if (ki === 1) {
        var origin_st = data.store[0].all_line.slice(newStsize - 180);
        if (newSt.join("") === origin_st.join("")) {
          return;
        }
      }
      var pointStart = store.all_line_begin_time + 86400000 * (newStsize - 180);
      getLowestDate('days180', ki, newSt, store.all_equal_short, pointStart, data.promo);
    } else {
      if (ki === 1) {
        var origin_st = data.store[0].all_line;
        if (store.all_line.join("") === origin_st.join("")) {
          return;
        }
      }
      getLowestDate('days180', ki, store.all_line, store.all_equal_short, store.all_line_begin_time, data.promo);
    }
    if (store.month_line && store.month_line.length > 0) {
      if (ki === 1) {
        var origin_st = data.store[0].month_line;
        if (store.month_line.join("") === origin_st.join("")) {
          return;
        }
      }
      getLowestDate('plotMonth', ki, store.month_line, store.all_equal_short, store.month_line_time, data.promo);
    }
  };
  var getLowestDate = function getLowestDate(id, ki, newSt, all_equal_short, pointStart, promo) {
    // 计算最低最高点 以及最低点对应的时间
    id = id + ki.toString();
    lowHighInfoObj[id] = {};
    var Plowest = undefined,
        Phighest = undefined;
    var lowestDate = undefined;
    var lowestPromo = undefined,
        lowestPromoPprice = undefined,
        lowestCoupon = undefined;
    Plowest = Math.min.apply(Math, newSt);
    Phighest = Math.max.apply(Math, newSt);
    var low_index = newSt.lastIndexOf(Plowest);
    var low_index2 = low_index;
    var point_interval = 86400000;
    if (all_equal_short) point_interval = 3600000;
    lowestDate = pointStart + point_interval * low_index;
    if (ki == 1) {
      for (var k = low_index2; k > 0; k--) {
        if (newSt[k] === newSt[low_index2]) {
          var str = (pointStart + point_interval * k - 3600000 * 8).toString();
          if (Number(discountInfo2[str] && discountInfo2[str].price) == Plowest) {
            lowestDate = Number(str) + 3600000 * 8;
            break;
          }
        }
      }
      for (var i = 0; i < promo.length; i++) {
        // 获取最低点对应的促销活动
        if (promo[i].time * 1000 === lowestDate - 3600000 * 8) {
          lowestPromo = promo[i].msg.promotion;
          lowestCoupon = promo[i].msg.coupon && promo[i].msg.coupon.replace("领券:", "");
          lowestPromoPprice = (promo[i].ori_price / 100).toFixed(2);
        }
      }
    }

    lowHighInfoObj[id].lowestDate = lowestDate;
    lowHighInfoObj[id].Plowest = Number(Plowest).toFixed(2);
    lowHighInfoObj[id].Phighest = Number(Phighest).toFixed(2);
    if (lowHighInfoObj[id].Phighest === lowHighInfoObj[id].Plowest) {
      lowHighInfoObj[id].nowprice = lowHighInfoObj[id].Plowest;
    }
    if (lowestPromo || lowestCoupon) {
      var str = '';
      str += '页面价' + lowestPromoPprice + '&nbsp;&nbsp;';
      if (lowestCoupon) {
        if (lowestCoupon.match(/\d+-\d+/)) {
          var quanarr = lowestCoupon.split('-');
          str += '券: 满' + quanarr[0] + '减' + quanarr[1] + '&nbsp;';
        } else {
          str += '券: ' + lowestCoupon + ' ';
        }
      }
      if (lowestPromo) str = str + '促: ' + lowestPromo.replace(/，/g, ',');
      lowHighInfoObj[id].lowestPromo = str;
      lowHighInfoObj[id].lowestPromoPprice = lowestPromoPprice;
    }
  };
  var pageLow = {};
  // 在走势图上加label标签
  var addSeriesDataLabels = function addSeriesDataLabels(data, nopuzzle_promo, key) {
    var addpromo = undefined;
    if (data.name === '页面价' && nopuzzle_promo) {
      addpromo = true;
    }
    var obj = {
      enabled: true,
      borderColor: '#f2f2f2',
      borderWidth: 1,
      padding: 3,
      backgroundColor: 'rgba(255, 255, 255, 0.7)',
      shadow: false,
      borderRadius: 2,
      style: {
        fontWeight: 'normal',
        fontFamily: 'Helvetica',
        fontSize: '13px'
      },
      y: -3,
      formatter: function formatter() {
        return '¥' + this.y.toString().replace(',', '');
      }
    };
    var list = data.data;
    var lowestIndex = 0;
    var highestIndex = 0;
    var low = list[0].y || 9999999;
    var high = list[0].y || 0;
    var allNull = true;
    for (var i = 0; i < list.length; i++) {
      if (i != 0 && i != list.length - 1 && list[i].y) {
        allNull = false;
      }
      if (addpromo) {
        for (var j = 0; j < nopuzzle_promo.length; j++) {
          if (data.pointStart + data.pointInterval * i - 3600000 * 19 === nopuzzle_promo[j].time * 1000) {
            if (nopuzzle_promo[j].showCircle) {
              list[i].marker = {
                enabled: true,
                fillColor: '#fff',
                lineColor: '#5ACFFB',
                radius: 2.5,
                lineWidth: 1,
                symbol: "circle"
              };
            }
          }
        }
      }
      if (list[i].y && list[i].y >= high) {
        high = list[i].y;
        highestIndex = i;
      }
      if (list[i].y && list[i].y <= low) {
        low = list[i].y;
        lowestIndex = i;
      }
    }
    if (data.name === '页面价') {
      pageLow[key] = list[lowestIndex].y;
    }
    if (allNull && data.name === '凑单到手价' && hideCoudanManage) {
      hideCoudanManage[key] = true;
      return;
    }

    if ((!list[lowestIndex - 1] || list[lowestIndex - 1].y === null) && (!list[lowestIndex + 1] || list[lowestIndex + 1].y === null)) {
      return;
    }
    if (data.name === '凑单到手价' && pageLow[key] === list[lowestIndex].y) {
      return;
    }
    if (highestIndex === lowestIndex) {
      obj.color = '#3FC0F0';
      // list[highestIndex].dataLabels = obj;
    } else {
        obj.color = '#E4393C';
        if (data.name === '页面价') {
          // list[highestIndex].dataLabels = obj;
          list[highestIndex].marker = {
            enabled: true,
            fillColor: 'rgba(228,57,60,1)',
            lineColor: 'rgba(228,57,60,0.3233)',
            radius: 2.5,
            lineWidth: 4,
            symbol: "circle"
          };
        }

        var obj2 = JSON.parse(JSON.stringify(obj));
        obj2.color = '#35BD68';
        var fillColor = 'rgba(53,189,104,1)';
        var lineColor = 'rgba(53,189,104,0.3233)';
        if (data.name === '凑单到手价') {
          obj2.color = '#FFC06D';
          fillColor = 'rgba(255,166,0,1)';
          lineColor = 'rgba(255,166,0,0.3233)';
        }
        // list[lowestIndex].dataLabels = obj2;
        list[lowestIndex].marker = {
          enabled: true,
          fillColor: fillColor,
          lineColor: lineColor,
          radius: 2.5,
          lineWidth: 4,
          symbol: "circle"
        };
      }
    if (noTbTrend) {
      list[list.length - 1].marker = {
        enabled: true,
        fillColor: '#5ACFFB',
        radius: 2.5,
        lineWidth: 0,
        symbol: "circle"
      };
    }
  };
  var renderTooltip = function renderTooltip(ishide, data) {
    if (ishide) {
      $(toolTipDom).hide();
      return;
    }
    $(toolTipDom).show();
    if (data.addpro === data.pagePrice) data.addpro = null;
    if (nopuzzlePpromo) {
      for (var i = 0; i < nopuzzlePpromo.length; i++) {
        if (data.x - 3600000 * 19 === nopuzzlePpromo[i].time * 1000) {
          var str = '';
          if (nopuzzlePpromo[i].msg.coupon) {
            var coupon = nopuzzlePpromo[i].msg.coupon;
            if (coupon.match(/\d+-\d+/)) {
              var quanarr = coupon.split('-');
              str += '券:&nbsp;满' + quanarr[0] + '减' + quanarr[1] + ' ';
            } else {
              str += '券:&nbsp;' + coupon + ' ';
            }
          }
          if (nopuzzlePpromo[i].msg.promotion) {
            str = str + '促:&nbsp;' + nopuzzlePpromo[i].msg.promotion + '  ';
          }
          data.directpro = (nopuzzlePpromo[i].price / 100).toFixed(2);
          data.promo2 = str;
          data.pagePrice = (nopuzzlePpromo[i].ori_price / 100).toFixed(2);
        }
      }
    }
    var html = __webpack_require__(278);
    if (toolTipDom !== '#big_tooltip_bjg') {
      html = __webpack_require__(279);
    }
    var domclass = '';
    if (data.directpro) domclass += 'directpro ';
    if (data.addpro) domclass += 'addpro ';
    if (data.addpro || data.directpro) {
      $(toolTipDom).addClass('bigheight');
    } else {
      $(toolTipDom).removeClass('bigheight');
    }
    if (moneyInfo) {
      var np = parsePrice(data.pagePrice, moneyInfo[2]);
      if (G.ss_name !== 'priceDog') {
        data.pagePrice = moneyInfo[0] + data.pagePrice + ('(¥' + np + ')');
      } else {
        data.pagePrice = moneyInfo[0] + data.pagePrice;
      }
    } else {
      data.pagePrice = '¥' + data.pagePrice;
    }
    var compiledHtml = template.compile(html)({
      data: data,
      domclass: domclass,
      aliSite: G.aliSite,
      combinePrice: lang.getString(config, 'combinePrice'),
      pagePrice: lang.getString(config, 'pagePrice'),
      onHandPrice: lang.getString(config, 'onHandPrice'),
      lang: G.lang
    });
    var len = compiledHtml.match(/class="tip-item /g).length;
    if (len === 1 && G.lang === 'en') {
      compiledHtml = compiledHtml.replace(/class="tip-item-sp1/g, 'style="width: 30px!important;" class="tip-item-sp1').replace(/class="tip-item-sp4/g, 'style="width: 322px;!important" class="tip-item-sp4');
    }
    $(toolTipDom).empty().append(compiledHtml);
    // if (G.lang === 'en') {
    //   setTimeout(() => {
    //     $('.big_tooltip_bjg_box .tip-item-sp4').css('width', '232px')
    //     $('.tip-item-sp1').css('width', '120px;')
    //   }, 0)
    // }
  };
  // 两条线相同点部分去掉 避免重叠造成颜色污染
  var sliceData = function sliceData(data) {
    for (var pattern in data) {
      if (data[pattern].length && data[pattern].length > 1 && data[pattern][1].name === "凑单到手价") {
        var size = data[pattern][0].data.length;
        for (var i = 2; i < size; i++) {
          var a1 = data[pattern][0].data;
          var a2 = data[pattern][1].data;
          if (a1[i].y === a2[i].y && a1[i - 1].y === a2[i - 1].y && (a1[i - 2].y === a2[i - 2].y || a2[i - 2].y === null)) {
            a2[i - 1].y = null;
          }
        }
      }
    }
  };

  exports = {
    init: function init(data) {
      var currentPage = arguments.length <= 1 || arguments[1] === undefined ? 'dpPage' : arguments[1];
      var target = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
      var plotLinesHideStatus = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
      var renderMiniTrendInfo, img, temp, biggraphState, renderMiniTrend, imgCmp, cmpLogged, renderChartEvent;
      return regeneratorRuntime.async(function init$(context$2$0) {
        var _this = this;

        while (1) switch (context$2$0.prev = context$2$0.next) {
          case 0:
            // 评论走势
            //renderReviewData(data)
            currentShowing = 'plotAll';

            if (!window.bjgTrendInit) {
              window.bjgTrendInit = true;
            }

            seriesList = {
              plotAll: [],
              plotYear: [],
              plotMonth: [],
              plot5Day: [],
              plotSpecial: [],
              days180: []
            };

            if (G.site.indexOf('amazon') > -1) {
              $('#bjgext_mb_bg').css('width', '390px').css('border-right', 'none');
              $('#bjgext_minibar').css('width', '393px');
              $('.bjgext-toptabs').css('width', '391px');

              $('#mini_price_history_bjg_detail').css('width', '451px').css('overflow', 'hidden');
              $('.app-tuiguang-bjgou').remove();
            }

            if (G.ss_name === 'priceDog') {
              $('#bjgouRemind').remove();
              if (G.site.indexOf('amazon') > -1) {
                $('.bjgext-mini-compare').remove();
              }
            }

            originPrice = 0;
            renderMiniTrendInfo = undefined;

            // 加载货币配置 获取当前网站货币符号
            moneyInfo = countryConfig.getMoneyInfo(G.logsite);
            if (data.taobaoNoTrend) noTbTrend = true;

            if (!(data.store && data.store[0] && data.store[0].all_line.length === 0)) {
              context$2$0.next = 11;
              break;
            }

            return context$2$0.abrupt('return');

          case 11:
            $('body').append('<div id="biggraph_' + G.from_device + '" style="position: absolute;left: -1000000px; top: -100000px;background: white;overflow: hidden"></div>');

            // let dpId = await require('common/globalCondition').met('GwdDpIdGot')
            img = '';
            temp = viewTest;

            if (G.lang === 'en') {
              temp = viewTest.replace(/天/g, 'days').replace(/日线/g, 'days');
            }

            __webpack_require__(6).log('trend render', 'init');
            $(chartBox).append(template.compile(temp)({
              extBrand: G.extBrand,
              from_device: G.from_device,
              s_server: G.s_server,
              qrCodeImg: img.imgSrc
            }));

            biggraphState = '';

            doBind();

            if (target) {
              $(target).append($(chartBox));
            }

            // 顶部
            $('#' + G.extName + '-trend').hover(function callee$2$0() {
              var num, chartArea;
              return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                while (1) switch (context$3$0.prev = context$3$0.next) {
                  case 0:
                    // if (!img) {
                    //   img = await require('common/request').get(`${G.server}/extension/QrCode?tag=PriceHistory&dp_id=${dpId}`)
                    // }
                    // $('#qrcode-trend').attr('src', img.imgSrc)
                    toolTipDom = '#big_tooltip_bjg_top';
                    obj.chart.marginRight = 30;
                    obj.chart.marginBottom = 23;
                    obj.chart.marginTop = 4;
                    obj.xAxis.labels.y = 22;
                    if (moneyInfo) {
                      obj.yAxis.title.text = moneyInfo[1];
                      obj.yAxis.title.y = 176;
                    }
                    num = parseInt(lowHighInfoObj['plotAll0'].Phighest).toString().length;

                    obj.chart.marginLeft = 29 + 19 + parseInt(num * 6.8);
                    obj.yAxis.labels.x = -9;
                    obj.yAxis.title.x = -(9 + parseInt(num * 6.8) - 24);
                    $(chartBox).css({
                      left: 0,
                      top: 0,
                      bottom: 0,
                      right: 0
                    });

                    if (!(biggraphState === 'trend')) {
                      context$3$0.next = 13;
                      break;
                    }

                    return context$3$0.abrupt('return');

                  case 13:
                    chartArea = $('#' + G.extName + '-pri-trend-chart');

                    chartArea.append($(chartBox));
                    biggraphState = 'trend';
                    $('.floatButtons-bjg').show();
                    $('#bjd-qrcode-trend').show();
                    if ($('#bjd-qrcode-trend').length) {
                      doLog();
                    }
                    $(chartBox).css({
                      visibility: 'hidden'
                    });
                    window.setTimeout(function () {
                      var width1 = $('.floatButtons-bjg').width();
                      $('#bar_trend_legend_btn_bjg').css('right', width1 + 50 + 'px');
                      showSeries(currentShowing, false, util.deepCopy(obj));
                      var width = $('#' + G.extName + '-pri-trend-chart').width();
                      chart.setSize(width, 182);
                      plotWidth = chart.plotWidth;
                      chart.axes[0].update(obj.xAxis);
                      $(chartBox).css({
                        visibility: 'visible'
                      });
                      doMainBind();
                    }, 0);

                  case 21:
                  case 'end':
                    return context$3$0.stop();
                }
              }, null, _this);
            });

            renderMiniTrend = function renderMiniTrend(detail) {
              toolTipDom = '#big_tooltip_bjg';
              var lowest_obj = lowHighInfoObj['days1800'];
              var lowest_obj2 = undefined,
                  lowestDate = undefined,
                  lowestDate2 = undefined;
              if (data.store[1] && data.store[1].name === '凑单到手价') {
                lowest_obj2 = lowHighInfoObj['days1801'];
                lowestDate2 = lowest_obj2 && lowest_obj2.lowestDate;
                lowestDate2 = lowestDate2 && util.getTimeNumber(lowestDate2);
              }
              lowestDate = lowest_obj.lowestDate;
              if (G.aliSite && data.lowestTime) lowestDate = new Date(data.lowestTime).getTime();
              // lowestDate = lowestDate - 3600000 * 8;

              lowestDate = util.getTimeNumber(lowestDate);
              if (!renderMiniTrendInfo) {
                var oinfo = userData.get('other_info');
                var dp_id = oinfo && oinfo.now && oinfo.now.dp_id;
                var promoUrl = undefined;
                if (dp_id) {
                  promoUrl = 'https://www.gwdang.com/trend/' + dp_id + '.html?static=true';
                }
                var infohtml = __webpack_require__(280);
                var lowtle = lang.getString(config, 'lowestSingleWithSpace');
                if (G.aliSite) {
                  lowtle = lang.getString(config, 'lowest');
                } else if (!hideCoudanManage || !lowest_obj2) {
                  lowtle = lang.getString(config, 'lowestSingle');
                }
                if (lowest_obj && lowest_obj2 && lowest_obj.Plowest === lowest_obj2.Plowest && lowest_obj.lowestDate === lowest_obj2.lowestDate) {
                  lowest_obj2 = null;
                }
                if (!G.h_nopuzzle_promo) {
                  promoUrl = null;
                }

                $('.bjgext-mini-trend .max-min-priinfo-bjg').append(template.compile(infohtml)({
                  lowtle: lowtle,
                  aliSite: G.aliSite,
                  lowest_obj: lowest_obj,
                  lowestDate: lowestDate,
                  lowestDate2: lowestDate2,
                  promoUrl: promoUrl,
                  lowest_obj2: lowest_obj2,
                  currency: moneyInfo ? moneyInfo[0] : '¥',
                  textCurrent: lang.getString(config, 'textCurrent'),
                  textHigh: lang.getString(config, 'textHigh'),
                  textLow: lang.getString(config, 'textLow'),
                  Combine: lang.getString(config, 'combine')
                }));
                // 分享商品
                // require('shareProduct').init(data.price_status)
                if (!lowest_obj2) {
                  $('#mini_price_history_bjg').removeClass('coudanpri');
                }
                // setTimeout(function() {
                //   let ppiW = $('.opi-sp1').outerWidth() + $('.opi-sp2').outerWidth()
                //   $('.promo-pri-info .ppi-sp1').width(Math.ceil(ppiW) + 2)
                // }, 100)

                renderMiniTrendInfo = true;
              }

              if (moneyInfo) {
                $('#mini_price_history_bjg .ht-mm-max').text(moneyInfo[0] + lowest_obj.Phighest);
                $('#mini_price_history_bjg .ht-mm-min').text(moneyInfo[0] + lowest_obj.Plowest);
                $('#big_tooltip_bjg').addClass('ht_tip');
              }

              obj.title.x = 0;
              obj.chart.marginRight = 16;
              obj.chart.marginTop = 5;
              obj.yAxis.title.text = null;
              obj.xAxis.labels.y = 20;
              obj.yAxis.title.y = -26;
              if (moneyInfo) {
                obj.chart.marginTop = 4;
                var num = parseInt(lowest_obj.Phighest).toString().length;
                obj.chart.marginRight = 10;
                obj.chart.marginLeft = 16 + 14 + parseInt(num * 6.8);
                obj.chart.marginBottom = 24;
                //obj.yAxis.labels.x = -Math.ceil(num * 6.8 + 11);
                obj.yAxis.labels.x = -14;
                obj.yAxis.title.x = -(Math.ceil(num * 6.8 + 11) - 24); //25 title长度
                obj.yAxis.title.text = moneyInfo[1];
                //obj.yAxis.title.y = 162;
                obj.yAxis.title.y = -12;
              } else {
                var num = parseInt(lowest_obj.Phighest).toString().length;
                obj.chart.marginLeft = 16 + 14 + parseInt(num * 6.8);
                obj.yAxis.labels.x = -14;
              }
              if (lowest_obj.Phighest < 1) {
                obj.chart.marginLeft = 16 + 14 + parseInt(4 * 6.8);
              }
              $('.floatButtons-bjg').hide();
              $('#bjd-qrcode-trend').hide();
              // yhd.com
              $('#detailPromotion').css({
                zIndex: 0
              });
              $(chartBox).css({
                left: 0,
                top: 0,
                bottom: 0,
                right: 0
              });
              if (biggraphState === 'btn') return;
              $(detail).append($(chartBox));
              doMiniBind();
              biggraphState = 'btn';
              $(chartBox).css({
                visibility: 'hidden'
              });
              window.setTimeout(function () {
                originPrice = 0;
                // if (data.store[0].all_line.length > 31 && !data.store[0].all_equal_short) {
                // 	showSeries('plotMonth', true);
                // } else {
                // 	showSeries('plotAll', true);
                // }
                showSeries('days180', true, util.deepCopy(obj), true);
                var width1 = $('#bdext_mini_trendbox').width();
                var height1 = 182;
                if (!width1) {
                  width1 = 460;
                }
                if (G.site == 'amazon' || G.site == '6pm') {
                  width1 = 402;
                  height1 = 172;
                }

                if (G.site.indexOf('amazon') > -1) {
                  width1 = 450;
                }

                if (width1 && width1 > 0) {
                  chart.setSize(width1, height1, false);
                }
                $(chartBox).css({
                  visibility: 'visible'
                });
              }, 25);
            };

            imgCmp = '';
            cmpLogged = false;

            $('#mini_price_history_bjg').hover(function callee$2$0() {
              var doms;
              return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                while (1) switch (context$3$0.prev = context$3$0.next) {
                  case 0:
                    doms = '#mini_price_history_bjg_detail_chart';

                    if (G.site == 'amazon' || G.site == '6pm') {
                      doms = '#mini_ht_detail_chart';
                    }
                    // if (!imgCmp) {
                    //   imgCmp = await require('common/request').get(`${G.server}/extension/QrCode?tag=PromoDetail&dp_id=${dpId}`)
                    // }
                    // $('#qrcode-compare').attr('src', imgCmp.imgSrc)
                    // if ($('#qrcode-compare')[0] && !cmpLogged) {
                    // cmpLogged = true;
                    //cnzz.log('二维码', '展示', '中间促销');
                    // }
                    $('body').addClass('gwd-trend-hover-p');
                    renderMiniTrend(doms);

                  case 4:
                  case 'end':
                    return context$3$0.stop();
                }
              }, null, _this);
            });

            // yhd.com
            $('#mini_price_history_bjg_detail').mouseleave(function () {
              $('#detailPromotion').css({
                zIndex: 15
              });
            });

            renderChartEvent = function renderChartEvent(str) {
              //baidu bottom
              $('.' + str + '-trend').on('mouseenter', function () {
                // hideLine = plotLinesHideStatus.baidu;
                if (biggraphState === 'bdtrend') {
                  $('#' + str + '_maintrend_detail').show();
                  return;
                }
                toolTipDom = '#big_tooltip_bjg_top';
                obj.legend.enabled = false;
                obj.chart.marginRight = 180;
                obj.chart.marginRight = 60;
                obj.chart.marginBottom = 23;
                obj.chart.marginTop = 4;
                obj.xAxis.labels.y = 22;
                $(chartBox).css({
                  left: 0,
                  top: 0,
                  bottom: 0,
                  right: 0
                });
                $('#' + str + '_maintrend_detail #bjg-pri-trend-chart').append($(chartBox));
                biggraphState = 'bdtrend';
                $(chartBox).css({
                  visibility: 'hidden'
                });
                window.setTimeout(function () {
                  showSeries(currentShowing, false, util.deepCopy(obj));
                  var width = $('#' + str + '_maintrend_detail').width();
                  if (width && width > 0)
                    // chart.setSize(width, 254, false);
                    chart.reflow();
                  $(chartBox).css({
                    visibility: 'visible'
                  });
                  doMainBind();
                }, 25);
                $('#' + str + '_maintrend_detail').css('display', 'flex');
                $('.floatButtons-bjg').show();
              });
              //baidu mini
              $('.' + str + '-mini-trend').on('mouseenter', function () {
                $('body').addClass('gwd-trend-hover-p');
                renderMiniTrend('#mini_price_history_bjg_detail_chart');
                $('#mini_price_history_bjg_detail').show();
              });
            };

            if (G.from_device === 'bijiago' || G.from_device === 'biyibi') {
              renderChartEvent('bjgext');
            } else {
              renderChartEvent('bdext');
            }

            // 底部
            $('#gwd-trend').hover(function callee$2$0() {
              return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                while (1) switch (context$3$0.prev = context$3$0.next) {
                  case 0:
                    if (!(biggraphState === 'gwd')) {
                      context$3$0.next = 2;
                      break;
                    }

                    return context$3$0.abrupt('return');

                  case 2:
                    obj.chart.marginRight = 60;
                    obj.chart.marginBottom = 23;
                    obj.chart.marginTop = 4;
                    obj.xAxis.labels.y = 22;
                    $(chartBox).css({
                      left: 0,
                      top: 0,
                      bottom: 0,
                      right: 0
                    });
                    $('#gwd-trend-chart').append($(chartBox));
                    biggraphState = 'gwd';
                    $(chartBox).css({
                      visibility: 'hidden'
                    });
                    window.setTimeout(function () {
                      showSeries(currentShowing, false, util.deepCopy(obj));
                      chart.reflow();
                      $(chartBox).css({
                        visibility: 'visible'
                      });
                      $('#gwd-trend-chart').show();
                      doMainBind();
                    }, 0);

                    $('.floatButtons-bjg').show();
                    $('#bjd-qrcode-trend').show();
                    if ($('#bjd-qrcode-trend').length) {
                      doLog();
                    }
                    $('#bjd-qrcode-trend').css('bottom', '9px');

                  case 15:
                  case 'end':
                    return context$3$0.stop();
                }
              }, null, _this);
            });

            $('#plotArea_' + G.from_device).css({
              maxWidth: document.body.clientWidth - 280 + 'px'
            });

            $('#plotArea_' + G.from_device).mousemove(function (e) {
              mousePosition.x = e.pageX;
              mousePosition.y = e.pageY;
            });

            $('#plotArea_' + G.from_device).click(function () {
              return false;
            });

            if (data) {
              (function () {
                store = data.store;
                getLowestDate2(0, data);
                if (data.store[1] && data.store[1].name === "凑单到手价" && data.promo) {
                  // 如果有凑单到手价同时有对应的促销活动   把促销活动信息给一个全局变量方便取用
                  for (var i = 0; i < data.promo.length; i++) {
                    // if (discountInfo[(data.promo[i].time * 1000).toString()]) {
                    // 	continue
                    // }
                    discountInfo[(data.promo[i].time * 1000).toString()] = data.promo[i].msg;
                    discountInfo2[(data.promo[i].time * 1000).toString()] = {
                      price: data.promo[i].price,
                      info: data.promo[i].msg.promotion
                    };
                  }
                  // 计算最低最高价和时间
                  getLowestDate2(1, data);
                  $(".discount-price-re").show();
                  $('#mini_price_history_bjg').addClass('coudanpri');
                } else {
                  hideCoudanManage = null;
                  $('#bar_trend_legend_btn_bjg').addClass('no-review');
                  $('#mini_price_history_bjg_detail_btn').addClass('no-review');
                }
                if (data.nopuzzle_promo) {
                  G.h_nopuzzle_promo = true;
                }
                if (G.aliSite) {
                  $('#bar_trend_legend_btn_bjg').remove();
                  $('#mini_price_history_bjg_detail_btn').addClass('aliSite');
                }
                originData = data;
                var earlistDay = Math.min(data.store[0] && data.store[0].all_line_begin_time, getEarlistDay(store));
                var currentDay = data.now_day;
                currentTime = data.now_day;
                var seriesConfig = [{
                  plot: 'plotAll',
                  start: 'all_line_begin_time',
                  minDay: 0.1,
                  data: 'all_line'
                }, {
                  plot: 'plotMonth',
                  start: 'month_line_time',
                  minDay: 30,
                  data: 'month_line'
                }, {
                  plot: 'plotYear',
                  start: 'half_year_line_time',
                  minDay: 0.1,
                  data: 'half_year_line'
                }, {
                  plot: 'days180',
                  start: 'all_line_begin_time',
                  minDay: 0.1,
                  data: 'all_line'
                }];
                enablePlot('#plotAll');
                // if (store[0].name.indexOf('(当前)') === -1) {
                // 	store[0].name += '(当前)';
                // }
                store[0].name = "页面价";

                var storeLimit = 18;
                if (currentPage === 'zhidemai') {
                  storeLimit = 1;
                }
                if (currentPage === 'priceHistory') {
                  storeLimit = 20;
                }

                var allDays = parseInt((currentDay - earlistDay) / oneDay);
                for (var i = 0; i < Math.min(store.length, storeLimit); i++) {
                  if (store[i].all_line.length === 0) continue;
                  // if (store[i].promo && store[i].promo.length > 0) {
                  // 	promotionData[store[i].name] = store[i].promo[0].desc;
                  // }
                  if (store[i].all_equal_short && store.length !== 1) {
                    store[i].all_line = [];
                    for (var j = 0; j < store[i].short_day_line.length; j += 24) {
                      store[i].all_line.push(store[i].short_day_line[j]);
                    }
                    store[i].all_line_begin_time = data.now_day - 5 * oneDay;
                    store[i].all_equal_short = false;
                  }

                  for (var k = 0; k < seriesConfig.length; k++) {
                    var j = seriesConfig[k];
                    if (getMidDay(currentDay) - getMidDay(earlistDay) >= j.minDay * oneDay) {
                      if (!store[i][j.data]) {
                        continue;
                      }
                      if (j.start !== 'short_day_line_begin_time') {
                        store[i][j.start] = getMidDay(store[i][j.start]);
                      }
                      if (store[i].all_equal_short && j.start === 'all_line_begin_time') {
                        store[i][j.start] = store[i].short_day_line_begin_time;
                      }
                      enablePlot('#' + j.plot);
                      var newSeries = {
                        color: generateColorForStore(store[i].name),
                        name: store[i].name,
                        pointStart: store[i][j.start],
                        pointInterval: oneDay,
                        legendIndex: 1,
                        connectNulls: false,
                        lineWidth: 1,
                        zIndex: 500 - i * 500 - 1,
                        marker: {
                          //symbol: 'rect',
                          symbol: currentSymbol.extended,
                          states: {
                            hover: {
                              enabled: false
                            }
                          }
                        },
                        states: {
                          hover: {
                            enabled: false,
                            halo: {
                              size: 0
                            }
                          }
                        },
                        data: store[i][j.data]
                      };
                      if (store[i].name === '凑单到手价') {
                        newSeries.color = "#FFC06D";
                      }
                      if (noTbTrend) {
                        newSeries.dashStyle = "Dash";
                      }
                      if (j.plot === 'plot5Day') {
                        //newSeries.pointStart -= 5*oneDay;
                        newSeries.pointInterval = 3600000;
                        if (newSeries.pointInterval * newSeries.data.length + newSeries.pointStart > currentTime) {
                          currentTime = newSeries.pointInterval * newSeries.data.length + newSeries.pointStart;
                        }
                      }

                      if (j.plot === 'plotAll' && newSeries.data.length < 30) {
                        newSeries.pointInterval = oneDay;
                        setXAxisMinInterval(oneDay);
                      }
                      if ((j.plot === 'plotAll' || j.plot === 'days180') && store[i].all_equal_short) {
                        if (i === 0) {
                          newSeries.pointInterval = 3600000;
                          //all_equal_short = true;
                        } else {
                            var s = new Date(newSeries.pointStart);
                            var s2 = new Date(s.getYear() + 1900, s.getMonth(), s.getDate(), 8);
                            newSeries.pointStart = s2.getTime();
                            newSeries.pointInterval = oneDay;
                            var tmpData = [];
                            for (var _i = 0; _i < newSeries.data.length; _i += 24) {
                              tmpData.push(newSeries.data[_i]);
                            }
                            newSeries.data = tmpData;
                          }
                      }
                      // 增大点的密度,使移动平滑
                      newSeries.addPointTimes = 1;
                      while (newSeries.data && newSeries.data.length < 100) {
                        if (j.plot === 'plotAll') {
                          break;
                        }
                        var newData = [];
                        for (var _k = 0; _k < newSeries.data.length; _k++) {
                          newData.push(newSeries.data[_k]);
                          if (_k + 1 === newSeries.data.length) break;
                          newData.push(newSeries.data[_k]);
                        }
                        newSeries.data = newData;
                        newSeries.pointInterval = newSeries.pointInterval / 2;
                        newSeries.addPointTimes = newSeries.addPointTimes * 2;
                      }
                      newSeries.data = newSeries.data ? newSeries.data.map(resetData) : null;
                      if (newSeries.data != null) {
                        seriesList[j.plot].push(newSeries);
                      }
                    }
                  }
                }
                if (seriesList['plotAll'].length === 1) {
                  var series = seriesList['plotAll'][0];
                  series.data = series.data.map(function (i) {
                    return i.y;
                  });
                  while (series.data.length < 100) {
                    var newData = [];
                    for (var k = 0; k < series.data.length; k++) {
                      newData.push(series.data[k]);
                      if (k + 1 === series.data.length) break;
                      newData.push(series.data[k]);
                    }
                    series.data = newData;
                    series.pointInterval = series.pointInterval / 2;
                  }
                  series.data = series.data.map(function (i) {
                    return {
                      y: i,
                      marker: {
                        enabled: false
                      }
                    };
                  });
                }
                // 和原始数据重合的点 去掉
                sliceData(seriesList);

                if (!store[0].all_equal_short) {
                  $('#plotAll').html(lang.getString(config, 'all') + ('(' + store[0].all_line.length + ')'));
                  if (store[0].all_line.length > 180) {
                    if (seriesList['plotYear'].length) {
                      currentShowing = 'plotYear';
                    }
                  }
                } else {
                  allDays++;
                  $('#plotAll').html(lang.getString(config, 'all') + ('(' + allDays + ')') + lang.getString(config, 'day'));
                }
                // 默认显示原始价格和当前商品
                if (originPrice && currentPage !== 'zhidemai') {
                  showingManager.add('当前商城原始价格');
                }
                showingManager.add(store[0].name);

                // data copy start
                var mergeSeries = function mergeSeries(a, b) {
                  var bList = b.map(function (item) {
                    return item.name;
                  });
                  return a.map(function (item) {
                    if (bList.indexOf(item.name) === -1) {
                      return item;
                    } else {
                      var toMerge = b.filter(function (j) {
                        return j.name === item.name;
                      })[0];
                      var tmp = copy(item);
                      tmp.data = toMerge.data;
                      tmp.pointStart = toMerge.pointStart;
                      tmp.pointInterval = toMerge.pointInterval;
                      return tmp;
                    }
                  });
                };
                var fillSeries = function fillSeries(seriesList) {
                  var pointIntervalList = seriesList.map(function (i) {
                    return i.pointInterval;
                  });
                  var minInterval = Math.min.apply(null, pointIntervalList);
                  seriesList.forEach(function (series) {
                    while (series.pointInterval > minInterval) {
                      var newData = [];
                      for (var i = 0; i < series.data.length; i++) {
                        newData.push(series.data[i]);
                        if (i + 1 === series.data.length) break;
                        var newPoint = {
                          marker: series.data[i].marker,
                          y: (series.data[i + 1].y + series.data[i].y) / 2
                        };
                        newData.push(newPoint);
                      }
                      series.pointInterval = series.pointInterval / 2;
                      series.data = newData;
                    }
                  });
                };
                ['plotMonth', 'plotYear'].forEach(function (i) {
                  if (!$('#' + i).hasClass('bjd-hidden')) {
                    var allSeries = seriesList['plotAll'];
                    var thisSeries = seriesList[i];
                    var toAdd = mergeSeries(allSeries, thisSeries);
                    seriesList[i] = toAdd;
                    fillSeries(seriesList[i]);
                  }
                });
                fillSeries(seriesList['plotAll']);
                var days180_size = seriesList['days180'][0] && seriesList['days180'][0].data.length;
                if (days180_size && days180_size > 180) {
                  for (var k = 0; k < seriesList['days180'].length; k++) {
                    seriesList['days180'][k].data.splice(0, days180_size - 180);
                    seriesList['days180'][k]['pointStart'] = seriesList['days180'][k]['pointStart'] + seriesList['days180'][k]['pointInterval'] * (days180_size - 180);
                  }
                }
                for (var spattern in seriesList) {
                  if (seriesList[spattern].length) {
                    for (var di = 0; di < seriesList[spattern].length; di++) {
                      addSeriesDataLabels(seriesList[spattern][di], data.nopuzzle_promo, spattern);
                      nopuzzlePpromo = data.nopuzzle_promo;
                    }
                  }
                }

                // showSeries('plotAll', false, util.deepCopy(obj));
                //chart.reflow();
              })();
            };

          case 34:
          case 'end':
            return context$2$0.stop();
        }
      }, null, _this2);
    }
  };

  return exports;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

// 中间

// obj.yAxis.title.text = foreignTitle
// if (!img) {
//   img = await require('common/request').get(`${G.server}/extension/QrCode?tag=PriceHistory&dp_id=${dpId}`)
// }
// $('#qrcode-trend').attr('src', img.imgSrc)
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(48), __webpack_require__(1), __webpack_require__(5)))

/***/ }),
/* 274 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, from_device = $data.from_device, s_server = $data.s_server;
    $$out += '\n<style>\n  .panel-shadow {\n    top: 250px;\n  }\n\n  .floatButtons-bjg {\n    position: absolute;\n    top: 25px;\n    right: 30px;\n    overflow: hidden;\n    z-index: 99;\n    height: 16px;\n  }\n\n  .highcharts-container {\n    width: 100%!important;\n    height: 100%!important;\n  }\n\n  .highcharts-container > svg {\n    width: 100%!important;\n    height: 100%!important;\n  }\n\n  .highcharts-tooltip span {\n    z-index: 9999!important;\n  }\n\n  .highcharts-tooltip table {\n    width: auto!important;\n    margin-left: 8px!important;\n    margin-right: 8px!important;\n    border: none;\n    border-spacing: none;\n  }\n\n  .highcharts-tooltip td {\n    font-family: "Microsoft Yahei";\n    font-size: 12px;\n    border: none;\n  }\n\n  .highcharts-tooltip .promoTd{\n    text-align: left;\n    padding-left: 5px;\n    width: 100px;\n    max-width: 100px;\n    color: #4a90e2;\n    overflow: hidden;\n    text-overflow: ellipsis!important;\n  }\n\n  .floatButtons-bjg > a{\n    cursor: pointer;\n    background: none;\n    border: none;\n    border-right: 1px solid #e6e9eb;\n    padding-left: 20px;\n    padding-right: 20px;\n    height: 16px;\n    line-height: 16px;\n    color: #6b6761;\n    text-decoration: none!important;\n    float: left;\n    font-family: "Microsoft YaHei";\n    font-size: 12px!important;\n  }\n\n  #mini_price_history_bjg_detail_chart {\n    position: relative;\n    width: 460px;\n    height: 182px;\n    margin-top: 31px;\n  }\n\n  #mini_price_history_bjg_detail {\n    clear: both;\n    background-color: white;\n    /*display: block!important;*/\n  }\n\n  @media (max-width: 1250px) {\n    #gwd-trend-chart {\n      position: fixed;\n      left: 50%;\n      margin-left: -400px;\n    }\n  }\n\n  .floatButtons-bjg > a:first-child {\n    border-left: 1px solid #e6e9eb;\n  }\n\n  .floatButton-bjg > a:focus {\n    outline: none;\n  }\n\n  .floatButtons-bjg .activePlot {\n    background: #fffbef;\n  }\n\n  .bjd-newtrend-dev .bjd-hidden {\n    display: none!important;\n  }\n\n  .legend-btn-box span {\n    float: left;\n    height: 17px;\n    cursor: pointer;\n  }\n\n  #plotArea_';
    $$out += $escape(from_device);
    $$out += ' {\n    position: absolute;\n    right: 0px;\n    left: 0px;\n    height: 182px;\n    max-width: 2000px!important;\n    font-family: "Microsoft YaHei";\n  }\n\n  .gwd-blurLayer {\n    filter: blur(9px);\n  }\n\n  /*#gwdang-trend-detail {*/\n  /*\tdisplay: block!important;*/\n  /*}*/\n  #plotArea_';
    $$out += $escape(from_device);
    $$out += ' {\n    height: 182px;\n    top: 62px;\n  }\n\n  #mini_price_history_bjg_detail_chart #plotArea_';
    $$out += $escape(from_device);
    $$out += ' {\n    top: 0;\n  }\n\n  .highcharts-tooltip {\n    z-index: 99;\n    background: white;\n  }\n\n\n  #bjd-qrcode-trend {\n    position: absolute;\n    width: 150px;\n    height: 150px;\n    right: 35px;\n    bottom: 0px;\n    text-align: center;\n  }\n\n  .legend-btn-box span em {\n    float: left;\n    height: 2px;\n    width: 20px;\n    margin-top: 7px;\n  }\n\n  #bjd-qrcode-trend span {\n    position: relative;\n    font-size: 12px;\n    font-family: "Microsoft Yahei";\n    color: #535854;\n    top: 8px;\n  }\n</style>\n<style>\n  .big_tooltip_bjg_box {\n    position: absolute;\n    display: none;\n    width: 460px;\n    height: auto;\n    top: 0px;\n    left: 0px;\n    background: #fffbef;\n    z-index: 999;\n    padding-bottom: 10px;\n    box-shadow:0px 2px 3px 0px rgba(218,191,165,0.2);\n  }\n  .big_tooltip_bjg_box.bigheight2 {\n    min-height: 64px;\n  }\n  .gwd-minibar-bg .big_tooltip_bjg_box.ht_tip {\n    width: 440px;\n    height: 46px;\n  }\n  .big_tooltip_bjg_box>p {\n    font-size: 12px;\n    color: #666666;\n    float: left;\n    margin-left: 16px;\n    margin-top: 10px;\n    height: 14px;\n    line-height: 14px;\n    margin-bottom: 0px;\n  }\n  .big_tooltip_bjg_box .tip-item {\n    height: 16px;\n    line-height: 16px;\n    float: left;\n    width: 100%;\n    margin-top: 4px;\n  }\n  .big_tooltip_bjg_box .tip-item>* {\n    float: left;\n    font-size: 12px;\n  }\n  .big_tooltip_bjg_box .tip-item>em {\n    border-radius: 5px;\n    height: 4px;\n    width: 4px;\n    background-color: #fff;\n    margin: 5px 6px 5px 0px;\n    border: 1px solid #5ACFFB;\n  }\n  .big_tooltip_bjg_box .tip-pagepri.tip-item>em {\n    background-color: #5ACFFB;\n  }\n  .big_tooltip_bjg_box .tip-addpro.tip-item>em  {\n    background-color: #FF9F22;\n    border: 1px solid #FF9F22;\n  }\n  .big_tooltip_bjg_box .tip-item-sp1 {\n    width: 90px;\n    height: 16px;\n    text-align: justify;\n    color: #666666;\n  }\n  .big_tooltip_bjg_box .tip-pagepri2 .tip-item-sp1 {\n    width: 120px;\n  }\n  .big_tooltip_bjg_box .tip-item-sp1:after{\n    content:".";\n    display: inline-block;\n    width:100%;\n    overflow:hidden;\n    height:0;\n  }\n  .big_tooltip_bjg_box .tip-item-sp2 {\n    margin-left: 6px;\n    margin-right: 8px;\n    line-height: 14px;\n  }\n  .big_tooltip_bjg_box .tip-item-sp3 {\n    color: #6b6761;\n    line-height: 18px;\n    font-weight: 500;\n  }\n  .big_tooltip_bjg_box .tip-item-sp4 {\n    margin-left: 10px;\n    font-size: 12px;\n    color: #9D9D9D;\n    line-height: 16px;\n    height: 16px;\n    width: 250px;\n    text-align: left;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n</style>\n\n<style>\n  .price-trend-sp em {\n    margin-top: 0;\n    height: 2px;\n    width: 20px;\n    display: inline-block;\n    vertical-align: middle;\n    background: #5ACFFB;\n    float: initial;\n  }\n  .review-trend-sp em {\n    margin-top: 0;\n    height: 2px;\n    width: 20px;\n    display: inline-block;\n    vertical-align: middle;\n    background: #FFC06D;\n    float: initial;\n  }\n\n  .no-review .review-trend-sp {\n    display: none;\n  }\n\n</style>\n<!--<img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/bijiago/bjg-logo@2x.png"';
    $$out += ' alt="" class="bjg-trend-logo">-->\n<div class="floatButtons-bjg bjd-newtrend-dev">\n  <a class="bjd-hidden" id="plotAll">全部</a><a class="bjd-hidden" id="plotYear">180天</a><a class="bjd-hidden" id="plotMonth">30天</a><a class="bjd-hidden" id="plot5Day">5日线</a>\n</div>\n<div id="plotArea_';
    $$out += $escape(from_device);
    $$out += '">\n\n</div>\n<div id="dashedLine_';
    $$out += $escape(from_device);
    $$out += '"></div>\n<!-- <div id="bjd-qrcode-trend">\n\t<img src="';
    $$out += $escape(s_server);
    $$out += '/images/extensions/trend_qrcode.jpg" alt="" style="width: 94px;height:94px" />\n\t<br>\n\t<span>微信上也能查历史价格</span>\n</div> -->';
    return $$out;
};

/***/ }),
/* 275 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
	return function (time) {
		var x = new Date(time);
		var p = new Date(x.getFullYear(), x.getMonth(), x.getDate());
		var midDate = p.getTime() + 19 * 3600000;
		return midDate;
	};
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ }),
/* 276 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
	var originPrice = 0;

	var originPricePattern = {
		'360buy': '#page_maprice',
		'suning': ['del.small-price', 'del', '#itemPrice>del'],
		'amazon': ['.digital-list-price>td>.a-text-strike', '.a-span12.a-color-secondary.a-size-base', '.a-text-strike'],
		'yougou': 'del:eq(0)',
		'dangdang': ['.price_m:eq(0)', '.d15_price_info .price_pc .price_m'],
		'vipshop': '.J-mPrice',
		'keede': '.message_price_kd',
		'feiniu': 'del.fn-rmb-num:eq(0)',
		'kaola': '#js_marketPrice',
		'111': 'del',
		'jiuxian': 'del',
		'yintai': '.mk-num',
		'beibei': '.strike[op-value="originPrice"]',
		'bookschina': 'td:eq(19)',
		'tmall': ['.tb-rmb-num', '.tm-tagPrice-panel .tm-price', '.tm-price-panel .tm-price'],
		'taobao': '#J_StrPrice>em.tb-rmb-num',
		'taobao-95095': '.tm-price-panel .tm-price:eq(0)',
		'lefeng': '.marketPrice-s'
	};

	//let all_equal_short = false;

	var patternUsed = '';
	if (originPricePattern[G.site] != undefined) {
		var pattern = originPricePattern[G.site];
		if (pattern instanceof Array) {
			pattern.forEach(function (i) {
				var element = $(i);

				var len = $(i).toArray().length;
				if (len > 1) {
					element = $(i + (':eq(' + (len - 1) + ')'));
				}
				if (originPrice) return;
				if (!element || !element.text()) return;
				var priceText = element.text();
				if (priceText.trim) {
					priceText = priceText.trim();
				}
				var price = parseFloat(priceText.replace(',', '').replace('￥', '').replace('¥', '').replace('$', '').replace(',', ''));
				originPrice = price;
				patternUsed = i;
			});
		} else {
			var element = $(pattern);
			if (element && element.text().length > 0) {
				var priceText = element.text();
				if (priceText.trim) {
					priceText = priceText.trim();
				}
				var price = parseFloat(priceText.replace(',', '').replace('￥', '').replace('¥', '').replace(',', ''));
				//
				originPrice = price;
				patternUsed = pattern;
			}
		}
	}

	// tmall.hk
	if (location.host === 'detail.tmall.hk') {
		originPrice = $('span.tm-price:eq(0)').text();
		var unitText = $('em.tm-yen:eq(0)').text();
		var t = $('span.tm-price:eq(0)').css('text-decoration');
		if (unitText === '₩' || unitText === 'NT$' || t && t.indexOf('line-through') === -1) {
			originPrice = null;
		}
		var try2 = $('.wrtoriginprice .tm-price').text();
		if (try2) {
			originPrice = try2;
		}
	}

	// 淘宝需特殊处理
	var jstrprice = $('#J_StrPrice').text() && $('#J_StrPrice').css('text-decoration').toString().indexOf('line-through') === -1;
	if ((G.site === 'taobao' || G.site === 'tmall' || G.site === 'taobao-95095') && (jstrprice || G.site === 'tmall' && $('#J_StrPriceModBox').css('display') === 'none')) {
		if (patternUsed === '.tm-price-panel .tm-price' || patternUsed === '#J_StrPrice>em.tb-rmb-num') {
			originPrice = null;
		}
	}

	if (G.site === 'taobao' || G.site === 'tmall' || G.site === 'taobao-95095') {
		var e = $(patternUsed);
		if (e.css('text-decoration') && e.css('text-decoration').toString().indexOf('line-through') === -1) {
			if (G.site === 'taobao') {
				if (e.parent().css('text-decoration').toString().indexOf('line-through') === -1) {
					originPrice = null;
				}
			} else {
				originPrice = null;
			}
		}
	}

	if (G.site === 'bookschina') {
		var s = $('td').toArray().map(function (i) {
			return i.innerText;
		});
		var pos = s.indexOf('定    价：');
		originPrice = s[pos + 1];
	}

	var type = null;
	if (location.host === 'www.amazon.co.jp') {
		type = 'JPY';
	}

	originPrice = __webpack_require__(21)(originPrice, type);

	originPrice = parseFloat(originPrice);

	return originPrice;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 277 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', showcoudan = $data.showcoudan, d1 = $data.d1, $escape = $imports.$escape, textCurrent = $data.textCurrent, textHigh = $data.textHigh, lowtle = $data.lowtle, d2 = $data.d2, aliSite = $data.aliSite, promoUrl = $data.promoUrl, textLow = $data.textLow, Combine = $data.Combine;
    $$out += '<table class="barTrendInfoBox bjg-trend-table ';
    if (showcoudan) {
        $$out += ' showcoudan ';
    }
    $$out += '" style="height: initial; margin-top: 13px; width: initial">\n  <tr class="orign-pri-info-bjg" style="height: 12px;">\n    ';
    if (d1.nowprice) {
        $$out += '\n    <td style="color: #3FC0F0">\n      <span class="opi-sp1 nowpri">';
        $$out += $escape(textCurrent);
        $$out += ':</span>\n      <span class="opi-sp2 nowpri">';
        $$out += $escape(d1.display_nowprice);
        $$out += '</span>\n    </td>\n    ';
    } else {
        $$out += '\n    <td>\n      <span class="opi-sp1" style="color: #ff6132">';
        $$out += $escape(textHigh);
        $$out += ':</span>\n      <span class="opi-sp2" style="color: #ff6132">';
        $$out += $escape(d1.display_Phighest);
        $$out += '</span>\n    </td>\n    <td style="">\n      <span class="opi-sp3" style="color: #35bd68; font-weight: bold!important;">';
        $$out += lowtle;
        $$out += '</span>\n      <span class="opi-sp4" style="color: #35bd68">';
        $$out += $escape(d1.display_Plowest);
        $$out += '</span>\n      <span class="opi-sp5" style="color: #9d9d9d">';
        $$out += $escape(d1.lowestDate);
        $$out += '</span>\n      ';
        if (!d2 && !aliSite && promoUrl) {
            $$out += '\n      <a href="';
            $$out += $escape(promoUrl);
            $$out += '" class="promo-history-link" target="_blank">历史促销明细\uFF1E</a>\n      ';
        }
        $$out += '\n    </td>\n    ';
    }
    $$out += '\n  </tr>\n  ';
    if (d2) {
        $$out += '\n  <tr class="promo-pri-info-bjg" style="height: 12px">\n    ';
        if (!d1.nowprice) {
            $$out += '\n    <td style="text-align: center; padding-top: 4px">\n      <span class="ppi-sp1"></span>\n    </td>\n    ';
        }
        $$out += '\n    <td style="padding-top: 4px; ">\n      <span class="ppi-sp2" style="color: #ffa600; font-weight: bold!important;">';
        $$out += $escape(textLow);
        $$out += '(';
        $$out += Combine;
        $$out += '):</span>\n      <span class="ppi-sp3" style=" color: #ffa600">';
        $$out += $escape(d2.display_Plowest);
        $$out += '</span>\n      <span class="ppi-sp4" style="color: #9d9d9d">';
        $$out += $escape(d2.lowestDate);
        $$out += '</span>\n      ';
        if (promoUrl) {
            $$out += '\n      <a href="';
            $$out += $escape(promoUrl);
            $$out += '" class="promo-history-link" target="_blank">历史促销明细\uFF1E</a>\n      ';
        }
        $$out += '\n    </td>\n  </tr>\n  ';
    }
    $$out += '\n</table>\n<style type="text/css">\n  .bjg-trend-table td span {\n    font-weight: 500!important;\n  }\n\n  #bjgext_maintrend_detail .orign-pri-info {\n    margin-top: 12px;\n  }\n  #bjgext_maintrend_detail .promo-pri-info {\n    margin-top: 8px;\n  }\n  /*#bjgext_maintrend_detail .opi-sp1, #gwdang-trend-detail .ppi-sp1, #gwdang-trend-detail .ppi-sp2 {*/\n  /*  margin-left: 30px;*/\n  /*}*/\n  #bjgext_maintrend_detail .opi-sp1, #bjgext_maintrend_detail .opi-sp3 {\n    margin-left: 10px;\n  }\n  #bjgext_maintrend_detail .ppi-sp1+.ppi-sp2 {\n    margin-left: 10px;\n  }\n  #bjgext_maintrend_detail .promo-history-link {\n    margin-left: 20px;\n    float: left!important;\n  }\n</style>\n<style>\n\n  .barTrendInfoBox {\n    height: 60px;\n    position: absolute;\n    top: 0px;\n    z-index: 999;\n  }\n  #big_tooltip_bjg_top {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100%;\n    height: 54px;\n    z-index: 9999999;\n    padding: 0px;\n  }\n  #big_tooltip_bjg_top.bigheight {\n    height: 64px;\n  }\n  #big_tooltip_bjg_top .tip-time {\n    float: left;\n    width: 86px;\n    height: 100%;\n    color: #666;\n    line-height: 54px;\n    text-align: center;\n    background-color: #fff5d8;\n      overflow: hidden;\n  }\n  #big_tooltip_bjg_top.bigheight .tip-time {\n    line-height: 64px;\n  }\n\n  #big_tooltip_bjg_top .pri-right-info {\n    float: left;\n    width: 900px;\n    height: 100%;\n    /*background-color: #F1F9FC;*/\n  }\n  #big_tooltip_bjg_top .pri-right-info .tip-item{\n    height: 16px;\n    line-height: 16px;\n    float: left;\n    width: auto;\n    min-width: 60%;\n  }\n  #big_tooltip_bjg_top .pri-right-info .tip-item {\n    margin-top: 18px;\n  }\n  #big_tooltip_bjg_top .pri-right-info.addpro>div, #big_tooltip_bjg_top .pri-right-info.directpro>div {\n    margin-top: 8px;\n  }\n  #big_tooltip_bjg_top .pri-right-info.addpro .tip-pagepri, #big_tooltip_bjg_top .pri-right-info.directpro .tip-pagepri{\n    margin-top: 12px;\n  }\n  #big_tooltip_bjg_top .pri-right-info.addpro.directpro>div {\n    margin-top: 2px;\n  }\n  #big_tooltip_bjg_top .pri-right-info.addpro.directpro .tip-pagepri {\n    margin-top: 6px;\n  }\n  #big_tooltip_bjg_top .tip-item-sp4 {\n    width: auto;\n  }\n\n  .pri-right-info .tip-item em {\n    border-radius: 5px;\n    height: 4px;\n    width: 4px;\n    margin: 5px 6px 5px 20px;\n    border: 1px solid #5ACFFB;\n  }\n  #bar_trend_legend_btn_bjg {\n    position: absolute;\n    top: 0px;\n    right: 304px;\n    z-index: 99;\n    /*width: 210px;*/\n    padding-right: 14px;\n    border: 1px solid #f0f0f0;\n    border-radius: 2px;\n    height: 24px;\n    top: 20px;\n  }\n  #bar_trend_legend_btn_bjg.legend-btn-box span.pt-sp1 {\n    margin-left: 14px;\n  }\n  #bar_trend_legend_btn_bjg.legend-btn-box.no-review span.pt-sp1 {\n    /*margin-left: 72px;*/\n  }\n  #bar_trend_legend_btn_bjg.legend-btn-box>span {\n    margin-left: 30px;\n  }\n  #bar_trend_legend_btn_bjg.legend-btn-box span span {\n    margin-left: 6px;\n  }\n  #bar_trend_legend_btn_bjg.legend-btn-box span{\n    line-height: 24px;\n  }\n  /*#bar_trend_legend_btn_bjg.legend-btn-box span em {*/\n  /*  margin-top: 11px;*/\n  /*}*/\n  #bar_trend_legend_btn_bjg.no-review .review-trend-sp {\n    display: none;\n  }\n\n\n\n\n</style>\n\n';
    return $$out;
};

/***/ }),
/* 278 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data, domclass = $data.domclass, lang = $data.lang, onHandPrice = $data.onHandPrice, pagePrice = $data.pagePrice, combinePrice = $data.combinePrice;
    $$out += '<p class="prifontf">';
    $$out += $escape(data.time);
    $$out += '</p>\n';
    if (data.pagePrice && domclass == '') {
        $$out += '\n<div class="tip-item tip-pagepri tip-pagepri2">\n  <em></em>\n  ';
        if (lang == 'en') {
            $$out += '\n  <span class="tip-item-sp1">Price</span>\n  ';
        } else {
            $$out += '\n  <span class="tip-item-sp1">';
            $$out += $escape(onHandPrice);
            $$out += ' / ';
            $$out += $escape(pagePrice);
            $$out += '</span>\n  ';
        }
        $$out += '\n  <span class="tip-item-sp2">:</span>\n  <span class="tip-item-sp3 prifontf">';
        $$out += $escape(data.pagePrice);
        $$out += '</span>\n</div>\n\n';
    } else if (data.pagePrice) {
        $$out += '\n<div class="tip-item tip-pagepri">\n  <em></em>\n  <span class="tip-item-sp1">';
        $$out += $escape(pagePrice);
        $$out += '</span>\n  <span class="tip-item-sp2">:</span>\n  <span class="tip-item-sp3 prifontf">';
        $$out += $escape(data.pagePrice);
        $$out += '</span>\n</div>\n';
    }
    $$out += '\n';
    if (data.directpro) {
        $$out += '\n<div class="tip-item tip-directpro">\n  <em></em>\n  <span class="tip-item-sp1">';
        $$out += $escape(onHandPrice);
        $$out += '</span>\n  <span class="tip-item-sp2">:</span>\n  <span class="tip-item-sp3 prifontf">\xA5';
        $$out += $escape(data.directpro);
        $$out += '</span>\n  <span class="tip-item-sp4"> ';
        $$out += data.promo2;
        $$out += '</span>\n</div>\n';
    }
    $$out += '\n';
    if (data.addpro) {
        $$out += '\n<div class="tip-item tip-addpro">\n  <em></em>\n  <span class="tip-item-sp1">';
        $$out += $escape(combinePrice);
        $$out += '</span>\n  <span class="tip-item-sp2">:</span>\n  <span class="tip-item-sp3 prifontf">\xA5';
        $$out += $escape(data.addpro);
        $$out += '</span>\n  <span class="tip-item-sp4">';
        $$out += data.promo1;
        $$out += '</span>\n</div>\n';
    }
    $$out += '\n\n<style>\n  #mini_price_history_bjg_detail .tip-item {\n    padding-left: 15px;\n  }\n</style>\n';
    if (lang == 'en') {
        $$out += '\n<style>\n    .big_tooltip_bjg_box .tip-item-sp4 {\n        width: 257px!important;\n    }\n\n    .tip-item-sp1 {\n        width: 95px!important;\n    }\n</style>\n';
    }
    return $$out;
};

/***/ }),
/* 279 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data, domclass = $data.domclass, lang = $data.lang, onHandPrice = $data.onHandPrice, pagePrice = $data.pagePrice, combinePrice = $data.combinePrice;
    $$out += '<div class="prifontf tip-time">';
    $$out += $escape(data.time);
    $$out += '</div>\n<div class="pri-right-info ';
    $$out += $escape(domclass);
    $$out += '">\n  ';
    if (data.pagePrice && domclass == '') {
        $$out += '\n    <div class="tip-item tip-pagepri tip-pagepri2">\n      <em></em>\n      ';
        if (lang == 'en') {
            $$out += '\n      <span class="tip-item-sp1">Price</span>\n      ';
        } else {
            $$out += '\n      <span class="tip-item-sp1">';
            $$out += $escape(onHandPrice);
            $$out += ' / ';
            $$out += $escape(pagePrice);
            $$out += '</span>\n      ';
        }
        $$out += '\n      <span class="tip-item-sp2">:</span>\n      <span class="tip-item-sp3 prifontf">';
        $$out += $escape(data.pagePrice);
        $$out += '</span>\n    </div>\n  ';
    } else if (data.pagePrice) {
        $$out += '\n    <div class="tip-item tip-pagepri">\n      <em></em>\n      <span class="tip-item-sp1">';
        $$out += $escape(pagePrice);
        $$out += '</span>\n      <span class="tip-item-sp2">:</span>\n      <span class="tip-item-sp3 prifontf">';
        $$out += $escape(data.pagePrice);
        $$out += '</span>\n    </div>\n  ';
    }
    $$out += '\n  ';
    if (data.directpro) {
        $$out += '\n    <div class="tip-item tip-directpro">\n      <em></em>\n      <span class="tip-item-sp1">';
        $$out += $escape(onHandPrice);
        $$out += '</span>\n      <span class="tip-item-sp2">:</span>\n      <span class="tip-item-sp3 prifontf">\xA5';
        $$out += $escape(data.directpro);
        $$out += '</span>\n      <span class="tip-item-sp4"> ';
        $$out += data.promo2;
        $$out += '</span>\n    </div>\n  ';
    }
    $$out += '\n  ';
    if (data.addpro) {
        $$out += '\n    <div class="tip-item tip-addpro">\n      <em></em>\n      <span class="tip-item-sp1">';
        $$out += $escape(combinePrice);
        $$out += '</span>\n      <span class="tip-item-sp2">:</span>\n      <span class="tip-item-sp3 prifontf">\xA5';
        $$out += $escape(data.addpro);
        $$out += '</span>\n      <span class="tip-item-sp4">';
        $$out += data.promo1;
        $$out += '</span>\n    </div>\n  ';
    }
    $$out += '\n</div>\n';
    if (lang == 'en') {
        $$out += '\n<style>\n    .big_tooltip_bjg_box .tip-item-sp4 {\n        width: 257px!important;\n    }\n\n    .tip-item-sp1 {\n        width: 95px!important;\n    }\n</style>\n';
    }
    return $$out;
};

/***/ }),
/* 280 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', lowest_obj = $data.lowest_obj, $escape = $imports.$escape, textCurrent = $data.textCurrent, currency = $data.currency, textHigh = $data.textHigh, lowtle = $data.lowtle, lowestDate = $data.lowestDate, lowest_obj2 = $data.lowest_obj2, lowestDate2 = $data.lowestDate2, textLow = $data.textLow, Combine = $data.Combine, promoUrl = $data.promoUrl;
    $$out += '<table class="bjg-trend-table" style="font-weight: bold; width: initial">\n  <tr class="orign-pri-info-bjg">\n    ';
    if (lowest_obj.nowprice) {
        $$out += '\n    <td>\n      <span class="opi-sp1 nowpri">';
        $$out += $escape(textCurrent);
        $$out += ':</span>\n      <span class="opi-sp2 nowpri">';
        $$out += $escape(currency);
        $$out += $escape(lowest_obj.nowprice);
        $$out += '</span>\n    </td>\n    ';
    } else {
        $$out += '\n    <td>\n      <span class="opi-sp1">';
        $$out += $escape(textHigh);
        $$out += ':</span>\n      <span class="opi-sp2">';
        $$out += $escape(currency);
        $$out += $escape(lowest_obj.Phighest);
        $$out += '</span>\n    </td>\n    <td>\n      <span class="opi-sp3" style="font-weight: bold!important">';
        $$out += lowtle;
        $$out += '</span>\n      <span class="opi-sp4">';
        $$out += $escape(currency);
        $$out += $escape(lowest_obj.Plowest);
        $$out += '</span>\n      <span class="opi-sp5">';
        $$out += $escape(lowestDate);
        $$out += '</span>\n    </td>\n    ';
    }
    $$out += '\n  </tr>\n  ';
    if (lowest_obj2 && lowestDate2) {
        $$out += '\n  <tr class="promo-pri-info-bjg" style="font-size: 12px; padding-top: 10px">\n    ';
        if (!lowest_obj.nowprice) {
            $$out += '\n    <td style="text-align: center">\n      <span class="ppi-sp1"></span>\n    </td>\n    ';
        }
        $$out += '\n    <td>\n      <span class="ppi-sp2" style="font-weight: bold!important;">';
        $$out += $escape(textLow);
        $$out += '(';
        $$out += Combine;
        $$out += '):</span>\n      <span class="ppi-sp3">';
        $$out += $escape(currency);
        $$out += $escape(lowest_obj2.Plowest);
        $$out += '</span>\n      <span class="ppi-sp4">';
        $$out += $escape(lowestDate2);
        $$out += '</span>\n    </td>\n  </tr>\n  ';
    }
    $$out += '\n</table>\n\n';
    if (promoUrl) {
        $$out += '\n<a href="';
        $$out += $escape(promoUrl);
        $$out += '" class="promo-history-link" target="_blank">历史促销明细\uFF1E</a>\n';
    }
    $$out += '\n<style>\n  .orign-pri-info-bjg {\n    font-size: 12px;\n    line-height: 12px;\n  }\n\n  .promo-pri-info-bjg td {\n    line-height: 12px;\n    padding-top: 10px;\n  }\n\n  .bjg-trend-table {\n    border-collapse: collapse;\n    line-height: initial;\n    margin-top: 10px;\n  }\n\n  .bjg-trend-table td {\n    text-align: left;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 281 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

var codeOfs = 88;
var utitle;
try {
  utitle = ["t=" + $('title').html().substr(0, 250), "k=lxsx", "d=ls"];
} catch (err) {
  utitle = [];
}

var pageUrl = encodeURIComponent(location.href);
var trendd = {
  zero: ["0", "00", "000", "0000", "00000", "000000", "0000000", "00000000"],
  strReverse: function strReverse(a) {
    var b,
        l,
        c = [];
    for (b = 0, l = a.length; b < l; b++) c[c.length] = a.charAt(b);
    return c.reverse().join("");
  },
  isString: function isString(a) {
    return "[object String]" === Object.prototype.toString.call(a);
  },
  encrypt: function encrypt(a, b, e) {
    var f,
        l,
        g = [];
    if (!trendd.isString(a)) return "";
    for (f = 0, l = a.length; f < l; f++) g[g.length] = trendd.to(a.charCodeAt(f), b);
    return e ? trendd.strReverse(g.join("")) : g.join("");
  },
  to: function to(a, c) {
    var e = "" + (a + codeOfs).toString(16),
        f = c - e.length;
    return f > 0 ? trendd.zero[f - 1] + e : e;
  },
  decrypt: function decrypt(a, b, e) {
    if (!trendd.isString(a)) return "";
    var f = [];
    e && (a = trendd.strReverse(a));
    for (var g = 0, h = 0; g < a.length; g += b, h++) {
      var i = a.substring(g, g + b);
      f[h] = trendd.tranFormat(i, b);
    }
    return String.fromCharCode.apply(String, f);
  },
  tranFormat: function tranFormat(a, c) {
    return a.length !== c ? 0 : parseInt(a.replace(/^0+/g, ""), 16) - codeOfs;
  },
  genExtensionId: function genExtensionId() {
    if (window.localStorage['extensionid']) return window.localStorage['extensionid'];
    var guid = "";
    for (var i = 1; i <= 32; ++i) {
      guid += Math.floor(Math.random() * 16.0).toString(16);
      if (i == 8 || i == 12 || i == 16 || i == 20) guid += "-";
    }
    window.localStorage['extensionid'] = guid;
    return guid;
  }
};

module.exports.init = function () {
  // 这是使用惠惠接口做的接口模拟参数生成模块
  var gstr = "";
  var ga = "//zhu",
      gb = "shou.huih",
      gc = "ui.cn/product",
      gd = "Sense?br",
      ge = "owser=chrome&ver",
      gf = "sion=4.2.9.6&vendor=chrom";
  gstr = ga + gb + gc + gd + ge + gf;
  var extensionid = trendd.genExtensionId();
  var trendK = trendd.encrypt(utitle.join("^&"), 4, !1);
  var z = trendd.encrypt(pageUrl, 2, !0),
      A = 1900 - z.length;
  trendK = trendK.length > A ? trendK.substr(0, A) : trendK;
  var url = location.protocol + gstr + "enew&av=3.0&ext" + "ensionid=" + extensionid + "&email=&pop=&k=" + trendK + "&nl=true&m=" + z;
  return url;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 282 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var template = __webpack_require__(13);
var log = __webpack_require__(14);

var renderChart = function renderChart(data) {
  renderBtn(data);
  renderDetail();
  var id = 'trend_box';
  $('.min-max-price-lable .max-lab').text('最高:￥' + data.store[0].highest);
  $('.min-max-price-lable .min-lab').text('最低:￥' + data.store[0].lowest);
  __webpack_require__(283)({
    el: id,
    msg: data.store[0]
  });
};

var priceTle = {
  'pri-t1': "价格上涨",
  'pri-t0': "价格平稳",
  'pri-t-1': "价格下降",
  'pri-t-2': "历史最低"
};

var renderBtn = function renderBtn(data) {
  var dom = $('.game_purchase_action:contains("开始游戏")');
  if (dom.length === 0) dom = $('.game_purchase_action:contains("在购物车中")');
  if (dom.length === 0) dom = $('.game_purchase_action:contains("添加至购物车")');
  var status = data.price_status;
  var status_str = 'pri-t' + status;
  var status_tle = priceTle[status_str];
  var html = __webpack_require__(284);
  var bixbox = dom.eq(0);
  var bigboxwidth = bixbox.width();
  var children = bixbox.children();
  var w = 0;
  for (var i = 0; i < children.length; i++) {
    w += children.eq(i).outerWidth();
  }
  var btnleft = bigboxwidth - w - 5 - 108;
  var imgurls = G.s_server + '/images/extensions/newbar';
  if ($('#steam_tremd_btn').length) {
    return;
  }
  dom.eq(0).prepend(template.compile(html)({
    imgurl: imgurls,
    btnleft: btnleft,
    status_tle: status_tle,
    status_str: status_str,
    ext_class: G.from_device.indexOf('bijiago') > -1 ? 'bjgou' : ''
  }));
};

var addEvent = function addEvent() {
  var time1 = undefined;
  $('#steam_tremd_btn').on('mouseenter', function () {
    $('#trenm_trend_detail').show();
    $('#steam_tremd_btn').addClass('_mshover');
    log('steam-trend-track');
  });
  $('#steam_tremd_btn').on('mouseleave', function () {
    time1 = setTimeout(function () {
      $('#trenm_trend_detail').hide();
      $('#steam_tremd_btn').removeClass('_mshover');
    }, 300);
  });
  $('#trenm_trend_detail').on('mouseenter', function () {
    clearTimeout(time1);
  });
  $('#trenm_trend_detail').on('mouseleave', function () {
    $('#trenm_trend_detail').hide();
    $('#steam_tremd_btn').removeClass('_mshover');
  });
};

var renderDetail = function renderDetail() {
  var html = __webpack_require__(285);
  var dom = $('#steam_tremd_btn').parents('.game_area_purchase_game:contains("开始游戏")');
  if (dom.length === 0) dom = $('#steam_tremd_btn').parents('.game_area_purchase_game:contains("在购物车中")');
  if (dom.length === 0) dom = $('#steam_tremd_btn').parents('.game_area_purchase_game:contains("添加至购物车")');
  if (dom.length === 0) dom = $('#steam_tremd_btn').parents('.game_area_purchase_game_wrapper:contains("添加至购物车")');
  dom.eq(0).append(template.compile(html)());
  dom.eq(0).addClass('steam_box_tt');

  __webpack_require__(14)('steam-ad-show');
  $('#steam_ad').click(function (e) {
    __webpack_require__(14)('steam-ad-click');
  });

  addEvent();
};

module.exports.init = function (data) {
  if (!data || data instanceof Array || data.store[0].all_line.length === 0) return;
  renderChart(data);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 283 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, Highcharts) {

module.exports = function (data) {
  var highest = parseInt(data.msg.highest);
  var yAxisTitlex = 10;
  if (highest > 99) yAxisTitlex = 24;
  var obj = {
    chart: {
      renderTo: data.el,
      marginTop: 24,
      marginLeft: 78,
      marginRight: 24,
      backgroundColor: data.bg ? data.bg : "#394653",
      type: 'line',
      events: {
        load: function load() {
          this.yAxis[0].update({
            tickInterval: parseInt((this.yAxis[0].dataMax - this.yAxis[0].dataMin) / 4) || 1
          });
          var xinterval = (this.xAxis[0].dataMax - this.xAxis[0].dataMin) / 86400000;
          xinterval = xinterval / 3;
          var tickIntervals = undefined;
          if (xinterval > 30) {
            xinterval = parseInt(xinterval / 30) + 1;
            tickIntervals = xinterval * 30 * 86400000;
          } else {
            tickIntervals = xinterval * 86400000;
          }
          if (!data.shortTime) this.xAxis[0].update({
            tickInterval: tickIntervals
          });
        }
      }
    },
    credits: {
      enabled: false
    },
    colors: ['#1e94f8'],
    title: {
      text: data.title || '',
      y: -20,
      style: {
        color: '#92ABC2'
      }
    },
    xAxis: {
      type: 'datetime',
      labels: {
        style: {
          color: "#5f7183"
        }
      },
      dateTimeLabelFormats: {
        day: '%m-%e',
        week: '%m-%e',
        month: '%y/%m',
        year: '%y/%m'
      },
      tickLength: 0,
      lineColor: "#5f7183",
      gridLineWidth: 1,
      gridLineColor: '#516171'
    },
    yAxis: {
      title: {
        text: data.unit ? data.unit : '价格(元)',
        rotation: 0,
        margin: 0,
        y: -72,
        x: yAxisTitlex,
        style: {
          color: "#5f7183"
        }
      },
      labels: {
        style: {
          color: "#5f7183"
        },
        formatter: function formatter() {
          return this.value.toFixed(2);
        }
      },
      plotLines: [{
        value: 0,
        width: 1,
        color: '#808080'
      }],
      gridLineColor: '#5f7183',
      tickPixelInterval: 50
    },
    tooltip: {
      xDateFormat: '%Y-%m-%d',
      shared: true,
      shape: 'square',
      useHTML: true,
      followPointer: false,
      width: 110,
      height: 52,
      borderWidth: G.site === 'epic' ? 0 : 1,
      style: {
        padding: 0
      },
      formatter: function formatter() {
        var x = new Date(this.x);
        var year = x.getFullYear();
        var month = x.getMonth() + 1;
        var day = x.getDate();
        if (month < 10) month = '0' + month.toString();
        if (day < 10) day = '0' + day.toString();
        var datestr = year + '.' + month + '.' + day;
        // let format = data.msg.formatted[this.x.toString()];
        // let disc = format.discount
        // if (disc !== 0)
        //   disc = '-' + disc.toString() + '%';
        var price = undefined;
        if (this.y !== 0) price = this.y.toFixed(2);else price = '0';
        var dom = '<div class="ttip-discount">\n              <span class="ttip-sp1">' + datestr + '</span>\n              <span class="ttip-sp2">价格: ￥' + price + '</span>\n        </div>';
        if (G.site === 'epic') {
          dom = '\n            <div class="ttip-discount" style="width: 110px; height: 52px; padding-top: 8px; padding-left: 10px;">\n              <span class="ttip-sp1" style="display: inline-block; color: #aaaaaa">' + datestr + '</span><br>\n              <span class="ttip-sp2" style="display: inline-block; color: #aaaaaa; margin-top: 4px">价格: $' + price + '</span>\n            </div>\n          ';
        }
        return dom;
      },
      backgroundColor: G.site === 'epic' ? '#000000' : 'rgba(20,37,55,0.94)'
    },
    plotOptions: {
      series: {
        marker: {
          radius: 1,
          'stroke-width': 0,
          stroke: '#1e94f8',
          lineColor: null
        },
        shadow: false,
        states: {
          hover: {
            marker: {
              radius: 3,
              'stroke-width': 0,
              stroke: '#1e94f8',
              lineColor: null
            },
            halo: {
              size: 5
            }
          }
        }
      }
    },
    legend: {
      enabled: false,
      borderWidth: 0
    },
    series: []
  };
  if (data.title === undefined) obj.title.style.display = 'none';
  var store = data.msg;
  try {
    obj.series[0] = {
      visible: true,
      name: store.name,
      color: "#61BBEF",
      lineWidth: 2,
      data: []
    };
    obj.series[0].visible = true;
    obj.series[0].pointStart = store.all_line_begin_time + 8 * 3600000;
    obj.series[0].pointInterval = store.all_equal_short ? 3600000 : 3600000 * 24;
    obj.series[0].data = store.all_line;
    // obj.xAxis.floor = store.all_line_begin_time;
    // obj.xAxis.max = store.all_line_begin_time + (obj.series[0].data.length - 1) * 3600000 * 24
    if (obj.series[0].data.length === 1) {
      var k = obj.series[0].data[0];
      //obj.series[0].data.unshift()
    }
    window.chart = new Highcharts.Chart(obj);
  } catch (e) {}
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(48)))

/***/ }),
/* 284 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, ext_class = $data.ext_class, status_tle = $data.status_tle, status_str = $data.status_str, btnleft = $data.btnleft, imgurl = $data.imgurl;
    $$out += '<div id="steam_tremd_btn" class="';
    $$out += $escape(ext_class);
    $$out += '">\n  <span>';
    $$out += $escape(status_tle);
    $$out += '</span>\n  <em class="';
    $$out += $escape(status_str);
    $$out += '"></em>\n  <style type="text/css">\n    #steam_tremd_btn{\n      background-image: linear-gradient(-180deg, #2488B9 0%, #12425A 100%);\n      border: 2px solid #000000;\n      width: 104px;\n      float: left;\n      position: relative;\n      cursor: default;\n      color:  #BCE6FF;\n      margin-left: ';
    $$out += $escape(btnleft);
    $$out += 'px;\n      height: 32px;\n    }\n    #steam_tremd_btn.bjgou {\n        background-image: linear-gradient(180deg, #C2A27D 0%, #755A33 100%);\n        color: #f1d6aa;\n    }\n    #steam_tremd_btn._mshover {\n      background-image: linear-gradient(-180deg, #66C0F4 0%, #2F89BC 100%);\n    }\n    #steam_tremd_btn.bjgou._mshover {\n        background-image: linear-gradient(180deg, #E0B27D 0%, #AE813F 100%);\n    }\n    #steam_tremd_btn._mshover span {\n      color: #fff;\n    }\n    #steam_tremd_btn >* {\n      float: left;\n    }\n    #steam_tremd_btn span {\n      font-size: 15px;\n      margin-left: 12px;\n      line-height: 32px;\n      color: #BCE6FF\n      font-family: "microsoft yahei";\n    }\n    #steam_tremd_btn em {\n      width: 18px;\n      height: 20px;\n      margin-top: 7px;\n      margin-left: 4px;\n    }\n    #steam_tremd_btn em.pri-t1 {\n      background: url(\'';
    $$out += $escape(imgurl);
    $$out += '/rise.png\') 0px 0px no-repeat;\n    }\n    #steam_tremd_btn em.pri-t0 {\n      background: url(\'';
    $$out += $escape(imgurl);
    $$out += '/stable.png\') 0px 0px no-repeat;\n      margin-top: 10px;\n    }\n    #steam_tremd_btn em.pri-t-1 {\n      background: url(\'';
    $$out += $escape(imgurl);
    $$out += '/fall.png\') 0px 0px no-repeat;\n    }\n    #steam_tremd_btn em.pri-t-2{\n      background: url(\'';
    $$out += $escape(imgurl);
    $$out += '/minimum.png\') 0px 0px no-repeat;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 285 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '';
    $$out += '<div id="trenm_trend_detail">\n  <div id="trend_box">\n  </div>\n  <div class="min-max-price-lable">\n    <div class="min-max-box">\n      <span class="max-lab">最高:\uFFE55.00</span>\n      <span class="min-lab">最低:\uFFE53.00</span>\n    </div>\n  </div>\n<!--  <div class="gwd-row" style="justify-content: flex-end; clear: both; padding-right: 20px;">-->\n<!--    <a id="steam_ad" href="https://steam.ffffgame.com/vest.html?type=2&product_id=1&channel=xj01_hz" class="gwd-inline-row gwd-align" target="_blank">-->\n<!--      <img ';
    $$out += 'src="https://cdn.gwdang.com/images/extensions/steamLink@2x.png"';
    $$out += ' alt="" style="width: 101px; height: 13.5px">-->\n<!--      <img ';
    $$out += 'src="https://cdn.gwdang.com/images/extensions/steamWhiteArrow@2x.png"';
    $$out += ' alt="" style="width: 12px; height: 12px; margin-left: 2px; margin-top: 3px">-->\n<!--    </a>-->\n<!--  </div>-->\n  <style type="text/css">\n    .game_area_purchase_game_wrapper.steam_box_tt ,.steam_box_tt{\n      position: relative;\n      z-index: 501;\n    }\n    #trenm_trend_detail {\n      width: 400px;\n      height: 264px;\n      border: 1px solid #394653;\n      box-shadow: 0 2px 4px 0 #465F7C;\n      background-color: #394653;\n      position: absolute;\n      bottom: 26px;\n      display: none;\n      z-index: 9999999999;\n    }\n    #trenm_trend_detail *{\n      font-family: "microsoft yahei";\n    }\n    #trend_box {\n      margin-top: 36px;\n      height: 200px;\n      width: 400px;\n      box-sizing: border-box;\n      float: left;\n      border:1px solid #394653;\n    }\n    .trend-compare {\n      background-image: linear-gradient(-180deg, #283645 0%, #2C3A49 100%);\n      border: 1px solid #394653;\n      float: left;\n      width: 214px;\n      height: 100%;\n    }\n    .trend-compare p {\n      line-height: 19px;\n      float: left;\n      margin-top: 18px;\n      height: 19px;\n      font-size: 14px;\n      color: #DAEDFF;\n      text-align: center;\n      width: 100%;\n    }\n    .trend-compare ul li {\n      list-style: none;\n      float: left;\n      margin-top: 20px;\n      height: 19px;\n      width: 100%;\n    }\n    .trend-compare ul li span {\n      height: 100%;\n    }\n    .trend-compare ul li:after {\n      display: block;\n      content: "";\n      clear: both;\n    }\n    .trend-com-sp1 {\n      font-size: 13px;\n      color: #DAEDFF;\n      margin-left: 12px;\n      width: 65px;\n      overflow: hidden;\n      float: left;\n    }\n    .trend-com-sp2 {\n      font-size: 14px;\n      color: #71CAFF;\n      float: right;\n      text-align: right;\n      line-height: 19px;\n      margin-right: 2px;\n    }\n    .trend-com-sp3.isdiscount {\n      color: #87B61F;\n    }\n    .trend-com-sp3 {\n      font-size: 12px;\n      color:  #F05428;\n      height: 19px;\n      float: right!important;\n      margin-right: 10px;\n      text-align: right;\n    }\n    .min-max-price-lable {\n      position: absolute;\n      height: 35px;\n      width: 402px;\n      top: 0px;\n      text-align: center;\n      left: 0px;\n      background-color: #394653;\n    }\n    .min-max-box {\n      margin: 0 auto;\n      display: inline-block;\n    }\n    .min-max-price-lable span {\n      height: 26px;\n      float: left;\n      padding: 0 7px;\n      margin-top: 10px;\n      line-height: 26px;\n      text-align: center;\n      border-radius: 2px;\n      cursor: default;\n    }\n    .min-max-price-lable .max-lab {\n      background: #2D3A46;\n      border: 1px solid #FF5627;\n      color: #FF5627;\n      margin-right: 36px;\n    }\n    .min-max-price-lable .min-lab {\n      background: #2E3A47;\n      border: 1px solid #9ED81E;\n      color: #9ED81E;\n    }\n    .ttip-discount {\n      width: 110px;\n      height: 54px;\n      cursor: default;\n    }\n    .ttip-discount span.ttip-sp1 {\n      margin-top: 8px;\n    }\n    .ttip-discount span {\n      float: left;\n      width: 100px;\n      height: 16px;\n      margin-left: 10px;\n      line-height: 16px;\n      font-family: "microsoft yahei";\n      font-size: 12px;\n      color: #BDD9F3;\n      margin-top: 4px;\n      cursor: default;\n    }\n\n    g.highcharts-grid {\n      opacity: 0.5;\n    }\n  </style>\n</div>\n';
    return $$out;
};

/***/ }),
/* 286 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, url = $data.url;
    $$out += '<div class="trend-error-info">\n  <p class="error-p">我们检测到访问异常\uFF0C请您验证后继续使用</p>\n  <a class="error-sp" href="';
    $$out += $escape(url);
    $$out += '">点击验证</a>\n  <style type="text/css">\n    #gwdang-trend span {\n      float: left;\n      width: 110px;\n      text-align: center;\n      line-height: 60px;\n      color: #666;\n      font-size: 14px;\n    }\n    #gwdang-trend .trend-error-info {\n      float: left;\n      width: 100%;\n      background: #fff;\n      z-index: 99999999;\n      height: 268px;\n      display: none;\n    }\n    #gwdang-trend .error-p {\n      width: 100%;\n      float: left;\n      text-align: center;\n      margin-top: 45px;\n      font-size: 14px;\n      color: #666;\n    }\n    #gwdang-trend .error-sp {\n      width: 95px;\n      margin: 110px auto;\n      height: 20px;\n      line-height: 20px;\n      text-align: center;\n      color: #000!important;\n      border: 1px solid #333;\n      border-radius: 5px;\n      display: block;\n      text-decoration: none!important;\n    }\n    #gwdang-trend:hover .trend-error-info {\n      display: block;\n    }\n  </style>\n  <style type="text/css">\n    .bjgext-trend span {\n      float: left;\n      width: 110px;\n      text-align: center;\n      line-height: 60px;\n      color: #666;\n      font-size: 14px;\n    }\n    .bjgext-trend .trend-error-info {\n      float: left;\n      width: 100%;\n      background: #fff;\n      z-index: 99999999;\n      height: 268px;\n      display: none;\n    }\n    .bjgext-trend .error-p {\n      width: 100%;\n      float: left;\n      text-align: center;\n      margin-top: 45px;\n      font-size: 14px;\n      color: #666;\n    }\n    .bjgext-trend .error-sp {\n      width: 95px;\n      margin: 110px auto;\n      height: 20px;\n      line-height: 20px;\n      text-align: center;\n      color: #000!important;\n      border: 1px solid #333;\n      border-radius: 5px;\n      display: block;\n      text-decoration: none!important;\n    }\n    .bjgext-trend:hover #bjgext_maintrend_detail {\n      display: block!important;\n    }\n    .bjgext-trend:hover .trend-error-info {\n      display: block;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 287 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, url = $data.url;
    $$out += '<div class="trend-error-info-mini">\n  <p class="error-p">我们检测到访问异常\uFF0C请您验证后继续使用</p>\n  <a class="error-sp" href="';
    $$out += $escape(url);
    $$out += '">点击验证</a>\n  <style type="text/css">\n    #mini_price_history {\n      \n    }\n    #mini_price_history span {\n      float: left;\n      width: 100%;\n      text-align: center;\n      line-height: 36px;\n      color: #666;\n      font-size: 14px;\n    }\n    #mini_price_history .trend-error-info-mini {\n      position: absolute;\n      top: 37px;\n      left: 0px;\n      width: 100%;\n      background: #fff;\n      z-index: 99999999;\n      height: 268px;\n      display: none;\n      box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);\n      border-radius: 0 0 4px 4px;\n      width: 460px;\n      border: 1px solid #ddd;\n      border-top: none;\n    }\n    #mini_price_history .error-p {\n      width: 100%;\n      float: left;\n      text-align: center;\n      margin-top: 45px;\n      font-size: 14px;\n      color: #666;\n    }\n    #mini_price_history .error-sp {\n      width: 95px;\n      margin: 110px auto;\n      height: 20px;\n      line-height: 20px;\n      text-align: center;\n      color: #000!important;\n      border: 1px solid #333;\n      border-radius: 5px;\n      display: block;\n      text-decoration: none!important;\n    }\n    #mini_price_history:hover .trend-error-info-mini {\n      display: block;\n    }\n  </style>\n  <style type="text/css">\n    .bjgext-mini-trend {\n\n    }\n    .bjgext-mini-trend span {\n      float: left;\n      /*width: 100%;*/\n      text-align: center;\n      line-height: 36px;\n      color: #666;\n      font-size: 14px;\n    }\n    .bjgext-mini-trend .trend-error-info-mini {\n      position: absolute;\n      top: 37px;\n      left: -39px;\n      width: 100%;\n      background: #fff;\n      z-index: 99999999;\n      height: 268px;\n      display: none;\n      box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);\n      border-radius: 0 0 4px 4px;\n      width: 460px;\n      border: 1px solid #ddd;\n      border-top: none;\n    }\n    .bjgext-mini-trend .error-p {\n      width: 100%;\n      float: left;\n      text-align: center;\n      margin-top: 45px;\n      font-size: 14px;\n      color: #666;\n    }\n    .bjgext-mini-trend .error-sp {\n      width: 95px;\n      margin: 110px auto;\n      height: 20px;\n      line-height: 20px;\n      text-align: center;\n      color: #000!important;\n      border: 1px solid #333;\n      border-radius: 5px;\n      display: block;\n      text-decoration: none!important;\n    }\n    .bjgext-mini-trend:hover .trend-error-info-mini {\n      display: block;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__ = __webpack_require__(289);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BottomFavor_vue_vue_type_script_lang_js__ = __webpack_require__(86);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__BottomFavor_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__BottomFavor_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__BottomFavor_vue_vue_type_style_index_0_id_013bbf9d_lang_less_scoped_true__ = __webpack_require__(291);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__BottomFavor_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__["staticRenderFns"],
  false,
  null,
  "013bbf9d",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('013bbf9d')) {
      api.createRecord('013bbf9d', component.options)
    } else {
      api.reload('013bbf9d', component.options)
    }
    module.hot.accept("./BottomFavor.vue?vue&type=template&id=013bbf9d&scoped=true", function () {
      api.rerender('013bbf9d', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/BottomFavor.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__ = __webpack_require__(290);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_template_id_013bbf9d_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 290 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjgou-trend-qr-right",
    staticStyle: {
      width: "100%",
      display: "flex",
      "align-items": "center",
      height: "100%",
      "flex-direction": "column"
    }
  }, [_c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _vm.login ? _c("span", {
    "class": "bjgou-bottom-favor " + (_vm.productChecked ? "" : "bjgou-bottom-notchecked"),
    on: { click: _vm.favorClick }
  }, [_vm._v(_vm._s(_vm.productChecked ? "取消降价提醒" : "设置降价提醒"))]) : _vm._e(), _vm._v(" "), _vm.login ? _c("img", {
    staticStyle: {
      width: "111px",
      height: "111px",
      "box-sizing": "border-box",
      "margin-top": "14px",
      "image-rendering": "crisp-edges"
    },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/bjgou-qr-wechat.png",
      alt: ""
    }
  }) : _vm._e(), _vm._v(" "), _vm.login ? _c("span", {
    staticStyle: {
      "margin-top": "15px",
      "font-size": "16px",
      color: "#ffae45",
      "font-weight": "bold"
    }
  }, [_vm._v("微信扫码关注")]) : _vm._e(), _vm._v(" "), _vm.login ? _c("span", {
    staticStyle: {
      "margin-top": "8px",
      "font-size": "14px",
      color: "#6b6761"
    }
  }, [_vm._v("商品降价实时提醒")]) : _vm._e(), _vm._v(" "), !_vm.login ? _c("span", {
    staticClass: "bjgou-login-btn",
    on: {
      click: function click($event) {
        return _vm.goLogin();
      }
    }
  }, [_vm._v("登录")]) : _vm._e(), _vm._v(" "), !_vm.login ? _c("span", {
    staticStyle: {
      "margin-top": "6px",
      "font-size": "12px",
      color: "#8c847b",
      display: "inline-block"
    }
  }, [_vm._v("商品降价实时提醒")]) : _vm._e(), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } })]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_style_index_0_id_013bbf9d_lang_less_scoped_true__ = __webpack_require__(292);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_style_index_0_id_013bbf9d_lang_less_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BottomFavor_vue_vue_type_style_index_0_id_013bbf9d_lang_less_scoped_true__);
/* unused harmony reexport namespace */


/***/ }),
/* 292 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(293);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("96c39340", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BottomFavor.vue?vue&type=style&index=0&id=013bbf9d&lang=less&scoped=true", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BottomFavor.vue?vue&type=style&index=0&id=013bbf9d&lang=less&scoped=true");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 293 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgou-login-btn[data-v-013bbf9d] {\n  display: inline-block;\n  width: 228px;\n  height: 28px;\n  line-height: 28px;\n  background: linear-gradient(270deg, #ffcd47 0%, #ff9f22 100%);\n  border-radius: 16px;\n  cursor: pointer;\n  /*margin-top: 112px;*/\n  text-align: center;\n  font-size: 12px;\n  color: white;\n}\n.bjgou-bottom-favor[data-v-013bbf9d] {\n  margin-top: 35px;\n  width: 110px;\n  height: 24px;\n  line-height: 24px;\n  text-align: center;\n  border-radius: 14px;\n  border: 1px solid #ffae45;\n  display: block;\n  color: #ffae45;\n  font-size: 12px;\n  cursor: pointer;\n}\n.bjgou-bottom-notchecked[data-v-013bbf9d] {\n  background: #ffae45;\n  color: white;\n}\n", ""]);

// exports


/***/ }),
/* 294 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = listToStyles;
/**
 * Translates the list format produced by css-loader into something
 * easier to manipulate.
 */
function listToStyles (parentId, list) {
  var styles = []
  var newStyles = {}
  for (var i = 0; i < list.length; i++) {
    var item = list[i]
    var id = item[0]
    var css = item[1]
    var media = item[2]
    var sourceMap = item[3]
    var part = {
      id: parentId + ':' + i,
      css: css,
      media: media,
      sourceMap: sourceMap
    }
    if (!newStyles[id]) {
      styles.push(newStyles[id] = { id: id, parts: [part] })
    } else {
      newStyles[id].parts.push(part)
    }
  }
  return styles
}


/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, onHandPrice = $data.onHandPrice, combinePrice = $data.combinePrice, showList = $data.showList, cmp = $data.cmp, $each = $imports.$each, $value = $data.$value, $index = $data.$index, allLink = $data.allLink, storeLen = $data.storeLen, showapp = $data.showapp;
    $$out += '<div id="mini_price_history_bjg_detail" class="mini-trend-detail">\n    <div class="mini_price_history_bjg_detail_wrapper" style="float:left">\n      <div class="max-min-priinfo-bjg"></div>\n      <div id="mini_price_history_bjg_detail_chart"></div>\n      <div id="mini_price_history_bjg_detail_info"></div>\n      <div id="mini_price_history_bjg_detail_btn" class="legend-btn-box" style="display: flex; justify-content: center;">\n        <span class="price-trend-sp pt-sp1 " style="margin-left: 0px;" data-id="days180">\n          <em style="margin-left: 0; margin-right: 0"></em>\n          <span>';
    $$out += $escape(onHandPrice);
    $$out += '</span>\n        </span>\n        <span class="review-trend-sp" data-id="plotSpecial" style="margin-left: 50px;">\n          <em style="margin-left: 0; margin-right: 0"></em>\n          <span>';
    $$out += $escape(combinePrice);
    $$out += '</span>\n        </span>\n      </div>\n    </div>\n    <div id="big_tooltip_bjg" class="big_tooltip_bjg_box">\n    </div>\n    ';
    if (showList) {
        $$out += '\n    <div class="bjg_sameList">\n      <div style="text-align: center; height: 37px; ling-height: 37px; background: #fbfbfb; font-size: 13px; color: #6b6761">';
        $$out += $escape(cmp);
        $$out += '</div>\n      ';
        $each(showList, function ($value, $index) {
            $$out += '\n        <a href="';
            $$out += $escape($value.url);
            $$out += '" target="_blank" class="bjg-store-link">\n          <img src="';
            $$out += $escape($value.icourl);
            $$out += '">\n          <span class="t-com-sitename" title="';
            $$out += $escape($value.site_name);
            $$out += '">';
            $$out += $escape($value.site_name);
            $$out += '</span>\n          <div style="flex: 1"></div>\n          <span class="t-com-price prifontf" style="font-weight: bold">\xA5';
            $$out += $escape($value.price);
            $$out += '</span>\n        </a>\n      ';
        });
        $$out += '\n<!--      <div style="flex: 1; position: relative">-->\n<!--        <a href="';
        $$out += $escape(allLink);
        $$out += '" target="_blank" style="line-height: initial; position: absolute; right: 10px; bottom: 15px; color: #999; font-size: 12px; text-decoration: none">查看全部(';
        $$out += $escape(storeLen);
        $$out += ')</a>-->\n<!--      </div>-->\n    </div>\n    ';
    }
    $$out += '\n    ';
    if (showapp) {
        $$out += '\n    <div class="app-tuiguang-bjgou">\n      <div style="text-align: center; line-height: initial; margin-top: 37px;">\n        <span class="bjgAppName">比价狗APP</span>\n      </div>\n      <img ';
        $$out += 'src="https://cdn.bijiago.com/images/extensions/bijiago/bjg-qrcode@2x.png"';
        $$out += ' alt="" style="width: 128px; height: 128px; margin-top: 31px;">\n      <img ';
        $$out += 'src="https://cdn.bijiago.com/images/extensions/bijiago/slogan@2x.png"';
        $$out += ' alt="" style="width: 145px; height: 32px; margin-top: 32px;">\n    </div>\n    <style type="text/css">\n      .showapp #mini_price_history_bjg_detail {\n        width: 676px;\n      }\n      .bjgAppName {\n        margin-top: 37px;\n        color: #6b6761;\n        font-size: 14px;\n        position: relative;\n      }\n\n      .bjgAppName::before, .bjgAppName::after {\n        content: \'\';\n        position: absolute;\n        background: #ffdf56;\n        width: 28px;\n        height: 2px;\n        top: 50%;\n        margin-top: -1px;\n      }\n\n      .bjgAppName::before {\n        left: -37px;\n      }\n\n      .bjgAppName::after {\n        left: 100%;\n        margin-left: 9px;\n      }\n\n      .app-tuiguang-bjgou {\n        width: 212px;\n        height: 100%;\n        float: left;\n        border-left: 1px solid #e4e4e4;\n        background: #fff;\n        border-top: 1px solid #e4e4e4;\n        position: relative;\n        top: -1px;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n      }\n      .app-tuiguang-bjgou p {\n        width: 97px;\n        height: 16px;\n        line-height: 16px;\n        text-align: left;\n        padding: 0px;\n        font-weight: bold;\n        font-size: 12px;\n        margin: 15px 0 0 17px;\n      }\n      .app-tg-qrcode {\n        float: left;\n        height: 128px;\n        width: 128px;\n        margin-bottom: 3px;\n      }\n      .app-tg-item {\n        height: 22px;\n        width: 100%;\n        float: left;\n        margin-bottom: 14px;\n      }\n      .app-tg-item em {\n        float: left;\n        height: 22px;\n        width: 22px;\n        margin-left: 23px;\n      }\n      .app-tg-item span {\n        height: 22px;\n        line-height: 22px;\n        width: auto;\n        float: left;\n        color: #666;\n        font-size: 13px;\n        margin-left: 10px;\n      }\n      .item-bijiage em {\n        background: url("https://cdn.gwdang.com/images/extensions/apptg181019/bjg.png") 0px 0px no-repeat;\n      }\n      .item-history em {\n        background: url("https://cdn.gwdang.com/images/extensions/apptg181019/history.png") 0px 0px no-repeat;\n      }\n      .item-coupon em {\n        background: url("https://cdn.gwdang.com/images/extensions/apptg181019/coupon.png") 0px 0px no-repeat;\n      }\n      #mini_price_history_bjg_detail .discount-price-re {\n        left: 364px;\n        right: inherit;\n      }\n    </style>\n    ';
    }
    $$out += '\n  </div>\n<style>\n  .bjg-store-link {\n    display: inline-flex;\n    align-items: center;\n    box-sizing: border-box;\n    height: 40px;\n  }\n\n  .bjg-store-link:hover {\n    background: #fffbef;\n  }\n\n  .bjg-store-link img {\n    width: 16px;\n    height: 16px;\n    margin-left: 10px;\n  }\n\n  .bjg-store-link .t-com-sitename {\n    color: #404547;\n    font-size: 12px;\n    margin-left: 8px;\n    max-width: 95px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    overflow: hidden;\n  }\n\n  .bjg-store-link .t-com-price {\n    font-size: 14px;\n    color: #ff6132;\n    margin-right: 10px;\n  }\n\n  .bjg_sameList {\n    width: 211px;\n    display: flex;\n    height: 100%;\n    flex-direction: column;\n    border-left: 1px solid #e6e9eb;\n  }\n</style>\n<style>\n  #mini_price_history_bjg_detail {\n    /*box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.11);*/\n    display: none;\n    background: #fff;\n    position: absolute;\n    z-index: 999999;\n    margin-left: 0;\n    left: -39px;\n    top: 36px;\n    width: 462px;\n    height: 320px;\n      /*height: 290px;*/\n    border: 1px solid rgba(230,233,235,1);\n    /*border-top: none;*/\n  }\n  .coudanpri #mini_price_history_bjg_detail {\n    height: 320px;\n  }\n</style>\n<style>\n  #mini_price_history_bjg_detail._dsj_show {\n    height: 339px;\n  }\n  #mini_price_history_bjg_detail .legend-btn-box span span {\n    font-size: 12px;\n    color: #999;\n    float: left;\n    margin-left: 10px;\n    line-height: 17px;\n  }\n  .mini_price_history_bjg_detail_wrapper {\n    width: 462px;\n  }\n  #mini_price_history_bjg_detail_chart {\n    float: left;\n  }\n  #mini_price_history_bjg_detail_btn {\n    height: 17px;\n    margin-top: 20px;\n    float: left;\n    width: 459px;\n  }\n\n  .legend-btn-box span {\n    float: left;\n    height: 17px;\n    cursor: pointer;\n  }\n</style>\n<style>\n  #mini_price_history_bjg_detail .max-min-priinfo {\n    width: 460px;\n    height: 64px;\n    position: relative;\n    float: left;\n  }\n  #mini_price_history_bjg_detail .coudanpri .max-min-priinfo {\n    height: 85px;\n  }\n  #mini_price_history_bjg_detail .orign-pri-info {\n    margin-top: 14px;\n  }\n  #mini_price_history_bjg_detail .promo-pri-info {\n    margin-top: 10px;\n  }\n  #mini_price_history_bjg_detail .orign-pri-info, #mini_price_history_bjg_detail .promo-pri-info {\n    float: left;\n    height: 16px;\n    width: 100%;\n  }\n  #mini_price_history_bjg_detail .orign-pri-info *, #mini_price_history_bjg_detail .promo-pri-info * {\n    float: left;\n    font-size: 12px;\n    line-height: 16px;\n  }\n  #mini_price_history_bjg_detail .opi-sp1 {\n    font-weight: 500;\n    color: #ff6132;\n  }\n  #mini_price_history_bjg_detail .opi-sp1, .ppi-sp1, .ppi-sp2 {\n    margin-left: 10px;\n  }\n  #mini_price_history_bjg_detail .opi-sp3, .ppi-sp1+.ppi-sp2 {\n    margin-left: 10px;\n  }\n  #mini_price_history_bjg_detail .opi-sp3 {\n    letter-spacing: 0.1px;\n  }\n  #mini_price_history_bjg_detail .ppi-sp1 {\n    height: 16px;\n    width: 76px;\n    text-align: center;\n    line-height: 16px;\n  }\n  #mini_price_history_bjg_detail .ppi-sp1:after {\n    content: "";\n    display: inline-block;\n    width: 15px;\n    height: 1px;\n    background-color: #d8d8d8;\n    vertical-align: middle;\n  }\n  #mini_price_history_bjg_detail .opi-sp1, #mini_price_history_bjg_detail .opi-sp2 {\n    color: #ff6132;\n    font-weight: 500;\n  }\n  #mini_price_history_bjg_detail .opi-sp1.nowpri, #mini_price_history_bjg_detail .opi-sp2.nowpri {\n    color: #3FC0F0;\n  }\n  #mini_price_history_bjg_detail .opi-sp2, #mini_price_history_bjg_detail .opi-sp4, #mini_price_history_bjg_detail .ppi-sp3, #mini_price_history_bjg_detail .opi-sp5, #mini_price_history_bjg_detail .ppi-sp4 {\n    margin-left: 2px;\n    font-weight: 500;\n  }\n  #mini_price_history_bjg_detail .opi-sp3, #mini_price_history_bjg_detail .opi-sp4 {\n    color: #49bc63;\n    font-weight: 500;\n  }\n  #mini_price_history_bjg_detail .opi-sp5, #mini_price_history_bjg_detail .ppi-sp4 {\n    color: #9D9D9D;\n    font-weight: 500;\n  }\n  #mini_price_history_bjg_detail .ppi-sp2, #mini_price_history_bjg_detail .ppi-sp3 {\n    color: #fba500;\n    font-weight: 500;\n    /*font-weight: bold;*/\n  }\n  #mini_price_history_bjg_detail .promo-history-link {\n    color: #a1a2a9!important;\n    position: absolute;\n    right: 15px;\n    top: 40px;\n    line-height: 16px;\n    text-decoration: none!important;\n  }\n  .mini_price_history_bjg_detail .promo-history-link:hover {\n    color: #5ebeff!important;\n  }\n  .mini_price_history_bjg_detail .mini-share-product {\n    position: absolute;\n    right: 15px;\n    top: 14px;\n    display: inline-block;\n    height: 12px;\n    width: 25px;\n    font-size: 12px;\n    line-height: 16px;\n    color: #a1a2a9;\n    cursor: pointer;\n  }\n  .mini_price_history_bjg_detail .mini-share-product.shared {\n    color: #5acffb;\n    width: auto;\n  }\n  .mini_price_history_bjg_detail .mini-share-product:before {\n    content: "";\n    display: block;\n    position: absolute;\n    height: 12px;\n    width: 12px;\n    top: 2px;\n    left: -14px;\n    background: url("http://cdn.gwdang.com/images/extensions/newbar/share-mini-btn.png") 0px 0px no-repeat;\n  }\n  .mini_price_history_bjg_detail .mini-share-product.shared:before {\n    display: none;\n  }\n\n</style>';
    return $$out;
};

/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, src = $data.src;
    $$out += '<div class="wxqrcode">\n  <span class="qrcode-sp1">比价狗APP</span>\n  <img src="';
    $$out += $escape(src);
    $$out += '">\n  <span class="app-tle"></span>\n  <style type="text/css">\n    .wxqrcode {\n      height: 240px;\n      width: 150px;\n      position: absolute;\n      right: 0px;\n      z-index: 99999999999;\n      border-left: 1px solid #f1f1f1;\n    }\n    .wxqrcode span {\n      float: left;\n      height: 19px;\n      width: 100%;\n      text-align: center;\n      line-height: 19px;\n      color: #444;\n      font-size: 14px;\n      font-weight: bold;\n    }\n    .qrcode-sp1 {\n      margin-top: 17px;\n      position: relative;\n    }\n    .qrcode-sp1:before, .qrcode-sp1:after {\n      width: 20px;\n      height: 1px;\n      background: #FFDF56;\n      content: "";\n      display: block;\n      position: absolute;\n      \n    }\n    .qrcode-sp1:before {\n      left: 13px;\n      bottom: 9px;\n    }\n    .qrcode-sp1:after {\n      right: 13px;\n      bottom: 9px;\n    }\n    .wxqrcode img {\n      height: 90px;\n      width: 90px;\n      float: left;\n      margin-left: 30px;\n      margin-top: 26px;\n    }\n    .wxqrcode span.app-tle {\n      float: left;\n      width: 103px;\n      height: 38px;\n      background: url("https://cdn.bijiago.com/images/extensions/apptg181019/bjg-app-tle.png") 0px 0px no-repeat;\n      margin-left: 24px;\n      margin-top: 26px;\n    }\n    #bjgext_minitrend_detail.addqrcode {\n      width: 610px;\n    }\n    #bjgext_minitrend_detail.addqrcode #bjgext_mini_trendbox {\n      width: 459px;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
    // 某些网站会覆盖掉js的一些方法
    if (G.site === 'keede') {
        __webpack_require__(298)();
    }

    if (G.site === 'ule' || G.site === 'yesmywine') {
        Array.prototype.filter = function (cb) {
            var temp = [];
            for (var i = 0; i < this.length; i++) {
                if (cb(this[i])) {
                    temp.push(this[i]);
                }
            }
            return temp;
        };
    }

    if (G.site === 'suning') {
        setTimeout(function () {
            $('#gwd_mini_compare').on('click', 'a', function (e) {
                var url = $(this).attr('href');
                if (url && url.indexOf('http') > -1) {
                    window.open($(this).attr('href'));
                    e.preventDefault();
                }
            });
        }, 500);
    }

    if (G.site === 'wstx') {
        Array.prototype.indexOf = function (searchElement, fromIndex) {
            var k;
            if (this == null) {
                throw new TypeError('"this" is null or not defined');
            }

            var O = Object(this);
            var len = O.length >>> 0;

            if (len === 0) {
                return -1;
            }
            var n = +fromIndex || 0;
            if (Math.abs(n) === Infinity) {
                n = 0;
            }
            if (n >= len) {
                return -1;
            }
            k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
            while (k < len) {
                if (k in O && O[k] === searchElement) {
                    return k;
                }
                k++;
            }
            return -1;
        };
    }
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G) {

module.exports = function () {
  if (G.site === 'keede' && Array.prototype.forEach.toString() !== "function forEach() { [native code] }") {
    Array.prototype.forEach = function (callback, thisArg) {
      var T, k;
      if (this == null) {
        throw new TypeError(' this is null or not defined');
      }
      var O = Object(this);
      var len = O.length >>> 0;
      if (typeof callback !== "function") {
        throw new TypeError(callback + ' is not a function');
      }
      if (arguments.length > 1) {
        T = thisArg;
      }
      k = 0;
      while (k < len) {
        var kValue;
        if (k in O) {
          kValue = O[k];
          callback.call(T, kValue, k, O);
        }
        k++;
      }
    };
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, Vue, regeneratorRuntime) {

var _this2 = this;

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var cnzz = __webpack_require__(12);
var util = __webpack_require__(19);
var extConsole = __webpack_require__(6);

//嵌入位置设置
var sitePattern = {
  'vmall': ['.product-info .product-info-list', '.pro-right .pro-meta-area', '.pro-price'],
  'yougou': ['#ygprice_area'],
  'gome': ['.prdprice', '#bargain', '.prd-price-1'],
  'vipshop': ['.pi-price-box'],
  '360buy': ['#summary-price', '.summary-price', '#surplus-time', '#product-intro #price'],
  '360buy-book': ['#summary-price'],
  '360buy-re': ['.shop_intro .shop_intro_a'],
  'taobao': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox', '[class^=MiniHead--miniPanelHead--]', {
    selector: '#purchasePanel > [class^=CouponInfo--couponInfo]',
    position: 'after'
  }, {
    selector: '.Price--eXtPHNRb',
    position: 'after'
  }, {
    selector: '[class^=Price--root]',
    position: 'after'
  }, '[class^=SecurityPrice--securityPrice]', {
    selector: '[class^=MiniHead--miniPanelHead--]',
    position: 'after'
  }, {
    selector: '[class^=Address--MCDelivery--]',
    position: 'before'
  }],
  'taobao-ju': ['.J_BuySubForm'],
  'taobao-95095': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox'],
  'tmall': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox', '[class^=MiniHead--miniPanelHead--]',
  // {
  //   selector: '[class^=CouponInfo--couponInfo]',
  //   position: 'before'
  // },
  {
    selector: '#purchasePanel > [class^=CouponInfo--couponInfo]',
    position: 'after'
  }, {
    selector: '[class^=Price--root]',
    position: 'after'
  }, '[class^=SecurityPrice--securityPrice]', {
    selector: '[class^=MiniHead--miniPanelHead--]',
    position: 'after'
  }, {
    selector: '[class^=Address--MCDelivery--]',
    position: 'before'
  }],
  '51buy': ['.xbase_item:contains("促销价")', '.xbase_item:contains("易迅价")', '#goods_detail_mate .item_icson', '.xbase_row2', '#promotePrice', '#shopprice', '#promotePriceArea'],
  'suning': ['#noPrice', '#_main_price', '#existPrice', '#netPriceBox', '#hasPrice', '#mainPrice', '#priceDom'],
  'dangdang': ['.price_time', '.d15_price_info', '.price_qiang', '.price_info', '.show_info .sale>p', '.sale_box:first'],
  'yihaodian': ['#point_productPrice', '.price_array', '#currentPriceArea'],
  'vancl': ['#pricearea .cuxiaoPrice'],
  'newegg': ['.neweggPrice', '.goods_price_now'],
  'kaola': ['.m-price'],
  'lenovo': ['#div_product_dec', '#span_product_name'],
  'microsoftstore': ['.priceAndRank'],
  'xiaomi': ['.J_saleWrap.sale-wrap', '.goods-info-head-price', '.pro-time.J_proOrder'],
  'okbuy': ['.prodPriceLiJ .prodPrice'],
  'banggo': ['.mbshop_detail_baseinfo'],
  'you163': ['.price>.f-clearfix'],
  'amazon-com': [
  // '#omnibusPrice_feature_div',
  '#corePrice_desktop', '#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-uk': [
  // '#omnibusPrice_feature_div',
  '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-jp': [
  // '#omnibusPrice_feature_div',
  '#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-au': [
  // '#omnibusPrice_feature_div',
  '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-fr': [
  // '#omnibusPrice_feature_div',
  '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-ca': [
  // '#omnibusPrice_feature_div',
  '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'amazon-de': ['#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
  'momoshop': ['.prdPrice'],
  'rakuten': ['.mRZzLzcnN8KK8we4U6l1'],
  'books': ['.mod.type02_p011'],
  'shopee': ['.h-y3ij'],
  'pchometw': ['.prod_describe'],
  'twbuyyahoo': ['.HeroInfo__heroInfo___1V1O8', '.subtitle__3NvAJ']
};
var totalPages = 0,
    nowPage = undefined;

var getPosition = function getPosition(callback) {
  var site = G.site;
  if (site.includes('amazon')) {
    site = 'amazon-com';
  }
  var pos = sitePattern[site];
  if (!pos) return;
  for (var i = 0; i < pos.length; i++) {
    var selector = pos[i].selector || pos[i];
    var position = pos[i].position || 'after';
    if ($(selector).length > 0) {
      callback(selector, position);
      return;
    }
  }
  setTimeout(function () {
    getPosition(callback);
  }, 400);
};

var setMiniBarComTle = function setMiniBarComTle(item, num, isfuzzy) {
  if (G.ss_name === 'priceDog' && __webpack_require__(27).isHaitao()) return;
  if (G.site === '6pm') return;
  // const selector = '#bjgext_minibar #gwd_mini_compare'
  var selector = '.bjgext-mini-compare';
  $(selector).show();
  var tle = undefined;
  if (!item && !num) {
    tle = '<span class="no_pri_sp">暂无商家比价</span>';
  } else if (isfuzzy) {
    tle = '<span class="" style="width: 100%; display: flex; align-items: center; justify-content: center"><img src="https://cdn.bijiago.com/images/extensions/bijiago/exchange@2x.png" style="width: 16px; height: 16px; margin-right: 6px; vertical-align: middle">' + (G.lang === 'zh-tr' ? '商城相似款' : '商城相似款') + '</span>';
  } else {
    var lowest = Number(item.price.toString().replace(',', ''));
    if (lowest < G.dp.price) {
      var site_name = item.site_name;
      var price = item.price;
      tle = '<img src="https://cdn.bijiago.com/images/extensions/bijiago/yuan.svg" style="display: inline-block; vertical-align: middle; width: 10px; height: 14px; margin-right: 4px" alt=""><span class="low_sp1">' + (G.lang === 'zh-tr' ? '更低價' : '更低价') + ':&nbsp;</span><span class="low_sp3">￥' + price + '</span>';
    } else {
      tle = '<div class="low_qtdiv"><img src="https://cdn.bijiago.com/images/extensions/bijiago/yuan.svg" style="display: inline-block; vertical-align: middle; width: 10px; height: 14px; margin-right: 6px;">其他<span class="other_sp">' + num + '</span>家报价</div>';
      if (G.lang === 'zh-tr') {
        tle = '<div class="low_qtdiv"><img src="https://cdn.bijiago.com/images/extensions/bijiago/yuan.svg" style="display: inline-block; vertical-align: middle; width: 10px; height: 14px; margin-right: 6px;">其他<span class="other_sp">' + num + '</span>家報價</div>';
      }
    }
  }
  if (!item && !num) {
    $(selector).remove();
  }
  $(selector).append($(tle)).show();
};
var lock = undefined,
    hidebtn = undefined;
var turnPage = function turnPage(t, dom) {
  lock = true;
  var left = Number(dom.css('left').replace('px', ''));
  if (t === '-1') {
    nowPage--;
    if (nowPage === 1) {
      $('.mini-com-foot .mini-com-tleft').hide();
    }
    if (hidebtn) {
      hidebtn = false;
      $('.mini-com-tright').show();
    }
    dom.animate({
      left: left + 450 + 'px'
    }, 500, function () {
      lock = false;
    });
  } else if (t === '1') {
    if (nowPage === totalPages) {
      lock = false;
      return;
    }
    nowPage++;
    if (nowPage === totalPages) {
      hidebtn = true;
      $('.mini-com-tright').hide();
    }
    if (nowPage === 2) {
      $('.mini-com-foot .mini-com-tleft').show();
    }
    dom.animate({
      left: left - 450 + 'px'
    }, 500, function () {
      lock = false;
    });
  }
};
var renderMiniCompare = function renderMiniCompare() {
  var html1 = __webpack_require__(300);
  var html2 = __webpack_require__(301);
  var html = undefined;
  var dp_data = userData.get('dp_data');
  var products = [];
  var domid = undefined;

  var renderCmp = false;

  if (dp_data.b2c.store && dp_data.b2c.store.length > 0) {
    html = html1;
    var len = dp_data.b2c.store && dp_data.b2c.store.length;
    len = len > 6 ? 6 : len;
    for (var i = 0; i < len; i++) {
      var item = dp_data.b2c.store[i].product[0];
      if (dp_data.now.now_dp_id == item.dp_id && dp_data.b2c.store[i].product[1]) item = dp_data.b2c.store[i].product[1];
      item.site_id = item.dp_id.match(/\d+-(\d+)/)[1];
      products.push(item);
    }
    setMiniBarComTle(dp_data.b2c.store[0].product[0], len);
  } else if (dp_data.b2c_fuzzy && dp_data.b2c_fuzzy.product && dp_data.b2c_fuzzy.product.length > 0) {
    html = html2;
    for (var i = 0; i < dp_data.b2c_fuzzy.product.length; i++) {
      var item = dp_data.b2c_fuzzy.product[i];
      if (item.price && item.url && item.site_name && (item.img_url || item.pic_url)) {
        products.push(item);
      }
    }
    var len = products.length;
    totalPages = parseInt(len / 3);
    products = products.slice(0, totalPages * 3);
    if (totalPages === 0) {
      setMiniBarComTle();
      return;
    }
    nowPage = 1;
    domid = '.mini-compare-fuzzy-detail ul';

    setMiniBarComTle(products[0], len, true);
    renderCmp = true;
  } else {
    setMiniBarComTle();
    return;
  }
  $('#bjgext_minibar').css('display', 'inline-block');
  G.showMinibar = true;
  var dom = template.compile(html)({
    data: products,
    totalPages: totalPages,
    s_server: G.s_server
  });

  $('.bjgext-mini-compare').append(dom);
  if (G.ss_name === 'priceDog') {
    $('#minibar_compare').css('left', '50%');
    $('#minibar_compare').css('margin-left', '-147px');
  }

  if (renderCmp) {
    var _ret = (function () {
      $('.bjgext-mini-compare').css('position', 'static');
      var MiniList = __webpack_require__(302)['default'];
      new Vue({
        el: '#bjg-mini-cmp-fuzzy',
        render: function render(h) {
          return h(MiniList, {
            props: {
              products: products
            }
          });
        }
      });
      return {
        v: undefined
      };
    })();

    if (typeof _ret === 'object') return _ret.v;
  }
  addEvent(domid);
};

var addEvent = function addEvent(id) {
  var uldom = $(id);
  $('.bjgext-mini-compare').on('mouseenter', function () {
    $('#bjgext_minibar').addClass('_mshover');
  });
  $('.bjgext-mini-compare').on('mouseleave', function () {
    $('#bjgext_minibar').removeClass('_mshover');
  });
  if (id) {
    $('.bjgext-mini-compare .mini-com-foot').on('click', function (e) {
      var type = $(e.target).attr('data-type');
      if (type && !lock && e.target.nodeName !== 'A') {
        turnPage(type, uldom);
      }
    });
  }
};
var setHackSite = function setHackSite() {
  if (G.site === 'suning') {
    if ($('#R-n-similar').children().length > 0) {
      var h = $('#proinfoMain').height();
      $('#proinfoMain').height(h + 110);
    }
  }
};
var renderMiniBar = function renderMiniBar(pos, insertPlace) {
  var html = __webpack_require__(308);
  var p = insertPlace;
  if (G.site === 'shopee') {
    p = 'before';
  }
  $(pos).eq(0)[p](template.compile(html)({
    alisite: G.aliSite,
    setting: G.server + '/brwext/setting_feedback?set=1'
  }));
  util.tongji('1', 'show');
  if (G.site.indexOf('amazon') > -1) {
    $('#bjgext_mb_bg').css('display', 'inline-block');
  }
  $('#bjgext_minibar').css('display', 'inline-block');
  $('#bjgext_minibar .bjgext-mini-logo').on('click', function () {
    cnzz.log('minibar-logo-click');
  });
  $('#bjgext_minibar').on('click', function (e) {
    var href = undefined;
    if (e.target.nodeName === 'A') {
      href = e.target.href;
    } else if (e.target.parentNode.nodeName === 'A') {
      href = e.target.parentNode.href;
    }
    if (href && href.indexOf('javascript:') === -1) {
      util.tongji('1', 'click', href);
    }
  });
  if (location.host === 'item.taobao.com') {
    setTimeout(function () {
      if (!$('#J_PromoPrice').is(':visible')) {
        $('#bjgext_mb_bg').css('margin-top', '10px');
      }
    }, 500);
  } else if (G.site === 'gome') {
    if ($('#bjgext_mb_bg').prev().hasClass('p20')) {
      $('#bjgext_mb_bg').addClass('p20');
    }
  }
  if (G.site === '360buy') {
    var bgcolor = $('.summary-price-wrap').css('background-color');
    if (bgcolor) {
      $('#bjgext_mb_bg').css('background-color', bgcolor);
    }
  }
  setHackSite();

  if (G.disableLogin) {
    return;
  }

  // if (navigator.userAgent.toLowerCase().indexOf('metasr') === -1) {
  var MiniFavor = __webpack_require__(309)['default'];
  new Vue({
    el: '#bjgouRemind',
    render: function render(h) {
      return h(MiniFavor);
    }
  });
  // } else {
  //   $('#bjgouRemind').remove()
  // }
};

function recoverMiniBar() {
  var bgSelector, globalConfig, recoverConfig, i, selector, position, target;
  return regeneratorRuntime.async(function recoverMiniBar$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        extConsole.log('recoverMiniBar');

        if (!$('.miniPanel').length) {
          context$1$0.next = 4;
          break;
        }

        extConsole.log('miniPanel exist');
        return context$1$0.abrupt('return');

      case 4:
        if (!window.gwd_g) {
          context$1$0.next = 7;
          break;
        }

        context$1$0.next = 7;
        return regeneratorRuntime.awrap(__webpack_require__(10).sleep(200));

      case 7:
        bgSelector = '#bjgext_mb_bg';

        if (!$(bgSelector).length) {
          extConsole.log('recoverMiniBar no minibar');
          document.body.appendChild(G.miniBar);
        }

        extConsole.log('recoverMiniBar selector res:', $(bgSelector)[0]);

        context$1$0.next = 12;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 12:
        globalConfig = context$1$0.sent;

        if (!(globalConfig && globalConfig.gwdMiniBarRecoverConfig)) {
          context$1$0.next = 26;
          break;
        }

        recoverConfig = globalConfig.gwdMiniBarRecoverConfig.aliSite;
        i = 0;

      case 16:
        if (!(i < recoverConfig.length)) {
          context$1$0.next = 26;
          break;
        }

        selector = recoverConfig[i].selector;
        position = recoverConfig[i].position;
        target = $(selector);

        if (!target.length) {
          context$1$0.next = 23;
          break;
        }

        if (position === 'before') {
          $(bgSelector).insertBefore(target);
        } else {
          $(bgSelector).insertAfter(target);
        }
        return context$1$0.abrupt('return');

      case 23:
        i++;
        context$1$0.next = 16;
        break;

      case 26:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this);
}

module.exports.init = function callee$0$0() {
  var globalConfig;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    var _this = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 2:
        globalConfig = context$1$0.sent;

        if (!(G.show_minibar === '0')) {
          context$1$0.next = 5;
          break;
        }

        return context$1$0.abrupt('return');

      case 5:
        if (!(location.host === 'www.amazon.cn')) {
          context$1$0.next = 7;
          break;
        }

        return context$1$0.abrupt('return');

      case 7:
        extConsole.log('minibar init');

        if (globalConfig && globalConfig.gwdMiniBarPositions) {
          if (G.aliSite) {
            sitePattern['taobao'] = globalConfig.gwdMiniBarPositions.aliSite;
            sitePattern['tmall'] = globalConfig.gwdMiniBarPositions.aliSite;
          } else {
            if (globalConfig.gwdMiniBarPositions[G.site]) {
              sitePattern[G.site] = globalConfig.gwdMiniBarPositions[G.site];
            }
          }
        }

        getPosition(function (pos, insertPlace) {
          if (G.aliSite) {
            var panel = globalConfig.aliMobileNotifierConfig.map(function (i) {
              return i.panel;
            }).find(function (item) {
              if ($(item).length) {
                return $(item)[0];
              }
              return false;
            });
            if (panel) {
              __webpack_require__(40).observe(panel, function callee$2$0(mutations) {
                var config;
                return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                  while (1) switch (context$3$0.prev = context$3$0.next) {
                    case 0:
                      extConsole.log('mutations:', mutations);
                      config = globalConfig.gwdMiniBarRecoverConfig.aliSite;
                      context$3$0.next = 4;
                      return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                        for (var i = 0; i < config.length; i++) {
                          var selector = config[i].selector;
                          if ($(selector).length) {
                            return true;
                          }
                        }
                        return false;
                      }));

                    case 4:
                      // 仅在panel的class发生变化时重新渲染minibar
                      recoverMiniBar();

                    case 5:
                    case 'end':
                      return context$3$0.stop();
                  }
                }, null, _this);
              }, {
                attributes: true,
                attributeFilter: ['class']
              });
            }
          }

          extConsole.log('begin minibar render');
          renderMiniBar(pos, insertPlace);
          if (G.ss_name === 'priceDog') {
            $('.bjgext-mini-logo a').attr('title', 'PriceDog');
            var div = document.createElement('div');
            div.id = 'pricedog-toolbar';
            if (location.host.indexOf('detail.ju.taobao.com') > -1) {
              $('#bjgext_mb_bg').eq(0).append(div);
              setTimeout(function () {
                $('.pricedog-bar').css({
                  position: 'relative',
                  top: '4px'
                });
              }, 0);
            } else {
              $('#bjgext_mb_bg').eq(0).after(div);
            }
            if (__webpack_require__(27).isHaitao()) {
              // const TaxViewer = require('../components/TaxViewer.vue').default
              // if (location.host === 'www.amazon.com') {
              //   new Vue({
              //     el: '#pricedog-toolbar',
              //     render: h => h(TaxViewer)
              //   })
              // }
            } else {
                (function () {
                  var PriceDogMiniBar = __webpack_require__(317)['default'];
                  new Vue({
                    el: '#pricedog-toolbar',
                    render: function render(h) {
                      return h(PriceDogMiniBar);
                    }
                  });
                })();
              }
          }
          $('.bjgext-mini-compare').hide();
          if (!G.aliSite && G.site.indexOf('amazon') === -1) renderMiniCompare();
          // require('./yifenqian').init()
          if (location.host.indexOf('taobao') > -1 || location.host.indexOf('tmall') > -1) __webpack_require__(97).init();
          if (location.host.indexOf('.jd.com') > -1 || location.host.indexOf('suning') > -1) __webpack_require__(97).init2();
          if (location.host.includes('amazon.co.jp')) {
            $('#centerCol').css('overflow', 'visible');
          }

          var el = $('#bjgext_mb_bg')[0];
          G.miniBar = el;
          if (el) {
            __webpack_require__(40).observe(el, function (mutations) {
              mutations.forEach(function (mutation) {
                if (mutation.removedNodes.length) {
                  __webpack_require__(6).log('minibar被移除');
                  if (G.instanceId === $('html').attr('data-bjg-id')) {
                    recoverMiniBar();
                  }
                }
              });
            });
          }
        });

      case 10:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this2);
};

// 确保.gwd-minibar-bg在.ActiveInfo上方
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"], __webpack_require__(5)))

/***/ }),
/* 300 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, s_server = $data.s_server;
    $$out += '<div id="minibar_compare">\n  <ul>\n    ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank">\n          <img src="';
        $$out += $escape(s_server);
        $$out += '/images/favicon/';
        $$out += $escape($value.site_id);
        $$out += '.png" >\n          <span class="bjgext_site_name">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n          <span class="bjgext-com-price">\uFFE5';
        $$out += $escape($value.price);
        $$out += '</span>\n        </a>\n      </li>\n    ';
    });
    $$out += '\n  </ul>\n</div>\n<style>\n  #minibar_compare ul {\n    padding-left: 0;\n  }\n\n  #minibar_compare ul li:last-of-type a {\n    border-bottom: none;\n  }\n\n  .bjgext_site_name {\n    overflow: hidden;\n    max-width: 125px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, totalPages = $data.totalPages;
    $$out += '<div class="mini-compare-fuzzy-detail">\n  <div id="bjg-mini-cmp-fuzzy"></div>\n<!--  <div class="mini-com-box">-->\n<!--    <ul>-->\n<!--    ';
    $each(data, function ($value, $index) {
        $$out += '-->\n<!--      <li class="mini-b2c-list">-->\n<!--        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="mini-bigimg">-->\n<!--          <img src="';
        $$out += $escape($value.img_url);
        $$out += '">-->\n<!--        </a>-->\n<!--        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="mini-tle" title="';
        $$out += $escape($value.title);
        $$out += '">-->\n<!--          ';
        $$out += $escape($value.title);
        $$out += '-->\n<!--        </a>-->\n<!--        <div class="ot-info-box">-->\n<!--          <span>-->\n<!--            <img src="';
        $$out += $escape($value.icon_url);
        $$out += '">-->\n<!--            <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="mini-site-name">';
        $$out += $escape($value.site_name);
        $$out += '</a>-->\n<!--          </span>-->\n<!--        </div>-->\n<!--        <span class="mini-price prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>-->\n<!--      </li>-->\n<!--    ';
    });
    $$out += '-->\n<!--  </ul>-->\n<!--  </div>-->\n<!--  <div class="mini-com-foot"> -->\n<!--    <span class="mini-com-turnbtn mini-com-tleft" data-type="-1">< 上一页</span>-->\n<!--    ';
    if (totalPages > 1) {
        $$out += '-->\n<!--    <span class="mini-com-turnbtn mini-com-tright" data-type="1">下一页 ></span>-->\n<!--    ';
    }
    $$out += '-->\n<!--  </div>-->\n</div>\n<style type="text/css">\n  .mini-compare-fuzzy-detail {\n    height: 284px;\n    width: 465px;\n    overflow: hidden;\n    position: absolute;\n    top: 36px;\n    /*left: -232px;*/\n    left: -1px;\n    /*margin-left: -248px;*/\n    z-index: 99999999999;\n    box-sizing: border-box;\n    display: none;\n  }\n  #bdext_minibar:hover {\n    z-index: 99999999999;\n  }\n  .mini-com-box ul:after {\n    display: block;\n    clear: both;\n    content: "";\n  }\n  .mini-com-box {\n    margin-top: 10px;\n    height: 247px;\n    width: 460px;\n    overflow: hidden;\n    position: relative;\n  }\n  .mini-com-box ul {\n    position: absolute;\n    height: 247px;\n    left: 0px;\n    padding: 0px;\n    margin: 0px;\n  }\n  .mini-compare-fuzzy-detail .mini-b2c-list {\n    float: left;\n    margin-left: 10px;\n    width: 140px;\n    height: 247px;\n    clear: none;\n    list-style: none;\n  }\n  .mini-bigimg {\n    width: 140px;\n    height: 140px;\n    float: left;\n    line-height: 140px;\n  }\n  .mini-bigimg img {\n    max-width: 100%;\n    max-height: 100%;\n    vertical-align: middle;\n  }\n  .ot-info-box {\n    float: left;\n    margin-top: 10px;\n    width: 100%;\n    height: 16px!important;\n    line-height: 16px!important;\n    text-align: center;\n  }\n  .ot-info-box>span {\n    display: inline-block;\n    margin:0 auto;\n    float: none!important;\n  }\n  .ot-info-box>span:after {\n    content: "";\n    display: block;\n    clear: both;\n  }\n  .ot-info-box>span * {\n    float: left;\n  }\n  .ot-info-box>span img {\n    height: 16px;\n    width: 16px;\n  }\n  .ot-info-box>span a {\n    margin-left: 6px;\n    line-height: 16px!important;\n    height: 16px!important;\n    width: auto;\n    overflow: hidden;\n    max-width: 114px;\n    font-size: 12px;\n    color: #666;\n    text-decoration: none!important;\n  }\n  .mini-compare-fuzzy-detail .mini-tle {\n    float: left;\n    margin-top: 10px;\n    width: 136px;\n    height: 32px;\n    line-height: 16px;\n    font-size: 12px;\n    color: #5C6266;\n    text-align: center;\n    overflow: hidden;\n  }\n  .mini-price {\n    float: left!important;\n    margin-top: 10px!important;\n    width: 100%;\n    height: 19px;\n    line-height: 19px!important;\n    text-align: center;\n    font-size: 14px;\n    color: #E4393C;\n    font-weight: bold;\n  }\n  .mini-com-foot {\n    width: 100%;\n    height: 26px;\n  }\n  .mini-com-foot .mini-com-turnbtn {\n    color: #999;\n    font-size: 12px;\n    position: absolute;\n    line-height: 16px;\n    bottom: 8px;\n    cursor: pointer;\n  }\n  .mini-com-foot .linkAll {\n    position: absolute;\n    bottom: 8px;\n    right: 10px;\n    font-size: 12px;\n    line-height: 16px;\n    color: #999;\n    display: none;\n  }\n  .mini-com-foot .mini-com-turnbtn:hover,.mini-tle:hover,.mini-com-foot .linkAll:hover, .mini-site-name:hover {\n    color: #48BEFF!important;\n  }\n  .mini-com-tleft {\n    left: 10px;\n    display: none;\n  }\n  .mini-com-tright {\n    right: 10px;\n  }\n  .mini-com-foot span{\n    -webkit-user-select: none;\n    user-select: none;\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 302 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MiniList_vue_vue_type_template_id_5637898a_scoped_true__ = __webpack_require__(303);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MiniList_vue_vue_type_script_lang_js__ = __webpack_require__(89);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MiniList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MiniList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MiniList_vue_vue_type_style_index_0_id_5637898a_lang_less_scoped_true__ = __webpack_require__(305);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MiniList_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MiniList_vue_vue_type_template_id_5637898a_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MiniList_vue_vue_type_template_id_5637898a_scoped_true__["staticRenderFns"],
  false,
  null,
  "5637898a",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('5637898a')) {
      api.createRecord('5637898a', component.options)
    } else {
      api.reload('5637898a', component.options)
    }
    module.hot.accept("./MiniList.vue?vue&type=template&id=5637898a&scoped=true", function () {
      api.rerender('5637898a', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/MiniList.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 303 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__ = __webpack_require__(304);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_template_id_5637898a_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-mini-products" }, [_c("img", {
    staticClass: "turnImg left-turn",
    style: _vm.currentPage === 0 ? "visibility: hidden" : "",
    attrs: { src: __webpack_require__(88), alt: "" },
    on: { click: _vm.prevPage }
  }), _vm._v(" "), _c("div", {
    staticStyle: {
      display: "flex",
      flex: "1",
      "justify-content": "space-between",
      "flex-direction": "row",
      "flex-wrap": "nowrap"
    }
  }, _vm._l(_vm.showingList, function (item) {
    return _c("a", {
      staticClass: "bjg-cmp-product",
      attrs: { href: item.url, target: "_blank" }
    }, [_c("img", {
      attrs: {
        src: item.img_url,
        alt: "",
        onerror: "this.src = 'http://cdn.bijiago.com/images/extensions/default_load_image.png'"
      }
    }), _vm._v(" "), _c("span", { staticClass: "redPrice" }, [_vm._v("¥" + _vm._s(item.price))]), _vm._v(" "), _c("span", { staticClass: "iconText" }, [_c("img", { attrs: { src: item.icon_url, alt: "" } }), _vm._v(" " + _vm._s(item.site_name))]), _vm._v(" "), _c("span", { staticClass: "productTitle" }, [_vm._v(_vm._s(item.title))])]);
  }), 0), _vm._v(" "), _c("img", {
    staticClass: "turnImg right-turn",
    style: _vm.currentPage === _vm.totalPage - 1 ? "visibility: hidden" : "",
    attrs: { src: __webpack_require__(88), alt: "" },
    on: { click: _vm.nextPage }
  })]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 305 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_style_index_0_id_5637898a_lang_less_scoped_true__ = __webpack_require__(306);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_style_index_0_id_5637898a_lang_less_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniList_vue_vue_type_style_index_0_id_5637898a_lang_less_scoped_true__);
/* unused harmony reexport namespace */


/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(307);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1320d20c", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniList.vue?vue&type=style&index=0&id=5637898a&lang=less&scoped=true", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniList.vue?vue&type=style&index=0&id=5637898a&lang=less&scoped=true");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-mini-products[data-v-5637898a] {\n  width: 462px;\n  /*height:243px;*/\n  padding-bottom: 28px;\n  background: #ffffff;\n  /*box-shadow:0px 2px 4px 0px rgba(226,226,226,1);*/\n  /*border-radius:0px 0px 4px 4px;*/\n  border: 1px solid #e6e9eb;\n  display: flex;\n  line-height: initial;\n  flex-direction: row;\n}\n.bjg-mini-products img[data-v-5637898a] {\n  display: inline-block;\n  vertical-align: middle;\n}\n.bjg-mini-products .turnImg[data-v-5637898a] {\n  margin-top: 94px;\n  width: 14px;\n  height: 24px;\n  cursor: pointer;\n}\n.bjg-mini-products .left-turn[data-v-5637898a] {\n  margin-left: 20px;\n  margin-right: 6px;\n}\n.bjg-mini-products .right-turn[data-v-5637898a] {\n  margin-left: 6px;\n  margin-right: 20px;\n  transform: rotate(180deg);\n}\n.bjg-mini-products .bjg-cmp-product[data-v-5637898a]:hover {\n  text-decoration: none;\n}\n.bjg-mini-products .bjg-cmp-product[data-v-5637898a] {\n  display: flex;\n  flex-direction: column;\n  cursor: pointer;\n  width: 177px;\n  align-items: center;\n}\n.bjg-mini-products .bjg-cmp-product img[data-v-5637898a] {\n  width: 100px;\n  height: 100px;\n  margin-top: 16px;\n}\n.bjg-mini-products .bjg-cmp-product .redPrice[data-v-5637898a] {\n  margin-top: 14px;\n  color: #ff6132;\n  font-size: 14px;\n}\n.bjg-mini-products .bjg-cmp-product .iconText[data-v-5637898a] {\n  vertical-align: middle;\n  color: #6b6761;\n  font-size: 12px;\n  margin-top: 10px;\n  font-weight: bold;\n}\n.bjg-mini-products .bjg-cmp-product .iconText img[data-v-5637898a] {\n  width: 16px;\n  height: 16px;\n  margin-right: 6px;\n  margin-top: 0;\n}\n.bjg-mini-products .bjg-cmp-product .productTitle[data-v-5637898a] {\n  display: -webkit-box;\n  color: #6b6761;\n  font-size: 12px;\n  margin-top: 9px;\n  height: 40px;\n  line-height: 20px;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n  -webkit-line-clamp: 2;\n}\n", ""]);

// exports


/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', alisite = $data.alisite;
    $$out += '<div id="bjgext_mb_bg" class="';
    if (alisite) {
        $$out += ' alisite';
    }
    $$out += '">\n  <div id="bjgext_minibar">\n    <div class="bjgext-toptabs bjg-minibar-visible-component" style="display: flex; width: 462px">\n      <div class="bjgext-mini-logo">\n        <a title="比价狗">\n          <em class="bjgext-bg"></em>\n        </a>\n        \n      </div>\n      <div class="bjgext-mini-trend" style="text-align: center">\n        <em ></em>\n        <span>价格走势</span>\n      </div>\n      ';
    if (!alisite) {
        $$out += '\n      <div class="bjgext-mini-compare"></div>\n      ';
    } else {
        $$out += '\n      <div id="gwd_mini_compare">\n\n      </div>\n      ';
    }
    $$out += '\n      <div id="bjgouRemind"></div>\n    </div>\n    <div class="promo-box" style="position: relative; border-bottom: none; border-top: none">\n      <ul>\n      </ul>\n      <span class="promo-box-line" style="top: 0px"></span>\n    </div>\n  </div>\n  <div class="bjg-mini-placeholder" id="bjg-coupon-placeholder"></div>\n  <div class="bjg-mini-placeholder" id="bjg-dsj-placeholder"></div>\n</div>\n\n<style>\n  .alisite .bjgext-mini-trend em {\n    margin-left: 0px!important;\n  }\n\n  .bjgext-mini-compare {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n  }\n\n  .bjgext-toptabs > div {\n    border-top: none!important;\n  }\n\n  .bjgext-toptabs > div:last-of-type {\n    border-right: none;\n  }\n\n  .bjgext-toptabs:last-child > div:last-of-type {\n    border-bottom: none;\n  }\n\n  .bjgext-toptabs:last-child > div:first-of-type {\n    border-bottom: none;\n  }\n\n  .bjgext-toptabs > div:first-of-type {\n    border-left: none;\n  }\n\n  #bjgext_minibar {\n    border-radius: 5px;\n    border: 1px solid #e6e9eb;\n    /*overflow: hidden;*/\n    background: white;\n  }\n\n  #bjgext_minibar > div, #bjgext_minibar > a {\n    border-left: none;\n    border-right: none;\n  }\n\n  #bjgext_minibar > *:last-child {\n    border-bottom: none!important;\n  }\n\n  .promo-box li {\n      float: left;\n      width: 229px;\n      clear: none;\n      margin: 0px;\n      line-height: 31px;\n      list-style: none;\n  }\n\n  .promo-box li em {\n      float: left;\n      height: 16px;\n      width: 16px;\n      margin-top: 7px;\n      background-position: -123px -9px;\n      margin-left: 12px;\n      margin-right: 12px;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 309 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__ = __webpack_require__(310);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MiniFavor_vue_vue_type_script_lang_js__ = __webpack_require__(91);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MiniFavor_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MiniFavor_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MiniFavor_vue_vue_type_style_index_0_id_ae71a91e_lang_less_scoped_true__ = __webpack_require__(314);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MiniFavor_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__["staticRenderFns"],
  false,
  null,
  "ae71a91e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('ae71a91e')) {
      api.createRecord('ae71a91e', component.options)
    } else {
      api.reload('ae71a91e', component.options)
    }
    module.hot.accept("./MiniFavor.vue?vue&type=template&id=ae71a91e&scoped=true", function () {
      api.rerender('ae71a91e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/MiniFavor.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 310 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__ = __webpack_require__(311);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_template_id_ae71a91e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjgou-mini-favor" }, [_c("img", {
    style: _vm.productChecked ? "margin-top: -3px;" : "",
    attrs: { src: _vm.productChecked ? _vm.checked : _vm.clock, alt: "" }
  }), _vm._v(" "), _c("span", {
    staticClass: "bjg-down",
    style: _vm.productChecked ? "margin-left: 9px;" : "margin-left: 3px;"
  }, [_vm._v(_vm._s(_vm.productChecked ? "降价提醒" : "降价提醒"))]), _vm._v(" "), _vm.login ? _c("div", { staticClass: "bjgou-qr" }, [_c("span", {
    "class": "bjgou-set " + (_vm.productChecked ? "" : "bjgou-unset"),
    on: { click: _vm.favorClick }
  }, [_vm._v(_vm._s(_vm.productChecked ? "取消提醒" : "设置提醒"))]), _vm._v(" "), _c("img", {
    staticStyle: {
      width: "96px",
      height: "96px",
      "margin-top": "18px",
      "image-rendering": "crisp-edges"
    },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/bjgou-qr-wechat-small.png",
      alt: ""
    }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-top": "6px",
      color: "#ffae45",
      "font-size": "14px",
      "line-height": "22px",
      "font-weight": "bold"
    }
  }, [_vm._v("关注公众号")]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-top": "2px",
      color: "#6b6761",
      "font-size": "12px",
      "line-height": "17px"
    }
  }, [_vm._v("商品降价实时提醒")])]) : _vm._e(), _vm._v(" "), !_vm.login ? _c("div", { staticClass: "bjgou-login" }, [_c("button", {
    on: {
      click: function click($event) {
        return _vm.goLogin();
      }
    }
  }, [_vm._v("登录")]), _vm._v(" "), _c("span", [_vm._v("商品降价实时提醒")])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 312 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTdweCIgaGVpZ2h0PSIxNXB4IiB2aWV3Qm94PSIwIDAgMTcgMTUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT7liIbnu4Q8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0i5o+S5Lu25pS554mIIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i5Lit6Ze0LemZjeS7t+aPkOmGkiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTExNzkuMDAwMDAwLCAtMzYyLjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0i5pyA5pawLWNvcHktMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoODIwLjAwMDAwMCwgMzUxLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IuW3pui+uSI+CiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IuacgOaWsC1jb3B5LTMiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5bem6L65Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxnIGlkPSLmoI/nm64tY29weS0yIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i6ZmN5Lu35o+Q6YaSIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNTYuMDAwMDAwLCA4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i6ZmN5Lu35Li66YCJIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzLjAwMDAwMCwgMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxnIGlkPSLliIbnu4QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCAzLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik04LDE0IEM0LjY4NjI5MTUsMTQgMiwxMS4zMTM3MDg1IDIsOCBDMiw0LjY4NjI5MTUgNC42ODYyOTE1LDIgOCwyIEMxMS4zMTM3MDg1LDIgMTQsNC42ODYyOTE1IDE0LDggQzE0LDExLjMxMzcwODUgMTEuMzEzNzA4NSwxNCA4LDE0IFoiIGlkPSLmpK3lnIblvaIiIHN0cm9rZT0iI0ZGNjEzMiIgc3Ryb2tlLXdpZHRoPSIxLjciIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMCw4LjQgQzEwLjMzMTM3MDgsOC40IDEwLjYsOC42Njg2MjkxNSAxMC42LDkgQzEwLjYsOS4zMzEzNzA4NSAxMC4zMzEzNzA4LDkuNiAxMCw5LjYgTDcuOSw5LjYgQzcuNjIzODU3NjMsOS42IDcuNCw5LjM3NjE0MjM3IDcuNCw5LjEgTDcuNCw2LjEwNzIxMDA1IEM3LjQsNS43NzU4MzkyIDcuNjY4NjI5MTUsNS41MDcyMTAwNSA4LDUuNTA3MjEwMDUgQzguMzMxMzcwODUsNS41MDcyMTAwNSA4LjYsNS43NzU4MzkyIDguNiw2LjEwNzIxMDA1IEw4LjYsOC40IEwxMCw4LjQgWiIgaWQ9Iui3r+W+hC01IiBmaWxsPSIjRkY2MTMyIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5YiG57uELTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuMDM3NjAzLCAwLjkxNzAyNCkiIHN0cm9rZT0iI0ZGNjEzMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yLjI0OTc0OTI5LDAgTDAuNDYyMzk2ODc4LDEuNTgyOTc1OTEiIGlkPSLot6/lvoQtMiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTMuNDk5NDk4NiwwIEwxMi4wMzcxMDE3LDEuNTgyOTc1OTEiIGlkPSLot6/lvoQtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIuNzQ5NzQ5LCAxLjAwMDAwMCkgc2NhbGUoLTEsIDEpIHRyYW5zbGF0ZSgtMTIuNzQ5NzQ5LCAtMS4wMDAwMDApICI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 313 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTdweCIgaGVpZ2h0PSIxN3B4IiB2aWV3Qm94PSIwIDAgMTcgMTciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT7lvaLnirYgMjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxnIGlkPSLmj5Lku7bmlLnniYgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLkuK3pl7Qt5bey5re75Yqg6ZmN5Lu35o+Q6YaSIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTE3Ny4wMDAwMDAsIC0zNTkuMDAwMDAwKSIgZmlsbD0iI0ZGNjEzMiIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPGcgaWQ9IuacgOaWsC1jb3B5LTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDgyMC4wMDAwMDAsIDM1MS4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSLlt6bovrkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSLmnIDmlrAtY29weS0zIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IuW3pui+uSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5qCP55uuLWNvcHktMiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IumZjeS7t+aPkOmGkiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzUzLjAwMDAwMCwgOC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IumZjeS7t+S4uumAiSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5b2i54q2LTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQuMDAwMDAwLCAwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxnIGlkPSLlvaLnirYtMiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMy4wMDYwMjIyLDEwLjE4MDIyMzcgTDEzLjAwNjAyMjIsNS40NzU2NzgyIEMxMy4wMDYwMjIyLDQuNjg0OTA2ODUgMTMuNjQxMjkzOCw0LjA0Mzg2MDAyIDE0LjQyNDk0MTEsNC4wNDM4NjAwMiBDMTUuMjA4NTg4NCw0LjA0Mzg2MDAyIDE1Ljg0Mzg2LDQuNjg0OTA2ODUgMTUuODQzODYsNS40NzU2NzgyIEwxNS44NDM4NiwxMS40NDM4NiBDMTUuODQzODYsMTIuMzI3NTE1NiAxNS4xMjc1MTU2LDEzLjA0Mzg2IDE0LjI0Mzg2LDEzLjA0Mzg2IEwyLjI2Mjc3ODk0LDEzLjA0Mzg2IEMxLjQ3OTEzMTY2LDEzLjA0Mzg2IDAuODQzODYwMDE4LDEyLjQwMjgxMzIgMC44NDM4NjAwMTgsMTEuNjEyMDQxOCBDMC44NDM4NjAwMTgsMTAuODIxMjcwNSAxLjQ3OTEzMTY2LDEwLjE4MDIyMzcgMi4yNjI3Nzg5NCwxMC4xODAyMjM3IEwxMy4wMDYwMjIyLDEwLjE4MDIyMzcgWiIgaWQ9IuW9oueKtiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOC4zNDM4NjAsIDguMzQzODYwKSBzY2FsZSgtMSwgMSkgcm90YXRlKC0zMTUuMDAwMDAwKSB0cmFuc2xhdGUoLTguMzQzODYwLCAtOC4zNDM4NjApICI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 314 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_style_index_0_id_ae71a91e_lang_less_scoped_true__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_style_index_0_id_ae71a91e_lang_less_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniFavor_vue_vue_type_style_index_0_id_ae71a91e_lang_less_scoped_true__);
/* unused harmony reexport namespace */


/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(316);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("594a8dfd", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniFavor.vue?vue&type=style&index=0&id=ae71a91e&lang=less&scoped=true", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniFavor.vue?vue&type=style&index=0&id=ae71a91e&lang=less&scoped=true");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgou-set[data-v-ae71a91e] {\n  display: block;\n  color: #ffae45;\n  width: 90px;\n  height: 24px;\n  border-radius: 14px;\n  border: 1px solid #ffae45;\n  font-size: 12px;\n  margin-top: 24px;\n  text-align: center;\n  line-height: 24px;\n}\n.bjgou-unset[data-v-ae71a91e] {\n  color: white;\n  background: #ffae45;\n}\n.bjgou-mini-favor[data-v-ae71a91e] {\n  flex: 1;\n  position: relative;\n  min-width: 133px;\n  border: 1px solid #e6e9eb;\n  border-top-right-radius: 5px;\n  border-left: none;\n  align-items: center;\n  cursor: pointer;\n  justify-content: center;\n  display: flex;\n}\n.bjgou-mini-favor .bjg-down[data-v-ae71a91e] {\n  color: #6b6761;\n  font-size: 14px;\n}\n.bjgou-mini-favor .bjgou-qr[data-v-ae71a91e] {\n  position: absolute;\n  top: 36px;\n  right: -1px;\n  width: 182px;\n  height: 231px;\n  background: white!important;\n  /*box-shadow:0px 2px 4px 0px rgba(226,226,226,1);*/\n  border: 1px solid #e6e9eb;\n  flex-direction: column;\n  align-items: center;\n  display: none;\n  z-index: 99;\n}\n.bjgou-mini-favor .bjgou-login[data-v-ae71a91e] {\n  position: absolute;\n  top: 36px;\n  right: -1px;\n  width: 293px;\n  height: 88px;\n  background: white!important;\n  border: 1px solid #e6e9eb;\n  flex-direction: column;\n  align-items: center;\n  display: none;\n  z-index: 99;\n}\n.bjgou-mini-favor .bjgou-login button[data-v-ae71a91e] {\n  margin-top: 21px;\n  width: 228px;\n  height: 28px;\n  background: linear-gradient(270deg, #ffcd47 0%, #ff9f22 100%);\n  border-radius: 16px;\n  color: white;\n  font-size: 12px;\n  border: none!important;\n  outline: none;\n}\n.bjgou-mini-favor .bjgou-login span[data-v-ae71a91e] {\n  margin-top: 6px;\n  color: #8c847b;\n  font-size: 12px;\n}\n.bjgou-mini-favor[data-v-ae71a91e]:hover {\n  background: #fffbef;\n}\n.bjgou-mini-favor:hover .bjgou-login[data-v-ae71a91e] {\n  display: flex;\n}\n.bjgou-mini-favor:hover .bjgou-qr[data-v-ae71a91e] {\n  display: flex;\n}\n", ""]);

// exports


/***/ }),
/* 317 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PriceDogMiniBar_vue_vue_type_script_lang_js__ = __webpack_require__(93);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PriceDogMiniBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PriceDogMiniBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PriceDogMiniBar_vue_vue_type_style_index_0_id_72651e53_scoped_true_lang_less__ = __webpack_require__(327);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PriceDogMiniBar_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__["staticRenderFns"],
  false,
  null,
  "72651e53",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('72651e53')) {
      api.createRecord('72651e53', component.options)
    } else {
      api.reload('72651e53', component.options)
    }
    module.hot.accept("./PriceDogMiniBar.vue?vue&type=template&id=72651e53&scoped=true", function () {
      api.rerender('72651e53', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/PriceDogMiniBar.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 318 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__ = __webpack_require__(319);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_template_id_72651e53_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.showSizeHelp,
      expression: "showSizeHelp"
    }],
    staticClass: "pricedog-bar gwd-row",
    staticStyle: { "margin-top": "6px" }
  }, [_c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: false,
      expression: "false"
    }],
    staticClass: "pricedog-tab gwd-align gwd-row",
    staticStyle: { width: "102px" }
  }, [_vm.rate ? _c("span", { staticStyle: { color: "#ff6132", "line-height": "initial" } }, [_vm._v("税费预估 : ¥" + _vm._s((_vm.price * _vm.rate).toFixed(2)))]) : _vm._e(), _vm._v(" "), _c("div", { staticClass: "pricedog-tab-content" })]), _vm._v(" "), _vm.showSizeHelp ? _c("div", {
    staticClass: "pricedog-tab gwd-align gwd-row",
    staticStyle: { width: "97px" }
  }, [_c("img", {
    staticStyle: { width: "15px", height: "15px" },
    attrs: { src: __webpack_require__(320), alt: "" }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "6px", color: "#64615d" } }, [_vm._v(_vm._s(_vm.lang === "en" ? "Size Chart" : "尺码帮助"))]), _vm._v(" "), _c("div", {
    staticClass: "pricedog-tab-content",
    staticStyle: { width: "475px", height: "278px" }
  }, [_c("SizeHelp")], 1)]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 320 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 321 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__ = __webpack_require__(322);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SizeHelp_vue_vue_type_script_lang_js__ = __webpack_require__(95);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__SizeHelp_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__SizeHelp_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SizeHelp_vue_vue_type_style_index_0_id_b3b47bf0_scoped_true_lang_less__ = __webpack_require__(324);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__SizeHelp_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__["staticRenderFns"],
  false,
  null,
  "b3b47bf0",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('b3b47bf0')) {
      api.createRecord('b3b47bf0', component.options)
    } else {
      api.reload('b3b47bf0', component.options)
    }
    module.hot.accept("./SizeHelp.vue?vue&type=template&id=b3b47bf0&scoped=true", function () {
      api.rerender('b3b47bf0', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/SizeHelp.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 322 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__ = __webpack_require__(323);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_template_id_b3b47bf0_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-row pricedog-size-list",
    staticStyle: { width: "100%" }
  }, [_c("ul", {
    staticClass: "gwd-column",
    style: "width: " + (_vm.lang === "en" ? "110" : "82") + "px;"
  }, _vm._l(_vm.list, function (item) {
    return _c("li", {
      key: item.name,
      "class": item.url === _vm.src ? "active" : "",
      on: {
        click: function click($event) {
          _vm.src = item.url;
        }
      }
    }, [_vm._v(_vm._s(item.name))]);
  }), 0), _vm._v(" "), _c("div", { staticClass: "gwd-row", staticStyle: { flex: "1" } }, [_c("iframe", {
    staticStyle: {
      "margin-top": "12px",
      "margin-right": "10px",
      "margin-bottom": "16px",
      border: "1px solid #e6e9eb",
      flex: "1"
    },
    attrs: { src: _vm.src }
  })])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 324 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_style_index_0_id_b3b47bf0_scoped_true_lang_less__ = __webpack_require__(325);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_style_index_0_id_b3b47bf0_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SizeHelp_vue_vue_type_style_index_0_id_b3b47bf0_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(326);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("3252caba", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SizeHelp.vue?vue&type=style&index=0&id=b3b47bf0&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SizeHelp.vue?vue&type=style&index=0&id=b3b47bf0&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".pricedog-size-list ul li[data-v-b3b47bf0] {\n  font-size: 12px;\n  color: #64615d;\n  margin-top: 13px;\n  display: inline-block;\n  cursor: pointer;\n  height: 16px;\n  line-height: 16px;\n}\n.pricedog-size-list ul .active[data-v-b3b47bf0] {\n  color: #ff6132;\n}\niframe[data-v-b3b47bf0] {\n  overflow-x: hidden;\n}\n", ""]);

// exports


/***/ }),
/* 327 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_style_index_0_id_72651e53_scoped_true_lang_less__ = __webpack_require__(328);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_style_index_0_id_72651e53_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceDogMiniBar_vue_vue_type_style_index_0_id_72651e53_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(329);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1cab2682", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceDogMiniBar.vue?vue&type=style&index=0&id=72651e53&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceDogMiniBar.vue?vue&type=style&index=0&id=72651e53&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".pricedog-bar[data-v-72651e53] {\n  width: 100px;\n  height: 37px;\n  font-size: 0;\n  background: white;\n  border-radius: 4px;\n  border: 1px solid #E6E9EB;\n  position: relative;\n  box-sizing: border-box;\n}\n.pricedog-bar .pricedog-tab-content[data-v-72651e53] {\n  display: none;\n  position: absolute;\n  left: -1px;\n  top: 35px;\n  text-align: center;\n  z-index: 9;\n  background: #FFFFFF;\n  border-radius: 0px 0px 4px 4px;\n  border: 1px solid #E6E9EB;\n  box-sizing: border-box;\n}\n.pricedog-bar .pricedog-tab[data-v-72651e53]:hover {\n  background: #fffbef;\n}\n.pricedog-bar .pricedog-tab:hover .pricedog-tab-content[data-v-72651e53] {\n  display: flex;\n}\n.pricedog-bar .pricedog-tab[data-v-72651e53] {\n  justify-content: center;\n}\n.pricedog-bar .pricedog-tab span[data-v-72651e53] {\n  font-size: 12px;\n}\n", ""]);

// exports


/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data;
    $$out += '<div id="coupon_box" class="coupon-box">\n  <span class="coupon-icon bjgext-bg"></span>\n  <a href="';
    $$out += $escape(data.click_url2);
    $$out += '" target="_blank" class="coupon-tle">\n    <span>当前商品领券立减';
    $$out += $escape(data.coupon.coupon_money);
    $$out += '元</span>   \n    <strong>券后';
    $$out += $escape(data.coupon.lastPrice);
    $$out += '元</strong>\n    <em class="coupon_gif"></em>\n  </a>\n  <a href="';
    $$out += $escape(data.click_url2);
    $$out += '" target="_blank" class="click2get bjgext-bg">\n    <span class="c2g-sp1">\uFFE5';
    $$out += $escape(data.coupon.coupon_money);
    $$out += '</span>\n    <span class="c2g-sp2">领取</span>\n  </a>\n  <style type="text/css">\n    #coupon_box.coupon-box {\n      width: 460px;\n      height: 34px;\n      overflow: hidden;\n      background-color: #fff;\n      border: 1px solid #e8e8e8;\n      border-top: none;\n      position: static;\n      margin: 0px;\n      padding: 0px;\n    }\n    .coupon-box * {\n      font-family: \'Microsoft YaHei\',Arial,SimSun;\n    }\n    .coupon-icon {\n      float: left;\n      width: 20px;\n      height: 20px;\n      background-position: -3px -30px;\n      margin: 9px 8px 9px 12px;\n    }\n    #coupon_box .coupon-tle {\n      color: #FF6132;\n      font-size: 12px;\n      margin-right: 11px;\n      float: left;\n      height: 34px;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n      width: 301px;\n      line-height: 34px;\n      text-decoration: none!important;\n    }\n    #coupon_box .coupon-tle span {\n      margin-right: 5px;\n      font-weight: bold;\n    }\n    .coupon_gif {\n      background: url(\'http://cdn.gwdang.com/images/extensions/newbar/coupon_yellow.gif\') 0px 0px no-repeat;\n      float: right;\n      height: 16px;\n      width: 56px;\n      margin-top: 10px;\n    }\n    .click2get {\n      background-position: -26px -30px;\n      float: left;\n      height: 30px;\n      width: 96px;\n      margin-top: 5px;\n    }\n    .click2get span {\n      height: 24px;\n      float: left;\n      margin-left: 1px;\n    }\n    .c2g-sp1 {\n      width: 50px;\n      color: #FF6132;\n      text-align: center;\n      font-size: 14px;\n      line-height: 24px!important;\n    }\n    .c2g-sp2 {\n      width: 44px;\n      line-height: 24px!important;\n      color: #fff!important;\n      text-align: center;\n    }\n    div#gwd_wishlist_div.gwd_wishlist_div {\n      border-bottom-right-radius: 0px;\n      border-bottom-left-radius: 0px;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {


const canPromise = __webpack_require__(332)

const QRCode = __webpack_require__(333)
const CanvasRenderer = __webpack_require__(350)
const SvgRenderer = __webpack_require__(351)

function renderCanvas (renderFunc, canvas, text, opts, cb) {
  const args = [].slice.call(arguments, 1)
  const argsNum = args.length
  const isLastArgCb = typeof args[argsNum - 1] === 'function'

  if (!isLastArgCb && !canPromise()) {
    throw new Error('Callback required as last argument')
  }

  if (isLastArgCb) {
    if (argsNum < 2) {
      throw new Error('Too few arguments provided')
    }

    if (argsNum === 2) {
      cb = text
      text = canvas
      canvas = opts = undefined
    } else if (argsNum === 3) {
      if (canvas.getContext && typeof cb === 'undefined') {
        cb = opts
        opts = undefined
      } else {
        cb = opts
        opts = text
        text = canvas
        canvas = undefined
      }
    }
  } else {
    if (argsNum < 1) {
      throw new Error('Too few arguments provided')
    }

    if (argsNum === 1) {
      text = canvas
      canvas = opts = undefined
    } else if (argsNum === 2 && !canvas.getContext) {
      opts = text
      text = canvas
      canvas = undefined
    }

    return new Promise(function (resolve, reject) {
      try {
        const data = QRCode.create(text, opts)
        resolve(renderFunc(data, canvas, opts))
      } catch (e) {
        reject(e)
      }
    })
  }

  try {
    const data = QRCode.create(text, opts)
    cb(null, renderFunc(data, canvas, opts))
  } catch (e) {
    cb(e)
  }
}

exports.create = QRCode.create
exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)
exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)

// only svg for now.
exports.toString = renderCanvas.bind(null, function (data, _, opts) {
  return SvgRenderer.render(data, opts)
})


/***/ }),
/* 332 */
/***/ (function(module, exports) {

// can-promise has a crash in some versions of react native that dont have
// standard global objects
// https://github.com/soldair/node-qrcode/issues/157

module.exports = function () {
  return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
}


/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {

const Utils = __webpack_require__(29)
const ECLevel = __webpack_require__(62)
const BitBuffer = __webpack_require__(334)
const BitMatrix = __webpack_require__(335)
const AlignmentPattern = __webpack_require__(336)
const FinderPattern = __webpack_require__(337)
const MaskPattern = __webpack_require__(338)
const ECCode = __webpack_require__(98)
const ReedSolomonEncoder = __webpack_require__(339)
const Version = __webpack_require__(342)
const FormatInfo = __webpack_require__(343)
const Mode = __webpack_require__(30)
const Segments = __webpack_require__(344)

/**
 * QRCode for JavaScript
 *
 * modified by Ryan Day for nodejs support
 * Copyright (c) 2011 Ryan Day
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
//---------------------------------------------------------------------
// QRCode for JavaScript
//
// Copyright (c) 2009 Kazuhiko Arase
//
// URL: http://www.d-project.com/
//
// Licensed under the MIT license:
//   http://www.opensource.org/licenses/mit-license.php
//
// The word "QR Code" is registered trademark of
// DENSO WAVE INCORPORATED
//   http://www.denso-wave.com/qrcode/faqpatent-e.html
//
//---------------------------------------------------------------------
*/

/**
 * Add finder patterns bits to matrix
 *
 * @param  {BitMatrix} matrix  Modules matrix
 * @param  {Number}    version QR Code version
 */
function setupFinderPattern (matrix, version) {
  const size = matrix.size
  const pos = FinderPattern.getPositions(version)

  for (let i = 0; i < pos.length; i++) {
    const row = pos[i][0]
    const col = pos[i][1]

    for (let r = -1; r <= 7; r++) {
      if (row + r <= -1 || size <= row + r) continue

      for (let c = -1; c <= 7; c++) {
        if (col + c <= -1 || size <= col + c) continue

        if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
          (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
          (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
          matrix.set(row + r, col + c, true, true)
        } else {
          matrix.set(row + r, col + c, false, true)
        }
      }
    }
  }
}

/**
 * Add timing pattern bits to matrix
 *
 * Note: this function must be called before {@link setupAlignmentPattern}
 *
 * @param  {BitMatrix} matrix Modules matrix
 */
function setupTimingPattern (matrix) {
  const size = matrix.size

  for (let r = 8; r < size - 8; r++) {
    const value = r % 2 === 0
    matrix.set(r, 6, value, true)
    matrix.set(6, r, value, true)
  }
}

/**
 * Add alignment patterns bits to matrix
 *
 * Note: this function must be called after {@link setupTimingPattern}
 *
 * @param  {BitMatrix} matrix  Modules matrix
 * @param  {Number}    version QR Code version
 */
function setupAlignmentPattern (matrix, version) {
  const pos = AlignmentPattern.getPositions(version)

  for (let i = 0; i < pos.length; i++) {
    const row = pos[i][0]
    const col = pos[i][1]

    for (let r = -2; r <= 2; r++) {
      for (let c = -2; c <= 2; c++) {
        if (r === -2 || r === 2 || c === -2 || c === 2 ||
          (r === 0 && c === 0)) {
          matrix.set(row + r, col + c, true, true)
        } else {
          matrix.set(row + r, col + c, false, true)
        }
      }
    }
  }
}

/**
 * Add version info bits to matrix
 *
 * @param  {BitMatrix} matrix  Modules matrix
 * @param  {Number}    version QR Code version
 */
function setupVersionInfo (matrix, version) {
  const size = matrix.size
  const bits = Version.getEncodedBits(version)
  let row, col, mod

  for (let i = 0; i < 18; i++) {
    row = Math.floor(i / 3)
    col = i % 3 + size - 8 - 3
    mod = ((bits >> i) & 1) === 1

    matrix.set(row, col, mod, true)
    matrix.set(col, row, mod, true)
  }
}

/**
 * Add format info bits to matrix
 *
 * @param  {BitMatrix} matrix               Modules matrix
 * @param  {ErrorCorrectionLevel}    errorCorrectionLevel Error correction level
 * @param  {Number}    maskPattern          Mask pattern reference value
 */
function setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {
  const size = matrix.size
  const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)
  let i, mod

  for (i = 0; i < 15; i++) {
    mod = ((bits >> i) & 1) === 1

    // vertical
    if (i < 6) {
      matrix.set(i, 8, mod, true)
    } else if (i < 8) {
      matrix.set(i + 1, 8, mod, true)
    } else {
      matrix.set(size - 15 + i, 8, mod, true)
    }

    // horizontal
    if (i < 8) {
      matrix.set(8, size - i - 1, mod, true)
    } else if (i < 9) {
      matrix.set(8, 15 - i - 1 + 1, mod, true)
    } else {
      matrix.set(8, 15 - i - 1, mod, true)
    }
  }

  // fixed module
  matrix.set(size - 8, 8, 1, true)
}

/**
 * Add encoded data bits to matrix
 *
 * @param  {BitMatrix}  matrix Modules matrix
 * @param  {Uint8Array} data   Data codewords
 */
function setupData (matrix, data) {
  const size = matrix.size
  let inc = -1
  let row = size - 1
  let bitIndex = 7
  let byteIndex = 0

  for (let col = size - 1; col > 0; col -= 2) {
    if (col === 6) col--

    while (true) {
      for (let c = 0; c < 2; c++) {
        if (!matrix.isReserved(row, col - c)) {
          let dark = false

          if (byteIndex < data.length) {
            dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)
          }

          matrix.set(row, col - c, dark)
          bitIndex--

          if (bitIndex === -1) {
            byteIndex++
            bitIndex = 7
          }
        }
      }

      row += inc

      if (row < 0 || size <= row) {
        row -= inc
        inc = -inc
        break
      }
    }
  }
}

/**
 * Create encoded codewords from data input
 *
 * @param  {Number}   version              QR Code version
 * @param  {ErrorCorrectionLevel}   errorCorrectionLevel Error correction level
 * @param  {ByteData} data                 Data input
 * @return {Uint8Array}                    Buffer containing encoded codewords
 */
function createData (version, errorCorrectionLevel, segments) {
  // Prepare data buffer
  const buffer = new BitBuffer()

  segments.forEach(function (data) {
    // prefix data with mode indicator (4 bits)
    buffer.put(data.mode.bit, 4)

    // Prefix data with character count indicator.
    // The character count indicator is a string of bits that represents the
    // number of characters that are being encoded.
    // The character count indicator must be placed after the mode indicator
    // and must be a certain number of bits long, depending on the QR version
    // and data mode
    // @see {@link Mode.getCharCountIndicator}.
    buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))

    // add binary data sequence to buffer
    data.write(buffer)
  })

  // Calculate required number of bits
  const totalCodewords = Utils.getSymbolTotalCodewords(version)
  const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)
  const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8

  // Add a terminator.
  // If the bit string is shorter than the total number of required bits,
  // a terminator of up to four 0s must be added to the right side of the string.
  // If the bit string is more than four bits shorter than the required number of bits,
  // add four 0s to the end.
  if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {
    buffer.put(0, 4)
  }

  // If the bit string is fewer than four bits shorter, add only the number of 0s that
  // are needed to reach the required number of bits.

  // After adding the terminator, if the number of bits in the string is not a multiple of 8,
  // pad the string on the right with 0s to make the string's length a multiple of 8.
  while (buffer.getLengthInBits() % 8 !== 0) {
    buffer.putBit(0)
  }

  // Add pad bytes if the string is still shorter than the total number of required bits.
  // Extend the buffer to fill the data capacity of the symbol corresponding to
  // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)
  // and 00010001 (0x11) alternately.
  const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8
  for (let i = 0; i < remainingByte; i++) {
    buffer.put(i % 2 ? 0x11 : 0xEC, 8)
  }

  return createCodewords(buffer, version, errorCorrectionLevel)
}

/**
 * Encode input data with Reed-Solomon and return codewords with
 * relative error correction bits
 *
 * @param  {BitBuffer} bitBuffer            Data to encode
 * @param  {Number}    version              QR Code version
 * @param  {ErrorCorrectionLevel} errorCorrectionLevel Error correction level
 * @return {Uint8Array}                     Buffer containing encoded codewords
 */
function createCodewords (bitBuffer, version, errorCorrectionLevel) {
  // Total codewords for this QR code version (Data + Error correction)
  const totalCodewords = Utils.getSymbolTotalCodewords(version)

  // Total number of error correction codewords
  const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)

  // Total number of data codewords
  const dataTotalCodewords = totalCodewords - ecTotalCodewords

  // Total number of blocks
  const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)

  // Calculate how many blocks each group should contain
  const blocksInGroup2 = totalCodewords % ecTotalBlocks
  const blocksInGroup1 = ecTotalBlocks - blocksInGroup2

  const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)

  const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)
  const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1

  // Number of EC codewords is the same for both groups
  const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1

  // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount
  const rs = new ReedSolomonEncoder(ecCount)

  let offset = 0
  const dcData = new Array(ecTotalBlocks)
  const ecData = new Array(ecTotalBlocks)
  let maxDataSize = 0
  const buffer = new Uint8Array(bitBuffer.buffer)

  // Divide the buffer into the required number of blocks
  for (let b = 0; b < ecTotalBlocks; b++) {
    const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2

    // extract a block of data from buffer
    dcData[b] = buffer.slice(offset, offset + dataSize)

    // Calculate EC codewords for this data block
    ecData[b] = rs.encode(dcData[b])

    offset += dataSize
    maxDataSize = Math.max(maxDataSize, dataSize)
  }

  // Create final data
  // Interleave the data and error correction codewords from each block
  const data = new Uint8Array(totalCodewords)
  let index = 0
  let i, r

  // Add data codewords
  for (i = 0; i < maxDataSize; i++) {
    for (r = 0; r < ecTotalBlocks; r++) {
      if (i < dcData[r].length) {
        data[index++] = dcData[r][i]
      }
    }
  }

  // Apped EC codewords
  for (i = 0; i < ecCount; i++) {
    for (r = 0; r < ecTotalBlocks; r++) {
      data[index++] = ecData[r][i]
    }
  }

  return data
}

/**
 * Build QR Code symbol
 *
 * @param  {String} data                 Input string
 * @param  {Number} version              QR Code version
 * @param  {ErrorCorretionLevel} errorCorrectionLevel Error level
 * @param  {MaskPattern} maskPattern     Mask pattern
 * @return {Object}                      Object containing symbol data
 */
function createSymbol (data, version, errorCorrectionLevel, maskPattern) {
  let segments

  if (Array.isArray(data)) {
    segments = Segments.fromArray(data)
  } else if (typeof data === 'string') {
    let estimatedVersion = version

    if (!estimatedVersion) {
      const rawSegments = Segments.rawSplit(data)

      // Estimate best version that can contain raw splitted segments
      estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)
    }

    // Build optimized segments
    // If estimated version is undefined, try with the highest version
    segments = Segments.fromString(data, estimatedVersion || 40)
  } else {
    throw new Error('Invalid data')
  }

  // Get the min version that can contain data
  const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)

  // If no version is found, data cannot be stored
  if (!bestVersion) {
    throw new Error('The amount of data is too big to be stored in a QR Code')
  }

  // If not specified, use min version as default
  if (!version) {
    version = bestVersion

  // Check if the specified version can contain the data
  } else if (version < bestVersion) {
    throw new Error('\n' +
      'The chosen QR Code version cannot contain this amount of data.\n' +
      'Minimum version required to store current data is: ' + bestVersion + '.\n'
    )
  }

  const dataBits = createData(version, errorCorrectionLevel, segments)

  // Allocate matrix buffer
  const moduleCount = Utils.getSymbolSize(version)
  const modules = new BitMatrix(moduleCount)

  // Add function modules
  setupFinderPattern(modules, version)
  setupTimingPattern(modules)
  setupAlignmentPattern(modules, version)

  // Add temporary dummy bits for format info just to set them as reserved.
  // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}
  // since the masking operation must be performed only on the encoding region.
  // These blocks will be replaced with correct values later in code.
  setupFormatInfo(modules, errorCorrectionLevel, 0)

  if (version >= 7) {
    setupVersionInfo(modules, version)
  }

  // Add data codewords
  setupData(modules, dataBits)

  if (isNaN(maskPattern)) {
    // Find best mask pattern
    maskPattern = MaskPattern.getBestMask(modules,
      setupFormatInfo.bind(null, modules, errorCorrectionLevel))
  }

  // Apply mask pattern
  MaskPattern.applyMask(maskPattern, modules)

  // Replace format info bits with correct values
  setupFormatInfo(modules, errorCorrectionLevel, maskPattern)

  return {
    modules: modules,
    version: version,
    errorCorrectionLevel: errorCorrectionLevel,
    maskPattern: maskPattern,
    segments: segments
  }
}

/**
 * QR Code
 *
 * @param {String | Array} data                 Input data
 * @param {Object} options                      Optional configurations
 * @param {Number} options.version              QR Code version
 * @param {String} options.errorCorrectionLevel Error correction level
 * @param {Function} options.toSJISFunc         Helper func to convert utf8 to sjis
 */
exports.create = function create (data, options) {
  if (typeof data === 'undefined' || data === '') {
    throw new Error('No input text')
  }

  let errorCorrectionLevel = ECLevel.M
  let version
  let mask

  if (typeof options !== 'undefined') {
    // Use higher error correction level as default
    errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)
    version = Version.from(options.version)
    mask = MaskPattern.from(options.maskPattern)

    if (options.toSJISFunc) {
      Utils.setToSJISFunction(options.toSJISFunc)
    }
  }

  return createSymbol(data, version, errorCorrectionLevel, mask)
}


/***/ }),
/* 334 */
/***/ (function(module, exports) {

function BitBuffer () {
  this.buffer = []
  this.length = 0
}

BitBuffer.prototype = {

  get: function (index) {
    const bufIndex = Math.floor(index / 8)
    return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1
  },

  put: function (num, length) {
    for (let i = 0; i < length; i++) {
      this.putBit(((num >>> (length - i - 1)) & 1) === 1)
    }
  },

  getLengthInBits: function () {
    return this.length
  },

  putBit: function (bit) {
    const bufIndex = Math.floor(this.length / 8)
    if (this.buffer.length <= bufIndex) {
      this.buffer.push(0)
    }

    if (bit) {
      this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))
    }

    this.length++
  }
}

module.exports = BitBuffer


/***/ }),
/* 335 */
/***/ (function(module, exports) {

/**
 * Helper class to handle QR Code symbol modules
 *
 * @param {Number} size Symbol size
 */
function BitMatrix (size) {
  if (!size || size < 1) {
    throw new Error('BitMatrix size must be defined and greater than 0')
  }

  this.size = size
  this.data = new Uint8Array(size * size)
  this.reservedBit = new Uint8Array(size * size)
}

/**
 * Set bit value at specified location
 * If reserved flag is set, this bit will be ignored during masking process
 *
 * @param {Number}  row
 * @param {Number}  col
 * @param {Boolean} value
 * @param {Boolean} reserved
 */
BitMatrix.prototype.set = function (row, col, value, reserved) {
  const index = row * this.size + col
  this.data[index] = value
  if (reserved) this.reservedBit[index] = true
}

/**
 * Returns bit value at specified location
 *
 * @param  {Number}  row
 * @param  {Number}  col
 * @return {Boolean}
 */
BitMatrix.prototype.get = function (row, col) {
  return this.data[row * this.size + col]
}

/**
 * Applies xor operator at specified location
 * (used during masking process)
 *
 * @param {Number}  row
 * @param {Number}  col
 * @param {Boolean} value
 */
BitMatrix.prototype.xor = function (row, col, value) {
  this.data[row * this.size + col] ^= value
}

/**
 * Check if bit at specified location is reserved
 *
 * @param {Number}   row
 * @param {Number}   col
 * @return {Boolean}
 */
BitMatrix.prototype.isReserved = function (row, col) {
  return this.reservedBit[row * this.size + col]
}

module.exports = BitMatrix


/***/ }),
/* 336 */
/***/ (function(module, exports, __webpack_require__) {

/**
 * Alignment pattern are fixed reference pattern in defined positions
 * in a matrix symbology, which enables the decode software to re-synchronise
 * the coordinate mapping of the image modules in the event of moderate amounts
 * of distortion of the image.
 *
 * Alignment patterns are present only in QR Code symbols of version 2 or larger
 * and their number depends on the symbol version.
 */

const getSymbolSize = __webpack_require__(29).getSymbolSize

/**
 * Calculate the row/column coordinates of the center module of each alignment pattern
 * for the specified QR Code version.
 *
 * The alignment patterns are positioned symmetrically on either side of the diagonal
 * running from the top left corner of the symbol to the bottom right corner.
 *
 * Since positions are simmetrical only half of the coordinates are returned.
 * Each item of the array will represent in turn the x and y coordinate.
 * @see {@link getPositions}
 *
 * @param  {Number} version QR Code version
 * @return {Array}          Array of coordinate
 */
exports.getRowColCoords = function getRowColCoords (version) {
  if (version === 1) return []

  const posCount = Math.floor(version / 7) + 2
  const size = getSymbolSize(version)
  const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2
  const positions = [size - 7] // Last coord is always (size - 7)

  for (let i = 1; i < posCount - 1; i++) {
    positions[i] = positions[i - 1] - intervals
  }

  positions.push(6) // First coord is always 6

  return positions.reverse()
}

/**
 * Returns an array containing the positions of each alignment pattern.
 * Each array's element represent the center point of the pattern as (x, y) coordinates
 *
 * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}
 * and filtering out the items that overlaps with finder pattern
 *
 * @example
 * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.
 * The alignment patterns, therefore, are to be centered on (row, column)
 * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).
 * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns
 * and are not therefore used for alignment patterns.
 *
 * let pos = getPositions(7)
 * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]
 *
 * @param  {Number} version QR Code version
 * @return {Array}          Array of coordinates
 */
exports.getPositions = function getPositions (version) {
  const coords = []
  const pos = exports.getRowColCoords(version)
  const posLength = pos.length

  for (let i = 0; i < posLength; i++) {
    for (let j = 0; j < posLength; j++) {
      // Skip if position is occupied by finder patterns
      if ((i === 0 && j === 0) || // top-left
          (i === 0 && j === posLength - 1) || // bottom-left
          (i === posLength - 1 && j === 0)) { // top-right
        continue
      }

      coords.push([pos[i], pos[j]])
    }
  }

  return coords
}


/***/ }),
/* 337 */
/***/ (function(module, exports, __webpack_require__) {

const getSymbolSize = __webpack_require__(29).getSymbolSize
const FINDER_PATTERN_SIZE = 7

/**
 * Returns an array containing the positions of each finder pattern.
 * Each array's element represent the top-left point of the pattern as (x, y) coordinates
 *
 * @param  {Number} version QR Code version
 * @return {Array}          Array of coordinates
 */
exports.getPositions = function getPositions (version) {
  const size = getSymbolSize(version)

  return [
    // top-left
    [0, 0],
    // top-right
    [size - FINDER_PATTERN_SIZE, 0],
    // bottom-left
    [0, size - FINDER_PATTERN_SIZE]
  ]
}


/***/ }),
/* 338 */
/***/ (function(module, exports) {

/**
 * Data mask pattern reference
 * @type {Object}
 */
exports.Patterns = {
  PATTERN000: 0,
  PATTERN001: 1,
  PATTERN010: 2,
  PATTERN011: 3,
  PATTERN100: 4,
  PATTERN101: 5,
  PATTERN110: 6,
  PATTERN111: 7
}

/**
 * Weighted penalty scores for the undesirable features
 * @type {Object}
 */
const PenaltyScores = {
  N1: 3,
  N2: 3,
  N3: 40,
  N4: 10
}

/**
 * Check if mask pattern value is valid
 *
 * @param  {Number}  mask    Mask pattern
 * @return {Boolean}         true if valid, false otherwise
 */
exports.isValid = function isValid (mask) {
  return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7
}

/**
 * Returns mask pattern from a value.
 * If value is not valid, returns undefined
 *
 * @param  {Number|String} value        Mask pattern value
 * @return {Number}                     Valid mask pattern or undefined
 */
exports.from = function from (value) {
  return exports.isValid(value) ? parseInt(value, 10) : undefined
}

/**
* Find adjacent modules in row/column with the same color
* and assign a penalty value.
*
* Points: N1 + i
* i is the amount by which the number of adjacent modules of the same color exceeds 5
*/
exports.getPenaltyN1 = function getPenaltyN1 (data) {
  const size = data.size
  let points = 0
  let sameCountCol = 0
  let sameCountRow = 0
  let lastCol = null
  let lastRow = null

  for (let row = 0; row < size; row++) {
    sameCountCol = sameCountRow = 0
    lastCol = lastRow = null

    for (let col = 0; col < size; col++) {
      let module = data.get(row, col)
      if (module === lastCol) {
        sameCountCol++
      } else {
        if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)
        lastCol = module
        sameCountCol = 1
      }

      module = data.get(col, row)
      if (module === lastRow) {
        sameCountRow++
      } else {
        if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)
        lastRow = module
        sameCountRow = 1
      }
    }

    if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)
    if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)
  }

  return points
}

/**
 * Find 2x2 blocks with the same color and assign a penalty value
 *
 * Points: N2 * (m - 1) * (n - 1)
 */
exports.getPenaltyN2 = function getPenaltyN2 (data) {
  const size = data.size
  let points = 0

  for (let row = 0; row < size - 1; row++) {
    for (let col = 0; col < size - 1; col++) {
      const last = data.get(row, col) +
        data.get(row, col + 1) +
        data.get(row + 1, col) +
        data.get(row + 1, col + 1)

      if (last === 4 || last === 0) points++
    }
  }

  return points * PenaltyScores.N2
}

/**
 * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,
 * preceded or followed by light area 4 modules wide
 *
 * Points: N3 * number of pattern found
 */
exports.getPenaltyN3 = function getPenaltyN3 (data) {
  const size = data.size
  let points = 0
  let bitsCol = 0
  let bitsRow = 0

  for (let row = 0; row < size; row++) {
    bitsCol = bitsRow = 0
    for (let col = 0; col < size; col++) {
      bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)
      if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++

      bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)
      if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++
    }
  }

  return points * PenaltyScores.N3
}

/**
 * Calculate proportion of dark modules in entire symbol
 *
 * Points: N4 * k
 *
 * k is the rating of the deviation of the proportion of dark modules
 * in the symbol from 50% in steps of 5%
 */
exports.getPenaltyN4 = function getPenaltyN4 (data) {
  let darkCount = 0
  const modulesCount = data.data.length

  for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]

  const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)

  return k * PenaltyScores.N4
}

/**
 * Return mask value at given position
 *
 * @param  {Number} maskPattern Pattern reference value
 * @param  {Number} i           Row
 * @param  {Number} j           Column
 * @return {Boolean}            Mask value
 */
function getMaskAt (maskPattern, i, j) {
  switch (maskPattern) {
    case exports.Patterns.PATTERN000: return (i + j) % 2 === 0
    case exports.Patterns.PATTERN001: return i % 2 === 0
    case exports.Patterns.PATTERN010: return j % 3 === 0
    case exports.Patterns.PATTERN011: return (i + j) % 3 === 0
    case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0
    case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0
    case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0
    case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0

    default: throw new Error('bad maskPattern:' + maskPattern)
  }
}

/**
 * Apply a mask pattern to a BitMatrix
 *
 * @param  {Number}    pattern Pattern reference number
 * @param  {BitMatrix} data    BitMatrix data
 */
exports.applyMask = function applyMask (pattern, data) {
  const size = data.size

  for (let col = 0; col < size; col++) {
    for (let row = 0; row < size; row++) {
      if (data.isReserved(row, col)) continue
      data.xor(row, col, getMaskAt(pattern, row, col))
    }
  }
}

/**
 * Returns the best mask pattern for data
 *
 * @param  {BitMatrix} data
 * @return {Number} Mask pattern reference number
 */
exports.getBestMask = function getBestMask (data, setupFormatFunc) {
  const numPatterns = Object.keys(exports.Patterns).length
  let bestPattern = 0
  let lowerPenalty = Infinity

  for (let p = 0; p < numPatterns; p++) {
    setupFormatFunc(p)
    exports.applyMask(p, data)

    // Calculate penalty
    const penalty =
      exports.getPenaltyN1(data) +
      exports.getPenaltyN2(data) +
      exports.getPenaltyN3(data) +
      exports.getPenaltyN4(data)

    // Undo previously applied mask
    exports.applyMask(p, data)

    if (penalty < lowerPenalty) {
      lowerPenalty = penalty
      bestPattern = p
    }
  }

  return bestPattern
}


/***/ }),
/* 339 */
/***/ (function(module, exports, __webpack_require__) {

const Polynomial = __webpack_require__(340)

function ReedSolomonEncoder (degree) {
  this.genPoly = undefined
  this.degree = degree

  if (this.degree) this.initialize(this.degree)
}

/**
 * Initialize the encoder.
 * The input param should correspond to the number of error correction codewords.
 *
 * @param  {Number} degree
 */
ReedSolomonEncoder.prototype.initialize = function initialize (degree) {
  // create an irreducible generator polynomial
  this.degree = degree
  this.genPoly = Polynomial.generateECPolynomial(this.degree)
}

/**
 * Encodes a chunk of data
 *
 * @param  {Uint8Array} data Buffer containing input data
 * @return {Uint8Array}      Buffer containing encoded data
 */
ReedSolomonEncoder.prototype.encode = function encode (data) {
  if (!this.genPoly) {
    throw new Error('Encoder not initialized')
  }

  // Calculate EC for this data block
  // extends data size to data+genPoly size
  const paddedData = new Uint8Array(data.length + this.degree)
  paddedData.set(data)

  // The error correction codewords are the remainder after dividing the data codewords
  // by a generator polynomial
  const remainder = Polynomial.mod(paddedData, this.genPoly)

  // return EC data blocks (last n byte, where n is the degree of genPoly)
  // If coefficients number in remainder are less than genPoly degree,
  // pad with 0s to the left to reach the needed number of coefficients
  const start = this.degree - remainder.length
  if (start > 0) {
    const buff = new Uint8Array(this.degree)
    buff.set(remainder, start)

    return buff
  }

  return remainder
}

module.exports = ReedSolomonEncoder


/***/ }),
/* 340 */
/***/ (function(module, exports, __webpack_require__) {

const GF = __webpack_require__(341)

/**
 * Multiplies two polynomials inside Galois Field
 *
 * @param  {Uint8Array} p1 Polynomial
 * @param  {Uint8Array} p2 Polynomial
 * @return {Uint8Array}    Product of p1 and p2
 */
exports.mul = function mul (p1, p2) {
  const coeff = new Uint8Array(p1.length + p2.length - 1)

  for (let i = 0; i < p1.length; i++) {
    for (let j = 0; j < p2.length; j++) {
      coeff[i + j] ^= GF.mul(p1[i], p2[j])
    }
  }

  return coeff
}

/**
 * Calculate the remainder of polynomials division
 *
 * @param  {Uint8Array} divident Polynomial
 * @param  {Uint8Array} divisor  Polynomial
 * @return {Uint8Array}          Remainder
 */
exports.mod = function mod (divident, divisor) {
  let result = new Uint8Array(divident)

  while ((result.length - divisor.length) >= 0) {
    const coeff = result[0]

    for (let i = 0; i < divisor.length; i++) {
      result[i] ^= GF.mul(divisor[i], coeff)
    }

    // remove all zeros from buffer head
    let offset = 0
    while (offset < result.length && result[offset] === 0) offset++
    result = result.slice(offset)
  }

  return result
}

/**
 * Generate an irreducible generator polynomial of specified degree
 * (used by Reed-Solomon encoder)
 *
 * @param  {Number} degree Degree of the generator polynomial
 * @return {Uint8Array}    Buffer containing polynomial coefficients
 */
exports.generateECPolynomial = function generateECPolynomial (degree) {
  let poly = new Uint8Array([1])
  for (let i = 0; i < degree; i++) {
    poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))
  }

  return poly
}


/***/ }),
/* 341 */
/***/ (function(module, exports) {

const EXP_TABLE = new Uint8Array(512)
const LOG_TABLE = new Uint8Array(256)
/**
 * Precompute the log and anti-log tables for faster computation later
 *
 * For each possible value in the galois field 2^8, we will pre-compute
 * the logarithm and anti-logarithm (exponential) of this value
 *
 * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}
 */
;(function initTables () {
  let x = 1
  for (let i = 0; i < 255; i++) {
    EXP_TABLE[i] = x
    LOG_TABLE[x] = i

    x <<= 1 // multiply by 2

    // The QR code specification says to use byte-wise modulo 100011101 arithmetic.
    // This means that when a number is 256 or larger, it should be XORed with 0x11D.
    if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)
      x ^= 0x11D
    }
  }

  // Optimization: double the size of the anti-log table so that we don't need to mod 255 to
  // stay inside the bounds (because we will mainly use this table for the multiplication of
  // two GF numbers, no more).
  // @see {@link mul}
  for (let i = 255; i < 512; i++) {
    EXP_TABLE[i] = EXP_TABLE[i - 255]
  }
}())

/**
 * Returns log value of n inside Galois Field
 *
 * @param  {Number} n
 * @return {Number}
 */
exports.log = function log (n) {
  if (n < 1) throw new Error('log(' + n + ')')
  return LOG_TABLE[n]
}

/**
 * Returns anti-log value of n inside Galois Field
 *
 * @param  {Number} n
 * @return {Number}
 */
exports.exp = function exp (n) {
  return EXP_TABLE[n]
}

/**
 * Multiplies two number inside Galois Field
 *
 * @param  {Number} x
 * @param  {Number} y
 * @return {Number}
 */
exports.mul = function mul (x, y) {
  if (x === 0 || y === 0) return 0

  // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized
  // @see {@link initTables}
  return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]
}


/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {

const Utils = __webpack_require__(29)
const ECCode = __webpack_require__(98)
const ECLevel = __webpack_require__(62)
const Mode = __webpack_require__(30)
const VersionCheck = __webpack_require__(99)

// Generator polynomial used to encode version information
const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)
const G18_BCH = Utils.getBCHDigit(G18)

function getBestVersionForDataLength (mode, length, errorCorrectionLevel) {
  for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
    if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {
      return currentVersion
    }
  }

  return undefined
}

function getReservedBitsCount (mode, version) {
  // Character count indicator + mode indicator bits
  return Mode.getCharCountIndicator(mode, version) + 4
}

function getTotalBitsFromDataArray (segments, version) {
  let totalBits = 0

  segments.forEach(function (data) {
    const reservedBits = getReservedBitsCount(data.mode, version)
    totalBits += reservedBits + data.getBitsLength()
  })

  return totalBits
}

function getBestVersionForMixedData (segments, errorCorrectionLevel) {
  for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {
    const length = getTotalBitsFromDataArray(segments, currentVersion)
    if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {
      return currentVersion
    }
  }

  return undefined
}

/**
 * Returns version number from a value.
 * If value is not a valid version, returns defaultValue
 *
 * @param  {Number|String} value        QR Code version
 * @param  {Number}        defaultValue Fallback value
 * @return {Number}                     QR Code version number
 */
exports.from = function from (value, defaultValue) {
  if (VersionCheck.isValid(value)) {
    return parseInt(value, 10)
  }

  return defaultValue
}

/**
 * Returns how much data can be stored with the specified QR code version
 * and error correction level
 *
 * @param  {Number} version              QR Code version (1-40)
 * @param  {Number} errorCorrectionLevel Error correction level
 * @param  {Mode}   mode                 Data mode
 * @return {Number}                      Quantity of storable data
 */
exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {
  if (!VersionCheck.isValid(version)) {
    throw new Error('Invalid QR Code version')
  }

  // Use Byte mode as default
  if (typeof mode === 'undefined') mode = Mode.BYTE

  // Total codewords for this QR code version (Data + Error correction)
  const totalCodewords = Utils.getSymbolTotalCodewords(version)

  // Total number of error correction codewords
  const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)

  // Total number of data codewords
  const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8

  if (mode === Mode.MIXED) return dataTotalCodewordsBits

  const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)

  // Return max number of storable codewords
  switch (mode) {
    case Mode.NUMERIC:
      return Math.floor((usableBits / 10) * 3)

    case Mode.ALPHANUMERIC:
      return Math.floor((usableBits / 11) * 2)

    case Mode.KANJI:
      return Math.floor(usableBits / 13)

    case Mode.BYTE:
    default:
      return Math.floor(usableBits / 8)
  }
}

/**
 * Returns the minimum version needed to contain the amount of data
 *
 * @param  {Segment} data                    Segment of data
 * @param  {Number} [errorCorrectionLevel=H] Error correction level
 * @param  {Mode} mode                       Data mode
 * @return {Number}                          QR Code version
 */
exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {
  let seg

  const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)

  if (Array.isArray(data)) {
    if (data.length > 1) {
      return getBestVersionForMixedData(data, ecl)
    }

    if (data.length === 0) {
      return 1
    }

    seg = data[0]
  } else {
    seg = data
  }

  return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)
}

/**
 * Returns version information with relative error correction bits
 *
 * The version information is included in QR Code symbols of version 7 or larger.
 * It consists of an 18-bit sequence containing 6 data bits,
 * with 12 error correction bits calculated using the (18, 6) Golay code.
 *
 * @param  {Number} version QR Code version
 * @return {Number}         Encoded version info bits
 */
exports.getEncodedBits = function getEncodedBits (version) {
  if (!VersionCheck.isValid(version) || version < 7) {
    throw new Error('Invalid QR Code version')
  }

  let d = version << 12

  while (Utils.getBCHDigit(d) - G18_BCH >= 0) {
    d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))
  }

  return (version << 12) | d
}


/***/ }),
/* 343 */
/***/ (function(module, exports, __webpack_require__) {

const Utils = __webpack_require__(29)

const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)
const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)
const G15_BCH = Utils.getBCHDigit(G15)

/**
 * Returns format information with relative error correction bits
 *
 * The format information is a 15-bit sequence containing 5 data bits,
 * with 10 error correction bits calculated using the (15, 5) BCH code.
 *
 * @param  {Number} errorCorrectionLevel Error correction level
 * @param  {Number} mask                 Mask pattern
 * @return {Number}                      Encoded format information bits
 */
exports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {
  const data = ((errorCorrectionLevel.bit << 3) | mask)
  let d = data << 10

  while (Utils.getBCHDigit(d) - G15_BCH >= 0) {
    d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))
  }

  // xor final data with mask pattern in order to ensure that
  // no combination of Error Correction Level and data mask pattern
  // will result in an all-zero data string
  return ((data << 10) | d) ^ G15_MASK
}


/***/ }),
/* 344 */
/***/ (function(module, exports, __webpack_require__) {

const Mode = __webpack_require__(30)
const NumericData = __webpack_require__(345)
const AlphanumericData = __webpack_require__(346)
const ByteData = __webpack_require__(347)
const KanjiData = __webpack_require__(348)
const Regex = __webpack_require__(100)
const Utils = __webpack_require__(29)
const dijkstra = __webpack_require__(349)

/**
 * Returns UTF8 byte length
 *
 * @param  {String} str Input string
 * @return {Number}     Number of byte
 */
function getStringByteLength (str) {
  return unescape(encodeURIComponent(str)).length
}

/**
 * Get a list of segments of the specified mode
 * from a string
 *
 * @param  {Mode}   mode Segment mode
 * @param  {String} str  String to process
 * @return {Array}       Array of object with segments data
 */
function getSegments (regex, mode, str) {
  const segments = []
  let result

  while ((result = regex.exec(str)) !== null) {
    segments.push({
      data: result[0],
      index: result.index,
      mode: mode,
      length: result[0].length
    })
  }

  return segments
}

/**
 * Extracts a series of segments with the appropriate
 * modes from a string
 *
 * @param  {String} dataStr Input string
 * @return {Array}          Array of object with segments data
 */
function getSegmentsFromString (dataStr) {
  const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)
  const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)
  let byteSegs
  let kanjiSegs

  if (Utils.isKanjiModeEnabled()) {
    byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)
    kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)
  } else {
    byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)
    kanjiSegs = []
  }

  const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)

  return segs
    .sort(function (s1, s2) {
      return s1.index - s2.index
    })
    .map(function (obj) {
      return {
        data: obj.data,
        mode: obj.mode,
        length: obj.length
      }
    })
}

/**
 * Returns how many bits are needed to encode a string of
 * specified length with the specified mode
 *
 * @param  {Number} length String length
 * @param  {Mode} mode     Segment mode
 * @return {Number}        Bit length
 */
function getSegmentBitsLength (length, mode) {
  switch (mode) {
    case Mode.NUMERIC:
      return NumericData.getBitsLength(length)
    case Mode.ALPHANUMERIC:
      return AlphanumericData.getBitsLength(length)
    case Mode.KANJI:
      return KanjiData.getBitsLength(length)
    case Mode.BYTE:
      return ByteData.getBitsLength(length)
  }
}

/**
 * Merges adjacent segments which have the same mode
 *
 * @param  {Array} segs Array of object with segments data
 * @return {Array}      Array of object with segments data
 */
function mergeSegments (segs) {
  return segs.reduce(function (acc, curr) {
    const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null
    if (prevSeg && prevSeg.mode === curr.mode) {
      acc[acc.length - 1].data += curr.data
      return acc
    }

    acc.push(curr)
    return acc
  }, [])
}

/**
 * Generates a list of all possible nodes combination which
 * will be used to build a segments graph.
 *
 * Nodes are divided by groups. Each group will contain a list of all the modes
 * in which is possible to encode the given text.
 *
 * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.
 * The group for '12345' will contain then 3 objects, one for each
 * possible encoding mode.
 *
 * Each node represents a possible segment.
 *
 * @param  {Array} segs Array of object with segments data
 * @return {Array}      Array of object with segments data
 */
function buildNodes (segs) {
  const nodes = []
  for (let i = 0; i < segs.length; i++) {
    const seg = segs[i]

    switch (seg.mode) {
      case Mode.NUMERIC:
        nodes.push([seg,
          { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },
          { data: seg.data, mode: Mode.BYTE, length: seg.length }
        ])
        break
      case Mode.ALPHANUMERIC:
        nodes.push([seg,
          { data: seg.data, mode: Mode.BYTE, length: seg.length }
        ])
        break
      case Mode.KANJI:
        nodes.push([seg,
          { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
        ])
        break
      case Mode.BYTE:
        nodes.push([
          { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }
        ])
    }
  }

  return nodes
}

/**
 * Builds a graph from a list of nodes.
 * All segments in each node group will be connected with all the segments of
 * the next group and so on.
 *
 * At each connection will be assigned a weight depending on the
 * segment's byte length.
 *
 * @param  {Array} nodes    Array of object with segments data
 * @param  {Number} version QR Code version
 * @return {Object}         Graph of all possible segments
 */
function buildGraph (nodes, version) {
  const table = {}
  const graph = { start: {} }
  let prevNodeIds = ['start']

  for (let i = 0; i < nodes.length; i++) {
    const nodeGroup = nodes[i]
    const currentNodeIds = []

    for (let j = 0; j < nodeGroup.length; j++) {
      const node = nodeGroup[j]
      const key = '' + i + j

      currentNodeIds.push(key)
      table[key] = { node: node, lastCount: 0 }
      graph[key] = {}

      for (let n = 0; n < prevNodeIds.length; n++) {
        const prevNodeId = prevNodeIds[n]

        if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {
          graph[prevNodeId][key] =
            getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -
            getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)

          table[prevNodeId].lastCount += node.length
        } else {
          if (table[prevNodeId]) table[prevNodeId].lastCount = node.length

          graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +
            4 + Mode.getCharCountIndicator(node.mode, version) // switch cost
        }
      }
    }

    prevNodeIds = currentNodeIds
  }

  for (let n = 0; n < prevNodeIds.length; n++) {
    graph[prevNodeIds[n]].end = 0
  }

  return { map: graph, table: table }
}

/**
 * Builds a segment from a specified data and mode.
 * If a mode is not specified, the more suitable will be used.
 *
 * @param  {String} data             Input data
 * @param  {Mode | String} modesHint Data mode
 * @return {Segment}                 Segment
 */
function buildSingleSegment (data, modesHint) {
  let mode
  const bestMode = Mode.getBestModeForData(data)

  mode = Mode.from(modesHint, bestMode)

  // Make sure data can be encoded
  if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {
    throw new Error('"' + data + '"' +
      ' cannot be encoded with mode ' + Mode.toString(mode) +
      '.\n Suggested mode is: ' + Mode.toString(bestMode))
  }

  // Use Mode.BYTE if Kanji support is disabled
  if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {
    mode = Mode.BYTE
  }

  switch (mode) {
    case Mode.NUMERIC:
      return new NumericData(data)

    case Mode.ALPHANUMERIC:
      return new AlphanumericData(data)

    case Mode.KANJI:
      return new KanjiData(data)

    case Mode.BYTE:
      return new ByteData(data)
  }
}

/**
 * Builds a list of segments from an array.
 * Array can contain Strings or Objects with segment's info.
 *
 * For each item which is a string, will be generated a segment with the given
 * string and the more appropriate encoding mode.
 *
 * For each item which is an object, will be generated a segment with the given
 * data and mode.
 * Objects must contain at least the property "data".
 * If property "mode" is not present, the more suitable mode will be used.
 *
 * @param  {Array} array Array of objects with segments data
 * @return {Array}       Array of Segments
 */
exports.fromArray = function fromArray (array) {
  return array.reduce(function (acc, seg) {
    if (typeof seg === 'string') {
      acc.push(buildSingleSegment(seg, null))
    } else if (seg.data) {
      acc.push(buildSingleSegment(seg.data, seg.mode))
    }

    return acc
  }, [])
}

/**
 * Builds an optimized sequence of segments from a string,
 * which will produce the shortest possible bitstream.
 *
 * @param  {String} data    Input string
 * @param  {Number} version QR Code version
 * @return {Array}          Array of segments
 */
exports.fromString = function fromString (data, version) {
  const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())

  const nodes = buildNodes(segs)
  const graph = buildGraph(nodes, version)
  const path = dijkstra.find_path(graph.map, 'start', 'end')

  const optimizedSegs = []
  for (let i = 1; i < path.length - 1; i++) {
    optimizedSegs.push(graph.table[path[i]].node)
  }

  return exports.fromArray(mergeSegments(optimizedSegs))
}

/**
 * Splits a string in various segments with the modes which
 * best represent their content.
 * The produced segments are far from being optimized.
 * The output of this function is only used to estimate a QR Code version
 * which may contain the data.
 *
 * @param  {string} data Input string
 * @return {Array}       Array of segments
 */
exports.rawSplit = function rawSplit (data) {
  return exports.fromArray(
    getSegmentsFromString(data, Utils.isKanjiModeEnabled())
  )
}


/***/ }),
/* 345 */
/***/ (function(module, exports, __webpack_require__) {

const Mode = __webpack_require__(30)

function NumericData (data) {
  this.mode = Mode.NUMERIC
  this.data = data.toString()
}

NumericData.getBitsLength = function getBitsLength (length) {
  return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)
}

NumericData.prototype.getLength = function getLength () {
  return this.data.length
}

NumericData.prototype.getBitsLength = function getBitsLength () {
  return NumericData.getBitsLength(this.data.length)
}

NumericData.prototype.write = function write (bitBuffer) {
  let i, group, value

  // The input data string is divided into groups of three digits,
  // and each group is converted to its 10-bit binary equivalent.
  for (i = 0; i + 3 <= this.data.length; i += 3) {
    group = this.data.substr(i, 3)
    value = parseInt(group, 10)

    bitBuffer.put(value, 10)
  }

  // If the number of input digits is not an exact multiple of three,
  // the final one or two digits are converted to 4 or 7 bits respectively.
  const remainingNum = this.data.length - i
  if (remainingNum > 0) {
    group = this.data.substr(i)
    value = parseInt(group, 10)

    bitBuffer.put(value, remainingNum * 3 + 1)
  }
}

module.exports = NumericData


/***/ }),
/* 346 */
/***/ (function(module, exports, __webpack_require__) {

const Mode = __webpack_require__(30)

/**
 * Array of characters available in alphanumeric mode
 *
 * As per QR Code specification, to each character
 * is assigned a value from 0 to 44 which in this case coincides
 * with the array index
 *
 * @type {Array}
 */
const ALPHA_NUM_CHARS = [
  '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  ' ', '$', '%', '*', '+', '-', '.', '/', ':'
]

function AlphanumericData (data) {
  this.mode = Mode.ALPHANUMERIC
  this.data = data
}

AlphanumericData.getBitsLength = function getBitsLength (length) {
  return 11 * Math.floor(length / 2) + 6 * (length % 2)
}

AlphanumericData.prototype.getLength = function getLength () {
  return this.data.length
}

AlphanumericData.prototype.getBitsLength = function getBitsLength () {
  return AlphanumericData.getBitsLength(this.data.length)
}

AlphanumericData.prototype.write = function write (bitBuffer) {
  let i

  // Input data characters are divided into groups of two characters
  // and encoded as 11-bit binary codes.
  for (i = 0; i + 2 <= this.data.length; i += 2) {
    // The character value of the first character is multiplied by 45
    let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45

    // The character value of the second digit is added to the product
    value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])

    // The sum is then stored as 11-bit binary number
    bitBuffer.put(value, 11)
  }

  // If the number of input data characters is not a multiple of two,
  // the character value of the final character is encoded as a 6-bit binary number.
  if (this.data.length % 2) {
    bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)
  }
}

module.exports = AlphanumericData


/***/ }),
/* 347 */
/***/ (function(module, exports, __webpack_require__) {

const Mode = __webpack_require__(30)

function ByteData (data) {
  this.mode = Mode.BYTE
  if (typeof (data) === 'string') {
    this.data = new TextEncoder().encode(data)
  } else {
    this.data = new Uint8Array(data)
  }
}

ByteData.getBitsLength = function getBitsLength (length) {
  return length * 8
}

ByteData.prototype.getLength = function getLength () {
  return this.data.length
}

ByteData.prototype.getBitsLength = function getBitsLength () {
  return ByteData.getBitsLength(this.data.length)
}

ByteData.prototype.write = function (bitBuffer) {
  for (let i = 0, l = this.data.length; i < l; i++) {
    bitBuffer.put(this.data[i], 8)
  }
}

module.exports = ByteData


/***/ }),
/* 348 */
/***/ (function(module, exports, __webpack_require__) {

const Mode = __webpack_require__(30)
const Utils = __webpack_require__(29)

function KanjiData (data) {
  this.mode = Mode.KANJI
  this.data = data
}

KanjiData.getBitsLength = function getBitsLength (length) {
  return length * 13
}

KanjiData.prototype.getLength = function getLength () {
  return this.data.length
}

KanjiData.prototype.getBitsLength = function getBitsLength () {
  return KanjiData.getBitsLength(this.data.length)
}

KanjiData.prototype.write = function (bitBuffer) {
  let i

  // In the Shift JIS system, Kanji characters are represented by a two byte combination.
  // These byte values are shifted from the JIS X 0208 values.
  // JIS X 0208 gives details of the shift coded representation.
  for (i = 0; i < this.data.length; i++) {
    let value = Utils.toSJIS(this.data[i])

    // For characters with Shift JIS values from 0x8140 to 0x9FFC:
    if (value >= 0x8140 && value <= 0x9FFC) {
      // Subtract 0x8140 from Shift JIS value
      value -= 0x8140

    // For characters with Shift JIS values from 0xE040 to 0xEBBF
    } else if (value >= 0xE040 && value <= 0xEBBF) {
      // Subtract 0xC140 from Shift JIS value
      value -= 0xC140
    } else {
      throw new Error(
        'Invalid SJIS character: ' + this.data[i] + '\n' +
        'Make sure your charset is UTF-8')
    }

    // Multiply most significant byte of result by 0xC0
    // and add least significant byte to product
    value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)

    // Convert result to a 13-bit binary string
    bitBuffer.put(value, 13)
  }
}

module.exports = KanjiData


/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/******************************************************************************
 * Created 2008-08-19.
 *
 * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
 *
 * Copyright (C) 2008
 *   Wyatt Baldwin <self@wyattbaldwin.com>
 *   All rights reserved
 *
 * Licensed under the MIT license.
 *
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *****************************************************************************/
var dijkstra = {
  single_source_shortest_paths: function(graph, s, d) {
    // Predecessor map for each node that has been encountered.
    // node ID => predecessor node ID
    var predecessors = {};

    // Costs of shortest paths from s to all nodes encountered.
    // node ID => cost
    var costs = {};
    costs[s] = 0;

    // Costs of shortest paths from s to all nodes encountered; differs from
    // `costs` in that it provides easy access to the node that currently has
    // the known shortest path from s.
    // XXX: Do we actually need both `costs` and `open`?
    var open = dijkstra.PriorityQueue.make();
    open.push(s, 0);

    var closest,
        u, v,
        cost_of_s_to_u,
        adjacent_nodes,
        cost_of_e,
        cost_of_s_to_u_plus_cost_of_e,
        cost_of_s_to_v,
        first_visit;
    while (!open.empty()) {
      // In the nodes remaining in graph that have a known cost from s,
      // find the node, u, that currently has the shortest path from s.
      closest = open.pop();
      u = closest.value;
      cost_of_s_to_u = closest.cost;

      // Get nodes adjacent to u...
      adjacent_nodes = graph[u] || {};

      // ...and explore the edges that connect u to those nodes, updating
      // the cost of the shortest paths to any or all of those nodes as
      // necessary. v is the node across the current edge from u.
      for (v in adjacent_nodes) {
        if (adjacent_nodes.hasOwnProperty(v)) {
          // Get the cost of the edge running from u to v.
          cost_of_e = adjacent_nodes[v];

          // Cost of s to u plus the cost of u to v across e--this is *a*
          // cost from s to v that may or may not be less than the current
          // known cost to v.
          cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;

          // If we haven't visited v yet OR if the current known cost from s to
          // v is greater than the new cost we just found (cost of s to u plus
          // cost of u to v across e), update v's cost in the cost list and
          // update v's predecessor in the predecessor list (it's now u).
          cost_of_s_to_v = costs[v];
          first_visit = (typeof costs[v] === 'undefined');
          if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {
            costs[v] = cost_of_s_to_u_plus_cost_of_e;
            open.push(v, cost_of_s_to_u_plus_cost_of_e);
            predecessors[v] = u;
          }
        }
      }
    }

    if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {
      var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');
      throw new Error(msg);
    }

    return predecessors;
  },

  extract_shortest_path_from_predecessor_list: function(predecessors, d) {
    var nodes = [];
    var u = d;
    var predecessor;
    while (u) {
      nodes.push(u);
      predecessor = predecessors[u];
      u = predecessors[u];
    }
    nodes.reverse();
    return nodes;
  },

  find_path: function(graph, s, d) {
    var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);
    return dijkstra.extract_shortest_path_from_predecessor_list(
      predecessors, d);
  },

  /**
   * A very naive priority queue implementation.
   */
  PriorityQueue: {
    make: function (opts) {
      var T = dijkstra.PriorityQueue,
          t = {},
          key;
      opts = opts || {};
      for (key in T) {
        if (T.hasOwnProperty(key)) {
          t[key] = T[key];
        }
      }
      t.queue = [];
      t.sorter = opts.sorter || T.default_sorter;
      return t;
    },

    default_sorter: function (a, b) {
      return a.cost - b.cost;
    },

    /**
     * Add a new item to the queue and ensure the highest priority element
     * is at the front of the queue.
     */
    push: function (value, cost) {
      var item = {value: value, cost: cost};
      this.queue.push(item);
      this.queue.sort(this.sorter);
    },

    /**
     * Return the highest priority element in the queue.
     */
    pop: function () {
      return this.queue.shift();
    },

    empty: function () {
      return this.queue.length === 0;
    }
  }
};


// node.js module exports
if (true) {
  module.exports = dijkstra;
}


/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {

const Utils = __webpack_require__(101)

function clearCanvas (ctx, canvas, size) {
  ctx.clearRect(0, 0, canvas.width, canvas.height)

  if (!canvas.style) canvas.style = {}
  canvas.height = size
  canvas.width = size
  canvas.style.height = size + 'px'
  canvas.style.width = size + 'px'
}

function getCanvasElement () {
  try {
    return document.createElement('canvas')
  } catch (e) {
    throw new Error('You need to specify a canvas element')
  }
}

exports.render = function render (qrData, canvas, options) {
  let opts = options
  let canvasEl = canvas

  if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
    opts = canvas
    canvas = undefined
  }

  if (!canvas) {
    canvasEl = getCanvasElement()
  }

  opts = Utils.getOptions(opts)
  const size = Utils.getImageWidth(qrData.modules.size, opts)

  const ctx = canvasEl.getContext('2d')
  const image = ctx.createImageData(size, size)
  Utils.qrToImageData(image.data, qrData, opts)

  clearCanvas(ctx, canvasEl, size)
  ctx.putImageData(image, 0, 0)

  return canvasEl
}

exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {
  let opts = options

  if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {
    opts = canvas
    canvas = undefined
  }

  if (!opts) opts = {}

  const canvasEl = exports.render(qrData, canvas, opts)

  const type = opts.type || 'image/png'
  const rendererOpts = opts.rendererOpts || {}

  return canvasEl.toDataURL(type, rendererOpts.quality)
}


/***/ }),
/* 351 */
/***/ (function(module, exports, __webpack_require__) {

const Utils = __webpack_require__(101)

function getColorAttrib (color, attrib) {
  const alpha = color.a / 255
  const str = attrib + '="' + color.hex + '"'

  return alpha < 1
    ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"'
    : str
}

function svgCmd (cmd, x, y) {
  let str = cmd + x
  if (typeof y !== 'undefined') str += ' ' + y

  return str
}

function qrToPath (data, size, margin) {
  let path = ''
  let moveBy = 0
  let newRow = false
  let lineLength = 0

  for (let i = 0; i < data.length; i++) {
    const col = Math.floor(i % size)
    const row = Math.floor(i / size)

    if (!col && !newRow) newRow = true

    if (data[i]) {
      lineLength++

      if (!(i > 0 && col > 0 && data[i - 1])) {
        path += newRow
          ? svgCmd('M', col + margin, 0.5 + row + margin)
          : svgCmd('m', moveBy, 0)

        moveBy = 0
        newRow = false
      }

      if (!(col + 1 < size && data[i + 1])) {
        path += svgCmd('h', lineLength)
        lineLength = 0
      }
    } else {
      moveBy++
    }
  }

  return path
}

exports.render = function render (qrData, options, cb) {
  const opts = Utils.getOptions(options)
  const size = qrData.modules.size
  const data = qrData.modules.data
  const qrcodesize = size + opts.margin * 2

  const bg = !opts.color.light.a
    ? ''
    : '<path ' + getColorAttrib(opts.color.light, 'fill') +
      ' d="M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z"/>'

  const path =
    '<path ' + getColorAttrib(opts.color.dark, 'stroke') +
    ' d="' + qrToPath(data, size, opts.margin) + '"/>'

  const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"'

  const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" '

  const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path + '</svg>\n'

  if (typeof cb === 'function') {
    cb(null, svgTag)
  }

  return svgTag
}


/***/ }),
/* 352 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '';
    $$out += '<div class="gwd-qr-warn" style="background: white; width: 118px!important; height: 118px!important;">\n  <img ';
    $$out += 'src="https://cdn.gwdang.com/images/extensions/warn@2x.png"';
    $$out += ' alt="" style="margin-right: 0!important; width: 34px!important; height: 34px!important; margin-top: 21px!important; margin-left: 0!important">\n  <span class="warn-text">当前网络异常</span>\n  <span class="warn-text">点此<span class="gwd-qr-reload">刷新</span></span>\n</div>\n<style>\n  .gwd-qr-warn {\n    position: absolute;\n    top: 8px;\n    left: 50%;\n    margin-left: -59px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    white-space: nowrap;\n  }\n\n  .gwd-qr-warn img {\n    margin: 0;\n  }\n\n  .gwd-qr-warn span.warn-text {\n    color: #999999!important;\n    font-size: 12px!important;\n    transform: scale(0.8333);\n    transform-origin: top center;\n    line-height: 19px;\n    white-space: nowrap;\n    width: 100%;\n    text-align: center;\n    display: inline-block;\n    vertical-align: middle;\n    font-weight: normal!important;\n  }\n\n  .gwd-qr-warn span.warn-text .gwd-qr-reload {\n    color: #fe4866!important;\n    font-size: 12px!important;\n    cursor: pointer;\n    text-decoration: underline;\n    float: none!important;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 353 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, extClass = $data.extClass, img = $data.img, qr = $data.qr;
    $$out += '<div style="display: inline-flex; position: relative; vertical-align: middle; margin-left: 5px; width: auto" class="gwd-bottom-tmall ';
    $$out += $escape(extClass);
    $$out += '">\n  <img src="';
    $$out += $escape(img);
    $$out += '" alt="" style="height: 44px">\n  <div class="gwd-qr-act-bottom" style="margin-left: -74px;">\n    <img class="gwd-act-qr-img" loading="lazy" src="';
    $$out += $escape(qr);
    $$out += '" alt="" style="width: 130px; height: 130px; margin-top: 7px">\n    <span style="margin-top: 5px; vertical-align: middle; font-size: 0; height: 14px; line-height: 14px;">\n      <span style="font-size: 14px; color: #ff1a78; font-weight: bold">微信扫码</span>\n      <span style="margin-left: 3px; color: #070707; font-size: 12px; transform-origin: center center; transform: scale(0.9166)">领红包</span>\n    </span>\n  </div>\n</div>\n<style>\n  .gwd-bottom-tmall {\n    height: 100%;\n    align-items: center;\n  }\n\n  .gwd-qr-act-bottom {\n    display: none;\n    flex-direction: column;\n    position: absolute;\n    width: 144px;\n    height: 167px;\n    box-sizing: border-box;\n    border: 1px solid #ff471a;\n    background: #fff9f6;\n    bottom: 62px;\n    left: 50%;\n    align-items: center;\n    margin-left: -72px;\n  }\n\n  .gwd-qr-act-bottom span {\n    width: initial;\n    margin: 0;\n  }\n\n  .gwd-bottom-tmall:hover .gwd-qr-act-bottom {\n    display: flex;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 354 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, text = $data.text, qr = $data.qr;
    $$out += '<div target="_blank" class="gwd-middle-act-bar">\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/tmall-redpack-middle.png"';
    $$out += ' style="width: 17px; height: 19px; margin-left: 11px">\n  <span style="font-size: 12px; color: #ff471a; margin-left: 7px; font-weight: bold">';
    $$out += $escape(text);
    $$out += '</span>\n  <div style="flex: 1"></div>\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/arrow.svg"';
    $$out += ' style="width: 26px; height: 10px;">\n  <span class="gwd-take" style="line-height: initial">\n    立即领取\n    <div class="gwd-qr-act-mid" style="margin-left: -84px;">\n      <img class="gwd-act-qr-img" loading="lazy" src="';
    $$out += $escape(qr);
    $$out += '" alt="" style="width: 130px; height: 130px; margin-top: 7px">\n      <span style="margin-top: 5px; vertical-align: middle; font-size: 0; height: 14px; line-height: 14px;">\n        <span style="font-size: 14px; color: #ff471a; font-weight: bold">微信扫码</span>\n        <span style="margin-left: 3px; color: #070707; font-size: 12px; transform-origin: center center; transform: scale(0.9166)">领红包</span>\n      </span>\n    </div>\n  </span>\n</div>\n<style>\n  .gwd-middle-act-bar {\n    width: 462px;\n    height: 34px;\n    box-sizing: border-box;\n    display: flex;\n    align-items: center;\n    border: 1px solid #e6e9eb;\n    background: white;\n    font-size: 0;\n  }\n\n  .gwd-take {\n    display: inline-block;\n    margin-left: 10px;\n    margin-right: 15px;\n    text-align: center;\n    width:70px;\n    height:18px;\n    background:linear-gradient(90deg,rgba(255,42,26,1) 0%,rgba(255,98,31,1) 100%);\n    border-radius:9px;\n    font-size: 12px;\n    color: white;\n    position: relative;\n    cursor: pointer;\n  }\n\n  .gwd-qr-act-mid {\n    display: none;\n    flex-direction: column;\n    position: absolute;\n    width: 144px;\n    height: 167px;\n    box-sizing: border-box;\n    border: 1px solid #ff471a;\n    background: #fff9f6;\n    top: 25px;\n    z-index: 99;\n    /*left: 50%;*/\n    right: -16px;\n    align-items: center;\n    margin-left: -72px;\n  }\n\n  .gwd-qr-act-mid span {\n    width: initial;\n    margin: 0;\n  }\n\n  .gwd-take:hover .gwd-qr-act-mid {\n    display: flex;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 355 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, link = $data.link, extClass = $data.extClass, img = $data.img;
    $$out += '<a href="';
    $$out += $escape(link);
    $$out += '"\n   target="_blank"\n   title="点击领取"\n   style="display: inline-flex; position: relative; vertical-align: middle; margin-left: 5px; width: auto" class="gwd-bottom-tmall ';
    $$out += $escape(extClass);
    $$out += '">\n  <img src="';
    $$out += $escape(img);
    $$out += '" alt="" style="height: 44px">\n</a>\n<style>\n  .gwd-bottom-tmall {\n    height: 100%;\n    align-items: center;\n  }\n\n  .gwd-qr-act-bottom {\n    display: none;\n    flex-direction: column;\n    position: absolute;\n    width: 144px;\n    height: 167px;\n    box-sizing: border-box;\n    border: 1px solid #ff471a;\n    background: #fff9f6;\n    bottom: 62px;\n    left: 50%;\n    align-items: center;\n    margin-left: -72px;\n  }\n\n  .gwd-qr-act-bottom span {\n    width: initial;\n    margin: 0;\n  }\n\n  .gwd-bottom-tmall:hover .gwd-qr-act-bottom {\n    display: flex;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 356 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, link = $data.link, text = $data.text;
    $$out += '<a target="_blank" class="gwd-middle-act-bar" href="';
    $$out += $escape(link);
    $$out += '">\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/tmall-redpack-middle.png"';
    $$out += ' style="width: 17px; height: 19px; margin-left: 11px">\n  <span style="font-size: 12px; color: #ff471a; margin-left: 7px; font-weight: bold">';
    $$out += $escape(text);
    $$out += '</span>\n  <div style="flex: 1"></div>\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/arrow.svg"';
    $$out += ' style="width: 26px; height: 10px;">\n  <span class="gwd-take" style="line-height: initial">\n    立即领取\n  </span>\n</a>\n<style>\n  .gwd-middle-act-bar {\n    width: 462px;\n    height: 34px;\n    box-sizing: border-box;\n    display: flex;\n    align-items: center;\n    border: 1px solid #e6e9eb;\n    background: white;\n    font-size: 0;\n  }\n\n  .gwd-middle-act-bar:hover {\n    text-decoration: none;\n  }\n\n  .gwd-take {\n    display: inline-block;\n    margin-left: 10px;\n    margin-right: 15px;\n    text-align: center;\n    width:70px;\n    height:18px;\n    background:linear-gradient(90deg,rgba(255,42,26,1) 0%,rgba(255,98,31,1) 100%);\n    border-radius:9px;\n    font-size: 12px;\n    color: white;\n    position: relative;\n    cursor: pointer;\n  }\n\n  .gwd-qr-act-mid {\n    display: none;\n    flex-direction: column;\n    position: absolute;\n    width: 144px;\n    height: 167px;\n    box-sizing: border-box;\n    border: 1px solid #ff471a;\n    background: #fff9f6;\n    top: 25px;\n    z-index: 99;\n    /*left: 50%;*/\n    right: -16px;\n    align-items: center;\n    margin-left: -72px;\n  }\n\n  .gwd-qr-act-mid span {\n    width: initial;\n    margin: 0;\n  }\n\n  .gwd-take:hover .gwd-qr-act-mid {\n    display: flex;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 357 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, link = $data.link, extClass = $data.extClass, text = $data.text;
    $$out += '<a href="';
    $$out += $escape(link);
    $$out += '"\n   target="_blank"\n   title="点击领取"\n   style="display: inline-flex; position: relative; vertical-align: middle;" class="gwd-middle-tmall ';
    $$out += $escape(extClass);
    $$out += '">\n  <img ';
    $$out += 'src="https://cdn.gwdang.com/images/extensions/activity/618-take-middle@2x.png"';
    $$out += ' alt="" style="width: 24px; height: 24px;">\n  <span style="font-size: 12px; color: #ff471a; text-decoration: underline; margin-left: 3px; font-weight: 600; font-family: \'Microsoft YaHei\', \'Arial\', \'SimSun\'">';
    $$out += $escape(text);
    $$out += '</span>\n</a>\n<style>\n  .gwd-middle-tmall {\n    height: 100%;\n    align-items: center;\n    justify-content: center;\n    justify-items: center;\n    width: 150px!important;\n    white-space: nowrap;\n  }\n\n  .gwd-middle-tmall:hover {\n      background: #fff3eb;\n  }\n\n  .gwd-qr-act {\n    display: none;\n    flex-direction: column;\n    position: absolute;\n    width: 144px;\n    height: 167px;\n    box-sizing: border-box;\n    border: 1px solid #ff471a;\n    background: #fff9f6;\n    top: 37px;\n    left: 50%;\n    align-items: center;\n    margin-left: -72px;\n    z-index: 99;\n  }\n\n  .gwd-middle-tmall:hover .gwd-qr-act {\n    display: flex;\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 358 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, link = $data.link, text = $data.text;
    $$out += '<a href="';
    $$out += $escape(link);
    $$out += '" title="点击领取" target="_blank" class="gwd-middle-act-bar">\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/giftmoney@2x.png"';
    $$out += ' style="width: 14px; height: 17px; margin-left: 13px;">\n  <span style="font-size: 13px; color: #ff2d53; margin-left: 11px; font-weight: bold">';
    $$out += $escape(text);
    $$out += '</span>\n  <div style="flex: 1"></div>\n  <img ';
    $$out += 'src="https://cdn.bijiago.com/images/extensions/activity/arrow.svg"';
    $$out += ' style="width: 26px; height: 10px;">\n  <span class="gwd-take" style="line-height: initial">点击领取</span>\n</a>\n<style>\n  .gwd-middle-act-bar {\n    width: 462px;\n    height: 34px;\n    box-sizing: border-box;\n    display: flex;\n    align-items: center;\n    border: 1px solid #e6e9eb;\n    background: white;\n    font-size: 0;\n  }\n\n  .gwd-take {\n    display: inline-block;\n    margin-left: 10px;\n    margin-right: 15px;\n    text-align: center;\n    width:70px;\n    height:18px;\n    background:linear-gradient(90deg,rgba(239,37,37,1) 0%,rgba(255,47,32,1) 100%);\n    border-radius:9px;\n    font-size: 12px;\n    color: white;\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 359 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = "<style>\n  .bjg-price-protect-mini-ad {\n    width: 100%;\n    height: 34px;\n    border-bottom: 1px solid #e6e9eb;\n  }\n\n  .bjg-price-protect-mini-ad span {\n    font-size: 13px;\n    color: #ff752d;\n    margin-left: 12px;\n  }\n</style>\n<a class=\"bjg-price-protect-mini-ad gwd-row gwd-align\"\n   href=\"https://www.bijiago.com/priceProtectIntro/\"\n   target=\"_blank\">\n  <img src=\"" + __webpack_require__(103) + "\" alt=\"\" style=\"width: 16px; height: 19px; margin-left: 10px\">\n  <span>买完就降价？比价狗提醒您申请返差价</span>\n  <div style=\"flex: 1\"></div>\n  <img src=\"https://cdn.bijiago.com/images/extensions/bijiago/right-arrow.svg\"\n       style=\"width: 27px; height: 10px; margin-right: 12px;\">\n</a>";

/***/ }),
/* 360 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $, Vue) {

var _this = this;

var request = __webpack_require__(3);
var aliSku = __webpack_require__(361);

var getH5ShopCoupon = function getH5ShopCoupon() {
  var id, s, promotionFloatingData, couponInfoData;
  return regeneratorRuntime.async(function getH5ShopCoupon$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        id = undefined;

        if (G.site === 'taobao') {
          id = document.URL.match(/(?:\?|&)id=(\d+)/)[1];
        } else {
          id = __webpack_require__(10).getParameterByName('id');
        }
        s = undefined;

        if (!(G.site === "taobao")) {
          context$1$0.next = 9;
          break;
        }

        context$1$0.next = 6;
        return regeneratorRuntime.awrap(aliSku.taobaoDetail(id));

      case 6:
        s = context$1$0.sent;
        context$1$0.next = 16;
        break;

      case 9:
        if (!(G.site === "tmall")) {
          context$1$0.next = 15;
          break;
        }

        context$1$0.next = 12;
        return regeneratorRuntime.awrap(aliSku.tmallDetail(id));

      case 12:
        s = context$1$0.sent;
        context$1$0.next = 16;
        break;

      case 15:
        return context$1$0.abrupt('return', false);

      case 16:
        promotionFloatingData = s.promotionFloatingData;
        context$1$0.next = 19;
        return regeneratorRuntime.awrap(aliSku.couponInfo(id, promotionFloatingData));

      case 19:
        couponInfoData = context$1$0.sent;
        context$1$0.prev = 20;

        if (!(couponInfoData && couponInfoData.commonPromotions)) {
          context$1$0.next = 23;
          break;
        }

        return context$1$0.abrupt('return', {
          shop_coupon: {
            limit: couponInfoData.commonPromotions[0].titles[0].match(/满(\d+)使用/)[1],
            discount: couponInfoData.commonPromotions[0].priceText
          }
        });

      case 23:
        context$1$0.next = 28;
        break;

      case 25:
        context$1$0.prev = 25;
        context$1$0.t0 = context$1$0['catch'](20);
        return context$1$0.abrupt('return', 'no-coupon');

      case 28:
        return context$1$0.abrupt('return', 'no-coupon');

      case 29:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this, [[20, 25]]);
};

var getShopCoupon = function getShopCoupon(g_config) {
  return request.get(G.server + '/extension/Coupon?dp_id=' + G.dp.itemId + '&sellerId=' + g_config.sellerId + '&price=' + G.dp.price);
};

var getResult = function getResult(g_config) {
  return new Promise(function callee$1$0(resolve) {
    var res;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          context$2$0.next = 2;
          return regeneratorRuntime.awrap(getH5ShopCoupon());

        case 2:
          res = context$2$0.sent;

          if (!(res && res.shop_coupon !== 'no-coupon')) {
            context$2$0.next = 7;
            break;
          }

          resolve(res);
          context$2$0.next = 11;
          break;

        case 7:
          context$2$0.next = 9;
          return regeneratorRuntime.awrap(getShopCoupon(g_config));

        case 9:
          res = context$2$0.sent;

          resolve(res);

        case 11:
        case 'end':
          return context$2$0.stop();
      }
    }, null, _this);
  });
};

module.exports = {
  init: function init() {
    var g_config, hasShopCoupon;
    return regeneratorRuntime.async(function init$(context$1$0) {
      var _this2 = this;

      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          context$1$0.next = 2;
          return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
            return window.g_config;
          }));

        case 2:
          g_config = window.g_config;
          hasShopCoupon = false;

          setTimeout(function () {
            if (!hasShopCoupon) __webpack_require__(4).setMet('shopCouponGot', false);
          }, 3000);
          getResult(g_config).then(function callee$1$0(res) {
            var memberCoupon, coupon;
            return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  __webpack_require__(4).setMet('shopCouponGot', res && res.shop_coupon);
                  hasShopCoupon = true;

                  if (!(!res || !res.shop_coupon)) {
                    context$2$0.next = 11;
                    break;
                  }

                  context$2$0.next = 5;
                  return regeneratorRuntime.awrap(__webpack_require__(362).init());

                case 5:
                  memberCoupon = context$2$0.sent;

                  console.log(memberCoupon);

                  if (!memberCoupon) {
                    context$2$0.next = 9;
                    break;
                  }

                  return context$2$0.abrupt('return');

                case 9:
                  __webpack_require__(139).init();
                  return context$2$0.abrupt('return');

                case 11:
                  coupon = res.shop_coupon;

                  setTimeout(function () {
                    // if ($('.dsj-content').length) {
                    //   $('.dsj-content').after('<div id="shopCouponMini"></div>')
                    // } else {
                    //   $('#bjgext_minibar').after('<div id="shopCouponMini"></div>')
                    // }
                    $('#bjg-coupon-placeholder').replaceWith('<div id="shopCouponMini"></div>');
                    var ShopCouponMini = __webpack_require__(497)['default'];
                    var ShopCouponTop = __webpack_require__(503)['default'];
                    new Vue({
                      el: '#shopCouponMini',
                      render: function render(h) {
                        return h(ShopCouponMini, {
                          props: {
                            coupon: coupon,
                            useTb: res._dtao
                          }
                        });
                      }
                    });
                    $('.bjg-coupon-space').after('<div id="shopCouponTop"></div>');
                    new Vue({
                      el: '#shopCouponTop',
                      render: function render(h) {
                        return h(ShopCouponTop, {
                          props: {
                            coupon: coupon,
                            useTb: res._dtao
                          }
                        });
                      }
                    });
                  }, 0);

                case 13:
                case 'end':
                  return context$2$0.stop();
              }
            }, null, _this2);
          });

        case 6:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 361 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

var _this = this;

var md5 = __webpack_require__(49);

var sendData = function sendData(data) {
  var toSend = __webpack_require__(45).gZip(data);
  toSend = String.fromCharCode.apply(null, toSend);
  window.gwd_ext.post(gwd_G.server + '/extension?ac=sendSkuInfo&from=externalJS', btoa(toSend));
};

var getMdskip = function getMdskip() {
  return new Promise(function (resolve) {
    window.TShop && window.TShop.onProduct(function (e) {
      return resolve(e.get('mdskip'));
    });
  });
};

var getValItemInfo = function getValItemInfo() {
  return new Promise(function (resolve) {
    setTimeout(function () {
      window.TShop && window.TShop.onProduct(function (e) {
        return resolve(e.get('config').valItemInfo);
      });
    }, 2000);
  });
};

function extract_tmall_sku_map() {
  var attrs_list = [];
  var props = document.querySelectorAll(".tb-sku > .tm-sale-prop");
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = props[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var i = _step.value;

      var levelName = i.querySelector("dt").textContent;
      var level = {
        "name": levelName,
        "attrs": []
      };
      var attrs = i.querySelectorAll("ul > li");
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;

      try {
        for (var _iterator2 = attrs[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var attr = _step2.value;

          var value = attr.getAttribute("data-value");
          var _name = attr.querySelector("a > span").textContent;
          level.attrs.push({ name: _name, value: value });
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2['return']) {
            _iterator2['return']();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }

      attrs_list.push(level);
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator['return']) {
        _iterator['return']();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  return attrs_list;
}

function extract_taobao_sku_map() {
  var attrs_list = [];
  var props = document.querySelectorAll(".tb-skin > .J_Prop");
  var _iteratorNormalCompletion3 = true;
  var _didIteratorError3 = false;
  var _iteratorError3 = undefined;

  try {
    for (var _iterator3 = props[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
      var i = _step3.value;

      var levelName = i.querySelector("dt").textContent;
      var level = {
        "name": levelName,
        "attrs": []
      };
      var attrs = i.querySelectorAll("ul > li");
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;

      try {
        for (var _iterator4 = attrs[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var attr = _step4.value;

          var value = attr.getAttribute("data-value");
          var _name2 = attr.querySelector("a > span").textContent;
          level.attrs.push({ name: _name2, value: value });
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4['return']) {
            _iterator4['return']();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }

      attrs_list.push(level);
    }
  } catch (err) {
    _didIteratorError3 = true;
    _iteratorError3 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion3 && _iterator3['return']) {
        _iterator3['return']();
      }
    } finally {
      if (_didIteratorError3) {
        throw _iteratorError3;
      }
    }
  }

  return attrs_list;
}

function ajaxGetRequest(u) {
  return regeneratorRuntime.async(function ajaxGetRequest$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        return context$1$0.abrupt('return', new Promise(function (resolve, reject) {
          var xhr = new XMLHttpRequest();
          xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
              if (xhr.status == 200) {
                resolve(xhr.responseText);
                // console.log(xhr.responseText)
              } else {
                  reject(xhr.status);
                }
            }
          };
          xhr.open("GET", u, true);
          xhr.withCredentials = true;
          xhr.send();
        }));

      case 1:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this);
}

function tmallH5Detail(pid) {
  var spm, longText, r, token, jsonpTs, jsonString, appKey, text, sign, jsv, t, api, v, type, dataType, callback, u, resText, json, data, result;
  return regeneratorRuntime.async(function tmallH5Detail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (pid) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        if (!(window.gwdDetailStorage && window.gwdDetailStorage[pid])) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return', window.gwdDetailStorage[pid]);

      case 4:
        spm = "";

        if (document.URL.match(/&spm=(.*?)(?:&|$)/)) {
          spm = document.URL.match(/&spm=(.*?)(?:&|$)/)[1];
        }
        longText = '{"abbucket":"1","id":"' + pid + '","ns":"1","spm":"' + spm + '","sku_properties":"","detail_v":"3.5.0","appReqFrom":"detail","container_type":"xdetail","dinamic_v3":"true","supportV7":"true","ultron2":"true","itemNumId":"' + pid + '","pageCode":"miniAppDetail","_from_":"miniapp","openFrom":"pagedetail","pageSource":"1"}';
        r = { "id": pid, "detail_v": "3.5.0", "exParams": longText };
        token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
        jsonpTs = new Date().getTime();
        jsonString = JSON.stringify(r);
        appKey = "12574478";
        text = token + '&' + jsonpTs + '&' + appKey + '&' + jsonString;
        sign = md5(text);
        jsv = "2.7.0";
        t = jsonpTs;
        api = "mtop.taobao.detail.data.get";
        v = "1.0";
        type = "jsonp";
        dataType = "jsonp";
        callback = "mtopjsonp1";
        u = 'https://h5api.m.tmall.com/h5/mtop.taobao.detail.data.get/1.0/?jsv=' + jsv + '&appKey=' + appKey + '&t=' + t + '&sign=' + sign + '&api=' + api + '&v=' + v + '&ttid=201200%40taobao_h5_10.2.10&isSec=0&ecode=0&AntiFlood=true&AntiCreep=true&H5Request=true&type=' + type + '&dataType=' + dataType + '&safariGoLogin=true&mainDomain=tmall.com&subDomain=m&prefix=h5api&getJSONP=true&token=' + token + '&callback=' + callback + '&data=' + encodeURIComponent(jsonString);
        context$1$0.next = 24;
        return regeneratorRuntime.awrap(ajaxGetRequest(u));

      case 24:
        resText = context$1$0.sent;
        json = resText.match(/mtopjsonp1\((.*)\)$/)[1];
        context$1$0.prev = 26;
        data = JSON.parse(json).data;
        result = JSON.parse(data.apiStack[0]["value"])["global"]["data"];

        result.seller = data.seller;
        result.pcdetail = false;
        window.gwdDetailStorage = window.gwdDetailStorage || {};
        window.gwdDetailStorage[pid] = result;
        return context$1$0.abrupt('return', result);

      case 36:
        context$1$0.prev = 36;
        context$1$0.t0 = context$1$0['catch'](26);
        return context$1$0.abrupt('return', {});

      case 39:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this, [[26, 36]]);
}

//仅限请求当前网址的pid
function tmallDetail(pid) {
  var host = arguments.length <= 1 || arguments[1] === undefined ? "tmall" : arguments[1];
  var spm, priceTId, queryParams, longText, r, token, jsonpTs, jsonString, appKey, text, sign, jsv, t, u, resText, json, result;
  return regeneratorRuntime.async(function tmallDetail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (pid) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        if (!(window.gwdDetailStorage && window.gwdDetailStorage[pid])) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return', window.gwdDetailStorage[pid]);

      case 4:
        spm = "";

        if (document.URL.match(/&spm=(.*?)(?:&|$)/)) {
          spm = document.URL.match(/&spm=(.*?)(?:&|$)/)[1];
        }
        priceTId = "";

        if (document.URL.match(/&priceTId=(.*?)(?:&|$)/)) {
          priceTId = document.URL.match(/&priceTId=(.*?)(?:&|$)/)[1];
        }
        queryParams = "";

        if (document.URL.match(/\?(.*?)(?:#|$)/)) {
          queryParams = document.URL.match(/\?(.*?)(?:#|$)/)[1];
        }
        longText = '"{"abbucket":"3","id":"' + pid + '","ns":"1","priceTId":"' + priceTId + '","spm":"' + spm + '","queryParams":"' + queryParams + '","domain":"https://detail.tmall.com","path_name":"/item.htm"}';
        r = { "id": pid, "detail_v": "3.3.2", "exParams": longText };
        token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
        jsonpTs = new Date().getTime();
        jsonString = JSON.stringify(r);
        appKey = "12574478";
        text = token + '&' + jsonpTs + '&' + appKey + '&' + jsonString;
        sign = md5(text);
        jsv = "2.6.1";
        t = jsonpTs;
        u = 'https://h5api.m.' + host + '.' + (location.host.includes('hk') ? 'hk' : 'com') + '/h5/mtop.taobao.pcdetail.data.get/1.0/?jsv=' + jsv + '&appKey=' + appKey + '&t=' + t + '&sign=' + sign + '&api=mtop.taobao.pcdetail.data.get&v=1.0&isSec=0&ecode=0&timeout=10000&ttid=2022%40taobao_litepc_9.17.0&AntiFlood=true&AntiCreep=true&preventFallback=true&type=jsonp&dataType=jsonp&callback=mtopjsonp1&data=' + encodeURIComponent(jsonString);
        context$1$0.next = 23;
        return regeneratorRuntime.awrap(ajaxGetRequest(u));

      case 23:
        resText = context$1$0.sent;
        json = resText.match(/mtopjsonp1\((.*)\)$/)[1];
        context$1$0.prev = 25;
        result = JSON.parse(json).data;

        result.pcdetail = true;
        window.gwdDetailStorage = window.gwdDetailStorage || {};
        window.gwdDetailStorage[pid] = result;
        return context$1$0.abrupt('return', result);

      case 33:
        context$1$0.prev = 33;
        context$1$0.t0 = context$1$0['catch'](25);
        return context$1$0.abrupt('return', {});

      case 36:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this, [[25, 33]]);
}

function taobaoH5Detail(pid) {
  var longText, r, token, jsonpTs, jsonString, appKey, text, sign, t, u, resText, json, result;
  return regeneratorRuntime.async(function taobaoH5Detail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (pid) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        if (!(window.gwdDetailStorage && window.gwdDetailStorage[pid])) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return', window.gwdDetailStorage[pid]);

      case 4:
        longText = '{"id":"' + pid + '","ali_refid":"","ali_trackid":"","spm":"","detail_v":"3.5.0","appReqFrom":"detail","container_type":"xdetail","dinamic_v3":"true","supportV7":"true","ultron2":"true","itemNumId":"' + pid + '","pageCode":"miniAppDetail","_from_":"miniapp","openFrom":"pagedetail","pageSource":"1"}';
        r = { "id": pid, "detail_v": "3.5.0", "exParams": longText };
        token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
        jsonpTs = new Date().getTime();
        jsonString = JSON.stringify(r);
        appKey = "12574478";
        text = token + '&' + jsonpTs + '&' + appKey + '&' + jsonString;
        sign = md5(text);
        t = jsonpTs;
        u = 'https://h5api.m.taobao.com/h5/mtop.taobao.detail.data.get/1.0/?jsv=2.7.0&appKey=12574478&t=' + t + '&sign=' + sign + '&api=mtop.taobao.detail.data.get&v=1.0&ttid=201200%40taobao_h5_10.2.10&isSec=0&ecode=0&AntiFlood=true&AntiCreep=true&H5Request=true&type=jsonp&dataType=jsonp&safariGoLogin=true&mainDomain=taobao.com&subDomain=m&prefix=h5api&getJSONP=true&token=' + token + '&callback=mtopjsonp1&data=' + encodeURIComponent(jsonString);
        context$1$0.next = 16;
        return regeneratorRuntime.awrap(ajaxGetRequest(u));

      case 16:
        resText = context$1$0.sent;
        json = resText.match(/mtopjsonp1\((.*)\)$/)[1];
        context$1$0.prev = 18;
        result = JSON.parse(JSON.parse(json).data.apiStack[0]["value"])["global"]["data"];

        window.gwdDetailStorage = window.gwdDetailStorage || {};
        window.gwdDetailStorage[pid] = result;
        return context$1$0.abrupt('return', result);

      case 25:
        context$1$0.prev = 25;
        context$1$0.t0 = context$1$0['catch'](18);
        return context$1$0.abrupt('return', {});

      case 28:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this, [[18, 25]]);
}

function deleteFootprint(pid, timestamp) {
  var days = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
  var api, v, type, appKey, token, jsonpTs, jsonString, text, sign, host, url, res;
  return regeneratorRuntime.async(function deleteFootprint$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        api = 'mtop.taobao.cmin.deletepath';
        v = '1.0';
        type = 'jsonp';
        appKey = '12574478';
        token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
        jsonpTs = new Date().getTime();
        jsonString = days ? JSON.stringify({
          ids: '',
          days: days
        }) : JSON.stringify({
          ids: timestamp + '_' + pid,
          days: ''
        });
        text = token + '&' + jsonpTs + '&' + appKey + '&' + jsonString;
        sign = md5(text);
        host = 'taobao';

        if (location.host.includes('tmall')) {
          host = 'tmall';
        }
        url = 'https://h5api.m.' + host + '.com/h5/' + api + '/' + v + '/?jsv=2.7.0&appKey=' + appKey + '&t=' + jsonpTs + '&sign=' + sign + '&api=' + api + '&v=' + v + '&preventFallback=true&type=' + type + '&dataType=jsonp&callback=mtopjsonp1&data=' + encodeURIComponent(jsonString);
        context$1$0.next = 14;
        return regeneratorRuntime.awrap(ajaxGetRequest(url));

      case 14:
        res = context$1$0.sent;

        if (!res.includes('SUCCESS')) {
          context$1$0.next = 20;
          break;
        }

        __webpack_require__(104).remove(timestamp + '_' + pid);
        return context$1$0.abrupt('return', 'SUCCESS');

      case 20:
        __webpack_require__(104).add(timestamp + '_' + pid);

        if (!res.includes('过期')) {
          context$1$0.next = 23;
          break;
        }

        return context$1$0.abrupt('return', 'EXPIRED');

      case 23:
        return context$1$0.abrupt('return', 'FAIL');

      case 24:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this);
}

function couponInfo(id, promotionFloatingData) {
  var lastErrorTime, token, jsonpTs, appKey, jsonString, text, sign, t, u, resText, json, result;
  return regeneratorRuntime.async(function couponInfo$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(!promotionFloatingData || !id)) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        if (!location.hostname.includes('.tmall.com')) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return');

      case 4:
        if (!localStorage.getItem('gwd-coupon-info-last-error-time')) {
          context$1$0.next = 8;
          break;
        }

        lastErrorTime = localStorage.getItem('gwd-coupon-info-last-error-time');

        if (!(new Date().getTime() - lastErrorTime < 1000 * 60 * 60 * 24 * 10)) {
          context$1$0.next = 8;
          break;
        }

        return context$1$0.abrupt('return');

      case 8:
        if (!(window.gwdCouponInfo && window.gwdCouponInfo[id])) {
          context$1$0.next = 10;
          break;
        }

        return context$1$0.abrupt('return', window.gwdCouponInfo[id]);

      case 10:
        token = document.cookie.match(/_m_h5_tk=([^;]+)/)[1].split("_")[0];
        jsonpTs = new Date().getTime();
        appKey = "12574478";
        jsonString = JSON.stringify({
          itemId: id,
          promotionFloatingData: JSON.stringify(promotionFloatingData)
        });
        text = token + '&' + jsonpTs + '&' + appKey + '&' + jsonString;
        sign = md5(text);
        t = jsonpTs;
        u = 'https://h5api.m.taobao.com/h5/mtop.tmall.detail.couponpage.newcouponpage/1.0/?jsv=2.7.0&appKey=12574478&t=' + t + '&sign=' + sign + '&api=mtop.tmall.detail.couponpage.newcouponpage&v=1.0&ttid=201200%40taobao_h5_10.2.10&isSec=0&ecode=0&AntiFlood=true&AntiCreep=true&H5Request=true&type=jsonp&dataType=jsonp&safariGoLogin=true&mainDomain=taobao.com&subDomain=m&prefix=h5api&getJSONP=true&token=' + token + '&callback=mtopjsonp1&data=' + encodeURIComponent(jsonString);
        context$1$0.prev = 18;
        context$1$0.next = 21;
        return regeneratorRuntime.awrap(ajaxGetRequest(u));

      case 21:
        resText = context$1$0.sent;
        json = resText.match(/mtopjsonp1\((.*)\)$/)[1];
        result = JSON.parse(json).data.couponFloatLayer2VO;

        window.gwdCouponInfo = window.gwdCouponInfo || {};
        window.gwdCouponInfo[id] = result;
        if (!result) {
          localStorage.setItem('gwd-coupon-info-last-error-time', Date.now());
        }
        return context$1$0.abrupt('return', result);

      case 30:
        context$1$0.prev = 30;
        context$1$0.t0 = context$1$0['catch'](18);

        localStorage.setItem('gwd-coupon-info-last-error-time', Date.now());
        return context$1$0.abrupt('return', {});

      case 34:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this, [[18, 30]]);
}
function isUserLogin() {
  if (document.querySelector("#login-info1") && document.querySelector("#login-info1").textContent.includes("请登录")) {
    return false;
  }

  if (document.querySelector("#J_SiteNavLogin") && document.querySelector("#J_SiteNavLogin").textContent.includes("请登录")) {
    return false;
  }
  return true;
}

function mountResult(id, result) {
  if (!window.gwd_G.aliSkuResults) {
    window.gwd_G.aliSkuResults = {};
  }
  window.gwd_G.aliSkuResults[id] = result;
}

var init = function init() {
  var id, s, r, data, couponInfoData;
  return regeneratorRuntime.async(function init$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!window.gwd_G.mtopRequested) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        id = undefined;

        if (gwd_G.site === 'taobao') {
          id = document.URL.match(/(?:\?|&)id=(\d+)/)[1];
        } else {
          id = __webpack_require__(10).getParameterByName('id');
        }

        window.gwd_G.mtopRequested = true;

        s = undefined;

        if (!(gwd_G.site === "taobao")) {
          context$1$0.next = 12;
          break;
        }

        context$1$0.next = 9;
        return regeneratorRuntime.awrap(tmallDetail(id, "taobao"));

      case 9:
        s = context$1$0.sent;
        context$1$0.next = 19;
        break;

      case 12:
        if (!(gwd_G.site === "tmall")) {
          context$1$0.next = 18;
          break;
        }

        context$1$0.next = 15;
        return regeneratorRuntime.awrap(tmallDetail(id, "tmall"));

      case 15:
        s = context$1$0.sent;
        context$1$0.next = 19;
        break;

      case 18:
        return context$1$0.abrupt('return');

      case 19:
        r = {
          skuBase: s.skuBase,
          skuCore: s.skuCore,
          item: s.item,
          props: s.props,
          rate: s.rate,
          componentsVO: s.componentsVO,
          seller: s.seller,
          priceSectionData: s.priceSectionData,
          version: "h5",
          pcdetail: s.pcdetail
        };

        window.gwd_G.aliSkuInfo = r;
        data = {
          url: location.href,
          fp: localStorage.getItem('gwdang-fp'),
          dfp: localStorage.getItem('gwdang-dfp'),
          data: r,
          userLogin: isUserLogin()
        };

        sendData(data);
        context$1$0.next = 25;
        return regeneratorRuntime.awrap(couponInfo(id, s.promotionFloatingData));

      case 25:
        couponInfoData = context$1$0.sent;

        if (couponInfoData && couponInfoData.commonPromotions) {
          mountResult(id, {
            couponInfo: {
              limit: couponInfoData.commonPromotions[0].titles[0].match(/满(\d+)使用/)[1],
              discount: couponInfoData.commonPromotions[0].priceText
            }
          });
        } else {
          mountResult(id, 'no-coupon');
        }

      case 27:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  init: init,
  getValItemInfo: getValItemInfo,
  tmallDetail: tmallDetail,
  taobaoDetail: taobaoH5Detail,
  deleteFootprint: deleteFootprint,
  couponInfo: couponInfo
};

// console.log('deleteing', pid, timestamp)

// console.log('delete request', url)
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 362 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $, Vue) {// 会员券



var _this = this;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _commonComponentsMemberCouponTopVue = __webpack_require__(363);

var _commonComponentsMemberCouponTopVue2 = _interopRequireDefault(_commonComponentsMemberCouponTopVue);

var _commonComponentsMemberCouponMiniVue = __webpack_require__(374);

var _commonComponentsMemberCouponMiniVue2 = _interopRequireDefault(_commonComponentsMemberCouponMiniVue);

var _bjgouComponentsMemberCouponMiniBjg = __webpack_require__(465);

var _bjgouComponentsMemberCouponMiniBjg2 = _interopRequireDefault(_bjgouComponentsMemberCouponMiniBjg);

var _bjgouComponentsMemberCouponBottomBjg = __webpack_require__(471);

var _bjgouComponentsMemberCouponBottomBjg2 = _interopRequireDefault(_bjgouComponentsMemberCouponBottomBjg);

var getMemberCoupon = function getMemberCoupon(shopId, userId) {
  return regeneratorRuntime.async(function getMemberCoupon$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(__webpack_require__(3).rawGet('https://alisitecdn.m.taobao.com/minidata/shop/index/downgrade.htm?pathInfo=shop/index2&userId=' + userId + '&shopId=' + shopId));

      case 2:
        return context$1$0.abrupt('return', context$1$0.sent);

      case 3:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var render = function render() {
  __webpack_require__(4).setMet('couponLink', {
    content: '发现店铺优惠券，速领',
    url: 'https://tb.gwdang.com/extension/qrpage?dp_id=' + G.dp.dpId + '&tag=2'
  });

  var divTop = document.createElement('div');
  $('.gwd-topbar-left').append(divTop);
  new Vue({
    el: divTop,
    render: function render(h) {
      return h(_commonComponentsMemberCouponTopVue2['default'], {
        props: {
          tag: 2
        }
      });
    }
  });

  // const divBottom = document.createElement('div');
  // $('#gwd_minibar').after(divBottom);
  new Vue({
    el: '#gwd-coupon-placeholder',
    render: function render(h) {
      return h(_commonComponentsMemberCouponMiniVue2['default'], {
        props: {
          tag: 2
        }
      });
    }
  });
};

var renderBjg = function renderBjg() {
  new Vue({
    el: '#bjg-coupon-placeholder',
    render: function render(h) {
      return h(_bjgouComponentsMemberCouponMiniBjg2['default'], {
        props: {
          tag: 8
        }
      });
    }
  });

  var el = document.createElement('DIV');
  $('.bjg-coupon-space').after(el);
  new Vue({
    el: el,
    render: function render(h) {
      return h(_bjgouComponentsMemberCouponBottomBjg2['default'], {
        props: {
          tag: 8
        }
      });
    }
  });
};

module.exports = {
  init: function init() {
    return new Promise(function (resolve, reject) {
      if (!G.aliSite) {
        resolve(false);
      }
      var metaStr = $('meta[name="microscope-data"]').attr('content');
      if (!metaStr) {
        resolve(false);
        return;
      }
      var parsedMetaStr = metaStr.split(';').map(function (item) {
        var arr = item.split('=');
        return {
          key: arr[0],
          value: arr[1]
        };
      });
      var meta = {};
      parsedMetaStr.forEach(function (item) {
        meta[item.key.trim()] = item.value;
      });

      getMemberCoupon(meta.shopId, meta.userid).then(function (res) {
        if (JSON.stringify(res).indexOf('market.m.taobao.com/app/cem-fe/benefit-exchange/benefit-exchange/index.html') > -1) {
          __webpack_require__(12).logOnce('淘宝会员券:展示');
          if (G.from_device === 'bijiago' || G.from_device === 'biyibi') {
            renderBjg();
          } else {
            render();
          }
          resolve(true);
        } else {
          resolve(false);
        }
      });
    });
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 363 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__ = __webpack_require__(364);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MemberCouponTop_vue_vue_type_script_lang_js__ = __webpack_require__(105);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MemberCouponTop_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MemberCouponTop_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MemberCouponTop_vue_vue_type_style_index_0_id_28e28ad7_scoped_true_lang_less__ = __webpack_require__(371);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MemberCouponTop_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__["staticRenderFns"],
  false,
  null,
  "28e28ad7",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('28e28ad7')) {
      api.createRecord('28e28ad7', component.options)
    } else {
      api.reload('28e28ad7', component.options)
    }
    module.hot.accept("./MemberCouponTop.vue?vue&type=template&id=28e28ad7&scoped=true", function () {
      api.rerender('28e28ad7', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/MemberCouponTop.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 364 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__ = __webpack_require__(365);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_template_id_28e28ad7_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 365 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-member-coupon-top gwd-member-coupon",
    attrs: { title: "点击领取", href: _vm.link, target: "_blank" }
  }, [_c("span", { staticStyle: { color: "white", "margin-left": "5px" } }, [_vm._v("当前商品可领会员券")]), _vm._v(" "), _c("span", {
    staticStyle: {
      color: "white",
      "margin-left": "9px",
      "margin-right": "9px"
    }
  }, [_vm._v("领取")])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 366 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__ = __webpack_require__(367);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_template_id_498face2_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 367 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-member-qr gwd-column gwd-align" }, [_c("img", {
    staticStyle: {
      width: "20px",
      height: "20px",
      position: "absolute",
      left: "50%",
      top: "53px",
      transform: "translate(-50%, 0%)",
      background: "white"
    },
    attrs: {
      src: __webpack_require__(107),
      alt: ""
    }
  }), _vm._v(" "), _c("img", {
    style: "visibility: " + (_vm.qr ? "visible" : "hidden"),
    attrs: { src: _vm.qr, alt: "" }
  }), _vm._v(" "), _vm._m(0)]);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticStyle: {
      "margin-top": "6px",
      height: "13px",
      "line-height": "13px",
      "white-space": "nowrap",
      "text-align": "center",
      "padding-left": "4px"
    }
  }, [_c("span", { staticClass: "gwd-bigger" }, [_vm._v("淘宝APP扫码")]), _vm._v(" "), _c("span", { staticClass: "gwd-font11", staticStyle: { color: "#333333" } }, [_vm._v("联系客服领取")])]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 368 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_style_index_0_id_498face2_scoped_true_lang_less__ = __webpack_require__(369);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_style_index_0_id_498face2_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponQr_vue_vue_type_style_index_0_id_498face2_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 369 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(370);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("461b1ec9", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponQr.vue?vue&type=style&index=0&id=498face2&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponQr.vue?vue&type=style&index=0&id=498face2&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 370 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-member-qr[data-v-498face2] {\n  width: 148px;\n  height: 156px;\n  background: #FFF7F7;\n  border: 1px solid #FF3D5D;\n}\n.gwd-member-qr span[data-v-498face2] {\n  display: inline-block;\n}\n.gwd-member-qr img[data-v-498face2] {\n  margin-top: 7px;\n  width: 120px;\n  height: 120px;\n}\n.gwd-member-qr .gwd-bigger[data-v-498face2] {\n  color: #FF3D5D;\n  font-size: 13px;\n}\n.gwd-member-qr .gwd-font11[data-v-498face2] {\n  font-size: 12px;\n  transform: scale(0.8333);\n  transform-origin: bottom center;\n}\n.gwd-member-qr .gwd-bottom-desc[data-v-498face2] {\n  line-height: 12px;\n  font-size: 12px;\n  transform: scale(0.833);\n  transform-origin: top center;\n  color: #999999;\n}\n", ""]);

// exports


/***/ }),
/* 371 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_style_index_0_id_28e28ad7_scoped_true_lang_less__ = __webpack_require__(372);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_style_index_0_id_28e28ad7_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponTop_vue_vue_type_style_index_0_id_28e28ad7_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 372 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(373);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("18426e02", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponTop.vue?vue&type=style&index=0&id=28e28ad7&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponTop.vue?vue&type=style&index=0&id=28e28ad7&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 373 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-member-coupon-top[data-v-28e28ad7] {\n  height: 28px;\n  background: linear-gradient(to right, #f28936, #ff351e);\n  position: relative;\n  background-size: cover;\n  display: inline-flex;\n  align-items: center;\n  margin-top: 2px;\n  cursor: pointer;\n  border-radius: 2px;\n}\n.gwd-member-coupon-top .gwd-qr-container[data-v-28e28ad7] {\n  display: none;\n  position: absolute;\n  top: 28px;\n}\n.gwd-member-coupon-top[data-v-28e28ad7]::before,\n.gwd-member-coupon-top[data-v-28e28ad7]::after {\n  content: '';\n  position: absolute;\n  left: 115px;\n  width: 4px;\n  height: 4px;\n  background: white;\n  border-radius: 2px;\n  top: -2px;\n}\n.gwd-member-coupon-top[data-v-28e28ad7]::after {\n  top: unset;\n  bottom: -2px;\n}\n.gwd-member-coupon-top[data-v-28e28ad7]:hover {\n  text-decoration: none;\n}\n.gwd-member-coupon-top:hover .gwd-qr-container[data-v-28e28ad7] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 374 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__ = __webpack_require__(375);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MemberCouponMini_vue_vue_type_script_lang_js__ = __webpack_require__(110);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MemberCouponMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MemberCouponMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MemberCouponMini_vue_vue_type_style_index_0_id_42d39176_scoped_true_lang_less__ = __webpack_require__(462);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MemberCouponMini_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__["staticRenderFns"],
  false,
  null,
  "42d39176",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('42d39176')) {
      api.createRecord('42d39176', component.options)
    } else {
      api.reload('42d39176', component.options)
    }
    module.hot.accept("./MemberCouponMini.vue?vue&type=template&id=42d39176&scoped=true", function () {
      api.rerender('42d39176', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/MemberCouponMini.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 375 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__ = __webpack_require__(376);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_template_id_42d39176_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("CommonCouponBarMini", {
    attrs: {
      icon: _vm.icon,
      type: "link",
      text: "当前商品可领会员券",
      mainColor: "#ff6132",
      secondColor: "#ff7d38",
      href: "https://tb.gwdang.com/extension/qrpage?dp_id=" + _vm.G.dp.dpId + "&tag=2"
    }
  });
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 377 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__ = __webpack_require__(378);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CommonCouponBarMini_vue_vue_type_script_lang_js__ = __webpack_require__(112);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CommonCouponBarMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CommonCouponBarMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CommonCouponBarMini_vue_vue_type_style_index_0_id_3fdd510a_scoped_true_lang_less__ = __webpack_require__(455);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CommonCouponBarMini_vue_vue_type_style_index_1_id_3fdd510a_lang_less__ = __webpack_require__(458);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);







/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CommonCouponBarMini_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__["staticRenderFns"],
  false,
  null,
  "3fdd510a",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('3fdd510a')) {
      api.createRecord('3fdd510a', component.options)
    } else {
      api.reload('3fdd510a', component.options)
    }
    module.hot.accept("./CommonCouponBarMini.vue?vue&type=template&id=3fdd510a&scoped=true", function () {
      api.rerender('3fdd510a', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/CommonCouponBarMini.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 378 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__ = __webpack_require__(379);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_template_id_3fdd510a_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c(_vm.type === "link" ? "a" : "div", {
    tag: "component",
    staticClass: "gwd-row gwd-align gwd-coupon-bar",
    "class": {
      "gwd-butie": _vm.text.includes("补贴") && _vm.mainColor === "#11a14e"
    },
    attrs: {
      href: _vm.alterHref,
      target: "_blank",
      title: _vm.type === "link" ? "点击领取" : ""
    },
    on: {
      mouseenter: function mouseenter($event) {
        return _vm.over();
      }
    }
  }, [_vm.showStampBg ? _c("div", { staticClass: "gwd-coupon-color-bg gwd-tl" }) : _vm._e(), _vm._v(" "), _vm.showStampBg ? _c("div", { staticClass: "gwd-coupon-color-bg gwd-br" }) : _vm._e(), _vm._v(" "), _c("img", {
    staticStyle: {
      "margin-left": "12px",
      "margin-right": "8px",
      "max-height": "20px",
      "z-index": "1"
    },
    attrs: { src: _vm.icon, alt: "" }
  }), _vm._v(" "), _c("span", {
    style: "color: " + _vm.mainColor + "; font-size: 14px",
    domProps: { innerHTML: _vm._s(_vm.text) }
  }), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }, [_vm.rebate ? _c("Stamp", {
    staticStyle: { right: "109px", top: "0", position: "absolute" },
    attrs: { value: _vm.rebate }
  }) : _vm._e()], 1), _vm._v(" "), _vm.type === "link" ? _c("span", {
    staticClass: "gwd-round-click",
    style: "background: linear-gradient(180deg, " + _vm.secondColor + " 0%, " + _vm.mainColor + " 100%); z-index: 1"
  }, [_vm._v("点击领取")]) : _vm._e(), _vm._v(" "), _vm.type === "qr" ? _c("div", {
    staticClass: "gwd-take gwd-row gwd-align",
    style: "background: url(" + _vm.takeBg + ")"
  }, [_c("span", { style: "color: " + _vm.mainColor }, [_vm._v("￥" + _vm._s(_vm.couponValue))]), _vm._v(" "), _c("span", { staticStyle: { color: "white" } }, [_vm._v("领取")])]) : _vm._e(), _vm._v(" "), _vm.type === "qr" ? _c("div", {
    staticClass: "gwd-qr-hover-window gwd-column gwd-align",
    style: "border-color: " + _vm.mainColor
  }, [!_vm.error && _vm.actualQr ? _c("img", {
    staticStyle: {
      width: "120px",
      height: "120px",
      "margin-top": "8px"
    },
    attrs: { src: _vm.actualQr, alt: "" }
  }) : _vm._e(), _vm._v(" "), _vm.error ? _c("QRError", { on: { refresh: _vm.over } }) : _vm._e(), _vm._v(" "), _c("div", {
    staticClass: "gwd-row",
    staticStyle: { "margin-top": "8px" }
  }, [_c("span", { style: "color: " + _vm.mainColor + "; font-size: 12px;" }, [_vm._v("微信扫码")]), _vm._v(" "), _c("span", {
    staticStyle: {
      color: "#070707",
      "font-size": "12px",
      transform: "scale(0.8333)",
      "transform-origin": "center left",
      "margin-top": "1px"
    }
  }, [_vm._v(_vm._s(_vm.qrTitle))])])], 1) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 380 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CouponArrow_vue_vue_type_template_id_4f0f1e98__ = __webpack_require__(381);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CouponArrow_vue_vue_type_script_lang_js__ = __webpack_require__(114);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CouponArrow_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CouponArrow_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);





/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CouponArrow_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CouponArrow_vue_vue_type_template_id_4f0f1e98__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CouponArrow_vue_vue_type_template_id_4f0f1e98__["staticRenderFns"],
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('4f0f1e98')) {
      api.createRecord('4f0f1e98', component.options)
    } else {
      api.reload('4f0f1e98', component.options)
    }
    module.hot.accept("./CouponArrow.vue?vue&type=template&id=4f0f1e98", function () {
      api.rerender('4f0f1e98', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/CouponArrow.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 381 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__ = __webpack_require__(382);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CouponArrow_vue_vue_type_template_id_4f0f1e98__["staticRenderFns"]; });


/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("svg", {
    attrs: {
      width: "48px",
      height: "24px",
      viewBox: "0 0 48 24",
      version: "1.1",
      xmlns: "http://www.w3.org/2000/svg",
      "xmlns:xlink": "http://www.w3.org/1999/xlink"
    }
  }, [_c("g", {
    attrs: {
      id: "Page-1",
      stroke: "none",
      "stroke-width": "1",
      fill: "none",
      "fill-rule": "evenodd"
    }
  }, [_c("g", {
    attrs: {
      id: "店铺券-点击",
      transform: "translate(-1135.000000, -340.000000)"
    }
  }, [_c("g", {
    attrs: {
      id: "箭头3",
      transform: "translate(1135.000000, 340.000000)"
    }
  }, [_c("g", {
    attrs: {
      id: "编组-2",
      opacity: "0.900000036",
      transform: "translate(24.000000, 0.000000)"
    }
  }, [_c("g", { attrs: { id: "编组" } }, [_c("rect", {
    attrs: {
      id: "矩形",
      "fill-opacity": "0.01",
      fill: "#FFFFFF",
      "fill-rule": "nonzero",
      x: "0",
      y: "0",
      width: "24",
      height: "24"
    }
  }), _vm._v(" "), _c("polyline", {
    attrs: {
      id: "路径",
      stroke: _vm.color,
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      points: "9.5 6 15.5 12 9.5 18"
    }
  })])]), _vm._v(" "), _c("g", {
    attrs: {
      id: "编组-2备份",
      opacity: "0.5",
      transform: "translate(12.000000, 0.000000)"
    }
  }, [_c("g", { attrs: { id: "编组", opacity: "0.900000036" } }, [_c("rect", {
    attrs: {
      id: "矩形",
      "fill-opacity": "0.01",
      fill: "#FFFFFF",
      "fill-rule": "nonzero",
      x: "0",
      y: "0",
      width: "24",
      height: "24"
    }
  }), _vm._v(" "), _c("polyline", {
    attrs: {
      id: "路径",
      stroke: _vm.color,
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      points: "9.5 6 15.5 12 9.5 18"
    }
  })])]), _vm._v(" "), _c("g", { attrs: { id: "编组-2备份-2", opacity: "0.200000003" } }, [_c("g", { attrs: { id: "编组", opacity: "0.900000036" } }, [_c("rect", {
    attrs: {
      id: "矩形",
      "fill-opacity": "0.01",
      fill: "#FFFFFF",
      "fill-rule": "nonzero",
      x: "0",
      y: "0",
      width: "24",
      height: "24"
    }
  }), _vm._v(" "), _c("polyline", {
    attrs: {
      id: "路径",
      stroke: _vm.color,
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      points: "9.5 6 15.5 12 9.5 18"
    }
  })])])])])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 383 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_29b33b2e_scoped_true__ = __webpack_require__(384);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__ = __webpack_require__(116);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__QrError_vue_vue_type_style_index_0_id_29b33b2e_scoped_true_lang_less__ = __webpack_require__(386);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__QrError_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_29b33b2e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__QrError_vue_vue_type_template_id_29b33b2e_scoped_true__["staticRenderFns"],
  false,
  null,
  "29b33b2e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('29b33b2e')) {
      api.createRecord('29b33b2e', component.options)
    } else {
      api.reload('29b33b2e', component.options)
    }
    module.hot.accept("./QrError.vue?vue&type=template&id=29b33b2e&scoped=true", function () {
      api.rerender('29b33b2e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/QrError.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 384 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__ = __webpack_require__(385);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_29b33b2e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-qr-error" }, [_c("img", {
    attrs: {
      src: "https://cdn.gwdang.com/images/extensions/warn@2x.png",
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticClass: "grayText", staticStyle: { "margin-top": "10px" } }, [_vm._v("当前网络异常"), _c("br"), _vm._v("点此"), _c("span", { staticClass: "red", on: { click: _vm.click } }, [_vm._v("刷新")])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 386 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_29b33b2e_scoped_true_lang_less__ = __webpack_require__(387);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_29b33b2e_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_29b33b2e_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(388);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("2c4c9aed", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QrError.vue?vue&type=style&index=0&id=29b33b2e&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QrError.vue?vue&type=style&index=0&id=29b33b2e&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-qr-error[data-v-29b33b2e] {\n  width: 118px;\n  height: 118px;\n  background: white;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.bjg-qr-error img[data-v-29b33b2e] {\n  margin-top: 22px;\n  width: 32px;\n  height: 32px;\n}\n.bjg-qr-error .grayText[data-v-29b33b2e] {\n  color: #999999;\n  display: inline-block;\n  font-size: 20px;\n  width: 125px;\n  text-align: center;\n  line-height: 32px;\n  transform: scale(0.5);\n  transform-origin: top center;\n}\n.bjg-qr-error .grayText .red[data-v-29b33b2e] {\n  color: #ff2d53;\n  text-decoration: underline;\n  cursor: pointer;\n}\n", ""]);

// exports


/***/ }),
/* 389 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__ = __webpack_require__(390);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_template_id_a70db998_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-stamp-bg gwd-row gwd-align" }, [_c("div", { staticClass: "gwd-text" }, [_vm._v("再送"), _c("br"), _vm._v(_vm._s(_vm.value) + "元红包")])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 391 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_style_index_0_id_a70db998_scoped_true_lang_less__ = __webpack_require__(392);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_style_index_0_id_a70db998_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Stamp_vue_vue_type_style_index_0_id_a70db998_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(393);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("99d9d974", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Stamp.vue?vue&type=style&index=0&id=a70db998&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Stamp.vue?vue&type=style&index=0&id=a70db998&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-stamp-bg[data-v-a70db998] {\n  background: url(https://cdn.gwdang.com/images/extensions/middle-stamp@2x.png) no-repeat;\n  background-size: contain;\n  width: 112px;\n  height: 38px;\n  justify-content: center;\n}\n.gwd-stamp-bg .gwd-text[data-v-a70db998] {\n  font-size: 12px;\n  color: #f53867;\n  line-height: 14px;\n  transform: rotate(-17deg);\n  text-align: center;\n}\n", ""]);

// exports


/***/ }),
/* 394 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, Vue) {

var TbScrollLink = __webpack_require__(395)['default'];

module.exports = {
  reset: function reset() {
    $('#gwd-tb-mini-coupon').remove();
  },
  add: function add(text, icon, link, mainColor, secondColor, showStampBg, rebate) {
    if (!G.aliSite) {
      return;
    }
    if ($('#gwd-tb-mini-coupon').length) {
      return;
    }
    var div = document.createElement('div');
    $('.gwd-minibar-bg').after(div);
    __webpack_require__(6).log('tbScrollLink init', text);
    new Vue({
      el: div,
      render: function render(h) {
        return h(TbScrollLink, {
          props: {
            text: text, icon: icon, link: link, mainColor: mainColor, secondColor: secondColor, showStampBg: showStampBg, rebate: rebate
          }
        });
      }
    });
    __webpack_require__(401).recoverMiniBar();
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(17)["default"]))

/***/ }),
/* 395 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__ = __webpack_require__(396);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TbScrollLink_vue_vue_type_script_lang_js__ = __webpack_require__(121);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__TbScrollLink_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__TbScrollLink_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TbScrollLink_vue_vue_type_style_index_0_id_0ac72494_scoped_true_lang_less__ = __webpack_require__(398);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__TbScrollLink_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__["staticRenderFns"],
  false,
  null,
  "0ac72494",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('0ac72494')) {
      api.createRecord('0ac72494', component.options)
    } else {
      api.reload('0ac72494', component.options)
    }
    module.hot.accept("./TbScrollLink.vue?vue&type=template&id=0ac72494&scoped=true", function () {
      api.rerender('0ac72494', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/TbScrollLink.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 396 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__ = __webpack_require__(397);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_template_id_0ac72494_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-row gwd-align",
    "class": {
      "gwd-butie": _vm.text.includes("补贴") && _vm.mainColor === "#11a14e"
    },
    staticStyle: { "margin-right": "18px" },
    attrs: {
      title: "点击领取",
      target: "_blank",
      id: "gwd-tb-mini-coupon",
      href: _vm.link
    }
  }, [_vm.showStampBg ? _c("div", { staticClass: "gwd-coupon-color-bg gwd-tl" }) : _vm._e(), _vm._v(" "), _vm.showStampBg ? _c("div", { staticClass: "gwd-coupon-color-bg gwd-br" }) : _vm._e(), _vm._v(" "), _c("img", {
    staticStyle: { height: "20px", "margin-left": "8px", "z-index": "1" },
    attrs: { src: _vm.icon, alt: "" }
  }), _vm._v(" "), _c("span", {
    style: "margin-left: 4px; color: " + _vm.mainColor + "; font-size: 14px; position: relative; top: -2px;",
    domProps: { innerHTML: _vm._s(_vm.text) }
  }), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }, [_vm.rebate ? _c("Stamp", {
    staticStyle: { right: "74px", top: "0", position: "absolute" },
    attrs: { value: _vm.rebate }
  }) : _vm._e()], 1), _vm._v(" "), _c("span", {
    staticClass: "gwd-rnd-btn-click gwd-row gwd-align gwd-jcc",
    style: "z-index: 1; background: linear-gradient( 180deg, " + _vm.secondColor + " 0%, " + _vm.mainColor + " 100%);"
  }, [_c("span", {
    staticClass: "gwd-font11",
    staticStyle: {
      "transform-origin": "center center",
      position: "relative",
      top: "-1px"
    }
  }, [_vm._v("点击领取")])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 398 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_style_index_0_id_0ac72494_scoped_true_lang_less__ = __webpack_require__(399);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_style_index_0_id_0ac72494_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TbScrollLink_vue_vue_type_style_index_0_id_0ac72494_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 399 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(400);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("60174afc", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TbScrollLink.vue?vue&type=style&index=0&id=0ac72494&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TbScrollLink.vue?vue&type=style&index=0&id=0ac72494&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "#gwd-tb-mini-coupon[data-v-0ac72494] {\n  height: 40px;\n  text-decoration: none;\n  border: 1px solid #f0f3f5;\n  border-radius: 4px;\n  padding-right: 12px;\n  box-sizing: border-box;\n  margin-bottom: 10px;\n  display: none;\n  position: relative;\n}\n.miniPanel #gwd-tb-mini-coupon[data-v-0ac72494] {\n  display: flex;\n}\n.gwd-rnd-btn-click[data-v-0ac72494] {\n  display: inline-flex;\n  width: 60px;\n  height: 20px;\n  border-radius: 4px;\n  color: white;\n}\n.gwd-coupon-color-bg.gwd-br[data-v-0ac72494] {\n  right: 0;\n}\n", ""]);

// exports


/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime, Vue) {

var _this4 = this;

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var log = __webpack_require__(14);
var store = __webpack_require__(34);
var extConsole = __webpack_require__(6);

var _require = __webpack_require__(123);

var MiniBarCollectionButton = _require['default'];

//嵌入位置设置
var sitePattern = {
  'ymatou': ['.price-panel'],
  'hihonor': ['.product-price'],
  'amazon': ['#price_feature_div', '#unifiedPrice_feature_div'],
  'vmall': ['.product-info .product-info-list', '.pro-right .pro-meta-area', '.pro-price'],
  'yougou': ['#ygprice_area'],
  'gome': ['.prdprice', '#bargain', '.prd-price-1'],
  'vipshop': ['.pi-price-box'],
  '360buy': ['#summary-price', '.summary-price', '#surplus-time', '#product-intro #price'],
  '360buy-book': ['#summary-price'],
  '360buy-re': ['.shop_intro .shop_intro_a'],
  'taobao': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox', '[class^=MiniHead--miniPanelHead--]', {
    selector: '[class^=PurchasePanel--contentWrap--] > [class^=CouponInfo--couponInfo]',
    position: 'after'
  }, {
    selector: '[class^=Price--root]',
    position: 'after'
  }, '[class^=SecurityPrice--securityPrice]', {
    selector: '[class^=MiniHead--miniPanelHead--]',
    position: 'after'
  }, {
    selector: '[class^=Address--MCDelivery--]',
    position: 'before'
  }],
  'taobao-ju': ['.J_BuySubForm', '[class^=MiniHead--miniPanelHead--]'],
  'taobao-95095': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox', '[class^=MiniHead--miniPanelHead--]'],
  'tmall': ['.tm-fcs-panel', '#J_PromoPrice', '#J_StrPriceModBox', '[class^=MiniHead--miniPanelHead--]',
  // {
  //   selector: '[class^=CouponInfo--couponInfo]',
  //   position: 'before'
  // },
  {
    selector: '[class^=PurchasePanel--contentWrap--] > [class^=CouponInfo--couponInfo]',
    position: 'after'
  }, {
    selector: '[class^=Price--root]',
    position: 'after'
  }, '[class^=SecurityPrice--securityPrice]', {
    selector: '[class^=MiniHead--miniPanelHead--]',
    position: 'after'
  }, {
    selector: '[class^=Address--MCDelivery--]',
    position: 'before'
  }],
  '51buy': ['.xbase_item:contains("促销价")', '.xbase_item:contains("易迅价")', '#goods_detail_mate .item_icson', '.xbase_row2', '#promotePrice', '#shopprice', '#promotePriceArea'],
  'suning': ['#noPrice', '#_main_price', '#existPrice', '#netPriceBox', '#hasPrice', '#mainPrice', '#priceDom'],
  'dangdang': ['.price_time', '.d15_price_info', '.price_qiang', '.price_info', '.show_info .sale>p', '.sale_box:first'],
  'yihaodian': ['#point_productPrice', '.price_array', '#currentPriceArea'],
  'vancl': ['#pricearea .cuxiaoPrice'],
  'newegg': ['.neweggPrice', '.goods_price_now'],
  'kaola': ['.m-price-wrap .m-price'],
  'lenovo': ['#div_product_dec', '#span_product_name'],
  'microsoftstore': ['.priceAndRank'],
  'bookuu': ['.bc-e5.pd-15'],
  'xiaomi': ['.J_saleWrap.sale-wrap', '.pro-time.J_proSeckill', '.goods-info-head-price', '.pro-time.J_proOrder', '.price-info'],
  "youpin-mi": [".sku-container .price-line"],
  'okbuy': ['.prodPriceLiJ .prodPrice'],
  'banggo': ['.mbshop_detail_baseinfo'],
  'you163': ['.price>.f-clearfix'],
  'colipu': ['.product-price'],
  'nbdeli': ['#pomotion_befor'],
  '3c2p': ['#goodsPrice'],
  'comix': ['.price-panel']
};

var getContainer = function getContainer() {
  var site = G.site;
  var patterns = sitePattern[site];
  if (!patterns || patterns && patterns.length === 0) return false;
  for (var i = 0; i < patterns.length; i++) {
    var selector = patterns[i].selector || patterns[i];
    var position = patterns[i].position || 'after';
    if ($(selector).length > 0) {
      return {
        selector: selector,
        position: position
      };
    }
  }
  return false;
};
var renderMiniBar = function renderMiniBar(container) {
  __webpack_require__(6).log('render minibar begin', G.instanceId);
  var newTime = __webpack_require__(408).getNewTime();
  if (newTime - new Date().getTime() < 300000) {
    newTime = false;
  }
  var href = encodeURIComponent(document.location.href);
  var html = __webpack_require__(431);
  var setUrl = G.server + '/brwext/setting?from=' + G.from_device;
  var feedbackUrl = 'https://www.' + G.extName + '.com/brwext/suggest?refer=' + href + '&from_device=' + G.from_device;
  var priceContainer = html({
    'setUrl': setUrl,
    'aliSite': G.aliSite,
    'feedbackUrl': feedbackUrl,
    newTime: false,
    minidom: G.wishdom2,
    wishdom: G.wishdom
  });
  // if (location.host === 'goods.kaola.com.hk') {
  //   let dom = `<div id="kaolaHkRepair" style="display:none;"><span></span></div>`
  //   $('body').append($(dom))
  //   let newContainer = container;
  //   container = '#kaolaHkRepair>span'
  //   kaolaHkRepair(newContainer)
  // }

  if (container.position === 'append') {
    $(container.selector).append(priceContainer);
  } else if (container.position === 'before') {
    $(container.selector).eq(0).before(priceContainer);
  } else {
    $(container.selector).eq(0).after(priceContainer);
  }
  __webpack_require__(6).log('render minibar end', G.instanceId);
};
var times = 0;
var kaolaHkRepair = function kaolaHkRepair(dom) {
  if (times >= 10) {
    return;
  }
  times++;
  if ($('.m-price-wrap .m-price .currentPrice').text().match(/\d/)) {
    $(dom).eq(0).after($('#kaolaHkRepair>span').next());
    $('#kaolaHkRepair').remove();
    return;
  }
  setTimeout(function () {
    kaolaHkRepair(dom);
  }, 1000);
};

var parsePrice = function parsePrice(price) {
  if (parseInt(price) > 999999) {
    return parseInt(price);
  } else {
    return price;
  }
};
var addEvent = function addEvent() {
  $('.gwd-minibar-bg').on('mouseenter', '.minibar-tab', function () {
    $('#gwd_minibar').addClass('ms_enter');
    $(this).addClass('ms-tab-enter');
    var id = $(this).attr('id');
    $('#' + id + '_detail').show();
    if (id === "mini_price_history") {
      log("minitrend-show");
      __webpack_require__(129).calLineHeight();
    }
  });
  $('.gwd-minibar-bg').on('mouseleave', '.minibar-tab', function () {
    $('#gwd_minibar').removeClass('ms_enter');
    $(this).removeClass('ms-tab-enter');
    $(this).removeClass('ms-tab-enter');
    var id = $(this).attr('id');
    $('body').removeClass('gwd-trend-hover-p');
    $('#' + id + '_detail').hide();
  });

  $('#gwd_website_icon').on('click', function (e) {
    e.preventDefault();
    __webpack_require__(11).openTab();
  });
};
module.exports.renderMiniCom = function (data) {
  var nowprice = undefined;
  try {
    nowprice = userData.get('other_info')['code-server'].price;
  } catch (e) {
    nowprice = G.dp.price;
  }
  if (!nowprice) nowprice = G.dp.price;
  if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    return;
  }
  var store = undefined;
  if (!data.b2c || data.b2c.length === 0) {
    store = [];
  } else {
    store = data.b2c.store;
  }
  var newData = [];
  var storeSize = store.length;
  //这几个网站做了新的图标
  var new_icon_site_ids = [1, 103, 108, 123, 124, 126, 129, 134, 136, 14, 141, 15, 167, 168, 19, 2, 21, 25, 26, 28, 3, 31, 34, 35, 41, 6, 66, 7, 86, 93, 9];
  for (var i = 0; i < store.length && i < 6; i++) {
    var product = store[i].product && store[i].product[0] || store[i];
    var dp_id = product.dp_id || '';
    var site_id = product.site_id;
    if (parseInt(site_id) === 3003) {
      site_id = 3;
    }
    var icon_format = new_icon_site_ids.indexOf(Number(site_id)) > -1 ? '.png' : '.ico';
    if (!site_id) continue;
    product.price = parsePrice(product.price.replace(/,/g, ""));
    product.icourl = G.s_server + '/images/favicon/' + site_id + icon_format;
    newData.push(product);
  }
  var tle = '其他' + storeSize + '家报价';
  var bclass = '';
  if (newData.length === 0) {
    tle = '暂无商城比价';
    bclass = 'no-com-info';
  } else if (newData[0].price < Number(nowprice)) {
    tle = '<em>更低价:</em><em class="prifontf price-em">' + newData[0].price + '</em>';
  }

  var t = '<div class="minibar-btn-box">\n        <em class="setting-bg mini-compare-icon "></em>\n        <span >' + tle + '</span>\n      </div>';
  $('#gwd_mini_compare').append($(t)).css("display", "block").addClass(bclass);
  if (newData.length > 0) {
    var html = __webpack_require__(433);
    var allLink = G.c_server + '/dp' + data.dp.dp_id;
    var obj = {
      data: newData,
      allLink: allLink,
      storeSize: storeSize
    };
    $('#gwd_mini_compare').append(html(obj));
    userData.set('minicom', obj);
    // if ($('#mini_price_history_detail').length > 0) {
    //   renderTrendCompare(newData, storeSize, allLink)
    // } else {
    //   setTimeout(function() {
    //     renderTrendCompare(newData, storeSize, allLink)
    //   }, 400)
    // }
  } else {
      $('#gwd_mini_compare').off();
    }
};
var renderTrendCompare = function renderTrendCompare(data, storeSize, allLink) {
  if (G.promoTrendRendered) {
    return;
  }
  var html = __webpack_require__(434);

  $('.app-tuiguang').remove();
  $('#mini_price_history').removeClass('showapp');

  $('#mini_price_history_detail').append(html({
    data: data,
    allLink: allLink,
    storeSize: storeSize
  }));
};

function recoverMiniBar() {
  var globalConfig, recoverConfig, i, selector, position, target;
  return regeneratorRuntime.async(function recoverMiniBar$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!$('.miniPanel').length) {
          context$1$0.next = 3;
          break;
        }

        if ($('#gwd-tb-mini-coupon').length) {
          $('#gwd-tb-mini-coupon').insertAfter($('[class^=miniPanelHead--]'));
        }
        return context$1$0.abrupt('return');

      case 3:
        context$1$0.next = 5;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 5:
        globalConfig = context$1$0.sent;

        if (!(globalConfig && globalConfig.gwdMiniBarRecoverConfig)) {
          context$1$0.next = 19;
          break;
        }

        recoverConfig = globalConfig.gwdMiniBarRecoverConfig.aliSite;
        i = 0;

      case 9:
        if (!(i < recoverConfig.length)) {
          context$1$0.next = 19;
          break;
        }

        selector = recoverConfig[i].selector;
        position = recoverConfig[i].position;
        target = $(selector);

        if (!target.length) {
          context$1$0.next = 16;
          break;
        }

        if (position === 'before') {
          $('.gwd-minibar-bg').insertBefore(target);
        } else {
          $('.gwd-minibar-bg').insertAfter(target);
        }
        return context$1$0.abrupt('return');

      case 16:
        i++;
        context$1$0.next = 9;
        break;

      case 19:
      case 'end':
        return context$1$0.stop();
    }
  }, null, this);
}

module.exports.recoverMiniBar = recoverMiniBar;

module.exports.init = function () {
  __webpack_require__(6).log('minibar init');
  // 获取配置信息， 看是否需要展示中间部分
  var permanent = userData.get('permanent');
  // if (G.forbidMinibar) return;
  if (permanent.setWishlist === '0' || permanent.setWishlist === 0) return;
  if (G.site == 'amazon' || G.site == '6pm') {
    __webpack_require__(435).init();
    return;
  }
  renderCon();
};
var renderDom = undefined;

var delaySite = ['kaola'];

var renderCon = function renderCon() {
  var instanceId, globalConfig, container, store, el;
  return regeneratorRuntime.async(function renderCon$(context$1$0) {
    var _this3 = this;

    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        instanceId = G.instanceId;

        if (!(delaySite.indexOf(G.site) > -1)) {
          context$1$0.next = 4;
          break;
        }

        context$1$0.next = 4;
        return regeneratorRuntime.awrap(__webpack_require__(10).sleep(5000));

      case 4:
        context$1$0.next = 6;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 6:
        globalConfig = context$1$0.sent;

        if (!G.aliSite) {
          context$1$0.next = 10;
          break;
        }

        context$1$0.next = 10;
        return regeneratorRuntime.awrap((function callee$1$0() {
          var getPanel, panel;
          return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
            var _this2 = this;

            while (1) switch (context$2$0.prev = context$2$0.next) {
              case 0:
                getPanel = function getPanel() {
                  return globalConfig.aliMobileNotifierConfig.map(function (i) {
                    return i.panel;
                  }).find(function (item) {
                    if ($(item).length) {
                      return $(item)[0];
                    }
                    return false;
                  });
                };

                extConsole.log('waiting for panel');
                context$2$0.next = 4;
                return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                  return getPanel();
                }));

              case 4:
                extConsole.log('panel ready');
                panel = getPanel();

                if (panel) {
                  __webpack_require__(40).observe(panel, function callee$2$0(mutations) {
                    return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                      var _this = this;

                      while (1) switch (context$3$0.prev = context$3$0.next) {
                        case 0:
                          extConsole.log('mutations:', mutations);

                          if (!(globalConfig && globalConfig.gwdMiniBarRecoverConfig)) {
                            context$3$0.next = 6;
                            break;
                          }

                          context$3$0.next = 4;
                          return regeneratorRuntime.awrap((function callee$3$0() {
                            var config;
                            return regeneratorRuntime.async(function callee$3$0$(context$4$0) {
                              while (1) switch (context$4$0.prev = context$4$0.next) {
                                case 0:
                                  config = globalConfig.gwdMiniBarRecoverConfig.aliSite;
                                  context$4$0.next = 3;
                                  return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                                    for (var i = 0; i < config.length; i++) {
                                      var selector = config[i].selector;
                                      if ($(selector).length) {
                                        return true;
                                      }
                                    }
                                    return false;
                                  }));

                                case 3:
                                case 'end':
                                  return context$4$0.stop();
                              }
                            }, null, _this);
                          })());

                        case 4:
                          context$3$0.next = 8;
                          break;

                        case 6:
                          context$3$0.next = 8;
                          return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                            return $('[class^=ActiveInfo--root--]').length || $('[class^=CouponInfo--couponInfo]').length || $('[class^=Price--root]').length;
                          }));

                        case 8:
                          // 仅在panel的class发生变化时重新渲染minibar
                          recoverMiniBar();

                        case 9:
                        case 'end':
                          return context$3$0.stop();
                      }
                    }, null, _this2);
                  }, {
                    attributes: true,
                    attributeFilter: ['class']
                  });
                }

              case 7:
              case 'end':
                return context$2$0.stop();
            }
          }, null, _this3);
        })());

      case 10:

        if (globalConfig && globalConfig.gwdMiniBarPositions) {
          if (G.aliSite) {
            sitePattern['taobao'] = globalConfig.gwdMiniBarPositions.aliSite;
            sitePattern['tmall'] = globalConfig.gwdMiniBarPositions.aliSite;
          } else {
            if (globalConfig.gwdMiniBarPositions[G.site]) {
              sitePattern[G.site] = globalConfig.gwdMiniBarPositions[G.site];
            }
          }
        }

        container = getContainer();

        __webpack_require__(6).log('container:', container);
        context$1$0.next = 15;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          if (container) return true;
          container = getContainer();
          return false;
        }));

      case 15:
        if (!(window.gwd_G && window.gwd_G.instanceId !== instanceId)) {
          context$1$0.next = 18;
          break;
        }

        __webpack_require__(6).warn('instanceId不一致，不渲染minibar');
        return context$1$0.abrupt('return');

      case 18:
        renderMiniBar(container);

        store = __webpack_require__(34).getStore();

        new Vue({
          el: '#gwd_mini_remind .minibar-btn-box',
          store: store,
          render: function render(h) {
            return h(MiniBarCollectionButton);
          }
        });
        addEvent();

        el = $('.gwd-minibar-bg')[0];

        G.miniBar = el;
        // 网页可能会移除minibar，
        if (el) {
          __webpack_require__(40).observe(el, function (mutations) {
            mutations.forEach(function (mutation) {
              if (mutation.removedNodes.length) {
                __webpack_require__(6).log('minibar被移除');
                if (G.instanceId === $('html').attr('data-gwd-id')) {
                  recoverMiniBar();
                }
              }
            });
          });
        }

      case 25:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this4);
};

// 确保.gwd-minibar-bg在.ActiveInfo上方

// 获取页面上的插入节点

// const panel = $('#purchasePanel')[0]
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5), __webpack_require__(17)["default"]))

/***/ }),
/* 402 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__ = __webpack_require__(403);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_template_id_1e4a0206_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "minibar-btn-box gwd-row gwd-align gwd-jcc",
    staticStyle: { display: "inline-flex" }
  }, [_c("em", {
    staticClass: "gwd-favor-icon",
    "class": { "gwd-favored": _vm.checked }
  }), _vm._v(" "), _c("span", [_vm._v(_vm._s(_vm.checked ? "已添加提醒" : "降价提醒"))])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 404 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_style_index_0_id_1e4a0206_scoped_true_lang_less__ = __webpack_require__(405);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_style_index_0_id_1e4a0206_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniBarCollectionButton_vue_vue_type_style_index_0_id_1e4a0206_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(406);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("76aa0b76", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniBarCollectionButton.vue?vue&type=style&index=0&id=1e4a0206&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniBarCollectionButton.vue?vue&type=style&index=0&id=1e4a0206&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-favor-icon[data-v-1e4a0206] {\n  display: inline-block;\n  width: 24px;\n  height: 24px;\n  background: url(" + __webpack_require__(407) + ") no-repeat;\n}\n.gwd-favor-icon.gwd-favored[data-v-1e4a0206] {\n  background: url(" + __webpack_require__(126) + ") no-repeat;\n}\n.ms-tab-enter .gwd-favor-icon[data-v-1e4a0206] {\n  background: url(" + __webpack_require__(126) + ") no-repeat;\n}\n", ""]);

// exports


/***/ }),
/* 407 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Imljb24vc3RhciI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik0xMS40OTk1IDVMOS4yMDcxIDkuNTk3MDFMNCAxMC4zMzg4TDcuNzcyMDkgMTMuOTYxOUw2Ljg3MDQgMTlMMTEuNDk5NSAxNi41NzU1TDE2LjEyOTUgMTlMMTUuMjM0NSAxMy45NjE5TDE5IDEwLjMzODhMMTMuODIxNyA5LjU5NzAxTDExLjQ5OTUgNVoiIHN0cm9rZT0iI0ZGNjEzMiIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L3N2Zz4K"

/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, $, G, Vue) {

var _this = this;

var timeUtil = __webpack_require__(409);
var template = __webpack_require__(13);
var price_remind = __webpack_require__(50);
var request = __webpack_require__(3);
var userData = __webpack_require__(15);
var log = __webpack_require__(14);
var cnzz = __webpack_require__(12);
var globalTime = undefined,
    retry = 0;
var hasGetTime = undefined;

Date.prototype.format = function (fmt) {
  var o = {
    "M+": this.getMonth() + 1, //月份
    "d+": this.getDate(), //日
    "h+": this.getHours(), //小时
    "m+": this.getMinutes(), //分
    "s+": this.getSeconds(), //秒
    "q+": Math.floor((this.getMonth() + 3) / 3), //季度
    "S": this.getMilliseconds() //毫秒
  };
  if (/(y+)/.test(fmt)) {
    fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  }
  for (var k in o) {
    if (new RegExp("(" + k + ")").test(fmt)) {
      fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
    }
  }
  return fmt;
};

// 最接近的半小时时间
// 12:31 -> 12:30
// 12:29 -> 12:30
Date.prototype.toHalfHourTime = function () {
  var original = this.getTime();
  return new Date(Math.round(original / (30 * 60000)) * (30 * 60000));
};

var userInfo = {};

module.exports.init = function callee$0$0() {
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        // let res = await $.ajax({
        //   url: 'https://www.gwdang.com/user/info',
        //   dataType: 'jsonp',
        //   jsonp: 'callback',
        //   xhrFields: {
        //     withCredentials: true
        //   }
        // })
        getSeckill();

      case 1:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var seckillRule = {
  "360buy": [{
    "secDom": "#yuyue-banner",
    "timeType": "t11",
    "secDom2": "#yuyue-banner .activity-type:contains('预约抢购')",
    "secTime": "#yuyue-banner .activity-message .J-time"
  }, {
    "secDom": "#banner-miaosha",
    "timeType": "M月D日H时M分",
    "secDom2": "#banner-miaosha .activity-type:contains('秒杀预告')",
    "secTime": "#banner-miaosha .activity-price strong"
  }, {
    "secDom": "#banner-miaosha",
    "timeType": "t12",
    "secDom2": "#banner-miaosha .activity-type:contains('京东秒杀')",
    "secTime": "#banner-miaosha .activity-message"
  }, {
    "secDom": "#pingou-banner",
    "timeType": "t13",
    "secDom2": "#pingou-banner .activity-type:contains('预售')",
    "secTime": "#pingou-banner .activity-message .J-time"
  }, {
    "secDom": "#banner-shangou .activity-type:contains('京东闪购')",
    //"timeType": "t14",
    "timeType": "t12",
    "secDom2": "#banner-shangou .activity-message:contains('预计')",
    "secTime": "#banner-shangou .activity-message"
  }, {
    // 预售商品，还没开始付定金
    "secDom": "#pingou-banner .activity-message:contains('距预售还需')",
    "timeType": "timeRangeSplitBy`-`",
    "secDom2": "#pingou-process dt:contains('支付定金')",
    "secTime": "#pingou-process .J-presale-time"
  }, {
    // 预售商品，使用尾款时间
    "secDom": "#pingou-process .J-balance-time",
    "timeType": "timeRangeSplitBy`-`",
    "secDom2": "#pingou-process dt:contains('支付尾款')",
    "secTime": "#pingou-process .J-balance-time"
  }, {
    // 预售商品，使用尾款时间
    "secDom": "#yuyue-process .J-step4",
    "timeType": "timeRangeSplitBy`-`",
    "secDom2": "#yuyue-process dt:contains('抢购中')",
    "secTime": "#yuyue-process .J-step4"
  }],
  "taobao-ju": [{
    "secDom": ".buyaction.J_JuSMSRemind",
    "timeType": "t21",
    "secDom2": ".ju-clock.J_juItemTimer>p:contains('开抢')",
    "secTime": ".ju-clock.J_juItemTimer>p"
  }],
  "taobao": [{
    "secDom": "#J_TaoQiangGou",
    "timeType": "t21",
    "secDom2": "#J_TaoQiangGou:contains('开始抢购')",
    "secTime": "#J_TaoQiangGou"
  }],
  "tmall": [{
    "secDom": "#tm-yushou-process-banner",
    "timeType": "t31",
    "secDom2": "#tm-yushou-process-banner .tm-yushou-process-title.tm-ys-title-one-row:contains('天猫预售')",
    "secTime": "#tm-yushou-process-banner .J_step2Time"
  }, {
    "secDom": ".tm-countdown .tb-btn-wait:contains('即将开始')",
    "timeType": "t32",
    "secDom2": ".tm-countdown .tm-countdown-notice:contains('距开售')",
    "secTime": ".tm-countdown .tm-countdown-timer"
  }],
  "suning": [{
    "secDom": "#timePanel",
    "timeType": "t41",
    "secDom2": "#timePanel .djh-title:contains('预定')",
    "secTime": "#timePanel .proinfo-cd"
  }, {
    "secDom": ".snqg-logo",
    "timeType": "M月D日 H时M分",
    "secDom2": ".djh-cd",
    "secTime": "#bigPolyTime"
  }, {
    "secDom": "#buyTime",
    "timeType": "X月X日X时X分X秒",
    "secDom2": ".step-4",
    "secTime": "#buyTime dd:contains('开始')"
  }],
  "xiaomi": [{
    "secDom": ".pro-time.J_proBook",
    "timeType": "t51",
    "secDom2": ".pro-time.J_proBook .pro-time-head:contains('预售')",
    "secTime": ".pro-time.J_proBook .time.J_bookTime"
  }],
  "kaola": [{
    "secDom": ".m-promotionbar",
    "timeType": "t61",
    "secDom2": ".m-promotionbar .prelimit .txt:contains('开抢')",
    "secTime": ".m-promotionbar .prelimit .txt"
  }],
  "dangdang": [{
    "secDom": "#count-down",
    "timeType": "t71",
    "secDom2": "#count-down .J-time-text:contains('尚未开始')",
    "secTime": "#count-down .J-time"
  }],
  "vmall": [{
    "secDom": "#buyProcessIDD",
    "timeType": "t81",
    "secDom2": "#buyProcessIDD ul li:first-child:contains('支付订金')",
    "secTime": "#startDateIDD"
  }]
};

var getSeckillTime = function getSeckillTime(type, ori_str) {
  if (ori_str.length < 3) {
    return false;
  }
  var str = undefined;
  if (type !== "t81") {
    str = ori_str.replace(/\s/g, "");
  } else {
    str = ori_str;
  }
  var arr = undefined,
      newtime = undefined;
  var nowTime = undefined;
  var month = undefined,
      d = undefined,
      h = undefined,
      m = undefined,
      ss = undefined,
      ms = undefined;
  var year = new Date().getFullYear();
  switch (type) {
    case "X月X日X时X分X秒":
      arr = ori_str.match(/开始：(\d+)月(\d+)日(\d+)时(\d+)分(\d+)秒/);
      if (!arr) return false;
      nowTime = new Date();
      newtime = nowTime.getFullYear() + '/' + arr[1] + '/' + arr[2] + '/' + arr[3] + ':' + arr[4];
      break;
    case 'M月D日 H时M分':
      arr = ori_str.match(/(\d+)月(\d+)日 (\d+):(\d+)/);

      if (!arr) return false;
      nowTime = new Date();
      newtime = nowTime.getFullYear() + '/' + arr[1] + '/' + arr[2] + '/' + arr[3] + ':' + arr[4];
      break;
    case 'M月D日H时M分':
      arr = ori_str.match(/(\d+)月(\d+)日(\d+):(\d+)/);

      if (!arr) return false;
      nowTime = new Date();
      newtime = nowTime.getFullYear() + '/' + arr[1] + '/' + arr[2] + '/' + arr[3] + ':' + arr[4];
      break;
    case "timeRangeSplitBy`-`":
      // eg: 2019-07-0300:00-2019-07-0700:00
      var date = ori_str.split(' ')[0].replace(/-/g, '/');
      newtime = date + '/' + ori_str.split(' ')[1].split('-')[0];
      break;
    case "t11":
      nowTime = new Date().getTime();
      arr = str.match(/(?:(\d+)|)(?:天|日|)(\d+)小时(\d+)分(\d+)秒/);
      if (!arr) return false;
      if ($('#yuyue-banner .activity-message .J-text').text() === '抢购剩余') {
        return false;
      }
      if ($('#pingou-banner .activity-message .J-text').text() === '距预售还需') {
        return false;
      }
      d = arr[1] || 0;
      h = arr[2] || 0;
      m = arr[3] || 0;
      ss = arr[4] || 0;
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000 + ss * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t12":
      nowTime = new Date().getTime();
      arr = str.match(/预计([0-9:月日]+)开始/);
      if (!arr) return false;
      var htime = arr[1];
      newtime = timeUtil(nowTime, "5");
      if (htime.indexOf('日') > -1) {
        var _month = htime.split('月')[0];
        var day = htime.split('日')[0].split('月')[1];
        newtime = newtime.split('/')[0] + ('/' + _month + '/' + day);
        htime = htime.split('日')[1];
      }
      newtime = newtime + '/' + htime;
      break;
    case "t13":
      nowTime = new Date().getTime();
      arr = str.match(/(?:(\d+)|)(?:天|日|)(\d+)小?时(\d+)分(\d+)秒/);
      if (!arr) return false;
      if ($('.activity-message .J-text').text() === '预售剩余') {
        return false;
      }
      d = arr[1] || 0;
      h = arr[2] || 0;
      m = arr[3] || 0;
      ss = arr[4] || 0;
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000 + ss * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t14":
      arr = str.match(/(\d+)月(\d+)日(\d+)\:(\d+)/);
      if (!arr) return false;
      month = Number(arr[1]) || 0;
      if (month < 10) month = "0" + month.toString();
      d = Number(arr[2]) || 0;
      if (d < 10) d = "0" + d.toString();
      h = arr[3] || 0;
      m = arr[4] || 0;
      // ms = month + d * 86400000 + h * 3600 * 1000 + m * 60 * 1000;
      newtime = year + '/' + month + '/' + d + '/' + h + ':' + m;
      break;
    case "t21":
      arr = str.match(/(\d+)月(\d+)日(\d+)\:(\d+)/);
      if (!arr) return false;
      month = Number(arr[1]) || 0;
      if (month < 10) month = "0" + month.toString();
      d = Number(arr[2]) || 0;
      if (d < 10) d = "0" + d.toString();
      h = arr[3] || 0;
      m = arr[4] || 0;
      // ms = month + d * 86400000 + h * 3600 * 1000 + m * 60 * 1000;
      newtime = year + '/' + month + '/' + d + '/' + h + ':' + m;
      break;
    case "t31":
      arr = ori_str.split("~");
      if (!arr) return false;
      newtime = arr[0].replace(/(?:\.|\s)/g, "/");
      break;
    case "t32":
      nowTime = new Date().getTime();
      arr = str.match(/(?:(\d+)|)(?:天|日|)(\d+)小?时(\d+)分/);
      if (arr && arr.length) {
        d = Number(arr[1]) || 0;
        if (d < 10) d = "0" + d.toString();
        h = arr[2] || 0;
        m = arr[3] || 0;
      } else {
        arr = str.match(/(\d+)分(\d+)秒/);
        d = 0;
        h = 0;
        m = arr[1];
      }
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t41":
      //苏宁
      nowTime = new Date().getTime();
      arr = str.match(/(?:(\d+)|)(?:天|日|)(\d+)小?时(\d+)分([0-9.]+)秒/);
      if (!arr) return false;
      d = parseInt(arr[1]) || 0;
      h = parseInt(arr[2]) || 0;
      m = parseInt(arr[3]) || 0;
      ss = parseInt(arr[4]) || 0;
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000 + ss * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t51":
      nowTime = new Date().getTime();
      arr = str.match(/\s?(?:(\d+)|)\s?(?:天|日|)\s?(\d+)\s?小?时\s?(\d+)\s?分\s?(\d+)\s?秒/);
      if (!arr) return false;
      d = arr[1] || 0;
      h = arr[2] || 0;
      m = arr[3] || 0;
      ss = arr[4] || 0;
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000 + ss * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t61":
      //kaola
      arr = str.match(/(\d+)月(\d+)日(\d+)\:(\d+)/);
      if (!arr) return false;
      month = Number(arr[1]) || 0;
      if (month < 10) month = "0" + month.toString();
      d = Number(arr[2]) || 0;
      if (d < 10) d = "0" + d.toString();
      h = arr[3] || 0;
      m = arr[4] || 0;
      // ms = month + d * 86400000 + h * 3600 * 1000 + m * 60 * 1000;
      newtime = year + '/' + month + '/' + d + '/' + h + ':' + m;
      break;
    case "t71":
      //dangdang
      nowTime = new Date().getTime();
      arr = str.match(/(?:(\d+)(?:天|日)|)(\d+)时(\d+)分(\d+)秒/);
      if (!arr) return;
      d = arr[1] || 0;
      h = arr[2] || 0;
      m = arr[3] || 0;
      ss = arr[4] || 0;
      ms = d * 86400000 + h * 3600 * 1000 + m * 60 * 1000 + ss * 1000;
      newtime = timeUtil(nowTime + ms, "6");
      break;
    case "t81":
      arr = str.split("~");
      if (!arr) return;
      newtime = arr[1].trim();
      newtime = newtime.replace(/[\s\.]/g, "/");
      break;
  }
  return newtime;
};

var getSeckill = function getSeckill() {
  var seckillItem = seckillRule[G.site];
  if (!seckillItem) return;
  for (var i = 0; i < seckillItem.length; i++) {
    var sitem = seckillItem[i];
    if ($(sitem["secDom"]).length > 0 && $(sitem["secDom2"]).length > 0) {
      var newtime = getSeckillTime(sitem["timeType"], $(sitem["secTime"]).text());
      if (newtime) {
        globalTime = newtime;
        //console.log('newtime:', newtime)
        var strTime = newtime.split('/');
        var d = new Date(strTime[0] + '/' + strTime[1] + '/' + strTime[2] + ' ' + strTime[3]);
        if (d.getTime() - new Date().getTime() < 300000) {
          continue;
        }
        renderSeckill();
        break;
      }
    }
  }
  if (!globalTime && retry < 5) {
    retry++;
    setTimeout(getSeckill, 500);
  }
};

var needLog = false;

var renderSeckill = function renderSeckill() {
  var res, html, CommonLogin, dp_query, currentStatus;
  return regeneratorRuntime.async(function renderSeckill$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(request.get('https://www.gwdang.com/user/info'));

      case 2:
        res = context$1$0.sent;

        userInfo = res.data;
        html = __webpack_require__(430);

        $('#gwd_mini_remind').remove();
        $('#gwd_mini_compare').after(html);
        CommonLogin = __webpack_require__(52)['default'];

        new Vue({
          el: '#gwd-bjd-login-box',
          render: function render(h) {
            return h(CommonLogin, {
              props: {
                position: 'gwd-mini',
                showAlterLogin: true,
                alterLoginPosition: 'row'
              }
            });
          }
        });

        // 获取当前提醒状态
        dp_query = userData.get('dp_query');
        context$1$0.next = 12;
        return regeneratorRuntime.awrap(request.get(G.c_server + '/brwext/remind_intime?opt=get&id=' + dp_query.dp.dp_id));

      case 12:
        currentStatus = context$1$0.sent;

        addEvent();
        if (currentStatus.msg === "未收藏" || currentStatus.msg === "用户未登录") {
          log('detected:seckillRemind');
          cnzz.log('抢购提醒', '监测到页面抢购');
          needLog = true;
          SeckillSetState(false);
        } else {
          SeckillSetState(true);
        }

      case 15:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var secKillState = undefined;

var SeckillSetState = function SeckillSetState(state) {
  secKillState = state;
  if (state) {
    $('.sk-remind-btn').hide();
    if (userInfo.wx == "1") {
      $('.sk-remind-state1').show();
    } else {
      $('.sk-remind-state1').hide();
    }
    $('#gwd_mini_seckill').addClass('seckillSet');
    $('#gwd_mini_seckill .minibar-btn-box>span').text("已设抢购提醒");
    if (needLog) {}
  } else {
    //$('.sk-remind-btn').hide()
  }
};

var socketSet = false;

var showedOnce = false; // 抢购提醒是否展示过一次

var addEvent = function addEvent() {
  price_remind.getQRcode();
  window.refQRCode = price_remind.getQRcode;
  $('#gwd_mini_seckill').on('mouseenter', function () {
    if (G.email) {
      $('.seckill-detail').show();
      $('.seckill-detail').css('width', '205px');
      if (!socketSet && userInfo.wx == "0") {
        // 未绑定微信的情况，不显示提醒按钮
        // 同时打开websocket
        log('notBind:seckillRemind');
        cnzz.log('抢购提醒', '未绑定');
        $('.sk-remind-state0').show();
        if (!secKillState) {
          $('.sk-remind-state1').hide();
        }
        $('.sk-remind-btn').hide();
        renderWebsocket();
      }
      if (needLog) {
        if ($('.sk-remind-btn').css('display') !== 'none') {
          if (!showedOnce) {
            log('showButton:seckillRemind');
            cnzz.log('抢购提醒', '显示设置提醒按钮');
          }
        }
      }
      showedOnce = true;
    } else {
      $('.login-detail').show();
    }
  });
  $('#gwd_mini_seckill').on('mouseleave', function () {
    $('.seckill-common-detail').hide();
  });

  $('.sk-remind-btn').on('click', function callee$1$0() {
    var dp, time, title, res;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          log('click:seckillRemind');
          cnzz.log('抢购提醒', '设置按钮点击');
          dp = userData.get('dp_query');
          time = new Date(globalTime).toHalfHourTime().format("yyyy-MM-dd hh:mm:ss");
          title = G.dp.name.replace(' ', '');
          context$2$0.next = 7;
          return regeneratorRuntime.awrap(request.get(G.c_server + '/brwext/remind_intime?opt=add&id=' + dp.dp.dp_id + '&title=' + encodeURIComponent(title) + '&stime=' + time + '&url=' + encodeURIComponent(location.href)));

        case 7:
          res = context$2$0.sent;

          if (res.code === 1 || res.msg === '重复收藏') {
            if (res.code === 1) {
              log('setComplete:seckillRemind');
              cnzz.log('抢购提醒', '设置成功');
            }
            SeckillSetState(true);
          }

        case 9:
        case 'end':
          return context$2$0.stop();
      }
    }, null, _this);
  });

  //price_remind.init()
  $('#loginClickBtn').on('click', function () {
    var userN = $('.bjd-login-box .username').val();
    var psd = $('.bjd-login-box .password').val();
    if (userN && psd) {
      price_remind.loginRenderTop();
      __webpack_require__(51).userLogin(userN, psd, function () {
        location.reload();
      });
    } else {
      $('#login_remind_tle').css('display', 'block').fadeOut(5000);
      return;
    }
  });
};

var heartInterval = 0;

var renderWebsocket = function renderWebsocket() {
  // $.ajax({
  //     url: 'https://www.gwdang.com/user/info',
  //     xhrFields: {
  //       withCredentials: true
  //     },
  //     //crossDomain: true
  //   })
  var socket = new WebSocket("wss://www.gwdang.com/sck");
  socket.onopen = function () {};
  socket.onmessage = function (evt) {
    var res = JSON.parse(evt.data);
    if (res.msg == "Bind") {
      userInfo.wx = "1";
      $('.sk-remind-state0').hide();
      if (secKillState) {
        $('.sk-remind-state1').show();
      } else {
        $('.sk-remind-btn').show();
      }
      if (needLog) {
        cnzz.log('抢购提醒', '用户已绑定');
        log('userBindComplete:seckillRemind');
      }
      window.clearInterval(heartInterval);
      socket.close();
    }
  };
  socket.onclose = function () {};
  socket.addEventListener('open', function callee$1$0(evt) {
    var accountInfo;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          socketSet = true;
          accountInfo = {
            action: 'bindWechatExt',
            msg: {
              uid: userInfo.uid
            }
          };

          socket.send(JSON.stringify(accountInfo));

          heartInterval = setInterval(function () {
            socket.send('{"ping": "pong"}');
          }, 10000);

        case 4:
        case 'end':
          return context$2$0.stop();
      }
    }, null, this);
  });
};

module.exports.getNewTime = function () {
  hasGetTime = true;
  return globalTime;
};

//return
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(1), __webpack_require__(0), __webpack_require__(17)["default"]))

/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function (time, type) {
  // 1: xxxx-xx-xx 2.xx-xx 3.xx.xx 4. xxxx.xx.xx
  var dateObj = new Date(time);
  var y = dateObj.getFullYear();
  var m = dateObj.getMonth() + 1;
  var d = dateObj.getDate();
  var h = dateObj.getHours();
  var mi = dateObj.getMinutes();
  var ss = dateObj.getSeconds();

  if (m < 10) m = '0' + m;
  if (d < 10) d = '0' + d;
  if (ss < 10) ss = '0' + ss;
  if (mi < 10) mi = '0' + mi;
  if (h < 10) h = '0' + h;
  var str = '';
  switch (type) {
    case "1":
      str = y + '-' + m + '-' + d;
      break;
    case "2":
      str = m + '-' + d;
      break;
    case "3":
      str = m + '.' + d;
      break;
    case "4":
      str = y + '.' + m + '.' + d;
      break;
    case "5":
      str = y + '/' + m + '/' + d;
      break;
    case "6":
      str = y + '/' + m + '/' + d + '/' + h + ':' + mi + ':' + ss;
      break;
    case "7":
      str = y + '-' + m + '-' + d + ' ' + h + ':' + mi + ':' + ss;
      break;
    default:
      str = '(' + y + '.' + m + '.' + d + ')';
  }
  return str;
};

var offset = 0 * 3600000;

module.exports.isSameDay = function (a, b) {
  var aTime = new Date(a + offset);
  var bTime = new Date(b + offset);
  return aTime.toLocaleDateString() === bTime.toLocaleDateString();
};

module.exports.localeDateString = function (x) {
  return new Date(x + offset).toLocaleDateString();
};

/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', choosed = $data.choosed, $escape = $imports.$escape, money = $data.money, lastprice = $data.lastprice, price_range = $data.price_range, notify_site = $data.notify_site, islogin = $data.islogin, allprice = $data.allprice, riyuan = $data.riyuan, nowprice = $data.nowprice, imgHost = $data.imgHost;
    $$out += '<div id="favor_box" ';
    if (choosed) {
        $$out += 'class="favor_choosed" ';
    }
    $$out += '>\n<div class="login-content " style="padding-top: 50px;">\n  <div id="gwd-login-remind"></div>\n</div>\n<div class="bar-jiangjia-re">\n  <div class="price-head">\n    <div class="head-item now-pri-div">\n      <span class="re-strong blkcolor1">当前价格\uFF1A</span>\n      <span class="re-price prifontf">';
    $$out += $escape(money);
    $$out += $escape(lastprice);
    $$out += '</span>\n    </div>\n    <div class="head-item his-pri-div">\n      <span class="re-strong blkcolor1">历史价格\uFF1A</span>\n      <span class="re-price-num blkcolor1 prifontf">';
    $$out += $escape(money);
    $$out += $escape(price_range);
    $$out += '</span>\n    </div>\n  </div>\n  <div class="jj-remind" data-notify-type="';
    $$out += $escape(notify_site);
    $$out += '">\n    <p class="blkcolor1">降价提醒</p>\n    <div class="remind-item remind-item-fst ';
    if (notify_site == '0' && islogin) {
        $$out += 'current-selected';
    }
    $$out += '"\n         style="margin-top: ';
    if (islogin) {
        $$out += '18';
    } else {
        $$out += '9';
    }
    $$out += 'px">\n      <span class="select-item gwd_bg ';
    if (notify_site == '0') {
        $$out += 'selected current-selected';
    }
    $$out += '" data-type="0"></span>\n      <span class="blkcolor3">全网商家低于';
    $$out += $escape(money);
    $$out += '</span>\n      <input type="text" value="';
    $$out += $escape(allprice);
    $$out += '" class="prifontf">\n      <span class="blkcolor3">';
    $$out += $escape(riyuan);
    $$out += '时提醒</span>\n    </div>\n    <div class="remind-item remind-item-snd ';
    if (notify_site == '1' && islogin) {
        $$out += 'current-selected';
    }
    $$out += '"\n         style="margin-top: ';
    if (islogin) {
        $$out += '18';
    } else {
        $$out += '9';
    }
    $$out += 'px">\n      <span class="select-item gwd_bg ';
    if (notify_site == '1') {
        $$out += 'selected current-selected';
    }
    $$out += '" data-type="1"></span>\n      <span class="blkcolor3">当前商家低于';
    $$out += $escape(money);
    $$out += '</span>\n      <input type="text" value="';
    $$out += $escape(nowprice);
    $$out += '" class="prifontf">\n      <span class="blkcolor3">';
    $$out += $escape(riyuan);
    $$out += '时提醒</span>\n    </div>\n  </div>\n  ';
    if (islogin) {
        $$out += '<span class="remindHint" style="position: relative; left: -60px;">提交成功</span>';
    }
    $$out += '\n  ';
    if (islogin) {
        $$out += '<span id="bar_subbtn" class="subbtn" style="margin-top: 31px">提交</span>';
    }
    $$out += '\n  <div id="login-remind" class="';
    if (islogin) {
        $$out += ' logined ';
    }
    $$out += '" data-login="';
    $$out += $escape(islogin);
    $$out += '">\n    <span class="go_login_btn">去登录</span>\n    <p class="blkcolor4">登录账户\uFF0C及时获取商品降价信息提醒</p>\n  </div>\n  <span class="error_remind">请输入正确格式商品价格</span>\n  ';
    if (islogin) {
        $$out += '\n  <div style="clear: both; text-align: center; top: 10px; position: relative">\n    <span class="';
        if (islogin) {
            $$out += ' logined ';
        }
        $$out += ' blkcolor4">为了更好接收降价提醒\uFF0C请您及时<span id="remind_qrcode" style="color: #48befe">扫码绑定微信</span></span>\n    <div id="remind_qrcode_img">\n      <img alt="二维码">\n      <p>购物党比价</p>\n    </div>\n  </div>\n  ';
    }
    $$out += '\n</div>\n<style>\n  .price-trend-btn .remindHint {\n    left: -98px!important;\n  }\n\n  .remind-item {\n    position: relative;\n  }\n\n  .remind-item.current-selected::after{\n    content: \'当前设置\';\n    background: #4fc266;\n    width: 59px;\n    height: 17px;\n    color: white;\n    font-size: 12px;\n    border-radius: 8.5px 8.5px 8.5px 0;\n    position: relative;\n    top: -10px;\n    left: 5px;\n    text-align: center;\n    display: inline-block;\n  }\n\n  #bjd_minifavor_content .remind-item.current-selected::after {\n    left: 0;\n  }\n\n  #favor_box .error_remind {\n    position: absolute;\n    bottom: 108px;\n    font-size: 12px!important;\n    color: #e4393c!important;\n    display: none;\n    width: 100%;\n    float: left;\n    left: 0px;\n    height: 12px;\n    text-align: center;\n    line-height: 12px;\n  }\n  #favor_box.favor_choosed .error_remind {\n    bottom: 77px;\n  }\n  #favor_box .forgetpsd:hover {\n    color: #48befe;\n    text-decoration: none!important;\n  }\n  #favor_box {\n    display: inline-block;\n    /*float: right;*/\n    width: 320px;\n    border-left: 1px solid #edf1f2;\n    height: 100%;\n    position: relative;\n  }\n  .login-content {\n    display: none;\n    height: 268px;\n    width: 320px;\n    border: 1px solid #edf1f2;\n    border-top: none;\n    position: absolute;\n    top: 0px;\n    right: -292px;\n    z-index: 999;\n    background-color: #fff;\n  }\n  .login-content .gwd-login-right {\n    width: 86px;\n    height: 250px;\n  }\n  .login-content .other-login-style {\n    width: 40px;\n    padding: 34px 0;\n    margin-left: 18px;\n  }\n  .login-content .login-left {\n    width: 226px;\n    height: 250px;\n  }\n  .login-content .other-login-style a {\n    margin: 10px 0px;\n  }\n  .login-content .login-input input {\n    width: 148px;\n    margin-left: 23px;\n    margin-top: 22px;\n  }\n  #bjd-notifier .price-trend div.chart {\n    border-right: none!important;\n  }\n  #favor_box .price-head {\n    margin-top: 14px;\n  }\n  #favor_box .head-item {\n    line-height: 14px;\n    height: 14px;\n    width: 100%;\n  }\n  #favor_box .head-item span {\n    float: left;\n  }\n  #favor_box .head-item:after {\n    display: block;\n    content: "";\n    clear: both;\n  }\n  #favor_box .his-pri-div {\n    margin-top: 9px;\n  }\n  #favor_box .login-input div a {\n    font-size: 12px;\n  }\n  #favor_box .login-input div {\n    padding-top: 3px;\n    padding-right: 27px;\n    float: none;\n  }\n  #favor_box a.quick-reg {\n    color: #48befe;\n    font-size: 12px;\n    float: left;\n    margin-top: 8px;\n    margin-left: 90px!important;\n    text-decoration: none!important;\n  }\n  #log_back_btn {\n    position: absolute;\n    top: 10px;\n    left: 10px;\n    display: inline-block;\n    height: 18px;\n    width: 18px;\n    background: url(\'';
    $$out += $escape(imgHost);
    $$out += 'extensions/newbar/login-delete.png\') no-repeat 0px 0px;\n    cursor: pointer;\n  }\n  #loginClickBtnBar {\n    display: block;\n    height: 28px;\n    width: 86px;\n    line-height: 28px;\n    text-align: center;\n    background-color: #48BEFE;\n    color: #fff;\n    border-radius: 15px;\n    margin-left: 72px;\n    cursor: pointer;\n    font-size: 14px;\n    margin-top: 23px;\n  }\n  #loginClickBtnBar:hover {\n    background-color: #18ACFC;\n  }\n  #favor_box .login-input {\n    margin-top: 17px;\n    float: none;\n  }\n\n  #favor_box span.re-strong {\n    font-size: 14px;\n    font-weight: bold;\n    margin-left: 13px;\n  }\n  #favor_box .re-price-num {\n    font-weight: bold;\n    font-size: 14px;\n  }\n  #favor_box span.re-price {\n    font-size: 14px;\n    color: #E4393C;\n    font-weight: bold;\n  }\n  #favor_box .select-item {\n    float: left;\n    height: 16px;\n    width: 16px;\n    background-position: -10px -64px;\n    cursor: pointer;\n    margin-left: 12px;\n    margin-right: 12px;\n    padding: 0;\n  }\n  #favor_box .select-item.selected {\n    background-position: -30px -64px;\n  }\n  #favor_box .jj-remind>p, #favor_box .jj-style>p {\n    margin-left: 13px;\n  }\n  #favor_box .jj-style>p {\n    margin-bottom: 13px;\n    visibility: hidden;\n  }\n  #favor_box .jj-style>p.logined {\n    visibility: visible;\n  }\n  .jj-style .remind-item-snd {\n    margin-top: 11px;\n  }\n  .favor_choosed  .jj-remind {\n    margin-top: 20px;\n    height: 102px;\n  }\n  .favor_choosed .remind-item-fst {\n    margin-top: 30px;\n    margin-bottom: 22px;\n  }\n  #favor_box .remind-item {\n    height: 16px;\n    line-height: 16px;\n  }\n  #favor_box .remind-item *{\n    float: left;\n  }\n  .remind-item-snd {\n    margin-top: 11px;\n  }\n  #favor_box.favor_choosed .jj-remind .jj-remind-logo {\n    top: 16px;\n  }\n  #favor_box.favor_choosed .jj-remind .jj-remind-logo2 {\n    top: 12px;\n  }\n  .favor_choosed span.subbtn {\n    margin-top: 26px;\n    margin-left: 125px;\n  }\n  .jj-style {\n    height: 73px;\n  }\n  .favor_choosed .jj-style {\n    display: none;\n  }\n  #favor_box .jj-remind .jj-remind-logo {\n    top: -4px;\n    width: 125px;\n    left: 113px;\n  }\n  #favor_box .jj-remind .jj-remind-logo2 {\n    position: absolute;\n    display: inline-block;\n    height: 25px;\n    width: 110px;\n    color: #5FC676;\n    line-height: 23px;\n    text-align: center;\n    background-position: -9px -82px;\n    left: 116px;\n    top: -4px;\n    font-size: 12px;\n  }\n  #favor_box .jj-remind .jj-remind-logo2:hover {\n    background-position: -9px -189px;\n    color: #fff;\n  }\n  .remind-item-fst {\n    margin-top: 14px;\n  }\n  #login-remind {\n    position: absolute;\n    background-color: #fff;\n    border: 1px solid #edf1f2;\n    border-bottom: none;\n    height: 104px;\n    width: 319px;\n    bottom: 0px;\n    right: 0px;\n  }\n  #login-remind.logined {\n    display: none;\n  }\n  #login-remind .go_login_btn {\n    width: 74px;\n    height: 26px;\n    line-height: 26px;\n    text-align: center;\n    background-color: #48beff;\n    font-size: 14px;\n    float: left;\n    color: #fff;\n    margin: 18px 0px 0px 124px;\n    border-radius: 100px;\n    cursor: pointer;\n  }\n  #login-remind .go_login_btn:hover {\n    background-color: #18ACFC;\n  }\n  #login-remind p {\n    font-size: 14px;\n    float: left;\n    text-align: center;\n    width: 320px;\n    margin-top: 13px;\n    font-weight: normal;\n  }\n  .login-content .sp-border {\n    background-position: -230px 7px;\n    width: 20px;\n  }\n  /*#edit_remind_style, #remind_qrcode{*/\n  /*  display: none;*/\n  /*}*/\n  .favor_choosed #edit_remind_style {\n    display: inline-block;\n  }\n  #remind_qrcode.logined{\n    display: inline-block;\n  }\n  #edit_remind_style {\n    position: absolute;\n    bottom: 14px;\n    left: 14px;\n    font-size: 12px;\n    cursor: pointer;\n  }\n  #favor_box #edit_remind_style:hover, #favor_box #remind_qrcode:hover {\n    color: #48beff;\n  }\n  #remind_qrcode {\n    /*position: absolute;*/\n    /*bottom: 14px;*/\n    /*right: 14px;*/\n    font-size: 12px;\n    cursor: pointer;\n    -moz-user-select: -moz-none;\n    -khtml-user-select: none;\n    -webkit-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n  }\n  .favor_choosed #remind_qrcode {\n    bottom: 14px;\n    right: 14px;\n    z-index: 99999999;\n  }\n  #remind_qrcode_img {\n    position: absolute;\n    right: 3px;\n    height: 134px;\n    width: 120px;\n    bottom: 29px;\n    display: none;\n    border: 1px solid #e1e1e1;\n    background-color: #fff;\n    box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);\n  }\n  #remind_qrcode_img img {\n    width: 100%;\n  }\n  #remind_qrcode_img:before {\n    display: block;\n    content: "";\n    height: 0px;\n    width: 0px;\n    border: 8px solid transparent;\n    border-top-color: #999;\n    border-right-width: 7px;\n    border-left-width: 7px;\n    top: 135px;\n    right: 52px;\n    position: absolute;\n  }\n  #remind_qrcode_img:after {\n    display: block;\n    content: "";\n    height: 0px;\n    width: 0px;\n    border: 8px solid transparent;\n    border-top-color: #fff;\n    border-right-width: 8px;\n    border-left-width: 8px;\n    top: 134px;\n    right: 51px;\n    position: absolute;\n  }\n  #remind_qrcode_img p {\n    text-align: justify;\n    margin: 0px;\n    padding: 0px 6px;\n    height: 20px;\n    font-size: 12px;\n    color: #8d8d8d;\n    position: relative;\n    top: -8px;\n  }\n  #remind_qrcode_img p:after{\n    content:".";\n    display: inline-block;\n    width:100%;\n    overflow:hidden;\n    height:0;\n  }\n\n  .remind-item .select-item {\n    background: white!important;\n    border-radius: 16px;\n    border: 2px solid #939597;\n    box-sizing: border-box!important;\n    background-image: none!important;\n  }\n\n  .remind-item .select-item:hover {\n    border: 4px solid #4ebffb;\n    background-image: none!important;\n    box-sizing: border-box;\n  }\n\n  .remind-item .select-item.selected {\n    border: 4px solid #4ebffb;\n    background-image: none!important;\n    box-sizing: border-box;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', choosed = $data.choosed, email = $data.email, $escape = $imports.$escape, notify_site = $data.notify_site, allprice = $data.allprice, currency = $data.currency, nowprice = $data.nowprice, lowestUrl = $data.lowestUrl, extName = $data.extName;
    $$out += '<div id="bjd_minifavor_content"  ';
    if (choosed) {
        $$out += 'class="bjd_choosed" ';
    }
    $$out += '>\n  <div style="margin-top: 40px; padding-left: 60px; padding-right: 60px; ';
    if (email) {
        $$out += ' display: none; ';
    }
    $$out += '">\n    <div class="bjd-login-box" id="gwd-login-mini"></div>\n  </div>\n  <div class="bjd-jiangjia-re">\n    <div class="jiangjia-left" style="position: relative">\n      <div class="jj-remind" data-notify="';
    $$out += $escape(notify_site);
    $$out += '">\n        <p class="blkcolor1">降价提醒</p>\n        <button class="gwd-del-collection gwd-hui333 gwd-font12" style="line-height: 0">取消提醒</button>\n        <div class="remind-item remind-item-fst ';
    if (notify_site == '0') {
        $$out += 'current-selected';
    }
    $$out += '" style="margin-top: 65px;">\n          <span class="select-item mini-bg ';
    if (notify_site == '0') {
        $$out += 'selected ';
    }
    $$out += '"  data-type="0"></span>\n          <span class="blkcolor3">全网商家低于</span>\n          <input type="text" value="';
    $$out += $escape(allprice);
    $$out += '">\n          <span class="blkcolor3">';
    $$out += $escape(currency);
    $$out += '时提醒</span>\n        </div>\n        <div class="remind-item remind-item-snd ';
    if (notify_site == '1') {
        $$out += 'current-selected';
    }
    $$out += '" style="margin-top: 26px;">\n          <span class="select-item mini-bg ';
    if (notify_site == '1') {
        $$out += 'selected ';
    }
    $$out += '" data-type="1"></span>\n          <span class="blkcolor3">当前商家低于</span>\n          <input type="text" value="';
    $$out += $escape(nowprice);
    $$out += '">\n          <span class="blkcolor3">';
    $$out += $escape(currency);
    $$out += '时提醒</span>\n        </div>\n        ';
    if (lowestUrl) {
        $$out += '\n<!--        <a class="jj-remind-logo mini-bg" target="_blank" href="';
        $$out += $escape(lowestUrl);
        $$out += '"></a>-->\n        ';
    }
    $$out += '\n      </div>\n      <span id="error_remind_tle" style="top: 230px">请输入正确的邮箱地址</span>\n      <span id="subbtn" class="subbtn" style="clear: both">提交</span>\n      <br>\n      <div style="clear: both;">\n        <span class="remindHint">提交成功</span>\n      </div>\n<!--      <span id="edit_re_style" class="blkcolor4">更改价格提醒方式</span>-->\n    </div>\n    <div class="jiangjia-right">\n      <span class="mgtop blkcolor1">微信查询</span>\n      <div class="qrcode-jj">\n        <img src="http://cdn.';
    $$out += $escape(extName);
    $$out += '.com/images/extensions/newbar/wx-qrcode3.png">\n      </div>\n      <p class="first-p">扫码关注微信号</p>\n      <p>商品降价实时提醒</p>\n    </div>\n  </div>\n  <style type="text/css">\n    .gwd-del-collection {\n      width: 60px;\n      height: 20px;\n      background: #F3F3F3;\n      border-radius: 4px;\n      border: 1px solid #DCDCDC;\n      position: absolute;\n      right: 10px;\n      top: -5px;\n      text-align: center;\n      display: none;\n    }\n\n    .bjd-jiangjia-re {\n      height: 100%;\n      ';
    if (!email) {
        $$out += '\n      display:none; \n      ';
    }
    $$out += '\n    }\n    .bjd-login-box {\n      ';
    if (email) {
        $$out += '\n      display: none;\n      ';
    }
    $$out += '\n    }\n\n    #bjd_minifavor_content .select-item {\n      padding: 0!important;\n    }\n\n    #gwdang-trend .select-item {\n      padding: 0!important;\n    }\n\n    .remindHint {\n      font-size: 12px;\n      color: #48b3fe;\n      /*display: none;*/\n      /*visibility: hidden;*/\n    }\n\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 412 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__ = __webpack_require__(413);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_template_id_5efee9c0_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    "class": "gwd-common-login " + _vm.position,
    style: "flex-direction: column"
  }, [_c("div", { staticClass: "gwd-main-login" }, [_c("img", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.position === "gwd-favor",
      expression: "position === 'gwd-favor'"
    }],
    staticStyle: {
      "margin-top": "49px",
      "margin-bottom": "50px",
      width: "42px",
      height: "42px"
    },
    attrs: { src: __webpack_require__(414), alt: "" }
  }), _vm._v(" "), _c("button", {
    "class": { "gwd-shorter": _vm.position === "gwd-trend-top" },
    on: {
      click: function click($event) {
        return _vm.goLogin();
      }
    }
  }, [_vm._v("购物党账号登录")]), _vm._v(" "), _c("a", {
    attrs: {
      href: "https://www.gwdang.com/user/register?from_url=" + encodeURIComponent(_vm.url),
      target: _vm.position === "gwd-popup" ? "_blank" : ""
    }
  }, [_vm._v("免费注册")])]), _vm._v(" "), _c("div", { staticClass: "gwd-alter-login" }, [_vm._m(0), _vm._v(" "), _c("div", { staticClass: "third-login" }, [_c("span", {
    staticClass: "weixinlogin gwd_bg loginBox",
    attrs: { target: _vm.position === "gwd-popup" ? "_blank" : "" },
    on: {
      click: function click($event) {
        return _vm.goLink("wechat");
      }
    }
  }), _vm._v(" "), _c("span", {
    staticClass: "qqlogin gwd_bg loginBox",
    attrs: { target: _vm.position === "gwd-popup" ? "_blank" : "" },
    on: {
      click: function click($event) {
        return _vm.goLink("qq");
      }
    }
  }), _vm._v(" "), _c("span", {
    staticClass: "sinalogin gwd_bg loginBox",
    attrs: { target: _vm.position === "gwd-popup" ? "_blank" : "" },
    on: {
      click: function click($event) {
        return _vm.goLink("weibo");
      }
    }
  })])])]);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-vline" }, [_c("div", { staticClass: "gwd-line-a" }), _vm._v(" "), _c("span", [_vm._v("其他登录方式")]), _vm._v(" "), _c("div", { staticClass: "gwd-line-b" })]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 414 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 415 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_0_id_5efee9c0_scoped_true_lang_less__ = __webpack_require__(416);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_0_id_5efee9c0_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_0_id_5efee9c0_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 416 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(417);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("395343a3", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=0&id=5efee9c0&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=0&id=5efee9c0&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "button[data-v-5efee9c0] {\n  background: none;\n  border: none;\n  outline: none;\n  box-sizing: border-box;\n}\nbutton[data-v-5efee9c0]:active {\n  border: none;\n}\n.gwd-light-btn[data-v-5efee9c0] {\n  height: 34px;\n  line-height: 34px;\n  min-width: 80px;\n  border: 1px solid #cfd7dc;\n  background: #f4f9fc;\n  color: #5d93bd;\n  font-size: 12px;\n  border-radius: 4px;\n}\n.gwd-common-login[data-v-5efee9c0] {\n  display: flex;\n  line-height: initial;\n  box-sizing: border-box;\n}\n.gwd-common-login .gwd-main-login[data-v-5efee9c0] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.gwd-common-login .gwd-main-login button[data-v-5efee9c0] {\n  background: #48bef3;\n  color: white;\n  height: 34px;\n  font-size: 14px;\n  font-weight: bold;\n  border-radius: 4px;\n  width: 100%;\n  cursor: pointer;\n  letter-spacing: 1px;\n  box-sizing: border-box !important;\n  font-family: 'Microsoft Yahei' !important;\n}\n.gwd-common-login .gwd-main-login a[data-v-5efee9c0] {\n  color: #5d93b0;\n  margin-top: 12px;\n  font-size: 12px;\n}\n.gwd-alter-login[data-v-5efee9c0] {\n  margin-top: 29px;\n  display: flex;\n  flex-direction: column;\n}\n.gwd-alter-login span[data-v-5efee9c0] {\n  cursor: pointer;\n}\n.gwd-alter-login .gwd-vline[data-v-5efee9c0] {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n  height: 12px;\n}\n.gwd-alter-login .gwd-vline div[data-v-5efee9c0] {\n  flex: 1;\n  height: 2px;\n  background: linear-gradient(to right, #ffffff 0%, #cfd7dc 100%);\n}\n.gwd-alter-login .gwd-vline span[data-v-5efee9c0] {\n  font-size: 12px;\n  color: #999999;\n  margin-left: 10px;\n  margin-right: 10px;\n  letter-spacing: 2px;\n}\n.gwd-alter-login .gwd-vline .gwd-line-b[data-v-5efee9c0] {\n  transform: rotate(180deg);\n}\n.gwd-alter-login .third-login[data-v-5efee9c0] {\n  margin-top: 18px;\n  flex-direction: row;\n  margin-left: 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.gwd-alter-login .third-login span[data-v-5efee9c0] {\n  margin-left: 20px;\n  margin-right: 20px;\n  margin-top: 0;\n}\n.third-login[data-v-5efee9c0] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  margin-left: 34px;\n}\n.third-login span[data-v-5efee9c0] {\n  width: 32px;\n  height: 32px;\n  display: inline-block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.qqlogin[data-v-5efee9c0] {\n  background-position: -10px -117px !important;\n}\n.sinalogin[data-v-5efee9c0] {\n  background-position: -43px -117px !important;\n}\n.weixinlogin[data-v-5efee9c0] {\n  background-position: -77px -117px !important;\n}\n.loginBox[data-v-5efee9c0] {\n  background-image: url(https://cdn.gwdang.com/images/extensions/xbt/newbar-top3.png) !important;\n}\n", ""]);

// exports


/***/ }),
/* 418 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_1_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_favor__ = __webpack_require__(419);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_1_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_favor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_1_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_favor__);
/* unused harmony reexport namespace */


/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(420);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("651fcd78", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=1&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-favor", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=1&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-favor");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-common-login.gwd-favor[data-v-5efee9c0] {\n  box-sizing: border-box !important;\n  align-items: center;\n}\n.gwd-common-login.gwd-favor .gwd-main-login[data-v-5efee9c0] {\n  box-sizing: border-box;\n  width: 240px;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-methods[data-v-5efee9c0] {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-methods button[data-v-5efee9c0] {\n  font-size: 14px;\n  color: #333333;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-methods .gwd-login-active[data-v-5efee9c0] {\n  font-weight: bold;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-main[data-v-5efee9c0] {\n  width: 240px;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-main input[data-v-5efee9c0] {\n  box-sizing: border-box !important;\n  height: 32px;\n  line-height: 32px;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-main button[data-v-5efee9c0] {\n  box-sizing: border-box !important;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-main .gwd-light-btn[data-v-5efee9c0] {\n  height: 32px;\n  line-height: 30px;\n}\n.gwd-common-login.gwd-favor .gwd-main-login .gwd-login-main .bottom-line[data-v-5efee9c0] {\n  width: 240px;\n  align-items: center;\n  justify-content: center;\n}\n.gwd-common-login.gwd-favor .gwd-main-login button[data-v-5efee9c0] {\n  width: 220px;\n}\n.gwd-common-login.gwd-favor .gwd-alter-login[data-v-5efee9c0] {\n  margin-top: 54px;\n}\n", ""]);

// exports


/***/ }),
/* 421 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_2_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_remind__ = __webpack_require__(422);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_2_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_remind___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_2_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_remind__);
/* unused harmony reexport namespace */


/***/ }),
/* 422 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(423);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("2b94bddc", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=2&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-remind", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=2&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-remind");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 423 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-common-login.gwd-remind[data-v-5efee9c0] {\n  box-sizing: border-box !important;\n  align-items: center;\n}\n.gwd-common-login.gwd-remind .gwd-main-login[data-v-5efee9c0] {\n  /*padding-left: 18px;*/\n  box-sizing: border-box;\n  width: 200px;\n}\n", ""]);

// exports


/***/ }),
/* 424 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_3_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_mini__ = __webpack_require__(425);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_3_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_mini___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_3_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_mini__);
/* unused harmony reexport namespace */


/***/ }),
/* 425 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(426);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("3af0fc83", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=3&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-mini", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=3&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-mini");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-common-login.gwd-mini .gwd-main-login[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login[data-v-5efee9c0] {\n  box-sizing: border-box;\n}\n.gwd-common-login.gwd-mini .gwd-main-login .gwd-login-methods[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login .gwd-login-methods[data-v-5efee9c0] {\n  padding-left: 21px;\n  padding-right: 21px;\n}\n.gwd-common-login.gwd-mini .gwd-main-login .gwd-login-methods button[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login .gwd-login-methods button[data-v-5efee9c0] {\n  font-size: 12px;\n  color: #666666;\n}\n.gwd-common-login.gwd-mini .gwd-main-login .gwd-login-methods .gwd-login-active[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login .gwd-login-methods .gwd-login-active[data-v-5efee9c0] {\n  color: #333333;\n}\n.gwd-common-login.gwd-mini .gwd-main-login button[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login button[data-v-5efee9c0] {\n  width: 340px;\n}\n.gwd-common-login.gwd-mini .gwd-main-login button.gwd-shorter[data-v-5efee9c0],\ngwd-common-login.gwd-trend-top .gwd-main-login button.gwd-shorter[data-v-5efee9c0] {\n  width: 270px;\n}\n", ""]);

// exports


/***/ }),
/* 427 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_4_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_popup__ = __webpack_require__(428);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_4_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_popup___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonLogin_vue_vue_type_style_index_4_id_5efee9c0_scoped_true_lang_less_data_class_type_gwd_popup__);
/* unused harmony reexport namespace */


/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(429);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("124b082e", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=4&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-popup", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonLogin.vue?vue&type=style&index=4&id=5efee9c0&scoped=true&lang=less&data-class-type=gwd-popup");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 429 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-common-login.gwd-popup[data-v-5efee9c0] {\n  box-sizing: border-box !important;\n  align-items: center;\n}\n.gwd-common-login.gwd-popup .gwd-main-login[data-v-5efee9c0] {\n  /*padding-left: 18px;*/\n  box-sizing: border-box;\n  width: 280px;\n}\n", ""]);

// exports


/***/ }),
/* 430 */
/***/ (function(module, exports) {

module.exports = "<div id=\"gwd_mini_seckill\" class=\"minibar-tab seckill-tab\">\n  <div class=\"minibar-btn-box\">\n    <em class=\"seckill-bg\"></em>\n    <span>抢购提醒</span>\n  </div>\n    <div class=\"seckill-detail seckill-common-detail\">\n      <span class=\"sk-remind-btn\">设置提醒</span>\n      <span class=\"sk-remind-state1\">\n        <em class=\"seckill-bg\"></em>\n        <span>已设置抢购提醒</span>\n      </span>\n      <span class=\"sk-remind-state0\">\n        您还没有绑定公众号请先扫码绑定\n      </span>\n      <span class=\"sk-qrcode\">\n        <img src=\"\">\n      </span>\n      <span class=\"sk-tle-sp1\">扫码关注购物党公众号</span>\n      <span class=\"sk-tle-sp2\">开售前5分钟推送提醒</span>\n    </div>\n    <div class=\"login-detail seckill-common-detail\" style=\"padding-top: 40px;\">\n      <div id=\"gwd-bjd-login-box\">\n      </div>\n    </div>\n</div>\n<style type=\"text/css\">\n  #gwd_mini_seckill {\n    width: 127px;\n    display: inline-block;\n    text-align: center;\n    position: relative;\n  }\n  .login-detail {\n    width: 460px;\n    height: 283px;\n    box-sizing: border-box;\n    position: absolute;\n    top: 36px;\n    right: 0;\n    display: none;\n    z-index: 999999;\n    border-top: 1px solid #eee;\n    border-bottom: 1px solid #eee;\n    background-color: #fff;\n    box-shadow: 0 5px 15px 0 rgba(23,25,27,.15);\n  }\n  .seckill-bg {\n    background: url(\"https://cdn.gwdang.com/images/extensions/xbt/seckill.png\") 0px 0px no-repeat;\n  }\n  .seckill-completed {\n    background: url(../../assets/seckill/complete.svg)\n  }\n  .seckill-tab .minibar-btn-box em {\n    float: left;\n    width: 16px;\n    height: 16px;\n    margin-right: 9px;\n    background-position: -9px -9px;\n    margin-top: 10px;\n  }\n  .seckillSet.seckill-tab .minibar-btn-box em {\n    background-position: -35px -9px;\n  }\n  .seckill-tab .minibar-btn-box span {\n    cursor: default;\n  }\n  .seckill-detail {\n    display: none;\n    position: absolute;\n    top: 35px;\n    right: 0px;\n    height: 220px;\n    width: 180px;\n    background-color: #fff;\n    box-shadow:0px 2px 4px 0px rgba(0,0,0,0.1);\n    border:1px solid rgba(230,233,235,1);\n    z-index: 99999;\n  }\n  .seckill-detail * {\n    float: left;\n  }\n  .seckill-detail .sk-remind-btn {\n    width:94px;\n    height:26px;\n    position: absolute;\n    background:rgba(255,232,226,1);\n    border-radius:15px;\n    line-height: 26px;\n    text-align: center;\n    color: #FF6132;\n    font-size: 12px;\n    top: 18px;\n    left: 50%;\n    margin-left: -47px;\n    cursor: pointer;\n  }\n  .sk-remind-state1 {\n     position: absolute;\n     top: 23px;\n     left: 50%;\n     margin-left: -55px;\n     height: 16px;\n     width: 110px;\n     display: none;\n  }\n  .sk-remind-state1 span, .sk-remind-state0 {\n    line-height: 16px;\n    color: #FF6132;\n    font-size: 12px;\n  }\n  .sk-remind-state1 em {\n    height: 12px;\n    width: 12px;\n    background-position: -4px -38px;\n    margin-top: 2px;\n    margin-right: 4px;\n  }\n  .sk-remind-state0 {\n    position: absolute;\n    top: 14px;\n    left: 50%;\n    margin-left: -54px;\n    height: 32px;\n    width: 108px;\n    text-align: center;\n    display: none;\n  }\n  .sk-qrcode {\n    height: 110px;\n    width: 110px;\n    top: 52px;\n    left: 50%;\n    position: absolute;\n    margin-left: -55px;\n  }\n  .sk-qrcode img {\n    width: 100%;\n    height: 100%;\n  }\n  .sk-tle-sp1, .sk-tle-sp2 {\n    color: #666;\n    line-height: 16px;\n    width:  100%;\n  }\n  .sk-tle-sp1 {\n    /*margin-left: 30px;*/\n    margin-top: 170px;\n  }\n  .sk-tle-sp2 {\n    /*margin-left: 32px;*/\n    margin-top: 4px;\n  }\n  #gwd_mini_seckill .sp-border {\n    background-position: -230px 7px;\n  }\n  #gwd_mini_seckill .login-input input {\n    background-color: #fff!important;\n  }\n  input:-webkit-autofill,\n  input:-webkit-autofill:hover, \n  input:-webkit-autofill:focus, \n  input:-webkit-autofill:active  {\n      -webkit-box-shadow: 0 0 0 30px white inset !important;\n  }\n</style>"

/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', aliSite = $data.aliSite, newTime = $data.newTime;
    $$out += '<div class="gwd-minibar-bg">\n  <div id="gwd_minibar" class="';
    if (aliSite) {
        $$out += 'alisite_page ';
    }
    $$out += '" style="display: flex">\n    <a class="gwd_website" title="功能设置" id="gwd_website_icon" target="_blank" href="#">\n      <em class="setting-bg website_icon"></em>\n    </a>\n    <div style="flex: 1" id="mini_price_history" class="minibar-tab"></div>\n    <div style="flex: 1" id="gwd_mini_compare" class="minibar-tab"></div>\n    ';
    if (newTime) {
        $$out += '\n      <div style="flex: 1" id="gwd_mini_seckill" class="minibar-tab">\n        <div class="minibar-btn-box">\n          <em class=""></em>\n          <span>抢购提醒</span>\n        </div>\n      </div>\n    ';
    } else {
        $$out += '\n      <div style="flex: 1" id="gwd_mini_remind" class="minibar-tab">\n        <div class="minibar-btn-box">\n<!--          <em class="setting-bg collect_mailout_icon"></em>-->\n<!--          <span>降价提醒</span>-->\n        </div>\n        <div class="gwd-collection-mini">\n          <div class="gwd-collection-mini-content"></div>\n        </div>\n      </div>\n    ';
    }
    $$out += '\n  </div>\n  <div class="gwd-mini-placeholder gwd-price-protect"></div>\n  <div class="gwd-mini-placeholder" id="gwd-coupon-placeholder"></div>\n  <div class="gwd-mini-placeholder" id="gwd-dsj-placeholder"></div>\n  <div id="promo_box"></div>\n</div>\n<style>\n  .gwd-minibar-bg {\n    font-size: 12px;\n  }\n\n  .gwd-mini-placeholder {\n      display: none;\n  }\n\n  .gwd-minibar-element {\n      border-left: 1px solid #e8e8e8;\n      border-right: 1px solid #e8e8e8;\n      border-bottom: 1px solid #e8e8e8;\n  }\n\n  .gwd-minibar-element:last-of-type {\n      border-bottom: 1px solid #e8e8e8;\n  }\n\n  .gwd-collection-mini {\n    display: none;\n    /*display: flex;*/\n    width: 462px;\n    height: 251px;\n    background: white;\n    border-radius: 2px;\n    box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.1);\n    border: 1px solid #e6e9eb;\n    position: absolute;\n    top: 36px;\n    left: -1px;\n    z-index: 30001;\n    box-sizing: border-box;\n    cursor: default;\n    overflow: visible;\n  }\n\n  #gwd_mini_remind:hover .gwd-collection-mini {\n    display: flex;\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 432 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', showFold = $data.showFold, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, img = $data.img;
    $$out += '<div id="promo_history" class="promo-history-detail">\n  <p>历史促销优惠信息</p>\n  <div class="history-content ';
    if (showFold) {
        $$out += ' show_fold ';
    }
    $$out += '">\n    <ul>\n      ';
    $each(data, function ($value, $index) {
        $$out += '\n        <li class=" ';
        $$out += $escape($value.mark);
        $$out += ']">\n          <a class="pro-pri-item">\n            <span class="ppi-sp1 prifontf">';
        $$out += $escape($value.time2);
        $$out += '</span>\n            <span class="ppi-sp2">';
        if ($value.isDSJ) {
            $$out += ' 到手价 ';
        } else {
            $$out += ' 到手价(多件) ';
        }
        $$out += '</span>\n            <span class="ppi-sp2 ppi-fh">:</span>\n            <span class="ppi-sp3 prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n          </a>\n          <span class="pro-coupon-item">\n            <span class="pci-tlesp">页面价</span>\n            <span class="ppi-fh">:</span>\n            <span class="prifontf">\xA5';
        $$out += $escape($value.ori_price);
        $$out += '</span>\n            \n          </span>\n          ';
        if ($value.coupon) {
            $$out += '\n          <span class="pro-coupon-item">\n            ';
            $$out += $escape($value.coupon);
            $$out += '\n          </span>\n          ';
        }
        $$out += '\n          ';
        if ($value.promotion) {
            $$out += '\n          <span class="pro-pro-item">\n            ';
            $$out += $escape($value.promotion);
            $$out += '\n          </span>\n          ';
        }
        $$out += '\n        </li>\n      ';
    });
    $$out += '\n    </ul>\n  </div>\n  <div class="gwd-mini-mask">\n    <div class="gwd-miniBlurLayer"></div>\n    <div class="gwd-miniQr">\n      <img id="qrcode-compare" src="';
    $$out += $escape(img);
    $$out += '" alt="" style="width: 100%; height: 100%">\n    </div>\n    <div class="gwd-miniSlogan">\n      <span>打开</span><a class="appName" href="https://www.gwdang.com/app/mobile" target="_blank">购物党APP</a><span>扫码查看</span>\n    </div>\n  </div>\n</div>\n\n<style type="text/css">\n  .gwd-miniSlogan {\n    position: absolute;\n    bottom: 33px;\n    text-align: center;\n    left: 0;\n    right: 0;\n    font-size: 12px;\n    color: #333333;\n    line-height: 19px;\n    height: 19px;\n  }\n\n  .gwd-miniSlogan .appName {\n    font-weight: bold;\n    margin-left: 5px;\n    margin-right: 5px;\n  }\n\n  .gwd-miniSlogan .appName:hover {\n    color: #46c9ba;\n  }\n\n  .gwd-miniQr {\n    width: 116px;\n    height: 116px;\n    position: absolute;\n    bottom: 58px;\n    left: 50%;\n    margin-left: -58px;\n    padding: 5px;\n    box-sizing: border-box;\n  }\n  .gwd-mini-mask {\n    background:linear-gradient(360deg,rgba(255,255,255,1) 0%,rgba(255,255,255,0.78) 85%,rgba(255,255,255,0.25) 100%);;\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    top: 83px;\n    z-index: 1;\n  }\n  .gwd-miniBlurLayer {\n    /*width:100%;*/\n    background:rgba(255,255,255,1);\n    position: absolute;\n    top: 38px;\n    left: 32px;\n    right: 32px;\n    bottom: 24px;\n    filter: blur(10px);\n  }\n  div#mini_price_history_detail {\n    width: 667px;\n    overflow: hidden;\n  }\n  #mini_price_history_detail .discount-price-re {\n    left: 364px;\n    right: inherit;\n  }\n  .fold-bar {\n    background-color: #F4F4F4;\n    border-radius: 2px;\n    width: 158px;\n    height: 26px;\n    line-height: 26px;\n    text-align: center;\n    color: #999;\n    font-size: 12px;\n    position: absolute;\n    left: 23px;\n    cursor: pointer;\n    display: none;\n  }\n  .fold-bar:hover {\n    background-color: #f0f0f0;\n  }\n  .show_fold .fold-bar {\n    display: inline-block;\n  }\n  #promo_history span.ppi-sp1 {\n    margin-right: 20px;\n    line-height: 18px;\n  }\n  #promo_history .ppi-remind-tle {\n    float: left;\n    width: 32px;\n    height: 16px;\n    border-radius: 2px;\n    line-height: 15px;\n    text-align: center;\n    background: #5ACFFA;\n    margin-left: 4px;\n    color: #fff;\n    display: none;\n  }\n  #promo_history .now_list .ppi-remind-tle {\n    background-color: #35BC68;\n  }\n  #promo_history .now_list2 .ppi-remind-tle {\n    background-color: #FF9F22;\n  }\n  .now_list .ppi-remind-tle,.now_list2 .ppi-remind-tle, .promo-history-detail ul li:first-child .ppi-remind-tle {\n    display: inline-block;\n  }\n  #promo_history .ppi-sp2 {\n    line-height: 17px;\n  }\n  .ppi-fh {\n    height: 17px;\n    width: 4px!important;\n  }\n  .pro-coupon-item .ppi-fh+span {\n    line-height: 18px;\n  }\n  #promo_history .ppi-sp1 ,#promo_history .ppi-sp2{\n    color: #999;\n  }\n  #promo_history span.ppi-sp3 {\n    font-size: 12px;\n    color: #e4393c;\n    line-height: 18px;\n    margin-left: 3px;\n  }\n  #promo_history {\n    float: left;\n    width: 206px;\n    height: 308px;\n    position: relative;\n    overflow: hidden;\n    border-left: 1px solid #e4e4e4;\n  }\n  ._dsj_show #promo_history {\n    height: 338px;\n  }\n  #promo_history>p {\n    height: 40px;\n    margin-top: 12px;\n    width: 100%;\n    font-size: 12px;\n    color: #333333;\n    background-color: white;\n    line-height: 40px;\n    padding-left: 19px;\n    box-sizing: border-box;\n    text-align: left;\n    font-weight: bold;\n  }\n  .history-content {\n    height: 265px;\n    width: 100%;\n    overflow-x: hidden;\n    overflow-y: hidden;\n    position: relative;\n    padding-left: 19px;\n    box-sizing: border-box;\n    -webkit-touch-callout: none;\n    -webkit-user-select: none;\n    -khtml-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n  }\n  .gwd-gaussMask {\n    mask: url(\'#mask-linear\');\n    filter: url(\'#filtre2\');\n    -webkit-mask: -webkit-linear-gradient(transparent, black 30%, black);\n    -webkit-mask: linear-gradient(transparent, black 30%, black);\n    -webkit-filter: blur(3px);\n    background: white;\n    height: 270px;\n  }\n  ._dsj_show .history-content {\n    height: 295px;\n  }\n  .history-line {\n    border-left: 1px dashed #e0e0e0;\n    height: 200px;\n    width: 0px;\n    position: absolute;\n    left: 9px;\n    top: 24px;\n  }\n  .promo-history-detail ul li {\n    list-style: none;\n    float: left;\n    width: 200px;\n    height: auto;\n    margin-top: 14px;\n  }\n  .promo-history-detail .show_fold ul li.lowest_before {\n    display: none;\n  }\n  .promo-history-detail ul li:first-child.lowest_before {\n    display: inline-block;\n  }\n  .promo-history-detail .show_fold ul li.lowest_now {\n    margin-top: 54px;\n  }\n  .promo-history-detail ul li:first-child {\n    margin-top: 0px;\n  }\n  .promo-history-detail .history-content> ul li:last-child {\n    margin-bottom: 12px;\n  }\n  .promo-history-detail ul li a {\n    line-height: 17px;\n    height: 17px;\n    width: 100%;\n    float: left;\n  }\n  .promo-history-detail ul li.now_list a em {\n    background-color: #35BD68;\n    border: 1px solid #35BD68;\n  }\n  .promo-history-detail ul li a em {\n    float: left;\n    height: 5px;\n    width: 5px;\n    background: #fff;\n    border: 1px solid #babec0;\n    border-radius: 8px;\n    position: relative;\n    margin-right: 7px;\n    top: 5px;\n    margin-left: 6px;\n  }\n  .promo-history-detail ul li a span {\n    float: left;\n  }\n  .promo-history-detail ul li>span {\n    margin-top: 6px;\n    float: left;\n    line-height: 16px;\n    height: auto;\n    color: #999;\n    text-align: left;\n    /*margin-left: 20px;*/\n    font-size: 12px;\n    width: 141px;\n  }\n  .pro-coupon-item>span {\n    float: left;\n    height: 17px;\n    width: auto;\n    color: #999;\n  }\n  .pro-coupon-item .ppi-fh, .pro-pro-item .ppi-fh {\n    margin-right: 2px;\n    float: left;\n  }\n  .pro-coupon-item .pci-tlesp, .pro-pro-item .pci-tlesp{\n    color: #999;\n    float: left;\n  }\n  .promo-history-detail ul li .pro-coupon-item+.pro-pro-item {\n    margin-top: 4px;\n    width: 164px;\n  }\n\n\n\n\n\n\n  #promo_history ::-webkit-scrollbar {width:6px;}\n  #promo_history ::-webkit-scrollbar-track {background:#f0f0f0;}\n  #promo_history ::-webkit-scrollbar-thumb {\n    background: #A7A7A7;\n    border-radius: 12px;\n  }\n  #promo_history ::-webkit-scrollbar-thumb:hover {\n    background: #999;\n  }\n</style>\n\n<svg height="0">\n  <defs>\n    <mask id="mask-radial">\n      <rect width="400" height="300" fill="url(#g1)"></rect>\n      <radialGradient id="g1" cx="50%" cy="50%" r="50%">\n        <stop stop-color="black" offset="50%"/>\n        <stop stop-color="white" offset="110%"/>\n      </radialGradient>\n    </mask>\n    <mask id="mask-linear">\n      <rect width="400" height="265" fill="url(#l1)"></rect>\n      <linearGradient id="l1" x1="0" y1="0" x2="0" y2="1">\n        <stop stop-color="white" offset="0%"/>\n        <stop stop-color="black" offset="30%"/>\n        <stop stop-color="white" offset="100%"/>\n      </linearGradient>\n    </mask>\n    <filter id="filtre1">\n      <feGaussianBlur in="SourceGraphic" stdDeviation="5"/>\n    </filter>\n    <filter id="filtre2">\n      <feGaussianBlur in="SourceGraphic" stdDeviation="3"/>\n    </filter>\n  </defs>\n</svg>';
    return $$out;
};

/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, allLink = $data.allLink, storeSize = $data.storeSize;
    $$out += '<div id="gwd_mini_compare_detail" class="minibar-detail">\n  <ul>\n    ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank">\n          <img src="';
        $$out += $escape($value.icourl);
        $$out += '">\n          <span class="m-item-sitename">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n          <span class="m-item-price prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n        </a>\n      </li>\n    ';
    });
    $$out += '\n  </ul>\n  <a href="';
    $$out += $escape(allLink);
    $$out += '" target="_blank" class="m-all-link">\n    查看全部(';
    $$out += $escape(storeSize);
    $$out += ')\n  </a>\n</div>\n';
    return $$out;
};

/***/ }),
/* 434 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, storeSize = $data.storeSize, allLink = $data.allLink;
    $$out += '<div id="trend_com_detail" class="trend-com-detail">\n  <p>同款比价</p>\n  <ul>\n    ';
    $each(data, function ($value, $index) {
        $$out += '\n      <li>\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank">\n          <img src="';
        $$out += $escape($value.icourl);
        $$out += '">\n          <span class="t-com-sitename" title="';
        $$out += $escape($value.site_name);
        $$out += '">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n          <span class="t-com-price prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n        </a>\n      </li>\n    ';
    });
    $$out += '\n  </ul>\n  ';
    if (storeSize > 6) {
        $$out += '\n  <a href="';
        $$out += $escape(allLink);
        $$out += '" target="_blank" class="t-all-link">\n    查看全部(';
        $$out += $escape(storeSize);
        $$out += ')\n  </a>\n  ';
    }
    $$out += '\n  <style type="text/css">\n    div#mini_price_history_detail {\n      width: 672px;\n    }\n    .trend-com-detail {\n      height: 100%;\n      width: 210px;\n      float: left;\n      border-left: 1px solid #e6e9eb;\n    }\n    .trend-com-detail * {\n      float: left;\n    }\n    .trend-com-detail>p {\n      color: #404547;\n      line-height: 37px;\n      float: left;\n      width: 210px;\n      font-size: 13px;\n      text-align: center;\n      padding: 0px;\n      margin: 0px;\n      background-color: #FBFBFB;\n    }\n    .trend-com-detail ul li {\n      height: 40px;\n      list-style: none;\n      width: 210px;\n      background-color: #fff;\n    }\n    .trend-com-detail ul li:hover {\n      background-color: #EDF1F2;\n    }\n    .trend-com-detail ul li a {\n      width: 210px;\n      height: 40px;\n    }\n    .trend-com-detail li img {\n      height: 16px;\n      width: 16px;\n      margin: 12px 8px 12px 10px;\n    }\n    .trend-com-detail span.t-com-sitename {\n      line-height: 40px;\n      width: 78px;\n      height: 40px;\n      text-align: left;\n      overflow: hidden;\n      color: #404547;\n    }\n    .trend-com-detail span.t-com-price {\n      float: right;\n      margin-right: 10px;\n      line-height: 40px;\n      color: #DE3935;\n      font-size: 14px;\n      font-weight: bold;\n    }\n    #mini_price_history .t-all-link {\n      font-weight: 400;\n      font-size: 12px;\n      line-height: 17px;\n      height: 17px;\n      float: right;\n      margin-right: 10px;\n      margin-top: 10px;\n      color: #999!important;\n      text-decoration: none!important;\n    }\n    #mini_price_history .t-all-link:hover {\n      color: #5ebeff!important;\n    }\n  </style>\n</div>\n';
    return $$out;
};

/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime, Vue) {

var _this = this;

var template = __webpack_require__(13);
var request = __webpack_require__(3);
var log = __webpack_require__(14);
var cnzz = __webpack_require__(12);
var userData = __webpack_require__(15);
var store = __webpack_require__(34);

var _require = __webpack_require__(123);

var MiniBarCollectionButton = _require['default'];

var country = 'us';
var timer, timer2;
var HOST;
var htX, htY, mouseDownX;
var sizeDict = {
  '米': 3000,
  '厘米': 30,
  '毫米': 3,
  '英尺': 914.4,
  '英寸': 76.2,
  '码': 2743.2,
  '尺': 1000,
  '寸': 100,
  '分': 10,
  '厘': 1
};
var clothesDict = {
  'shangyi': {
    'us': {
      'man': ['us_man_sz.jpg', 'us_man_sz2.jpg'],
      'woman': ['us_woman_sz.jpg', 'us_woman_sz2.jpg']
    },
    'uk': {
      'man': ['uk_man_sz.jpg', 'uk_man_sz2.jpg'],
      'woman': ['uk_woman_sz.jpg', 'uk_woman_sz2.jpg']
    },
    'jp': {
      'man': ['jp_man_sz.jpg', 'jp_man_sz2.jpg'],
      'woman': ['jp_woman_sz.jpg', 'jp_woman_sz2.jpg']
    }
  },
  'xiazhuang': {
    'us': {
      'man': ['us_man_xz.jpg', 'us_man_xz2.jpg'],
      'woman': ['us_woman_xz.jpg', 'us_woman_xz2.jpg']
    },
    'uk': {
      'man': ['uk_man_xz.jpg', 'uk_man_xz2.jpg'],
      'woman': ['uk_woman_xz.jpg', 'uk_woman_xz2.jpg']
    },
    'jp': {
      'man': ['jp_man_xz.jpg', 'jp_man_xz2.jpg'],
      'woman': ['jp_woman_xz.jpg', 'jp_woman_xz2.png']
    }
  },
  'kidscloth': {
    'us': ['us_kids.jpg', 'us_kids2_0.jpg', 'us_kids2_4.jpg'],
    'uk': ['uk_kids.jpg', 'uk_kids2_0.jpg', 'uk_kids2_4.jpg'],
    'jp': ['jp_kids.jpg', 'jp_kids2_4.jpg', 'jp_kids2_4.jpg']
  },
  'shoes': {
    'man': ['woman_shoes_1.jpg', 'man_shoes2.jpg'],
    'woman': ['woman_shoes_1.jpg', 'woman_shoes2.jpg'],
    'kids': ['kids_shoes.jpg', 'kids_shoes2_0.jpg', 'kids_shoes2_4.jpg']
  }
};
var sitePattern = {
  'www.amazon.com': {
    'coun': 'us',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div', '#tmmSwatches'],
    'position': 'after'
  },
  'www.amazon.co.jp': {
    'coun': 'jp',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.fr': {
    'coun': 'fr',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.de': {
    'coun': 'uk',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.co.uk': {
    'coun': 'uk',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.amazon.ca': {
    'coun': 'uk',
    'dom': ['#corePriceDisplay_desktop_feature_div', '#price_feature_div', '#unifiedPrice_feature_div'],
    'position': 'after'
  },
  'www.6pm.com': {
    'coun': 'us',
    'dom': ['.mGIQz', '#itemInformation'],
    'position': 'before'
  }
};
var insertSize = function insertSize(headimg, itemimg) {
  /*插入尺码帮助内容*/
  var Html = '<img src="http://s1.' + G.extName + '.com/images/extensions/{{imgurl}}">';
  $('.size_s').empty().append(template.compile(Html)({
    'imgurl': headimg
  }));
  $('.size_item_img').empty().append(template.compile(Html)({
    'imgurl': itemimg
  }));
};
var calDetailPos = function calDetailPos() {
  var wWeight = ($(window).width() - 595) / 2;
  var wHeight = ($(window).height() - 420) / 2;
  return {
    'posx': wWeight,
    'posy': wHeight
  };
};
var render_size_detail = function render_size_detail() {
  var html = __webpack_require__(436);
  $('body').append(template.compile(html)({
    pos: calDetailPos()
  }));
};
var getClothes = function getClothes(t, c) {
  switch (t) {
    case '男装':
      return clothesDict['shangyi'][c]['man'];
    case '女装':
      return clothesDict['shangyi'][c]['woman'];
    case '童装':
      return clothesDict['kidscloth'][c];
    case '男鞋':
      return clothesDict['shoes']['man'];
    case '女鞋':
      return clothesDict['shoes']['woman'];
    case '童鞋':
      return clothesDict['shoes']['kids'];
  }
};
var addSizeEvent = function addSizeEvent() {
  /*添加尺码部分事件*/
  $('.closebar').on('click', function () {
    $(this).parent().hide();
  });
  $('.clothes_nav li').on('click', function () {
    $('.clothes_nav li').removeClass('select');
    $(this).addClass('select');
    var txt = $(this).text();
    var c = getClothes(txt, country);
    if (txt.indexOf('鞋') > -1) {
      $('.unit_cm').css('display', 'none');
      $('.unit_mm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shoes').css('display', 'inline-block');
      if (txt.indexOf('男鞋') > -1) {
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes man_foot');
        $('.detail_left .shoes').text(txt);
      } else if (txt.indexOf('女鞋') > -1) {
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes woman_foot');
        $('.detail_left .shoes').text(txt);
      } else {
        $('#size_detail .shoes').hide();
        $('.cloth_icon').css('display', 'inline-block');
        $('.tongxie').css('display', 'inline-block');
        $('.tongxie0').addClass('size_hover');
        $('.tongxie4').removeClass('size_hover');
        $('.cloth_icon').attr('class', '').addClass('cloth_icon ht_shoes kids_foot');
      }
    } else if (txt.indexOf('童装') > -1) {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('#size_detail .tongzhuang').css('display', 'inline-block');
      $('.cloth_icon').css('display', 'inline-block');
      $('.cloth_icon').attr('class', '').addClass('cloth_icon kid0');
      $('.tongzhuang0').addClass('size_hover');
      $('.tongzhuang4').removeClass('size_hover');
    } else if (txt.indexOf('男装') > -1) {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shangyi').show();
      $('#size_detail .xiazhuang').show();
      $('.xiazhuang').removeClass('size_hover');
      $('.shangyi').addClass('size_hover');
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');
    } else {
      $('.unit_mm').css('display', 'none');
      $('.unit_cm').css('display', 'inline-block');
      $('#size_detail .detail_left span').hide();
      $('.cloth_icon').css('display', 'inline-block');
      $('#size_detail .shangyi').show();
      $('#size_detail .xiazhuang').show();
      $('.xiazhuang').removeClass('size_hover');
      $('.shangyi').addClass('size_hover');
      if (txt.indexOf('男装') > -1) $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');else $('.cloth_icon').attr('class', '').addClass('cloth_icon womanshangzhuang');
    }

    insertSize(c[0], c[1]);
  });

  $('.shangyi').on('click', function () {
    if ($(this).attr('class').indexOf('size_hover') > -1) return;
    var txt = $('.clothes_nav li[class="select"]').text();
    if (txt == "童装") return;
    if (txt == "男装") {
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manshangzhuang');
    }
    if (txt == "女装") {
      $('.cloth_icon').attr('class', '').addClass('cloth_icon womanshangzhuang');
    }
    var c = getClothes(txt, country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.xiazhuang').removeClass('size_hover');
  });
  $('.xiazhuang').on('click', function () {
    if ($(this).attr('class').indexOf('size_hover') > -1) return;
    var txt = $('.clothes_nav li[class="select"]').text();
    if (txt == "童装") return;
    if (txt == "男装") {
      var c = clothesDict['xiazhuang'][country]['man'];
      insertSize(c[0], c[1]);
      $('.cloth_icon').attr('class', '').addClass('cloth_icon manxiazhuang');
    }
    if (txt == "女装") {
      var c = clothesDict['xiazhuang'][country]['woman'];
      insertSize(c[0], c[1]);
      $('.cloth_icon').attr('class', '').addClass('cloth_icon womanxiazhuang');
    }
    $(this).addClass('size_hover');
    $('.shangyi').removeClass('size_hover');
  });
  $('.tongzhuang0').on('click', function () {
    var c = getClothes('童装', country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.tongzhuang4').removeClass('size_hover');
    $('.cloth_icon').attr('class', '').addClass('cloth_icon kid0');
  });
  $('.tongzhuang4').on('click', function () {
    var c = getClothes('童装', country);
    insertSize(c[0], c[2]);
    $(this).addClass('size_hover');
    $('.tongzhuang0').removeClass('size_hover');
    $('.cloth_icon').attr('class', '').addClass('cloth_icon kid4');
  });
  $('.tongxie0').on('click', function () {
    var c = getClothes('童鞋', country);
    insertSize(c[0], c[1]);
    $(this).addClass('size_hover');
    $('.tongxie4').removeClass('size_hover');
  });
  $('.tongxie4').on('click', function () {
    var c = getClothes('童鞋', country);
    insertSize(c[0], c[2]);
    $(this).addClass('size_hover');
    $('.tongxie0').removeClass('size_hover');
  });

  /*尺寸转换*/
  $('.size_help').on('click', function () {
    $('#size_detail').show();
    log('click:haitao:size_help');
    cnzz.log('点击尺码帮助');
  });
  $('.size_xiala').on('mouseenter', function () {
    $(this).next('.size_xialabox').show();
    $(this).addClass('msHover');
  });
  $('.size_xiala').on('mouseleave', function () {
    var that = this;
    timer = setTimeout(function () {
      $(that).next('.size_xialabox').hide();
      $(that).removeClass('msHover');
    }, 100);
  });
  $('.size_xialabox').on('mouseenter', function () {
    clearTimeout(timer);
  });
  $('.size_xialabox').on('mouseleave', function () {
    $(this).hide();
  });
  $('.size_xialabox a').on('click', function () {
    var txt = $(this).text();
    var c = $(this).parent().attr('data-size');
    $('.' + c).val(txt);
    $(this).parent().hide();
    conversionSize();
  });

  $('#first_size').on('keyup', function () {
    conversionSize();
  });
};

var conversionSize = function conversionSize() {
  /*尺码转换*/
  var first = $('.first_xiala').val();
  var second = $('.second_xiala').val();
  var num = $('#first_size').val();
  if (num) num = Number(num);
  var n1 = sizeDict[first];
  var n2 = sizeDict[second];
  var n3 = num * n1 / n2;
  if (n3.toString().indexOf('.') > -1) n3 = n3.toFixed(2);
  $('#second_size').val(n3);
};
var getCountry = function getCountry() {
  /*获取页面所属地区*/
  var host = location.host;
  for (var pattern in sitePattern) {
    if (pattern == host) {
      country = sitePattern[pattern]['coun'];
      HOST = pattern;
    }
  }
};
var getContainer = function getContainer() {
  var host = location.host;
  var patterns = sitePattern[host];
  if (!patterns) return false;
  return new Promise(function callee$1$0(resolve) {
    var found, testTimes, dom;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          found = false, testTimes = 0;

        case 1:
          if (!(!found && testTimes < 10)) {
            context$2$0.next = 15;
            break;
          }

          dom = patterns.dom.find(function (dom) {
            return $(dom).length > 0;
          });

          if (!dom) {
            context$2$0.next = 9;
            break;
          }

          found = true;
          console.log('dom found', dom);
          resolve(dom);
          context$2$0.next = 13;
          break;

        case 9:
          testTimes++;
          console.log('waiting for dom', testTimes);
          context$2$0.next = 13;
          return regeneratorRuntime.awrap(new Promise(function (resolve) {
            return setTimeout(resolve, 1000);
          }));

        case 13:
          context$2$0.next = 1;
          break;

        case 15:
        case 'end':
          return context$2$0.stop();
      }
    }, null, _this);
  });
  // for (let i = 0; i < patterns.dom.length; i++) {
  //   if ($(patterns.dom[i]).length > 0) {
  //     return patterns.dom[i];
  //   }
  // }
  // return false;
};
var addCommonEvent = function addCommonEvent() {
  var href = location.href;
  $('#gwd_website_icon').on('click', function (e) {
    e.preventDefault();
    __webpack_require__(11).openTab();
  });
  $('#gwd_minibar').on('click', function (e) {
    if ($(e.target).hasClass('sizehelp') || $(e.target).parent().hasClass('sizehelp')) {
      $('#size_detail').show();
    }
  });
  $('#ht_favor').on('click', function () {
    if (!G.email) {
      window.location.href = G.c_server + "/user/login?from_url=" + encodeURIComponent(href);
    } else {
      __webpack_require__(437).addFavor(function () {
        window.location.href = G.c_server + "/user/login?from_url=" + encodeURIComponent(href);
      });
    }
  });
  $('.gwd-minibar-bg').on('mouseenter', '.minibar-tab', function () {
    $('#gwd_minibar').addClass('ms_enter');
    $(this).addClass('ms-tab-enter');
    var id = $(this).attr('id');
    $('#' + id + '_detail').show();
    if (id === "mini_price_history") {
      log("minitrend-show");
      __webpack_require__(129).calLineHeight();
    }
  });
  $('.gwd-minibar-bg').on('mouseleave', '.minibar-tab', function () {
    $('#gwd_minibar').removeClass('ms_enter');
    $(this).removeClass('ms-tab-enter');
    $(this).removeClass('ms-tab-enter');
    var id = $(this).attr('id');
    $('body').removeClass('gwd-trend-hover-p');
    $('#' + id + '_detail').hide();
  });
};

var renderMini = function renderMini(dom) {
  $('body').addClass('ht_site');
  var host = location.host;
  var html = __webpack_require__(452);
  var t = template.compile(html)({});
  switch (sitePattern[host]['position']) {
    case 'before':
      $(dom).before(t);
      break;
    case 'after':
      $(dom).after(t);
      break;
  }
  addCommonEvent();

  var store = __webpack_require__(34).getStore();
  new Vue({
    el: '#gwd_mini_remind .minibar-btn-box',
    store: store,
    render: function render(h) {
      return h(MiniBarCollectionButton);
    }
  });
};

function baidufanyi(t, callback) {
  /*百度翻译接口*/
  var url = location.protocol + ('//browser.' + G.extName + '.com/extension?ac=fanyi&string=') + t;
  request.get(url).done(function (data) {
    if (data.trans_result && !data.error_code) {
      var trans = [];
      for (var i = 0; i < data.trans_result.length; i++) {
        trans.push(data.trans_result[i].dst);
      }
      callback(trans);
    } else {
      callback([t]);
    }
  });
}

function requestFanyi(t, callback) {
  /*请求翻译接口*/
  baidufanyi(t, callback);
  log('request:haitao:fanyi');
  cnzz.log('请求划词翻译');
}

function insertFanyi(data) {
  /*插入翻译内容*/
  data = data.join('');
  $('.ht_fanyi').remove();
  var html = '<div class="ht_fanyi" style="top:{{hty}};left:{{htx}}"><span id="ht_top"></span>{{data}}</div>';
  var t = template.compile(html)({
    data: data,
    'htx': calPosition() + 'px',
    'hty': htY + 'px'
  });
  $('body').append(t);
  addFanyiEvent();
}

function calPosition() {
  /*计算插入位置*/
  var pos = 0;
  if (htX > mouseDownX) pos = htX - (htX - mouseDownX) / 2 - 65;else pos = htX + (mouseDownX - htX) / 2 - 65;
  return pos;
}

function editTxt(t) {
  requestFanyi(t, insertFanyi);
}

function addFanyiEvent() {
  $('.ht_fanyi').siblings().on('click', function () {
    $('.ht_fanyi').remove();
  });
}

function getSelect() {
  $('body').on('mousedown', function (e) {
    clearTimeout(timer2);
    mouseDownX = e.pageX;
  });
  $('body').on('mouseup', function (e) {
    timer2 = setTimeout(function () {
      var txt = '';
      htX = e.pageX;
      htY = e.pageY + 20;
      if (window.getSelection) {
        txt = window.getSelection().toString();
      } else if (document.selection) {
        txt = document.selection.createRange().text;
      }
      if (txt == '') return;else editTxt(txt);
    }, 100);
  });
}

function isZiying() {
  if (HOST == 'www.6pm.com') return 'ziying';
  if ($('#merchant-info').length > 0) {
    if (HOST == 'www.amazon.com') {
      if ($('#merchant-info').text().indexOf('sold by Amazon') > -1) return 'ziying';else return 'sanfang';
    }
    if (HOST == 'www.amazon.co.jp') {
      if ($('#merchant-info').text().indexOf('jp が販売') > -1) return 'ziying';else return 'sanfang';
    }
    if (HOST == 'www.amazon.de') {
      if ($('#merchant-info').text().indexOf('Verkauf und Versand durch Amazon') > -1) return 'ziying';else if ($('#merchant-info').text().indexOf('Dispatched from and sold by Amazon') > -1) return 'ziying';else return 'sanfang';
    }
  } else return 'sanfang';
}

module.exports.init = function callee$0$0() {
  var permanent, pattern;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        permanent = userData.get('permanent');

        // if (permanent.sethaitao === "0") return;
        __webpack_require__(453);
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(getContainer());

      case 4:
        pattern = context$1$0.sent;

        getCountry();

        if (pattern) {
          context$1$0.next = 8;
          break;
        }

        return context$1$0.abrupt('return');

      case 8:
        renderMini(pattern);
        getSelect();
        render_size_detail();
        try {
          insertSize(clothesDict['shangyi'][country]['man'][0], clothesDict['shangyi'][country]['man'][1]);
          addSizeEvent();
        } catch (e) {
          console.error(e);
        }
        setTimeout(function () {
          // check_favor()
        }, 1000);

      case 13:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.getHtInfo = function () {
  var obj = {};
  obj.HOST = HOST;
  obj.protype = isZiying();
  return obj;
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5), __webpack_require__(17)["default"]))

/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pos = $data.pos;
    $$out += '<div id="size_detail" class="ht_size_detail gwd_haitao" style="top: ';
    $$out += $escape(pos.posy);
    $$out += 'px;left: ';
    $$out += $escape(pos.posx);
    $$out += 'px;">\n    <span class="closebar closebg" title="关闭"></span>\n    \n    <div class="size_head">\n        <div class="clothes_nav">\n          <ul>\n            <li class="select">男装</li>\n            <li>女装</li>\n            <li>童装</li>\n            <li>男鞋</li>\n            <li>女鞋</li>\n            <li>童鞋</li>\n          </ul>\n        </div>\n        <div class="unit_desc unit_cm">单位\uFF1A厘米(CM)</div>\n        <div class="unit_desc unit_mm">单位\uFF1A毫米(MM)</div>\n    </div>\n    <div class="size_content">\n      <div class="detail_left">\n        <span class="shangyi size_hover">上装</span>\n        <span class="xiazhuang">下装</span>\n        <span class="tongzhuang tongzhuang0">0 ~ 4岁</span>\n        <span class="tongzhuang tongzhuang4">4 ~ 12岁</span>\n        <span class="shoes">鞋子</span>\n        <span class="tongxie tongxie0">0 ~ 4岁</span>\n        <span class="tongxie tongxie4">4 ~ 12岁</span>\n        <span class="cloth_icon ht_shangyi manshangzhuang"></span>\n      </div>\n      <div class="detail_right">\n        <div class="content_center">\n          <div class="size_s">\n          </div>\n          <div id="size_item">\n            <a class="size_item_img"></a>\n          </div>\n          \n        </div>\n        <div class="size_desc">\n          <span class="red"></span>\n          <span >此尺码为一般尺码\uFF0C不同品牌可能会存在相应不同</span>\n        </div>\n      </div>\n    </div>\n    <div class="size_foot">\n        <div class="size_con">在线尺寸转换工具</div>\n        <div class="size_op">\n          <input id="first_size" type="text">\n          <input class="size_xiala first_xiala" value="厘米" readonly>\n          <div class="size_xialabox" data-size="first_xiala">\n            <a href="javascript:void(0);"></a>\n            <a href="javascript:void(0);">米</a>\n            <a href="javascript:void(0);">厘米</a>\n            <a href="javascript:void(0);">毫米</a>\n            <a href="javascript:void(0);">英尺</a>\n            <a href="javascript:void(0);">英寸</a>\n            <a href="javascript:void(0);">码</a>\n            <a href="javascript:void(0);">尺</a>\n            <a href="javascript:void(0);">寸</a>\n            <a href="javascript:void(0);">分</a>\n            <a href="javascript:void(0);">厘</a>\n          </div>\n          <span class="conversion">转换为</span>\n          <input id="second_size">\n          <input class="size_xiala second_xiala" value="英寸" readonly>\n          <div class="size_xialabox" data-size="second_xiala">\n            <a href="javascript:void(0);"></a>\n            <a href="javascript:void(0);">米</a>\n            <a href="javascript:void(0);">厘米</a>\n            <a href="javascript:void(0);">毫米</a>\n            <a href="javascript:void(0);">英尺</a>\n            <a href="javascript:void(0);">英寸</a>\n            <a href="javascript:void(0);">码</a>\n            <a href="javascript:void(0);">尺</a>\n            <a href="javascript:void(0);">寸</a>\n            <a href="javascript:void(0);">分</a>\n            <a href="javascript:void(0);">厘</a>\n          </div>\n        </div>\n    </div>\n      </div>';
    return $$out;
};

/***/ }),
/* 437 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, Vue, regeneratorRuntime) {

var _this = this;

var template = __webpack_require__(13);
var request = __webpack_require__(3);
var globalCondition = __webpack_require__(4);
var userData = __webpack_require__(15);
var golbal2 = __webpack_require__(43);
var util = __webpack_require__(11);
var miniFavor = __webpack_require__(51);
var userCenter = __webpack_require__(31);
var siteInfo = __webpack_require__(35);

var permanent = undefined,
    oinfo = undefined;

var siteidArr = ['228', '266', '246', '229', '365', '366', '1', '238', '230'];
var showListPrice = function showListPrice(price, dp_id, originUrl) {
  var pattern = dp_id.split('-');
  var siteId = pattern[pattern.length - 1];
  if (price < 0) return '暂时缺货';else {
    if (siteidArr.indexOf(siteId) > -1) {
      var site = siteInfo.isProductPage(originUrl);
      var cur = __webpack_require__(26).getMoneyInfo(site)[0];
      return cur + price.toString().replace(',', '');
    } else {
      return '¥' + price.toString().replace(',', '');
    }
  }
};
var addEvent = function addEvent() {
  $('#topfavor_detail').on('click', '.item_close_btn', function () {
    var id = $(this).attr('data-id');
    delFavor(id);
  });
  $('.favor-list a').on('click', function () {
    console.log($(this));
    if ($(this).attr('data-id')) {
      delFavor($(this).attr('data-id'));
      return false;
    }
    if (!$(this).attr('href')) {
      return false;
    }
    window.open($(this).attr('href'));
    return false;
  });
};
var delFavor = function delFavor(id) {
  id = id.trim();
  oinfo = userData.get('other_info');
  // let url = `${G.c_server}/collect/aj_del?dp_id=${id}`;
  // request.get(url).done((data) => {
  if (id === oinfo.id) {
    store.dispatch('priceRemind/cancel').then(function () {
      $('#topfavor_detail .sp-del').show().fadeOut(3000);
      getFavor(renderList);
    });
  } else {
    userCenter['delete'](id).then(function (data) {
      // -1  失败  1 处理成功   100 未登录
      if (data.code === 1) {
        // if (id == oinfo.now.dp_id) {
        //   $('#topfavor_detail .topf-head .sp-col').text('收藏商品').removeClass('collected')
        // }
        $('#topfavor_detail .sp-del').show().fadeOut(3000);
        getFavor(renderList);
      }
    });
  }
};
var addFavor = function addFavor(callback) {
  var store = __webpack_require__(34).getStore();
  var pagedp = G.dp;
  var dp = oinfo.now;

  store.dispatch('priceRemind/submit', {
    notifySite: '',
    price: '',
    mode: ''
  }).then(function (res) {
    // getFavor(renderList)
    // $('#topfavor_detail .topf-head .sp-col').text('收藏成功').addClass('collected')
  });
  // userCenter.add('', '').then(data => {
  //   if (Number(data.code) === 1 || data.error_code === '1') {
  //     getFavor(renderList)
  //     $('#topfavor_detail .topf-head .sp-col').text('收藏成功').addClass('collected')
  //     $('#ht_favor').text('收藏成功').addClass('collected')
  //     $(`#gwd_mini_remind .minibar-btn-box span`).text(`已添加提醒`);
  //     $('#gwd_mini_remind .minibar-btn-box em').addClass('favored')
  //
  //     if (data.data) {
  //       G.remindInfo = {
  //         remind_price: data.data.notifier.threshold,
  //         is_collected: data.data.id,
  //         has_remind_type: data.data.notifier.type,
  //         remind_type: data.data.notifier.type,
  //         notify_site: data.data.notifier.site
  //       };
  //
  //       miniFavor.setNotifyPrice(data.data.notifier.site, data.data.notifier.threshold)
  //     }
  //
  //     // 更新本地收藏存储
  //     // util.addFavorCheck()
  //   } else if (data.code === '2') {
  //     $('#topfavor_detail .topf-head .sp-col').text('收藏过了').addClass('collected')
  //     $('#ht_favor').text('收藏过了').addClass('collected')
  //     $(`#gwd_mini_remind .minibar-btn-box span`).text(`已添加提醒`);
  //     $('#gwd_mini_remind .minibar-btn-box em').addClass('favored')
  //   } else if (data.code === 100) {
  //     if (callback) callback()
  //   } else {
  //
  //   }
  // })
};

var renderList = function renderList(data) {
  if (typeof data === 'string') {
    data = JSON.parse(data);
  }
  var datasize = data.products.length;
  for (var i = 0; i < datasize; i++) {
    var siteId = data.products[i].dp_id.split('-')[1];
    data.products[i].site_id = siteId;
    data.products[i].newPrice = showListPrice(data.products[i].now_price, data.products[i].dp_id, data.products[i].origin_url);
  }
  var html = __webpack_require__(450);
  $('#topfavor_detail .favor-list').empty().append(template.compile(html)({
    data: data.products,
    imgLoad: G.imgLoad,
    s_server: G.s_server
  }));
  $('.see-all-favor em').text(data.cnt);
  $('.see-all-favor').attr('href', 'https://www.gwdang.com/mine/collection');
  addEvent();
  golbal2.loadImg(0, datasize, $('#topfavor_detail li .item_img img'));
  if (!$('#topfavor_detail').hasClass('islogin')) $('#topfavor_detail').addClass('islogin');
};

var getFavor = function getFavor(callback) {
  userCenter.getList('default', 1, 3).then(function (res) {
    var data = res;
    if (!data.data.list) {
      callback({
        products: [],
        cnt: 0
      });
      return;
    }
    callback({
      products: data.data.list.map(function (item) {
        item.now_price = item.price.last;
        return item;
      }),
      cnt: data.data.cnt
    });
  });
};
var userLogin = function userLogin(u, p, callback) {
  $.ajax({
    type: "post",
    url: 'https://www.' + G.extName + '.com/user/aj_login',
    xhrFields: {
      withCredentials: true
    },
    crossDomain: true,
    data: {
      email: u,
      password: p,
      t: "check",
      host: location.protocol + '//' + location.host
    },
    success: function success(data) {
      callback(data);
      __webpack_require__(50).renderAgain();
    }
  });
};
var addDetailEvent = function addDetailEvent() {
  var stime = undefined,
      isRender = undefined,
      setLeft = undefined;
  $('#topfavor_detail .topf-head span').on('click', function () {
    addFavor();
  });
  $('#topfavor_detail .login_click').on('click', function () {
    var username = $('#topfavor_detail .username').val();
    var psd = $('#topfavor_detail .password').val();
    if (!username || !psd) {
      $('#topfavor_detail .login_remind').show().fadeOut(5000);
      return;
    }
    userLogin(username, psd, function (data) {
      if (data === '1') {
        G.email = username;
        getFavor(renderList);
      } else {
        $('#topfavor_detail .login_remind').show().fadeOut(5000);
      }
    });
  });
  $('body').on('gwd-login-complete', function (e) {
    console.log('fired');
    getFavor(renderList);
  });
  $('#gwdang-favor').on('mouseenter', function () {
    if (G.userLogin && !isRender) {
      isRender = true;
      $('#topfavor_detail').addClass('islogin');
      getFavor(renderList);
    }
    if (permanent.style === 'bottom') {
      setLeft = true;
      util.setSimplePagePos($('#gwdang-favor'), $('#topfavor_detail'), 279);
    }
    $('#topfavor_detail').show();
    $(this).addClass('msHover');
  });
  $('#gwdang-favor').on('mouseleave', function () {
    var that = this;
    stime = setTimeout(function () {
      $('#topfavor_detail').hide();
      $(that).removeClass('msHover');
    }, 100);
  });
  $('#topfavor_detail').on('mouseenter', function () {
    clearTimeout(stime);
  });
  $('#topfavor_detail').on('mouseleave', function () {
    $('#topfavor_detail').hide();
    $('#gwdang-favor').removeClass('msHover');
  });
};

var renderDetail = function renderDetail(dp_id) {
  var store = __webpack_require__(34).getStore();
  var hidebtn = undefined;
  var dom = '#gwdang_main';
  var style = 'top:37px;';
  if (permanent.style === 'bottom') {
    dom = '#bjd_bottom_detail';
    style = 'bottom: 60px;right: 40px;';
  }

  // 改商品没有抓取数据的时候   不能收藏商品
  if (!dp_id || dp_id.match(/^0-\d+$/)) {
    hidebtn = true;
  }
  var imgHost = G.imgHost;
  if (G.from_device === 'firefox') {
    imgHost = G.localImg;
  }
  var homeU = 'https://www.gwdang.com/user/wechat_oauth/?pl=9&op=login&from_url=' + encodeURIComponent(location.href);
  homeU = encodeURIComponent(homeU);
  var wxUrl = 'https://open.weixin.qq.com/connect/qrconnect?appid=wx34006c141f9daa3a&response_type=code&scope=snsapi_login&state=2ced970d5b97680e95670a48d1102611&redirect_uri=' + homeU;
  var html = __webpack_require__(451);
  $(dom).append(template.compile(html)({
    email: G.email,
    userLogin: G.userLogin,
    hidebtn: hidebtn,
    imgHost: imgHost,
    wxUrl: wxUrl,
    pageurl: encodeURIComponent(location.href),
    style: style
  }));
  var CommonLogin = __webpack_require__(52)['default'];
  new Vue({
    el: '#gwd-login-favor',
    render: function render(h) {
      return h(CommonLogin, {
        props: {
          position: 'gwd-favor',
          showAlterLogin: true,
          alterLoginPosition: 'column'
        }
      });
    }
  });
  addDetailEvent(permanent);

  var setCollectedStatus = function setCollectedStatus(newVal) {
    __webpack_require__(6).log('watch triggered', newVal);
    if (newVal) {
      // 已收藏
      $('#topfavor_detail .topf-head .sp-col').text('收藏成功').addClass('collected');
    } else {
      // 未收藏
      $('#topfavor_detail .topf-head .sp-col').text('收藏商品').removeClass('collected');
    }
  };

  setCollectedStatus(store.state.priceRemind.collected);
  store.watch(function (state) {
    return state.priceRemind.collected;
  }, setCollectedStatus);
};

module.exports.init = function callee$0$0() {
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

      case 2:
        permanent = userData.get('permanent');
        oinfo = userData.get('other_info');

        renderDetail(oinfo.now.dp_id);

      case 5:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.addFavor = addFavor;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(17)["default"], __webpack_require__(5)))

/***/ }),
/* 438 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime, G) {

var _this = this;

var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var golbal2 = __webpack_require__(43);
var calWidth = __webpack_require__(53);

var fuzzyPage;

// let rateSite = {
//   '228': 'USD',
//   '229': 'JPY',
//   '238': 'USD',
//   '246': 'EUR'
// }
// let priceSite = {
//   '228': '$',
//   '238': '$',
//   '229': '日元',
//   '246': 'EUR'
// }
var globalInfo = {};

// const fixedPrice = (price) => {
//   if (!price) return price;
//   try {
//     let priarr = price.split('.');
//     price = priarr[0].replace(',', '');
//     if (Number(price) > 99999) {
//       price = priarr[0];
//     } else {
//       price = priarr[0] + '.' + priarr[1];
//     }
//   } catch (e) {
//     require('common/log')('b2cCompare:fixedPrice:error')
//     return price;
//   }

//   return price;
// }
// const transRate = (dp) => {
//   if (dp.price_rmb) return dp;
//   let parseprice = require('parseprice');
//   if (!dp.dp_id) return dp;
//   let site_id = dp.dp_id.split('-')[1];
//   let type = site_id && rateSite[site_id];
//   if (!type) return dp;
//   let price2 = parseprice(dp.price, type)
//   let price3 = fixedPrice(dp.price);
//   if (site_id == '229') {
//     dp.price_rmb = price2 + `(${price3}${priceSite[site_id]})`;
//   } else {
//     dp.price_rmb = price2 + `(${priceSite[site_id]}${price3})`;
//   }
//   dp.price = price2;
//   return dp;
// }
// const editData = (data) => {
//   var len = data.store && data.store.length;
//   if (len && len > 0) {
//     for (let i = 0; i < len; i++) {
//       data.store[i].price = (Number(data.store[i].price) / 100).toFixed(2)
//     }
//   }
//   let len2 = data.product.length;
//   if (len)
//     data.store2 = data.store.slice(0, 6);
//   else
//     len = len2;
//   return len;
// }
var renderBtnTop = function renderBtnTop(price, isFuzzy) {
  var t = '商城';
  if (isFuzzy) {
    t = '商城相似款';
  }
  var html = __webpack_require__(64);
  $('#b2c_compare').append(html({
    store_tle: t,
    min_price: price
  })).css("display", "block");
};

var renderTopDetail = function renderTopDetail() {
  var widthObj, showListNum, turnpW, productW, dp_query, html, len, storeLen, pages;
  return regeneratorRuntime.async(function renderTopDetail$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        widthObj = calWidth.init();
        showListNum = widthObj.b2cShowListNum;
        turnpW = widthObj.b2cTurnpW;
        productW = widthObj.b2cProductW;
        dp_query = userData.get('dp_query');
        html = __webpack_require__(439);

        if (fuzzyPage) {
          html = __webpack_require__(440);
          showListNum = widthObj.showListNum;
          turnpW = widthObj.turnpW;
          productW = widthObj.allProductW;
        }
        if (G.site && G.site.indexOf('amazon') > -1) turnpW = turnpW - 1;
        len = globalInfo['b2c_compare'].product.length;
        storeLen = globalInfo['b2c_compare'].store && globalInfo['b2c_compare'].store.length;
        pages = Math.ceil(len / showListNum);

        if (!len) {
          context$1$0.next = 14;
          break;
        }

        context$1$0.next = 14;
        return regeneratorRuntime.awrap(Promise.all(globalInfo['b2c_compare'].product.map(function (x) {
          return new Promise(function (resolve) {
            if (['8', '83', '123'].indexOf(x.site_id) > -1) {
              __webpack_require__(33).init(x.url_crc, '30001', function (data) {
                console.log('coupon data', data);
                if (data && data.data) {
                  var couponVal = data.data.coupon.coupon_money;
                  x.promotions = [{
                    type: 'coupon',
                    text: couponVal + '元券'
                  }];
                  x.coupon2 = [couponVal + '元券'];
                }
                resolve();
              });
            } else {
              resolve();
            }
          });
        })));

      case 14:
        globalInfo['b2c_compare'].product = globalInfo['b2c_compare'].product.map(function (item) {
          var s = __webpack_require__(26).getMoneyInfo(item.site_id);
          if (s) {
            item.unit = s[0];
          }
          return item;
        });
        $('#b2c_compare').append(html({
          data: globalInfo['b2c_compare'],
          storeLen: storeLen,
          pages: pages,
          now_dp_id: dp_query.dp.dp_id,
          width: turnpW,
          imgLoad: G.imgLoad,
          productW: productW
        }));
        golbal2.loadImg(0, showListNum, $('#b2c-item-list li .small-img img'));
        //$('#b2c_compare').find('.top-bar-detail').show()

        if (G.site === 'suning') {
          $('#b2c_compare').on('click', 'a', function (e) {
            var url = $(this).attr('href');
            if ($(this).find('.coupon_span')) return;
            if (url && url.indexOf('http') > -1) {
              window.open($(this).attr('href'));
              e.preventDefault();
            }
          });
        }

      case 18:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var renderTop = function renderTop(data) {
  if (data && data.b2c && !(data.b2c instanceof Array)) {
    globalInfo['b2c_compare'] = data.b2c;
    if (Number(data.b2c.min_price) && data.b2c.store.length > 0 && data.b2c.product.length > 0) renderBtnTop(data.b2c.min_price);
  } else if (data && data.b2c_fuzzy && !(data.b2c_fuzzy instanceof Array) && data.b2c_fuzzy.product.length > 0) {
    globalInfo['b2c_compare'] = data.b2c_fuzzy;
    fuzzyPage = true;
    if (Number(data.b2c_fuzzy.min_price)) renderBtnTop(data.b2c_fuzzy.min_price, true);
  }
};

var renderBottom = function renderBottom(data) {
  __webpack_require__(130).init(data);
};

module.exports.init = function (style, data) {
  if (G.aliSite) return;
  // 根据style决定加载顶部还是底部
  if (style === 'top') {
    renderTop(data);
  } else {
    renderBottom(data);
  }
};
module.exports.renderTopDetail = renderTopDetail;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pages = $data.pages, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, now_dp_id = $data.now_dp_id, storeLen = $data.storeLen, productW = $data.productW, imgLoad = $data.imgLoad, width = $data.width;
    $$out += '<div id="gwdang-b2c-dp-detail" class="panel gwd_compare top-compare-detail top-bar-detail">\n  <div class="panel-wrap">\n    <div class="b2c-pages blkcolor4">\n      第&nbsp;\n      <span class="current-page" id="b2c-current-page">1</span>\n      &nbsp;页\uFF0C共\n      <span class="page-num blkcolor4" id="b2c-page-num">';
    $$out += $escape(pages);
    $$out += '</span>\n      &nbsp;页\n    </div>\n    <ul class="buy-list">\n      <li><b class="blkcolor1">正品商城在卖\uFF1A</b></li>\n      ';
    $each(data.store2, function ($value, $index) {
        $$out += '\n      <li>\n        <img class="store" src="';
        $$out += $escape($value.icon_url);
        $$out += '">\n        <a href="';
        $$out += $escape($value.url);
        $$out += '" title="';
        $$out += $escape($value.site_name);
        $$out += '" target="_blank">\n          <span class="gwd_title blkcolor2">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n          ';
        if ($value.more > 1) {
            $$out += '\n          <span class="more">(';
            $$out += $escape($value.more);
            $$out += ')款</span>\n          ';
        }
        $$out += '\n          <span class="price prifontf">\xA5';
        $$out += $escape($value.price2);
        $$out += '</span>\n        </a>\n      </li>\n      ';
    });
    $$out += '\n      <li class="see-all-list">\n      <a href="http://www.gwdang.com/dp';
    $$out += $escape(now_dp_id);
    $$out += '/where_buy/?from=browser&crc64=1&m=b2c#tabs"target="_blank">\n        <span class="show-all blkcolor4">查看全部商家(';
    $$out += $escape(storeLen);
    $$out += ')</span>\n      </a>\n      </li>\n    </ul>\n    <div class="left-page turn-page">\n      <a id="b2c-prev-page" target="_self" title="上一页" href="javascript:" class="gwd_bg"></a>\n    </div>\n    <div class="all-products" style="width:';
    $$out += $escape(productW);
    $$out += 'px">\n      <ul id="b2c-item-list">\n        ';
    $each(data.product, function ($value, $index) {
        $$out += '\n          <li id="b2c-prod-item-';
        $$out += $escape($index);
        $$out += '" >\n            <a id="img-';
        $$out += $escape($value.dp_id);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank" class="small-img" href="';
        $$out += $escape($value.url);
        $$out += '">\n              <img src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.img_url);
        $$out += '" id="dp-image-small-';
        $$out += $escape($value.dp_id);
        $$out += '" class="gwdang-lazy">\n            </a>\n            <a target="_blank" class="b2c-other-info"  href="';
        $$out += $escape($value.url);
        $$out += '">\n              <div class="priceinfo-box">\n                <div class="center-box">\n                  <span class="gwd-price prifontf">\xA5';
        $$out += $escape($value.price_rmb ? $value.price_rmb : $value.price);
        $$out += '</span>\n                  ';
        if ($value.promo2) {
            $$out += '\n                  <span class="dp-promotion gwd_bg">\n                    <div class="dp-promotion-detail">\n                      ';
            $each($value.promo2, function ($value, $index) {
                $$out += '\n                        <span class="dp-pro-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                  ';
        if ($value.coupon2) {
            $$out += '\n                  <span class="dp-coupon gwd_bg">\n                    <div class="dp-coupon-detail">\n                      ';
            $each($value.coupon2, function ($value, $index) {
                $$out += '\n                        <span class="dp-coupon-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                  ';
        if ($value.yushou2) {
            $$out += '\n                  <span class="dp-yushou gwd_bg">\n                    <div class="dp-yushou-detail">\n                      ';
            $each($value.yushou2, function ($value, $index) {
                $$out += '\n                        <span class="dp-pro-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                </div>\n              </div>\n              \n              <span class="b2c-store blkcolor1">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n              ';
        if ($value.promodom) {
            $$out += '\n              <span id="';
            $$out += $escape($value.dp_id);
            $$out += '_promotion">';
            $$out += $escape($value.promodom);
            $$out += '</span>\n              ';
        }
        $$out += '\n              <span class="b2c-fees blkcolor4">';
        $$out += $escape($value.comment_num ? '评论数:' + $value.comment_num : $value.fee);
        $$out += '</span>\n              <span class="b2c-tle blkcolor1">';
        $$out += $escape($value.title);
        $$out += '</span>\n            </a>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <div class="right-page turn-page">\n      <a id="b2c-next-page" title="下一页" target="_self" href="javascript:" class="gwd_bg"></a>\n    </div>\n  </div>\n  <style type="text/css">\n    #gwdang-b2c-dp-detail .turn-page {\n      width: ';
    $$out += $escape(width);
    $$out += 'px;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 440 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pages = $data.pages, productW = $data.productW, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, imgLoad = $data.imgLoad, width = $data.width;
    $$out += '<div id="gwdang-b2c_fuzzy-dp-detail" class="panel gwd_compare top-compare-detail top-bar-detail">\n  <div class="panel-wrap">\n    <div class="b2c-pages blkcolor4">\n      第 \n      <span class="current-page" id="b2c-current-page">1</span>\n       页\uFF0C共 \n       <span class="page-num blkcolor4" id="b2c-page-num">';
    $$out += $escape(pages);
    $$out += '</span>\n        页\n    </div>\n    <div class="left-page turn-page" style="left:10px;">\n      <a id="fuzzy-prev-page" target="_self" title="上一页" class="gwd_bg"></a>\n    </div>\n    <div class="all-products" style="width:';
    $$out += $escape(productW);
    $$out += 'px">\n      <ul id="b2c-item-list">\n        ';
    $each(data.product, function ($value, $index) {
        $$out += '\n          <li id="b2c_fuzzy-prod-item-';
        $$out += $escape($index);
        $$out += '" >\n            <a id="img-';
        $$out += $escape($value.dp_id);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank" class="small-img" href="';
        $$out += $escape($value.url);
        $$out += '">\n              <img src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.img_url);
        $$out += '" id="dp-image-small-';
        $$out += $escape($value.dp_id);
        $$out += '" class="gwdang-lazy">\n            </a>\n            <a target="_blank" class="b2c-other-info"  href="';
        $$out += $escape($value.url);
        $$out += '">\n              <div class="priceinfo-box">\n                <div class="center-box">\n                  <span class="gwd-price prifontf">';
        $$out += $escape($value.unit ? $value.unit : '\xA5');
        $$out += $escape($value.price_rmb ? $value.price_rmb : $value.price);
        $$out += '</span>\n                  ';
        if ($value.promo2) {
            $$out += '\n                  <span class="dp-promotion gwd_bg">\n                    <div class="dp-promotion-detail">\n                      ';
            $each($value.promo2, function ($value, $index) {
                $$out += '\n                        <span class="dp-pro-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                  ';
        if ($value.coupon2) {
            $$out += '\n                  <span class="dp-coupon gwd_bg">\n                    <div class="dp-coupon-detail">\n                      ';
            $each($value.coupon2, function ($value, $index) {
                $$out += '\n                        <span class="dp-coupon-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                  ';
        if ($value.yushou2) {
            $$out += '\n                  <span class="dp-yushou gwd_bg">\n                    <div class="dp-yushou-detail">\n                      ';
            $each($value.yushou2, function ($value, $index) {
                $$out += '\n                        <span class="dp-pro-item">';
                $$out += $escape($value);
                $$out += '</span>\n                      ';
            });
            $$out += '\n                    </div>\n                  </span>\n                  ';
        }
        $$out += '\n                </div>\n              </div>\n              \n              <span class="b2c-store blkcolor1">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n              ';
        if ($value.promodom) {
            $$out += '\n              <span id="';
            $$out += $escape($value.dp_id);
            $$out += '_promotion">';
            $$out += $value.promodom;
            $$out += '</span>\n              ';
        }
        $$out += '\n              <span class="b2c-fees blkcolor4">';
        $$out += $escape($value.comment_num ? '评论数:' + $value.comment_num : $value.fee);
        $$out += '</span>\n              <span class="b2c-tle blkcolor1">';
        $$out += $escape($value.title);
        $$out += '</span>\n            </a>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <div class="right-page turn-page">\n      <a role="button" id="fuzzy-next-page" class="gwd_bg" title="下一页"></a>\n    </div>\n  </div>\n  <style type="text/css">\n    #gwdang-b2c_fuzzy-dp-detail {\n      display: none;\n    }\n  #gwdang-b2c_fuzzy-dp-detail .turn-page {\n    width: ';
    $$out += $escape(width);
    $$out += 'px;\n  }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', pages = $data.pages, $escape = $imports.$escape, detailW = $data.detailW, showpages = $data.showpages, turnpW = $data.turnpW, prowidth = $data.prowidth, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, sale_tle = $data.sale_tle, link = $data.link;
    $$out += '<div class="btcom-detail ';
    if (pages > 1) {
        $$out += ' hasmorepage ';
    }
    $$out += '" style="width:';
    $$out += $escape(detailW);
    $$out += 'px;';
    if (showpages) {
        $$out += 'left:0px;';
    }
    $$out += '">\n  ';
    if (showpages) {
        $$out += '\n  <div class="turnpage-div turnpage-left" style="width:';
        $$out += $escape(turnpW);
        $$out += 'px;height: 100%;">\n    <span class="gwd_bg turnleft"></span>\n  </div>\n  ';
    }
    $$out += '\n  <div class="all-products" style="';
    if (showpages) {
        $$out += ' width:';
        $$out += $escape(prowidth);
        $$out += 'px; ';
    }
    $$out += '">\n    <ul class="btcom-list">\n      ';
    $each(data, function ($value, $index) {
        $$out += '\n        <li class="dp-index-';
        $$out += $escape($index);
        $$out += '">\n          <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="com-item-img">\n            <img ';
        $$out += 'src="https://cdn.gwdang.com/images/extensions/newbar/120.gif"';
        $$out += ' data-src="';
        $$out += $escape($value.img_url);
        $$out += '">\n            ';
        if ($value.tspan) {
            $$out += '\n                ';
            $$out += $value.tspan;
            $$out += '\n            ';
        }
        $$out += '\n          </a>\n          <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" class="com-item-otinfo">\n            ';
        if ($value.ta) {
            $$out += '\n              ';
            $$out += $value.ta;
            $$out += '\n            ';
        } else {
            $$out += '\n              <div class="priceinfo-box">\n                <div class="center-box">\n                  <span class="com-price prifontf">\xA5';
            $$out += $escape($value.price);
            $$out += '</span>\n                  ';
            if ($value.promo2) {
                $$out += '\n                  <span class="dp-promotion gwd_bg">\n                    <div class="dp-promotion-detail">\n                      ';
                $each($value.promo2, function ($value, $index) {
                    $$out += '\n                        <span class="dp-pro-item">';
                    $$out += $escape($value);
                    $$out += '</span>\n                      ';
                });
                $$out += '\n                    </div>\n                  </span>\n                  ';
            }
            $$out += '\n                  ';
            if ($value.coupon2) {
                $$out += '\n                  <span class="dp-coupon gwd_bg">\n                    <div class="dp-coupon-detail">\n                      ';
                $each($value.coupon2, function ($value, $index) {
                    $$out += '\n                        <span class="dp-coupon-item">';
                    $$out += $escape($value);
                    $$out += '</span>\n                      ';
                });
                $$out += '\n                    </div>\n                  </span>\n                  ';
            }
            $$out += '\n                  ';
            if ($value.yushou2) {
                $$out += '\n                  <span class="dp-yushou gwd_bg">\n                    <div class="dp-yushou-detail">\n                      ';
                $each($value.yushou2, function ($value, $index) {
                    $$out += '\n                        <span class="dp-pro-item">';
                    $$out += $escape($value);
                    $$out += '</span>\n                      ';
                });
                $$out += '\n                    </div>\n                  </span>\n                  ';
            }
            $$out += '\n                </div>\n              </div>\n              \n            ';
        }
        $$out += '\n            <span class="com-store blkcolor1">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n            ';
        if ($value.comment_num) {
            $$out += '\n            <span class="com-fee blkcolor4">';
            $$out += $escape($value.comment_num ? '评论数:' + $value.comment_num : $value.fee);
            $$out += '</span>\n            ';
        } else if (sale_tle) {
            $$out += '\n              <span class="com-fee blkcolor4">';
            $$out += $escape(sale_tle);
            $$out += $escape($value.volume);
            $$out += '件</span>\n            ';
        } else {
            $$out += '\n              <span class="com-fee blkcolor4">';
            $$out += $escape($value.fee);
            $$out += '</span>\n            ';
        }
        $$out += '\n            <p class="com-tle" title="';
        $$out += $escape($value.title);
        $$out += '">\n              ';
        $$out += $escape($value.title);
        $$out += '\n            </p>\n          </a>\n        </li>\n      ';
    });
    $$out += '\n    </ul>\n  </div>\n  ';
    if (showpages) {
        $$out += '\n    ';
        if (link && sale_tle) {
            $$out += '\n    <a href="';
            $$out += $escape(link);
            $$out += '" target="_blank" class="tb-morelink blkcolor4">查看全部结果<em class="see_all_icon">></em></a>\n    ';
        }
        $$out += '\n  <div class="turnpage-div turnpage-right" style="width:';
        $$out += $escape(turnpW);
        $$out += 'px;height: 100%;">\n    <span class="gwd_bg turnright"></span>\n  </div>\n  <div class="bjd-pages blkcolor4">\n      第&nbsp;\n      <span class="current-page">1</span>\n      &nbsp;页\uFF0C共\n      <span class="page-num blkcolor4">';
        $$out += $escape(pages);
        $$out += '</span>\n      &nbsp;页\n  </div>\n  ';
    }
    $$out += '\n</div>';
    return $$out;
};

/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var userData = __webpack_require__(15);
var request = __webpack_require__(3);
var calWidth = __webpack_require__(53);
// const replaceHref = require('common/replaceHref')
var golbal2 = __webpack_require__(43);
var htmlObj = {
  'taobao': __webpack_require__(443),
  'tmall': __webpack_require__(444)
};

var tmData = {};

var renderBtnTop = function renderBtnTop(data) {
  var html = __webpack_require__(64);
  data.ss = 0;
  if (data.tmall.length !== 0 && data.tmall.product) {
    $('#tm_compare').append(html({
      store_tle: '天猫',
      min_price: data.tmall.min_price
    })).css("display", "block");
    tmData['tmall'] = data.tmall;
    data.ss++;
    data.tmm = true;
    renderTopDetail('tmall');
  }

  if (data.taobao.length !== 0 && data.taobao.product) {
    $('#tb_compare').append(html({
      store_tle: '淘宝',
      min_price: data.taobao.min_price
    })).css("display", "block");
    tmData['taobao'] = data.taobao;
    data.ss++;
    data.tbb = true;
    renderTopDetail('taobao');
  }
  __webpack_require__(43).autoFixWidth();
  userData.set('tbData', data);

  if (G.site === 'suning') {
    $('#tb_compare, #tm_compare').on('click', 'a', function (e) {
      if ($(this).find('.coupon_span')) return;
      var url = $(this).attr('href');
      if (url && url.indexOf('http') > -1) {
        window.open($(this).attr('href'));
        e.preventDefault();
      }
    });
  }
};
var render = function render(data) {
  var permanent = userData.get('permanent');
  if (permanent.style === 'top') {
    renderTop(data);
  } else {
    __webpack_require__(130).renderBt(data);
  }
};
var renderTopDetail = function renderTopDetail(id) {
  var data = tmData[id];
  // if (!G.aliSite && G.from_device !== '360')
  //   replaceHref.init(id, data.product, '&column=b2c')
  var len = data.product.length;
  var str = 'tb';
  if (id === 'tmall') str = 'tm';
  var widthObj = calWidth.init();
  var sale_tle = "最近销量";
  if (data.from_self === true) sale_tle = "总销量";
  var html = htmlObj[id];
  var pages = Math.ceil(len / widthObj.showListNum);
  $('#' + str + '_compare').append(html({
    data: data.product,
    s_server: G.s_server,
    width: widthObj.turnpW,
    link: data.more_link,
    pages: pages,
    imgLoad: G.imgLoad,
    sale_tle: sale_tle,
    allProductW: widthObj.allProductW
  }));
  if (G.from_device !== '360') __webpack_require__(65).init(data.product, id, false, data.min_price);
  // $(`#gwdang-${id}-dp-detail`).show()
};
var renderTop = function renderTop(data) {
  renderBtnTop(data);
};
var getTmInfo = function getTmInfo(callback) {
  var code_server = '1';
  var other_info = userData.get('other_info');
  var msg = other_info.exact_arr;
  var code = other_info['code-server'];
  var coreword = encodeURIComponent(other_info.now.coreword);
  if (!code) {
    code = {};
    code_server = '0';
  }
  var price = G.dp.price * 100;
  var url = G.server + '/brwext/tbres?union=' + G.union + '&url=' + encodeURIComponent(msg.url) + '&site=' + msg.site + '&isbn=' + msg.isbn + '&keywords=' + encodeURIComponent(msg.keywords) + '&brand=' + encodeURIComponent(msg.brand) + '&type=' + encodeURIComponent(msg.type) + '&price=' + price + '&class_id=' + msg.class_id + '&name=' + encodeURIComponent(G.dp.name) + '&code_brand_id=' + code.brand_id + '&code_clean_title=' + encodeURIComponent(code.clean_title) + '&code_code=' + code.code + '&code_display_brand=' + encodeURIComponent(code.display_brand) + '&code_brand=' + encodeURIComponent(code.brand) + '&code_class_id=' + encodeURIComponent(code.class_id) + '&code_price=' + encodeURIComponent(code.price) + '&code_spec=' + encodeURIComponent(code.spec) + '&code-server=' + code_server + '&coreword=' + coreword + '&catid=' + G.dp.cat_id;
  request.get(url).done(function (data) {
    if (data) {
      if (G.site == 'taobao' || G.site == 'tmall') {
        getUniqPid(data, function (mm) {
          callback(mm);
        });
      } else {
        getImgSearch(data, function (mm) {
          callback(mm);
        });
      }
    }
  });
};

var getImgSearch = function getImgSearch(msg, callback) {
  var buildTaobaoUrl = __webpack_require__(28);
  msg = buildTaobaoUrl.buildCommon(msg);
  if (G.btype == 'luyou') {
    callback(msg);
    return;
  }
  var dataShare = __webpack_require__(132);
  var brandId = dataShare.get('dp_data') && dataShare.get('dp_data')['exact_arr']['brand_id'];
  if (G.site == '360buy' && brandId && (!msg.taobao.sort || !msg.tmall.sort)) {
    // 在京东有brand 有比价结果的情况下， 不走图片检索
    callback(msg);
    return;
  }
  __webpack_require__(133).init(function (data) {
    if (data) {
      if (msg.tmall.sort) msg.tmall = {};
      if (data.tmall.length > 0) {
        msg.tmall.min_price = data.tmall[0].price;
        msg.tmall.max_price = data.tmall[data.tmall.length - 1].price;
        msg.tmall.store = data.tmall;
        msg.tmall.product = data.tmall;
      }
      if (msg.taobao.sort) msg.taobao = {};
      if (data.taobao.length > 0) {
        msg.taobao.product = data.taobao;
        msg.taobao.store = data.taobao;
        msg.taobao.min_price = data.taobao[0].price;
        msg.taobao.max_price = data.taobao[data.taobao.length - 1].price;
      }
      if (!msg.tmall.more_link) msg.tmall.more_link = 'https://s.taobao.com/search?q=' + msg.search.keywords + '&pid=' + msg.search.union;
      if (!msg.taobao.more_link) msg.taobao.more_link = 'https://s.taobao.com/search?q=' + msg.search.keywords + '&pid=' + msg.search.union;
      callback(msg);
    } else {
      callback(msg);
    }
  });
};
var getUniqPid = function getUniqPid(msg, callback) {
  var buildTaobaoUrl = __webpack_require__(28);
  msg = buildTaobaoUrl.buildCommon(msg);
  __webpack_require__(445).getTaobaouniqData(function (data) {
    if (data) {
      if (msg.tmall.sort) {
        msg.tmall = {};
      }
      if (data.tmall.length > 0) {
        msg.tmall.min_price = data.tmall[0].price;
        msg.tmall.max_price = data.tmall[data.tmall.length - 1].price;
        msg.tmall.store = data.tmall;
        msg.tmall.product = data.tmall;
      }
      if (msg.taobao.sort) {
        msg.taobao = {};
      }
      if (data.taobao.length > 0) {
        msg.taobao.product = data.taobao;
        msg.taobao.store = data.taobao;
        msg.taobao.min_price = data.taobao[0].price;
        msg.taobao.max_price = data.taobao[data.taobao.length - 1].price;
      }
      if (!msg.tmall.more_link) msg.tmall.more_link = 'https://s.taobao.com/search?q=' + msg.search.keywords + '&pid=' + msg.search.union;
      if (!msg.taobao.more_link) msg.taobao.more_link = 'https://s.taobao.com/search?q=' + msg.search.keywords + '&pid=' + msg.search.union;
      callback(msg);
    } else {
      callback(msg);
    }
  });
};

module.exports.init = function () {
  getTmInfo(render);
};

module.exports.renderTopDetail2 = function (id) {
  var widthObj = calWidth.init();
  golbal2.loadImg(0, widthObj.showListNum, $('#' + id + '-item-list li .small-img img'));
  $('#gwdang-' + id + '-dp-detail').show();
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pages = $data.pages, link = $data.link, allProductW = $data.allProductW, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, imgLoad = $data.imgLoad, width = $data.width;
    $$out += '<div class="panel gwd_compare top-compare-detail top-bar-detail" id="gwdang-taobao-dp-detail">\n  <div class="panel-wrap">\n    <div class="b2c-pages blkcolor4">\n      第 \n      <span class="current-page" id="taobao-current-page">1</span>\n       页\uFF0C共 \n       <span class="page-num blkcolor4" id="taobao-page-num">';
    $$out += $escape(pages);
    $$out += '</span>\n        页\n    </div>\n    <div class="left-page turn-page" style="left:10px;">\n      <a id="taobao-prev-page" target="_self" title="上一页" class="gwd_bg" href="javascript:"></a>\n    </div>\n    <a href="';
    $$out += $escape(link);
    $$out += '" target="_blank" class="tb-morelink blkcolor4">查看全部结果<em class="see_all_icon">></em></a>\n    <div class="all-products" style="width:';
    $$out += $escape(allProductW);
    $$out += 'px">\n      <ul id="taobao-item-list">\n        ';
    $each(data, function ($value, $index) {
        $$out += '\n          <li id="taobao-prod-item-';
        $$out += $escape($index);
        $$out += '" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n              <a id="img-';
        $$out += $escape($value.num_iid);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank" class="small-img" href="';
        $$out += $escape($value.url);
        $$out += '">\n                <img src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.pic_url);
        $$out += '" id="dp-image-small-';
        $$out += $escape($value.num_iid);
        $$out += '" class="gwdang-lazy">\n              </a>\n              <a target="_blank" class="b2c-other-info"  href="';
        $$out += $escape($value.url);
        $$out += '">\n                <span class="gwd-price prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n                <span class="b2c-store blkcolor1">';
        $$out += $escape($value.item_location);
        $$out += '</span>\n                <span class="b2c-fees blkcolor4">最近销量';
        $$out += $escape($value.volume);
        $$out += '件</span>\n                <span class="b2c-tle blkcolor1">';
        $$out += $escape($value.title);
        $$out += '</span>\n              </a>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <div class="right-page turn-page">\n      <a href="javascript:" id="taobao-next-page" class="gwd_bg" title="下一页"></a>\n    </div>\n  </div>\n</div>\n  <style type="text/css">\n    #gwdang-taobao-dp-detail {\n      display: none;\n    }\n  #gwdang-taobao-dp-detail .turn-page {\n    width: ';
    $$out += $escape(width);
    $$out += 'px;\n  }\n  </style>';
    return $$out;
};

/***/ }),
/* 444 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pages = $data.pages, link = $data.link, allProductW = $data.allProductW, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, imgLoad = $data.imgLoad, width = $data.width;
    $$out += '<div class="panel gwd_compare top-compare-detail top-bar-detail" id="gwdang-tmall-dp-detail">\n  <div class="panel-wrap">\n    <div class="b2c-pages blkcolor4">\n      第 \n      <span class="current-page" id="tmall-current-page">1</span>\n       页\uFF0C共 \n       <span class="page-num blkcolor4" id="tmall-page-num">';
    $$out += $escape(pages);
    $$out += '</span>\n        页\n    </div>\n    <div class="left-page turn-page" style="left:10px;">\n      <a id="tmall-prev-page" target="_self" title="上一页" class="gwd_bg" href="javascript:"></a>\n    </div>\n    <a href="';
    $$out += $escape(link);
    $$out += '" target="_blank" class="tb-morelink blkcolor4">查看全部结果<em class="see_all_icon">></em></a>\n    <div class="all-products" style="width:';
    $$out += $escape(allProductW);
    $$out += 'px">\n      <ul id="tmall-item-list">\n        ';
    $each(data, function ($value, $index) {
        $$out += '\n          <li id="tmall-prod-item-';
        $$out += $escape($index);
        $$out += '" data-id="';
        $$out += $escape($value.num_iid);
        $$out += '">\n              <a id="img-';
        $$out += $escape($value.num_iid);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank" class="small-img" href="';
        $$out += $escape($value.url);
        $$out += '">\n                <img src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.pic_url);
        $$out += '" id="dp-image-small-';
        $$out += $escape($value.num_iid);
        $$out += '" class="gwdang-lazy">\n              </a>\n              <a target="_blank" class="b2c-other-info"  href="';
        $$out += $escape($value.url);
        $$out += '">\n                <span class="gwd-price prifontf">\xA5';
        $$out += $escape($value.price);
        $$out += '</span>\n                <span class="b2c-store blkcolor1">';
        $$out += $escape($value.nick);
        $$out += '</span>\n                <span class="b2c-fees blkcolor4">最近销量';
        $$out += $escape($value.volume);
        $$out += '件</span>\n                <span class="b2c-tle blkcolor1">';
        $$out += $escape($value.title);
        $$out += '</span>\n              </a>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <div class="right-page turn-page">\n      <a href="javascript:" id="tmall-next-page" class="gwd_bg" title="下一页"></a>\n    </div>\n  </div>\n</div>\n  <style type="text/css">\n    #gwdang-tmall-dp-detail {\n      display: none;\n    }\n  #gwdang-tmall-dp-detail .turn-page {\n    width: ';
    $$out += $escape(width);
    $$out += 'px;\n  }\n  </style>';
    return $$out;
};

/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var communicate = __webpack_require__(18);
var buildTaobaoUrl = __webpack_require__(28);
var globalData = undefined,
    callbacks = undefined;
var hasrun = false;
var timeOUT = 2500;

var getuniqPid = function getuniqPid(id) {
  if (id == '') return;
  var url = G.server + '/extension?ac=getuniqpid&nid=' + id;
  request.get(url).done(function (data) {
    if (data && data.uniqid) {
      sendPid(id, data.uniqid);
    } else {
      requestTaobaoImgSearch();
    }
  });
};
var sendPid = function sendPid(id, pid) {
  var info = {
    'nid': id,
    'uniqid': pid
  };
  communicate.trigger({
    'type': 'getTaobaouniq',
    'info': JSON.stringify(info)
  });
  communicate.on(function (data) {
    if (typeof data === 'string') {
      data = JSON.parse(data);
    }
    if (data.type == 'getTaobaouniq') {
      var text = $('#gwd_uniq_info').text();
      if (text != '') editData(text);
    }
  });
};
var sortData = function sortData(data) {
  if (!data.sort) return;
  data = data.sort(function (value1, value2) {
    if (Number(value1.price) > Number(value2.price)) return 1;else if (Number(value1.price) == Number(value2.price)) return 0;else return -1;
  });
  return data;
};
var editData = function editData(txt) {
  try {
    var data = JSON.parse(txt);
    data = data.mods.recitem.data.items;
    var taobaoarr = [],
        tmallarr = [];
    if (!data) return;
    for (var i = 0, len = data.length; i < len; i++) {
      var item = {};
      var feeDesc = data[i].view_fee == '0.00' ? '包邮' : '';
      item.nick = data[i].nick;
      item.num_iid = data[i].nid;
      item.title = data[i].title;
      item.price = data[i].view_price;
      item.item_location = data[i].item_loc;
      item.store_name = data[i].nick + feeDesc;
      item.pic_url = 'http:' + data[i].pic_url;
      item.volume = data[i].view_sales.replace('人付款', '');
      item.same_style = true;
      var obj = {
        'source': 'same_style',
        'img_url': 'http:' + data[i].pic_url,
        'title': data[i].title,
        'price': data[i].view_price,
        'shop_name': data[i].nick + feeDesc,
        'sales': data[i].view_sales.replace('人付款', ''),
        'id': data[i].nid,
        'url': 'https:' + data[i].detail_url,
        'discuss': data[i].comment_count,
        'istaobao': data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '0' : '1',
        'dp_id': data[i].nid + '-' + (data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'),
        'site_id': data[i].detail_url.indexOf('detail.tmall.com') > -1 ? '83' : '123'
      };
      item.url = buildTaobaoUrl(obj);
      if (data[i].detail_url.indexOf('detail.tmall.com') > -1) {
        tmallarr.push(item);
      } else {
        taobaoarr.push(item);
      }
    }
    taobaoarr = sortData(taobaoarr);
    tmallarr = sortData(tmallarr);

    globalData = {
      'taobao': taobaoarr,
      'tmall': tmallarr
    };
    if (callbacks && !hasrun) {
      callbacks(globalData);
      hasrun = true;
    }
  } catch (e) {}
};
var requestTaobaoImgSearch = function requestTaobaoImgSearch() {
  /*taobao root_id 筛选需要做图片检索的分类*/
  var rootIdArr = ["50510002", "50012029", "50013864", "50011397", "50010404", "1625", "50006842", "50006843", "16", "50011740", "50011699", "50008165", "50008163", "30", "50020857", "50020808", "50013886", "50022517", "122852001", "21", "50468001", "122950001", "50007216"];
  var root_id = G.dp.root_id;
  if (root_id && rootIdArr.indexOf(root_id) > -1) {
    __webpack_require__(133).uniqPidGetImg(function (data) {
      if (callbacks) {
        callbacks(data);
        hasrun = true;
      } else {
        globalData = data;
      }
    });
    timeOUT = 6000;
  } else {
    timeOUT = 1;
  }
};
var getNid = function getNid() {
  if (location.host.indexOf('taobao') > -1 || location.host.indexOf('tmall') > -1) {
    var id = location.href.match(/[?&]id=([0-9]+)/);
    if (id && id.length) {
      id = id[1];
      getuniqPid(id);
    }
  }
};
module.exports.init = function () {
  /*淘宝价格走势*/
  if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    communicate.trigger({
      type: 'get_etao_info'
    });
  }
  if (G.site == 'taobao' || G.site == 'tmall') getNid();
};
module.exports.getTaobaouniqData = function (callback) {
  callback(null);
  // if (globalData) {
  //   callback(globalData)
  //   hasrun = true;
  // } else callbacks = callback;
  // setTimeout(() => {
  //   if (callbacks && hasrun === false) {
  //     callbacks(null)
  //     hasrun = true;
  //   }
  // }, timeOUT)
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 446 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var parseprice = __webpack_require__(21);
var template = __webpack_require__(13);
var userData = __webpack_require__(15);
var log = __webpack_require__(14);
var golbal2 = __webpack_require__(43);
var go_union = __webpack_require__(134);

var runed = undefined;
var amazonName = {
  '1': '中国',
  '228': '美国',
  '229': '日本',
  '246': '德国',
  '266': '英国',
  '365': '法国',
  '366': '加拿大'
};
var amazonCurrency = {
  '228': 'USD',
  '229': 'JPY',
  '246': 'EUR',
  '266': 'GBP',
  '365': 'EUR',
  '366': 'CAD'
};
var amazonMoney = {
  '1': '¥',
  '228': '$',
  '229': '円',
  '246': 'EUR',
  '266': '£',
  '365': 'EUR',
  '366': 'CDN$'
};

var amazonTab = '#' + G.extName + '-amazon-dp';
var amazonDetail = '#' + G.extName + '-amazon-dp-detail';

var reqInfo = function reqInfo(dp_id, callback) {
  var url = G.server + '/extension?ac=amazonGlobal&dp_id=' + dp_id;
  request.get(url).done(function (data) {
    if (data && data.length > 0) {
      callback(data);
    }
  });
};

var editData = function editData(data) {
  for (var i = 0, len = data.length; i < len; i++) {
    var site_id = data[i].dp_id.split('-')[1];
    if (data[i].nowpage === '1') data[i].siteName = amazonName[site_id] + '亚马逊(当前商城)';else data[i].siteName = amazonName[site_id] + '亚马逊';
    var price = (Number(data[i].pri) / 100).toFixed(2);
    var purePrice = '';
    if (site_id !== "1") {
      var price2 = '';
      if (site_id === '229') price2 = price + amazonMoney[site_id];else price2 = amazonMoney[site_id] + price;
      purePrice = parseprice(price, amazonCurrency[site_id]);
      price = '¥' + purePrice + ('(' + price2 + ')');
    } else {
      purePrice = price;
      price = '¥' + price;
    }
    data[i].title = data[i].tle;
    data[i].img_url = data[i].img;
    data[i].site_name = '中国亚马逊';
    data[i].fee = '不同卖家运费不同';
    var obj = {
      'site_id': site_id,
      'url': data[i].url,
      'mod': 'amazon_global',
      'union': G.union.split('_')[1],
      'dp_id': data[i].dp_id
    };
    data[i].url = go_union.init(obj);
    data[i].price = price;
    data[i].purePrice = purePrice;
  }
  data.sort(function (value1, value2) {
    return Number(value1.purePrice) - Number(value2.purePrice);
  });
  return data;
};

var render = function render(data) {
  data = editData(data);
  var permanent = userData.get('permanent');
  if (permanent.style === 'top') {
    renderBtnTop(data[0].pri);
    renderTopDetail(data);
  }
  renderInner(data);
  addEvent();
};

var renderBtnTop = function renderBtnTop(pri) {
  var price = Number(pri) / 100;
  var html = __webpack_require__(64);
  $('#amazon_compare').append(template.compile(html)({
    store_tle: "亚马逊海外购：",
    min_price: price
  })).show();
};

var addEvent = function addEvent() {
  var Time1 = undefined;
  $(amazonTab).on('mouseenter', function () {
    $(amazonDetail).addClass('_mshover');
    $(amazonTab).addClass('_mshover');
    log('track:amazon_global:mshover');
  });
  $(amazonTab).on('mouseleave', function () {
    Time1 = setTimeout(function () {
      $(amazonDetail).removeClass('_mshover');
      $(amazonTab).removeClass('_mshover');
    }, 200);
  });
  $(amazonDetail).on('mouseenter', function () {
    clearTimeout(Time1);
    $(amazonDetail).addClass('_mshover');
    $(amazonTab).addClass('_mshover');
  });
  $(amazonDetail).on('mouseleave', function () {
    $(amazonDetail).removeClass('_mshover');
    $(amazonTab).removeClass('_mshover');
  });
  $('#amazon_dp-item-list li').on('click', function () {
    log('track:amazon_global:click');
  });
};

var renderTopDetail = function renderTopDetail(data) {
  if (runed) {
    $('#amazon_compare').find('.top-compare-detail').show();
    return;
  }
  runed = true;
  var html = __webpack_require__(447);
  var dom = template.compile(html)({
    data: {
      product: data,
      imgLoad: G.imgLoad
    },
    pages: 1
  });
  $('#amazon_compare').append(dom);
  golbal2.loadImg(0, data.length, $('#amazon-item-list li .small-img img'));
  log('track:amazon_global:track');
};
var times = 0;
var renderInner = function renderInner(data) {
  var product = data[0];
  if (!product) return;
  var html = __webpack_require__(448);
  var dom = $('#gwd_ht_main .ht_head');
  if (dom.length === 0 && times < 15) {
    times++;
    setTimeout(function () {
      renderInner(data);
    }, 800);
    return;
  }
  var view = template.compile(html)({
    data: product
  });
  dom.append(view);
  $('#amazon_global_box').append(view).show();
  log('track:amazon_global_inner:track');
  $('#amazon_global').on('click', function () {
    log('track:amazon_global_inner:click');
  });
  renderInnerDetail(data);
};
var renderInnerDetail = function renderInnerDetail(data) {
  var html = __webpack_require__(449);
  var dom = template.compile(html)({
    data: data[0]
  });
  // $('#gwd_ht_main .ht_content').append(dom);
  $('#amazon_global_box').append(dom);
  $('#amazon_global').on('mouseenter', function () {
    var dom = $('#globalInnerDetail');
    if (!dom.is(':visible')) {
      $('.content_default').hide();
      dom.show();
    }
  });
  $('#gwd_minibar').addClass('hasglobal');
  $('#globalInnerDetail .content_default_left a').on('click', function () {
    log('track:amazon_global_inner_detail:click');
  });
};

module.exports.renderTopDetail = renderTopDetail;
module.exports.init = function (dp_id) {
  if (location.host.indexOf('amazon') === -1) return;
  // 暂时屏蔽中国亚马逊 以为只展示中国亚马逊的商品
  if (location.host.indexOf('.cn') > -1) return;
  reqInfo(dp_id, render);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pages = $data.pages, productW = $data.productW, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, imgLoad = $data.imgLoad, value = $data.value, width = $data.width;
    $$out += '<div id="gwdang-amazon-dp-detail" class="panel gwd_compare top-compare-detail top-bar-detail">\n  <div class="panel-wrap">\n    <div class="b2c-pages blkcolor4">\n      第 \n      <span class="current-page" id="b2c-current-page">1</span>\n       页\uFF0C共 \n       <span class="page-num blkcolor4" id="b2c-page-num">';
    $$out += $escape(pages);
    $$out += '</span>\n        页\n    </div>\n    <div class="left-page turn-page" style="left:10px;">\n      <a id="fuzzy-prev-page" target="_self" title="上一页" class="gwd_bg" href="javascript:"></a>\n    </div>\n    <div class="all-products" style="width:';
    $$out += $escape(productW);
    $$out += 'px">\n      <ul id="amazon-item-list">\n        ';
    $each(data.product, function ($value, $index) {
        $$out += '\n          <li id="amazon-prod-item-';
        $$out += $escape($index);
        $$out += '" >\n            <a id="img-';
        $$out += $escape($value.dp_id);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank" class="small-img" href="';
        $$out += $escape($value.url);
        $$out += '">\n              <img src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.img_url);
        $$out += '" id="dp-image-small-';
        $$out += $escape($value.dp_id);
        $$out += '" class="gwdang-lazy">\n            </a>\n            <a target="_blank" class="b2c-other-info"  href="';
        $$out += $escape($value.url);
        $$out += '">\n              <span class="gwd-price prifontf">';
        $$out += $escape($value.price_rmb ? $value.price_rmb : $value.price);
        $$out += '</span>\n              <span class="b2c-store blkcolor1">';
        $$out += $escape($value.site_name);
        $$out += '</span>\n              ';
        if ($value.promodom) {
            $$out += '\n              <span id="';
            $$out += $escape($value.dp_id);
            $$out += '_promotion">';
            $$out += $escape($value.promodom);
            $$out += '</span>\n              ';
        }
        $$out += '\n              <span class="b2c-fees blkcolor4">';
        $$out += $escape($value.rev_cnt ? '评论数:' + value.rev_cnt : $value.fee);
        $$out += '</span>\n              <span class="b2c-tle blkcolor1">';
        $$out += $escape($value.title);
        $$out += '</span>\n            </a>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <div class="right-page turn-page">\n      <a href="javascript:" id="fuzzy-next-page" class="gwd_bg" title="下一页"></a>\n    </div>\n  </div>\n  <style type="text/css">\n    #gwdang-amazon-dp-detail {\n      display: none;\n    }\n  .amazon .turn-page {\n    width: ';
    $$out += $escape(width);
    $$out += 'px;\n  }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 448 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data;
    $$out += '<a href="';
    $$out += $escape(data.url);
    $$out += '" target="_blank" id="amazon_global" >\n  <span>中亚海外购:</span>\n  <span class="ht_getprice_num prifontf">\n    ';
    $$out += $escape(data.price);
    $$out += '\n  </span>\n</a>';
    return $$out;
};

/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, data = $data.data;
    $$out += '<div class="ht-com-detail" id="global_detail">\n  <div class="global-content global-model">\n    <div class="gl-left">\n      <div class="gl-l-item ziying">\n        <em class="ht-bg"></em>\n        <span>自营</span>\n      </div>\n      <div class="gl-l-item zhiyou">\n        <em class="ht-bg"></em>\n        <span>直邮</span>\n      </div>\n      <div class="gl-l-item samestyle">\n        <em class="ht-bg"></em>\n        <span>同款</span>\n      </div>\n      <div class="gl-l-item vipfee">\n        <em class="ht-bg"></em>\n        <span>会员免运费</span>\n      </div>\n    </div>\n    <div class="gl-right">\n      <a href="';
    $$out += $escape(data.url);
    $$out += '" target="_blank">\n        <div class="gl-img-box">\n          <img src="';
    $$out += $escape(data.img);
    $$out += '">\n        </div>\n        <p>';
    $$out += $escape(data.tle);
    $$out += '</p>\n      </a>\n    </div>\n  </div>\n  <div class="global-foot">\n    <span>在亚马逊中国购买\uFF0C由亚马逊美国从境外发货</span>\n    <a href="';
    $$out += $escape(data.url);
    $$out += '" target="_blank">链接直达</a>\n  </div>\n  <style type="text/css">\n    \n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, imgLoad = $data.imgLoad, s_server = $data.s_server;
    $each(data, function ($value, $index) {
        $$out += '\n  <li >\n    <a class="item_img" href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" title="';
        $$out += $escape($value.title);
        $$out += '">\n      <img id="dp_';
        $$out += $escape($value.dp_id);
        $$out += '" src="';
        $$out += $escape(imgLoad);
        $$out += '" data-original="';
        $$out += $escape($value.img);
        $$out += '">\n    </a>\n    <div class="item_desc">\n      <a class="item_title blkcolor3" href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" title="';
        $$out += $escape($value.title);
        $$out += '">';
        $$out += $escape($value.title);
        $$out += '</a>\n      <span class="other_desc">\n        <span class="site_icon" ><img src="';
        $$out += $escape(s_server);
        $$out += '/images/favicon/';
        $$out += $escape($value.site_id);
        $$out += '.ico"></span>\n        <span class="item_price prifontf">';
        $$out += $escape($value.newPrice);
        $$out += '</span>\n        <span class="item_close_btn blkcolor4" data-id="';
        $$out += $escape($value.id);
        $$out += '">删除</span>\n      </span>\n    </div>\n  </li>\n';
    });
    $$out += '\n<style>\n  .item_img {\n    text-decoration: none!important;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 451 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', userLogin = $data.userLogin, $escape = $imports.$escape, style = $data.style, hidebtn = $data.hidebtn;
    $$out += '<div id="topfavor_detail" class="';
    if (userLogin) {
        $$out += 'islogin';
    }
    $$out += '" style="';
    $$out += $escape(style);
    $$out += '">\n    <div class="topf-head" >\n      <div class="blkcolor1">收藏并降价提醒</div>\n      <span class="sp-del">删除成功</span>\n      ';
    if (!hidebtn) {
        $$out += '\n      <span class="sp-col">收藏商品</span>\n      ';
    }
    $$out += '\n    </div>\n    <div class="topf-body">\n      <div class="login_detail" style="">\n        <div id="gwd-login-favor"></div>\n      </div>\n      <div class="favor-dp-detail">\n        <ul class="favor-list">\n          \n        </ul>\n        <a class="see-all-favor blkcolor4" target="_blank" href="">查看全部(<em></em>)</a>\n      </div>\n    </div>\n\n    <style type="text/css">\n      #topfavor_detail {\n        position: absolute;\n        right: 67px;\n        width: 280px;\n        height: 374px;\n        background: #FFFFFF;\n        box-shadow: 0 5px 10px 0 rgba(22,24,26,0.15);\n        display: none;\n      }\n      #topfavor_detail .topf-head {\n        height: 40px;\n        float: left;\n        width: 100%;\n        display: none;\n      }\n      #topfavor_detail.islogin .topf-head {\n        display: block;\n      }\n      #topfavor_detail .topf-body {\n        float: left;\n        width: 100%;\n      }\n      .topf-head * {\n        float: left;\n      }\n      #topfavor_detail .topf-head div {\n        font-size: 14px;\n        line-height: 14px;\n        margin-top: 14px;\n        margin-left: 14px;\n        font-weight: bold;\n      }\n      #topfavor_detail .topf-head span.sp-col {\n        border: 1px solid #F07860;\n        color: #F07860;\n        border-radius: 20px;\n        height: 24px;\n        width: 68px;\n        line-height: 24px;\n        text-align: center;\n        position: absolute;\n        top: 10px;\n        right: 14px;\n        cursor: pointer;\n        display: none;\n        font-size: 12px;\n      }\n      #topfavor_detail .topf-head .sp-del {\n        position: absolute;\n        color: #F07860;\n        font-size: 12px;\n        top: 12px;\n        left: 130px;\n        display: none;\n      } \n      #topfavor_detail .topf-head .sp-col.collected {\n        color: #fff;\n        background-color: #F07860;\n      }\n      #topfavor_detail.islogin .topf-head span.sp-col {\n        display: inline-block;\n      }\n      .topf-body {\n        height: 336px;\n      }\n      .islogin .login_detail {\n        display: none;\n      }\n      .topf-body p.login-remind {\n        font-size: 12px;\n        margin-left: 14px;\n        line-height: 12px;\n      }\n      .login_detail .logininfo {\n        margin-top: 30px;\n        text-align: center;\n        position: relative;\n      }\n      .login_detail .password {\n        margin-top: 18px;\n      }\n      .login_detail .forget_pass {\n        margin-left: 201px;\n        float: left;\n        margin-top: 21px;\n        font-size: 12px;\n        line-height: 12px;\n      }\n      .login_detail .forget_pass:hover {\n        color: #48befe!important;\n        text-decoration: none;\n      }\n      #topfavor_detail .login_detail .logininfo input {\n        width: 196px;\n        height: 30px;\n        font-size: 14px;\n        padding: 0px 6px 0px 16px;\n        display: inline-block;\n        border-radius: 15px;\n        outline: none;\n      }\n      .login_detail .login_click {\n        float: left;\n        margin-left: 97px;\n        height: 28px;\n        width: 86px;\n        cursor: pointer;\n        margin-top: 15px;\n        background-color: #48befe;\n        color: #fff!important;\n        line-height: 28px;\n        text-align: center;\n        font-size: 14px;\n        border-radius: 15px;\n      }\n      .login_detail .login_click:hover {\n        background-color: #18ACFC;\n      }\n      .login_detail .login_remind {\n        position: absolute;\n        top: 172px;\n        left: 37px;\n        height: 20px;\n        font-size: 12px;\n        width: 116px;\n        color: #EC4966;\n        display: none;\n      }\n      .login_detail .register {\n        float: left;\n        width: 100%;\n        height: 12px;\n        line-height: 12px;\n        text-align: center;\n        margin-top: 9px;\n        color: #48BEFE!important;\n        font-size: 12px;\n        border: none;\n        background-color: #fff;\n      }\n      .register:hover {\n        text-decoration: none;\n        color: #48BEFE;\n      }\n      .slice_div {\n        height: 12px;\n        width: 100%;\n        float: left!important;\n        margin-top: 23px;\n        background-position: 14px -239px;\n      }\n      .login_detail .qqlogin, .login_detail .sinalogin, .login_detail .weixinlogin {\n        display: inline-block;\n        width: 32px;\n        height: 32px;\n        margin-top: 20px;\n        \n      }\n      .login_detail .qqlogin {\n        margin-left: 51px;\n      }\n      .login_detail .sinalogin {\n        margin-left: 41px;\n      }\n      .login_detail .weixinlogin {\n        margin-left: 41px;\n      }\n      .login_detail .other_login {\n        float: left;\n        height: 57px;\n        width: 100%;\n      } \n      .login_detail .other_login a {\n        float: left;\n      }\n      .favor-dp-detail {\n        display: none;\n      }\n      .islogin .favor-dp-detail {\n        display: block;\n      }\n      #topfavor_detail .favor-list {\n        height: 256px;\n        width: 280px;\n        margin: 0px;\n        padding: 0px;\n        float: left;\n      }\n      #topfavor_detail .favor-list li {\n        list-style: none;\n        height: 76px;\n        margin-top: 20px;\n        overflow: hidden;\n        margin-left: 14px;\n        float: none;\n      }\n      #topfavor_detail .favor-list li:first-child {\n        margin-top: 14px;\n      }\n      #topfavor_detail .favor-list li .item_img {\n        height: 74px;\n        width: 74px;\n        float: left;\n        text-align: center;\n        border: 1px solid #edf1f2;\n      }\n      #topfavor_detail .favor-list li .item_img:after {\n        content:\'\';\n        width:0;\n        height:100%;\n        display:inline-block;\n        vertical-align:middle;\n      }\n      #topfavor_detail .item_img img {\n        max-height: 74px;\n        max-width: 74px;\n        margin: 0 auto;\n        display: inline-block;\n        vertical-align: middle;\n      }\n      #topfavor_detail .item_desc {\n        display: inline-block;\n        margin-left: 14px;\n        float: left;\n        -margin-left: 10px;\n        width: 164px;\n      }\n      #topfavor_detail a.item_title {\n        font-size: 12px;\n        line-height: 16px;\n        height: 32px;\n        width: 159px;\n        text-decoration: none;\n      }\n      #topfavor_detail a.item_title:hover {\n        text-decoration: none;\n        color: #48befe;\n      }\n      #topfavor_detail .other_desc, #topfavor_detail .item_title {\n        height: 16px;\n        line-height: 16px;\n        display: block;\n        text-align: left;\n        overflow: hidden;\n        float: left;\n      }\n      #topfavor_detail .other_desc {\n        margin-top: 26px;\n        width: 164px;\n      }\n      #topfavor_detail span.site_icon {\n        height: 16px;\n        line-height: 16px;\n        cursor: text;\n      }\n      #topfavor_detail .site_icon img {\n        height: 16px;\n      }\n      #topfavor_detail span.item_price {\n        margin-left: 6px;\n        margin-top: 2px;\n        cursor: text;\n        display: inline-block;\n        height: 14px;\n        line-height: 14px;\n        color: #e4393c;\n        font-size: 14px;\n        font-weight: bold;\n      }\n      #topfavor_detail span.item_close_btn {\n        font-size: 12px;\n        height: 12px;\n        width: 25px;\n        float: right;\n        text-align: center;\n        line-height: 16px;\n        letter-spacing: 0;\n        cursor: pointer;\n      }\n      #topfavor_detail span.item_close_btn:hover {\n        color: #48befe;\n      }\n      #topfavor_detail .see-all-favor {\n        position: absolute;\n        bottom: 17px;\n        right: 14px;\n        font-size: 12px;\n        text-decoration: none;\n      }\n      #topfavor_detail .see-all-favor:hover{\n        color: #48befe;\n      }\n    </style>\n</div>';
    return $$out;
};

/***/ }),
/* 452 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '';
    $$out += '<div class="gwd-minibar-bg">\n  <div id="gwd_minibar" class="" style="display: flex;">\n    <a class="ht_website" title="功能设置" id="gwd_website_icon" target="_blank" href="#">\n      <em class="ht-bg website_icon"></em>\n    </a>\n    <div id="mini_price_history" class="minibar-tab" style="flex: 1">\n      <div class="trend-detail ht-com-detail" id="ht_minitrend_detail">\n        <div class="ht-trend-otinfo">\n          <div class="ht-trend-minmax">\n            <span class="ht-mm-sp1">最高:</span>\n            <span class="ht-mm-sp2 ht-mm-max prifontf"></span>\n            <span class="ht-mm-sp3">最低:</span>\n            <span class="ht-mm-sp4 ht-mm-min prifontf"></span>\n          </div>\n          <span class="ht-favor-btn" id="ht_favor">降价提醒</span>\n        </div>\n        <div id="big_tooltip" class="big_tooltip_box"></div>\n        <div id="mini_ht_detail_chart"></div>\n      </div>\n    </div>\n    <div id="amazon_global_box" class="minibar-tab" style="flex: 1"></div>\n    <div id="yj_haitao" class="minibar-tab">\n\n    </div>\n    <div style="flex: 1" id="gwd_mini_remind" class="minibar-tab">\n      <div class="minibar-btn-box">\n<!--        <em class="setting-bg collect_mailout_icon"></em>-->\n<!--        <span>降价提醒</span>-->\n      </div>\n      <div class="gwd-collection-mini">\n        <div class="gwd-collection-mini-content"></div>\n      </div>\n    </div>\n  </div>\n  <style type="text/css">\n  .gwd-minibar-bg {\n    /*float: left;*/\n    width: 100%;\n    margin: 10px 0;\n  }\n  .gwd-minibar-bg::after {\n      clear: none!important;\n  }\n  .gwd_6pm .gwd-minibar-bg {\n    max-width: 445px;\n    margin-left: 118px;\n  }\n  .minibar-tab:hover .ht-com-detail {\n    display: block;\n  }\n  #ht_minitrend_detail {\n    height: 250px;\n    left: -1px;\n  }\n  .ht-trend-otinfo {\n    float: left;\n    height: 56px;\n    width: 100%;\n  }\n  .ht-trend-minmax span {\n    float: left;\n    margin-top: 15px;\n    line-height: 16px;\n    font-size: 12px;\n  }\n  .ht-com-detail .ht-mm-sp1 {\n    margin-left: 18px;\n  }\n  .ht-com-detail .ht-mm-sp1, .ht-com-detail .ht-mm-sp2 {\n    color:  #E4393C;\n    font-weight: bold;\n  }\n  .ht-com-detail .ht-mm-sp2, .ht-com-detail .ht-mm-sp4 {\n    line-height: 18px;\n    margin-left: 3px;\n  }\n  .ht-com-detail .ht-mm-sp3 {\n    margin-left: 10px;\n  }\n  .ht-com-detail .ht-mm-sp3, .ht-com-detail .ht-mm-sp4 {\n    color: #35BD67;\n    font-weight: bold;\n  }\n  .ht-com-detail .ht-favor-btn {\n    width: 74px;\n    height: 26px;\n    border: 1px solid #F07960;\n    border-radius: 2px;\n    color: #F07860;\n    float: right;\n    margin-right: 22px;\n    margin-top: 11px;\n    line-height: 26px;\n    font-size: 12px;\n    cursor: pointer;\n    text-align: center;\n  }\n  .ht-com-detail .ht-favor-btn.collected {\n    background: #F07860;\n    color: #fff;\n  }\n  #mini_ht_detail_chart {\n    width: 402px;\n    height: 172px;\n    margin-left: 18px;\n    position: relative;\n    float: left;\n  }\n    div#gwd_minibar,div#gwd_minibar .ht_website, div#gwd_minibar .minibar-tab {\n      height: 40px;\n    }\n    .ht_website {\n      width: 44px;\n      height: 40px;\n      float: left;\n    }\n    #gwd_minibar .minibar-tab {\n      line-height: 40px;\n    }\n    #gwd_minibar .minibar-tab:hover {\n      background: #EDF1F2;\n     }\n    .ht_website em{\n      background-position: -7px -8px;\n      height: 20px;\n      width: 22px;\n      float: left;\n      margin-left: 14px;\n      margin-top: 10px;\n    }\n    .hasglobal .ht_website em {\n      margin-left: 11px;\n    }\n    #mini_price_history em.ht-bg {\n      width: 20px;\n      height: 13px;\n      margin-top: 14px;\n      margin-right: 6px;\n    }\n    #mini_price_history em.pri-t1.ht-bg {\n      background-position: -58px -13px;\n    }\n    #mini_price_history em.pri-t0.ht-bg {\n      background-position: -82px -13px;\n    }\n    #mini_price_history em.pri-t-1.ht-bg {\n      background-position: -35px -13px;\n    }\n    #mini_price_history em.pri-t-2.ht-bg {\n      background-position: -107px -13px;\n    }\n    div#gwd_minibar .ht_website {\n      width: 50px;\n    }\n    div#gwd_minibar.hasglobal .ht_website {\n      width: 44px;\n    }\n    div#gwd_minibar {\n      width: 460px;\n    }\n    #yj_haitao {\n      text-align: center;\n      width: 209px;\n    }\n    .hasglobal #yj_haitao {\n      width: 151px;\n    }\n    .minibar-tab {\n      width: auto;\n    }\n\n\n    .ht-bg {\n      background: url(\'https://cdn.gwdang.com/images/extensions/xbt/haitao_mini1.png\') 0px 0px no-repeat;\n    }\n    .ht-com-detail {\n      position: absolute;\n      top: 40px;\n      left: -1px;\n      background: #FFFFFF;\n      border: 1px solid #E6E9EB;\n      box-shadow: 0 2px 4px 0 rgba(0,0,0,0.11);\n      height: 220px;\n      width: 440px;\n      z-index: 999;\n      display: none;\n    }\n    .global-content {\n      height: 180px;\n      width: 100%;\n    }\n    .gl-left {\n      width: 153px;\n      height: 100%;\n      float: left;\n    }\n    .global-model .gl-left {\n      width: 153px;\n    }\n    .yjht-model .gl-left {\n      width: 160px;\n    }\n    .gl-left .gl-l-item{\n      border-bottom: 1px solid #F9F9F9;\n      border-right: 1px solid #F9F9F9;\n    }\n    .gl-l-item {\n      height: 44px;\n      width: 100%;\n      float: left;\n      position: relative;\n    }\n    .gl-left .gl-l-item:last-child {\n      border-bottom: none;\n    }\n    .gl-l-item em {\n      float: left;\n      width: 20px;\n      height: 20px;\n      margin-left: 26px;\n      margin-top: 12px;\n      margin-right: 10px;\n    }\n    .ziying em{\n      background-position: -4px -36px;\n    }\n    .sanfang em {\n      background-position: -28px -36px;\n    }\n    .zhiyou em {\n      background-position: -124px -36px;\n    }\n    .samestyle em {\n      background-position: -148px -36px;\n    }\n    .vipfee em {\n      background-position: -172px -36px;\n    }\n    .gl-l-item span {\n      color: #404547;\n      font-size: 12px;\n      line-height: 44px;\n      text-align: left;\n      float: left;\n      margin-left: 10px;\n    }\n    .global-foot {\n      height: 40px;\n    }\n    .global-content .prifontf {\n      line-height: 46px;\n    }\n    .global-foot span {\n      float: left;\n      width: 285px;\n      height: 40px;\n      background-color: #EDF1F2;\n      line-height: 40px;\n      text-align: center;\n      font-size: 12px;\n      color: #969899;\n    }\n    .global-foot a {\n      width: 155px;\n      height: 40px;\n      background: #646FB0;\n      font-weight: 400;\n      line-height: 40px;\n      color: #fff;\n      font-size: 13px;\n      text-align: center;\n      float: left;\n    }\n    .gl-right a {\n      float: left;\n      width: 285px;\n      height: 180px;\n    }\n    .gl-img-box {\n      height: 100px;\n      width: 100%;\n      margin-top: 14px;\n      float: left;\n      text-align:center;\n      font-size:0;\n    }\n    .gl-right a img {\n      height: auto;\n      width: auto;\n      max-width: 100px;\n      max-height: 100px;\n      vertical-align:middle;\n      display:inline-block;\n      font-size:16px;\n    }\n    .gl-img-box:after {\n      content:\'\';\n      width:0;\n      height:100%;\n      display:inline-block;\n      vertical-align:middle;\n    }\n    .gl-right p {\n      float: left;\n      width: 240px;\n      height: auto;\n      margin-left: 22px;\n      margin-top: 14px;\n      line-height: 17px;\n      max-height: 34px;\n      overflow: hidden;\n      font-size: 12px;\n      color: #5C6266;\n    }\n\n    div.gwd_haitao .ht_getprice {\n      width: 160px;\n      font-size: 14px;\n      overflow: hidden;\n    }\n    div.gwd_haitao .ht_getprice span {\n      font-size: 16px;\n    }\n    #amazon_global_box {\n      width: 155px;\n      text-align: center;\n    }\n    #amazon_global {\n      float: none;\n      height: 40px;\n      line-height: 40px;\n      text-align: center;\n      width: auto;\n      color: #404547;\n      font-size: 14px;\n      overflow: hidden;\n      margin: 0 auto;\n      display: inline-block;\n    }\n    .hasglobal #mini_price_history {\n      width: 97px;\n    }\n    #mini_price_history {\n      width: 179px;\n    }\n    #amazon_global span, .yjhtbtn span {\n      font-size: 13px;\n      color: #404547;\n      float: left;\n      cursor: default;\n    }\n    #amazon_global:hover {\n      text-decoration: none;\n      color: #454a4d;\n    }\n\n    .ht_getprice_num, .yjht-tle-pri {\n      font-size: 12px;\n      color: #E4393C!important;\n      margin-left: 2px;\n      line-height: 42px!important;\n    }\n    #gwd_minibar .minibar-btn-box>span {\n      font-size: 13px;\n      cursor: default;\n    }\n\n  .gwd-collection-mini {\n    display: none;\n    /*display: flex;*/\n    width: 462px;\n    height: 278px;\n    background: white;\n    border-radius: 2px;\n    box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.1);\n    border: 1px solid #e6e9eb;\n    position: absolute;\n    top: 36px;\n    left: -1px;\n    z-index: 1001;\n    box-sizing: border-box;\n    cursor: default;\n    overflow: visible;\n  }\n\n  #gwd_mini_remind:hover .gwd-collection-mini {\n    display: flex;\n  }\n  </style>\n</div>\n';
    return $$out;
};

/***/ }),
/* 453 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(454);
if(typeof content === 'string') content = [[module.i, content, '']];
// add the styles to the DOM
var update = __webpack_require__(37)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../../node_modules/css-loader/index.js!./mini_ht.css", function() {
			var newContent = require("!!../../../node_modules/css-loader/index.js!./mini_ht.css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}

/***/ }),
/* 454 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, " #gwd_ht_main a{\n      display: inline-block;\n    }\n    .gwd_haitao {\n      font-size: 12px;\n      font-family: 'Microsoft Yahei'\n    }\n    #gwd_ht_main .unit_price #ht_addcollect{\n      border: 1px solid #f07860;\n      cursor: pointer;\n      height: 24px;\n      line-height: 24px;\n      text-align: center;\n      width: 77px;\n      border-radius: 12px;\n      background-color: #fff;\n      margin-bottom: 6px;\n      margin-top: 4px;\n      color: #f07860;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect.trend_wait.c_adding{\n      background-color: #f07860;\n      color: #fff;\n    }\n    #gwd_ht_main .unit_price #ht_addcollect.trend_wait.c_added{\n      background-color: #f07860;\n      color: #fff;\n    }\n    .gwd_haitao .div_detail {\n      display: none;\n      position: absolute;\n      width: 146px;\n      border: 1px solid #e6e9eb;\n      background-color: #fff;\n      z-index: 99;\n      line-height: 19px;\n      font-size: 12px;\n      color: #888;\n      padding: 6px 6px 9px 6px;\n      box-shadow: 2px 2px 12px 2px #e6e9eb;\n      height: auto;\n    }\n    .gwd_haitao .content_default_left .weight_type_detail  {\n      top: 7px;\n      left: 156px;\n      position: absolute;\n      width: 113px;\n      height: 24px;\n      line-height: 22px;\n      padding: 0px 6px;\n    }\n    .pro_type_detail {\n      top: 9px;\n      left: 350px;\n    }\n    .gwd_haitao .pro_type_detail.div_detail {\n      padding: 0 6px;\n      width: 134px;\n    }\n    .size_detail {\n      top: 130px;\n      left: 350px;\n    }\n    .gwd_haitao .size_detail.div_detail {\n      padding: 0px 6px;\n      width: 110px;\n    }\n    .pro_type:hover,.mail_type:hover {\n      cursor: text;\n    }\n    .gwd_haitao .ht_getprice:hover{\n      text-decoration: none;\n      color: #454A4D;\n    }\n    .gwd_haitao .content_default_left{\n      height: 160px;\n      width: 254px;\n      border-right: 1px solid #e6e9eb;\n      float: left;\n      display: inline-block;\n    }\n    .gwd_haitao .ht_freight,.gwd_haitao .del_line{\n      display: inline-block;\n      text-align: left;\n      font-size: 14px;\n      margin-left: 12px;\n    }\n    a.ht_transport_btn span, .ht_tariff_btn span {\n      display: inline-block;\n      width: 60px;\n      height: 40px;\n      overflow: hidden;\n      float: left;\n      font-size: 12px;\n      margin-right: 5px;\n    }\n    a.ht_transport_btn span:hover, .ht_tariff_btn span:hover {\n      text-decoration: underline;\n    }\n    .gwd_haitao .content_default_right{\n      display: inline-block;\n      height: 160px;\n      width: 119px;\n    }\n    .gwd_haitao .content_default_right a{\n      width: 120px;\n      height: 40px;\n      line-height: 40px;\n      color: #383835;\n      border-bottom: 1px solid #e6e9eb;\n      padding: 0 0 0 14px;\n      text-decoration: none;\n    }\n    .gwd_haitao .content_default_right a span {\n      font-size: 12px;\n      margin-left: 7px;\n    }\n    .gwd_haitao .content_default_right a:hover{\n      text-decoration: none;\n      color: #383835;\n    }\n    #gwd_ht_main .size_help{\n      cursor: pointer;\n      border-bottom: none;\n    }\n    #gwd_ht_main .size_help span {\n      text-decoration: none;\n      color: #5aa4cc;\n    }\n    #gwd_ht_main .size_help span:hover {\n      text-decoration: underline;\n    }\n    .gwd_haitao .content_default_right em{\n      display: inline-block;\n      width: 20px;\n      height: 20px;\n      position: relative;\n      top: 5px;\n    }\n    .gwd_haitao .size_help em{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_sizeicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .ht_translate em{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_transicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .pro_type .ziying{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_ziyingicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .pro_type .sanfang{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_sanicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .mail_type .zhiyou{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_zhiicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .mail_type .feizhiyou{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_zhuanicon.png') 0px 0px no-repeat;\n      background-size: 20px 20px;\n    }\n    .gwd_haitao .same-style em {\n      background: url('https://s1.gwdang.com/images/extensions/haitao_samestyle.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .vip_tle em {\n      background: url('https://s1.gwdang.com/images/extensions/haitao_vipicon.png') 0px 0px no-repeat;\n    }\n    .gwd_haitao .gwd_wishlist_trend_detail_wrapper{\n      float: left;\n    }\n    .gwd_haitao .ht_content{\n      height: 162px;\n      border-top: 1px solid #e6e9eb;\n      position: relative;\n    }\n    .content_default {\n      float: left;\n    }\n    .content_default:after, .gwd_haitao .content_default_right:after {\n      content: \"\";\n      display: block;\n      clear: both;\n    }\n    #cate_select_box{\n      text-align: center;\n      margin-top: 4px;\n      position: relative;\n    }\n    .gwd_haitao #cate_select_box input{\n      height: 30px;\n      width: 109px;\n      background: url('https://s1.gwdang.com/images/extensions/haitao_downgrayicon.png') no-repeat 89px 11px;\n      background-size: 12px 7px;\n      cursor: pointer;\n      border: 1px solid #fff;\n      box-shadow: none;\n      box-sizing: border-box;\n      padding: 3px 7px;\n      border-radius: 4px;\n      color: #9ca7ad;\n      font-size: 12px;\n    }\n    .gwd_haitao #cate_select_box input.sel_info{\n      background-color: #e1e1e1;\n    }\n    .gwd_haitao #cate_select_box input.input_hover{\n      border-bottom: 1px solid #fff;\n      color: #9ca7ad;\n    }\n    .gwd_haitao .cate_select_1{\n      display: inline-block;\n      float: left;\n      margin-left: 22px;\n      border: 1px solid #969899;\n      border-radius: 4px;\n      position: relative;\n    }\n    .gwd_haitao .cate_select_1.select_hover , .gwd_haitao .cate_select_2.select_hover{\n      height: 218px;\n      z-index: 9999;\n      background-color: #fff;\n\n    }\n    .gwd_haitao .cate_select_2{\n      margin-left: 16px;\n      display: inline-block;\n      border: 1px solid #969899;\n      border-radius: 4px;\n      position: relative;\n      float: left;\n    }\n    .gwd_haitao .xialabox{\n      display: none;\n      background-color: #fff;\n      overflow-y: scroll;\n      overflow-x: hidden;\n      height: 185px;\n      text-align: left;\n      border-top: none;\n      position: absolute;\n      width: 109px;\n      font-size: 12px;\n    }\n    .ie_hack.gwd_haitao .xialabox {\n      width: 111px;\n    }\n    .gwd_haitao #select_btn{\n      display: inline-block;\n      width: 60px;\n      height: 24px;\n      background-color: #47befe;\n      border-radius: 12px;\n      margin: 0 auto;\n      color: #fff;\n      text-align: center;\n      line-height: 23px;\n      cursor: pointer;\n      position: absolute;\n      top: 54px;\n      left: 116px;\n    }\n    #transport_detail{\n      position: fixed;\n      width: 755px;\n      height: 314px;\n      border: 1px solid #e6e9eb;\n      background-color: #fff;\n      top: 400px;\n      left: 400px;\n      display: none;\n      z-index: 99999;\n      box-shadow: 0px 5px 19px 0px #d7d8d9;\n    }\n    #transport_detail *{\n      box-sizing: border-box;\n    }\n    #transport_detail .trans_nav .span_0 {\n      margin-left: 10px;\n    }\n    #transport_detail .trans_nav .span_1{\n      text-align: left;\n      width: 146px;\n      margin-left: 17px;\n    }\n    #transport_detail .trans_nav .span_2{\n      text-align: left;\n      width: 147px;\n      margin-left: 4px;\n    }\n    .ht_trans_detail .trans_head{\n      height: 51px;\n      border-bottom: 1px solid #e6e9eb;\n    }\n    .gwd_haitao .closebar{\n      display: inline-block;\n      text-align: center;\n      font-size: 30px;\n      position: absolute;\n      top: 4px;\n      right: 7px;\n      color: #666;\n      cursor: pointer;\n    }\n    .gwd_haitao .closebar.closebg {\n      background: url(\"https://s1.gwdang.com/images/extensions/haitao_closeicon.png\") 6px 6px no-repeat;\n      background-size: 9px 9px;\n      height: 22px;\n      width: 22px;\n      top: 1px;\n      right: 1px;\n    }\n    .gwd_haitao .closebar.closebg:hover {\n      background: url(\"https://s1.gwdang.com/images/extensions/haitao_closehovericon.png\") 3px 3px no-repeat;\n      background-size: 15px 15px;\n    }\n\n    .size_desc {\n      color: #9f9f9f;\n      line-height: 35px;\n    }\n\n\n    /* 尺码帮助 */\n    #size_detail{\n      width: 618px;\n      height: 440px;\n      position: fixed;\n      top: 400px;\n      left: 400px;\n      display: none;\n      text-align: left;\n      z-index: 9999999;\n      box-sizing: border-box;\n      background-color: #fff;\n      border: 1px solid #e6e9eb; \n      box-shadow: 0px 5px 19px 0px #d7d8d9;       \n    }\n    .ht_size_detail .shangyi, .tongzhuang0, .tongxie0{\n      position: absolute;\n      left: 38px;\n    }\n    .ht_size_detail .xiazhuang, .tongzhuang4, .tongxie4{\n      position: absolute;\n      top: 50px;\n      left: 38px;\n    }\n    .ht_size_detail .shoes,.ht_size_detail .tongzhuang, .ht_size_detail .tongxie{\n      display: none;\n    }\n    .ht_size_detail span.shoes {\n      position: absolute;\n      top: 39px;\n      left: 38px;\n      color: #fff;\n      background-color: #47befe;\n      border:  1px solid #47befe;\n    }\n    .ht_size_detail .shangyi.size_hover,.ht_size_detail .xiazhuang.size_hover, .ht_size_detail .xiazhuang.size_hover, .ht_size_detail .tongzhuang.size_hover, .ht_size_detail .tongxie.size_hover{\n      background-color: #47befe;\n      border:  1px solid #47befe;\n      color: #fff;\n    }\n    .ht_size_detail .shangyi,.ht_size_detail .xiazhuang,.ht_size_detail .shoes,.ht_size_detail .tongzhuang, .ht_size_detail .tongxie{\n      height: 30px;\n      width: 60px;\n      text-align: center;\n      line-height: 30px;\n      cursor: pointer;\n      border-radius: 15px;\n      border:  1px solid #969899;\n      color: #8A9499;\n    }\n    .ht_size_detail .cloth_icon{\n      position: absolute;\n      top: 100px;\n      left: 22px;\n    }\n    \n    .ht_size_detail .manshangzhuang {\n      background: url('https://s1.gwdang.com/images/extensions/man_shangzhuang.png') -4px 0px no-repeat;\n      height: 191px;\n      width: 93px;\n    }\n    .ht_size_detail .womanshangzhuang {\n      background: url('https://s1.gwdang.com/images/extensions/woman_shangzhuang.png') 0px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n    }\n    .ht_size_detail .kid0 {\n      background: url('https://s1.gwdang.com/images/extensions/kids0_4.png') 0px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n      margin-left: 8px;\n    }\n    .ht_size_detail .kid4 {\n      background: url('https://s1.gwdang.com/images/extensions/kids4_12.png') -2px 0px no-repeat;\n      height: 187px;\n      width: 87px;\n      margin-left: 0px;\n    }\n    .ht_size_detail .manxiazhuang {\n      background: url('https://s1.gwdang.com/images/extensions/man_xiazhuang.png') -17px 0px no-repeat;\n      height: 216px;\n      width: 63px;\n      margin-left: 13px;\n    }\n    .ht_size_detail .womanxiazhuang {\n      background: url('https://s1.gwdang.com/images/extensions/woman_xiazhuang.png') 0px 0px no-repeat;\n      height: 220px;\n      width: 66px;\n      margin-left: 11px;\n    }\n    \n    .ht_size_detail .ht_shoes.man_foot {\n      background: url('https://s1.gwdang.com/images/extensions/man_foot.png') 4px 0px no-repeat;\n      height: 170px;\n      width: 111px;\n    }\n    .ht_size_detail .ht_shoes.woman_foot {\n      background: url('https://s1.gwdang.com/images/extensions/woman_foot.png') 4px 0px no-repeat;\n      height: 170px;\n      width: 111px;\n    }\n    .ht_size_detail .ht_shoes.kids_foot {\n      background: url('https://s1.gwdang.com/images/extensions/kid_shoes.png') 0px 0px no-repeat;\n      height: 171px;\n      width: 131px;\n      left: 4px;\n    }\n    .ht_size_detail .clothes_nav{\n      margin-top: 13px;\n      line-height: 30px;\n      height: 30px;\n      width: 567px;\n      margin-left: 55px;\n    }\n    .ht_size_detail .clothes_nav ul{\n      padding: 0;\n      margin: 0px;\n    }\n    .ht_size_detail .size_s{\n      height: 40px;\n      display: inline-block;\n      border-right: 2px solid #e6e9eb;\n    }\n    .detail_left {\n      float: left;\n      width: 136px;\n      height: 367px;\n      position: relative;\n    }\n    .detail_left span {\n      display: inline-block;\n    }\n    .ht_size_detail #size_item{\n      height: 180px;\n      width: 452px;\n      overflow-y: scroll;\n      border: 1px solid #e6e9eb;\n    }\n    .ht_size_detail .clothes_nav ul li{\n      list-style: none;\n      float: left;\n      font-size: 16px;\n      width: 32px;\n      margin-right: 57px;\n      color: #000;\n      cursor: pointer;\n      border-bottom: 3px solid #fff;\n    }\n    .ht_size_detail .clothes_nav ul li:hover {\n      color: #47befe;\n    }\n    .ht_size_detail .clothes_nav ul li.select{\n      border-bottom: 3px solid #47befe;\n      color: #47befe;\n    }\n    .ht_size_detail .size_head{\n      height: 60px;\n    }\n    .ht_size_detail .unit_desc{\n      display: inline-block;\n      float: right;\n      margin-right: 27px;\n      margin-top: 8px;\n      position: relative;\n    }\n    .ht_size_detail .size_con{\n      text-align: right;\n      margin-top: 16px;\n      margin-bottom: 11px;\n      margin-right: 26px;\n      color: #575e61;\n    }\n    .ht_size_detail .size_op{\n      width: 440px;\n      display: inline-block;\n      position: relative;\n    }\n\n    .ht_size_detail .size_op input+input {\n     margin-left: 0px; \n    }\n    #first_size+.first_xiala {\n     position: absolute;\n     right: 267px;\n    }\n    .ht_size_detail .size_op input{\n      width: 100px;\n      height: 31px;\n      box-sizing: border-box;\n    }\n    #first_size, #second_size {\n      border-radius: 4px;\n      outline: none;\n      padding: 0 7px;\n      border: 1px solid #969899;\n      box-shadow: none;\n    }\n    #first_size:focus, #second_size:focus {\n      border-color: #47befe;\n    }\n    .ht_size_detail .size_xialabox {\n      display: none;\n      width: 60px;\n      height: 190px;\n      border: 1px solid #999;\n      border-bottom: none;\n      position: absolute;\n      text-align: left;\n      line-height: 19px;\n      top: -189px;\n      right: 267px;\n      box-sizing: border-box;\n      background-color: #fff;\n      border-top-left-radius: 4px;\n      border-top-right-radius: 4px;\n    }\n    #second_size+.second_xiala{\n      position: absolute;\n      right: -14px;\n    }\n    .ht_size_detail #second_size+input+.size_xialabox{\n      right: -14px;\n    }\n    .ht_size_detail .size_xialabox a{\n      display: block;\n      padding-left: 7px;\n      color: #5c6266;\n    }\n    .ht_size_detail .size_xialabox a:hover{\n      text-decoration: underline;\n      color: #47befe;\n    }\n    .ht_size_detail .size_op .size_xiala{\n      width: 60px;\n      border: 1px solid #999;\n      padding-left: 7px;\n      border-radius: 4px;\n      color: #8a9499;\n    }\n    .ht_size_detail .size_op .size_xiala.msHover {\n      border-radius: 0px;\n      border-bottom-left-radius: 4px;\n      border-bottom-right-radius: 4px;\n      background: url('https://s1.gwdang.com/images/extensions/haitao_upgrayicon.png') no-repeat 42px 12px;\n      background-size: 12px 7px;\n    }\n    .ht_size_detail .size_xiala{\n      background: url('https://s1.gwdang.com/images/extensions/haitao_downgrayicon.png') no-repeat 42px 12px;\n      background-size: 12px 7px;\n      cursor: pointer;\n    }\n    .ht_size_detail .conversion{\n      margin: 0 30px 0 105px;\n    }\n    /* fanyi */\n    .ht_fanyi{\n      display: block;\n      position: absolute;\n      width: 200px;\n      z-index: 99;\n      background: #fff url('https://s1.gwdang.com/images/extensions/haitao_fanyi_icon.png') 0px 0px no-repeat;\n      border: 1px solid #47befe;\n      border-radius: 8px;\n      min-height: 25px;\n      color: #494b4d;\n      text-indent: 32px;\n      padding: 2px 12px;\n      line-height: 19px;\n    }\n    .ht_fanyi a{\n      display: block;\n      width: 130px;\n      text-decoration: none;\n      color: #494b4d;\n    }\n    .ht_fanyi a:hover{\n      text-decoration: none;\n      color: #494b4d;\n    }\n    #ht_top{\n      position: absolute;\n      width: 0px;\n      height: 0px;\n      line-height: 0px;\n      border-bottom: 8px solid #278ac9;\n      border-left: 9px solid transparent;\n      border-right: 9px solid transparent;\n      left: 58px;\n      top: -8px;\n    }\n    #ht_top:after {\n      content: \"\";\n      display: block;\n      position: absolute;\n      width: 0px;\n      height: 0px;\n      line-height: 0px;\n      border-bottom: 7px solid #fff;\n      border-left: 8px solid transparent;\n      border-right: 8px solid transparent;\n      left: -8px;\n      top: 1px;\n    }\n    /* 滚动条样式 */\n    .gwd_haitao ::-webkit-scrollbar {width:6px;height: 6px;}\n    .gwd_haitao ::-webkit-scrollbar-track {background:#f0f0f0;}\n    .gwd_haitao ::-webkit-scrollbar-thumb {\n      background: #cdcdcd;\n      border-radius: 4px;\n    }\n    #size_detail ::-webkit-scrollbar {width:2px;height: 6px;}\n    /* 亚马逊遮挡 */\n    div#actionPanelWrapper.burj {\n      overflow: visible!important;\n    }\n\n   ", ""]);

// exports


/***/ }),
/* 455 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_0_id_3fdd510a_scoped_true_lang_less__ = __webpack_require__(456);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_0_id_3fdd510a_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_0_id_3fdd510a_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 456 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(457);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("dbee2db0", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonCouponBarMini.vue?vue&type=style&index=0&id=3fdd510a&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonCouponBarMini.vue?vue&type=style&index=0&id=3fdd510a&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 457 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-coupon-bar[data-v-3fdd510a] {\n  font-family: \"PingFang SC-Medium\", \"Microsoft YaHei\", \"Arial\", \"SimSun\", serif;\n  font-size: 12px;\n  background: white;\n  position: relative;\n  border: 1px solid #e8e8e8;\n  border-top: none;\n  width: 462px;\n  box-sizing: border-box;\n  height: 38px;\n}\n.gwd-coupon-bar .gwd-round-click[data-v-3fdd510a] {\n  margin-left: 24px;\n  margin-right: 12px;\n  display: block;\n  width: 68px;\n  height: 20px;\n  text-align: center;\n  border-radius: 4px;\n  color: white;\n  font-weight: bold;\n}\n.gwd-coupon-bar .gwd-take[data-v-3fdd510a] {\n  margin-right: 12px;\n  width: 74px;\n  height: 20px;\n  font-size: 12px;\n}\n.gwd-coupon-bar .gwd-take span[data-v-3fdd510a] {\n  flex: 1;\n  text-align: center;\n}\n.gwd-coupon-bar .gwd-qr-hover-window[data-v-3fdd510a] {\n  width: 136px;\n  height: 160px;\n  background: #fff9f6;\n  position: absolute;\n  box-sizing: border-box;\n  border-width: 1px;\n  border-style: solid;\n  top: 37px;\n  left: 345px;\n  display: none;\n  z-index: 99;\n}\n.gwd-coupon-bar[data-v-3fdd510a]:hover {\n  text-decoration: none;\n}\n.gwd-coupon-bar:hover .gwd-qr-hover-window[data-v-3fdd510a] {\n  display: flex;\n}\n", ""]);

// exports


/***/ }),
/* 458 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_1_id_3fdd510a_lang_less__ = __webpack_require__(459);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_1_id_3fdd510a_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CommonCouponBarMini_vue_vue_type_style_index_1_id_3fdd510a_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 459 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(460);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("c43f5108", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonCouponBarMini.vue?vue&type=style&index=1&id=3fdd510a&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CommonCouponBarMini.vue?vue&type=style&index=1&id=3fdd510a&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 460 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-coupon-color-bg {\n  position: absolute;\n  z-index: 0;\n  background-size: contain;\n}\n.gwd-coupon-color-bg.gwd-tl {\n  top: 0;\n  left: 0;\n  width: 30px;\n  height: 28px;\n  background-image: url(https://cdn.gwdang.com/images/extensions/coupon-tl-bg@2x.png);\n}\n.gwd-coupon-color-bg.gwd-br {\n  bottom: 0;\n  right: 49px;\n  width: 46px;\n  height: 23px;\n  background-image: url(https://cdn.gwdang.com/images/extensions/coupon-br-bg@2x.png);\n}\n.gwd-butie .gwd-coupon-color-bg.gwd-tl {\n  background-image: url(https://cdn.gwdang.com/images/extensions/bt-tl-bg@2x.png);\n}\n.gwd-butie .gwd-coupon-color-bg.gwd-br {\n  background-image: url(https://cdn.gwdang.com/images/extensions/bt-br-bg@2x.png);\n}\n", ""]);

// exports


/***/ }),
/* 461 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 462 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_style_index_0_id_42d39176_scoped_true_lang_less__ = __webpack_require__(463);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_style_index_0_id_42d39176_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMini_vue_vue_type_style_index_0_id_42d39176_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 463 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(464);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1a61ec33", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponMini.vue?vue&type=style&index=0&id=42d39176&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponMini.vue?vue&type=style&index=0&id=42d39176&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-row[data-v-42d39176] {\n  display: flex;\n  flex-direction: row;\n}\n.gwd-inline-row[data-v-42d39176] {\n  display: inline-flex;\n  flex-direction: row;\n}\n.gwd-column[data-v-42d39176] {\n  display: flex;\n  flex-direction: column;\n}\n.gwd-inline-column[data-v-42d39176] {\n  display: inline-flex;\n  flex-direction: column;\n}\n.gwd-align[data-v-42d39176] {\n  align-content: center;\n  align-items: center;\n}\n.gwd-jcc[data-v-42d39176] {\n  justify-content: center;\n}\n.gwd-jic[data-v-42d39176] {\n  justify-items: center;\n}\n.gwd-button[data-v-42d39176] {\n  outline: none;\n  border: none;\n}\n.bjg-bar-button[data-v-42d39176] {\n  font-size: 0;\n}\n.bjg-hover-bg[data-v-42d39176] {\n  background: #fffbef;\n}\n.bjg-bar-button[data-v-42d39176]:hover {\n  background: #fffbef;\n  cursor: pointer;\n}\n.bjg-bar-button:hover .bjg-window[data-v-42d39176] {\n  display: block;\n}\n.mainbar-fold .bjg-bar-button[data-v-42d39176],\n.mainbar-fold #top_coupon_btn[data-v-42d39176],\n.mainbar-fold .rinfo-btn[data-v-42d39176],\n.mainbar-fold .gwd-bottom-tmall[data-v-42d39176] {\n  display: none!important;\n}\n.gwd-font12[data-v-42d39176] {\n  font-size: 12px;\n}\n.gwd-font14[data-v-42d39176] {\n  font-size: 14px;\n}\n.gwd-red[data-v-42d39176] {\n  color: #ff3532;\n}\n.gwd-red-bg[data-v-42d39176] {\n  background: #ff3532;\n}\n.gwd-hui333[data-v-42d39176] {\n  color: #333333;\n}\n.gwd-hui999[data-v-42d39176] {\n  color: #999999;\n}\n.gwd-font10[data-v-42d39176] {\n  font-size: 12px;\n  transform: scale(0.8333);\n  transform-origin: bottom center;\n}\n.gwd-font11[data-v-42d39176] {\n  font-size: 12px;\n  transform: scale(0.91666);\n  transform-origin: bottom center;\n}\n.gwd-font9[data-v-42d39176] {\n  font-size: 12px;\n  transform: scale(0.75);\n  transform-origin: bottom center;\n}\n.gwd-hoverable[data-v-42d39176]:hover {\n  background: #edf1f2;\n}\n.right-info > *[data-v-42d39176] {\n  border-left: 1px solid #edf1f2;\n}\n.gwd-red-after-visit[data-v-42d39176]:hover {\n  color: #e03024 !important;\n}\n.gwd-button[data-v-42d39176]:hover {\n  filter: brightness(1.1);\n}\n.gwd-button[data-v-42d39176] {\n  padding-top: 1px;\n  padding-bottom: 1px;\n}\n.gwd-button[data-v-42d39176]:active {\n  filter: brightness(0.9);\n}\n.gwd-fadeout-5s[data-v-42d39176] {\n  opacity: 0;\n  transition: opacity 5s;\n}\n.gwd-scrollbar[data-v-42d39176]::-webkit-scrollbar {\n  width: 6px;\n  border-radius: 17px;\n}\n.gwd-scrollbar[data-v-42d39176]::-webkit-scrollbar-thumb {\n  border-radius: 17px;\n  background: #999;\n}\n#gwdang_main[data-v-42d39176],\n.gwdang-main[data-v-42d39176],\n.bjgext-detail[data-v-42d39176] {\n  font-size: 12px;\n}\n#gwdang_main button[data-v-42d39176],\n.gwdang-main button[data-v-42d39176],\n.bjgext-detail button[data-v-42d39176] {\n  text-align: center;\n}\n.gwd-width-100[data-v-42d39176] {\n  width: 100%;\n}\n.gwd-overlay[data-v-42d39176] {\n  font-family: \"Microsoft YaHei\", \"Arial\", \"SimSun\", serif;\n  font-size: 0;\n  position: fixed;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  background: rgba(0, 0, 0, 0.35);\n  z-index: 999999999;\n}\n.gwd-font-pfm[data-v-42d39176] {\n  font-family: 'PingFangSC-Medium';\n  font-weight: normal!important;\n}\n@font-face {\n  font-family: 'PingFangSC-Medium';\n  src: local('PingFangSC-Medium');\n}\n.gwd-font-pfm[data-v-42d39176] {\n  font-family: local('PingFangSC-Medium'), system-ui;\n  font-weight: bold;\n}\n#gwd_minibar svg[data-v-42d39176],\n.gwdang-main svg[data-v-42d39176],\n#bjgext_mb_bg svg[data-v-42d39176],\n#bjgext_mainbar svg[data-v-42d39176] {\n  fill: transparent;\n}\n.gwd-member-coupon-mini[data-v-42d39176] {\n  width: 460px;\n  background: white;\n  border-left: 1px solid #e6e9eb;\n  border-right: 1px solid #e6e9eb;\n  border-bottom: 1px solid #e6e9eb;\n  height: 37px;\n}\n.gwd-coupon-take[data-v-42d39176] {\n  width: 50px;\n  height: 26px;\n  background: #ff3d5d;\n  border-radius: 2px;\n  color: white;\n  font-size: 13px;\n  text-align: center;\n  line-height: 26px;\n  cursor: pointer;\n  position: relative;\n  margin-left: 20px;\n  margin-right: 15px;\n  display: inline-block;\n}\n.gwd-coupon-take .gwd-qr-container[data-v-42d39176] {\n  position: absolute;\n  display: none;\n  right: -15px;\n  top: 30px;\n  z-index: 9;\n}\n.gwd-member-coupon-mini:hover .gwd-qr-container[data-v-42d39176] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 465 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__ = __webpack_require__(466);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MemberCouponMiniBjg_vue_vue_type_script_lang_js__ = __webpack_require__(135);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MemberCouponMiniBjg_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MemberCouponMiniBjg_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MemberCouponMiniBjg_vue_vue_type_style_index_0_id_c1c2cbdc_scoped_true_lang_less__ = __webpack_require__(468);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MemberCouponMiniBjg_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__["staticRenderFns"],
  false,
  null,
  "c1c2cbdc",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('c1c2cbdc')) {
      api.createRecord('c1c2cbdc', component.options)
    } else {
      api.reload('c1c2cbdc', component.options)
    }
    module.hot.accept("./MemberCouponMiniBjg.vue?vue&type=template&id=c1c2cbdc&scoped=true", function () {
      api.rerender('c1c2cbdc', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/MemberCouponMiniBjg.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 466 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__ = __webpack_require__(467);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_template_id_c1c2cbdc_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "bjgou-subsidy-bar bjgou-component",
    attrs: { href: _vm.link, target: "_blank", title: "点击领取" }
  }, [_c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-left": "75px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.getText("当前商品可领会员券")))]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-right": "22px"
    }
  }, [_vm._v(_vm._s(_vm.getText("立即领取")))]), _vm._v(" "), _vm.qr ? _c("div", { staticClass: "qrcode" }, [_c("img", {
    staticStyle: {
      "margin-top": "7px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: _vm.qr, alt: "" }
  }), _vm._v(" "), _c("div", { staticStyle: { "margin-top": "4px", "text-align": "center" } }, [_c("span", {
    staticStyle: {
      "font-weight": "bold",
      color: "#ff6132",
      "font-size": "14px"
    }
  }, [_vm._v(_vm._s(_vm.getText("手淘扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      color: "#333333",
      "font-size": "12px"
    }
  }, [_vm._v(_vm._s(_vm.getText("联系客服领取")))])])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 468 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_style_index_0_id_c1c2cbdc_scoped_true_lang_less__ = __webpack_require__(469);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_style_index_0_id_c1c2cbdc_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponMiniBjg_vue_vue_type_style_index_0_id_c1c2cbdc_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(470);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1e6ad6ee", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponMiniBjg.vue?vue&type=style&index=0&id=c1c2cbdc&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponMiniBjg.vue?vue&type=style&index=0&id=c1c2cbdc&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 470 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-coupon-white[data-v-c1c2cbdc] {\n  color: #ffffff;\n}\n.bjgou-subsidy-bar[data-v-c1c2cbdc] {\n  cursor: pointer;\n  margin-top: 5px;\n  width: 442px;\n  height: 67px;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  background: url(https://cdn.bijiago.com/images/extensions/bijiago/bigCoupon@2x.png);\n  box-sizing: border-box !important;\n  background-size: contain;\n}\n.bjgou-subsidy-bar .qrcode[data-v-c1c2cbdc] {\n  display: none;\n  position: absolute;\n  top: 70px;\n  right: -15px;\n  width: 148px;\n  height: 156px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  z-index: 9;\n}\n.bjgou-subsidy-bar .bjg-bold[data-v-c1c2cbdc] {\n  font-size: 13px;\n  font-weight: bold;\n  color: #ff2d53;\n}\n.bjgou-subsidy-bar .bjg-take[data-v-c1c2cbdc] {\n  min-width: 87px;\n  height: 22px;\n  border-radius: 11px;\n  border: 1px solid #FF2D53;\n  position: relative;\n  display: flex;\n  cursor: pointer;\n}\n.bjgou-subsidy-bar .bjg-take span[data-v-c1c2cbdc] {\n  font-size: 12px;\n  text-align: center;\n  line-height: 22px;\n}\n.bjgou-subsidy-bar .bjg-take .taker[data-v-c1c2cbdc] {\n  color: white;\n  width: 36px;\n  height: 24px;\n  line-height: 24px;\n  background: linear-gradient(90deg, #FF3A62 0%, #FF665B 100%);\n  border-radius: 11px;\n  display: inline-block;\n}\n.bjgou-subsidy-bar[data-v-c1c2cbdc]:hover {\n  text-decoration: none;\n}\n.bjgou-subsidy-bar:hover .qrcode[data-v-c1c2cbdc] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n", ""]);

// exports


/***/ }),
/* 471 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__ = __webpack_require__(472);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MemberCouponBottomBjg_vue_vue_type_script_lang_js__ = __webpack_require__(137);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MemberCouponBottomBjg_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MemberCouponBottomBjg_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MemberCouponBottomBjg_vue_vue_type_style_index_0_id_44c0e93e_scoped_true_lang_less__ = __webpack_require__(474);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MemberCouponBottomBjg_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__["staticRenderFns"],
  false,
  null,
  "44c0e93e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('44c0e93e')) {
      api.createRecord('44c0e93e', component.options)
    } else {
      api.reload('44c0e93e', component.options)
    }
    module.hot.accept("./MemberCouponBottomBjg.vue?vue&type=template&id=44c0e93e&scoped=true", function () {
      api.rerender('44c0e93e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/MemberCouponBottomBjg.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 472 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__ = __webpack_require__(473);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_template_id_44c0e93e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 473 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-member-coupon-top gwd-member-coupon",
    attrs: { href: _vm.link, target: "_blank", title: "点击领取" }
  }, [_c("span", { staticStyle: { color: "white", "margin-left": "5px" } }, [_vm._v(_vm._s(_vm.getText("当前商品可领会员券")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      color: "white",
      "margin-left": "9px",
      "margin-right": "9px"
    }
  }, [_vm._v(_vm._s(_vm.getText("立即领取")))]), _vm._v(" "), _vm.qr ? _c("div", { staticClass: "gwd-qr-container" }, [_c("img", {
    staticStyle: {
      "margin-top": "7px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: _vm.qr, alt: "" }
  }), _vm._v(" "), _c("div", { staticStyle: { "margin-top": "4px", "text-align": "center" } }, [_c("span", {
    staticStyle: {
      "font-weight": "bold",
      color: "#ff6132",
      "font-size": "14px"
    }
  }, [_vm._v(_vm._s(_vm.getText("手淘扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      color: "#333333",
      "font-size": "12px"
    }
  }, [_vm._v(_vm._s(_vm.getText("联系客服领取")))])])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 474 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_style_index_0_id_44c0e93e_scoped_true_lang_less__ = __webpack_require__(475);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_style_index_0_id_44c0e93e_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MemberCouponBottomBjg_vue_vue_type_style_index_0_id_44c0e93e_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 475 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(476);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("247ae98e", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponBottomBjg.vue?vue&type=style&index=0&id=44c0e93e&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MemberCouponBottomBjg.vue?vue&type=style&index=0&id=44c0e93e&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 476 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-qr-container[data-v-44c0e93e] {\n  display: none;\n  position: absolute;\n  right: 0px;\n  width: 153px;\n  height: 156px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  flex-direction: column;\n  z-index: 9;\n  bottom: 28px;\n  align-items: center;\n}\n.mainbar-fold .gwd-member-coupon-top[data-v-44c0e93e] {\n  display: none;\n}\n.gwd-member-coupon-top[data-v-44c0e93e] {\n  height: 28px;\n  background: linear-gradient(to right, #f28936, #ff351e);\n  position: relative;\n  background-size: cover;\n  display: inline-flex;\n  align-items: center;\n  margin-top: 2px;\n  cursor: pointer;\n  border-radius: 2px;\n  margin-right: 5px;\n}\n.gwd-member-coupon-top .gwd-qr-container[data-v-44c0e93e] {\n  display: none;\n  position: absolute;\n}\n.gwd-member-coupon-top[data-v-44c0e93e]::before,\n.gwd-member-coupon-top[data-v-44c0e93e]::after {\n  content: '';\n  position: absolute;\n  left: 115px;\n  width: 4px;\n  height: 4px;\n  background: white;\n  border-radius: 2px;\n  top: -2px;\n}\n.gwd-member-coupon-top[data-v-44c0e93e]::after {\n  top: unset;\n  bottom: -2px;\n}\n.gwd-member-coupon-top[data-v-44c0e93e]:hover {\n  text-decoration: none;\n}\n.gwd-member-coupon-top:hover .gwd-qr-container[data-v-44c0e93e] {\n  display: flex;\n}\n", ""]);

// exports


/***/ }),
/* 477 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subsidy_vue_vue_type_template_id_09046175_scoped_true__ = __webpack_require__(478);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subsidy_vue_vue_type_script_lang_js__ = __webpack_require__(140);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Subsidy_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Subsidy_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subsidy_vue_vue_type_style_index_0_id_09046175_scoped_true_lang_less__ = __webpack_require__(485);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Subsidy_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Subsidy_vue_vue_type_template_id_09046175_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Subsidy_vue_vue_type_template_id_09046175_scoped_true__["staticRenderFns"],
  false,
  null,
  "09046175",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('09046175')) {
      api.createRecord('09046175', component.options)
    } else {
      api.reload('09046175', component.options)
    }
    module.hot.accept("./Subsidy.vue?vue&type=template&id=09046175&scoped=true", function () {
      api.rerender('09046175', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/Subsidy.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 478 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__ = __webpack_require__(479);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_template_id_09046175_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 479 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjgou-subsidy-bar bjgou-component",
    attrs: { title: _vm.transText("点击领取") },
    on: { mouseover: _vm.over, click: _vm.click }
  }, [_c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-family": "Arial",
      "font-size": "14px",
      "font-weight": "bold",
      "margin-left": "95px",
      "margin-top": "10px"
    }
  }, [_vm._v("¥")]), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: { "font-size": "30px", "font-weight": "bold" }
  }, [_vm._v(_vm._s(_vm.value))]), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-left": "6px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.transText("店铺红包")))]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-right": "22px"
    }
  }, [_vm._v(_vm._s(_vm.transText(_vm.site === "360buy" ? "点击领取" : "立即领取")))]), _vm._v(" "), _vm.qr ? _c("div", { staticClass: "qrcode" }, [_c("img", {
    staticStyle: {
      "margin-top": "7px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: _vm.qrcode, alt: "" }
  }), _vm._v(" "), _vm.error ? _c("QrError", { on: { refresh: _vm.over } }) : _vm._e(), _vm._v(" "), _c("div", {
    staticStyle: { "margin-top": "4px", "text-align": "center" }
  }, [_c("span", {
    staticStyle: {
      "font-weight": "bold",
      color: "#ff6132",
      "font-size": "14px"
    }
  }, [_vm._v(_vm._s(_vm.transText("微信扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      color: "#333333",
      "font-size": "12px"
    }
  }, [_vm._v(_vm._s(_vm.transText(_vm.site === "360buy" ? "领优惠券" : "领礼金")))])])], 1) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 480 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__ = __webpack_require__(481);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_template_id_8590af9e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 481 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-qr-error" }, [_c("img", {
    attrs: {
      src: "https://cdn.gwdang.com/images/extensions/warn@2x.png",
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticClass: "grayText", staticStyle: { "margin-top": "10px" } }, [_vm._v("当前网络异常"), _c("br"), _vm._v("点此"), _c("span", { staticClass: "red", on: { click: _vm.click } }, [_vm._v("刷新")])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 482 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_8590af9e_scoped_true_lang_less__ = __webpack_require__(483);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_8590af9e_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_QrError_vue_vue_type_style_index_0_id_8590af9e_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 483 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(484);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("72648de2", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QrError.vue?vue&type=style&index=0&id=8590af9e&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./QrError.vue?vue&type=style&index=0&id=8590af9e&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 484 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-qr-error[data-v-8590af9e] {\n  width: 118px;\n  height: 118px;\n  background: white;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.bjg-qr-error img[data-v-8590af9e] {\n  margin-top: 22px;\n  width: 32px;\n  height: 32px;\n}\n.bjg-qr-error .grayText[data-v-8590af9e] {\n  color: #999999;\n  display: inline-block;\n  font-size: 20px;\n  width: 125px;\n  text-align: center;\n  line-height: 32px;\n  transform: scale(0.5);\n  transform-origin: top center;\n}\n.bjg-qr-error .grayText .red[data-v-8590af9e] {\n  color: #ff2d53;\n  text-decoration: underline;\n  cursor: pointer;\n}\n", ""]);

// exports


/***/ }),
/* 485 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_style_index_0_id_09046175_scoped_true_lang_less__ = __webpack_require__(486);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_style_index_0_id_09046175_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Subsidy_vue_vue_type_style_index_0_id_09046175_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 486 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(487);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("754520e9", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Subsidy.vue?vue&type=style&index=0&id=09046175&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Subsidy.vue?vue&type=style&index=0&id=09046175&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 487 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-coupon-white[data-v-09046175] {\n  color: #ffffff;\n}\n.bjgou-subsidy-bar[data-v-09046175] {\n  cursor: pointer;\n  margin-top: 5px;\n  width: 442px;\n  height: 67px;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  background: url(https://cdn.bijiago.com/images/extensions/bijiago/bigCoupon@2x.png);\n  box-sizing: border-box !important;\n  background-size: contain;\n}\n.bjgou-subsidy-bar .qrcode[data-v-09046175] {\n  display: none;\n  position: absolute;\n  top: 70px;\n  right: -15px;\n  width: 148px;\n  height: 156px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  z-index: 9;\n}\n.bjgou-subsidy-bar .bjg-bold[data-v-09046175] {\n  font-size: 13px;\n  font-weight: bold;\n  color: #ff2d53;\n}\n.bjgou-subsidy-bar .bjg-take[data-v-09046175] {\n  min-width: 87px;\n  height: 22px;\n  border-radius: 11px;\n  border: 1px solid #FF2D53;\n  position: relative;\n  display: flex;\n  cursor: pointer;\n}\n.bjgou-subsidy-bar .bjg-take span[data-v-09046175] {\n  font-size: 12px;\n  text-align: center;\n  line-height: 22px;\n}\n.bjgou-subsidy-bar .bjg-take .taker[data-v-09046175] {\n  color: white;\n  width: 36px;\n  height: 24px;\n  line-height: 24px;\n  background: linear-gradient(90deg, #FF3A62 0%, #FF665B 100%);\n  border-radius: 11px;\n  display: inline-block;\n}\n.bjgou-subsidy-bar[data-v-09046175]:hover {\n  text-decoration: none;\n}\n.bjgou-subsidy-bar:hover .qrcode[data-v-09046175] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n", ""]);

// exports


/***/ }),
/* 488 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__ = __webpack_require__(489);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubsidyBottom_vue_vue_type_script_lang_js__ = __webpack_require__(145);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__SubsidyBottom_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__SubsidyBottom_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SubsidyBottom_vue_vue_type_style_index_0_id_1cab7080_scoped_true_lang_css__ = __webpack_require__(491);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SubsidyBottom_vue_vue_type_style_index_1_id_1cab7080_scoped_true_lang_less__ = __webpack_require__(494);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);







/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__SubsidyBottom_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__["staticRenderFns"],
  false,
  null,
  "1cab7080",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('1cab7080')) {
      api.createRecord('1cab7080', component.options)
    } else {
      api.reload('1cab7080', component.options)
    }
    module.hot.accept("./SubsidyBottom.vue?vue&type=template&id=1cab7080&scoped=true", function () {
      api.rerender('1cab7080', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/SubsidyBottom.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 489 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__ = __webpack_require__(490);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_template_id_1cab7080_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 490 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjgou-subsidy-bar-bottom",
    staticStyle: { cursor: "pointer" },
    attrs: { title: _vm.transText("点击领取") },
    on: { mouseover: _vm.over, click: _vm.click }
  }, [_c("span", { staticClass: "coupon-marleft" }), _vm._v(" "), _c("a", { attrs: { id: "top_coupon_btn" } }, [_c("span", { staticClass: "top-coupon-tle" }, [_vm._v(_vm._s(_vm.transText("当前商品领红包立减")))]), _vm._v(" "), _c("span", { staticClass: "price-num", staticStyle: { "margin-left": "17px" } }, [_c("span", { staticClass: "price-sm" }, [_vm._v("¥")]), _c("span", [_vm._v(_vm._s(_vm.value))])]), _vm._v(" "), _c("em", { staticClass: "link_hand" }), _vm._v(" "), _vm.qr ? _c("div", { staticClass: "qrcode" }, [_c("img", {
    staticStyle: {
      "margin-top": "7px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: _vm.qrcode, alt: "" }
  }), _vm._v(" "), _vm.error ? _c("QrError", { on: { refresh: _vm.over } }) : _vm._e(), _vm._v(" "), _c("div", {
    staticStyle: {
      "margin-top": "4px",
      "text-align": "center"
    }
  }, [_c("span", {
    staticStyle: {
      "font-weight": "bold",
      color: "#ff6132",
      "font-size": "14px"
    }
  }, [_vm._v(_vm._s(_vm.transText("微信扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      color: "#333333",
      "font-size": "12px"
    }
  }, [_vm._v(_vm._s(_vm.transText(_vm.site === "360buy" ? "领优惠券" : "领礼金")))])])], 1) : _vm._e()])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 491 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_0_id_1cab7080_scoped_true_lang_css__ = __webpack_require__(492);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_0_id_1cab7080_scoped_true_lang_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_0_id_1cab7080_scoped_true_lang_css__);
/* unused harmony reexport namespace */


/***/ }),
/* 492 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(493);
if(typeof content === 'string') content = [[module.i, content, '']];
// add the styles to the DOM
var update = __webpack_require__(37)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubsidyBottom.vue?vue&type=style&index=0&id=1cab7080&scoped=true&lang=css", function() {
			var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubsidyBottom.vue?vue&type=style&index=0&id=1cab7080&scoped=true&lang=css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}

/***/ }),
/* 493 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "\n#top_coupon_btn[data-v-1cab7080] {\n  background: url(https://cdn.gwdang.com/images/extensions/bijiago/bottomCoupon@2x.png) 0 0 no-repeat;\n  display: inline-flex;\n  height: 28px;\n  width: 161px;\n  white-space: nowrap;\n  position: relative;\n  z-index: 999999999999;\n  padding: 0 !important;\n  margin: 3px 40px 4px 0!important;\n  border: none !important;\n  background-size: cover;\n  align-items: center;\n  text-decoration: none!important;\n}\n.coupon_detail[data-v-1cab7080] {\n  position: absolute;\n  right: 1px;\n  height: 156px;\n  width: 146px;\n  z-index: 99999999999;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  display: none;\n}\n#bjgext_mainbar .coupon_detail[data-v-1cab7080] {\n  top: initial!important;\n}\n#top_coupon_btn:hover .coupon_detail[data-v-1cab7080] {\n  display: block;\n}\n.coupon_detail img[data-v-1cab7080] {\n  width: 118px;\n  height: 118px;\n  float: left;\n  margin-left: 14px;\n  margin-top: 8px;\n}\n.coupon_detail span[data-v-1cab7080] {\n  font-size: 14px;\n  color: #FF4335 !important;\n  letter-spacing: 0.22px;\n  font-weight: bold;\n  float: left;\n  height: 14px;\n  line-height: 14px;\n  width: 100%;\n  margin-top: 6px;\n  text-align: center;\n}\n.coupon-marleft[data-v-1cab7080] {\n  height: 100%;\n  width: 10px;\n  float: left !important;\n  border-left: 1px solid #edf1f2;\n}\n.link_hand[data-v-1cab7080] {\n  display: inline-block;\n  height: 30px;\n  width: 38px;\n  position: absolute;\n  right: -38px;\n  top: -2px;\n  background: url(https://cdn.gwdang.com/images/extensions/newbar/hand.gif) 0px 0px no-repeat;\n}\n#top_coupon_btn *[data-v-1cab7080] {\n  color: #fff;\n  /*float: left;*/\n  font-family: \"microsoft yahei\";\n}\n#top_coupon_btn .top-coupon-tle[data-v-1cab7080] {\n  height: 16px;\n  text-align: center;\n  line-height: 16px;\n  margin-left: 2px;\n  font-size: 12px !important;\n  font-weight: normal !important;\n}\n#top_coupon_btn .price-num[data-v-1cab7080] {\n  font-size: 14px;\n  color: #FFFFFF;\n  font-weight: bold;\n  width: 46px;\n  height: 22px;\n  text-align: center;\n  margin-left: 3px;\n  line-height: 22px !important;\n  padding: 0px !important;\n  vertical-align: middle;\n}\n#top_coupon_btn .price-num span[data-v-1cab7080] {\n  display: inline;\n}\n#top_coupon_btn .price-sm[data-v-1cab7080] {\n  font-size: 12px;\n  transform: scale(0.8333);\n  transform-origin: bottom right;\n}\n", ""]);

// exports


/***/ }),
/* 494 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_1_id_1cab7080_scoped_true_lang_less__ = __webpack_require__(495);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_1_id_1cab7080_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SubsidyBottom_vue_vue_type_style_index_1_id_1cab7080_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 495 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(496);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("67a4e900", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubsidyBottom.vue?vue&type=style&index=1&id=1cab7080&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SubsidyBottom.vue?vue&type=style&index=1&id=1cab7080&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 496 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgou-subsidy-bar-bottom .qrcode[data-v-1cab7080] {\n  display: none;\n  position: absolute;\n  bottom: 45px;\n  right: 5px;\n  width: 148px;\n  height: 156px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  z-index: 9;\n}\n.bjgou-subsidy-bar-bottom:hover .qrcode[data-v-1cab7080] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n", ""]);

// exports


/***/ }),
/* 497 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__ = __webpack_require__(498);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ShopCouponMini_vue_vue_type_script_lang_js__ = __webpack_require__(147);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__ShopCouponMini_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__ShopCouponMini_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ShopCouponMini_vue_vue_type_style_index_0_id_c6f6054e_scoped_true_lang_less__ = __webpack_require__(500);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__ShopCouponMini_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__["staticRenderFns"],
  false,
  null,
  "c6f6054e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('c6f6054e')) {
      api.createRecord('c6f6054e', component.options)
    } else {
      api.reload('c6f6054e', component.options)
    }
    module.hot.accept("./ShopCouponMini.vue?vue&type=template&id=c6f6054e&scoped=true", function () {
      api.rerender('c6f6054e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/ShopCouponMini.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 498 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__ = __webpack_require__(499);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_template_id_c6f6054e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 499 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "bjgou-subsidy-bar bjgou-component",
    attrs: { href: _vm.link, target: "_blank", title: "点击领取" }
  }, [_c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-family": "Arial",
      "font-size": "14px",
      "font-weight": "bold",
      "margin-left": "40px",
      "margin-top": "10px"
    }
  }, [_vm._v("¥")]), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: { "font-size": "30px", "font-weight": "bold" }
  }, [_vm._v(_vm._s(_vm.coupon.discount))]), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-left": "6px",
      "margin-top": "6px"
    }
  }, [_vm._v("\n    " + _vm._s(_vm.getText("店铺券(满")) + _vm._s(_vm.coupon.limit) + _vm._s(_vm.getText("减")) + _vm._s(_vm.coupon.discount) + ")\n  ")]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("span", {
    staticClass: "bjg-coupon-white",
    staticStyle: {
      "font-size": "18px",
      "font-weight": "bold",
      "margin-right": "22px"
    }
  }, [_vm._v(_vm._s(_vm.getText("立即领取")))]), _vm._v(" "), false ? _c("div", { staticClass: "gwd-coupon-qr" }, [_c("span", {
    staticClass: "gwd-coupon-title",
    staticStyle: { "margin-top": "6px" }
  }, [_vm._v(_vm._s(_vm.getText("领券满")) + _vm._s(_vm.coupon.limit) + _vm._s(_vm.getText("减")) + _vm._s(_vm.coupon.discount))]), _vm._v(" "), _c("img", {
    staticStyle: {
      "margin-top": "5px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: this.img, alt: "" }
  }), _vm._v(" "), _c("div", {
    staticStyle: {
      "vertical-align": "bottom",
      "margin-top": "6px",
      "text-align": "center",
      height: "14px",
      "line-height": "14px"
    }
  }, [_c("span", {
    staticStyle: {
      "font-size": "14px",
      "font-weight": "bold",
      color: "#ff6132"
    }
  }, [_vm._v(_vm._s(_vm.getText("淘宝APP扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      "font-size": "12px",
      color: "#333333"
    }
  }, [_vm._v(_vm._s(_vm.getText("领店铺券")))])])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 500 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_style_index_0_id_c6f6054e_scoped_true_lang_less__ = __webpack_require__(501);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_style_index_0_id_c6f6054e_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponMini_vue_vue_type_style_index_0_id_c6f6054e_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 501 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(502);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("0da5ecf8", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponMini.vue?vue&type=style&index=0&id=c6f6054e&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponMini.vue?vue&type=style&index=0&id=c6f6054e&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 502 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-coupon-white[data-v-c6f6054e] {\n  color: #ffffff;\n}\n.bjgou-subsidy-bar[data-v-c6f6054e] {\n  margin-top: 5px;\n  width: 442px;\n  height: 67px;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  background: url(https://cdn.bijiago.com/images/extensions/bijiago/bigCoupon@2x.png);\n  box-sizing: border-box !important;\n  background-size: contain;\n  text-decoration: none!important;\n}\n.bjgou-subsidy-bar .gwd-coupon-qr[data-v-c6f6054e] {\n  display: none;\n  position: absolute;\n  width: 148px;\n  height: 175px;\n  right: 0;\n  z-index: 9;\n  top: 70px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  flex-direction: column;\n  align-items: center;\n}\n.bjgou-subsidy-bar .gwd-coupon-qr .gwd-coupon-title[data-v-c6f6054e] {\n  display: inline-block;\n  position: relative;\n  font-size: 12px;\n  color: #333333 !important;\n  z-index: 2;\n}\n.bjgou-subsidy-bar .gwd-coupon-qr .gwd-coupon-title[data-v-c6f6054e]::after {\n  content: '';\n  position: absolute;\n  bottom: 2px;\n  left: 0;\n  right: 0;\n  height: 4px;\n  z-index: -1;\n  background: #ff8f4b;\n}\n.bjgou-subsidy-bar .qrcode[data-v-c6f6054e] {\n  display: none;\n  position: absolute;\n  top: 70px;\n  right: -15px;\n  width: 148px;\n  height: 156px;\n  background: #FFF7F7;\n  border: 1px solid #FF2D53;\n  z-index: 9;\n}\n.bjgou-subsidy-bar .bjg-bold[data-v-c6f6054e] {\n  font-size: 13px;\n  font-weight: bold;\n  color: #ff2d53;\n}\n.bjgou-subsidy-bar .bjg-take[data-v-c6f6054e] {\n  min-width: 87px;\n  height: 22px;\n  border-radius: 11px;\n  border: 1px solid #FF2D53;\n  position: relative;\n  display: flex;\n  cursor: pointer;\n}\n.bjgou-subsidy-bar .bjg-take span[data-v-c6f6054e] {\n  font-size: 12px;\n  text-align: center;\n  line-height: 22px;\n}\n.bjgou-subsidy-bar .bjg-take .taker[data-v-c6f6054e] {\n  color: white;\n  width: 36px;\n  height: 24px;\n  line-height: 24px;\n  background: linear-gradient(90deg, #FF3A62 0%, #FF665B 100%);\n  border-radius: 11px;\n  display: inline-block;\n}\n.bjgou-subsidy-bar:hover .gwd-coupon-qr[data-v-c6f6054e] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n", ""]);

// exports


/***/ }),
/* 503 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__ = __webpack_require__(504);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ShopCouponTop_vue_vue_type_script_lang_js__ = __webpack_require__(150);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__ShopCouponTop_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__ShopCouponTop_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ShopCouponTop_vue_vue_type_style_index_0_id_05b8b243_scoped_true_lang_less__ = __webpack_require__(506);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ShopCouponTop_vue_vue_type_style_index_1_id_05b8b243_scoped_true_lang_less__ = __webpack_require__(509);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);







/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__ShopCouponTop_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__["staticRenderFns"],
  false,
  null,
  "05b8b243",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('05b8b243')) {
      api.createRecord('05b8b243', component.options)
    } else {
      api.reload('05b8b243', component.options)
    }
    module.hot.accept("./ShopCouponTop.vue?vue&type=template&id=05b8b243&scoped=true", function () {
      api.rerender('05b8b243', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/ShopCouponTop.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 504 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__ = __webpack_require__(505);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_template_id_05b8b243_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 505 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjgou-subsidy-bar-bottom gwd-row gwd-align" }, [_c("span", { staticClass: "coupon-marleft" }), _vm._v(" "), _c("a", {
    staticStyle: { cursor: "pointer" },
    attrs: {
      id: "top_coupon_btn",
      href: _vm.link,
      target: "_blank",
      title: "点击领取"
    }
  }, [_c("span", { staticClass: "top-coupon-tle" }, [_vm._v(_vm._s(_vm.getText("当前商品可领券")))]), _vm._v(" "), _c("span", {
    staticClass: "price-num",
    staticStyle: { "margin-left": "25px" }
  }, [_c("span", { staticClass: "price-sm" }, [_vm._v("¥")]), _c("span", [_vm._v(_vm._s(_vm.coupon.discount))])]), _vm._v(" "), _c("em", { staticClass: "link_hand" }), _vm._v(" "), false ? _c("div", { staticClass: "gwd-coupon-qr" }, [_c("span", {
    staticClass: "gwd-coupon-title",
    staticStyle: { "margin-top": "6px" }
  }, [_vm._v(_vm._s(_vm.getText("领券满")) + _vm._s(_vm.coupon.limit) + _vm._s(_vm.getText("减")) + _vm._s(_vm.coupon.discount))]), _vm._v(" "), _c("img", {
    staticStyle: {
      "margin-top": "5px",
      width: "120px",
      height: "120px"
    },
    attrs: { src: this.img, alt: "" }
  }), _vm._v(" "), _c("div", {
    staticStyle: {
      "vertical-align": "bottom",
      "margin-top": "6px",
      "text-align": "center",
      height: "14px",
      "line-height": "14px"
    }
  }, [_c("span", {
    staticStyle: {
      "font-size": "14px",
      "font-weight": "bold",
      color: "#ff6132"
    }
  }, [_vm._v(_vm._s(_vm.getText("淘宝APP扫码")))]), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      "font-size": "12px",
      color: "#333333"
    }
  }, [_vm._v(_vm._s(_vm.getText("领店铺券")))])])]) : _vm._e()])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 506 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_0_id_05b8b243_scoped_true_lang_less__ = __webpack_require__(507);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_0_id_05b8b243_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_0_id_05b8b243_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 507 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(508);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("8f86367e", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponTop.vue?vue&type=style&index=0&id=05b8b243&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponTop.vue?vue&type=style&index=0&id=05b8b243&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 508 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "#top_coupon_btn[data-v-05b8b243] {\n  background: url(https://cdn.gwdang.com/images/extensions/bijiago/bottomCoupon@2x.png) 0 0 no-repeat;\n  display: inline-flex;\n  height: 28px;\n  width: 161px;\n  white-space: nowrap;\n  position: relative;\n  z-index: 999999999999;\n  padding: 0 !important;\n  margin: 3px 40px 4px 0!important;\n  border: none !important;\n  background-size: cover;\n  align-items: center;\n  text-decoration: none!important;\n}\n.coupon_detail[data-v-05b8b243] {\n  position: absolute;\n  right: 1px;\n  height: 156px;\n  width: 146px;\n  z-index: 99999999999;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  display: none;\n}\n#bjgext_mainbar .coupon_detail[data-v-05b8b243] {\n  top: initial!important;\n}\n#top_coupon_btn:hover .coupon_detail[data-v-05b8b243] {\n  display: block;\n}\n.coupon_detail img[data-v-05b8b243] {\n  width: 118px;\n  height: 118px;\n  float: left;\n  margin-left: 14px;\n  margin-top: 8px;\n}\n.coupon_detail span[data-v-05b8b243] {\n  font-size: 14px;\n  color: #FF4335 !important;\n  letter-spacing: 0.22px;\n  font-weight: bold;\n  float: left;\n  height: 14px;\n  line-height: 14px;\n  width: 100%;\n  margin-top: 6px;\n  text-align: center;\n}\n.coupon-marleft[data-v-05b8b243] {\n  height: 100%;\n  width: 10px;\n  float: left !important;\n  border-left: 1px solid #edf1f2;\n}\n.link_hand[data-v-05b8b243] {\n  display: inline-block;\n  height: 30px;\n  width: 38px;\n  position: absolute;\n  right: -38px;\n  top: -2px;\n  background: url(https://cdn.gwdang.com/images/extensions/newbar/hand.gif) 0px 0px no-repeat;\n}\n#top_coupon_btn *[data-v-05b8b243] {\n  color: #fff;\n  /*float: left;*/\n  font-family: \"microsoft yahei\";\n}\n#top_coupon_btn .top-coupon-tle[data-v-05b8b243] {\n  height: 16px;\n  text-align: center;\n  line-height: 16px;\n  margin-left: 8px;\n  font-size: 12px !important;\n  font-weight: normal !important;\n}\n#top_coupon_btn .price-num[data-v-05b8b243] {\n  font-size: 14px;\n  color: #FFFFFF;\n  font-weight: bold;\n  width: 46px;\n  height: 22px;\n  text-align: center;\n  margin-left: 3px;\n  line-height: 22px !important;\n  padding: 0px !important;\n  vertical-align: middle;\n}\n#top_coupon_btn .price-num span[data-v-05b8b243] {\n  display: inline;\n}\n#top_coupon_btn .price-sm[data-v-05b8b243] {\n  font-size: 12px;\n  transform: scale(0.8333);\n  transform-origin: bottom right;\n}\n", ""]);

// exports


/***/ }),
/* 509 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_1_id_05b8b243_scoped_true_lang_less__ = __webpack_require__(510);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_1_id_05b8b243_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ShopCouponTop_vue_vue_type_style_index_1_id_05b8b243_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 510 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(511);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("d39f6ac0", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponTop.vue?vue&type=style&index=1&id=05b8b243&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ShopCouponTop.vue?vue&type=style&index=1&id=05b8b243&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 511 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgou-subsidy-bar-bottom[data-v-05b8b243] {\n  padding-left: 5px;\n  height: 100%;\n}\n.bjgou-subsidy-bar-bottom .qrcode[data-v-05b8b243] {\n  display: none;\n  position: absolute;\n  bottom: 45px;\n  right: 5px;\n  width: 148px;\n  height: 156px;\n  background: #FFF7F7;\n  border: 1px solid #FF2D53;\n  z-index: 9;\n}\n.bjgou-subsidy-bar-bottom .gwd-coupon-qr[data-v-05b8b243] {\n  display: none;\n  position: absolute;\n  width: 148px;\n  height: 175px;\n  right: 0;\n  z-index: 9;\n  bottom: 30px;\n  background: #FFF6F4;\n  border: 1px solid #FF6132;\n  flex-direction: column;\n  align-items: center;\n}\n.bjgou-subsidy-bar-bottom .gwd-coupon-qr .gwd-coupon-title[data-v-05b8b243] {\n  display: inline-block;\n  position: relative;\n  font-size: 12px;\n  color: #333333 !important;\n  z-index: 2;\n}\n.bjgou-subsidy-bar-bottom .gwd-coupon-qr .gwd-coupon-title[data-v-05b8b243]::after {\n  content: '';\n  position: absolute;\n  bottom: 2px;\n  left: 0;\n  right: 0;\n  height: 4px;\n  z-index: -1;\n  background: #ff8f4b;\n}\n.bjgou-subsidy-bar-bottom:hover .gwd-coupon-qr[data-v-05b8b243] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n", ""]);

// exports


/***/ }),
/* 512 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

var _this = this;

var request = __webpack_require__(3);
var productInfo = __webpack_require__(20);

module.exports = function callee$0$0(dpId) {
  var link, res, toReturn;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(G.site === 'taobao')) {
          context$1$0.next = 3;
          break;
        }

        context$1$0.next = 3;
        return regeneratorRuntime.awrap(Promise.race([__webpack_require__(11).waitForConditionFn(function () {
          return $('.shop-name-link').length;
        }), __webpack_require__(10).sleep(2000)]));

      case 3:
        link = productInfo.appendTbInfoForUrl(G.u_server + '/gyp/taobao/coupon?dp_id=' + dpId + '&scene=item2&rebate=1&slist=1');
        context$1$0.next = 6;
        return regeneratorRuntime.awrap(request.get(link));

      case 6:
        res = context$1$0.sent;
        toReturn = {
          code: 200
        };

        if (res.data && res.data.coupon) {
          toReturn.data = {
            coupon: {
              coupon_money: res.data.coupon.split('减')[1].replace('元', '')
            }
          };
          if (res.data.rebate) {
            toReturn.data.rebate = res.data.rebate;
            toReturn.data.utoken = res.data.utoken;
          }
        } else {
          toReturn.code = 500;
          toReturn.msg = '获取优惠券失败';
          if (res.data && res.data.rebate) {
            G.dp.rebate = res.data.rebate;
          } else {
            if (res.data && res.data.slist) {
              G.dp.slist = res.data.slist;
            } else {
              G.dp.slist = [];
            }
            __webpack_require__(4).setMet('dpSlist', G.dp.slist);
          }
        }
        return context$1$0.abrupt('return', toReturn);

      case 10:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 513 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var template = __webpack_require__(13);
var mobileprice = __webpack_require__(514);
var userData = __webpack_require__(15);

var getPromoInfo = function getPromoInfo(callback) {
  var dp_data = userData.get('dp_data');
  var dp_id = dp_data.now.dp_id;
  var class_id = dp_data.now.class_id;
  var sbrand = dp_data.exact_arr.sbrand;
  var brand_id = dp_data.exact_arr.brand_id;
  var keyword = encodeURIComponent(dp_data.now.coreword);
  var tb_class = dp_data.exact_arr.taobao_class_id;
  var title = dp_data.collectInfo && dp_data.collectInfo.title ? dp_data.collectInfo.title : G.dp.name;
  //order说明： 0 最新 1 最热 2 即将结束
  var url = G.server + '/brwext/promo_brand?pg=1&ps=5&order=0&tb_class=' + tb_class + '&keyword=' + keyword + '&class_id=' + class_id + '&dp_id=' + dp_id + '&title=' + encodeURIComponent(title) + '&url=' + encodeURIComponent(window.location.href) + '&sbrand=' + encodeURIComponent(sbrand) + '&brand_id=' + brand_id;
  request.get(url).done(function (data) {
    if (data && data.products && data.products.length > 0) callback(data);else callback(null);
  });
};
var render = function render(data) {

  if (data) {
    if (data.products.length < 4 && data.products.length !== 2) return;
    data.products = data.products.slice(0, 4);
    var dom = __webpack_require__(516);
    var html = template.compile(dom)({
      data: data.products
    });
    $('#bjgext_minibar .promo-box ul').append(html);
    //$('.promo-box').show()
    // $('.promo-box').prev().css('border-bottom', '1px solid #e6e9eb')
    //$('.bjgext-toptabs .bjgext-mini-logo, .bjgext-mini-compare').addClass('hasPromo')
  } else {
      hidePrev();
    }
  mobileprice.init();
};

function hidePrev() {
  setTimeout(function () {
    $('.promo-box').prev().css('border-bottom', 'none');
    $('.promo-box').remove();
  }, 0);
}

module.exports.init = function () {
  if (G.site === 'amazon-com' || G.site === 'amazon-uk' || G.site === 'amazon-jp' || G.site === '6pm') {
    hidePrev();
    return;
  }
  if (G.show_promo === '0' || G.show_minibar === '0') {
    hidePrev();
    return;
  }
  if (G.aliSite) {
    hidePrev();
    return;
  }
  getPromoInfo(render);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 514 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  // var protocol = location.protocol === 'https:' ? 'https:' : 'http:';
  var exports = {};
  var $ = __webpack_require__(1);
  var request = __webpack_require__(3);
  var cnzz = __webpack_require__(12);
  var template = __webpack_require__(13);
  var now_site,
      num = 0;
  var dp_now, thisunion;
  var sitePatterns = {
    '360buy': ['#prom-mbuy .mob-buy', '#m-pirce'],
    'yihaodian': ['#productSubName'],
    'dangdang': ['#mobile_exclusive_price'],
    'suning': ['#qrCode', '#phoneOrderCode'],
    'gome': ['#shoujizhuanxiang_box'],
    '51buy': ['#sea_desc']
  };
  var getPricePattern = {
    '360buy': '#prom-mbuy .J-m-price',
    '360buy_1': '#m-pirce .J-m-price',
    'dangdang': '#mobile_price'
  };
  var viewsPatterns = {
    '360buy': '<a id="bjd_m_price" href="{{url}}" target="_blank"  rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#005aa0;">无需扫码，电脑上也可享受手机优惠价!</a>',
    '360buy_1': '<a id="bjd_m_price" href="{{url}}" target="_blank"  rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#005aa0;">无需扫码，电脑上也可享受手机优惠价!</a>',
    'yihaodian': '<a id="bjd_m_price" href="{{url}}" target="_blank"  rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#06c;background-color: #fff4f2;display: block;padding-left: 10px;height: 26px;line-height: 26px;font-size: 13px;">手机专享价{{price}}，立即前往购买</a>',
    'dangdang': '<a id="bjd_m_price" href="{{url}}" target="_blank" rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#005aa0;">无需扫码，电脑上也可享受手机优惠价!</a>',
    'suning': '<a id="bjd_m_price" href="{{url}}" target="_blank" rel="noreferrer" title="{{title}}"style="text-decoration:underline;float:right;position:absolute;right:15px;width:110px;color: #003399;">前往手机版页面购买</a>',
    '51buy': '<a id="bjd_m_price" href="{{url}}" target="_blank" rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#06c;display: block;height: 26px;line-height: 26px;font-size: 13px;">手机专享价{{price}}，立即前往购买</a>',
    'gome': '<a id="bjd_m_price" href="{{url}}" target="_blank" rel="noreferrer" title="{{title}}"style="text-decoration:underline;color:#06c;display: block;height: 26px;line-height: 26px;font-size: 13px;">手机专享价{{price}}，立即前往购买</a>'

  };
  var insertPatterns = {
    '360buy': ['#m-pirce', '.J-prom-mbuy', '#prom-one'],
    'yihaodian': '#' + G.extBrand + '_promo_active_yihaodian',
    'dangdang': '#mobile_exclusive_price',
    'suning': ['#qrCode .qrcode-main-img', '.ph-price-qrcode .qrcode-region'],
    '51buy': '#' + G.extBrand + '_promo_active_51buy',
    'gome': '#shoujizhuanxiang_box'
  };
  exports.init = function (now, union) {
    thisunion = union;
    dp_now = now;
    if (forbitSite()) hasMobilePrice();
  };

  function findPattern(pattern) {
    var doms = sitePatterns[pattern];
    for (var i = 0; i < doms.length; i++) {
      if ($(doms[i]).is(':visible') && siteHasMobile()) {
        now_site = pattern;
        sendUrl(thisunion);
        return;
      }
    }
    num++;
    if (num === 10) return;
    setTimeout(function () {
      findPattern(pattern);
    }, 1000);
  }

  function siteHasMobile() {
    var hasmobile = false,
        site = G.site;
    switch (site) {
      case '360buy':
        hasmobile = true;
        break;
      case 'dangdang':
        hasmobile = true;
        break;
      case 'suning':
        if ($('#qrCode').text().indexOf('手机购买') > -1) {
          hasmobile = true;
        } else if ($('#phoneOrderCode').text().indexOf('手机专享价') > -1 && $('#phoneOrderCode').is(':visible')) {
          hasmobile = true;
        } else {
          hasmobile = false;
        }
        break;
      case '51buy':
        if ($('#sea_desc').text().indexOf('手机专享价') > -1) {
          hasmobile = true;
        } else if ($('.xprice .m-qrcode .txt em').text().indexOf('手机购买省') > -1) {
          if ($('.xprice .m-qrcode .txt em').text().indexOf('￥0.00') > -1) return false;
          hasmobile = true;
        } else {
          hasmobile = false;
        }
        break;
      case 'gome':
        if ($('#shoujizhuanxiang_box .hl_red_bg').text() == '手机专享') {
          hasmobile = true;
        }
        break;
      case 'yihaodian':
        if ($('#productSubName').text().indexOf('手机端下单') > -1) {
          hasmobile = true;
        } else {
          hasmobile = false;
        }
        break;
    }
    return hasmobile;
  }

  function hasMobilePrice() {
    for (var pattern in sitePatterns) {
      if (G.site === pattern) findPattern(pattern);
    }
    if (num === 0) return false;
  }

  function sendUrl(union) {
    var url = document.location.href;
    request.get(G.server + '/extension?ac=go_mobile&url=' + encodeURIComponent(url)).done(function (data) {
      if (data.url !== '' && data.status === 1) {
        if (G.btype == 'luyou' || G.from_device === 'juzi') {
          insert_a(data.url);
          insert_b(data.url);
        } else {
          renderMinibar(data.url);
        }
      }
    });
  }
  var renderBaidu = function renderBaidu(url) {
    var price = getPrice();
    var dom = '<li class="mobile_price">\n              <span>手机专享</span>\n              <a href="' + url + '" target="_blank">' + price + '</a>\n            </li>';
    $('#bdext_minibar .promo-box ul').prepend($(dom));
    $('#bdext_minibar .promo-box').show();
    $('.bdext-toptabs .bdext-mini-logo, .bdext-mini-compare').addClass('hasPromo');
  };

  var renderMinibar = function renderMinibar(url) {
    if (G.from_device === 'baidu') {
      renderBaidu(url);
    } else {
      renderWishlistMobile(url);
    }
  };

  var renderWishlistMobile = function renderWishlistMobile(url) {
    if (G.site === '360buy') return;
    if (G.site != '360buy' || G.from_device == 'mi_new') url = editUrl(url);
    if (!url) return;
    var price = getPrice();
    var spandom = '<li class="li_0" data-type="mob"><a href="' + url + '" title="购物党将带您前往手机版页面，以专享价购买商品" target="_blank" id="' + G.extBrand + '_mobile_price" rel="noreferrer"><span class="mobile_title" >专享价购买</span><span class="mobile_num">' + price + '</span>>></a></li>';
    $('.promo_box_left ul').prepend($(spandom));
    var domli = $('.promo_box_left ul li');
    var len = domli.length;
    for (var i = 0; i < len; i++) {
      domli.eq(i).attr('class', 'li_' + i);
    }
    if (len < 3) {
      $('#' + G.extBrand + '_wishlist_div').addClass('oneline');
      $('#' + G.extBrand + '_promo_box').show();
      if (len == 1) $('.promo_shuxian').hide();
    } else {
      $('#' + G.extBrand + '_wishlist_div').removeClass('oneline').addClass('twolines');
    }
    cnzz.log('新版嵌入手机专享价展现');
    $('#' + G.extBrand + '_mobile_price').on('click', function () {
      cnzz.log('新版嵌入手机专享价点击');
    });
  };

  function forbitSite() {
    if (G.site == '360buy') {
      return true;
    } else {
      if ("ActiveXObject" in window) {
        return false;
      } else {
        return true;
      }
    }
  }

  function addEvent() {
    var color = '';
    $('#bjd_m_price').on('mouseenter', function () {
      color = $(this).css('color');
      if (G.site == 'suning' || G.site.indexOf('suning') > -1) {
        $(this).css('color', '#fff');
      } else {
        $(this).css('color', '#003399');
      }
    }).on('mouseleave', function () {
      $(this).css('color', color);
    });
    $('#bjd_m_price').on('click', function () {
      __webpack_require__(14)('click:mobile_price');
      cnzz.log('手机专享价点击');
    });
  }

  function insert_a(url) {
    if (!url || now_site != '360buy') return;
    var price = getPrice();
    var html = __webpack_require__(515);
    $('#summary-price .dd').eq(0).append(template.compile(html)({
      url: editUrl(url),
      price: price,
      new_extension: G.new_extension,
      extBrand: G.extBrand
    }));

    $('#' + G.extBrand + '_mobile_price').on('click', function () {
      __webpack_require__(14)('click:mobile_price_360buy');
      cnzz.log('手机专享价点击2jd');
    });
  }

  function insert_b(url) {
    if (!url) return;
    var price = getPrice();
    var title = "购物党将带您前往手机版页面，以专享价购买商品";
    if (G.new_extension) title = '';
    var html = viewsPatterns[now_site];
    var insertPt;
    if ($.isArray(insertPatterns[now_site])) {
      for (var i = 0; i < insertPatterns[now_site].length; i++) {
        if ($(insertPatterns[now_site][i]).length > 0) {
          insertPt = insertPatterns[now_site][i];
          break;
        }
      }
    } else {
      insertPt = insertPatterns[now_site];
    }
    if (now_site == 'dangdang' || now_site == 'suning' || now_site == '360buy' || now_site == '360buy_1') {
      $(insertPt).eq(0).after(template.compile(html)({
        url: editUrl(url),
        price: price,
        title: title
      }));
    } else {
      $(insertPt).eq(0).before(template.compile(html)({
        url: editUrl(url),
        price: price,
        title: title
      }));
    }
    cnzz.log('展现手机专享价');
    addEvent();
  }

  function editUrl(url) {
    var murl = G.toMobileUrl;
    return murl + "/union/go?site_id=" + dp_now.site_id + '&target_url=' + url + '&union=' + thisunion + '&column=zhuanxiang_' + dp_now.now_dp_id;
  }

  function getPrice() {
    var price = '';
    if (now_site == '360buy' || now_site == '360buy_1') {
      price = $(getPricePattern[now_site]).text();
    }
    if (now_site == 'dangdang') {
      price = $(getPricePattern[now_site]).text();
    }
    if (now_site == 'yihaodian') {
      var p = $("#productSubName").text().match(/([0-9.]+)元/);
      if (p) price = '¥' + p[1];
    }
    if (now_site == '51buy') {
      var p = $('#sea_desc').text().match(/专享价([0-9.]+)/);
      if (p) price = '¥' + p[1];else {
        var dpPrice = G.dp.price;
        var discount = $('.xprice .m-qrcode .txt em').text().match(/[0-9.]+/);
        if (discount) {
          discount = discount[0];
          dpPrice = Number(dpPrice) - Number(discount);
          price = '¥' + dpPrice;
        }
      }
    }
    if (now_site == 'suning') {
      var p = Number($('.qrcode-main-price em').text());
      if (p != '') {
        var nowPrice = G.dp.price;
        var price = (nowPrice - p).toString();
        if (price.indexOf('.') == -1) price = '¥' + price + '.00';
      } else {
        var p = $('#phoneOrderCode').text().match(/[0-9.]+/);
        if (p) p = p[0];
        if (p) price = '¥' + p;
      }
    }
    if (now_site == 'gome') {
      var saveprice = $('#savemoney').text().match(/[0-9.]+/);
      if (saveprice) saveprice = Number(saveprice[0]) || 0;
      var nowPrice = G.dp.price;
      var price = (nowPrice - saveprice).toString();
      if (price.indexOf('.') == -1) price = '¥' + price + '.00';
    }
    if (price.match(/[0-9]{5}/)) price = price.replace(/\.[0-9]+/, '');
    return price;
  }

  return exports;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 515 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, extBrand = $data.extBrand, url = $data.url, new_extension = $data.new_extension, price = $data.price;
    $$out += '<a id="';
    $$out += $escape(extBrand);
    $$out += '_mobile_price" href="';
    $$out += $escape(url);
    $$out += '" target="_blank" rel="noreferrer" ';
    if (!new_extension) {
        $$out += 'title="购物党将带您前往手机版页面\uFF0C以专享价购买商品\n" ';
    }
    $$out += '>\n  <span class="';
    $$out += $escape(extBrand);
    $$out += '_mprice_title">点此专享价购买</span>\n  <span class="';
    $$out += $escape(extBrand);
    $$out += '_mprice_num">';
    $$out += $escape(price);
    $$out += '</span>\n  <style type="text/css">\n    a#';
    $$out += $escape(extBrand);
    $$out += '_mobile_price {\n      width: 132px;\n      display: inline;\n      margin-left: 5px;\n      text-decoration: none;\n      cursor: pointer;\n    }\n    span.';
    $$out += $escape(extBrand);
    $$out += '_mprice_title {\n      display: inline-block;\n      width: 94px;\n      background-color: #568cdf;\n      line-height: 16px;\n      color: #fff;\n      text-align: center;\n    }\n    span.';
    $$out += $escape(extBrand);
    $$out += '_mprice_title:hover{\n      background-color: #3071c6;\n      text-decoration: none;\n    }\n    span.';
    $$out += $escape(extBrand);
    $$out += '_mprice_num {\n      color: #e4393c;\n      display: inline-block;\n      margin-left: 5px;\n      text-align: center;\n      font-size: 14px;\n    }\n  </style>\n</a>';
    return $$out;
};

/***/ }),
/* 516 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape;
    $each(data, function ($value, $index) {
        $$out += '\n<li class="bjgext_promo_list">\n  <em class="bjgext-bg"></em>\n  <a href="';
        $$out += $escape($value.url);
        $$out += '" target="_blank" title="';
        $$out += $escape($value.title);
        $$out += '">';
        $$out += $escape($value.title);
        $$out += '</a>\n</li>\n';
    });
    return $$out;
};

/***/ }),
/* 517 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var template = __webpack_require__(13);
var html = __webpack_require__(518);
var taotaos = __webpack_require__(153);
var util = __webpack_require__(19);

var totalPages = undefined;

var render = function render(data) {
  if (!data) return;
  var pages = undefined;
  var winH = $(window).height();
  var winW = $(window).width();
  if (winH < 768 || winW < 1336) return;
  var newdata = data.productsuggest;
  var len = newdata.length;
  if (len > 4) pages = true;
  totalPages = Math.ceil(len / 4);
  $('body').append(template.compile(html)({
    data: newdata.slice(0, 8),
    pages: pages
  }));
  if (G.guess_fold === '1') {
    $('.bjgext_big_content').hide();
    $('.bjgext_small').show();
  }
  util.tongji('3', 'show');
  addEvent();
};
var turnPage = function turnPage(status, nowp, tp) {
  nowp = Number(nowp);
  var lists = $('.bjgext_guess_body li');
  var len = lists.length;
  lists.hide();
  if (status === -1) {
    if (nowp === 1) nowp = tp + 1;
    for (var i = (nowp - 2) * 4, size = (nowp - 1) * 4 > len ? len : (nowp - 1) * 4; i < size; i++) {
      lists.eq(i).show();
    }
    nowp--;
  } else {
    if (nowp === tp) nowp = 0;
    for (var i = nowp * 4, size = (nowp + 1) * 4 > len ? len : (nowp + 1) * 4; i < size; i++) {
      lists.eq(i).show();
    }
    nowp++;
  }
  $('.guess-n-p').text(nowp);
};
var addEvent = function addEvent() {
  $('.bjgext_guess_footer .bjgext-guess-tl').on('mousedown', function () {
    $(this).addClass('_press');
  });
  $('.bjgext_guess_footer .bjgext-guess-tl').on('click', function () {
    var nowp = $('.guess-n-p').text();
    turnPage(-1, nowp, totalPages);
  });
  $('.bjgext_guess_footer .bjgext-guess-tl').on('mouseup', function () {
    $(this).removeClass('_press');
  });
  $('.bjgext_guess_footer .bjgext-guess-tr').on('mousedown', function () {
    $(this).addClass('_press');
  });
  $('.bjgext_guess_footer .bjgext-guess-tr').on('click', function () {
    var nowp = $('.guess-n-p').text();
    turnPage(1, nowp, totalPages);
  });
  $('.bjgext_guess_footer .bjgext-guess-tr').on('mouseup', function () {
    $(this).removeClass('_press');
  });
  $('.bjgext-guess-close').on('click', function () {
    $('.bjgext_big_content').hide();
    $('.bjgext_small').show();
    util.settings('guess_fold', '1');
  });
  $('.bjgext_small').on('click', function () {
    $('.bjgext_big_content').show();
    $('.bjgext_small').hide();
    util.settings('guess_fold', '0');
  });
  $('.bjgext_guess_body a').on('click', function () {
    var href = $(this).attr('href');
    if (href) {
      util.tongji('3', 'click', href);
    }
  });
};

module.exports.init = function () {
  if (G.show_leftguess === '0') return;
  if (G.site.indexOf('taobao') > -1 || G.site.indexOf('tmall') > -1) {
    taotaos.init(render);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 518 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $imports.$escape, pages = $data.pages;
    $$out += '<div id="bjgext_guess">\n  <div class="bjgext_big_content">\n    <div class="bjgext-big-head">\n      <span class="bjgext-bg bjgext-guess-close"></span>\n    </div>\n    <div class="bjgext_guess_body">\n      <ul>\n        ';
    $each(data, function ($value, $index) {
        $$out += '\n        <li>\n          <a href="';
        $$out += $escape($value.url);
        $$out += '" class="bjgext_guess_img" target="_blank">\n            <img src="';
        $$out += $escape($value.image);
        $$out += '">\n          </a>\n          <span class="guess_price">\n            \uFFE5';
        $$out += $escape($value.price);
        $$out += '\n          </span>\n        </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    ';
    if (pages) {
        $$out += '\n    <div class="bjgext_guess_footer">\n      <span class="bjgext-bg bjgext-guess-tl"></span>\n      <span><em class="guess-n-p">1</em><em>/</em><em class="guess-t-p">2</em></span>\n      <span class="bjgext-bg bjgext-guess-tr"></span>\n    </div>\n    ';
    }
    $$out += '\n  </div>\n  <div class="bjgext_small">\n    <span class="sm-tle">相似款</span>\n    <span class="bjgext-bg bjgext-guess-open"></span>\n  </div>\n  <style type="text/css">\n    #bjgext_guess {\n      position: fixed;\n      left: 0px;\n      top: 200px;\n      z-index: 999999;\n    }\n    #bjgext_guess em {\n      font-style: normal;\n    }\n    #bjgext_guess * {\n      font-family: "microsoft yahei";\n    }\n    .bjgext_big_content{\n      height: 507px;\n      width: 109px;\n      background-color: #fff;\n      border: 1px solid rgba(0,0,0,0.06);\n      box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.16);\n      border-radius: 5px;\n    }\n    .bjgext_big_content {\n      ';
    if (!pages) {
        $$out += '\n        height = 458px;\n      ';
    }
    $$out += '\n    }\n    .bjgext_guess_img {\n      display: inline-block;\n      height: 80px;\n      width: 80px;\n    }\n    .bjgext_guess_body {\n      height: 436px;\n      width: 109px;\n      overflow: hidden;\n      text-align: center;\n    }\n    .bjgext-big-head {\n      height: 23px;\n      position: relative;\n    }\n    .bjgext-guess-close {\n      display: inline-block;\n      position: absolute;\n      height: 16px;\n      width: 16px;\n      background-position: -218px -80px;\n      top: 3px;\n      right: 4px;\n      cursor: pointer;\n    }\n    .bjgext_guess_footer {\n      margin-top: 15px;\n    }\n    .bjgext_guess_footer:after {\n      display: block;\n      content: "";\n      clear: both;\n    }\n    .bjgext_guess_footer span {\n      float: left;\n      height: 21px;\n      width: 21px;\n    }\n    .bjgext_guess_footer .bjgext-guess-tl {\n      background-position: -205px 0px;\n      margin-left: 13px;\n      margin-right: 8px;\n      cursor: pointer;\n    }\n    .bjgext_guess_footer .bjgext-guess-tl:hover {\n      background-position: -233px -28px;\n    }\n    .bjgext_guess_footer span.bjgext-guess-tl._press {\n      background-position: -233px -56px;\n    }\n    .bjgext_guess_footer .bjgext-guess-tr {\n      background-position: -235px 0px;\n      margin-left: 13px;\n      cursor: pointer;\n    }\n    .bjgext_guess_footer .bjgext-guess-tr:hover {\n      background-position: -207px -28px;\n    }\n    .bjgext_guess_footer span.bjgext-guess-tr._press {\n      background-position: -207px -56px;\n    }\n    #bjgext_guess li {\n      height: 96px;\n      margin-bottom: 13px;\n    }\n    .guess_price {\n      color: #e52222;\n      position: relative;\n      top: 2px;\n      width: 100%;\n      display: inline-block;\n      text-align: center;\n    }\n    #bjgext_guess img {\n      max-height: 80px;\n      max-width: 80px;\n    }\n    .guess-t-p {\n      margin-left: 3px;\n    }\n    .guess-n-p {\n      margin-right: 4px;\n    }\n    .bjgext_small {\n      display: none;\n      height: 88px;\n      width: 27px;\n      background-color: #fff;\n      border: 1px solid rgba(0,0,0,0.06);\n      box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.16);\n      border-radius: 5px;\n      cursor: pointer;\n      text-align: center;\n    }\n    .bjgext_small .sm-tle {\n      font-size: 14px;\n      margin-top: 20px;\n      float: left;\n      font-family: "microsoft yahei";\n      color: #425766;\n      text-align: center;\n      line-height: 14px;\n    }\n    .bjgext-guess-open{\n      height: 18px;\n      width: 18px;\n      background-position: -201px -80px;\n      display: inline-block;\n      margin-top: 4px;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 519 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var parseprice = __webpack_require__(21);
var template = __webpack_require__(13);
var request = __webpack_require__(3);
var util = __webpack_require__(19);
var cnzz = __webpack_require__(12);
var Time1 = undefined,
    pagePrice = undefined,
    priceDom = undefined,
    pageSku = undefined;

var pricePattern = {
  'amazon-com': ['#priceblock_dealprice span', '#priceblock_ourprice span .buyingPrice', '#priceblock_dealprice', '#priceblock_saleprice', '#priceblock_ourprice', '#price_feature_div .a-color-price', '#wineTotalPrice'],
  'amazon-jp': ['#priceblock_dealprice span', '#priceblock_ourprice span .buyingPrice', '#priceblock_dealprice', '#priceblock_saleprice', '#priceblock_ourprice', '#price_feature_div .a-color-price', '#wineTotalPrice'],
  '6pm': ['li[id="priceSlot"] div[class="price"]']
};
var feePattern = {
  'amazon-com': ['#priceBadging_feature_div .a-color-secondary', '#ourprice_shippingmessage .a-color-secondary'],
  'amazon-jp': ['#priceBadging_feature_div .a-color-secondary', '#ourprice_shippingmessage .a-color-secondary'],
  '6pm': []
};

var calPrice = function calPrice(dp) {
  dp.goods_original_price = Number((dp.goods_original_price / 100).toFixed(2));
  dp.goods_price = Number((dp.goods_price / 100).toFixed(2));
  dp.official_original_postage = Number((dp.official_original_postage / 100).toFixed(2));
  dp.official_postage = Number((dp.official_postage / 100).toFixed(2));
  dp.xm_official = dp.official_original_postage - dp.official_postage;
  dp.international_original_postage = Number((dp.international_original_postage / 100).toFixed(2));
  dp.international_postage = Number((dp.international_postage / 100).toFixed(2));
  dp.xm_international = dp.international_original_postage - dp.international_postage;
  dp.tax_original_fee = Number((dp.tax_original_fee / 100).toFixed(2));
  dp.tax_fee = Number((dp.tax_fee / 100).toFixed(2));
  dp.xm_fee = dp.tax_original_fee - dp.tax_fee;
  dp.purePrice = dp.goods_price + dp.official_postage + dp.international_postage + dp.tax_fee;
  dp.purePrice = dp.purePrice.toFixed(2);
  dp.goods_price = dp.goods_price.toFixed(2);
  return dp;
};

var getSpec = function getSpec() {
  var color = $('#color+p').text();
  if (!color) color = $('#stage-swatches a.active').attr('title');
  var spec = {
    'color': color
  };
  return JSON.stringify(spec);
};
var getFee = function getFee() {
  var domarr = feePattern[G.site];
  if (!domarr) return;
  for (var i = 0; i < domarr.length; i++) {
    var txt = $(domarr[i]).text();
    if (txt && txt.match(/\d+/)) {
      txt = parseprice.getPriceBeforeExchangeRate(txt);
      return txt;
    }
  }
  return 0;
};

var getPrice = function getPrice() {
  var domarr = pricePattern[G.site];
  if (!domarr) return;
  for (var i = 0; i < domarr.length; i++) {
    var txt = $(domarr[i]).text();
    if (txt && txt.match(/\d+/)) {
      txt = parseprice.getPriceBeforeExchangeRate(txt);
      return txt;
    }
  }
};
var getSku = function getSku() {
  var sku = '';
  if (G.site.indexOf('amazon') > -1) {
    // sku = $('#bottomRow').text().match(/current_asin\"\:\"(\w+)\"/);
    sku = location.href.match(/\/dp\/(\w+)\//);
    sku = sku && sku[1];
    if (!sku) sku = $('#addToCart #ASIN').val();
  } else if (G.site === '6pm') {
    sku = $('span[id="sku"]').text().match(/\d+/);
    if (!sku) {
      sku = $('span[id="sku"]').text().match(/\d+/);
      sku = sku && sku[0];
    } else {
      sku = sku[0];
    }
  }

  return sku;
};
var isZiYing = function isZiYing() {
  var dom = $('div[id="merchant-info"] a');
  if (dom.length === 0) {
    return 1;
  } else if (dom.length === 1) {
    if (dom.text().toLocaleLowerCase().indexOf('amazon') > -1) return 1;else return 2;
  } else if (dom.length === 2) {
    if (dom.eq(1).text().toLocaleLowerCase().indexOf('amazon') > -1) return 1;else return 2;
  } else {
    return 2;
  }
};
var isGoodProduct = function isGoodProduct(score, num, type) {
  if (type == 1 && num >= 5 && score >= 3.5) {
    return true;
  }
  if (type == 2 && num >= 10 && score >= 4) {
    return true;
  }
  return false;
};
var addMark = function addMark(url) {
  if (!url) return url;
  if (url.indexOf('?') > -1) {
    url = url + '&p_r=gouwudang&p_k=plug_top_1&outer_pid=8507';
  } else {
    url = url + '?p_r=gouwudang&p_k=plug_top_1&outer_pid=8507';
  }
  return url;
};
var buildJumpUrl = function buildJumpUrl(dp) {
  var url = 'http://www.gwdang.com/promotion/haitaomid?url_crc=' + dp.sku + '&url=' + encodeURIComponent(location.href) + '&f_d=' + G.from_device;
  return url;
};

var getProductInfo = function getProductInfo() {
  var review_score = 0,
      review_number = 0;
  if (G.site.indexOf('amzon') > -1) {
    review_score = $('div[id="averageCustomerReviews"] span[class="a-icon-alt"]').text().match(/^[0-9.]+/);
    review_score = review_score && review_score[0];
    review_number = $('div[id="averageCustomerReviews"] span[id="acrCustomerReviewText"]').text().match(/^\d+/);
    review_number = review_number && review_number[0];
  }
  var sku = getSku();
  pageSku = sku;
  var price = getPrice();
  pagePrice = price;
  var fee = getFee();
  var ziying = isZiYing();
  if (price) price = Number(price) + Number(fee);
  var goodP = isGoodProduct(review_score, review_number, ziying);
  return {
    price: price,
    sku: sku,
    review_score: review_score,
    review_number: review_number,
    goodP: goodP,
    ziying: ziying
  };
};

var getHtInfo = function getHtInfo(obj, callback) {
  var dp = G.dp;
  // if (!obj.price) {
  //   $('#bjgext_minibar').hide()
  //   $('#bjgext_mb_bg').hide()
  //   G.showMinibar = false;
  //   return;
  // }
  var price = Number(obj.price) * 100;
  price = Number(price.toFixed(2));
  var str = '';
  if (G.site === '6pm') str = '&spec=' + getSpec();
  var url = G.server + '/api/haitao?price=' + price + '&url_crc=' + obj.sku + '&url=' + encodeURIComponent(location.href) + '&review_number=' + obj.review_number + '&review_score=' + obj.review_score + '&sell_side=' + obj.ziying + '&priority=' + obj.priority + str;
  request.get(url).done(function (data) {
    if (data && data.data.product_status === 1) {
      var dpinfo = data.data.product_detail;
      dpinfo.url = addMark(data.data.product_url);
      callback(dpinfo);
    } else if (data.data.product_status === 2) {
      var dpinfo = data.data.product_detail_estimate;
      if (!dpinfo) {
        $('#bjgext_minibar').hide();
        $('#bjgext_mb_bg').hide();
        return;
      }
      dpinfo.url = buildJumpUrl(dp);
      callback(dpinfo);
    } else {
      var tle = '';
      if (data.data.product_status === 4) tle = '抱歉，由于相关法律或者转运禁运的原因，该商品暂时不支持一键海淘';
      if (data.data.product_status === 5) tle = '抱歉，该商品已下架，暂时不支持一键海淘';
      if (data.data.product_status === 6) tle = '抱歉该商家口碑不好，不建议您购买';
      var dpinfo = {
        goods_price: parseprice(pagePrice),
        url: 'javascript:void();',
        type: data.data.product_status,
        tle: tle,
        noinfo: true
      };
      callback(dpinfo);
    }
  });
};
var specialFixed = function specialFixed() {
  if (G.site.indexOf('amazon') > -1 && $('#actionPanelWrapper').length > 0) {
    $('.bjgext-mini-compare').remove();
    $('body').addClass('specailHack');
  }
};

var addEvent = function addEvent() {
  var logs = undefined;
  $('#bjgext_htbtn').on('mouseenter', function () {
    $(this).find('.yjht-box').show();
    if (!logs) {
      cnzz.log('track:yjht:detail');
      util.tongjiLog('track:yjht:detail');
      logs = true;
    }
    $('#bjgext_minibar').addClass('_mshover');
  });
  $('#bjgext_htbtn').on('mouseleave', function () {
    $('#bjgext_htbtn .yjht-box').hide();
    $('#bjgext_minibar').removeClass('_mshover');
  });
  $('#bjgext_htbtn .yjht-box').on('mouseleave', function () {
    $(this).hide();
    $('#bjgext_minibar').removeClass('_mshover');
  });
  $('#bjgext_htbtn').on('click', function () {
    cnzz.log('click:yjht:title');
    util.tongjiLog('click:yjht:title');
  });
};

var renderBtn2 = function renderBtn2(data) {
  if (G.amazonGlobal) return;
  listenBody('off');
  if (!data.noinfo) data = calPrice(data);
  var html = __webpack_require__(520);
  $('#bjgext_htbtn').remove();
  $('.bjgext-mini-logo').after(template.compile(html)({
    data: data
  }));
  listenBody('on');
  if (!G.showMinibar) {
    $('#bjgext_minibar').css('display', 'inline-block');
    G.showMinibar = true;
  }
  G.showYjht = true;
  addEvent();
};

var mainRender = function mainRender() {
  var info = getProductInfo();
  if (info.goodP) {
    info.priority = 3;
    getHtInfo(info, renderBtn2);
  } else {
    info.priority = 1;
    getHtInfo(info, renderBtn2);
  }
};
var listenBody = function listenBody(type) {
  // 只有亚马逊需要监控价格变化
  if (type === 'on') {
    document.getElementById(priceDom).addEventListener('DOMSubtreeModified', func);
  } else if (type === 'off') {
    document.getElementById(priceDom).removeEventListener('DOMSubtreeModified', func);
  }
};
var func = function func() {
  clearTimeout(Time1);
  Time1 = setTimeout(function () {
    if (pagePrice !== getPrice() || pageSku !== getSku()) {
      mainRender();
    }
  }, 500);
};

module.exports.init = function () {
  priceDom = 'unifiedPrice_feature_div';
  if ($('#' + priceDom).length === 0) {
    priceDom = 'price_feature_div';
  }
  if ($('#' + priceDom).length === 0) {
    priceDom = 'winePriceAndSavings_feature_div';
  }
  if (G.site === '6pm') {
    priceDom = 'priceSlot';
  }
  mainRender();
  specialFixed();
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 520 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', data = $data.data, $escape = $imports.$escape;
    $$out += '<div id="bjgext_htbtn" class="';
    if (data.noinfo) {
        $$out += ' noinfo ';
    }
    $$out += '">\n    <a href="';
    $$out += $escape(data.url);
    $$out += '" target="_blank">\n    <span class="yjht-icon"></span>\n    <span class="yjht-tle">一键海淘</span>\n    <span class="yjht-pri">\uFFE5';
    $$out += $escape(data.goods_price);
    $$out += '</span>\n  </a>\n  \n  <div class="yjht-box">\n    ';
    if (!data.noinfo) {
        $$out += '\n    <div class="box-div1">\n      <span class="sp-name">官网运费</span>\n      <span>:</span>\n      <span>\uFFE5';
        $$out += $escape(data.official_postage);
        $$out += '</span>\n    </div>\n    <div class="box-div2">\n      <span class="sp-name">转运费</span>\n      <span>:</span>\n      <span>\uFFE5';
        $$out += $escape(data.international_postage);
        $$out += '</span>\n    </div>\n    <div class="box-div3">\n      <span class="sp-name">税费</span>\n      <span>:</span>\n      <span class="sf-num">\uFFE5';
        $$out += $escape(data.tax_fee);
        $$out += '</span>\n      <span class="sf-desc">\n        <span>(</span>\n        <span class="sf-desc-num">';
        $$out += $escape(data.xm_fee);
        $$out += '</span>\n        <span class="sf-desc-tle">限免</span>\n        <span>)</span>\n      </span>\n    </div>\n    <div class="box-div4">\n      <span class="sp-name">到手价</span>\n      <span>:</span>\n      <span class="last-pri">\uFFE5';
        $$out += $escape(data.purePrice);
        $$out += '</span>\n    </div>\n    ';
    } else {
        $$out += '\n      <div class="noinfo-remind remind-';
        $$out += $escape(data.type);
        $$out += '">\n        <p>';
        $$out += $escape(data.tle);
        $$out += '</p>\n      </div>\n    ';
    }
    $$out += '\n  </div>\n  <style type="text/css">\n    #bjgext_htbtn {\n      border: 1px solid #f1f1f1;\n      width: 186px;\n      text-align: center;\n    }\n    #bjgext_htbtn >a {\n      display: inline-block;\n      margin: 0 auto;\n      width: auto;\n      height: 38px;\n    }\n    .bd_6pm #bjgext_htbtn {\n      width: 245px;\n    }\n    #bjgext_htbtn:hover {\n      background-color: #FFFBEF;\n      z-index: 222;\n    }\n    #bjgext_htbtn *, #bjgext_mb_bg * {\n      box-sizing: content-box;\n    }\n    #bjgext_htbtn span {\n      float: left;\n    }\n    #bjgext_htbtn.noinfo {\n      background-color: #fafafa;\n    }\n    #bjgext_htbtn.noinfo .yjht-tle, #bjgext_htbtn.noinfo .yjht-pri {\n      color: #9b9b9b;\n    }\n    #bjgext_htbtn .yjht-icon {\n      background: url(\'https://cdn.gwdang.com/images/extensions/bjgext/bd_yjht_logo.png\') 0px 0px no-repeat;\n      height: 20px;\n      width: 20px;\n      margin-top: 11px;\n    }\n    .bd_6pm #bjgext_htbtn .yjht-icon {\n      margin-left: 40px;\n    }\n    #bjgext_htbtn.noinfo .yjht-icon {\n      background: url(\'https://cdn.gwdang.com/images/extensions/bjgext/bd_yjht_logo2.png\') 0px 0px no-repeat;\n    }\n    .yjht-box {\n      position: absolute;\n      display: none;\n      top: 36px;\n      left: -1px;\n      height: 138px;\n      width: 186px;\n      background: #FFFFFF;\n      border: 1px solid #E6E9EB;\n      box-shadow: 0 2px 4px 0 rgba(0,0,0,0.11);\n    }\n    .bd_6pm .yjht-box {\n      width: 245px;\n      z-index: 999999;\n    }\n    .yjht-box>div {\n      float: left;\n      width: 100%;\n      line-height: 14px;\n      font-size: 12px;\n      font-weight: bold;\n      margin-left: 12px;\n    }\n    .yjht-box>div .sp-name {\n      float: left;\n      width: 52px;\n      height: 14px;\n    }\n    .yjht-box>div .sp-name+span {\n      margin-left: 5px;\n      margin-right: 5px;\n    }\n    .box-div1 {\n      margin-top: 15px;\n    }\n    .box-div2 {\n      margin-top: 16px;\n    }\n    .box-div3 {\n      margin-top: 17px;\n    }\n    .box-div4 {\n      margin-top: 17px;\n    }\n    .yjht-tle, .yjht-pri {\n      height: 38px;\n      line-height: 38px;\n      font-size: 14px;\n    }\n    #bjgext_htbtn .yjht-tle {\n      margin-left: 14px;\n      margin-right: 2px;\n      color: #435459;\n    }\n    .yjht-pri {\n      color: #d10831;\n      font-weight: bold;\n    }\n    .sf-num {\n      margin-right: 5px;\n    }\n    .sf-desc:after {\n      content: "";\n      display: block;\n      clear: both;\n    }\n    .sf-desc span {\n      font-weight: normal!important;\n      float: left!important;\n      display: inline-block;\n    }\n    .sf-desc-num {\n      text-decoration: line-through;\n      margin: 0 2px;\n    }\n    .sf-desc-tle {\n      background-color: #F6A623;\n      border-radius: 8px;\n      color: #fff;\n      font-size: 12px;\n      width: 32px;\n      height: 14px;\n      margin-right: 2px;\n      text-align: center;\n    }\n    .yjht-box>div .sp-name {\n      text-align:justify;\n      text-justify:distribute-all-lines;/*ie6-8*/\n      text-align-last:justify;/* ie9*/\n      -moz-text-align-last:justify;/*ff*/\n      -webkit-text-align-last:justify;/*chrome 20+*/\n    }\n    @media screen and (-webkit-min-device-pixel-ratio:0){/* chrome*/\n      .yjht-box>div .sp-name:after{\n        content:".";\n        display: inline-block;\n        width:100%;\n        overflow:hidden;\n        height:0;\n      }\n    }\n    #bjgext_htbtn .last-pri {\n      color: #d10831;\n    }\n    .yjht-box .noinfo-remind {\n      margin: 0px;\n    }\n    .yjht-box .remind-4 {\n      background: url(\'https://cdn.gwdang.com/images/extensions/bjgext/bd_yjht_forbid.png\') 57px 11px no-repeat;\n    }\n    .yjht-box .remind-5 {\n      background: url(\'https://cdn.gwdang.com/images/extensions/bjgext/bd_yjht_close.png\') 57px 11px no-repeat;\n    }\n    .yjht-box .remind-6 {\n      background: url(\'https://cdn.gwdang.com/images/extensions/bjgext/bd_yjht_bad.png\') 57px 11px no-repeat;\n    }\n    #bjgext_htbtn .noinfo-remind p {\n      margin: 0px;\n      margin-top: 77px;\n      text-align: center;\n      width: 144px;\n      height: auto;\n      line-height: 16px;\n      margin-left: 20px;\n      font-size: 12px;\n      color: #8d8d8d;\n      font-weight: normal;\n    }\n    .bjgext-mini-trend {\n      left: -1px;\n    }\n    .bd_6pm .bjgext-mini-trend {\n      display: none!important;\n    }\n    div#bjgext_minitrend_detail {\n      left: -239px;\n    }\n    .specailHack div#bjgext_minitrend_detail {\n      left: auto;\n      right: 0px;\n    }\n    div#actionPanelWrapper.burj {\n      overflow: visible!important;\n    }\n  </style>\n</div';
    return $$out;
};

/***/ }),
/* 521 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(522);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("e1eb2e7a", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./common.less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./common.less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 522 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-row {\n  display: flex;\n  flex-direction: row;\n}\n.gwd-inline-row {\n  display: inline-flex;\n  flex-direction: row;\n}\n.gwd-column {\n  display: flex;\n  flex-direction: column;\n}\n.gwd-inline-column {\n  display: inline-flex;\n  flex-direction: column;\n}\n.gwd-align {\n  align-content: center;\n  align-items: center;\n}\n.gwd-jcc {\n  justify-content: center;\n}\n.gwd-jic {\n  justify-items: center;\n}\n.gwd-button {\n  outline: none;\n  border: none;\n}\n.bjg-bar-button {\n  font-size: 0;\n}\n.bjg-hover-bg {\n  background: #fffbef;\n}\n.bjg-bar-button:hover {\n  background: #fffbef;\n  cursor: pointer;\n}\n.bjg-bar-button:hover .bjg-window {\n  display: block;\n}\n.mainbar-fold .bjg-bar-button,\n.mainbar-fold #top_coupon_btn,\n.mainbar-fold .rinfo-btn,\n.mainbar-fold .gwd-bottom-tmall {\n  display: none!important;\n}\n.gwd-font12 {\n  font-size: 12px;\n}\n.gwd-font14 {\n  font-size: 14px;\n}\n.gwd-red {\n  color: #ff3532;\n}\n.gwd-red-bg {\n  background: #ff3532;\n}\n.gwd-hui333 {\n  color: #333333;\n}\n.gwd-hui999 {\n  color: #999999;\n}\n.gwd-font10 {\n  font-size: 12px;\n  transform: scale(0.8333);\n  transform-origin: bottom center;\n}\n.gwd-font11 {\n  font-size: 12px;\n  transform: scale(0.91666);\n  transform-origin: bottom center;\n}\n.gwd-font9 {\n  font-size: 12px;\n  transform: scale(0.75);\n  transform-origin: bottom center;\n}\n.gwd-hoverable:hover {\n  background: #edf1f2;\n}\n.right-info > * {\n  border-left: 1px solid #edf1f2;\n}\n.gwd-red-after-visit:hover {\n  color: #e03024 !important;\n}\n.gwd-button:hover {\n  filter: brightness(1.1);\n}\n.gwd-button {\n  padding-top: 1px;\n  padding-bottom: 1px;\n}\n.gwd-button:active {\n  filter: brightness(0.9);\n}\n.gwd-fadeout-5s {\n  opacity: 0;\n  transition: opacity 5s;\n}\n.gwd-scrollbar::-webkit-scrollbar {\n  width: 6px;\n  border-radius: 17px;\n}\n.gwd-scrollbar::-webkit-scrollbar-thumb {\n  border-radius: 17px;\n  background: #999;\n}\n#gwdang_main,\n.gwdang-main,\n.bjgext-detail {\n  font-size: 12px;\n}\n#gwdang_main button,\n.gwdang-main button,\n.bjgext-detail button {\n  text-align: center;\n}\n.gwd-width-100 {\n  width: 100%;\n}\n.gwd-overlay {\n  font-family: \"Microsoft YaHei\", \"Arial\", \"SimSun\", serif;\n  font-size: 0;\n  position: fixed;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  background: rgba(0, 0, 0, 0.35);\n  z-index: 999999999;\n}\n.gwd-font-pfm {\n  font-family: 'PingFangSC-Medium';\n  font-weight: normal!important;\n}\n@font-face {\n  font-family: 'PingFangSC-Medium';\n  src: local('PingFangSC-Medium');\n}\n.gwd-font-pfm {\n  font-family: local('PingFangSC-Medium'), system-ui;\n  font-weight: bold;\n}\n#gwd_minibar svg,\n.gwdang-main svg,\n#bjgext_mb_bg svg,\n#bjgext_mainbar svg {\n  fill: transparent;\n}\n", ""]);

// exports


/***/ }),
/* 523 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(524);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("dbaf26c6", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./priceTip.less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./priceTip.less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 524 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "/* price_tip */\n#bjgou_price_tip {\n  display: none;\n  position: absolute;\n  top: 0;\n  width: 68px;\n  height: 24px;\n  z-index: 999999999999999;\n  cursor: default;\n  border-radius: 2px;\n  background-image: linear-gradient(-180deg, #FFFFFF 0%, #FFFFFF 100%);\n}\n#bjgou_price_tip .tip_btn_box {\n  float: left;\n  width: 68px;\n  height: 24px;\n  background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);\n  box-shadow: 0px 2px 4px 0px rgba(217, 217, 217, 0.5);\n  border-radius: 2px;\n}\n#bjgou_price_tip:hover {\n  box-shadow: 0 1px 5px 0 rgba(210, 210, 210, 0.5);\n}\n#bjgou_price_tip .tip_btn_box > em {\n  background: white url(\"https://cdn.bijiago.com/images/extensions/bijiago/tipLogo@2x.png\") 0px 0px no-repeat;\n  float: left;\n  height: 22px;\n  width: 22px;\n  border-top-left-radius: 2px;\n  border-bottom-left-radius: 2px;\n  box-sizing: content-box;\n  background-size: contain;\n  position: relative;\n  top: 1px;\n  left: 4px;\n}\n#bjgou_price_tip .tip_btn_box > span {\n  float: left;\n  width: 43px;\n  height: 22px;\n  font-family: \"microsoft yahei\";\n  font-size: 13px;\n  color: #64615d;\n  line-height: 22px;\n  text-align: center;\n  box-sizing: content-box;\n  position: relative;\n  top: 1px;\n}\n#bjgou_price_tip_detail {\n  top: -1px;\n  left: 69px;\n  display: none;\n  position: absolute;\n  width: 450px;\n  height: auto;\n  background: #FFFFFF;\n  border: 1px solid #edf1f3;\n  box-shadow: 0 4px 6px 0 rgba(100, 125, 142, 0.5);\n  border-radius: 4px;\n  z-index: 999999999999;\n}\n#bjgou_price_tip_detail .tip-title,\n#bjgou_price_tip_detail .tip-box-right > p,\n#bjgou_price_tip_detail .tip-info-promo > span {\n  color: #64615d;\n}\n#bjgou_price_tip_detail .tip-highest-btn,\n#bjgou_price_tip_detail .tip-now-btn {\n  color: #ff6132;\n}\n#bjgou_price_tip_detail.tip-error-info {\n  background: #FFFFFF;\n  border: 1px solid #edf1f3;\n  box-shadow: 0 4px 6px 0 rgba(100, 125, 142, 0.5);\n  border-radius: 4px;\n  width: 200px;\n  height: 40px;\n  text-indent: 12px;\n  line-height: 40px;\n}\n#bjgou_price_tip_detail.tip-error-info div {\n  font-family: MicrosoftYaHei;\n  font-size: 14px;\n  color: #5E707C;\n}\n#bjgou_price_tip:hover {\n  background-position: -261px -69px;\n}\n#bjgou_price_tip_store {\n  width: 100px;\n  float: left;\n  border: 0;\n  padding: 0;\n  margin: 2px 0px 2px 5px;\n  list-style: none;\n}\n#bjgou_price_tip_store li {\n  clear: both;\n  line-height: 20px;\n  font-size: 12px;\n  font-weight: bold;\n  margin: 0 0 0 5px;\n  color: #18a0f5;\n  list-style: none;\n}\n#bjgou_price_tip_store li a {\n  cursor: pointer;\n  text-decoration: none;\n  color: #333;\n}\n#bjgou_price_tip_store li a span.tle {\n  color: #18a0f5;\n  line-height: 25px;\n  height: 25px;\n  float: right;\n  margin-right: 10px;\n}\n#bjgou_price_tip_store li a span.tleb {\n  color: #2f7ed8;\n  line-height: 25px;\n  height: 25px;\n  font-weight: bold;\n  font-size: 14px;\n  font-family: 'Microsoft Yahei';\n}\n#bjgou_price_tip_store li img {\n  width: 16px;\n  height: 16px;\n  float: left;\n  margin: 2px 8px 2px 0px;\n}\n#bjgou_more_link {\n  color: #333;\n}\n#bjgou_price_tip_store li span {\n  font-size: 12px;\n  font-weight: normal;\n}\n#bjgou_price_tip_trend {\n  float: left;\n  border: 0;\n  padding: 0;\n}\n#bjgou_price_tip_notice {\n  border: 0;\n  padding: 10px;\n  margin: 0;\n  color: #333;\n  font-size: 12px;\n  font-weight: normal;\n}\n#bjgou_max {\n  color: #666;\n  margin-left: 10px;\n}\n#bjgou_min {\n  color: #00a66c;\n}\n#bjgou_more_link a {\n  color: #2f7ed8;\n  text-decoration: none;\n}\n#bjgou_more_link a:hover {\n  color: #2f7ed8;\n  text-decoration: underline;\n}\n#bjgou_price_tip_other {\n  clear: both;\n  padding: 5px 5px 5px 5px;\n  display: block;\n}\n#bjgou_price_tip_logo {\n  float: left;\n  background: url('https://cdn.gwdang.com/images/brwext_assets_34.png') no-repeat -99px -199px;\n  width: 58px;\n  height: 29px;\n  margin: 7px 18px 0 17px;\n  display: none;\n}\n#bjgou_price_tip_input {\n  height: 22px;\n  line-height: 22px;\n  font-size: 12px;\n  width: 186px;\n  border: 1px solid #cdcdcd;\n  float: right;\n  box-sizing: border-box;\n}\n#bjgou_price_tip_notify {\n  float: right;\n  width: 300px;\n  display: none;\n}\n#bjgou_price_tip_notify_btn {\n  display: inline-block;\n  background: #2f7ed8;\n  float: right;\n  color: white;\n  padding: 2px 6px;\n  text-decoration: none;\n  border-radius: 2px;\n  -webkit-border-radius: 2px;\n  -moz-border-radius: 2px;\n}\n#bjgou_price_tip_notify_btn:hover {\n  background: #18A0F5;\n  text-decoration: none;\n}\n#bjgou_price_tip_record {\n  float: left;\n  height: 24px;\n  line-height: 24px;\n}\n#bjgou_price_tip_notify {\n  font-size: 12px;\n}\n#bjgou_price_tip_notify span.remind-error {\n  color: #d80001;\n  display: none;\n}\n", ""]);

// exports


/***/ }),
/* 525 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__ = __webpack_require__(526);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_template_id_617a0842_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 526 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjg-bar-button gwd-row gwd-align gwd-jcc",
    on: { mouseover: _vm.startLoad }
  }, [_c("img", {
    staticStyle: { width: "22px" },
    attrs: { src: __webpack_require__(527), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "7px",
      "font-size": "14px",
      color: "#64615d"
    }
  }, [_vm._v("收藏夹")]), _vm._v(" "), _vm.tip > 0 ? _c("span", { staticClass: "bjg-collection-tip" }, [_vm._v(_vm._s(_vm.tip))]) : _vm._e(), _vm._v(" "), _vm.user ? _c("BjgBottomWindow", { style: _vm.positionStyle + "px", attrs: { name: "降价" } }, [_c("div", { staticClass: "gwd-column", staticStyle: { height: "470px" } }, [_c("div", {
    staticStyle: {
      "margin-top": "19px",
      "padding-left": "14px"
    }
  }, [_c("OrangeButton", {
    attrs: { selected: _vm.selected === "all" },
    on: {
      click: function click($event) {
        return _vm.select("all");
      }
    }
  }, [_vm._v("全部")]), _vm._v(" "), _c("OrangeButton", {
    staticStyle: { "margin-left": "24px" },
    attrs: { selected: _vm.selected === "reduction" },
    on: {
      click: function click($event) {
        return _vm.select("reduction");
      }
    }
  }, [_vm._v("降价")])], 1), _vm._v(" "), _c("CollectionList", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.selected === "all",
      expression: "selected === 'all'"
    }],
    ref: "default",
    attrs: { tab: "default" }
  }), _vm._v(" "), _c("CollectionList", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.selected === "reduction",
      expression: "selected === 'reduction'"
    }],
    ref: "reduction",
    attrs: { tab: "down" }
  })], 1)]) : _vm._e(), _vm._v(" "), !_vm.user ? _c("div", {
    staticClass: "gwd-column bjg-login",
    staticStyle: {
      width: "407px",
      height: "197px",
      position: "absolute",
      bottom: "59px"
    },
    style: _vm.positionStyle + "px"
  }, [_c("img", {
    attrs: {
      src: __webpack_require__(528),
      alt: ""
    },
    on: { click: _vm.doLogin }
  })]) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 527 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 528 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 529 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__ = __webpack_require__(530);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_template_id_683c35f8_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 530 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjg-window",
    attrs: { "data-foo": "bar" },
    on: {
      mouseover: function mouseover($event) {
        return _vm.$emit("mouseover");
      }
    }
  }, [_vm.user || _vm.alwaysShow ? _c("div", { staticClass: "bjg-window-title" }, [_vm.from_device === "bijiago" ? _c("img", {
    staticStyle: {
      width: "28px",
      height: "24px",
      "margin-left": "5px"
    },
    attrs: {
      src: __webpack_require__(531),
      alt: ""
    }
  }) : _c("img", {
    staticStyle: {
      width: "24px",
      height: "24px",
      "margin-left": "5px"
    },
    attrs: { src: __webpack_require__(55) }
  }), _vm._v(" "), _vm.user && _vm.userName ? _c("span", { staticClass: "username" }, [_vm._v(_vm._s(_vm.userName))]) : _vm._e(), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), !_vm.alwaysShow ? _c("span", {
    staticClass: "bjg-qrText",
    staticStyle: {
      "margin-right": "14px",
      "font-size": "12px",
      color: "white",
      position: "relative"
    }
  }, [_c("span", { staticStyle: { "text-decoration": "underline" } }, [_vm._v("扫码关注公众号")]), _vm._v("\n        ，及时获取" + _vm._s(_vm.name) + "通知\n        "), _c("img", {
    staticStyle: {
      width: "157px",
      height: "194px",
      position: "absolute",
      left: "209px"
    },
    style: _vm.name === "降价" ? "top: -7px" : "top: -16px",
    attrs: { src: _vm.qrImg, alt: "" }
  }), _vm._v(" "), !_vm.hasWx ? _c("img", {
    staticStyle: {
      width: "157px",
      height: "194px",
      position: "absolute",
      left: "209px",
      top: "-16px",
      display: "block!important"
    },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/qr-wechat-click@2x.png",
      alt: ""
    },
    on: { click: _vm.imgClick }
  }) : _vm._e(), _vm._v(" "), _c("img", {
    style: "width: " + _vm.qrWidth + "px; height: " + _vm.qrWidth + "px; position: absolute; left: 228px; top: 6px;",
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/price-protect-qr.jpeg",
      alt: ""
    }
  })]) : _vm._e()]) : _vm._e(), _vm._v(" "), _vm._t("default"), _vm._v(" "), _c("div", {
    staticClass: "bjg-window-bt",
    staticStyle: { "border-bottom": "1px solid #f1f1f1" }
  })], 2);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 531 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 532 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_style_index_0_id_683c35f8_scoped_true_lang_less__ = __webpack_require__(533);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_style_index_0_id_683c35f8_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_BjgBottomWindow_vue_vue_type_style_index_0_id_683c35f8_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 533 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(534);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("5a5198e7", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BjgBottomWindow.vue?vue&type=style&index=0&id=683c35f8&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BjgBottomWindow.vue?vue&type=style&index=0&id=683c35f8&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 534 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-qrText[data-v-683c35f8] {\n  cursor: pointer;\n}\n.bjg-qrText img[data-v-683c35f8] {\n  display: none;\n}\n.bjg-qrText:hover img[data-v-683c35f8] {\n  display: block;\n}\n.bjg-window[data-v-683c35f8] {\n  border-radius: 2px 2px 0px 0px;\n  cursor: default;\n  display: none;\n  background: white;\n  position: absolute;\n  width: 407px;\n  bottom: 59px;\n}\n.bjg-window div[data-v-683c35f8] {\n  border-left: 1px solid #f1f1f1;\n  border-right: 1px solid #f1f1f1;\n}\n.bjg-window .bjg-window-title[data-v-683c35f8] {\n  background: url(" + __webpack_require__(535) + ");\n  height: 32px;\n  display: flex;\n  border-left: none;\n  border-right: none;\n  align-items: center;\n  border-radius: 2px 2px 0px 0px;\n  background-size: contain;\n}\n.bjg-window .bjg-window-title span.username[data-v-683c35f8] {\n  margin-left: 8px;\n  font-size: 12px;\n  color: white;\n  max-width: 125px;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  white-space: nowrap;\n}\n.bjg-window .bjg-window-bottom[data-v-683c35f8] {\n  border-top: 1px solid #f1f1f1;\n  background: white;\n  height: 41px;\n}\n.bjg-window .bjg-window-bottom a[data-v-683c35f8] {\n  cursor: pointer;\n  font-size: 12px;\n  color: #64615d;\n  text-decoration: underline;\n}\n.bjg-window .bjg-window-bt[data-v-683c35f8] {\n  position: absolute;\n  bottom: -1px;\n  height: 2px;\n  background: transparent;\n  left: 0;\n  right: 0;\n}\n", ""]);

// exports


/***/ }),
/* 535 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 536 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__OrangeButton_vue_vue_type_template_id_64323026_scoped_true__ = __webpack_require__(537);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OrangeButton_vue_vue_type_script_lang_js__ = __webpack_require__(160);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__OrangeButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__OrangeButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OrangeButton_vue_vue_type_style_index_0_id_64323026_lang_less_scoped_true__ = __webpack_require__(539);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__OrangeButton_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__OrangeButton_vue_vue_type_template_id_64323026_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__OrangeButton_vue_vue_type_template_id_64323026_scoped_true__["staticRenderFns"],
  false,
  null,
  "64323026",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('64323026')) {
      api.createRecord('64323026', component.options)
    } else {
      api.reload('64323026', component.options)
    }
    module.hot.accept("./OrangeButton.vue?vue&type=template&id=64323026&scoped=true", function () {
      api.rerender('64323026', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/OrangeButton.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 537 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__ = __webpack_require__(538);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_template_id_64323026_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 538 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("button", {
    staticClass: "bjg-orange-button",
    "class": _vm.selected ? "bjg-selected" : "",
    on: {
      click: function click($event) {
        return _vm.$emit("click", $event);
      }
    }
  }, [_vm._t("default")], 2);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 539 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_style_index_0_id_64323026_lang_less_scoped_true__ = __webpack_require__(540);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_style_index_0_id_64323026_lang_less_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_OrangeButton_vue_vue_type_style_index_0_id_64323026_lang_less_scoped_true__);
/* unused harmony reexport namespace */


/***/ }),
/* 540 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(541);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("c9978a2e", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OrangeButton.vue?vue&type=style&index=0&id=64323026&lang=less&scoped=true", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OrangeButton.vue?vue&type=style&index=0&id=64323026&lang=less&scoped=true");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 541 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-orange-button[data-v-64323026] {\n  width: 64px;\n  height: 24px;\n  background: #EBEBEB;\n  border-radius: 12px;\n  font-size: 14px;\n  color: #666666;\n  outline: none;\n  box-shadow: none;\n  box-sizing: border-box !important;\n  border: none;\n}\n.bjg-selected[data-v-64323026] {\n  background: linear-gradient(134deg, #FD693A 0%, #FB9912 100%);\n  color: #ffffff;\n}\n", ""]);

// exports


/***/ }),
/* 542 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__ = __webpack_require__(543);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionList_vue_vue_type_script_lang_js__ = __webpack_require__(163);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__CollectionList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__CollectionList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CollectionList_vue_vue_type_style_index_0_id_56eea7fc_scoped_true_lang_less__ = __webpack_require__(551);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__CollectionList_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__["staticRenderFns"],
  false,
  null,
  "56eea7fc",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('56eea7fc')) {
      api.createRecord('56eea7fc', component.options)
    } else {
      api.reload('56eea7fc', component.options)
    }
    module.hot.accept("./CollectionList.vue?vue&type=template&id=56eea7fc&scoped=true", function () {
      api.rerender('56eea7fc', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/CollectionList.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 543 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__ = __webpack_require__(544);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_template_id_56eea7fc_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 544 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticStyle: { "overflow-y": "auto", flex: "1" },
    on: { scroll: _vm.scroll }
  }, [_vm._l(_vm.list, function (item) {
    return _c("CollectionItem", {
      key: item.id,
      attrs: { product: item },
      on: { "delete": _vm.deleteItem }
    });
  }), _vm._v(" "), _vm.list.length === 0 && _vm.ended ? _c("div", {
    staticClass: "gwd-column gwd-align gwd-jcc",
    staticStyle: { height: "100%" }
  }, [_c("img", {
    staticStyle: { width: "60px", height: "52px" },
    attrs: { src: __webpack_require__(162), alt: "" }
  }), _vm._v(" "), _vm.tab === "down" ? _c("span", { staticClass: "bjg-hintText" }, [_vm._v("暂无商品降价"), _c("br"), _vm._v("降价会及时通知您")]) : _vm._e(), _vm._v(" "), _vm.tab === "default" ? _c("span", { staticClass: "bjg-hintText" }, [_vm._v("暂未收藏任何商品，去收藏")]) : _vm._e()]) : _vm._e()], 2);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 545 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__ = __webpack_require__(546);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_template_id_6af99812_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 546 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-row gwd-align bjg-product-item",
    "class": _vm.last ? "bjg-last" : "",
    on: {
      click: function click($event) {
        return _vm.open(_vm.product.go_url);
      }
    }
  }, [_c("img", {
    staticStyle: { width: "100px", height: "100px", "margin-left": "14px" },
    attrs: {
      src: _vm.product.img,
      alt: "",
      onerror: "this.src='https://cdn.bijiago.com/images/extensions/default_load_image.png'"
    }
  }), _vm._v(" "), _c("div", {
    staticClass: "gwd-column",
    staticStyle: {
      "margin-left": "10px",
      width: "260px",
      height: "100px"
    }
  }, [_c("div", { staticClass: "bjg-item-title" }, [_vm._v(_vm._s(_vm.product.title))]), _vm._v(" "), _vm.product.price ? _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "margin-top": "13px" }
  }, [_c("span", { staticStyle: { "font-size": "14px", color: "#ff3434" } }, [_vm._v(_vm._s(_vm.currencySymbol) + _vm._s(_vm.product.price.toFixed(2)))]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _vm.product.price < _vm.product.collect_price ? _c("span", { staticClass: "bjg-reduct" }, [_vm._v("比收藏时下降" + _vm._s(_vm.currencySymbol === "¥" ? "" : _vm.currencySymbol) + _vm._s((_vm.product.collect_price - _vm.product.price).toFixed(2).replace(".00", "")) + _vm._s(_vm.currencySymbol === "¥" ? "元" : ""))]) : _vm._e()]) : _vm._e(), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("div", { staticClass: "gwd-row gwd-align" }, [_c("img", {
    staticStyle: { width: "12px", height: "12px" },
    attrs: { src: _vm.product.site_icon, alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "4px",
      "font-size": "12px",
      color: "#999"
    }
  }, [_vm._v(_vm._s(_vm.product.site_name))]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("img", {
    staticStyle: { width: "10px" },
    attrs: {
      src: __webpack_require__(547),
      alt: ""
    },
    on: { click: _vm.deleteClick }
  })])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 547 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAMAAAD3n0w0AAAA6lBMVEUAAACqqqq/v7+2trafn5+ioqKqqqqZmZmfn5+lpaWcnJyhoaGZmZmenp6fn5+ZmZmbm5ucnJyZmZmZmZmcnJycnJybm5uZmZmampqampqZmZmampqZmZmampqbm5uampqZmZmbm5uampqampqampqZmZmbm5ubm5uZmZmampqampqampqampqZmZmampqZmZmampqZmZmampqZmZmampqampqZmZmampqampqampqampqZmZmZmZmZmZmZmZmZmZmZmZmampqampqZmZmZmZmZmZmampqZmZmZmZmZmZmZmZmampqZmZmZmZl+ScGrAAAATXRSTlMAAwQHCAsMDxAREhMUFRgZHCwtNzs+QEFHSUtOUFFcXWRrbW90dnp/hYaJkJWZmpuho6atsbO0tbq7xdDT1dff4uPl5ufp8vP2+Pv8/UcVj9YAAACuSURBVBjTY2AAAx4Td09PN2MuBmRg4KGnra3vqYsiaGcKIi2soVxLJxDwNgaxzbzAHHMGNUMwkAAJSkHYqgwkABZBVL4QM5BQ9GZFFuPwUQCSqr4oTub3VUYVZOPCImhkhSrIpwM02dwGVVDWV5gSQUFbfgYGdX2YoIovL7I7BXyVgKS0rySyoIwvKMDYne1FGWFCTOKODmwghpirLxJwEYFIc8trakGBhhwnUAAAmJMiBm8ecEcAAAAASUVORK5CYII="

/***/ }),
/* 548 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_style_index_0_id_6af99812_scoped_true_lang_less__ = __webpack_require__(549);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_style_index_0_id_6af99812_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionItem_vue_vue_type_style_index_0_id_6af99812_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 549 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(550);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("e344eaee", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionItem.vue?vue&type=style&index=0&id=6af99812&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionItem.vue?vue&type=style&index=0&id=6af99812&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 550 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-product-item[data-v-6af99812] {\n  height: 140px;\n  border-bottom: 1px solid #f1f1f1;\n}\n.bjg-product-item .bjg-item-title[data-v-6af99812] {\n  height: 40px;\n  font-size: 13px;\n  color: #333333;\n  line-height: 20px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\n.bjg-product-item .bjg-reduct[data-v-6af99812] {\n  font-size: 12px;\n  color: #31c38a;\n}\n.bjg-product-item.bjg-last[data-v-6af99812] {\n  border-bottom: none;\n}\n", ""]);

// exports


/***/ }),
/* 551 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_style_index_0_id_56eea7fc_scoped_true_lang_less__ = __webpack_require__(552);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_style_index_0_id_56eea7fc_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionList_vue_vue_type_style_index_0_id_56eea7fc_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 552 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(553);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("e4a7b8c2", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionList.vue?vue&type=style&index=0&id=56eea7fc&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionList.vue?vue&type=style&index=0&id=56eea7fc&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 553 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-hintText[data-v-56eea7fc] {\n  color: #333333;\n  line-height: 19px;\n  font-size: 14px;\n  text-align: center;\n  margin-top: 16px;\n}\n", ""]);

// exports


/***/ }),
/* 554 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_style_index_0_id_617a0842_scoped_true_lang_less__ = __webpack_require__(555);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_style_index_0_id_617a0842_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CollectionBar_vue_vue_type_style_index_0_id_617a0842_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 555 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(556);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("618a0e38", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionBar.vue?vue&type=style&index=0&id=617a0842&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionBar.vue?vue&type=style&index=0&id=617a0842&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 556 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-bar-button[data-v-617a0842] {\n  width: 114px;\n  height: 100%;\n  position: relative;\n}\n.bjg-bar-button .bjg-collection-tip[data-v-617a0842] {\n  background: url(" + __webpack_require__(557) + ");\n  background-size: cover;\n  width: 16px;\n  height: 16px;\n  position: absolute;\n  top: 10px;\n  right: 6px;\n  font-size: 12px;\n  line-height: 14px;\n  text-align: center;\n  color: #fff;\n}\n.bjg-bar-button .bjg-login[data-v-617a0842] {\n  display: none;\n}\n.bjg-bar-button[data-v-617a0842]:hover {\n  background: #fffbef;\n}\n.bjg-bar-button:hover .bjg-login[data-v-617a0842] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 557 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5uZXcgY29weTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMjYuMTQ5MzE3MiUiIHkxPSIxMi40NzEwNTk5JSIgeDI9Ijg0LjIwMjc4NDMlIiB5Mj0iODkuNjI4NDQ0NiUiIGlkPSJsaW5lYXJHcmFkaWVudC0xIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNUQzMCIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkY3RDUwIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IjXmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmtY/op4jljoblj7IiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTcyLjAwMDAwMCwgLTk1Mi4wMDAwMDApIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj4KICAgICAgICAgICAgPGcgaWQ9Im5ldy1jb3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMTcyLjAwMDAwMCwgOTUyLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTgsLTQuODEzOTI3MDNlLTEzIEwxNiwtNC44MTM5MjcwM2UtMTMgTDE2LDggQzE2LDEyLjQxODI3OCAxMi40MTgyNzgsMTYgOCwxNiBMOCwxNiBDMy41ODE3MjIsMTYgLTMuODU1OTI5NjJlLTEyLDEyLjQxODI3OCAtMy44NTY0NzA3ZS0xMiw4IEwtMy44NTY0NzA3ZS0xMiw4IEMtMy44NTcwMTE3OGUtMTIsMy41ODE3MjIgMy41ODE3MjIsLTQuODA1ODEwNzllLTEzIDgsLTQuODEzOTI3MDNlLTEzIFoiIGlkPSJSZWN0YW5nbGUtNSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOC4wMDAwMDAsIDguMDAwMDAwKSBzY2FsZSgtMSwgLTEpIHRyYW5zbGF0ZSgtOC4wMDAwMDAsIC04LjAwMDAwMCkgIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="

/***/ }),
/* 558 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgext-bg.bd-head-icon,\n.bjgext-mini-logo em {\n  background: url(" + __webpack_require__(55) + ") no-repeat;\n  background-size: cover;\n  margin-top: 0!important;\n  height: 100%!important;\n  background-position: unset!important;\n}\n.bjgext-head {\n  padding: 9px;\n  box-sizing: border-box !important;\n}\n.bjgext-head a.bd-head-icon {\n  width: 40px;\n}\n.bjgext-mini-logo em {\n  background: url(" + __webpack_require__(55) + ") no-repeat;\n  background-position: unset!important;\n  background-size: contain;\n  width: 32px!important;\n}\n.bjgext-mini-logo a {\n  padding: 2px;\n}\n.biyibi-ext#bjgou_price_tip .tip_btn_box em {\n  background: url(" + __webpack_require__(55) + ") no-repeat;\n  background-position: unset!important;\n  background-size: contain;\n  width: 22px;\n  height: 22px!important;\n}\n", ""]);

// exports


/***/ }),
/* 559 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, mainClass = $data.mainClass, title = $data.title, showAd = $data.showAd, jdadImg = $data.jdadImg, jdadUrl = $data.jdadUrl, feedbackText = $data.feedbackText, from_device = $data.from_device;
    $$out += '<div id="bjgext_mainbar" class="bjgext-detail ';
    $$out += $escape(mainClass);
    $$out += '" style="align-items: center; max-width: 100%">\n    <div class="bjgext-head">\n        <a class="bjgext-bg bd-head-icon" title="';
    $$out += $escape(title);
    $$out += '"></a>\n    </div>\n    <div class="bjgext-trend close-models">\n        <span class="bjgext-bg bjgext-trend-icon "></span>\n        <span class="bjgext-trend-tle">价格下降</span>\n    </div>\n    <div class="bjgext-product-compare close-models" style="align-items: center; overflow: hidden; flex: 1 auto; flex-wrap: wrap">\n\n    </div>\n    <div class="bjg-coupon-space"></div>\n    <div id="bjgou-price-protect"></div>\n    <div id="bjgou-collection"></div>\n    <div id="bjgou-history"></div>\n    <div class="common-banner"></div>\n    ';
    if (showAd && jdadImg) {
        $$out += '\n    <a id="bijiago-banner-ad" class="close-models gwd-row gwd-align" target="_blank"\n       href="';
        $$out += $escape(jdadUrl);
        $$out += '">\n        <img src="';
        $$out += $escape(jdadImg);
        $$out += '" style="max-height: 44px;">\n    </a>\n    ';
    }
    $$out += '\n\n    <div class="bjgext-feedback close-models">\n        <em class="bjgext-bg bjgext-feedback-icon"></em>\n        <span class="bjgext-trend-tle">';
    $$out += $escape(feedbackText);
    $$out += '</span>\n    </div>\n\n    ';
    if (from_device == 'bijiago') {
        $$out += '\n    <div id="pricedog-setting"></div>\n    ';
    }
    $$out += '\n    <div class="bjgext-closeBtn">\n        <em class="bjgext-bg"></em>\n    </div>\n    <style type="text/css">\n        .mainbar-fold .close-models {\n            display: none !important;\n        }\n\n        .common-banner {\n            float: left;\n            margin: 0px;\n            padding: 0px;\n        }\n\n        #bijiago-banner-ad, #bijiago-banner-ad2 {\n            /*width: 176px;*/\n            height: 36px;\n            float: left;\n            margin-left: 14px;\n            margin-right: 14px;\n        }\n\n        #bijiago-banner-ad + #bijiago-banner-ad2 {\n            margin-left: 0px;\n        }\n\n        a#bijiago-banner-ad2 {\n            width: 136px;\n            margin-top: 13px;\n            display: none;\n        }\n\n        a#bijiago-banner-ad2.showads {\n            display: block;\n        }\n\n        .bjgext-detail {\n            display: none;\n        }\n\n        .bjgext-feedback, .bjgext-closeBtn {\n            float: left;\n            border-left: 1px solid #f1f1f1;\n            cursor: pointer;\n        }\n\n        .bjgext-feedback {\n            width: 80px;\n            font-size: 14px;\n        }\n\n        .bjgext-closeBtn {\n            width: 40px;\n            height: 58px;\n        }\n\n        .bjgext-closeBtn em {\n            background-position: -82px -59px;\n            height: 20px;\n            width: 20px;\n            float: left;\n            margin-top: 21px;\n            margin-left: 10px;\n        }\n\n        .bjgext-closeBtn em:hover {\n            background-position: -103px -59px;\n        }\n\n        .mainbar-fold .bjgext-closeBtn em {\n            background-position: -38px -59px;\n        }\n\n        .mainbar-fold .bjgext-closeBtn em:hover {\n            background-position: -59px -59px;\n        }\n\n        .bjgext-feedback-icon {\n            float: left;\n            background-position: -124px -59px;\n            height: 17px;\n            width: 18px;\n            margin-top: 21px;\n            margin-left: 14px;\n            margin-right: 8px;\n        }\n\n        .bjgext-trend-tle {\n            font-family: MicrosoftYaHei;\n            font-size: 14px;\n            color: #64615D;\n            letter-spacing: 0;\n        }\n\n        .bjgext-feedback:hover {\n            background: #FFFBEF;\n        }\n\n        .mainbar-fold .coupon-marleft {\n            display: none;\n        }\n    </style>\n</div>\n';
    return $$out;
};

/***/ }),
/* 560 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

module.exports.init = function () {
  if (location.href.indexOf('.vip.com') > -1) {
    if (new Date() < new Date('2023-12-14T10:00:00')) {

      var b = document.createElement('a');
      b.classList.add('close-models');
      b.href = "https://tb.bijiago.com/static_page/activity_scan/vip.html";
      b.target = "_blank";
      b.style = 'border-left: 1px solid #f1f1f1; height: 100%';
      b.innerHTML = '<img src="https://cdn.gwdang.com/images/extensions/activity/vipBottom.png" alt="" style="height:44px; margin-top: 8px;">';
      $('.bjgext-closeBtn').before(b);
    }
  }

  if (location.href.indexOf('.kaola.com') > -1) {
    if (new Date() < new Date('2021-11-11T23:59')) {

      var b = document.createElement('a');
      b.href = "https://tb.jiuxinban.com/7cqq1K";
      b.target = "_blank";
      b.style = 'border-left: 1px solid #f1f1f1; height: 100%';
      b.innerHTML = '<img src="https://cdn.gwdang.com/images/extensions/activity/kola1111bottom@2x.png" alt="" style="width: 163px; margin-top: 3px">';
      $('.bjgext-closeBtn').before(b);
    }
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 561 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LangSetting_vue_vue_type_template_id_2970b468_scoped_true__ = __webpack_require__(562);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__LangSetting_vue_vue_type_script_lang_js__ = __webpack_require__(170);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__LangSetting_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__LangSetting_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LangSetting_vue_vue_type_style_index_0_id_2970b468_scoped_true_lang_less__ = __webpack_require__(565);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__LangSetting_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__LangSetting_vue_vue_type_template_id_2970b468_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__LangSetting_vue_vue_type_template_id_2970b468_scoped_true__["staticRenderFns"],
  false,
  null,
  "2970b468",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('2970b468')) {
      api.createRecord('2970b468', component.options)
    } else {
      api.reload('2970b468', component.options)
    }
    module.hot.accept("./LangSetting.vue?vue&type=template&id=2970b468&scoped=true", function () {
      api.rerender('2970b468', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/LangSetting.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 562 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__ = __webpack_require__(563);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_template_id_2970b468_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 563 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-row gwd-align pricedog-bottom-tab close-models" }, [_c("img", {
    staticStyle: { width: "16px" },
    attrs: { src: __webpack_require__(564), alt: "" }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "8px" } }, [_vm._v(_vm._s(_vm.lang === "zh-tr" ? "設置" : "设置"))]), _vm._v(" "), _c("div", { staticClass: "pricedog-setting gwd-column" }, [_c("span", [_vm._v(_vm._s(_vm.lang === "zh-tr" ? "語言" : "语言"))]), _vm._v(" "), _c("div", {
    staticClass: "gwd-option gwd-row gwd-align",
    on: {
      click: function click($event) {
        return _vm.setLang("zh");
      }
    }
  }, [_c("img", {
    attrs: {
      src: _vm.selected === "zh" ? _vm.checked : _vm.unChecked,
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "4px" } }, [_vm._v("简体中文")])]), _vm._v(" "), _c("div", {
    staticClass: "gwd-option gwd-row gwd-align",
    on: {
      click: function click($event) {
        return _vm.setLang("zh-tr");
      }
    }
  }, [_c("img", {
    attrs: {
      src: _vm.selected === "zh-tr" ? _vm.checked : _vm.unChecked,
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "4px" } }, [_vm._v("繁體中文")])])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 564 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNXB4IiB2aWV3Qm94PSIwIDAgMTYgMTUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5GaWxsIDY8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmiYDmnInllYblk4HotoXov4fku7fkv53lkajmnJ8iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzQ4LjAwMDAwMCwgLTkxMC4wMDAwMDApIiBmaWxsPSIjZTJjOGFlIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgNDQ5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IuW6lemDqCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDQ0Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmlsbC02IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNzcuMDAwMDAwLCAxNS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE1Ljc3MDMxNzksNi4yOTc0NDEwMSBMMTIuNjMwMzU4NywwLjg2MjY1NTc2NyBDMTIuMzI0MTE1OSwwLjMyNzkxNzAyMyAxMS43NTQ2NTUzLC00LjM2MDk1NjA0ZS0xMyAxMS4xMzc5NjQzLC00LjM2MDk1NjA0ZS0xMyBMNC44NjIwMzU3MywtNC4zNjA5NTYwNGUtMTMgQzQuMjQ1MzQ0NjksLTQuMzYwOTU2MDRlLTEzIDMuNjc1ODg0MDUsMC4zMjc5MTcwMjMgMy4zNjk2NDEyNiwwLjg2MjY1NTc2NyBMMC4yMjk2ODIwOTgsNi4yOTc0NDEwMSBDLTAuMDc2NTYwNjk5Myw2LjgzMjM5NTQyIC0wLjA3NjU2MDY5OTMsNy40ODgwMTM4IDAuMjI5NjgyMDk4LDguMDE4NTQ3MSBMMy4zNjk2NDEyNiwxMy40NTMzMzIzIEMzLjY3NTg4NDA1LDEzLjk4ODA3MTEgNC4yNDUzNDQ2OSwxNC4zMTU5ODgxIDQuODYyMDM1NzMsMTQuMzE1OTg4MSBMMTEuMTM3OTY0MywxNC4zMTU5ODgxIEMxMS43NTQ2NTUzLDE0LjMxNTk4ODEgMTIuMzI0MTE1OSwxMy45ODgwNzExIDEyLjYzMDM1ODcsMTMuNDUzMzMyMyBMMTUuNzcwMzE3OSw4LjAxODU0NzEgQzE2LjA3NjU2MDcsNy40ODgwMTM4IDE2LjA3NjU2MDcsNi44MzIzOTU0MiAxNS43NzAzMTc5LDYuMjk3NDQxMDEgWiBNOC4wMjgwOTAyMyw5Ljk1MDg5NjAyIEM2LjQ5Njc2ODQxLDkuOTUwODk2MDIgNS4yNTQ1OTgwMiw4LjcwODcyNTYzIDUuMjU0NTk4MDIsNy4xNzc0MDM4MSBDNS4yNTQ1OTgwMiw1LjY0NjI0Mzc0IDYuNDk2NzY4NDEsNC40MDM4NTc2OSA4LjAyODA5MDIzLDQuNDAzODU3NjkgQzkuNTU5MjUwMyw0LjQwMzg1NzY5IDEwLjgwMTQyMDcsNS42NDYyNDM3NCAxMC44MDE0MjA3LDcuMTc3NDAzODEgQzEwLjc5NzIxNTIsOC43MDg3MjU2MyA5LjU1OTI1MDMsOS45NTA4OTYwMiA4LjAyODA5MDIzLDkuOTUwODk2MDIgWiIgaWQ9IkZpbGwtMyI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 565 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_style_index_0_id_2970b468_scoped_true_lang_less__ = __webpack_require__(566);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_style_index_0_id_2970b468_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LangSetting_vue_vue_type_style_index_0_id_2970b468_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 566 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(567);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("0713da49", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LangSetting.vue?vue&type=style&index=0&id=2970b468&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LangSetting.vue?vue&type=style&index=0&id=2970b468&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 567 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".pricedog-bottom-tab[data-v-2970b468] {\n  justify-content: center;\n  width: 90px;\n  height: 60px;\n  border-left: 1px solid #f1f1f1;\n  position: relative;\n  cursor: default;\n}\n.pricedog-bottom-tab span[data-v-2970b468] {\n  font-size: 14px;\n  color: #64615d;\n}\n.pricedog-setting[data-v-2970b468] {\n  display: none;\n  width: 94px;\n  height: 93px;\n  background: #FFFFFF;\n  border: 1px solid #F1F1F1;\n  position: absolute;\n  bottom: 60px;\n  box-sizing: border-box;\n  left: -1px;\n  padding-left: 10px;\n  padding-top: 8px;\n}\n.pricedog-setting span[data-v-2970b468] {\n  font-size: 12px;\n  color: #64615d;\n}\n.pricedog-setting .gwd-option[data-v-2970b468] {\n  margin-top: 16px;\n}\n.pricedog-setting .gwd-option img[data-v-2970b468] {\n  width: 12px;\n}\n.pricedog-bottom-tab[data-v-2970b468]:hover {\n  background: #fffbef;\n}\n.pricedog-bottom-tab:hover .pricedog-setting[data-v-2970b468] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 568 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__ = __webpack_require__(569);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PriceProtectBar_vue_vue_type_script_lang_js__ = __webpack_require__(174);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PriceProtectBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PriceProtectBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PriceProtectBar_vue_vue_type_style_index_0_id_074e6fb7_scoped_true_lang_less__ = __webpack_require__(618);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PriceProtectBar_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__["staticRenderFns"],
  false,
  null,
  "074e6fb7",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('074e6fb7')) {
      api.createRecord('074e6fb7', component.options)
    } else {
      api.reload('074e6fb7', component.options)
    }
    module.hot.accept("./PriceProtectBar.vue?vue&type=template&id=074e6fb7&scoped=true", function () {
      api.rerender('074e6fb7', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/PriceProtectBar.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 569 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__ = __webpack_require__(570);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_template_id_074e6fb7_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 570 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    ref: "btn",
    staticClass: "bjg-bar-button",
    "class": _vm.hide ? "bjg-hide" : "",
    style: _vm.hintShow ? "width: 144px" : _vm.notifyCount > 0 || _vm.user && _vm.userAgreed && _vm.enabled && !_vm.isJdLogin ? "width: 128px;" : "",
    on: {
      click: function click($event) {
        return _vm.ppClick();
      }
    }
  }, [_c("img", {
    staticStyle: { width: "19px", height: "22px", "margin-left": "15px" },
    attrs: { src: __webpack_require__(103), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "10px",
      "font-size": "14px",
      color: "#64615d"
    }
  }, [_vm._v("价格保护")]), _vm._v(" "), _vm.hintShow ? _c("img", {
    staticStyle: {
      width: "32px",
      height: "16px",
      position: "absolute",
      top: "10px",
      right: "10px"
    },
    attrs: { src: __webpack_require__(571), alt: "" }
  }) : _vm._e(), _vm._v(" "), _vm.notifyCount > 0 ? _c("div", {
    staticClass: "bjg-notify",
    staticStyle: {
      width: "16px",
      height: "16px",
      position: "absolute",
      top: "10px",
      right: "14px"
    }
  }, [_vm._v("\n    " + _vm._s(_vm.notifyCount) + "\n  ")]) : _vm._e(), _vm._v(" "), _vm.user && _vm.userAgreed && _vm.enabled && !_vm.isJdLogin ? _c("div", {
    staticClass: "bjg-notify bjg-alert",
    staticStyle: {
      width: "16px",
      height: "16px",
      position: "absolute",
      top: "10px",
      right: "14px"
    }
  }) : _vm._e(), _vm._v(" "), _vm.user && _vm.isJdLogin ? _c("BjgBottomWindow", {
    style: _vm.positionStyle + "px;" + (_vm.forceOpen ? "display: block" : ""),
    attrs: { name: "价保" },
    on: { mouseover: _vm.mouseOver }
  }, [!_vm.userAgreed ? _c("PriceProtectAuthLoginRequest", {
    attrs: { login: _vm.user },
    on: {
      userAgreed: function userAgreed($event) {
        return _vm.setEnable();
      }
    }
  }) : _vm._e(), _vm._v(" "), _vm.user && _vm.userAgreed && _vm.enabled && !_vm.isJdLogin ? _c("PriceProtectJdLogin") : _vm._e(), _vm._v(" "), _c("JdItemList", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.user && _vm.userAgreed && _vm.isJdLogin && _vm.enabled,
      expression: "user && userAgreed && isJdLogin && enabled"
    }],
    ref: "jdItemList",
    on: {
      needLogin: function needLogin($event) {
        _vm.isJdLogin = false;
      }
    }
  }), _vm._v(" "), _vm.user && _vm.userAgreed && !_vm.enabled ? _c("div", {
    staticClass: "gwd-column gwd-align bjg-pp-disabled",
    staticStyle: { height: "201px", background: "white" }
  }, [_c("img", {
    staticStyle: {
      "margin-top": "30px",
      width: "30px",
      height: "30px"
    },
    attrs: {
      src: __webpack_require__(572),
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-top": "14px" } }, [_vm._v("价格保护功能关闭")]), _vm._v(" "), _c("span", [_vm._v("无法获取最新价保信息")]), _vm._v(" "), _c("button", {
    staticClass: "gwd-button",
    staticStyle: { "margin-top": "30px" },
    on: {
      click: function click($event) {
        return _vm.enable();
      }
    }
  }, [_vm._v("重新开启")])]) : _vm._e(), _vm._v(" "), _vm.user ? _c("div", { staticClass: "bjg-window-bottom gwd-row gwd-align" }, [_c("GwdA", {
    staticStyle: { "margin-left": "14px" },
    attrs: {
      href: "https://www.bijiago.com/priceProtectIntro/",
      target: "_blank"
    }
  }, [_vm._v("价格保护使用帮助")]), _vm._v(" "), _c("GwdA", {
    staticStyle: { "margin-left": "32px" },
    attrs: {
      href: "https://pcsitepp-fm.jd.com/",
      target: "_blank"
    }
  }, [_vm._v("京东价格保护中心")]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _vm.user && _vm.isJdLogin && _vm.enabled ? _c("img", {
    staticStyle: {
      width: "16px",
      height: "15px",
      "margin-right": "14px"
    },
    attrs: {
      src: __webpack_require__(573),
      alt: ""
    },
    on: {
      click: function click($event) {
        _vm.settingOpen = !_vm.settingOpen;
      }
    }
  }) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.enabled && _vm.settingOpen,
      expression: "enabled && settingOpen"
    }],
    staticClass: "gwd-column gwd-align bjg-setting"
  }, [_c("span", {
    staticStyle: {
      "margin-top": "6px",
      "font-size": "12px",
      color: "#333333"
    }
  }, [_vm._v("是否开启价保")]), _vm._v(" "), _c("img", {
    staticStyle: {
      width: "33px",
      height: "18px",
      "margin-top": "6px"
    },
    attrs: {
      src: __webpack_require__(574),
      alt: ""
    },
    on: { click: _vm.disable }
  })])], 1) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 571 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAYAAACinX6EAAAIGUlEQVRo3qWZf2xV5RnHP++9hV7pWirMUqYl1CZoWxC3OpAx5qbwxwzgz+rilnS4Tbeki0vMlmi2dKaJ0SxzUZbFTZcV/1tiFEkm6tyALqEUpb2rLSoVEwuj/OpoSgu0t/d99sd7zj2/3vf21t3k5pzznvOe8z7f5/v8fBXz+Enn3Q3kUpvRs2tBNSBSi2IJmkoknwFVhui0eVgoHMW/Dp8TvQ4/n5gfug+gtTkqNY7IKURGEZ2F9G6Wbz6onnpKlyqTmlPoZ1oXM5V/FCWPILoBISmIL1xkwf5zUriVFDQOiEXgCFjhcQtI5ncO4SWukmfVzt6Jzw2AdHSkUAPtiHSipco8Gl+AtggX16D3nHPRNuBcwgloKSylwAQbcErOA528dHinUkrmBYB0tNYiudcQNoCAUg6a2jRpY4dD+2AEIsYW13sSrHCxKgQk7CFT8V31h/2TJQEgnfc0kpO3gBVEcBOLXdpobtMKFtrrJIgRQCzCzXWOg5VKDZJOf1u93HuyKADS0VoLuV60rChoPax9wWIGEhU8Maa8RVnoHaa0jo2Vagb+eNwc/LHCuyVLeWqj+tORS2GZUxGbl9xraFaYRXv46DCdJEKIyKKwmYkKMSJONl87RQS10h27P7GZaQRYdTPTepeIKCsA6IF2RDYEa5WYwJJcRNz5RIAqwpTwuA4xi5iAru+D2/nZTC9Y9/3saGlLmIA807qYy7kRhKrgw8oexlwhUFyhStsZo21hzkF3p8Nz+ANbzhAw5QSpxatU1/4rAQOm8o+ipapAG6VCC7KgWnBasbHCh1UsxFnmYGFLIYQVYVrC21uAiJtDFLA6ZLw9agJKHvEkt9h2aJFx09CW8Fr4sIoKUACGaMQQ7EAXc4I4zCHq+ZPCF1ihdhRWJJ13NzAjnxRQC2vPn1e3CmrrzfhANywohzWbYMUNkM/D2RHofRsujsX8hHesroGm9XBtAyyqglOfwslhGOoBnQ+AvHqZeQ6BsdMwdChK47pVsLLRnPe+DZenAiDTZbBxu7nO56D7DbffAEizSnVlh8uYUVsiXjuBqIbVX4eNd3mcScHtD8EXFkef23QvvNIJx/8dZffab8CDj0NmUTC+dpM5Hh+AP/8aJsbM92euwIM/g1QaLpyFJ++N5hV3fh++8k1zPnEB+vYFYNevhrYnzL0PDhoAXMID5NV24LcplNxk5FYOW4/9tv8EKqrgWB8M9wfaWVQJ9z1mrMp/x823QduvjPCXJ6HnTeh+3QgH0HAT/OKPATiT43Cs32NDDdTURc3nxpbgsmld1DSa1wf3ev+e9AFJa2wCKENoKNh2PPNTlnA0m4Pn2+HsCfOByquh/XeGvtdcC9evgU/6YWEGtv/YzJmZhmd/BBfOmOtXn4evbYPvPA7V18Bt98HeXeZe3z648RZz3rgOTn9mvrOy0YAcBiD88wGYzcGRf5ZQ2vIl4wSVqk3Ebx8MbUFxoDsQXgQm/guDB4P7S2vN3JY7oPqLZuy9d+DCae+9XnbY87eACbc/AOm0eV//fsjPegB8Nfh+owfKBz2Qm4Ga62BJrRnLVEB9kzk/ehguXSyuffNbbhigWBKN67EsIZYPcfitWLgCPnofNt1jxqo8oWtXBnPKM3Dnw0mvPDFmqF5RZZhwftSYwcd9RsM3fNn4A50PNJ49YMBqWmf+/3rDgJNKe/R/Zz4tDspMM8OWXWGJ2RhbjhdH06H02o8mNdcFY7dsmXslS2sNAABH/mGEy1RAfTOMfGT8hc+ATIW537weundH6e87xrkbAac8H6AzkdQzMVklUvjoueNjfogCOLTX0DKS48f8zqXJwKyyB+Chn5vQ1rQOysuhbAGcGYGxURjqhdafBibSfKt5x+AhmLpYqvJHDQCoMvCrJhxFjSXZcJmIf//MZ8F19oAX0x0lbxgIBUxOGLNqvtUDwOiIoV5zHPnY+J6qJdDyLVhWF+QGJff3OOplgjptTTNtBZG1CMGecp44FjKBzQGR/EcXlMMvX4Gd++A3b5qoEWbGe++a6/omk0sADPYELxg6bI73e1ltbgaO7C8dgLTsMQBILHcPazWSGWJvQBTAIprHDx6E4awZa7kDtnwPFmSMj7h+NTzcActXGpof2mv8SNgRZ7thdtY4t2V15vzD94N1+Vni8pVB8nNlqtRW6FHVlR32TCBWz+Oq57HX8za/4IPw1+fgsRegshq2/RC2/sBke+VXBc9/Ogivv0jBBv13TU3Ah72wZmOQNU5fDuYN9kSXMx/vn5K/BMVQpJ631PRW+xf3dXjq2RF4us3Edp032veFv3IJdr8Iz7VDbtpe/flm4Du4cD9h/DycPB4kWv0HSlS+OoGq/n1QDD25TYrX8/HObUz7ulg9HypkyhYaKlcthXP/MX+dn7uej/f4ijVIS7L91A7V1dcVAPDEVkn29sONDLGUuTrZBI2zR5fQFXb39kOlcuy+skWRUk1fvcquvgfCbfJUSfV8ARvlaG4yd9fGFllkjn5CUoCkmZS+BZQlk2qL7xGk7P021yaHg3rasl+ApZkpLsc5x3bY/0/9QRaWb4t3hD0AxJEBkrRxRzAouiBxOEhbe8s5X+Zv6wFr9lBZvcG2J+ClwuJOcFxtcKtGipiAilWWLrt3alklN2bmlvw8KTrp6iu6NZZyJzixJolV9WLPC+IC6RIWbPu++lyO7hwq9TTVCxvUrv4XignvN0RiBQrunV3iO73xRkoR56fnac/FwmEA0DiiTqEYRZFFp3ZTv3Ve2+P/A71MMQGiuuPaAAAAAElFTkSuQmCC"

/***/ }),
/* 572 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMzAgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5GaWxsIDI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLku7fkv53lip/og73lt7LlhbPpl60iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTU3LjAwMDAwMCwgLTcyNC4wMDAwMDApIiBmaWxsPSIjRENEQ0RDIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgNjYyLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IkZpbGwtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTg2LjAwMDAwMCwgNjIuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE1LDAgQzYuNzE2Mjk2ODgsMCAwLDYuNzE2Mjk2ODggMCwxNSBDMCwxOS4wODM3OTY5IDEuNjM4Nzk2ODcsMjIuNzg0OTA2MiA0LjI4NjI5Njg3LDI1LjQ4ODg0MzcgQzQuMzIsMjUuNTMzNzAzMSA0LjMzNSwyNS41ODI1OTM3IDQuMzc2MjAzMTIsMjUuNjIzNzk2OSBDNC40MTc0MDYyNSwyNS42NjUgNC40NjYyOTY4OCwyNS42OCA0LjUxMTE1NjI1LDI1LjcxMzcwMzEgQzcuMjE1MDkzNzUsMjguMzYxMjAzMSAxMC45MTYyMDMxLDMwIDE1LDMwIEMyMy4yODM3MDMxLDMwIDMwLDIzLjI4MzcwMzEgMzAsMTUgQzMwLDYuNzE2Mjk2ODggMjMuMjgzNzAzMSwwIDE1LDAgWiBNMTUuMDE2MDg1OCwyLjI1IEMxOC4xNTU1Mzk0LDIuMjUgMjEuMDI2ODEyLDMuMzkyNzg2ODcgMjMuMjUsNS4yNzY1Mzc3OSBMNS4yNzc2Mzk2OSwyMy4yNSBDMy4zOTMyMDQxMiwyMS4wMjM4MDM5IDIuMjUwMDAxOTEsMTguMTUzNTc0NSAyLjI1MDAwMTkxLDE1LjAxNTI2MTYgQzIuMjQ2MTg0NzIsNy45NzU1MjEzNSA3Ljk3Mzc4NzAxLDIuMjUgMTUuMDE2MDg1OCwyLjI1IFogTTE0Ljk4MjQxODUsMjcuNzUgQzExLjg0MzUzNTIsMjcuNzUgOC45NzI3ODQxOCwyNi42MDcwMDU0IDYuNzUsMjQuNzIyOTEyMiBMMjQuNzIyOTEyMiw2Ljc1IEMyNi42MDcwMDU0LDguOTc2NjAwNjggMjcuNzUsMTEuODQ3MzUxNyAyNy43NSwxNC45ODYwNDg4IEMyNy43NSwyMi4wMjM0MzgxIDIyLjAyMzQzODEsMjcuNzUgMTQuOTgyNDE4NSwyNy43NSBaIiBpZD0iRmlsbC0xIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="

/***/ }),
/* 573 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNXB4IiB2aWV3Qm94PSIwIDAgMTYgMTUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5GaWxsIDY8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmiYDmnInllYblk4HotoXov4fku7fkv53lkajmnJ8iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzQ4LjAwMDAwMCwgLTkxMC4wMDAwMDApIiBmaWxsPSIjOEM4NDdCIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgNDQ5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IuW6lemDqCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDQ0Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmlsbC02IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNzcuMDAwMDAwLCAxNS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE1Ljc3MDMxNzksNi4yOTc0NDEwMSBMMTIuNjMwMzU4NywwLjg2MjY1NTc2NyBDMTIuMzI0MTE1OSwwLjMyNzkxNzAyMyAxMS43NTQ2NTUzLC00LjM2MDk1NjA0ZS0xMyAxMS4xMzc5NjQzLC00LjM2MDk1NjA0ZS0xMyBMNC44NjIwMzU3MywtNC4zNjA5NTYwNGUtMTMgQzQuMjQ1MzQ0NjksLTQuMzYwOTU2MDRlLTEzIDMuNjc1ODg0MDUsMC4zMjc5MTcwMjMgMy4zNjk2NDEyNiwwLjg2MjY1NTc2NyBMMC4yMjk2ODIwOTgsNi4yOTc0NDEwMSBDLTAuMDc2NTYwNjk5Myw2LjgzMjM5NTQyIC0wLjA3NjU2MDY5OTMsNy40ODgwMTM4IDAuMjI5NjgyMDk4LDguMDE4NTQ3MSBMMy4zNjk2NDEyNiwxMy40NTMzMzIzIEMzLjY3NTg4NDA1LDEzLjk4ODA3MTEgNC4yNDUzNDQ2OSwxNC4zMTU5ODgxIDQuODYyMDM1NzMsMTQuMzE1OTg4MSBMMTEuMTM3OTY0MywxNC4zMTU5ODgxIEMxMS43NTQ2NTUzLDE0LjMxNTk4ODEgMTIuMzI0MTE1OSwxMy45ODgwNzExIDEyLjYzMDM1ODcsMTMuNDUzMzMyMyBMMTUuNzcwMzE3OSw4LjAxODU0NzEgQzE2LjA3NjU2MDcsNy40ODgwMTM4IDE2LjA3NjU2MDcsNi44MzIzOTU0MiAxNS43NzAzMTc5LDYuMjk3NDQxMDEgWiBNOC4wMjgwOTAyMyw5Ljk1MDg5NjAyIEM2LjQ5Njc2ODQxLDkuOTUwODk2MDIgNS4yNTQ1OTgwMiw4LjcwODcyNTYzIDUuMjU0NTk4MDIsNy4xNzc0MDM4MSBDNS4yNTQ1OTgwMiw1LjY0NjI0Mzc0IDYuNDk2NzY4NDEsNC40MDM4NTc2OSA4LjAyODA5MDIzLDQuNDAzODU3NjkgQzkuNTU5MjUwMyw0LjQwMzg1NzY5IDEwLjgwMTQyMDcsNS42NDYyNDM3NCAxMC44MDE0MjA3LDcuMTc3NDAzODEgQzEwLjc5NzIxNTIsOC43MDg3MjU2MyA5LjU1OTI1MDMsOS45NTA4OTYwMiA4LjAyODA5MDIzLDkuOTUwODk2MDIgWiIgaWQ9IkZpbGwtMyI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 574 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMzNweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMzMgMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5vcGVuPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSIxMDAlIiB5MT0iNTAlIiB4Mj0iLTEuMTEwMjIzMDJlLTE0JSIgeTI9IjUwJSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkZEODQ4IiBvZmZzZXQ9IjAlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGNUI3MzYiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLlhbPms6jmiavnoIEr5byA5YWz5rWu56qXIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTMwNy4wMDAwMDAsIC04NzEuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSLlvIDlhbMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyNzcuMDAwMDAwLCA4NDMuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i5pyq5byA5ZCvIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMC4wMDAwMDAsIDI4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSJvcGVuIj4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTksMCBMMjQsMCBDMjguOTcwNTYyNywtOS4xMzA3NzU2NGUtMTYgMzMsNC4wMjk0MzcyNSAzMyw5IEwzMyw5IEMzMywxMy45NzA1NjI3IDI4Ljk3MDU2MjcsMTggMjQsMTggTDksMTggQzQuMDI5NDM3MjUsMTggNi4wODcxODM3NmUtMTYsMTMuOTcwNTYyNyAwLDkgTDAsOSBDLTYuMDg3MTgzNzZlLTE2LDQuMDI5NDM3MjUgNC4wMjk0MzcyNSw5LjEzMDc3NTY0ZS0xNiA5LDAgWiIgaWQ9IlJlY3RhbmdsZS0yLUNvcHkiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE2LjUwMDAwMCwgOS4wMDAwMDApIHNjYWxlKC0xLCAxKSB0cmFuc2xhdGUoLTE2LjUwMDAwMCwgLTkuMDAwMDAwKSAiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0iI0ZGRkZGRiIgY3g9IjI0IiBjeT0iOSIgcj0iNyI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="

/***/ }),
/* 575 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__ = __webpack_require__(576);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_template_id_5d50758c__["staticRenderFns"]; });


/***/ }),
/* 576 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjg-price-protect-auth gwd-column gwd-align",
    style: _vm.center ? "height: 163px;" : _vm.login ? "height: 126px" : ""
  }, [!_vm.login || _vm.center ? _c("img", {
    style: "width: 340px; " + (_vm.center ? "" : "margin-top: 20px;"),
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/price-protect@2x.png",
      alt: ""
    },
    on: {
      click: function click($event) {
        return _vm.goIntro();
      }
    }
  }) : _vm._e(), _vm._v(" "), _vm.center || !_vm.login ? _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "margin-top": "15px" }
  }, [_c("img", {
    staticStyle: { width: "14px", height: "14px" },
    attrs: { src: _vm.img, alt: "" },
    on: {
      click: function click($event) {
        _vm.checked = !_vm.checked;
      }
    }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "5px",
      "font-size": "12px",
      color: "#64615d"
    }
  }, [_vm._v("授权比价狗同步我的京东订单，便于申请价格保护")])]) : _vm._e(), _vm._v(" "), _vm.login && !_vm.center ? _c("div", { staticStyle: { height: "10px" } }) : _vm._e(), _vm._v(" "), _c("button", {
    staticClass: "gwd-button",
    style: _vm.checked ? "background: linear-gradient(270deg, #FFCD47 0%, #FF9F22 100%);" : "background: #d6d6d6",
    on: { click: _vm.submit }
  }, [_vm._v("\n    " + _vm._s(_vm.login ? "开启" + (_vm.center ? "授权" : "价格保护") : "登录开启价保") + "\n  ")]), _vm._v(" "), _vm.login && !_vm.center ? _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "margin-top": "15px" }
  }, [_c("img", {
    staticStyle: { width: "14px", height: "14px" },
    attrs: { src: _vm.img, alt: "" },
    on: {
      click: function click($event) {
        _vm.checked = !_vm.checked;
      }
    }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "5px",
      "font-size": "12px",
      color: "#64615d"
    }
  }, [_vm._v("授权比价狗同步我的京东订单，便于申请价格保护")])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 577 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_style_index_0_id_5d50758c_lang_less__ = __webpack_require__(578);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_style_index_0_id_5d50758c_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectAuthLoginRequest_vue_vue_type_style_index_0_id_5d50758c_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 578 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(579);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("2e953209", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectAuthLoginRequest.vue?vue&type=style&index=0&id=5d50758c&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectAuthLoginRequest.vue?vue&type=style&index=0&id=5d50758c&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 579 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-price-protect-auth {\n  height: 201px;\n}\n.bjg-price-protect-auth button {\n  margin-top: 20px;\n  width: 340px;\n  height: 30px;\n  border-radius: 15px;\n  text-align: center;\n  font-size: 14px;\n  font-weight: bold;\n  color: white;\n  box-sizing: border-box !important;\n}\n", ""]);

// exports


/***/ }),
/* 580 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__ = __webpack_require__(581);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PriceProtectJdLogin_vue_vue_type_script_lang_js__ = __webpack_require__(179);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PriceProtectJdLogin_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PriceProtectJdLogin_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PriceProtectJdLogin_vue_vue_type_style_index_0_id_e995141a_scoped_true_lang_less__ = __webpack_require__(583);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PriceProtectJdLogin_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__["staticRenderFns"],
  false,
  null,
  "e995141a",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('e995141a')) {
      api.createRecord('e995141a', component.options)
    } else {
      api.reload('e995141a', component.options)
    }
    module.hot.accept("./PriceProtectJdLogin.vue?vue&type=template&id=e995141a&scoped=true", function () {
      api.rerender('e995141a', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/PriceProtectJdLogin.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 581 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__ = __webpack_require__(582);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_template_id_e995141a_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 582 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-price-protect-jd-login gwd-column gwd-align" }, [_c("img", {
    staticStyle: { width: "112px", height: "55px", "margin-top": "41px" },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/hi@2x.png",
      alt: ""
    }
  }), _vm._v(" "), _vm._m(0), _vm._v(" "), _c("button", {
    staticClass: "gwd-button",
    on: {
      click: function click($event) {
        return _vm.doJdLogin();
      }
    }
  }, [_vm._v("登录京东")])]);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-hint", staticStyle: { "margin-top": "30px" } }, [_vm._v("\n    请您先登录京东网站"), _c("br"), _vm._v("\n    价格保护才能正常工作\n  ")]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 583 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_style_index_0_id_e995141a_scoped_true_lang_less__ = __webpack_require__(584);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_style_index_0_id_e995141a_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectJdLogin_vue_vue_type_style_index_0_id_e995141a_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 584 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(585);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("f5a65130", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectJdLogin.vue?vue&type=style&index=0&id=e995141a&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectJdLogin.vue?vue&type=style&index=0&id=e995141a&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 585 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-price-protect-jd-login[data-v-e995141a] {\n  height: 250px;\n}\n.bjg-price-protect-jd-login .bjg-hint[data-v-e995141a] {\n  width: 120px;\n  height: 44px;\n  font-size: 12px;\n  color: #64615D;\n  line-height: 22px;\n  text-align: center;\n}\n.bjg-price-protect-jd-login .gwd-button[data-v-e995141a] {\n  margin-top: 30px;\n  width: 340px;\n  height: 30px;\n  border-radius: 15px;\n  background: linear-gradient(270deg, #FFCD47 0%, #FF9F22 100%);\n  font-weight: bold;\n  font-size: 14px;\n  color: white;\n}\n", ""]);

// exports


/***/ }),
/* 586 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__ = __webpack_require__(587);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__JdItemList_vue_vue_type_script_lang_js__ = __webpack_require__(182);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__JdItemList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__JdItemList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__JdItemList_vue_vue_type_style_index_0_id_9f63765e_scoped_true_lang_less__ = __webpack_require__(615);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__JdItemList_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__["staticRenderFns"],
  false,
  null,
  "9f63765e",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('9f63765e')) {
      api.createRecord('9f63765e', component.options)
    } else {
      api.reload('9f63765e', component.options)
    }
    module.hot.accept("./JdItemList.vue?vue&type=template&id=9f63765e&scoped=true", function () {
      api.rerender('9f63765e', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/JdItemList.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 587 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__ = __webpack_require__(588);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_template_id_9f63765e_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 588 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjg-jd-item-list" }, [_vm.status === "syncing" ? _c("div", { staticClass: "bjg-window-status gwd-row gwd-align" }, [_c("SpinLoading"), _vm._v(" "), _c("span", {
    staticStyle: {
      "font-size": "12px",
      color: "#ff9747",
      "margin-left": "6px"
    }
  }, [_vm._v("订单信息同步中")])], 1) : _vm._e(), _vm._v(" "), _vm.status === "complete" ? _c("div", { staticClass: "bjg-window-status gwd-row gwd-align" }, [_c("img", {
    staticStyle: { width: "25px", height: "10px" },
    attrs: { src: __webpack_require__(181), alt: "" }
  }), _vm._v(" "), _c("img", {
    staticStyle: {
      width: "12px",
      height: "11px",
      "margin-left": "6px"
    },
    attrs: { src: __webpack_require__(589), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "3px",
      "font-size": "12px",
      color: "#ff9747"
    }
  }, [_vm._v("价保监控中")]), _vm._v(" "), _c("img", {
    staticStyle: {
      width: "25px",
      height: "10px",
      "margin-left": "6px"
    },
    attrs: { src: __webpack_require__(181), alt: "" }
  })]) : _vm._e(), _vm._v(" "), _vm.status === "needLogin" ? _c("div", { staticClass: "bjg-window-status gwd-row gwd-align" }, [_c("img", {
    staticStyle: { width: "12px", height: "12px" },
    attrs: { src: __webpack_require__(590), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "10px",
      "font-size": "12px",
      color: "#ff6132"
    }
  }, [_vm._v("\n      您的京东账户未登录，新增订单可能无法价格保护，"), _c("span", {
    staticStyle: {
      "text-decoration": "underline",
      cursor: "pointer"
    },
    on: {
      click: function click($event) {
        return _vm.doLogin();
      }
    }
  }, [_vm._v("点击登录")])])]) : _vm._e(), _vm._v(" "), _c("div", {
    staticClass: "gwd-row bjg-section",
    staticStyle: { "margin-top": "14px" }
  }, [_c("SectionTitle", [_vm._v("价格保护中订单")]), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("button", {
    staticClass: "gwd-button bjg-sync",
    staticStyle: { "white-space": "nowrap" },
    on: {
      click: function click($event) {
        return _vm.syncNow();
      }
    }
  }, [_c("img", {
    staticStyle: {
      width: "10px",
      height: "10px",
      "vertical-align": "middle"
    },
    attrs: { src: __webpack_require__(591), alt: "" }
  }), _vm._v("\n      立即同步订单\n    ")])], 1), _vm._v(" "), _vm.protectingItems.length === 0 ? _c("div", { staticClass: "gwd-column gwd-align" }, [_c("img", {
    staticStyle: {
      width: "60px",
      height: "52px",
      "margin-top": "30px"
    },
    attrs: { src: __webpack_require__(592), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "font-size": "14px",
      color: "#333333",
      "margin-top": "21px"
    }
  }, [_vm._v("订单中的商品均超过价格保护周期")]), _vm._v(" "), _c("a", {
    staticStyle: {
      "font-size": "12px",
      color: "#ff9747",
      "text-decoration": "underline",
      "margin-top": "13px"
    },
    attrs: { href: "" },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.syncNow.apply(null, arguments);
      }
    }
  }, [_vm._v("刷新试试")]), _vm._v(" "), _c("img", {
    staticStyle: {
      "margin-top": "30px",
      width: "379px",
      height: "26px",
      "margin-bottom": "25px"
    },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/price-protect-help@2x.png",
      alt: "help"
    },
    on: {
      click: function click($event) {
        return _vm.goIntro();
      }
    }
  })]) : _vm._e(), _vm._v(" "), _vm._l(_vm.protectingItems, function (item, idx) {
    return _c("ProductItem", {
      key: idx,
      attrs: { line: idx > 0, product: item }
    });
  }), _vm._v(" "), _vm.outdatedItems.length ? _c("div", {
    staticClass: "gwd-row bjg-section gwd-align",
    staticStyle: { "margin-top": "6px" }
  }, [_c("SectionTitle", [_vm._v("无法价保订单")]), _vm._v(" "), _vm._m(0), _vm._v(" "), _c("GwdA", {
    staticStyle: { "font-size": "12px", color: "#333333" },
    attrs: {
      href: "https://pcsitepp-fm.jd.com/rest/pricepro/pricerule",
      target: "_blank"
    }
  }, [_vm._v("京东商城价保规则")]), _vm._v(" "), _c("img", {
    staticStyle: {
      width: "10px",
      height: "10px",
      "margin-top": "1px"
    },
    attrs: { src: __webpack_require__(593), alt: "" }
  })], 1) : _vm._e(), _vm._v(" "), _vm._l(_vm.outdatedItems, function (item, idx) {
    return _c("ProductItem", {
      key: "s" + idx,
      attrs: { line: idx > 0, product: item, outdated: true }
    });
  })], 2);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticStyle: { flex: "1", overflow: "hidden" } }, [_c("span", {
    staticStyle: {
      "font-size": "12px",
      color: "#8c847b",
      "transform-origin": "left center",
      "margin-left": "5px",
      transform: "scale(0.8333)",
      "white-space": "nowrap",
      display: "block"
    }
  }, [_vm._v("商品不支持价保、超过价保周期等")])]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 589 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMXB4IiB2aWV3Qm94PSIwIDAgMTIgMTEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5GaWxsIDI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEwMCUiIHkxPSI1MCUiIHgyPSIwJSIgeTI9IjUwJSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkY5NzQ3IiBvZmZzZXQ9IjAlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRjlGMjIiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLku7fkv53orqLljZXnm5HmjqfkuK0iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTM2LjAwMDAwMCwgLTM5NC4wMDAwMDApIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgMzUxLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IueKtuaAgSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDMyLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSLliIbnu4QtOCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTM0LjAwMDAwMCwgMTAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnIGlkPSJGaWxsLTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMxLjAwMDAwMCwgMS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMC45NTY1MzE3LDAgTDEuMDQzNDQ5MjMsMCBDMC40Njk1NjQ1NTQsMCAwLDAuNDYwNDY0MTU5IDAsMS4wMjMyMjY2NyBMMCw4LjE4NjAzNzgxIEMwLDguNzQ4ODAwMzIgMC40Njk1NjQ1NTQsOS4yMDkyODMxOSAxLjA0MzQ0OTIzLDkuMjA5MjgzMTkgTDUuNDc4MjY1ODUsOS4yMDkyODMxOSBMNS40NzgyNjU4NSw5Ljk3NjY5ODUxIEwzLjQxNzM2NjM0LDkuOTc2Njk4NTEgQzMuMTU2NDk5MjYsOS45NzY2OTg1MSAyLjkyMTcyNjUyLDEwLjE1NTc4MTQgMi44Njk1NzYsMTAuNDExNTkyOCBDMi44MTc0MDY0LDEwLjc0NDExMzggMy4wNzgyNzM0OCwxMSAzLjM5MTI5MTA4LDExIEw4LjU4MjYxNDU4LDExIEM4Ljg0MzQ4MTY2LDExIDkuMDc4MjczNDgsMTAuODIwOTE3MSA5LjEzMDQyNCwxMC41NjUxMDU4IEM5LjE4MjU3NDUzLDEwLjIzMjUwOTkgOC45MjE3MjY1Miw5Ljk3NjY5ODUxIDguNjA4Njg5ODUsOS45NzY2OTg1MSBMNi41MjE3MTUwOCw5Ljk3NjY5ODUxIEw2LjUyMTcxNTA4LDkuMjA5MjgzMTkgTDEwLjk1NjUzMTcsOS4yMDkyODMxOSBDMTEuNTMwNDE2NCw5LjIwOTI4MzE5IDEyLDguNzQ4ODAwMzIgMTIsOC4xODYwMzc4MSBMMTIsMS4wMjMyMjY2NyBDMTIsMC40NjA0NjQxNTkgMTEuNTMwNDE2NCwwIDEwLjk1NjUzMTcsMCBaIE05LjM5MTI5MTA4LDUuMTE2MjgyOTggTDcuNjY5NTYwNzQsNS4xMTYyODI5OCBMNy4wNjk1MjQ1LDYuODU1Nzg1MTYgQzcuMDE3MzczOTcsNy4wMDkyOTgxNSA2LjgwODY1NzQyLDcuMDM0ODY4MDYgNi43MDQzNTYzNyw2LjkwNjk0MzY4IEw0LjgyNjA3OTA4LDQuMzQ4NzkyODQgTDQuNTkxMjg3MjYsNC45MzcyMDAwOCBDNC41NjUyMTIsNS4wMzk0OTg0MyA0LjQ2MDg5MTg3LDUuMDkwNjM4MjUgNC4zNTY1MTQ1Miw1LjA5MDYzODI1IEwyLjM3MzkxNzExLDUuMDkwNjM4MjUgQzIuMTEzMDUwMDMsNS4wOTA2MzgyNSAxLjg3ODI3NzI5LDQuOTExNjMwMTcgMS44MjYxMDc2OSw0LjY1NTc0NDAxIEMxLjc3Mzk1NzE2LDQuMzIzMjIyOTMgMi4wMzQ4MjQyNCw0LjA2NzQxMTU4IDIuMzQ3ODQxODQsNC4wNjc0MTE1OCBMMy44MDg3MDUxMSw0LjA2NzQxMTU4IEw0LjQwODc0MTM1LDIuNTgzNzIwNzYgQzQuNDYwODkxODcsMi40MzAyMDc3NiA0LjY2OTYwODQzLDIuNDA0NjE5MTUgNC43NzM5MDk0OCwyLjUzMjQ4NzQxIEw2LjYwMDAzNjI0LDQuOTg4MzM5OSBMNi44NjA5MDMzMiw0LjIyMDkyNDU4IEM2Ljg4Njk3ODU4LDQuMTE4NTUxNDEgNi45OTEyOTg3MSw0LjA0MTg0MTY3IDcuMDk1Njc2MDYsNC4wNDE4NDE2NyBMOS4zMzkxMjE0OCw0LjA0MTg0MTY3IEM5LjU5OTk4ODU2LDQuMDQxODQxNjcgOS44MzQ3ODAzNyw0LjIyMDkyNDU4IDkuODg2OTMwOSw0LjQ3NjczNTkyIEM5Ljk2NTI1MjA2LDQuODYwMzk2ODIgOS43MzA0NjAyNCw1LjExNjI4Mjk4IDkuMzkxMjkxMDgsNS4xMTYyODI5OCBaIiBpZD0iRmlsbC0xIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="

/***/ }),
/* 590 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5GaWxsIDI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iMTLmnIgiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLku7vliqHml7bkuqzkuJzmnKrnmbvlvZUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDIzLjAwMDAwMCwgLTM5Ni4wMDAwMDApIiBmaWxsPSIjRkY2MTMyIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgMzUzLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOiuouWNleWIl+ihqCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDI5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSLnirbmgIEiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5YiG57uELTgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUyLjAwMDAwMCwgMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxnIGlkPSJGaWxsLTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCAxNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNS45OTk5NjY1LDAgQzIuNjg2NDMzNjgsMCAwLDIuNjg2NDMzNjggMCw1Ljk5OTk2NjUgQzAsOS4zMTM0OTkzMyAyLjY4NjQzMzY4LDEyIDUuOTk5OTY2NSwxMiBDOS4zMTM0OTkzMywxMiAxMiw5LjMxMzQ5OTMzIDEyLDUuOTk5OTY2NSBDMTIsMi42ODY0MzM2OCA5LjMxMzQ5OTMzLDAgNS45OTk5NjY1LDAgWiBNNS45OTk5NjY1LDkuMjEzMDA4MDQgQzUuNjE0MDk2NjksOS4yMTMwMDgwNCA1LjMwMDU4MDYyLDguODk5NDkxOTYgNS4zMDA1ODA2Miw4LjUxNDkyODU0IEM1LjMwMDU4MDYyLDguMTI5MDU4NzMgNS42MTQwOTY2OSw3LjgxNjg2NTc5IDUuOTk5OTY2NSw3LjgxNjg2NTc5IEM2LjM4NTkwMzMxLDcuODE2ODY1NzkgNi42OTk0MTkzOCw4LjEyOTA1ODczIDYuNjk5NDE5MzgsOC41MTQ5Mjg1NCBDNi42OTk0MTkzOCw4Ljg5OTQ5MTk2IDYuMzg1OTAzMzEsOS4yMTMwMDgwNCA1Ljk5OTk2NjUsOS4yMTMwMDgwNCBaIE02LjY5OTQxOTM4LDYuMTg3NjAwNDkgQzYuNjk5NDE5MzgsNi41NzM0NzAzIDYuMzg1OTAzMzEsNi44ODU2Nzk5OSA1Ljk5OTk2NjUsNi44ODU2Nzk5OSBDNS42MTQwOTY2OSw2Ljg4NTY3OTk5IDUuMzAwNTgwNjIsNi41NzM0NzAzIDUuMzAwNTgwNjIsNi4xODc2MDA0OSBMNS4zMDA1ODA2MiwyLjkzMTY0OTE3IEM1LjMwMDU4MDYyLDIuNTQ1Nzc5MzcgNS42MTQwOTY2OSwyLjIzMzU2OTY3IDUuOTk5OTY2NSwyLjIzMzU2OTY3IEM2LjM4NTkwMzMxLDIuMjMzNTY5NjcgNi42OTk0MTkzOCwyLjU0NTc3OTM3IDYuNjk5NDE5MzgsMi45MzE2NDkxNyBMNi42OTk0MTkzOCw2LjE4NzYwMDQ5IFoiIGlkPSJGaWxsLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 591 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABIFBMVEUAAAD///9mZmZ/f39tbW10dHRqamptbW1xY2NmZmZsYmJkZGRqamFoaGBpYWFmZl9nZ2BmZmBoY2NmZmBpZF5nYmJlZWBoY15kZF9lZWBoY15mYWFkZGBnYl5kZGFlYV5nZGBkYV5nZF5kYV9kYl9lYmBnYV9lYl1mY15kYl9lYl5kYl1lYl5lY15lY19lYV1mYl5mYl5lYV5kYl9mYl9lYl5kY11lYl9lYl5lYV5kYl5lYl1lYl1lYl1kYV5kYV5lYl1lYl5lYl5kYl5lYV1lYl5kYV1lYl5kYl5kYl5lYV1lYV1lYV5lYl1kYl5lYV5lYV5lYV5kYV5lYl1kYV5kYl5lYl1kYl5lYl1kYV1lYl5kYV5kYV1kYV1kYV1kYV34OLc1AAAAX3RSTlMAAQUGBwsMDhIZGhwdICIjJSgsLS4vMDEzNTY3ODlCREVUV1leYGFlZ2ttcHJ3fH6FiouMj5WWl5qdnp+hpKWor7O7vL2+v8PEycrNz9XW19rf4ubn7e7y8/T19/n8/i3hh5gAAADKSURBVBgZBcGHIoIBGADAQ2QnK9kze++Rkb1Dv0h87/8W7gBjx+Xa58PhMACy5/F9f3Rw8xV3GYB8tbreAumVz2QC6E3eOgF6XmvZviUay5UMAO3J09U781EAYPy6FLHJ7UcTALmXiMiyNQ0ARg/2AAAAAADAyAAA0JajuRqPiykAlJ4pRCSxAEAudrit/Fz2pwA0XNS7eV5ejA0A9mIVKMZZK9BxGtuAhrW/2v7U4NDs7k99A4DcST0i4rfYBQDS+Zm5yTQAAAD8A4enIE0LhXprAAAAAElFTkSuQmCC"

/***/ }),
/* 592 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 593 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAAM1BMVEUAAAD///87OztAQEA4ODg3Nzc1NTUzMzM0NDQzMzMzMzMzMzM0NDQ0NDQzMzMzMzMzMzN961DRAAAAEHRSTlMAAQ0QIDNNaGtujLTFz+D5GivsxAAAADNJREFUGNNjYMADmDkxxRh5BLgwRdn4B16UXUCAA12MhU+Ah2kAxBh5McUYGFi5mRjIAABp2wLbZNBU7AAAAABJRU5ErkJggg=="

/***/ }),
/* 594 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__ = __webpack_require__(595);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SpinLoading_vue_vue_type_script_lang_js__ = __webpack_require__(184);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__SpinLoading_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__SpinLoading_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SpinLoading_vue_vue_type_style_index_0_id_23093fe4_scoped_true_lang_less__ = __webpack_require__(597);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__SpinLoading_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__["staticRenderFns"],
  false,
  null,
  "23093fe4",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('23093fe4')) {
      api.createRecord('23093fe4', component.options)
    } else {
      api.reload('23093fe4', component.options)
    }
    module.hot.accept("./SpinLoading.vue?vue&type=template&id=23093fe4&scoped=true", function () {
      api.rerender('23093fe4', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/SpinLoading.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 595 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__ = __webpack_require__(596);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_template_id_23093fe4_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 596 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _vm._m(0);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", [_c("div", { staticClass: "ant-spin ant-spin-spinning ant-spin-sm" }, [_c("span", { staticClass: "ant-spin-dot ant-spin-dot-spin" }, [_c("i", { staticClass: "ant-spin-dot-item" }), _vm._v(" "), _c("i", { staticClass: "ant-spin-dot-item" }), _vm._v(" "), _c("i", { staticClass: "ant-spin-dot-item" }), _vm._v(" "), _c("i", { staticClass: "ant-spin-dot-item" })])])]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 597 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_style_index_0_id_23093fe4_scoped_true_lang_less__ = __webpack_require__(598);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_style_index_0_id_23093fe4_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SpinLoading_vue_vue_type_style_index_0_id_23093fe4_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 598 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(599);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("9c68243e", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SpinLoading.vue?vue&type=style&index=0&id=23093fe4&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SpinLoading.vue?vue&type=style&index=0&id=23093fe4&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 599 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".ant-spin[data-v-23093fe4] {\n  -webkit-box-sizing: border-box;\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0;\n  color: rgba(0, 0, 0, 0.85);\n  font-size: 14px;\n  font-variant: tabular-nums;\n  height: 14px;\n  list-style: none;\n  -webkit-font-feature-settings: \"tnum\";\n  font-feature-settings: \"tnum\";\n  color: #ff9747;\n  text-align: center;\n  vertical-align: middle;\n  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n  transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n  transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n  transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86), -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n  position: static;\n  display: inline-block;\n  opacity: 1;\n}\n.ant-spin-dot-spin[data-v-23093fe4] {\n  -webkit-transform: rotate(45deg);\n  transform: rotate(45deg);\n  -webkit-animation: antRotate-23093fe4 1.2s linear infinite;\n  animation: antRotate-23093fe4 1.2s linear infinite;\n}\n.ant-spin-dot[data-v-23093fe4] {\n  position: relative;\n  display: inline-block;\n  font-size: 20px;\n  width: 1em;\n  height: 1em;\n}\n.ant-spin-dot-item[data-v-23093fe4] {\n  position: absolute;\n  display: block;\n  width: 9px;\n  height: 9px;\n  background-color: #ff9747;\n  border-radius: 100%;\n  -webkit-transform: scale(0.75);\n  transform: scale(0.75);\n  -webkit-transform-origin: 50% 50%;\n  transform-origin: 50% 50%;\n  opacity: 0.3;\n  -webkit-animation: antSpinMove-23093fe4 1s linear infinite alternate;\n  animation: antSpinMove-23093fe4 1s linear infinite alternate;\n}\n.ant-spin-dot-item[data-v-23093fe4]:first-child {\n  top: 0;\n  left: 0;\n}\n.ant-spin-dot-item[data-v-23093fe4]:nth-child(2) {\n  top: 0;\n  right: 0;\n  -webkit-animation-delay: 0.4s;\n  animation-delay: 0.4s;\n}\n.ant-spin-dot-item[data-v-23093fe4]:nth-child(3) {\n  right: 0;\n  bottom: 0;\n  -webkit-animation-delay: 0.8s;\n  animation-delay: 0.8s;\n}\n.ant-spin-dot-item[data-v-23093fe4]:nth-child(4) {\n  bottom: 0;\n  left: 0;\n  -webkit-animation-delay: 1.2s;\n  animation-delay: 1.2s;\n}\n.ant-spin-sm .ant-spin-dot[data-v-23093fe4] {\n  font-size: 14px;\n}\n.ant-spin-sm .ant-spin-dot i[data-v-23093fe4] {\n  width: 6px;\n  height: 6px;\n}\n@-webkit-keyframes antSpinMove-23093fe4 {\nto {\n    opacity: 1;\n}\n}\n@keyframes antSpinMove-23093fe4 {\nto {\n    opacity: 1;\n}\n}\n@-webkit-keyframes antRotate-23093fe4 {\nto {\n    -webkit-transform: rotate(405deg);\n    transform: rotate(405deg);\n}\n}\n@keyframes antRotate-23093fe4 {\nto {\n    -webkit-transform: rotate(405deg);\n    transform: rotate(405deg);\n}\n}\n", ""]);

// exports


/***/ }),
/* 600 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__ = __webpack_require__(601);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SectionTitle_vue_vue_type_script_lang_js__ = __webpack_require__(186);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__SectionTitle_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__SectionTitle_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SectionTitle_vue_vue_type_style_index_0_id_0e0fcbce_scoped_true_lang_less__ = __webpack_require__(603);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__SectionTitle_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__["staticRenderFns"],
  false,
  null,
  "0e0fcbce",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('0e0fcbce')) {
      api.createRecord('0e0fcbce', component.options)
    } else {
      api.reload('0e0fcbce', component.options)
    }
    module.hot.accept("./SectionTitle.vue?vue&type=template&id=0e0fcbce&scoped=true", function () {
      api.rerender('0e0fcbce', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/SectionTitle.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 601 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__ = __webpack_require__(602);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_template_id_0e0fcbce_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 602 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "bjgou-section-title gwd-row gwd-align" }, [_c("div", { staticClass: "bjgou-hinter" }), _vm._v(" "), _c("span", [_vm._t("default")], 2)]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 603 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_style_index_0_id_0e0fcbce_scoped_true_lang_less__ = __webpack_require__(604);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_style_index_0_id_0e0fcbce_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SectionTitle_vue_vue_type_style_index_0_id_0e0fcbce_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 604 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(605);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("5b9b2237", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SectionTitle.vue?vue&type=style&index=0&id=0e0fcbce&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SectionTitle.vue?vue&type=style&index=0&id=0e0fcbce&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 605 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjgou-section-title[data-v-0e0fcbce] {\n  display: inline-flex !important;\n}\n.bjgou-section-title .bjgou-hinter[data-v-0e0fcbce] {\n  width: 3px;\n  height: 12px;\n  background: linear-gradient(180deg, #FFD848 0%, #F5B736 100%);\n}\n.bjgou-section-title span[data-v-0e0fcbce] {\n  font-weight: bold;\n  font-size: 12px;\n  color: #333333;\n  margin-left: 8px;\n}\n", ""]);

// exports


/***/ }),
/* 606 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_6894d428_scoped_true__ = __webpack_require__(607);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__ = __webpack_require__(188);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ProductItem_vue_vue_type_style_index_0_id_6894d428_scoped_true_lang_less__ = __webpack_require__(609);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_6894d428_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_6894d428_scoped_true__["staticRenderFns"],
  false,
  null,
  "6894d428",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('6894d428')) {
      api.createRecord('6894d428', component.options)
    } else {
      api.reload('6894d428', component.options)
    }
    module.hot.accept("./ProductItem.vue?vue&type=template&id=6894d428&scoped=true", function () {
      api.rerender('6894d428', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/ProductItem.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 607 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__ = __webpack_require__(608);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_6894d428_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 608 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-column gwd-align bjg-item",
    style: _vm.line ? "border-top: 1px solid #f1f1f1" : ""
  }, [_c("div", { staticClass: "gwd-row bjg-dp-item", on: { click: _vm.goLink } }, [_c("img", {
    "class": _vm.outdated ? "bjg-op" : "",
    staticStyle: {
      width: "100px",
      height: "100px",
      "margin-right": "10px",
      "margin-left": "14px"
    },
    attrs: {
      src: _vm.product.img,
      onerror: "this.src='https://cdn.bijiago.com/images/extensions/default_load_image.png'",
      alt: ""
    }
  }), _vm._v(" "), _c("div", { staticClass: "gwd-column", staticStyle: { flex: "1" } }, [_c("span", {
    staticClass: "title",
    style: _vm.outdated ? "color: #8c847b" : ""
  }, [_vm._v(_vm._s(_vm.product.title))]), _vm._v(" "), _vm.product.inTime ? _c("div", { staticStyle: { "margin-top": "16px" } }, [_c("span", { staticClass: "bjg-price-text" }, [_vm._v("订单价: " + _vm._s((_vm.product.price / 100).toFixed(2)))])]) : _vm._e(), _vm._v(" "), _c("div", { staticStyle: { flex: "1" } }), _vm._v(" "), _c("div", { staticClass: "gwd-row" }, [_vm.product.inTime ? _c("span", {
    staticClass: "bjg-price-text",
    staticStyle: { flex: "1" }
  }, [_vm._v("现   价: " + _vm._s((_vm.product.currentPrice ? _vm.product.currentPrice / 100 : _vm.product.price / 100).toFixed(2)))]) : _vm._e(), _vm._v(" "), !_vm.product.inTime ? _c("span", {
    staticClass: "bjg-price-text",
    staticStyle: { flex: "1" }
  }, [_vm._v("订单价: " + _vm._s((_vm.product.price / 100).toFixed(2)))]) : _vm._e(), _vm._v(" "), _c("span", { staticClass: "bjg-price-text", staticStyle: { flex: "1" } }, [_vm._v("下单时间: " + _vm._s(_vm.product.ctime.substr(0, 10).replace(/-/g, ".")))])])])]), _vm._v(" "), _vm.product.errorText ? _c("div", { staticStyle: { width: "372px" } }, [_c("span", {
    staticStyle: {
      "font-size": "12px",
      color: "#333333",
      transform: "scale(0.9166)",
      "transform-origin": "top left",
      display: "block",
      "margin-top": "12px"
    }
  }, [_vm._v(_vm._s(_vm.product.errorText))])]) : _vm._e(), _vm._v(" "), _vm.product.currentPrice < _vm.product.price && !_vm.outdated ? _c("div", { staticClass: "bjg-tip" }, [_c("span", { staticStyle: { position: "relative", top: "4px" } }, [_vm._v("可申请价格保护，预估：" + _vm._s(((_vm.product.price - _vm.product.currentPrice) / 100).toFixed(2)) + "元/件 >")])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 609 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_6894d428_scoped_true_lang_less__ = __webpack_require__(610);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_6894d428_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_6894d428_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 610 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(611);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("5cfc2aaa", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductItem.vue?vue&type=style&index=0&id=6894d428&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductItem.vue?vue&type=style&index=0&id=6894d428&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 611 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-op[data-v-6894d428] {\n  filter: opacity(0.5);\n}\n.bjg-item[data-v-6894d428] {\n  padding-top: 14px;\n  padding-bottom: 14px;\n}\n.bjg-tip[data-v-6894d428] {\n  width: 372px;\n  height: 24px;\n  background: url(" + __webpack_require__(612) + ");\n  text-align: center;\n  margin-top: 6px;\n}\n.bjg-tip span[data-v-6894d428] {\n  font-size: 12px;\n  color: #ffffff;\n  margin-top: 5px;\n}\n.bjg-dp-item[data-v-6894d428] {\n  height: 100px;\n  margin-right: 10px;\n}\n.bjg-dp-item .title[data-v-6894d428] {\n  width: 259px;\n  height: 40px;\n  font-size: 13px;\n  color: #333333;\n  line-height: 20px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: block;\n}\n.bjg-dp-item .bjg-price-text[data-v-6894d428] {\n  font-size: 12px;\n  color: #8c847b;\n}\n", ""]);

// exports


/***/ }),
/* 612 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMzcycHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDM3MiAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTIuMSAoNjcwNDgpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPHRpdGxlPuefqeW9oiAyPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSIxMDAlIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJsaW5lYXJHcmFkaWVudC0xIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTc0NyIgb2Zmc2V0PSIwJSI+PC9zdG9wPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkY5RjIyIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IjEy5pyIIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i6K6i5Y2V5L+h5oGv5ZCM5q2l5LitIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTg1LjAwMDAwMCwgLTU3OS4wMDAwMDApIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj4KICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOa1rueqlyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOTcxLjAwMDAwMCwgMzUzLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IuS7t+agvOS/neaKpOiuouWNleWIl+ihqCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIGlkPSLotoXov4fku7fkv53mnJ/llYblk4EiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCA0Mi4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IuWVhuWTgSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTQuMDAwMDAwLCAwLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IuaIkOWKnyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDEwNi4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i55+p5b2iLTIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAsNCBMMzcuNzc0MTE4Miw0IEw0NC41NjkwMDc5LDcuNDYwNjk4NzNlLTE0IEw1MS40OTM2MDc5LDQgTDM2Miw0IEMzNjcuNTIyODQ3LDQgMzcyLDguNDc3MTUyNSAzNzIsMTQgTDM3MiwxNCBDMzcyLDE5LjUyMjg0NzUgMzY3LjUyMjg0NywyNCAzNjIsMjQgTDEwLDI0IEM0LjQ3NzE1MjUsMjQgNy4xMTIxOTA5ZS0xMywxOS41MjI4NDc1IDcuMTA1NDI3MzZlLTEzLDE0IEw3LjEwNTQyNzM2ZS0xMywxNCBDNy4wOTg2NjM4MmUtMTMsOC40NzcxNTI1IDQuNDc3MTUyNSw0IDEwLDQgWiIgaWQ9IuefqeW9oiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"

/***/ }),
/* 613 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__ = __webpack_require__(614);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_GwdA_vue_vue_type_template_id_15561ebb__["staticRenderFns"]; });


/***/ }),
/* 614 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    attrs: { href: _vm.href, target: _vm.target },
    on: { click: _vm.onClick }
  }, [_vm._t("default")], 2);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 615 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_style_index_0_id_9f63765e_scoped_true_lang_less__ = __webpack_require__(616);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_style_index_0_id_9f63765e_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdItemList_vue_vue_type_style_index_0_id_9f63765e_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 616 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(617);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1ca13dc4", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JdItemList.vue?vue&type=style&index=0&id=9f63765e&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JdItemList.vue?vue&type=style&index=0&id=9f63765e&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 617 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-sync[data-v-9f63765e] {\n  width: 102px;\n  height: 22px;\n  border-radius: 11px;\n  border: 1px solid #DDDDDD;\n  font-size: 12px;\n  color: #64615d;\n  text-align: center;\n  background: white;\n  box-sizing: border-box !important;\n}\n.bjg-jd-item-list[data-v-9f63765e] {\n  overflow-y: auto;\n  max-height: 414px;\n}\n.bjg-jd-item-list .bjg-window-status[data-v-9f63765e] {\n  height: 32px;\n  background: #fff6ef;\n  justify-content: center;\n}\n.bjg-jd-item-list .bjg-section[data-v-9f63765e] {\n  padding-left: 14px;\n  padding-right: 14px;\n}\n", ""]);

// exports


/***/ }),
/* 618 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_style_index_0_id_074e6fb7_scoped_true_lang_less__ = __webpack_require__(619);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_style_index_0_id_074e6fb7_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectBar_vue_vue_type_style_index_0_id_074e6fb7_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 619 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(620);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("673a7414", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectBar.vue?vue&type=style&index=0&id=074e6fb7&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectBar.vue?vue&type=style&index=0&id=074e6fb7&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 620 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-hide[data-v-074e6fb7] {\n  width: 0!important;\n  overflow: hidden;\n  border-left: none;\n}\n.bjg-notify[data-v-074e6fb7] {\n  background: url(" + __webpack_require__(621) + ");\n  background-size: contain;\n  text-align: center;\n  font-size: 12px;\n  color: white;\n}\n.bjg-alert[data-v-074e6fb7] {\n  background: url(" + __webpack_require__(622) + ");\n  background-size: contain;\n}\n.bjg-pp-disabled span[data-v-074e6fb7] {\n  font-size: 12px;\n  color: #8c847b;\n  line-height: 20px;\n}\n.bjg-pp-disabled .gwd-button[data-v-074e6fb7] {\n  width: 340px;\n  height: 30px;\n  border-radius: 15px;\n  text-align: center;\n  font-size: 14px;\n  font-weight: bold;\n  color: white;\n  background: linear-gradient(270deg, #FFCD47 0%, #FF9F22 100%);\n}\n.bjg-setting[data-v-074e6fb7] {\n  width: 92px;\n  height: 52px;\n  background: white;\n  position: absolute;\n  border: 1px solid #f1f1f1;\n  bottom: 41px;\n  right: 0;\n}\n.bjg-bar-button[data-v-074e6fb7] {\n  width: 114px;\n  height: 100%;\n  position: relative;\n  display: flex;\n  align-content: center;\n  align-items: center;\n  border-left: 1px solid #f1f1f1;\n  border-right: 1px solid #f1f1f1;\n  font-size: 0;\n}\n", ""]);

// exports


/***/ }),
/* 621 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABiVBMVEUAAAD/f1X/bUn/kkn/km3/YDX/akD/dUr/f1X/YDP/cUT/f1P/XTL/YTL/aDn/d0v/ek//fk//XjH/bD//dEf/fE7/flD/XjL/YjP/Zzj/eEr/ekv/e0//XTH/aTv/dEf/ek7/fE7/XzD/YDT/ZDj/eEn/eEv/e0z/XjH/bUD/ckT/e07/fE7/XjH/YjX/ZDb/eEr/eUv/ekz/XTD/bkD/b0L/fU//fVD/XTH/XjL/aTv/dEj/e0z/fU7/Yzb/XzL/Yzb/d0j/ekz/ek3/XTD/az7/dEb/e03/fE//XTD/XjH/XzL/YDL/YDP/YTP/YTT/YjX/YzX/Yzb/ZDb/ZDf/ZTf/ZTj/Zjj/Zjn/Zzn/Zzr/aDr/aDv/aTv/aTz/ajz/aj3/az3/az7/bD7/bD//bT//bUD/bkD/bkH/b0H/b0L/cEL/cEP/cUP/cUT/ckT/ckX/c0X/c0b/dEb/dEf/dUf/dUj/dkj/dkn/d0n/d0r/eEr/eEv/eUv/eUz/ekz/ek3/e03/fE5xbRirAAAASXRSTlMABgcHBxgYGBgtLS5HR0dHR0eCgoKCgpWVlZWVlZaWlpaWv7+/v7+/x8fHx8fZ2dnZ2dnj4+Pj4/Hx8fHx8fLz8/Pz8/T09PT0VLbY2wAAAcdJREFUGBkFwbFrnXUYQOHzJT9K8CIaHRppEAcddciguDl0c9HF2X/UsWsmcQsFqRAKNqHkIuV+7zk+zwYAANunh8Phsoen4/F9AABsAAAXX1y/FMvw1Zv7DwDABgDrs5sfSVRM+vP2YQDYALj4+reYMCbM8o+7DwDnAIdvf80oLU2yr/bHE3AOXHz3M7NpSWJMg1f7vwPnsL75BbGkpLSQnj+9i3P4/HcyMSNNMpMXf//HGRc3OKVZU4ETit0844yrHybGGpvUfcLJfXp+xdl2XSNmWBM1ZkZcb2ef/NQwY9NMQ3syUza7X368DomRRbhZElqgh3UopiRFRkSrFDmsj7KKLEo3q0igDutyEjMGUQa3wRjEy/W9Q0kVO9QwSAk7rpFShhRLQFGUHpeoW2G0YagUAnBcVUyJMlCEJYYcl4ZhQRkTkgUxxyXCbKI0G24DO5IwD0+rUIYBYSQUKYQ3LUWSGAZQxBDrdM+SUBKGBglDIW5PLFGYRBHFYIp4/QgrwhJFMUKKeHsnrGQYRBQpZhuCt3+dgKUFoCSSFMDruxPAkhgTFElEON0+CsASJcgklOLhn/sTALAqN1Ek9Ond8Xg8BgDA/3xdV7u9vgykAAAAAElFTkSuQmCC"

/***/ }),
/* 622 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACBFBMVEUAAAD/f1X/bUn/kkn/km3/YDX/akD/dUr/f1X/YDP/cUT/f1P/XTL/YTL/aDn/d0v/ek//fk//XjH/bD//dEf/fE7/flD/XjL/YjP/Zzj/eEr/ekv/e0//XTH/aTv/dEf/ek7/fE7/XzD/YDT/ZDj/eEn/eEv/e0z/XjH/bUD/ckT/e07/fE7/XjH/YjX/ZDb/eEr/eUv/ekz/XTD/bkD/b0L/fU//fVD/XTH/XjL/aTv/dEj/e0z/fU7/Yzb/XzL/Yzb/d0j/ekz/ek3/XTD/az7/dEb/e03/fE//XTD/XjH/XzL/YDL/YDP/YTP/YTT/YjX/YzX/Yzb/ZDb/ZDf/ZTf/ZTj/Zjj/Zjn/Zzn/Zzr/aDr/aDv/aTv/aTz/ajz/aj3/az3/az7/bD7/bD//bT//bUD/bkD/bkH/b0H/b0L/cEL/cEP/cET/cUP/cUT/cUX/cUb/cUf/ckT/ckX/c0X/c0b/dEb/dEf/dEr/dUf/dUj/dUv/dkj/dkn/d0n/d0r/d07/eEr/eEv/eUv/eUz/eVH/ekz/ek3/e03/fE7/flX/f1j/gFb/glv/hWL/hl7/h2P/iWb/j2z/km//l3f/mXr/noD/oYP/por/qI3/qY//qZD/rpP/sZj/tZ3/t6H/vaf/vaj/v6v/wa//xLH/xrT/0cP/1cn/39b/4tr///9U9MhsAAAASXRSTlMABgcHBxgYGBgtLS5HR0dHR0eCgoKCgpWVlZWVlZaWlpaWv7+/v7+/x8fHx8fZ2dnZ2dnj4+Pj4/Hx8fHx8fLz8/Pz8/T09PT0VLbY2wAAAfhJREFUGBkFwTGPVWUUQNH9hisSHwbGBkyIWmipxdhYGBMrGzsbLfSXWtjZEW3sCA3GyQQYovMS4H5nb9c6AADA4f7xeDzv+uZ0+jcAAA4AAHc+fPS9TE3Mb88u3wAABwDYPrj4lgZHpqE/Hl8PAAcA7nz6S6xQRiZr//XJG4BbAMfPf8qqMcek3U/Wqx24Bdz54gfWYVRxMN668OF6MXALts9+xCbF87t3373ZR5Ee3LyMDc5/rmmw8eFt9mdDJvLV1QvOuHPBrNLGFgw4odjFbc54+M2KNbVPI8w+4eSaHjzk7PCo1qATJlhjZsSjw9m971rMmlbzdi1YyUzZLD96fzs2KFqEoBJaoMftaCyT9kFB0SpFjtt7TRbtRYJWkUAdt/PVYHssRBAPgzGI59vXs6gdK9YOazFICQu3XWofhpQTvAYURenVJu5zVhgdnsNzlUIATlsVq0SZ//6cK8ISQ06buxgW1PnHh9f/IFkQczrbUUZz6Vzcv/elsrTG5vpmM5RhQHgHNhQphGedOUpa0/LSrhTLzLeXbBJKwtDvSBgK8XhnE4VJFFEMpoinr2CLsERRjJAirp4IWzIMIooUcxiCq792YNMCUBJJCuDpkx1gkxgTFElE2B+/EoBNlCCTUIrrvy93AGCrPIgioTcvT6fTKQAA/gd+AFhaPtMhBAAAAABJRU5ErkJggg=="

/***/ }),
/* 623 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__ = __webpack_require__(624);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PriceProtectPageButton_vue_vue_type_script_lang_js__ = __webpack_require__(193);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PriceProtectPageButton_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PriceProtectPageButton_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PriceProtectPageButton_vue_vue_type_style_index_0_id_41b15ea6_lang_css__ = __webpack_require__(627);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PriceProtectPageButton_vue_vue_type_style_index_1_id_41b15ea6_scoped_true_lang_less__ = __webpack_require__(630);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);







/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_4__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PriceProtectPageButton_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__["staticRenderFns"],
  false,
  null,
  "41b15ea6",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('41b15ea6')) {
      api.createRecord('41b15ea6', component.options)
    } else {
      api.reload('41b15ea6', component.options)
    }
    module.hot.accept("./PriceProtectPageButton.vue?vue&type=template&id=41b15ea6&scoped=true", function () {
      api.rerender('41b15ea6', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/PriceProtectPageButton.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 624 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__ = __webpack_require__(625);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_template_id_41b15ea6_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 625 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.ready && (!_vm.user || !_vm.enabled),
      expression: "ready && (!user || !enabled)"
    }],
    staticClass: "bjg-page-protect-button",
    on: { mouseover: _vm.over }
  }, [_c("img", {
    staticStyle: { width: "186px", height: "46px" },
    attrs: {
      src: __webpack_require__(626),
      alt: ""
    }
  }), _vm._v(" "), _c("div", { staticClass: "bjg-box" }, [_c("PriceProtectAuthLoginRequest", {
    attrs: { center: true, login: _vm.user },
    on: {
      userAgreed: function userAgreed($event) {
        return _vm.setEnable();
      }
    }
  })], 1)]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 626 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 627 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_0_id_41b15ea6_lang_css__ = __webpack_require__(628);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_0_id_41b15ea6_lang_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_0_id_41b15ea6_lang_css__);
/* unused harmony reexport namespace */


/***/ }),
/* 628 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(629);
if(typeof content === 'string') content = [[module.i, content, '']];
// add the styles to the DOM
var update = __webpack_require__(37)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectPageButton.vue?vue&type=style&index=0&id=41b15ea6&lang=css", function() {
			var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectPageButton.vue?vue&type=style&index=0&id=41b15ea6&lang=css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}

/***/ }),
/* 629 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "\n.bjgext-item-dp {\n  display: none;\n}\n", ""]);

// exports


/***/ }),
/* 630 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_1_id_41b15ea6_scoped_true_lang_less__ = __webpack_require__(631);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_1_id_41b15ea6_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PriceProtectPageButton_vue_vue_type_style_index_1_id_41b15ea6_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 631 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(632);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("532d51c6", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectPageButton.vue?vue&type=style&index=1&id=41b15ea6&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceProtectPageButton.vue?vue&type=style&index=1&id=41b15ea6&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 632 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-page-protect-button[data-v-41b15ea6] {\n  position: absolute;\n  top: 0;\n  left: 310px;\n}\n.bjg-page-protect-button .bjg-box[data-v-41b15ea6] {\n  z-index: 99;\n  display: none;\n  background: white;\n  border: 1px solid #f1f1f1;\n  box-shadow: 0px 2px 4px rgba(176, 176, 176, 0.5);\n  left: -65px;\n  position: relative;\n  padding: 5px;\n}\n.bjg-page-protect-button:hover .bjg-box[data-v-41b15ea6] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 633 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__ = __webpack_require__(634);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HistoryBar_vue_vue_type_script_lang_js__ = __webpack_require__(195);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__HistoryBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__HistoryBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HistoryBar_vue_vue_type_style_index_0_id_5d29fc05_scoped_true_lang_less__ = __webpack_require__(638);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__HistoryBar_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__["staticRenderFns"],
  false,
  null,
  "5d29fc05",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('5d29fc05')) {
      api.createRecord('5d29fc05', component.options)
    } else {
      api.reload('5d29fc05', component.options)
    }
    module.hot.accept("./HistoryBar.vue?vue&type=template&id=5d29fc05&scoped=true", function () {
      api.rerender('5d29fc05', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/HistoryBar.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 634 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__ = __webpack_require__(635);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_template_id_5d29fc05_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 635 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "bjg-bar-button gwd-row gwd-align gwd-jcc",
    on: { mouseover: _vm.startLoad }
  }, [_c("img", {
    staticStyle: { width: "19px", height: "23px" },
    attrs: { src: __webpack_require__(636), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "7px",
      "font-size": "14px",
      color: "#64615d"
    }
  }, [_vm._v(_vm._s(_vm.transText("浏览历史")))]), _vm._v(" "), _c("BjgBottomWindow", { style: _vm.positionStyle + "px", attrs: { "always-show": "1" } }, [_c("div", { staticStyle: { height: "470px", "overflow-y": "auto" } }, [_vm._l(_vm.list, function (item, idx) {
    return _c("CollectionItem", {
      key: item.dp_id,
      attrs: { product: item, last: idx === _vm.list.length - 1 },
      on: { "delete": _vm.deleteItem }
    });
  }), _vm._v(" "), _vm.list.length ? _c("div", {
    staticClass: "gwd-row gwd-align gwd-jcc",
    staticStyle: { "margin-bottom": "19px" }
  }, [_c("img", {
    staticStyle: {
      width: "12px",
      height: "13px",
      cursor: "pointer"
    },
    attrs: {
      src: __webpack_require__(637),
      alt: ""
    },
    on: { click: _vm.clearAll }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "8px",
      "font-size": "12px",
      cursor: "pointer",
      color: "#999"
    },
    on: { click: _vm.clearAll }
  }, [_vm._v(_vm._s(_vm.transText("清空历史")))])]) : _vm._e(), _vm._v(" "), _vm.list.length === 0 && _vm.loaded ? _c("div", {
    staticClass: "gwd-column gwd-align gwd-jcc",
    staticStyle: { height: "100%" }
  }, [_c("img", {
    staticStyle: { width: "60px", height: "52px" },
    attrs: {
      src: __webpack_require__(162),
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticClass: "bjg-hintText" }, [_vm._v(_vm._s(_vm.transText("暂无浏览历史记录")))])]) : _vm._e()], 2)])], 1);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 636 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64, "

/***/ }),
/* 637 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAaCAMAAACaYWzBAAAA/FBMVEUAAAD///////+qqqq/v7+ZmZmqqqq2trafn5+ioqKZmZmlpaWioqKZmZmenp6ZmZmcnJydnZ2ampqZmZmenp6bm5ucnJybm5uampqZmZmdnZ2ampqZmZmbm5uampqZmZmbm5uampqbm5uampqampqampqampqZmZmampqZmZmZmZmZmZmampqZmZmampqampqampqampqZmZmampqampqZmZmampqZmZmZmZmampqampqampqampqampqZmZmampqZmZmZmZmZmZmZmZmZmZmZmZmampqZmZmZmZmampqampqZmZmZmZmZmZmampqampqampqZmZmampqZmZmoZtgdAAAAU3RSTlMAAQIDBAUGBwgLDxEWGR0eHyImKCouMTM1Nzk6PEBHS09RVFZYW11kanZ4e36Fho6Ql5mdpqiur7S1tri6v8jR0tPX2N3f4OHi5ejx9fb3+fz9/ixhMNMAAADKSURBVCjPrZDFFsIwEEVDobi7e3F3hyJFSovM//8LpAKHFHbcxUzeu9kkCClkWUEUhWUaEURv9z3HHe7XECGawOBVhIbauJMSM4jglICRnJ3oCApBLGJq2iKmJVOhsDBUlZhD/4Tqpsgq09E9pxcGpJiA6zl9MCTFFNwaQf0QLr6kEWa79CVtjRjy9HexAOu/xEQwIRSAukbY/XiGLS/hgDn58gXY8DqdnZ+957KTdg3YOP2ujYk1lKUTPQaCgV65VOizmxerXh53Dx5+NUNNzjKMAAAAAElFTkSuQmCC"

/***/ }),
/* 638 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_style_index_0_id_5d29fc05_scoped_true_lang_less__ = __webpack_require__(639);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_style_index_0_id_5d29fc05_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_HistoryBar_vue_vue_type_style_index_0_id_5d29fc05_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 639 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(640);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1fbb013a", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HistoryBar.vue?vue&type=style&index=0&id=5d29fc05&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HistoryBar.vue?vue&type=style&index=0&id=5d29fc05&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 640 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg-bar-button[data-v-5d29fc05] {\n  width: 114px;\n  height: 100%;\n  position: relative;\n  border-left: 1px solid #f1f1f1;\n}\n.bjg-bar-button[data-v-5d29fc05]:hover {\n  background: #fffbef;\n}\n.bjg-hintText[data-v-5d29fc05] {\n  color: #333333;\n  line-height: 19px;\n  font-size: 14px;\n  margin-top: 16px;\n}\n", ""]);

// exports


/***/ }),
/* 641 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var template = __webpack_require__(13);
var getPromoInfo = __webpack_require__(197);
var cnzz = __webpack_require__(12);
var log = __webpack_require__(14);
var request = __webpack_require__(3);

var now_dp_id = undefined;
var posPattern = {
  '360buy': ['#notice-downp', '.J-notify-sale', '.summary-price .dd .p-price+em', '#summary-wrap .dd .p-price', '.summary-price .dd>:last-child'],
  'suning': ['#mainPrice dd #PriceNotice1', '#mainPrice dd .btn-price-notice', '#mainPrice dd .btn-price-business', '#mainPrice dd .mainprice'],
  'taobao': [],
  'tmall': [],
  'dangdang': []
};

var getJdPromotion = function getJdPromotion(info) {
  if (G.site !== '360buy') return;
  var dp = G.dp;
  var skuId = dp.itemId.replace('-3', '');
  if (!dp.cat_id) return;
  var catarr = dp.cat_id.split('-');
  catarr = catarr.slice(0, 3);
  var cat = encodeURIComponent(catarr.join(','));
  var price = dp.price.toFixed(2);
  var area = $('.ui-area-text').attr('data-id').replace(/-/g, '_') + '_0';
  var timeStr = new Date().getTime();
  var url = 'https://cd.jd.com/promotion/v2?skuId=' + skuId + '&area=' + area + '&shopId=' + dp.shopId + '&venderId=' + dp.venderId + '&cat=' + cat + '&isCanUseDQ=isCanUseDQ-1&isCanUseJQ=isCanUseJQ-1&platform=0&orgType=2&jdPrice=' + price + '&appid=1&_=' + timeStr;
  // request.get(url).done((data) => {
  //   callback(info, data)
  // })
};
var getProMidPage = function getProMidPage(id, callback) {
  var url = 'https://browser.gwdang.com/extension?ac=promoUrl&promo_id=' + id;
  request.get(url).done(function (data) {
    callback(data);
  });
};

var renderServerOnHandPriceResult = function renderServerOnHandPriceResult(resp) {
  var html = __webpack_require__(643);
  var dom = $('#coupon_box');
  if (G.from_device.indexOf('bijiago') > -1 || G.from_device.indexOf('biyibi') > -1) {
    dom = $('#coupon_box_bjg');
    html = __webpack_require__(198);
  } else {
    $('.gwd-minibar-bg > .dsj-content').remove();
  }
  if (dom.length === 0) {
    if (G.from_device.indexOf('bijiago') > -1 || G.from_device.indexOf('biyibi') > -1) {
      dom = $('.promo-box');
      html = __webpack_require__(198);
    } else {
      dom = $('#gwd_minibar');
    }
  }
  if (G.from_device.indexOf('bijiago') > -1 || G.from_device.indexOf('biyibi') > -1) {
    $('#bjg-dsj-placeholder').replaceWith(template.compile(html)({
      tle: '',
      desc: resp.promo_list.map(function (item) {
        if (item.id) {
          var trueUrl = item.id.indexOf('http') === 0 ? item.id : 'https:' + item.id;
          trueUrl = encodeURIComponent(trueUrl);
          var url = item.url_format.replace('$URL', trueUrl);
          return '<a href="' + url.replace('ext_promo_calc', 'promo_calc') + '" target="_blank" style="text-decoration: underline">' + item.text + '</a>';
        }
        return item.text;
      }).join(';'),
      pri: parseFloat(resp.current_price).toFixed(2),
      lang: G.lang
    }));
    if ($('.promo-box').css('display') !== 'none') {
      setTimeout(function () {
        $('.promo-box').prev().css('border-bottom', '1px solid #e6e9eb');
        $('.promo-box').prev().css('width', '100%');
      }, 0);
    }
  } else if (resp && resp.promo_list) {
    var promo2 = {
      tle: '',
      desc: resp.promo_list.map(function (item) {
        if (item.id) {
          var trueUrl = item.id.indexOf('http') === 0 ? item.id : 'https:' + item.id;
          trueUrl = encodeURIComponent(trueUrl);
          var url = item.url_format.replace('$URL', trueUrl);
          //
          // if (item.tag === 'promo') {
          //   globalPromoLink.push({
          //     text: item.text,
          //     url: url.replace('ext_promo_calc', 'promo_calc')
          //   })
          // }
          // if (item.tag === 'coupon') {
          //   globalCouponLink.push({
          //     text: item.text,
          //     url: url.replace('ext_promo_calc', 'promo_calc')
          //   })
          // }
          return '<a href="' + url.replace('ext_promo_calc', 'promo_calc') + '" target="_blank" style="text-decoration: underline">' + item.text + '</a>';
        }
        return item.text;
      }).join(';'),
      pri: parseFloat(resp.current_price).toFixed(2)
    };
    $('#gwd-dsj-placeholder').replaceWith(template.compile(html)(promo2));
  }
  __webpack_require__(644).init();
  var img = new Image();
  var promotle = encodeURIComponent(resp.promo_text);
  img.src = G.tj_server + '/visit/?action=dspricelog&pagePri=' + G.dp.price + '&dsprice=' + resp.current_price + '&dp_id=' + now_dp_id + '&promo=' + promotle;
  cnzz.log('track:dspriceAll');
  log('track:dspriceAll');
  // 获取促销活动对应的网站页面
  getJdPromotion(resp);
  calwidth();
};

var calwidth = function calwidth() {
  // let logoW = $('.dsj-content>em').outerWidth() + 22;
  // let priW = $('.dsj-pri-info').outerWidth() + 10;
  // let remindW = $('.dsj-remind-icon').outerWidth() + 12;
  // let freeW = 460 - (logoW + priW + remindW) - 10;
  // $('.dsj-promo-link').width(freeW);
};

module.exports.init = function (dp_id) {
  now_dp_id = dp_id;
  if (!posPattern[G.site]) return;
  getPromoInfo.getPrice(renderServerOnHandPriceResult);
  // getPromoInfo.getPrice(render)
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 642 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

module.exports.init = function () {
  // skuId=100014979337&cat=12218%2C21455%2C21456&venderId=1000362423&isCanUseDQ=isCanUseDQ-1&isCanUseJQ=isCanUseJQ-1
  var skuId = window.pageConfig.product.skuid;
  var cat = window.pageConfig.product.cat.join(',');
  var venderId = window.pageConfig.product.venderId;
  return new Promise(function (resolve) {
    var domain = location.hostname;
    if (domain.includes('.jkcsjd.com')) {
      resolve(false);
    }
    $.get('https://' + domain + '/coupons?skuId=' + skuId + '&cat=' + encodeURIComponent(cat) + '&venderId=' + venderId).then(function (res) {
      var a = $('.coupon-wrap', res).children().toArray();
      var r = [];
      for (var i = 0; i < a.length; i++) {
        if ($(a[i]).text().indexOf('已领取的券') > -1) {
          break;
        }
        if ($(a[i]).hasClass('coupon-item')) {
          r.push(a[i]);
        }
      }
      if (!r.length) {
        resolve(false);
        return;
      }
      var resCoupon = r.map(function (x) {
        var couponVal = $(x).find('.coupon-val').text();
        var cond = $(x).find('.condition').text();
        var time = $(x).find('.coupon-time').html();
        if (cond.endsWith('可减')) {
          cond = cond.replace('可减', '减' + couponVal);
        }
        return {
          text: cond.replace('可用', '减' + couponVal),
          time: time
        };
      }).filter(function (x) {
        if (x.time) {
          var reList = [new RegExp('有效期([\\d\\-: ]*)至([\\d\\-: ]*)'), new RegExp('([\\d\\-: ]*)<br([\\d\\-: ]*)')];

          var _iteratorNormalCompletion = true;
          var _didIteratorError = false;
          var _iteratorError = undefined;

          try {
            for (var _iterator = reList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
              var re = _step.value;

              var _res = re.exec(x.time);
              if (_res && _res[1]) {
                if (new Date(_res[1].trim()) > new Date()) {
                  console.warn('filter early coupon', x);
                  return false;
                }
              }
            }
          } catch (err) {
            _didIteratorError = true;
            _iteratorError = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion && _iterator['return']) {
                _iterator['return']();
              }
            } finally {
              if (_didIteratorError) {
                throw _iteratorError;
              }
            }
          }
        }
        return true;
      }).map(function (x) {
        return x.text;
      });
      resolve(resCoupon);
    });
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))

/***/ }),
/* 643 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, pri = $data.pri, tle = $data.tle, desc = $data.desc;
    $$out += '<div class="dsj-content" style="display: flex; flex-direction: row; position: relative">\n  <em class="setting-bg"></em>\n  <span class="dsj-promo-link" >\n    <span class="dsj-pri-info">\n      <span class="dsj-sp1">到手价:</span>\n      <span class="dsj-sp2">\xA5';
    $$out += $escape(pri);
    $$out += '</span>\n      ';
    if (tle) {
        $$out += '\n      <span class="dsj-sp3">(';
        $$out += $escape(tle);
        $$out += ')</span>\n      ';
    }
    $$out += '\n    </span>\n    <span class="dsj-text">';
    $$out += desc;
    $$out += '</span><img class="gwd-arrow" ';
    $$out += 'src="https://cdn.gwdang.com/images/extensions/DsjDownArrow@2x.png"';
    $$out += ' alt="" style="margin-left: 6px; width: 9px; height: 6px;">\n    <div id="gwd-pp" style="position: absolute"></div>\n    <div id="gwd-pp-hoverhelper"></div>\n  </span>\n  <span class="dsj-remind-icon setting-bg"></span>\n  <div class="dsj-content-detail">到手价指促销活动完美凑单和使用优惠券后的理论到手价\uFF0C不代表您的实际支付价格\u3002</div>\n  <style type="text/css">\n    #gwd-pp-hoverhelper {\n      position: absolute;\n      top: 34px;\n      bottom: -6px;\n      left: 0;\n      right: 0;\n    }\n\n    .dsj-content>em {\n      float: left;\n      width:16px;\n      height:16px;\n      margin: 9px 10px 9px 12px;\n      background-position: -251px -111px;\n    }\n    .dsj-text {\n      max-width: 240px;\n      display: inline-block;\n      overflow: hidden;\n      white-space: nowrap;\n      text-overflow: ellipsis;\n    }\n    .dsj-content {\n      width:460px;\n      height:34px;\n      position: relative;\n      line-height: 34px;\n      background-color: #fff;\n      border: 1px solid #e6e9eb;\n      border-top: none;\n    }\n    .dsj-pri-info {\n      margin-right: 10px;\n    }\n    .dsj-content * {\n      font-family: \'Microsoft YaHei\';\n    }\n    .dsj-pri-info span {\n      line-height: 34px;\n      height: 34px;\n    }\n    .dsj-sp1, .dsj-sp2 {\n      color: #E4393C;\n      font-size: 13px;\n      height: 17px;\n      width: auto;\n      font-weight: bold;\n    }\n    .dsj-sp2 {\n      margin-right: 10px;\n      margin-left: 3px;\n    }\n    .dsj-sp3, .dsj-promo-link {\n      font-size: 12px;\n      color: #7D7E80;\n    }\n    .dsj-promo-link {\n      /*width: 210px;*/\n      flex: 1;\n      height: 34px;\n      line-height: 34px;\n      overflow: hidden;\n      text-decoration: none!important;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n      display: flex;\n      align-items: center;\n    }\n    .dsj-promo-link:hover {\n      cursor: text;\n    }\n    .dsj-promo-link.islink:hover {\n      cursor: pointer;\n      color: #f30213;\n    }\n    .dsj-content .dsj-remind-icon {\n      width:14px;\n      height:14px;\n      float: right;\n      margin-right: 12px;\n      margin-top: 10px;\n      background-position: -272px -112px;\n    }\n    .dsj-content .dsj-content-detail {\n      position: absolute;\n      height: 73px;\n      width: 132px;\n      line-height: 18px;\n      padding: 10px;\n      text-align: left;\n      color: #999;\n      top: 31px;\n      right: 3px;\n      background: rgba(254,255,247,1);\n      border: 1px solid #e5e5e5;\n      z-index: 9999999;\n      display: none;\n      font-size: 12px;\n    }\n    .dsj-content .dsj-remind-icon:hover+.dsj-content-detail {\n      display: block;\n    }\n    .dsj-content .dsj-content-detail:before {\n      display: block;\n      content: "";\n      width: 0;\n      height: 0;\n      border-width: 0px 5px 5px;\n      border-style: solid;\n      border-color: transparent transparent #b4b4b4;\n      position: absolute;\n      top: -5px;\n      left: 142px;\n      margin-left: -10px;\n    }\n    .dsj-content .dsj-content-detail:after {\n      display: block;\n      content: "";\n      width: 0;\n      height: 0;\n      border-width: 0 5px 5px;\n      border-style: solid;\n      border-color: transparent transparent #fff;\n      position: absolute;\n      top: -4px;\n      left: 132px;\n    }\n    .dsj-promo-link:hover .gwd-promo-plan {\n      display: block;\n    }\n\n    .dsj-promo-link:hover .gwd-arrow {\n      transform: rotate(180deg);\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 644 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, Vue, $) {

var _this = this;

var request = __webpack_require__(3);
var globalCondition = __webpack_require__(4);
var PromotionPlan = __webpack_require__(645)['default'];

var load = function load(dpId) {
  var skuId = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
  var promo, promoString, text, price, data, res, el, plan, single, multi, mul100;
  return regeneratorRuntime.async(function load$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(globalCondition.met('promoGot'));

      case 2:
        promo = context$1$0.sent;
        promoString = promo && promo.origin_promo ? '&origin_promo=' + encodeURIComponent(promo.origin_promo) : '';
        text = promo && promo.promo_text ? '&promo_text=' + promo.promo_text : '&promo_text=None';
        price = __webpack_require__(20).productPattern[G.site]().price;
        context$1$0.next = 8;
        return regeneratorRuntime.awrap(request.get(G.server + ('/extension/PromotionPlan?price=' + price + '&dp_id=' + dpId + (skuId ? '&sku_id=' + skuId : '') + promoString + text)));

      case 8:
        data = context$1$0.sent;
        res = data.data;
        el = '#gwd-pp';

        if (G.from_device === 'bijiago' || G.from_device.indexOf('biyibi') > -1) {
          el = '#bjg-pp';
        }
        plan = new Vue({
          el: el,
          render: function render(h) {
            return h(PromotionPlan, {
              ref: 'plan',
              props: {
                data: res,
                tag: G.from_device === 'bijiago' ? 10 : 3
              }
            });
          }
        });

        if (res.length) {
          single = res.find(function (item) {
            return item.plan.buy_count === 1 && item.plan.remain === 0;
          });
          multi = res.find(function (item) {
            return item.plan.buy_count > 1;
          });

          mul100 = function mul100(x) {
            return parseInt(parseFloat(x) * 100);
          };

          G._pp = (single ? mul100(single.current_price) : '') + ',' + (multi ? mul100(multi.current_price) : '');
          if (single) {
            globalCondition.setMet('SinglePrice', single.current_price);
          }
        }
        $('.dsj-promo-link').hover(function () {
          plan.$refs.plan.over();
        });

      case 15:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  init: function init() {
    var dp_id;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          context$1$0.next = 2;
          return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

        case 2:
          dp_id = context$1$0.sent;

          load(dp_id, __webpack_require__(10).getParameterByName('skuId'));

          if (G.on) {
            context$1$0.next = 6;
            break;
          }

          return context$1$0.abrupt('return');

        case 6:
          G.on('skuChange', function (skuId) {
            load(dp_id, skuId);
          });

        case 7:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

//let text = '&promo_text=none'
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(17)["default"], __webpack_require__(1)))

/***/ }),
/* 645 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__ = __webpack_require__(646);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromotionPlan_vue_vue_type_script_lang_js__ = __webpack_require__(199);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__PromotionPlan_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__PromotionPlan_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PromotionPlan_vue_vue_type_style_index_0_id_24d41b24_lang_less_scoped_true__ = __webpack_require__(648);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__PromotionPlan_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__["staticRenderFns"],
  false,
  null,
  "24d41b24",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('24d41b24')) {
      api.createRecord('24d41b24', component.options)
    } else {
      api.reload('24d41b24', component.options)
    }
    module.hot.accept("./PromotionPlan.vue?vue&type=template&id=24d41b24&scoped=true", function () {
      api.rerender('24d41b24', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/PromotionPlan.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 646 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__ = __webpack_require__(647);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_template_id_24d41b24_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 647 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.data && _vm.data.length,
      expression: "data && data.length"
    }],
    staticClass: "gwd-promo-plan"
  }, [_c("table", [_c("thead", [_c("tr", { staticStyle: { "min-height": "30px" } }, [_c("th", [_c("span", [_vm._v(_vm._s(_vm.getText("购买方案")))])]), _vm._v(" "), _c("th", [_c("span", [_vm._v(_vm._s(_vm.getText("实付总价")) + "(¥)")])]), _vm._v(" "), _c("th", [_c("span", [_vm._v(_vm._s(_vm.getText("折合每件")) + "(¥)")])]), _vm._v(" "), _c("th", [_c("span", [_vm._v(_vm._s(_vm.getText("使用的促销")))])])])]), _vm._v(" "), _c("tbody", _vm._l(_vm.data, function (item, idx) {
    return _c("tr", [_c("td", { staticStyle: { "padding-left": "10px" } }, [_vm._v(_vm._s(item.plan_text))]), _vm._v(" "), _c("td", {
      "class": idx === 0 ? "red" : "",
      staticStyle: {
        "padding-right": "10px",
        "text-align": "right"
      }
    }, [_vm._v(_vm._s(parseFloat(item.total_price).toFixed(2)))]), _vm._v(" "), _c("td", {
      "class": idx === 0 ? "red" : "",
      staticStyle: {
        "padding-right": "10px",
        "text-align": "right"
      }
    }, [_vm._v(_vm._s(parseFloat(item.current_price).toFixed(2)))]), _vm._v(" "), _c("td", { staticStyle: { padding: "10px" } }, _vm._l(item.promo_list, function (p) {
      return _c(p.url || p.id ? "a" : "span", {
        key: p.url,
        tag: "component",
        style: "color: #7d7e80;" + (p.url ? "text-decoration: underline" : ""),
        attrs: {
          href: p.id ? _vm.link2(p.url_format, p.id) : p.url,
          target: "_blank"
        }
      }, [_vm._v(_vm._s(p.text) + " ")]);
    }), 1)]);
  }), 0)]), _vm._v(" "), _vm.G.aliSite ? _c("div", { staticClass: "gwd-p-qrcode gwd-column gwd-align gwd-jcc" }, [_c("div", {
    staticStyle: {
      width: "100px",
      height: "100px",
      position: "relative"
    }
  }, [_c("img", {
    staticStyle: { width: "100%" },
    attrs: { src: _vm.qr, alt: "" }
  }), _vm._v(" "), _c("img", {
    staticStyle: {
      position: "absolute",
      top: "50%",
      left: "50%",
      width: "20px",
      height: "20px",
      transform: "translate(-50%, -50%)"
    },
    attrs: {
      src: __webpack_require__(107),
      alt: ""
    }
  })]), _vm._v(" "), _c("div", {
    staticClass: "gwd-row",
    staticStyle: {
      "margin-top": "8px",
      "white-space": "nowrap",
      height: "10px",
      "line-height": "10px"
    }
  }, [_c("span", {
    staticClass: "gwd-font10",
    staticStyle: {
      color: "#ff3220",
      "font-weight": "bold",
      "transform-origin": "top left",
      width: "42px",
      "margin-left": "6px"
    }
  }, [_vm._v(_vm._s(_vm.getText("淘宝APP")))]), _vm._v(" "), _c("span", {
    staticClass: "gwd-font9",
    staticStyle: {
      color: "#070707",
      "transform-origin": "top left",
      width: "64px"
    }
  }, [_vm._v(_vm._s(_vm.getText("扫码 参加活动")))])])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 648 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_style_index_0_id_24d41b24_lang_less_scoped_true__ = __webpack_require__(649);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_style_index_0_id_24d41b24_lang_less_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PromotionPlan_vue_vue_type_style_index_0_id_24d41b24_lang_less_scoped_true__);
/* unused harmony reexport namespace */


/***/ }),
/* 649 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(650);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("01c0b198", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromotionPlan.vue?vue&type=style&index=0&id=24d41b24&lang=less&scoped=true", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromotionPlan.vue?vue&type=style&index=0&id=24d41b24&lang=less&scoped=true");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 650 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-promo-plan[data-v-24d41b24] {\n  z-index: 999;\n  display: none;\n  background: white;\n  position: absolute;\n  left: 0;\n  right: 0;\n  box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2);\n  top: 35px;\n  box-sizing: border-box;\n  padding: 10px;\n}\n.gwd-promo-plan *[data-v-24d41b24] {\n  float: initial;\n}\n.gwd-promo-plan table[data-v-24d41b24] {\n  border-collapse: collapse;\n  width: 100%;\n  white-space: initial;\n}\n.gwd-promo-plan table .red[data-v-24d41b24] {\n  color: #e4393c;\n}\n.gwd-promo-plan table th[data-v-24d41b24] {\n  padding-left: 10px;\n  text-align: left;\n  height: 30px;\n  background: #f1f9fc;\n  font-weight: normal;\n}\n.gwd-promo-plan table th span[data-v-24d41b24] {\n  display: inline-block;\n  font-size: 12px;\n  transform: scale(0.833);\n  transform-origin: left center;\n  color: #969899;\n  white-space: nowrap;\n}\n.gwd-promo-plan table th[data-v-24d41b24],\n.gwd-promo-plan table td[data-v-24d41b24] {\n  border: 1px solid #edf1f2;\n  box-sizing: border-box;\n  vertical-align: middle;\n  line-height: 17px;\n}\n.gwd-promo-plan table td[data-v-24d41b24] {\n  min-height: 35px;\n}\n.gwd-promo-plan table td a[data-v-24d41b24] {\n  text-decoration: underline;\n}\n.gwd-promo-plan table td a[data-v-24d41b24]:hover {\n  color: #e4393c !important;\n}\n.gwd-promo-plan .gwd-p-qrcode[data-v-24d41b24] {\n  box-sizing: border-box;\n  position: absolute;\n  bottom: -1px;\n  top: -36px;\n  z-index: 999;\n  width: 130px;\n  background: white;\n  border: 1px solid #e6e9eb;\n  box-shadow: 2px 1px 3px 0 rgba(0, 0, 0, 0.2);\n  right: -130px;\n  font-size: 0;\n}\n.gwd-promo-plan .gwd-p-qrcode span[data-v-24d41b24] {\n  display: inline-block;\n}\n", ""]);

// exports


/***/ }),
/* 651 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime, G) {

module.exports = {
  init: function init() {
    var _this = this;

    setTimeout(function () {
      var list = $('.bjgext-item-dp').toArray().filter(function (x) {
        return x.dataset.id.indexOf('-83') > -1 || x.dataset.id.indexOf('-123') > -1;
      });
      var pidConfig = __webpack_require__(46);

      list.forEach(function callee$2$0(item) {
        var coupon, m, html;
        return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
          while (1) switch (context$3$0.prev = context$3$0.next) {
            case 0:
              if (!($(item).find('.bjgext-item-img .coupon_span').length > 0)) {
                context$3$0.next = 2;
                break;
              }

              return context$3$0.abrupt('return');

            case 2:
              context$3$0.next = 4;
              return regeneratorRuntime.awrap(__webpack_require__(38).initWithDpAsync(item.dataset.id, pidConfig[G.union], 'compare'));

            case 4:
              coupon = context$3$0.sent;

              if (coupon && coupon.data) {
                m = coupon.data.coupon.coupon_money;
                html = '<span class="coupon_span">领' + m + '元券</span>';

                $(item).find('.bjgext-item-img').append(html);
              }

            case 6:
            case 'end':
              return context$3$0.stop();
          }
        }, null, _this);
      });
    }, 1000);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5), __webpack_require__(0)))

/***/ }),
/* 652 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var template = __webpack_require__(13);
var request = __webpack_require__(3);

var sendFeedback = function sendFeedback(i, m) {
  var contact = m;
  var feedbackTxt = i;
  contact += 'bijiago';
  if (G.ss_name === 'priceDog') {
    contact += '-priceDog';
  }
  if (G.from_device === 'biyibi') {
    contact = m + '-biyibi插件用户';
  }
  var agent = navigator.userAgent.toLowerCase();
  var refer = encodeURIComponent(location.href);
  var url = G.server + '/brwext/feedback?nick=' + contact + '&content=' + feedbackTxt + '&agent=' + agent + '&refer=' + refer + '&from_device=' + G.from_device + '&format=json';
  request.get(url).then(function (msg) {
    if (msg && (msg.code == 1 || msg.status === 1)) {
      $('#feedback_detail textarea').val('');
      $('#feedback_detail input').val('');
      $('#feedback_detail').hide();
    }
  });
};

var renderDetail = function renderDetail() {
  var lang = __webpack_require__(39);
  var config = __webpack_require__(169);
  var html = __webpack_require__(653);
  $('.bjgext-feedback').append(template.compile(html)({
    content: lang.getString(config, 'content'),
    contact: lang.getString(config, 'contact'),
    mail: lang.getString(config, 'mail'),
    submit: lang.getString(config, 'submit'),
    showQQ: G.ss_name !== 'priceDog' && G.from_device !== 'biyibi'
  }));
  $('.bjgext-feedback').on('mouseenter', function () {
    if ($(window).width() - $('#bjgext_mainbar').outerWidth() < 150) {
      $('#feedback_detail').css('right', '0px');
    }
    $('#feedback_detail').show();
  });
  $('.bjgext-feedback').on('mouseleave', function () {
    $('#feedback_detail').hide();
  });
  $('#feedback_btn').on('click', function () {
    var info = $('#feedback_detail textarea').val();
    var mail = $('#feedback_detail input').val();
    if (!info) return;
    sendFeedback(info, mail);
  });
  // $('.bjgext-feedback').on('DOMNodeRemoved', function(e) {
  //   console.warn(e.target, ' was removed');
  // });
};

module.exports.init = function () {
  renderDetail();
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 653 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', showQQ = $data.showQQ, $escape = $imports.$escape, content = $data.content, contact = $data.contact, mail = $data.mail, submit = $data.submit;
    $$out += '<div id="feedback_detail" ';
    if (!showQQ) {
        $$out += ' style="height: 262px; top: -265px" ';
    }
    $$out += '>\n  <span class="bjg-label">';
    $$out += $escape(content);
    $$out += '</span>\n  <textarea ></textarea>\n  <span class="bjg-label" style="height: 39px; line-height: 39px;">';
    $$out += $escape(contact);
    $$out += '</span>\n  <input type="text" name="" placeholder="';
    $$out += $escape(mail);
    $$out += '">\n  <button id="feedback_btn" class="gwd-button">';
    $$out += $escape(submit);
    $$out += '</button>\n  ';
    if (showQQ) {
        $$out += '\n  <hr>\n  <div class="gwd-row gwd-align" style="justify-content: center; height: 46px;">\n    <span style="font-size: 12px; color: #64615d; width: 60px; display: inline-block">联系客服:</span>\n    <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2498478969&site=qq&menu=yes" style="margin-left: 4px;">\n      <img border="0" ';
        $$out += 'src="' + __webpack_require__(654) + '"';
        $$out += ' style="width: 66px;"/>\n    </a>\n  </div>\n  ';
    }
    $$out += '\n</div>\n<style type="text/css">\n  #feedback_detail {\n    position: absolute;\n    width:260px;\n    height: 309px;\n    background: #FFFFFF;\n    border: 1px solid #F1F1F1;\n    /*box-shadow: 0 -2px 4px 0 #F7F7F7;*/\n    top: -311px;\n    margin-left: -1px;\n    display: none;\n  }\n  .bd_amazon #feedback_detail {\n    top: -260px;\n  }\n  #feedback_detail * {\n    box-sizing: border-box;\n  }\n  #feedback_detail hr {\n    height: 1px;\n    background: #f1f1f1;\n    border: none;\n    margin-top: 20px;\n    margin-bottom: 0;\n  }\n  #feedback_detail .bjg-label {\n    font-family: MicrosoftYaHei;\n    font-size: 14px;\n    color: #64615D;\n    height: 43px;\n    line-height: 43px;\n    width: 100%;\n    padding-left: 20px;\n    margin: 0px;\n  }\n  #feedback_detail textarea {\n    display: block;\n    height: 86px;\n    width: 220px;\n    box-sizing: border-box;\n    background: #F8F8F8;\n    border: 1px solid #f8f8f8;\n    border-radius: 4px;\n    padding: 0px;\n    resize: none;\n    outline: none;\n    margin-left: 20px;\n    font-size: 14px;\n    padding-left: 8px;\n  }\n  #feedback_detail input {\n    width: 220px;\n    height: 28px;\n    background: #F8F8F8;\n    box-sizing: border-box;\n    border: 1px solid #f8f8f8;\n    border-radius: 4px;\n    font-size: 14px;\n    outline: none;\n    margin-left: 20px;\n    padding: 0px;\n    padding-left: 8px;\n  }\n  #feedback_detail input::placeholder {\n    color: #9a938b;\n    font-size: 12px;\n  }\n  #feedback_detail > button {\n    background: #FFBB76;\n    border-radius: 2px;\n    width: 68px;\n    height: 24px;\n    color: #fff;\n    text-align: center;\n    line-height: 24px;\n    margin-left: 96px;\n    margin-top: 20px;\n  }\n  #feedback_detail > button:hover {\n    background-color: #f6a14c;\n  }\n  #feedback_detail input::-webkit-input-placeholder {\n    font-size: 12px;\n    line-height: 30px;\n    color: #9a938b;\n  }\n  #feedback_detail input:-ms-input-placeholder {\n    font-size: 12px;\n    line-height: 30px;\n    color: #9a938b;\n  }\n  #feedback_detail input:-moz-placeholder {\n    font-size: 12px;\n    line-height: 30px;\n    color: #9a938b;\n  }\n  #feedback_detail input::-moz-placeholder {\n    font-size: 12px;\n    line-height: 30px;\n    color: #9a938b;\n  }\n</style>';
    return $$out;
};

/***/ }),
/* 654 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAAAmCAYAAAAFkDNCAAAKWklEQVR42u1ceVAUZxZH8FhLV2v/WS1lVzdq3FStSUkZjEdJSrIUmKi7mo3lHyRyCSoSLw5RLgXlFo2CCF7BAIqCmghKREEQ8IAICshhgEEORUAdhK3V8m3/PumxZxiGYWZgEumpesV093szPe/93vl9tIEB9+ro6DCWSqXxHDU8f/6cRBo8BJvD9sCAAQ8G7kKLqJxBTy0MFECHqAyRuqJFvIGYJkQSpg8DUREiCUkEhEgiIEQaAEBUVVWRv78/mZmZ0ZQpU2jChAk0a9Yssre3p4yMDFHZgwkQkZGRNHr0aOK62B5pxYoV9PDhQ1Hp7zogQkNDVQJBSHPnzqXHjx+/80rNy71Oly6m9lmusbGhV547d36h40cP05MnT357gLh+/ToNGTJEZnALCwtKSEggY2Njdjxq1CiKjY0lOzs7GY+Li0u//BAArbjoDmVfy6KKinJ69uzZgMoLKWCnLznar+LSaKXaMgk/xNFGl3VUW1vzVr852VRWVirHdybpJNnbWMsBAkA6dzZZq3vWCSAWLlwoFwEKCwups7NTFjVsbGwIrxcvXtCwYcPYOfwtKSnRGRBu5OfRVrfNTElCcnKwpZjoKGpubu5XeWVUcu8u+4yDkfvVloHh1zrakZenOwNnW1sbeXpsIQ/XTfToUZOM7+jhGHKw/Vp2XFtTw/gAQABab4AoLS3tlhKAWkQJb29vduzo6EgRERGcx1XQ+PHjZXxeXl5a3zgUdjgmmikeCgoJ2kWJ8Sfox/Nn6VB0JG3Z6MKuebhtovtlZTqVj446QHvCglXS+rWOFBwYoJInNuag3OdevZLBvjM0eDfz9pKSe8zQEeEhMh7IebpvYe8rOb1u2uBMzmscqKDgtn5TBgytCIioqCjKysoiW1tbdrxgwQJ6/fo1ZWdny/GZmppqfePnUpKZ8r51dqJbN290u97Medn+fRGMZ9tWVwYAXcl/tzecAnft1JqURZBDBw9QWEgQFxUeseOzyacZKCUSCTU2NHCRy4bCQ4PYtbo6Ce3086Ly+2X6ryFWrVrVDRBjRg2jFZZ/J4uZRvTvT4zI0sSIvrJ4jyaO+6Mc38iRI+np06ca3zS6lXVO9sxYxcVFKnl9vbcxvvPnUnQmr4xgnJ4KPdQSMKa6kU94jEjBf27SyQRZSgMoqiorfztFJVIDb+Cxo4ZQqvdw+m/SH+h/Z5RTfvAIen+CoUymurpa45uOP/E9U8r+fXt65YX3g3fzhvU6k1ckpBSE7h2+Xt2A3traSu5bNpDrpm+prLREKQAAJp6aGhuVfgcPhr17wuha1lXa4LKWpZO440flagy9AWL27NlyXr/E1Ihyg0YoBUPp/hHkYDGUDA3fdiRFRUUa3zS8A8rJvZ7TKy88DIoDP9/yaisvpILbt1gOV5XHUTACUGtW21JW5lW5aygEhcUs0hR/raWlhTKvZrCuha8t+AjS1NTE0subtLeG0lJ/0m+XcfgbW7Kc/B4ZCdpO0N/GGdLyOUa0/ouhtHKBEc2YZCh3fdLYsbRtznySFBRqfNPIqVAEiqq+8N+7W6wTeWERCLDAW+H9PRkE6UIiqSWf7VvZ58Db+WuICGgvQQAND4i7xcUMZOB34eqcpFOJDCCIWML0dfvWTRaBwHfzZr6eAMGhs3naR9Rs/D49nvoh1c7/jAqt/kWpi5ZSvOViOmixiPb+04qOc+9TuHPZi5dT+WefU9PMuUwG1LY7VOOb5j1W3VDJe9iN/FydyLNiL+WMrAv59dcHXCgPZQMjZfL+O3zIa5sH+77dATuYHFpaxfSC7kEYIdAFYb4gbH2jo/az9COUQ42RefWK/lJG29E4mWE1pSezP9X4pqEQKLWivFwtfnfXjYyfr8a1lb+cfokdo+Bs6CoWYw8dZEADOISyN2/kM160tHwaQOgHr2LEUQQEBmSYTMpNhjnZ7Z5ucuca6usp9cJP+gPE0aXL6e6MjzUGQ/20D+nKrHkUExKi2bicUwqUjDDbGy+8EHMGYQ2grXxrawsrTIWei4IQwyzhzAApxM9nOwv5fBvJF5KKhlYGCMiiWBVGMoDQx8tTbsKKVASAlZaWDDwgHjx4wBWHb+qCPxkaUdJmN6q2tqPqTy2pxtSM6mbOobqPPqH6GaYkMZlHNfPMqezzZVTmsJYqwveR+5dfkWFX3TFt2jTNugxuzAsDCZXfE2Vfy2S86Nd1Jd8TnerqBDDjEHYzF1MvqPW7FAGBOgJgRPHIn0O9gs9EK4sOBikIPOg89BIhQjivFhaJmZmZJN3i+TYVTPqAVL0CAgLk5DG06vMiEBemMQmEYpR5mtAT+YJQqDBt5VV1JEG7/ZmBvj92hMlFHdin9u9SBAQ/quZTEboYvhtBvYIiEt/1c/pF/bWdVlZWcgbNz8/vEyDCw8Pl5H19fTW6ceRMKAaVuLLQX1NTTQFcMQeeXVxRqFjAaSuvGqyrmRzG331ZleQBgRQBQOEcUg0/gDrwXQRLS+g48BftrLqdUr8AAkoZM2aMnEHz8vL6BAjF5XJzc3ONbhzeeDIxXpbfkVdR2GFQg7EwFopw3t/Pm42hdS2vjPLzclk3Abl1XS0jOoxfCgvUAwS3SIXvRk2A1CC8lpN9jUWKGG6dBceIRIheut5OYKDJgtbkyZOZIfE+Li6OXt0toc64BOqIPkKdJxJVAsLJyYnJWVtb0/Dhw2nixIla/QAoG/kdHiMc8MDAGZfTWZ7tT3kUmBhw+XdFkw3r17AQjnSDKISCEuex0IW2tafVUwya+HYY6axIkMpQgwC4WPnk90xgmRyg8/RwZd2IXgCRk5PDjIgtcQj1MKyzszP15WViYsLk0tLSWLTAuoYufgg8Hm0kjMvn7r5M7voij4iBiSNG3/yaCKaQP8Qd7+axGDwdOxJLq+2+YXwwOsCD6CQ0OiIArqOrKC+/zwx/4cfzsmEWooHi2kVubg65rHNk0ewE991VlRUDC4h6rt9NSUmRRQuAY/r06fTy5Uu1wFBXV0dDhw6lqVOnynIyIowuQx48zXu7h2zUK9xwoiv5XV2DKngtPB+RpLe0AgOnX0qTFZ2KE0voA90EugdEF36PBgB07EhMj7UI5iAAL3gxsdR2J5VWG2Tc3NyYtwcGBqoFiCVLljD+06dP9+sWNhR2vNFAyM1hIYHdKnhN5RGiMT7WdI8ojAgQqYpgGFqhfVV3lRQj7DJ9zCEUi8xly5axsI/I0dPr1atX5Ofnx8CAtnMg9jXi3s5zY1/06dhDAMPi/UDJD8pNtu2NBdRxy4V2bvyC7bpeuXIlpaens1YJLyxxJycnsw0xf/2LMZ0KW0odRX4kbake0B+Jwg/jXX3JDwpAtNde5Ja2R8qWuBsSp1Ckz2JavtiMZn9sQjNm/IPmzzWlr/9jTonBi0h6ZtzbJfFzf6bnLbXitvd3LUJIm4pJKrnMgSPtDdVdJunDa9TeVMhdu8NFkFskrcukdsnP1F6TykCEY2lzpah88V/5RPpdAEJ8HIBIco8DEB8YIpLcA0PERwqJJPdIIfGhY2KaED507P/4wbfyRdvp0QAAAABJRU5ErkJggg=="

/***/ }),
/* 655 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime, $) {

var _this = this;

var request = __webpack_require__(3);
var template = __webpack_require__(13);
var getQRCode = __webpack_require__(23);
var globalCondition = __webpack_require__(4);
var cnzz = __webpack_require__(12);

var bdom = undefined,
    mdom = undefined;

module.exports.init = function (dp_id, bardom, minidom) {
  bdom = bardom;
  mdom = minidom;
  if (['360buy', 'yangkeduo'].indexOf(G.site) === -1) {
    // setTimeout(() => {
    //   require('bjgou/modules/specialActivityBjgou').init(false)
    // }, 1000)
    return;
  };
  var url = undefined;
  getCouponInfo(dp_id, url, renderCoupon);
};

var getCouponInfo = function getCouponInfo(dp_id, url, callback) {
  G.dp.itemId = dp_id;
  dp_id = dp_id ? 'dp_id=' + dp_id : '';
  url = url ? 'url=' + url : '';
  var lang = G.lang === 'zh-tr' ? '&lang=zh-tr' : '';
  var url2 = G.server + '/extension/Coupon?' + dp_id + url + '&' + lang;
  request.get(url2).then(function (data) {
    if (data.coupon && data.click_url) {
      globalCondition.setMet('coupon', data.coupon);
      callback(data);
      setTimeout(function () {
        __webpack_require__(41).init(true);
      }, 1000);
    } else if (G.site === 'yangkeduo') {
      data.coupon = 0;
      callback(data);
      setTimeout(function () {
        __webpack_require__(41).init(false);
      }, 1000);
    } else {
      globalCondition.setMet('coupon', 0);
      setTimeout(function callee$2$0() {
        return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
          while (1) switch (context$3$0.prev = context$3$0.next) {
            case 0:
              context$3$0.next = 2;
              return regeneratorRuntime.awrap(globalCondition.met('noOtherGiftMoney'));

            case 2:
              __webpack_require__(41).init(false);

            case 3:
            case 'end':
              return context$3$0.stop();
          }
        }, null, _this);
      }, 1000);
      __webpack_require__(139).init();
    }
  });
};

var showCustomQrCode = function showCustomQrCode(content) {
  var couponValue = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];

  if (G.site !== 'yangkeduo') return;
  if ($('html').hasClass('gwd_yangkeduo')) return;
  var templateHtml = __webpack_require__(656);
  var result = template.compile(templateHtml)({
    qrcode: content,
    s_server: G.s_server,
    coupon: couponValue
  });
  $('body').append(result);
};

var renderCoupon = function renderCoupon(data) {
  __webpack_require__(14)('coupon:show');
  var tle = "点击领券";
  var html = __webpack_require__(657);
  if (G.lang === 'zh-tr') {
    html = __webpack_require__(66);
  }
  $('#bijiago-banner-ad').remove();
  if (G.site === 'yangkeduo' || data._jump === 'qrcode') {
    (function () {
      var productInfo = {
        itemNumId: G.dp.itemId,
        amount: data.coupon,
        couponUrl: data.click_url,
        discountPrice: data.price,
        effectiveStartTime: data.start_time,
        effectiveEndTime: data.end_time,
        id: G.dp.itemId,
        picUrl: $('.islider-outer img').attr('src'),
        pid: 'top',
        tmall: false,
        pdd: G.site === 'yangkeduo',
        shopName: G.site === 'yangkeduo' ? '拼多多' : '京东',
        title: $('.enable-select').text()
      };
      if (G.site === 'yangkeduo') {
        getQRCode(productInfo, data.click_url, function (qrcodeData) {
          if (parseInt(data.coupon)) {
            $(bdom).append(template.compile(html)({
              price: data.coupon,
              url: data.click_url,
              tle: tle,
              isShowPic: true,
              picUrl: qrcodeData[0].imgSrc,
              isBottom: true,
              lang: G.lang
            }));
            showCustomQrCode(qrcodeData[0].imgSrc, '当前商品领券立减' + data.coupon + '元');
          } else {
            showCustomQrCode(qrcodeData[0].imgSrc);
          }
        }, true);
      } else {
        (function () {
          if (parseInt(data.coupon)) {
            $(bdom).append(template.compile(html)({
              price: data.coupon,
              url: data.click_url,
              tle: tle,
              isShowPic: true,
              picUrl: 'xx',
              isBottom: true
            }));
          }
          var qr = false;
          $('#top_coupon_btn').hover(function () {
            if (qr) return;
            getQRCode(productInfo, data.click_url, function (qrcodeData) {
              qr = true;
              $('#top_coupon_btn img').attr('src', qrcodeData[0].imgSrc);
            }, true);
          });
        })();
      }
    })();
  } else {
    $(bdom).after(template.compile(html)({
      price: data.coupon,
      url: data.click_url,
      tle: tle,
      isShowPic: false,
      lang: G.lang
    }));
  }
  renderMini(data);
  if (G.site === '360buy') {
    cnzz.log('京东顶部优惠券', '展示');
    cnzz.log('京东中间优惠券', '展示');

    $('#top_coupon_btn').click(function () {
      cnzz.log('京东顶部优惠券', '点击');
    });
    $('#top_coupon_btn').hover(function () {
      cnzz.logOnce('京东顶部优惠券', '悬浮');
    });

    $('.bjgou-coupon-take').click(function () {
      cnzz.log('京东中间优惠券', '点击');
    });
    $('.bjgou-coupon-take').hover(function () {
      cnzz.logOnce('京东中间优惠券', '悬浮');
    });
  }
};
var renderMini = function renderMini(info) {
  var data = {
    coupon: {
      coupon_money: info.coupon
    },
    click_url2: info.click_url
  };
  var html = __webpack_require__(152);
  var views = template.compile(html)({
    data: data,
    isShowPic: false,
    site: G.site
  });
  var productInfo = {
    itemNumId: G.dp.itemId,
    amount: data.coupon,
    couponUrl: data.click_url,
    discountPrice: data.price,
    effectiveStartTime: data.start_time,
    effectiveEndTime: data.end_time,
    id: G.dp.itemId,
    picUrl: $('.islider-outer img').attr('src'),
    pid: 'top',
    tmall: false,
    pdd: G.site === 'yangkeduo',
    shopName: G.site === 'yangkeduo' ? '拼多多' : '京东',
    title: $('.enable-select').text()
  };
  $('#bjg-coupon-placeholder').replaceWith(template.compile(html)({
    data: data,
    price: data.coupon,
    url: data.click_url2,
    tle: G.dp.title,
    isShowPic: info._jump === 'qrcode',
    picUrl: 'xx',
    isBottom: false,
    lang: G.lang,
    site: G.site
  }));
  setTimeout(function () {
    var qr = false;
    $('.bjgou-coupon-take').hover(function () {
      if (!qr) {
        getQRCode(productInfo, data.click_url2, function (qrcodeData) {
          qr = true;
          $('.bjgou-coupon-take img').attr('src', qrcodeData[0].imgSrc);
          $('.bjgou-coupon-take img').css('visibility', 'visible');
        }, true);
      }
    });
  }, 0);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5), __webpack_require__(1)))

/***/ }),
/* 656 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', coupon = $data.coupon, $escape = $imports.$escape, qrcode = $data.qrcode, s_server = $data.s_server;
    $$out += '<div class="gwd-qrcode">\n    ';
    if (coupon) {
        $$out += '\n    <div class="top-coupon">\n        <span style="font-size: 13px; color: white; font-family: Microsoft Yahei">';
        $$out += $escape(coupon);
        $$out += '</span>\n    </div>\n    ';
    }
    $$out += '\n    <img src="';
    $$out += $escape(qrcode);
    $$out += '" alt="" style="width: 130px; height: 130px; margin-top: 10px;">\n    <span><span style="color: #14a723; font-weight: bold; font-size: 14px;">微信扫码</span> 购买</span>\n</div>\n<style lang="less">\n    .gwd-qrcode {\n        position: fixed;\n        bottom: 9px;\n        width: 160px;\n        height: 173px;\n        left: 50%;\n        margin-left: 410px;\n        box-sizing: border-box;\n        border: 1px solid #e02d24;\n        background: #fff7f6;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n    }\n\n    .gwd-qrcode .top-coupon {\n        width: 160px;\n        height: 28px;\n        text-align: center;\n        line-height: 28px;\n\n        position: absolute;\n        top: -38px;\n        left: -1px;\n        background: url(';
    $$out += $escape(s_server);
    $$out += '/images/extensions/coupon_background@2x.png);\n        background-size: contain;\n    }\n\n    .gwd-qrcode span {\n        text-align: center;\n        font-size: 12px;\n        font-family: "Microsoft YaHei", "Arial", "SimSun";\n        color: #333333;\n        margin-top: 4px;\n        margin-bottom: 10px;\n    }\n</style>';
    return $$out;
};

/***/ }),
/* 657 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', isShowPic = $data.isShowPic, $escape = $imports.$escape, url = $data.url, price = $data.price, picUrl = $data.picUrl, useTaobao = $data.useTaobao, isBottom = $data.isBottom;
    $$out += '<span class="coupon-marleft"></span>\n<a id="top_coupon_btn" title="点击领取" ';
    if (!isShowPic) {
        $$out += ' href="';
        $$out += $escape(url);
        $$out += '" target="_blank" style="cursor:pointer" ';
    }
    $$out += '>\n<span class="top-coupon-tle">当前商品领券立减</span>\n<span class="price-num"><span class="price-sm">\xA5</span><span>';
    $$out += $escape(price);
    $$out += '</span></span>\n<em class="link_hand"></em>\n';
    if (picUrl && isShowPic) {
        $$out += '\n<div class="coupon_detail">\n    <img src="';
        $$out += $escape(picUrl);
        $$out += '">\n\n    <span>';
        $$out += $escape(useTaobao ? '淘宝' : '微信');
        $$out += '扫码领券</span>\n</div>\n';
    }
    $$out += '\n<style>\n    #top_coupon_btn {\n        background: url(https://cdn.gwdang.com/images/extensions/coupon@3x.png) 0 0 no-repeat;\n        display: inline-flex;\n        height: 28px;\n        width: 149px;\n        white-space: nowrap;\n        position: relative;\n        z-index: 999999999999;\n        padding: 0 !important;\n        margin: 3px 40px 4px 0!important;\n        border: none !important;\n        background-size: cover;\n        align-items: center;\n        text-decoration: none!important;\n    }\n</style>\n';
    if (isShowPic) {
        $$out += '\n<style>\n    #top_coupon_btn * {\n        cursor: default;\n    }\n</style>\n';
    } else {
        $$out += '\n<style>\n    #top_coupon_btn * {\n        cursor: pointer;\n    }\n</style>\n';
    }
    $$out += '\n';
    if (isBottom) {
        $$out += '\n<style>\n    .coupon_detail {\n        bottom: 28px;\n    }\n</style>\n';
    } else {
        $$out += '\n<style>\n    .coupon_detail {\n        top: 28px;\n    }\n</style>\n';
    }
    $$out += '\n<style>\n\n</style>\n<style type="text/css">\n\n    .coupon_detail {\n        position: absolute;\n        right: 1px;\n        height: 156px;\n        width: 146px;\n        z-index: 99999999999;\n        background: #FFF6F4;\n        border: 1px solid #FF6132;\n        display: none;\n    }\n\n    #top_coupon_btn:hover .coupon_detail {\n        display: block;\n    }\n\n    #top_coupon_btn:hover .gwd-qrcode-container {\n        display: flex;\n    }\n\n    .coupon_detail img {\n        width: 118px;\n        height: 118px;\n        float: left;\n        margin-left: 14px;\n        margin-top: 8px;\n    }\n\n    .coupon_detail span {\n        font-size: 14px;\n        color: #FF4335 !important;\n        letter-spacing: 0.22px;\n        font-weight: bold;\n        float: left;\n        height: 14px;\n        line-height: 14px;\n        width: 100%;\n        margin-top: 6px;\n        text-align: center;\n    }\n\n    .coupon-marleft {\n        height: 100%;\n        width: 10px;\n        border-left: 1px solid #edf1f2;\n    }\n\n    .link_hand {\n        display: inline-block;\n        height: 30px;\n        width: 38px;\n        position: absolute;\n        right: -38px;\n        top: -2px;\n        background: url(https://cdn.gwdang.com/images/extensions/newbar/hand.gif) 0px 0px no-repeat;\n    }\n\n    #top_coupon_btn * {\n        color: #fff;\n        /*float: left;*/\n        font-family: "microsoft yahei";\n    }\n\n    #top_coupon_btn .top-coupon-tle {\n        height: 12px;\n        text-align: center;\n        line-height: 12px;\n        margin-left: 4px;\n        font-size: 12px !important;\n        font-weight: normal !important;\n    }\n\n    #top_coupon_btn .price-num {\n        font-size: 14px;\n        color: #FFFFFF;\n        font-weight: bold;\n        width: 46px;\n        height: 22px;\n        text-align: center;\n        margin-left: 3px;\n        line-height: 22px !important;\n        padding: 0px !important;\n        vertical-align: middle;\n    }\n\n    #top_coupon_btn .price-num span {\n        display: inline;\n    }\n\n    #top_coupon_btn .price-sm {\n        font-size: 12px;\n        transform: scale(0.8333);\n        transform-origin: bottom right;\n    }\n\n    #bjgext_mainbar .coupon_detail {\n        top: initial!important;\n    }\n</style>\n';
    if (useTaobao) {
        $$out += '\n<style>\n    .coupon_detail, .minicoupon_detail {\n        transform: scale(1.3);\n        transform-origin: top center;\n    }\n</style>\n';
    }
    $$out += '\n</a>';
    return $$out;
};

/***/ }),
/* 658 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, regeneratorRuntime, $) {

var _this = this;

var template = __webpack_require__(13);
var request = __webpack_require__(3);
var globalCondition = __webpack_require__(4);

var posDict = {
  '360buy': {
    '#fitting-suit': ['#fitting-suit', 'before'],
    '#fittings': ['#fittings', 'before'],
    '#shopRecSuit': ['#shopRecSuit', 'before']
  },
  '360buy-re': {
    '#similar_goods': ['#similar_goods', 'prepend']
  },
  'amazon': {
    '#buyxgety_feature_div': ['#buyxgety_feature_div', 'before'],
    '#rhf-container .rhf-border': ['#rhf-container .rhf-border', 'before'],
    '#fallbacksession-sims-feature': ['#fallbacksession-sims-feature', 'before']
  },
  '51buy': {
    '.grid_c1 .xtiein': ['.grid_c1 .xtiein', 'before']
  },
  'suning': {
    '#accessoryInfo': ['#accessoryInfo', 'prepend'],
    '#listProContent': ['#listProContent', 'prepend'],
    '.wrapper .procon-side': ['.wrapper .procon-side', 'before']
  },
  'dangdang': {
    '#main_bd .show': ['#main_bd .show', 'after'],
    '#main_bd .product_main': ['#main_bd .product_main', 'after']
  },
  'gome': {
    '#gm-other-info': ['#gm-other-info', 'prepend']
  },
  'yihaodian': {
    '.fm_detail_one': ['.fm_detail_one', 'after']
  },
  'jumei': {
    '.layout_1090 .deal_content': ['.layout_1090 .deal_content', 'after'],
    '.mall_detail_wrap': ['.mall_detail_wrap', 'append']
  },
  // 'jumeiglobal': {
  //   '#deal_prefer': ['#deal_prefer', 'before']
  // },
  'vmall': {
    '#group-area+.hr-20+.layout': ['#group-area+.hr-20+.layout', 'prepend']
  },
  'feiniu': {
    '#tracker_item .product-about': ['#tracker_item .product-about', 'before']
  },
  'yougou': {
    '#goodsContainer+p': ['#goodsContainer+p', 'after']
  },
  'kaola': {
    '.PInfoWrap': ['.PInfoWrap', 'after']
  },
  'vipshop': {
    '#J-FW-detail .M-detail': ['#J-FW-detail .M-detail', 'before']
  },
  'womai': {
    '.detail_main': ['.detail_main', 'prepend'],
    '.detailed': ['.detailed', 'before']
  },
  'jiuxian': {
    '.detail-box2': ['.detail-box2', 'before']
  },
  'secoo': {
    '#showAdds': ['#showAdds', 'before']
  },
  'wbiao': {
    '#history_buy': ['#history_buy', 'before']
  },
  'sfbest': {
    '.main-box': ['.main-box', 'before']
  },
  'miyabaobei': {
    '.poppro .bfd_div': ['.poppro .bfd_div', 'before']
  },
  'fengqu': {
    '#recommend': ['#recommend', 'before']
  },
  'ehaier': {
    '.product-details-box': ['.product-details-box', 'before']
  },
  'zol': {
    '#J_RecommendedDistributor': ['#J_RecommendedDistributor', 'before'],
    '.product-detail-box': ['.product-detail-box', 'after']
  }
};
var PageObj = {
  low: {
    loadPages: []
  },
  favor: {
    loadPages: []
  }
};
var animateLock = undefined;

module.exports.init = function (data) {
  var dp_id = data.now.dp_id;
  var site_id = data.now.site_id;
  if (dp_id.indexOf(site_id) === -1) {
    dp_id = dp_id + '-' + site_id;
  }
  getGuessInfo(dp_id, site_id);
};

var getGuessInfo = function getGuessInfo(dp_id, site_id) {
  if (dp_id == '') return;
  var url = G.server + '/brwext/guess_favor?dp_id=' + dp_id + '&site_id=' + site_id + '&union=' + G.union;
  request.get(url).done(function (data) {
    //延迟加载，方便计算京东页面尺寸
    setTimeout(function () {
      var msg = editData(data);
      renderView(msg);
    }, 400);
  });
};
var editData = function editData(data) {
  if (!data || data.length === 0) return data;
  for (var i = 0; i < data.length; i++) {
    data[i].price = (Number(data[i].price) / 100).toFixed(2);
  }
  return data;
};

var renderView = function renderView(data) {
  var size, pos, html, tbdata, tmdata, allAliData, x, view;
  return regeneratorRuntime.async(function renderView$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        size = data.length;
        pos = getPos();

        if (!(pos === false || data.length == 0)) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return');

      case 4:
        html = __webpack_require__(659);
        context$1$0.next = 7;
        return regeneratorRuntime.awrap(globalCondition.met('AliProducttaobao'));

      case 7:
        tbdata = context$1$0.sent;
        context$1$0.next = 10;
        return regeneratorRuntime.awrap(globalCondition.met('AliProducttmall'));

      case 10:
        tmdata = context$1$0.sent;
        allAliData = tbdata.map(function (x) {
          x.site_id = '123';
          x.img_url = x.pic_url.replace('100x100', '200x200');
          return x;
        }).concat(tmdata.map(function (x) {
          x.site_id = '83';
          x.img_url = x.pic_url.replace('100x100', '200x200');
          return x;
        })).filter(function (x) {
          return x.volume;
        }).sort(function (a, b) {
          return b.price - a.price;
        }).map(function (x) {
          x.price = parseFloat(x.price).toFixed(2);
          return x;
        });

        while (data.length < 5 && allAliData.length) {
          x = allAliData.pop();

          data.push(x);
        }
        view = template.compile(html, { escape: false })({
          'type': 'favor',
          data: data,
          loadImg: G.s_server + '/template/aug/images/new/120.gif',
          's_server': G.s_server
        });

        innerInsert(view, pos[0], pos[1]);
        PageObj['favor'].nowPage = 1;
        PageObj['favor'].data = data;
        setWidth(size, 'favor');
        checkImage(0, PageObj['favor']['perNum'], $('#bjg_inner_favor ul li .item_img img'));
        PageObj['favor'].loadPages.push(1);
        addEvent('favor');
        fixedInner();

      case 22:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var calNums = function calNums(contentWidth) {
  var nums = parseInt((contentWidth - 172) / (172 + 30));
  var resW = contentWidth - 172 - nums * (172 + 30);
  var itemResW = parseInt(resW / nums);
  return {
    nums: nums + 1,
    resW: 30 + itemResW
  };
};
var setWidth = function setWidth(size, type) {
  var width = $('#bjg_inner_' + type).outerWidth();
  var contentWidth = width - 74 * 2;
  $('#bjg_inner_' + type + ' .inner_pro_list').width(contentWidth);
  var calObj = calNums(contentWidth);
  var nums = calObj.nums;
  var resW = calObj.resW;
  var pages = Math.ceil(size / nums);
  PageObj[type].pages = pages;
  PageObj[type].perNum = nums;
  PageObj[type].resW = resW;
  $('#bjg_inner_' + type + ' .inner_pro_list li:not(":first")').css('margin-left', resW + 'px');
  $('#bjg_inner_' + type + ' .total_page').text(pages);
};
var getPos = function getPos() {
  var position = posDict[G.site];
  for (var p in position) {
    if ($(p).length > 0) {
      if (position[p][1] == 'prepend' && $(p).css('display') == 'none') continue;
      return position[p];
    }
  }
  return false;
};
var innerInsert = function innerInsert(html, dom, pos) {
  switch (pos) {
    case 'before':
      $(dom).before(html);
      break;
    case 'append':
      $(dom).append(html);
      break;
    case 'after':
      $(dom).after(html);
      break;
    case 'prepend':
      $(dom).prepend(html);
      break;
  }
};
var setTimeFnc = function setTimeFnc(turntype, type) {
  if (animateLock) {
    setTimeout(function () {
      setTimeFnc(turntype, type);
    }, 100);
  } else {
    turnpage(turntype, type);
  }
};
var fixtime = 0;
var fixedInner = function fixedInner() {
  if (fixtime >= 10) return;
  if (G.site === 'suning') {
    if ($('#shopingGuideContent').length > 0) {
      $('#bjg_inner_favor').css('margin-top', '124px');
    } else {
      fixtime++;
      setTimeout(function () {
        fixedInner();
      }, 500);
    }
  }
};
var addEvent = function addEvent(type) {
  var timer = undefined;
  $('#bjg_inner_' + type).on('click', function (e) {
    var d = e.target;
    if (e.target.nodeName === "EM") d = e.target.parentNode;
    if ($(d).hasClass('turnpage')) {
      (function () {
        var turntype = 1;
        if ($(d).hasClass('inner_page_left')) {
          turntype = -1;
        }
        var type = $(d).attr('data-type');
        if (animateLock) {
          clearTimeout(timer);
          timer = setTimeout(function () {
            setTimeFnc(turntype, type);
          }, 450);
        } else {
          turnpage(turntype, type);
        }
      })();
    }
  });
  // $('.inner_page_left').on('click', function() {
  //   let type = $(this).attr('data-type');
  //   turnpage(-1, type)
  // })
  // $('.inner_page_right').on('click', function() {
  //   let type = $(this).attr('data-type');
  //   turnpage(1, type)
  // })
};
var turnpage = function turnpage(turntype, type) {
  var left = $('#bjg_inner_' + type + ' ul').css('left');
  left = Number(left.replace('px', '')) || 0;
  if (turntype === 1) {
    if (PageObj[type].nowPage === PageObj[type].pages) return;
    PageObj[type].nowPage++;
    left = left - PageObj[type].perNum * (172 + PageObj[type].resW);
  } else {
    if (PageObj[type].nowPage === 1) return;
    PageObj[type].nowPage--;
    left = left + PageObj[type].perNum * (172 + PageObj[type].resW);
  }
  var start = (PageObj[type].nowPage - 1) * PageObj[type]['perNum'];
  var end = PageObj[type].nowPage * PageObj[type]['perNum'];
  if (PageObj[type].loadPages.indexOf(PageObj[type].nowPage) === -1) {
    checkImage(start, end, $('#bjg_inner_' + type + ' ul li .item_img img'));
    PageObj[type].loadPages.push(PageObj[type].nowPage);
  }
  if ($('#bjg_inner_' + type + ' ul').animate) {
    animateLock = true;
    $('#bjg_inner_' + type + ' ul').animate({
      left: left + 'px'
    }, 400, function () {
      animateLock = false;
    });
  } else {
    $('#bjg_inner_' + type + ' ul').css('left', left + 'px');
  }
  $('#bjg_inner_' + type + ' .cur_page').text(PageObj[type].nowPage);
};

var checkImage = function checkImage(start, end, dom) {
  for (var i = start; i < end; i++) {
    var src = dom.eq(i).attr('data-src');
    if (!src) continue;
    loadImg(src, dom.eq(i));
  }
};
var loadImg = function loadImg(src, img) {
  var image = new Image();
  image.onload = function () {
    if (image.complete == true) {
      img.attr('src', src).removeClass('loadImg');
    }
  };
  image.onerror = function () {
    img.attr('src', G.s_server + '/images/extensions/default_load_image.png').removeClass('loadImg');
    img.attr('data-src', G.s_server + '/images/extensions/default_load_image.png');
  };
  image.src = src;
};

module.exports.renderLowest = function (data) {
  var size = data.length;
  var pos = getPos();
  if (pos === false || size == 0) return;
  var html = __webpack_require__(660);
  var view = template.compile(html, { escape: false })({
    'type': 'low',
    data: data,
    loadImg: G.s_server + '/template/aug/images/new/120.gif',
    's_server': G.s_server
  });
  innerInsert(view, pos[0], pos[1]);
  PageObj['low'].nowPage = 1;
  PageObj['low'].data = data;
  setWidth(size, 'low');
  checkImage(0, PageObj['low']['perNum'], $('#bjg_inner_low ul li .item_img img'));
  PageObj['low'].loadPages.push(1);
  addEvent('low');
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(5), __webpack_require__(1)))

/***/ }),
/* 659 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, type = $data.type, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, loadImg = $data.loadImg, s_server = $data.s_server;
    $$out += '<div id="bjg_inner_';
    $$out += $escape(type);
    $$out += '" class="bjg_inner_lowprice">\n  <div class="bjg_inner_head">\n    <span class="big_title">\n        猜你喜欢\n    </span>\n    <span class="small_title">\n        看过本商品的还看了\n    </span>\n\n    <a class="bjg_inner_page">\n      <span class="cur_page">1</span>\n      <span>/</span>\n      <span class="total_page">1</span>\n    </a>\n  </div>\n  <div class="bjg_inner_content">\n    <a class="inner_page_left turnpage" data-type="';
    $$out += $escape(type);
    $$out += '"><em class="guess-bg"></em></a>\n    <div class="inner_pro_list" >\n      <ul class="bjg_';
    $$out += $escape(type);
    $$out += '_list" style="left:0px;">\n        ';
    $each(data, function ($value, $index) {
        $$out += '\n          <li class="';
        $$out += $escape($index == 0 ? 'li_first' : '');
        $$out += '">\n            <a class="item_img" href="';
        $$out += $escape($value.url);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank">\n              <img class="loadImg" src="';
        $$out += $escape(loadImg);
        $$out += '" data-src="';
        $$out += $escape($value.img_url);
        $$out += '" />\n              ';
        if ($value.newdiscount) {
            $$out += '\n                <em>';
            $$out += $escape($value.newdiscount);
            $$out += '折</em>\n              ';
        }
        $$out += '\n              ';
        if ($value.tspan) {
            $$out += '\n                ';
            $$out += $value.tspan;
            $$out += '\n              ';
        }
        $$out += '\n            </a>\n            <div class="inner_dp_desc">\n              <a class="dp_title" href="';
        $$out += $escape($value.url);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank">\n                ';
        $$out += $escape($value.title);
        $$out += '\n              </a>\n              <a class="small_desc">\n                <img class="gs-site-icon" src="';
        $$out += $escape(s_server);
        $$out += '/images/favicon/';
        $$out += $escape($value.site_id);
        $$out += '.png">\n                <span class="new_price">\n                    ';
        if ($value.ta && $value.ta.indexOf('券后价') > -1) {
            $$out += '券后价';
        }
        $$out += '\n                    \xA5';
        $$out += $escape($value.price);
        $$out += '\n                </span>\n              </a>\n            </div>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <a class="inner_page_right turnpage" data-type="';
    $$out += $escape(type);
    $$out += '"><em class="guess-bg"></em></a>\n  </div>\n</div>\n<style>\n  .bjg_favor_list .coupon_span {\n    position: absolute;\n    right: 0;\n    height: 16px;\n    line-height: 16px;\n    background-color: #FD274B;\n    color: #fff!important;\n    font-size: 12px;\n    bottom: 0;\n    left: 0;\n    text-align: center;\n  }\n</style>\n';
    return $$out;
};

/***/ }),
/* 660 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, type = $data.type, $each = $imports.$each, data = $data.data, $value = $data.$value, $index = $data.$index, loadImg = $data.loadImg;
    $$out += '<div id="bjg_inner_';
    $$out += $escape(type);
    $$out += '" class="bjg_inner_lowprice">\n  <div class="bjg_inner_head">\n    <span class="big_title">\n        历史最低价\n    </span>\n    <span class="small_title">\n        这些同类商品处于历史最低价\n    </span>\n\n    <a class="bjg_inner_page">\n      <span class="cur_page">1</span>\n      <span>/</span>\n      <span class="total_page">1</span>\n    </a>\n  </div>\n  <div class="bjg_inner_content">\n    <a class="inner_page_left turnpage" data-type="';
    $$out += $escape(type);
    $$out += '"><em class="guess-bg"></em></a>\n    <div class="inner_pro_list" >\n      <ul class="bjg_';
    $$out += $escape(type);
    $$out += '_list" style="left:0px;">\n        ';
    $each(data, function ($value, $index) {
        $$out += '\n          <li class="';
        $$out += $escape($index == 0 ? 'li_first' : '');
        $$out += '">\n            <a class="item_img" href="';
        $$out += $escape($value.url);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank">\n              <img class="loadImg" src="';
        $$out += $escape(loadImg);
        $$out += '" data-src="';
        $$out += $escape($value.img_url);
        $$out += '">\n              ';
        if ($value.discount) {
            $$out += '\n                <em>';
            $$out += $escape($value.discount);
            $$out += '折</em>\n              ';
        }
        $$out += '\n            </a>\n            <div class="inner_dp_desc">\n              <a class="dp_title" href="';
        $$out += $escape($value.url);
        $$out += '" title="';
        $$out += $escape($value.title);
        $$out += '" target="_blank">\n                ';
        $$out += $escape($value.title);
        $$out += '\n              </a>\n              <div class="small_desc">\n                <img class="gs-site-icon" src="https://cdn.bijiago.com/images/favicon/';
        $$out += $escape($value.site_id);
        $$out += '.png">\n                <span class="new_price">\n                    \xA5';
        $$out += $escape($value.price);
        $$out += '\n                </span>\n                <span class="old_price">\xA5';
        $$out += $escape($value.last_price);
        $$out += '</span>\n              </div>\n            </div>\n          </li>\n        ';
    });
    $$out += '\n      </ul>\n    </div>\n    <a class="inner_page_right turnpage" data-type="';
    $$out += $escape(type);
    $$out += '"><em class="guess-bg"></em></a>\n  </div>\n</div>';
    return $$out;
};

/***/ }),
/* 661 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, Vue) {// const data = require('data/transport.json')



module.exports.init = function (data) {
  if (!(G.aliSite || G.site === '360buy')) {
    return;
  }
  // let match = classId ? data[classId]: ''
  // if (!match && classId) {
  //   match = data[classId.substr(0, 4) + '0000']
  // }
  // require('common/extConsole').log(match)
  // if (!match) {
  //   match = {
  //     catName: ''
  //   }
  // }
  __webpack_require__(11).waitForConditionFn(function () {
    return $('#bjgext_mb_bg').length;
  });

  var el = document.createElement('DIV');
  $('#bjgext_mb_bg').prepend(el);
  var TransPort = __webpack_require__(662)['default'];
  new Vue({
    el: el,
    render: function render(h) {
      return h(TransPort, {
        props: {
          data: data
        }
      });
    }
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 662 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TransPort_vue_vue_type_template_id_666fed93_scoped_true__ = __webpack_require__(663);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TransPort_vue_vue_type_script_lang_js__ = __webpack_require__(203);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__TransPort_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__TransPort_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransPort_vue_vue_type_style_index_0_id_666fed93_scoped_true_lang_less__ = __webpack_require__(667);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__TransPort_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__TransPort_vue_vue_type_template_id_666fed93_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__TransPort_vue_vue_type_template_id_666fed93_scoped_true__["staticRenderFns"],
  false,
  null,
  "666fed93",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('666fed93')) {
      api.createRecord('666fed93', component.options)
    } else {
      api.reload('666fed93', component.options)
    }
    module.hot.accept("./TransPort.vue?vue&type=template&id=666fed93&scoped=true", function () {
      api.rerender('666fed93', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/bjgou/components/TransPort.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 663 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__ = __webpack_require__(664);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_template_id_666fed93_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 664 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-column pricedog-transport" }, [_vm.innerData.catName ? _c("div", { staticClass: "pricedog-transport-bar gwd-row gwd-align" }, [_c("span", { staticClass: "pricedog-bold" }, [_vm._v("\n      類別：" + _vm._s(_vm.innerData.catName) + "\n    ")])]) : _vm._e(), _vm._v(" "), !_vm.question && _vm.innerData.catName ? _c("div", {
    staticClass: "pricedog-transport-bar gwd-row pricedog-transport-result"
  }, [_c("span", {
    staticClass: "pricedog-bold pricedog-sub gwd-row gwd-align",
    staticStyle: { "padding-right": "8px" }
  }, [_vm._v("\n      運輸方式：\n    ")]), _vm._v(" "), _vm.innerData.catEmbargoAir !== "None" ? _c("span", {
    staticClass: "pricedog-sub gwd-row gwd-align",
    staticStyle: { flex: "1", "justify-content": "center" }
  }, [_c("img", {
    staticStyle: { width: "20px", height: "20px" },
    attrs: {
      src: __webpack_require__(665),
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "8px" } }, [_vm._v("空運")]), _vm._v(" "), _c("span", {
    "class": _vm.innerData.catEmbargoAir === "0" ? "pricedog-allow" : "pricedog-forbid",
    staticStyle: { "margin-left": "20px" }
  }, [_vm._v("\n        " + _vm._s(_vm.innerData.catEmbargoAir === "0" ? "允許" : "禁運") + "\n      ")]), _vm._v(" "), _vm.innerData.catEmbargoAir === "0" ? _c("img", {
    staticStyle: {
      width: "13px",
      height: "13px",
      "margin-left": "8px"
    },
    attrs: {
      src: __webpack_require__(201),
      alt: ""
    }
  }) : _c("img", {
    staticStyle: {
      width: "13px",
      height: "13px",
      "margin-left": "8px"
    },
    attrs: {
      src: __webpack_require__(202),
      alt: ""
    }
  })]) : _vm._e(), _vm._v(" "), _vm.innerData.catEmbargoSe !== "None" ? _c("span", {
    staticClass: "pricedog-sub gwd-row gwd-align",
    staticStyle: { flex: "1", "justify-content": "center" }
  }, [_c("img", {
    staticStyle: { width: "20px", height: "20px" },
    attrs: {
      src: __webpack_require__(666),
      alt: ""
    }
  }), _vm._v(" "), _c("span", { staticStyle: { "margin-left": "8px" } }, [_vm._v("海運")]), _vm._v(" "), _c("span", {
    "class": _vm.innerData.catEmbargoSe === "0" ? "pricedog-allow" : "pricedog-forbid",
    staticStyle: { "margin-left": "20px" }
  }, [_vm._v("\n        " + _vm._s(_vm.innerData.catEmbargoSe === "0" ? "允許" : "禁運") + "\n      ")]), _vm._v(" "), _vm.innerData.catEmbargoSe === "0" ? _c("img", {
    staticStyle: {
      width: "13px",
      height: "13px",
      "margin-left": "8px"
    },
    attrs: {
      src: __webpack_require__(201),
      alt: ""
    }
  }) : _c("img", {
    staticStyle: {
      width: "13px",
      height: "13px",
      "margin-left": "8px"
    },
    attrs: {
      src: __webpack_require__(202),
      alt: ""
    }
  })]) : _vm._e()]) : _vm._e(), _vm._v(" "), !_vm.question && _vm.innerData.catName ? _c("div", { staticClass: "pricedog-transport-bar gwd-column" }, [_c("span", {
    staticClass: "pricedog-bold",
    staticStyle: { "line-height": "40px" }
  }, [_vm._v("進口限製：")]), _vm._v(" "), _c("div", { staticStyle: { "padding-bottom": "10px" } }, [_c("span", {
    "class": _vm.innerData.catShptBrief ? "pricedog-forbid" : "pricedog-allow"
  }, [_vm._v(_vm._s(_vm.innerData.catShptBrief ? _vm.innerData.catShptBrief : "無限製"))])])]) : _vm._e(), _vm._v(" "), _vm.question && _vm.innerData.catName ? _c("div", {
    staticClass: "pricedog-transport-bar gwd-column pricedog-question"
  }, [_c("span", {
    staticClass: "pricedog-bold",
    staticStyle: { "line-height": "40px" }
  }, [_vm._v(_vm._s(_vm.question))]), _vm._v(" "), _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "padding-bottom": "16px" }
  }, [_c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.currentSelect,
      expression: "currentSelect"
    }],
    attrs: { type: "radio", value: "qaRadioA" },
    domProps: { checked: _vm._q(_vm.currentSelect, "qaRadioA") },
    on: {
      change: function change($event) {
        _vm.currentSelect = "qaRadioA";
      }
    }
  }), _c("span", [_vm._v(_vm._s(_vm.radioA))]), _vm._v(" "), _c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.currentSelect,
      expression: "currentSelect"
    }],
    staticStyle: { "margin-left": "40px" },
    attrs: { type: "radio", value: "qaRadioB" },
    domProps: { checked: _vm._q(_vm.currentSelect, "qaRadioB") },
    on: {
      change: function change($event) {
        _vm.currentSelect = "qaRadioB";
      }
    }
  }), _c("span", [_vm._v(_vm._s(_vm.radioB))]), _vm._v(" "), _c("button", {
    "class": {
      "pricedog-active": _vm.currentSelect,
      "gwd-button": _vm.currentSelect
    },
    on: { click: _vm.submit }
  }, [_vm._v("提交")])])]) : _vm._e(), _vm._v(" "), !_vm.innerData.catName ? _c("div", { staticClass: "pricedog-transport-bar gwd-row gwd-align" }, [_c("span", [_vm._v("很抱歉，暫未獲取到該商品的集運信息，pricedog努力收錄中～")])]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 665 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABEtJREFUWEe9mUFMG1cQhv9ZBMYJSewQNcUJla1ESD3Z7o1TIWcOVQ+9Qg/F5oTDNYeYqr0mTi/BXEquvVSROBd6am9rnyohRbaUYGiVgJNQCEbeqWZhXe9m1959xjzJsmS/mfftzJs382YJiiP7Up9qDmpJzeApACkGIgRERB0DdWJUQagyc1kzsLkynt5UWYqCCOUqeuRwWFsEc86CCSAvwJsEXl4ZS1f9yvkCFLCjkPYQ4JxfxR3nEdb8gnYFzOyWF9ngvILFuj1LlYnyq2PJZ50mdgTM1MqPz81qHhQMKqzGkve9IF0BT11KvwKQAOj/YJTCDZ4uJNJ152KugJlaSZfI7D+ZbYXNYiw13RWwF7dODF3GJW0ApQ/vlJ7Nzd02C363o89pTD+raJ+5chMzI5+aousHu1h//7eKGjD4/mosXbCEW4DZHT3OTBsA4kE1jw4M4cdPPreJPXrzAluNg6CqZH49fMwJaz+2AOdr+hqBZlU03rt8A99cvWUT/eXdNn7797WKOrS72gQ8s15FSRuAmZGbmLly6l5rrL/fxfqBmptFR/iYo2JFE7AX64l8PwCZeXn1VloSBJCplcR6gfeeZa1+AMpeLMZSUZKqhAfM4FAefQIENXma5rf1PBE9VKbrk4uFR44cytRKktK+6gVwNjKOyfB1m4o/jvbwrP6yF7WC+FwAe0pr7Qe0k+YcIKs0Xyvtq5ZSbpY7Z8i6WJBV/OAHztL76uQIj/Ze4NBoBl4qMKAUA9loHBNDI4EWU4UM5GKBW7p+B7cHw4HgrMlvmg1IjpZvn8N0sa9DWgqChWhcGU4FkoGSr2NG4JZG70C+nWPr+MC0yOQl+zEjuVjmO38Xef+W5Oc0X9NzBHrsZXIvOAGTYkBKqslwFLORz2wqnu5VUT5+a0JKpnGC+oGUfNw11TnTWDuYRZQcvoqFaMIG6KwH3UC7VTxmqjutZrzPQgvQDcwiklJ/afSuDfCH11uQyHWOdtAugNViLJU4rQe39Tx75OPU8DXz/OpUHbtV1A/++atjtIqMfDz1EtaKY6lvTcC5ih4JhWjfZ+h/NG18MIwHNyZ8WdDvGkSckBZJq+TPvNIL0GjRrwJrnlcQ+QkCz7XOrCf/twDFikMhqgTNy3L8WFlF9ukhNyHbQkbpw1us7PvuE1m8FSK+ZzWYbNfOhZqeMzocOW5PLEF0yAb+PNpr5VrJOMnQNYjr5fIUZGhEc0/b+jUfdRZUXR0EwnOuwYXi7bStT+Pa+sjWSht8UX2Z/2n1Yiz1hRPeFfAsquWecjH9GcZGuMFf+24eWU9xAe5mGPzE6dZ2K3ZtYGZ39Dlm81KlfC1123MM7AP8fXsfxm1eV0Az0+zocYORV22NOBY2rRY+wbKbS33tQa8oawP9MoBFzSuFdP415p+GGyj4AbMYfFnQDVgu/IaGKSJKCiwDcdtrCNOFKEGj3+nEKKu+hvgPmHgb73e4zI0AAAAASUVORK5CYII="

/***/ }),
/* 666 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABPVJREFUWEe9mT1sG2UYx//PuYhIZEilCDJ0SCADA6gRYmgn7LjI3qgYy0CLVDaUZIMBNYGhbDGwsRCGdi2ZcEQTm4kMSHUpQwcgN2SAKlIyBOEK2w/6v+fXOd/3nay+0/nu/fjd//l4n3stKNjqLS0rcNEZaFkFSwrMCDDD6RQ4AeA6ClehD+E47WZF2kWWkjyDyi2dmQJWVHXVwuQY70KlDQcbzYq4WcdlAiTY88AtUV3NOnFiP5WtrKCpgLWWrkB1vYBiae/iQmS9WZHvkjomAtZaujkx1WIoVKWxU5W1OMhIQONrqvcAlNNkmMRzBTpPRSrtijC4xlokYG1v8ECApUksnmOOdnPZqaQC+s0qqR6aY/m4rmrSkmlR5h5DqO/2rkOcb+1cBMzK+MI54Moc8E8PuP9XdnD1AXqQurZTLTVGDPai3tJ5qLYAzBcBXHtVDCDbxx3Fo5A3RUOHAIGTpyIL1h9HAtXv97fgyPv+abIqSPW+WBK8PO2N3j4EvvndGi5ZzSBg0NQGcKjeQchBE0xMKAK9Ny943WxwwB+nwPQ54KUp4O8ujIrbh4o/T+MhowDZuytynip6gBHq8X6UggS7ekHwzgWA157PKX4+8oDYaOpLs4LLs95vAt5xFftHYdA4QKhuNKslbhBAfW9A9Ua+l+SDVIvm/HWoDqEIyfbilHdtf1PJ6pz3QlT3k07Y7HGALDh2lp3zwqpkGByh14tS0AL6A4H3rKmtaanYk643JV+IaHkAzcB+vyL13f46RG5FeUkS4Oe/qfG1K3NnwRGcg+mG5id8EUCmHKntDu6J4GpewOTYHH9Kk1PZj37JbuLhDNuStK35FaQZqZbNdXkAbV9C3nXV+K81f2yQeINcAh7HlVIW8NIs8OlrWfeUdHSCfrDvqZkEyECR+t4gNqNaQKaTr98U43OTaAygu8OaOkVBZAIk1KRUtL5oU1EqYBYTW9WYLuyuUVTJzcc6VkxkMXFkkiZAMM3QxDQ1TV6kMeVsPh4fmQwondxp5tq8l5SLtBv7Z8nbjk8x8bbUdvurIrKZNQ8WDRh/YPjXSgRU3ZD6j/+VUSqxDgy1uHLLbnfBAQyAqEj3p5XgmERAbnUcEBcoSfWgLQRo7v0jxR3Xq1rYmMyvDd2AQZFUvCYAus1lZ8GrZmL24yhAWxQQhkWprf0IdXlWcNrzSitOzGs+5xi6BvsHa8NYQJGtZkVuGMDhZ+ZxUH4/IBfgbkLzsnR6Zdr79qBCBGDwMLexH03KaofFK1MTm4XNnGZEFnhEMgrH2m6/ISIrfkg/INMLK2jr7DaaLRSVIRQVs1AWjPe50O0lbzfyQ0YqOFTPpDoLZM5fVA/8+7If8Oait8Hze8M2mrU6J3h0oua+v1C9uSh40lV8f3hWGFDdDxdhqm9bXUcAHkBk2R4wjSW0YMrJ+tFUJCfG5kGR6/7zmlDG9Zu6WDrOj2urFVFt/FAtjZ3TRDLU9wbMi8/kXMan5IOdqvNGKFCj3nfoj61ndj4jaHUh72Y+PLLQUZGd34CJI1RUvwyadSyTpC04PK/hR1XoszRtbNJzBY6h+pn/HCaqf6Y48E4eBuvA+NFIQUCj2r+OsxFl0kw+GLewD/StHIqaIDXfF6pfdR2nkQXMMmRSMArYVEGOU1bIRYgxP8uD0d8QAhwPFB1x5Cfp9R42336u0N8Q/wPwjWm+vTxB1wAAAABJRU5ErkJggg=="

/***/ }),
/* 667 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_style_index_0_id_666fed93_scoped_true_lang_less__ = __webpack_require__(668);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_style_index_0_id_666fed93_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TransPort_vue_vue_type_style_index_0_id_666fed93_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 668 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(669);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("f14bb27c", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransPort.vue?vue&type=style&index=0&id=666fed93&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransPort.vue?vue&type=style&index=0&id=666fed93&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 669 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".pricedog-transport[data-v-666fed93] {\n  box-sizing: border-box;\n  width: 462px;\n  border: 1px solid #eeeeee;\n  margin-bottom: 10px;\n  background: white;\n}\n.pricedog-transport span[data-v-666fed93] {\n  font-size: 13px;\n  color: #3c4c54;\n}\n.pricedog-transport .pricedog-forbid[data-v-666fed93] {\n  color: #ff4449;\n}\n.pricedog-transport .pricedog-allow[data-v-666fed93] {\n  color: #44cc66;\n}\n.pricedog-transport .pricedog-bold[data-v-666fed93] {\n  font-weight: normal;\n  font-size: 14px;\n  color: #000000;\n}\n.pricedog-transport .pricedog-transport-bar[data-v-666fed93] {\n  min-height: 40px;\n  border-bottom: 1px solid #eeeeee;\n  padding-left: 16px;\n  padding-right: 16px;\n}\n.pricedog-transport .pricedog-transport-bar[data-v-666fed93]:last-of-type {\n  border-bottom: none;\n}\n.pricedog-transport .pricedog-transport-result .pricedog-sub[data-v-666fed93] {\n  border-right: 1px solid #eeeeee;\n}\n.pricedog-transport .pricedog-transport-result .pricedog-sub span[data-v-666fed93] {\n  font-size: 14px;\n}\n.pricedog-transport .pricedog-transport-result .pricedog-sub[data-v-666fed93]:last-of-type {\n  border-right: none;\n}\n.pricedog-transport .pricedog-question input[type=radio][data-v-666fed93] {\n  margin-top: 0;\n  margin-left: 0;\n  margin-right: 8px;\n  width: 16px;\n  height: 16px;\n  position: relative;\n  appearance: none;\n  bottom: 0;\n  cursor: pointer;\n}\n.pricedog-transport .pricedog-question input[type=radio][data-v-666fed93]::after {\n  content: '';\n  position: absolute;\n  width: 16px;\n  height: 16px;\n  box-sizing: border-box;\n  border: 2px solid #999999;\n  border-radius: 8px;\n  z-index: 2;\n}\n.pricedog-transport .pricedog-question input[type=radio][data-v-666fed93]:checked::after {\n  content: '';\n  position: absolute;\n  width: 16px;\n  height: 16px;\n  box-sizing: border-box;\n  border: 2px solid #ff6132;\n  border-radius: 8px;\n  z-index: 2;\n}\n.pricedog-transport .pricedog-question input[type=radio][data-v-666fed93]:checked::before {\n  content: '';\n  position: absolute;\n  width: 10px;\n  height: 10px;\n  border-radius: 5px;\n  top: 50%;\n  left: 50%;\n  margin-top: -5px;\n  margin-left: -5px;\n  background: #ff6132;\n  box-sizing: border-box;\n  z-index: 2;\n}\n.pricedog-transport .pricedog-question button[data-v-666fed93] {\n  margin-left: 52px;\n  width: 60px;\n  height: 30px;\n  background: #F0ECEC;\n  border-radius: 4px;\n  font-size: 14px;\n  color: #3c4c54;\n  border: none;\n}\n.pricedog-transport .pricedog-question button.pricedog-active[data-v-666fed93] {\n  color: #FFFFFF;\n  cursor: pointer;\n  background: #FF6132;\n}\n", ""]);

// exports


/***/ }),
/* 670 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G) {

var sitearr = ['360buy', 'suning', 'gome', 'yihaodian', 'dangdang', 'kaola', 'tmall'];
var inventoryCheck = __webpack_require__(671);
var log = __webpack_require__(14);
var userData = __webpack_require__(15);
// const request = require('common/request')

var promosPattern = {
  'tmall': function tmall() {
    var promo = $('.tm-shopPromo-panel').text().trim();
    if (!promo) {
      promo = $('[class^=Promotion--caption]').text().trim();
    }
    if (!promo) {
      promo = $('.contentWrap--eIMKdlQ7 > .couponInfo--DRQjTMKl [class^=couponText--]').toArray().map(function (x) {
        return x.innerText;
      }).join(',');
    }
    return {
      promo: promo
    };
  },
  '360buy': function buy() {
    var tle1 = $('.J-more-prom-ins').text();
    var tle2 = $('.J-prom em.hl_red_bg').text();
    var price = $('.J-summary-price .p-price').text().replace(/[￥¥\s]+/g, '');
    var arr = [];
    if (tle1.indexOf('满减') > -1 || tle2.indexOf('满减') > -1) {
      arr.push('满减:' + $('.J-prom em.hl_red_bg:contains("满减") + em.hl_red').text());
    }
    if (tle1.indexOf('多买优惠') > -1 || tle2.indexOf('多买优惠') > -1) {
      arr.push('多买优惠:' + $('.J-prom em.hl_red_bg:contains("多买优惠") + em.hl_red').text());
    }
    if (tle1.indexOf('满折') > -1 || tle2.indexOf('折') > -1) {
      arr.push('满折:' + $('.J-prom em.hl_red_bg:contains("满折") + em.hl_red').text());
    }
    if ($('#summary-quan .quan-item').text().length > 0) {
      var text = Array.prototype.map.call($('#summary-quan .quan-item'), function (v) {
        return $(v).text().replace(/\s/g, '');
      }).join(',');
      arr.push('领券:' + text);
    }
    return {
      price: price,
      promo: arr.join(';')
    };
  },
  'suning': function suning() {
    var dom = $('#voucherTitle');
    var labels = dom.find('label').text().replace(/\s/g, '');
    var text = '';
    var arr = [];
    if (labels.indexOf('满减') > -1 && dom.is(':visible')) {
      text = $('#voucherBox').text();
      var smtxt = $('#voucherBox a').text();
      text = '满减:' + text.replace(smtxt, '');
      arr.push(text);
    }
    if ($('#getCoupon').length > 0 && $('#getCoupon').is(':visible')) {
      var text2 = Array.prototype.map.call(document.querySelectorAll('#freeCouponBox .p-quan2 .p-quan-white'), function (e) {
        return $(e).text();
      }).join(",");
      if (text2) {
        text2 = "领券:" + text2;
        arr.push(text2);
      }
    }
    return {
      promo: arr.join(";")
    };
  },
  'gome': function gome() {
    var dom = $('.prd-promotions-red');
    var labels = dom.find('label').text();
    var texts = [];
    if (dom.is(':visible') && labels.indexOf('满减') > -1) {
      texts.push('满减:' + $('.prd-promotions-red label:contains("满减")+span').text().replace(/\s/g, ''));
    }
    if (dom.is(':visible') && labels.indexOf('领劵') > -1) {
      texts.push('领券:' + $('.prd-promotions-red label:contains("领劵")+b').text().replace(/(?:左边|右边)/g, '').replace(/劵/g, '券'));
    }
    if ($('.prd-price-left').is(':visible') && $('.prd-price-left').text().indexOf('劵') > -1) {
      var arr = $('#lanjuan b').text().match(/满\d+减\d+/g);
      if (arr.length > 0) {
        texts.push('领券：' + arr.join(','));
      }
    }
    return {
      promo: texts.join(';')
    };
  },
  'yihaodian': function yihaodian() {
    var dom = $('#promotion_title');
    var arr = [];
    var labels = dom.find('.list .fl span.sub').text();
    if (labels.indexOf('满减') > -1 && dom.find('.list .fl span.sub').is(':visible')) {
      var text = "满减" + $('#promotion_title .list .fl span.sub:contains("满减")+ span.tit').text();
      arr.push(text);
    }
    if (labels.indexOf('折扣') > -1 && dom.find('.list .fl span.sub').is(':visible')) {
      var text = "折扣" + $('#promotion_title .list .fl span.sub:contains("折扣")+ span.tit').text();
      arr.push(text);
    }

    return {
      promo: arr.join(';')
    };
  },
  'dangdang': function dangdang() {
    var dom = $('#promo-list');
    var arr = [];
    if (dom.find('div.clearfix b:contains("满额减")').is(':visible')) {
      var txt = '满额减:' + $('#promo-list div.clearfix b:contains("满额减")+div.rule span').text();
      arr.push(txt);
    }
    if (dom.find('div.clearfix b:contains("店铺促销")').is(':visible')) {
      var txt = '店铺促销:' + $('#promo-list div.clearfix b:contains("店铺促销")+div.rule span').text();
      arr.push(txt);
    }
    return {
      promo: arr.join(';')
    };
  },
  'kaola': function kaola() {
    var arr = [];
    if ($('.promotionwrap .m-zd-prt .m-dp-prt-title:contains("满额减")').is(':visible')) {
      var text = '满额减:' + $('.promotionwrap .m-zd-prt .m-dp-prt-title:contains("满额减")+span a').text();
      arr.push(text);
    }
    if ($('.couponwrap').is(':visible')) {
      var text2 = '领券:' + Array.prototype.map.call(document.querySelectorAll('.couponwrap .li.ellipsis'), function (e) {
        return $(e).text();
      }).join(",");
      arr.push(text2);
    }
    return {
      promo: arr.join(';')
    };
  }
};
var getJdPromoInfo = function getJdPromoInfo() {
  var promos = [];
  var dom = $('#prom-one .J-prom .prom-item');
  var dom2 = $('#prom-quan .J-prom-quan');
  if (dom.length > 0) {
    for (var i = 0; i < dom.length; i++) {
      if (dom.eq(i).find('a').text().indexOf('详情') > -1) {
        var tle = dom.eq(i).find('.hl_red').text();
        var url = dom.eq(i).find('a').attr('href');
        promos.push(encodeURIComponent(tle) + ',' + encodeURIComponent(url));
      }
    }
  }
  if (dom2.length > 0) {
    for (var i = 0; i < dom2.length; i++) {
      if (dom2.eq(i).find('a').text().indexOf('详情') > -1) {
        var tle = dom2.eq(i).find('.hl_red').text();
        var url = dom2.eq(i).find('a').attr('href');
        promos.push(encodeURIComponent(tle) + ',' + encodeURIComponent(url));
      }
    }
  }
  return promos.join(';');
};

var getPromoInfo = function getPromoInfo(inventory) {
  var dp = G.dp;
  var other_info = userData.get('other_info');
  var promoinfo = promosPattern[G.site]();
  var price = other_info['code-server'].price || dp.price;
  if (!price) price = promoinfo.price;
  var info = {
    dp_id: other_info.now.dp_id,
    name: dp.name,
    price: price,
    promo: promoinfo.promo,
    stock: inventory
  };
  return info;
};
var getJdPromo = function getJdPromo(inventory, callback) {
  var dp = G.dp;
  var other_info = userData.get('other_info');
  var price = other_info['code-server'].price || dp.price;
  var promoinfo = promosPattern[G.site]();
  if (!price) price = $('.J-summary-price .p-price').text().replace(/[￥¥\s]+/g, '');
  var promo_info = getJdPromoInfo();
  var zytxt = $('.name.goodshop.EDropdown').text();
  var isZy = '0';
  if (zytxt.indexOf('自营') > -1) {
    isZy = '1';
  }
  if (!dp.fans_price) dp.fans_price = $('.fans-price .p-price-fans span').text().replace(/[￥¥]+/, '');
  var info = {
    dp_id: other_info.now.dp_id,
    name: dp.name.trim(),
    price: price,
    promo: promoinfo.promo,
    promo_info: promo_info,
    plus_price: dp.plus_price,
    fans_price: dp.fans_price,
    isZy: isZy,
    stock: inventory
    // cat: cat,
    // venderId: vendorId,
    // noquan: noquan
  };
  info = JSON.stringify(info);
  callback(info);
};

var specialFilter = function specialFilter() {
  if (G.site === 'suning') {
    if ($('#timePanel span').text().indexOf('定金团') > -1 && $('#mainPrice .price-promo span').text().indexOf('定金') > -1) {
      return true;
    }
  }
  if (G.site === '360buy') {
    if ($('#pingou .summary-price').text().indexOf('定金') > -1) {
      return true;
    }
  }
  return false;
};

var sendPromo = function sendPromo(info) {
  if (window.XMLHttpRequest) {
    try {
      var xml = new XMLHttpRequest();
      xml.open('POST', G.server + '/extension?ac=sendPromos&site_id=' + G.site_id + '&jfrom=int');
      xml.send(info);
      log('sendPromo_success');
    } catch (e) {}
  }
};
module.exports.init = function () {
  if (G.new_extension || G.btype == 'luyou') return;
  if (G.dp.activePrice) return;
  if (specialFilter()) return;
  try {
    var inventory = inventoryCheck.init(G.site);
    if (sitearr.indexOf(G.site) > -1) {
      if (G.site == '360buy') {
        getJdPromo(inventory, sendPromo);
      } else {
        var info = getPromoInfo(inventory);
        info = JSON.stringify(info);
        sendPromo(info);
      }
    }
  } catch (e) {}
};
module.exports.specialFilter = specialFilter;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 671 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {var __WEBPACK_AMD_DEFINE_RESULT__;/*
 * 库存实时反馈模块
 * 监控当前网站库存情况，并提取单品页商品库存数据
 * @version:0.0.1
 * @author:OuyJun(oyjh2011@gmail.com)
 * @since:2014-02-17
 *
 */


!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  'use strict';
  var $ = __webpack_require__(1);
  return {
    //部分主流站点的库存(普通单品页)模板
    //lefeng jiuxian 暂时没有处理
    inventoryPatterns: {
      '360buy': {
        '#stocktext strong': '无货',
        '#store-prompt strong': '无货', //无货
        '#store-prompt': '无货',
        '#stock-state': '无货',
        '#product-intro .itemover-title h3 strong': '商品已下柜' //商品已下柜
      },
      '51buy': {
        '#sea_buy_wrap': '到货通知', //到货通知
        '#buyQty .godds_info_data span[style]': '无货'
        //'a.xbtn_notsale' : '\u6682\u4E0D\u9500\u552E'//暂不销售
      },
      'amazon': {
        '.a-color-price': '缺货登记',
        '.ddm-sbr-avail-title': '缺货登记', //缺货登记
        '#dynamicDeliveryMessage,#ddmAvailabilityMessage': '目前无货',
        '#dynamicDeliveryMessage span': '缺货登记'

      },
      'yihaodian': {
        '#arrivalNotice span': '到货通知', //到货通知
        '#notSaleBtn .cartbox a span': '已售完', //已售完
        '#detail_addToCart span.steal_btn': '抢光了', //抢光了
        '.buy_btn3:visible': '已售完',
        '#detailStockInfo': '无货',
        '#addCart': '已售完' //如果不加入这个，总是返回-2
      },
      'suning': {
        '#c_kucun span': '无货', //无货
        '#recomTitle': '商品已下架',
        '#c_kucun': '无货'
      },
      'dangdang': {
        '#stock_writing_status': '缺货', //缺货
        '.show_info_right strong.qh': '暂时缺货|罄', //暂时缺货
        '#geo-info': '无货'
      },
      'gome': {
        '#stockTxt': '无货|下架|无货|暂不可送' //无货|下架|暂不可送
      },
      'yougou': {
        '.buy': '已售罄',
        '.soldoutsty .fb': '此颜色商品已售罄'
      },
      'vmall': {
        '.button-notice-arrival span': '到货通知' //到货通知
      },
      'vancl': {
        '.danpin_SouqingTitle h3': '该商品暂不能购买',
        '.NowHasGoods': '无货'
      },
      'jumei': {
        '.soldout_text': '已抢光',
        '.add_cart a.subscribe': '订阅到货通知' //订阅到货通知
      },
      'newegg': {
        '#inventory .inventoryText': '暂无|接受预定', //暂无|接受预定
        '#getQueueNumber': '立即预订',
        '.godds_info_data span:contains("库存")': '接受预定'
      },
      'moonbasa': {
        '#spanCountk': '无货'
      },
      'winxuan': {
        '.status': '无货'
      },
      'happigo': {
        '#goodskucun .f_red': '无货'
      },
      'xijie': {
        '.detail_pro_c_con': '很抱歉，该商品已售空'
      },
      'lingshi': {
        '#currentLocation': '无货'
      },
      'yesmywine': {
        '#delivery-tip': '无货'
      },
      'bookuu': {
        '.stock span': '无货'
      },
      'homevv': {
        '#stock+.hom': '缺货'
      },
      'lenovo': {
        '#idstockstatus': '暂无库存'
      },
      'secoo': {
        '#location-t+i': '无货'
      },
      'yummy77': {
        '#stockdesc': '无货'
      },
      'fruitday': {
        '.have': '无货'
      },
      'kaola': {
        '#js_dometxt': '无货'
      },
      'kjt': {
        '.black': '无货'
      },
      'jiumei': {
        '#kucuninfo .font14': '无货'
      },
      'womai': {
        '.nobuy_top_tit': '商品已售完，暂时无货', //商品已售完，暂时无货
        '.unsellable_recommend_description': '商品已售完' //商品已售完
      },
      /*
      'vjia':{},
      'okbuy':{},
      'yintai':{},
      */
      'sfbest': {
        '#arrival_notice': '到货通知',
        '#stock font': '缺货', //缺货
        '#cart-add-btn-sf': '到货|缺货'
      },
      'lefeng': {
        '.disexp span.stime': '无货' //无货
      },
      'leyou': {
        '#stockStatus': '无货'
      },
      'jiuxian': {
        '#respNubs': '无货'
      }
    },
    init: function init(siteName) {
      siteName = siteName || G.pageInfo.siteName;
      return this.getCheckInventory(siteName);
    },
    //获取当前页面商品库存
    //1是正常，0是无货，-2是下架
    getOnlineInventory: function getOnlineInventory(siteName) {
      var inventoryText = {
        'online': null,
        'pattern': null
      };
      var stringToUnicode = function stringToUnicode(str) {
        return str.replace(/[^\u0000-\u00FF]/g, function ($0) {
          return escape($0).replace(/(%u)(\w{4})/gi, '\\u$2');
        });
      };

      try {
        if (typeof this.inventoryPatterns[siteName] != 'undefined') {
          var patterns = this.inventoryPatterns[siteName];
          for (var selection in patterns) {
            try {
              if ($(selection).is(':visible')) {
                inventoryText['online'] = $(selection).html();
                if (inventoryText['online'] !== null) {
                  inventoryText['online'] = stringToUnicode(inventoryText['online']);
                  inventoryText['pattern'] = stringToUnicode(patterns[selection]);
                  return inventoryText;
                }
              }
            } catch (e) {
              /*eslint-disable */
              if (G.debug) {
                console.log(e);
              }
              /*eslint-enable */
            }
          }
        }
      } catch (e) {
        /*eslint-disable */
        if (G.debug) {
          console.log(e);
        }
        /*eslint-enable */
      }
      return inventoryText;
    },
    //校验库存
    getCheckInventory: function getCheckInventory(siteName) {
      var inventory = 1;
      var inventoryTextArray = this.getOnlineInventory(siteName);
      var onlineUnicodeText = inventoryTextArray['online'],
          patternUnicodeText = inventoryTextArray['pattern'];
      try {
        if (onlineUnicodeText !== null && onlineUnicodeText != '' && patternUnicodeText !== null) {
          if (patternUnicodeText.indexOf('|') >= 0) {
            var patternUnicodeTextArray = patternUnicodeText.split('|');
            for (var i in patternUnicodeTextArray) {
              if (onlineUnicodeText.indexOf(patternUnicodeTextArray[i]) >= 0) {
                inventory = 0;
              }
            }
          } else if (onlineUnicodeText.indexOf(patternUnicodeText) >= 0) {
            inventory = 0;
          }
        } else {
          inventory = -2;
        }
      } catch (e) {
        /*eslint-disable */
        if (G.debug) {
          console.log(e);
        }
        /*eslint-enable */
      }
      return inventory;
    }
  };
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 672 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {// 加载一些购物党插件不存在时才启用的功能



var _this = this;

module.exports.init = function () {
  setTimeout(function callee$1$0() {
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          if (!window.gwd_G) {
            // require('standard/module/qrlink').init()
          }

        case 1:
        case "end":
          return context$2$0.stop();
      }
    }, null, _this);
  }, 2000);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 673 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, regeneratorRuntime, G, Vue) {

var _this = this;

var extConsole = __webpack_require__(6);
var request = __webpack_require__(3);
var Tip = __webpack_require__(674)['default'];
var TipTbV3 = __webpack_require__(716)['default'];
var Tip1688 = __webpack_require__(723)['default'];
var bgClient = __webpack_require__(16);

var isOldTm = false;

var sitePosition = {
  '360buy': function buy() {
    var el = document.createElement('DIV');
    if ($('.information-wrap').length) {
      document.body.appendChild(el);
    } else {
      $('.product-intro').append(el);
    }
    return el;
  },
  'tmall': function tmall() {
    var el = document.createElement('DIV');
    // if ($('[class^=Item2024--mainInnerWrap]').length) {
    //   $('[class^=Item2024--mainInnerWrap]').append(el)
    // } else {
    //   $('[class^=Item--content--]').append(el)
    // }
    document.body.appendChild(el);
    return el;
  },
  'taobao': function taobao() {
    var el = document.createElement('DIV');
    // if ($('#detail').length) {
    //   $('#detail').append(el)
    // } else if ($('[class^=Item2024--mainInnerWrap]').length) {
    //   $('[class^=Item2024--mainInnerWrap]').append(el)
    // } else if ($('[class^=Item--content--]').length) {
    //   $('[class^=Item--content--]').append(el)
    // }
    document.body.appendChild(el);
    return el;
  },
  'vipshop': function vipshop() {
    var el = document.createElement('DIV');
    $('.J_M_product').append(el);
    return el;
  },
  '1688': function _() {
    var el = document.createElement('DIV');
    if ($('.gallery-fix-wrapper').length) {
      $('.gallery-fix-wrapper').append(el);
    } else {
      $('.detail-gallery-wrapper').append(el);
    }
    return el;
  },
  'amazon': function amazon() {
    var el = document.createElement('DIV');
    document.body.appendChild(el);
    return el;
  }
};

var is1688 = location.hostname.includes('.1688.com');

var get1688Img = function get1688Img() {
  var elements = $('.detail-gallery-turn-wrapper').toArray();
  var first = elements.filter(function (el) {
    return !$(el).find('.video-icon').length;
  })[0];
  return $(first).find('img').attr('src');
};

var get1688Price = function get1688Price() {
  if (window.__INIT_DATA) {
    var priceComponent = Object.values(__INIT_DATA.data).filter(function (x) {
      return x.componentType === '@ali/tdmod-od-pc-offer-price';
    });
    if (priceComponent.length) {
      return priceComponent[0].data.priceModel.currentPrices[0].price;
    }
  }
  return '';
};

var loadImg = function loadImg() {
  var img, imgEl, mainPic, specImg, config, c;
  return regeneratorRuntime.async(function loadImg$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        img = G.dp.img;
        imgEl = document.querySelector('[class^=PicGallery--thumbnailPic]');

        if (!(imgEl && !isOldTm)) {
          context$1$0.next = 6;
          break;
        }

        context$1$0.next = 5;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          if (imgEl) {
            img = imgEl.src;
            imgEl.style.border = '2px solid green';
            return true;
          }
          return false;
        }));

      case 5:
        img = img.split('_110x')[0];

      case 6:
        mainPic = document.querySelector('#J_UlThumb li:not(.tb-video-thumb) img');

        if (!(!is1688 && (mainPic || isOldTm))) {
          context$1$0.next = 12;
          break;
        }

        context$1$0.next = 10;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          return document.querySelector('#J_UlThumb');
        }));

      case 10:
        if (mainPic) {
          img = mainPic.src;
        }
        img = img.split('_50x50')[0];

      case 12:
        if (G.site === '360buy') {
          specImg = $('#spec-img').attr('data-origin');

          if (specImg) {
            img = 'https://' + specImg;
          }
        }

        if (!is1688) {
          context$1$0.next = 17;
          break;
        }

        context$1$0.next = 16;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          return document.querySelector('.detail-gallery-turn-wrapper');
        }));

      case 16:
        img = get1688Img();

      case 17:
        context$1$0.next = 19;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 19:
        config = context$1$0.sent;

        if (config.aliImgSelector) {
          c = config.aliImgSelector.find(function (item) {
            return $(item.container).length;
          });

          if (c) {
            img = $(c.img).attr('src');
            G.dp.img = img;
          }
        }

        if (G.site === 'amazon') {
          img = $('#imgTagWrapperId img').attr('src');
          if (!img) {
            img = $('.imgTagWrapper img').attr('src');
          }
        }

        window.gwd_temp_html = document.body.innerHTML;
        context$1$0.next = 25;
        return regeneratorRuntime.awrap(request.imgUrlToDataUri(img.replace('http:', 'https:')));

      case 25:
        return context$1$0.abrupt('return', context$1$0.sent);

      case 26:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  init: function init() {
    var load, bgVer;
    return regeneratorRuntime.async(function init$(context$1$0) {
      var _this2 = this;

      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!(G.site === 'amazon' && location.hostname !== 'www.amazon.com')) {
            context$1$0.next = 2;
            break;
          }

          return context$1$0.abrupt('return');

        case 2:
          load = function load() {
            var create = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];

            loadImg().then(function callee$2$0(res) {
              var price, _ret;

              return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
                while (1) switch (context$3$0.prev = context$3$0.next) {
                  case 0:
                    if (!is1688) {
                      context$3$0.next = 4;
                      break;
                    }

                    context$3$0.t0 = get1688Price();
                    context$3$0.next = 7;
                    break;

                  case 4:
                    context$3$0.next = 6;
                    return regeneratorRuntime.awrap(__webpack_require__(4).met('NowPrice'));

                  case 6:
                    context$3$0.t0 = context$3$0.sent;

                  case 7:
                    price = context$3$0.t0;

                    if (!create) {
                      context$3$0.next = 12;
                      break;
                    }

                    _ret = (function () {
                      var site = is1688 ? '1688' : G.site;
                      var el = sitePosition[site]();
                      var tbv3 = false;
                      // if ($('[class^=Item2024--root--]').length) {
                      //   tbv3 = true
                      //   await require('standard/module/util').waitForConditionFn(() => $('.gwd-bottom-img-area').length)
                      //   el = document.createElement('DIV')
                      //   $('.gwd-bottom-img-area').append(el)
                      // }
                      if (window.gwdImgSameTip) {
                        return {
                          v: undefined
                        };
                      }
                      window.gwdImgSameTip = new Vue({
                        el: el,
                        render: function render(h) {
                          return h(site === '1688' ? Tip1688 : tbv3 ? TipTbV3 : Tip, {
                            props: {
                              img: res,
                              site: $('.information-wrap').length ? 'taobao' : G.site,
                              price: price
                            },
                            'class': G.aliSite
                          });
                        }
                      });
                    })();

                    if (!(typeof _ret === 'object')) {
                      context$3$0.next = 12;
                      break;
                    }

                    return context$3$0.abrupt('return', _ret.v);

                  case 12:
                    __webpack_require__(4).setMet('ImgSameReady', {
                      img: res,
                      price: price
                    });

                  case 13:
                  case 'end':
                    return context$3$0.stop();
                }
              }, null, _this2);
            });
          };

          context$1$0.next = 5;
          return regeneratorRuntime.awrap(bgClient.get('/bgVer', {}));

        case 5:
          bgVer = context$1$0.sent;

          if (!(parseFloat(bgVer) < 1.2)) {
            context$1$0.next = 8;
            break;
          }

          return context$1$0.abrupt('return');

        case 8:
          if (window.clientImgSameLoaded) {
            load();
          }
          G.clientImgSame = true;
          window.clientImgSameLoaded = true;
          setTimeout(load, 3000);

        case 12:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(5), __webpack_require__(0), __webpack_require__(17)["default"]))

/***/ }),
/* 674 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__ = __webpack_require__(675);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Tip_vue_vue_type_script_lang_js__ = __webpack_require__(205);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Tip_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Tip_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Tip_vue_vue_type_style_index_0_id_ce3b7f34_scoped_true_lang_less__ = __webpack_require__(713);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Tip_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__["staticRenderFns"],
  false,
  null,
  "ce3b7f34",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('ce3b7f34')) {
      api.createRecord('ce3b7f34', component.options)
    } else {
      api.reload('ce3b7f34', component.options)
    }
    module.hot.accept("./Tip.vue?vue&type=template&id=ce3b7f34&scoped=true", function () {
      api.rerender('ce3b7f34', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/Tip.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 675 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__ = __webpack_require__(676);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_template_id_ce3b7f34_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 676 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-row gwd-align gwd-img-same",
    "class": "gwd-" + _vm.site,
    attrs: { role: "button", title: _vm.transText("点击查看结果") },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.openApp.apply(null, arguments);
      }
    }
  }, [_c("span", { staticStyle: { "text-align": "center", "margin-left": "1px" } }, [_vm._v(_vm._s(_vm.transText("图片"))), _c("br"), _vm._v(_vm._s(_vm.transText("找同款")))]), _vm._v(" "), _c("img", {
    staticClass: "gwd-img-same-img",
    attrs: { src: _vm.img, alt: "" }
  }), _vm._v(" "), _c("img", {
    staticClass: "gwd-right-arrow",
    attrs: { src: _vm.arrow, alt: "" }
  })]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 677 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__ = __webpack_require__(678);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_template_id_74d4d45d_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 678 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.show,
      expression: "show"
    }],
    ref: "overlay",
    staticClass: "gwd-overlay",
    "class": {
      "gwd-overlay-bottom": _vm.style === "bottom",
      "gwd-1688": _vm.is1688,
      "gwd-bjg": _vm.isBjg,
      "gwd-xhs": _vm.xhs
    },
    on: { click: _vm.overlayClick }
  }, [_c("div", {
    staticClass: "gwd-app-window gwd-row",
    "class": { "gwd-expanded": _vm.expanded, "gwd-1688": _vm.is1688 }
  }, [_c("a", {
    staticClass: "gwd-window-close",
    attrs: { href: "#" },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.close();
      }
    }
  }, [_c("img", {
    attrs: { src: __webpack_require__(679), alt: "" }
  })]), _vm._v(" "), _c("a", {
    staticClass: "gwd-window-expand gwd-row gwd-align gwd-jcc",
    attrs: { href: "#" },
    on: {
      click: function click($event) {
        $event.preventDefault();
        _vm.expanded = !_vm.expanded;
      }
    }
  }, [_c("img", {
    attrs: { src: __webpack_require__(680), alt: "" }
  })]), _vm._v(" "), _c("div", {
    staticClass: "gwd-window-left gwd-column gwd-align",
    staticStyle: { "overflow-y": "auto" }
  }, [_c("img", {
    staticClass: "gwd-same-logo",
    staticStyle: {
      width: "89px",
      height: "18px",
      "margin-top": "16px"
    },
    attrs: { src: _vm.logo, alt: "" }
  }), _vm._v(" "), _c("img", {
    staticStyle: {
      "max-width": "180px",
      height: "180px",
      "border-radius": "8px",
      "margin-top": "16px"
    },
    attrs: { src: _vm.img, alt: "", "object-fit": "cover" }
  }), _vm._v(" "), _vm.price ? _c("Price", {
    staticStyle: { "margin-top": "8px" },
    attrs: { price: _vm.price, unit: _vm.unit }
  }) : _vm._e(), _vm._v(" "), _c("div", {
    staticClass: "gwd-column gwd-align",
    staticStyle: { "margin-top": "29px" }
  }, _vm._l(_vm.sites, function (item) {
    return _c("a", {
      key: item,
      staticClass: "gwd-site-select",
      "class": { "gwd-active": _vm.currentViewing === item },
      attrs: { href: "#" },
      on: {
        click: function click($event) {
          $event.preventDefault();
          _vm.currentViewing = item;
        }
      }
    }, [_vm._v(_vm._s(_vm.getSiteName(item)))]);
  }), 0), _vm._v(" "), _c("hr", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.currentSiteResult && _vm.currentSiteResult.list.length,
      expression: "currentSiteResult && currentSiteResult.list.length"
    }],
    staticStyle: { "margin-top": "40px" }
  }), _vm._v(" "), _c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.currentSiteResult && _vm.currentSiteResult.list.length,
      expression: "currentSiteResult && currentSiteResult.list.length"
    }],
    staticClass: "gwd-sort gwd-column",
    staticStyle: { "margin-top": "56px", "padding-left": "32px" }
  }, [_c("span", { staticStyle: { "margin-left": "8px" } }, [_vm._v(_vm._s(_vm.transText("排序")))]), _vm._v(" "), _vm._l(_vm.sortOptions, function (item) {
    return _c("a", {
      key: item,
      staticClass: "gwd-sort-item",
      "class": { "gwd-active": _vm.currentSort === item },
      attrs: { href: "#" },
      on: {
        click: function click($event) {
          $event.preventDefault();
          _vm.currentSort = item;
        }
      }
    }, [_vm._v(_vm._s(_vm.getSortName(item)))]);
  })], 2), _vm._v(" "), _vm.isBjg ? _c("div", { staticClass: "gwd-bjg-app gwd-column gwd-align" }, [_vm._m(0), _vm._v(" "), _vm._m(1), _vm._v(" "), _c("div", {
    staticStyle: {
      "margin-top": "4px",
      "line-height": "14px",
      color: "#5d3b01",
      "font-size": "12px"
    }
  }, [_vm._v("手机上也能自动找同款！")])]) : _vm._e()], 1), _vm._v(" "), _c("div", { staticClass: "gwd-window-right", staticStyle: { flex: "1" } }, [_vm.currentSiteResult.status === _vm.SiteStatus.loading ? _c("div", {
    staticStyle: {
      "font-size": "20px",
      "text-align": "center",
      flex: "1",
      "padding-top": "300px",
      color: "#a1a1a1"
    }
  }, [_vm._v("Loading...")]) : _vm._e(), _vm._v(" "), [_vm.SiteStatus.error, _vm.SiteStatus.needLogin, _vm.SiteStatus.needVisit].includes(_vm.currentSiteResult.status) ? _c("Error", {
    attrs: {
      site: _vm.currentViewing,
      permissionTextOnly: _vm.permissionTextOnly,
      hasPermission: _vm.hasPermission,
      siteMap: _vm.siteMap,
      error: _vm.currentSiteResult.status,
      errorDetail: _vm.currentSiteResult.statusDetail
    },
    on: {
      retry: function retry($event) {
        return _vm.doSearch(_vm.currentViewing);
      }
    }
  }) : _vm._e(), _vm._v(" "), _vm.currentSiteResult.list.length ? _c("div", {
    ref: "list",
    staticClass: "gwd-list gwd-scrollbar",
    style: "overflow-y: " + (_vm.firefox ? "scroll" : "overlay") + ";"
  }, _vm._l(_vm.sortedList, function (item) {
    return _c("ProductItem", {
      key: item.dpId,
      attrs: { item: item }
    });
  }), 1) : _vm._e()], 1)])]);
};
var staticRenderFns = [function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", { staticClass: "gwd-qr-container gwd-column gwd-align" }, [_c("img", {
    staticStyle: { width: "59px", height: "59px" },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/qrcode-app.png",
      alt: ""
    }
  }), _vm._v(" "), _c("img", {
    staticStyle: { width: "12px", height: "12px", "margin-top": "-34px" },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/bjgRoundLogo@2x.png",
      alt: ""
    }
  })]);
}, function () {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "margin-top": "5px" }
  }, [_c("img", {
    staticStyle: { width: "22px", height: "19px" },
    attrs: {
      src: "https://cdn.bijiago.com/images/extensions/bijiago/color-logo-22x19@2x.png",
      alt: ""
    }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "2px",
      "font-size": "15px",
      color: "#5d3b01",
      "font-weight": "bold"
    }
  }, [_vm._v("比价狗APP")])]);
}];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 679 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IiYjMjI5OyYjMTU1OyYjMTkwOyYjMjMwOyYjMTYwOyYjMTM1Oy8mIzIyOTsmIzEzMzsmIzE3OTsmIzIzMzsmIzE1MTsmIzE3MzsiIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMzA5XzI2NDEpIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEyLjAwMTcgMjMuMTEwOUMxOC4xMzgyIDIzLjExMDkgMjMuMTEyOCAxOC4xMzYzIDIzLjExMjggMTEuOTk5OEMyMy4xMTI4IDUuODYzMjggMTguMTM4MiAwLjg4ODY3MiAxMi4wMDE3IDAuODg4NjcyQzUuODY1MjQgMC44ODg2NzIgMC44OTA2MjUgNS44NjMyOCAwLjg5MDYyNSAxMS45OTk4QzAuODkwNjI1IDE4LjEzNjMgNS44NjUyNCAyMy4xMTA5IDEyLjAwMTcgMjMuMTEwOVoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGlkPSJWZWN0b3JfMiIgZD0iTTE2IDhMOCAxNiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBpZD0iVmVjdG9yXzMiIGQ9Ik04IDhMMTYgMTYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMzA5XzI2NDEiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="

/***/ }),
/* 680 */
/***/ (function(module, exports) {

module.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Imljb24vYmFjay9uYXYvbm9ybWFsIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTE0LjY2MjggMTIuNjY2OEw5Ljk5NjA5IDguMDAwMTZMMTQuNjYyOCAzLjMzMzUiIHN0cm9rZT0iIzQwNDU0NyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg=="

/***/ }),
/* 681 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__ = __webpack_require__(682);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_template_id_26424954_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 682 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("span", { staticClass: "gwd-price" }, [_vm.price ? _c("span", { staticStyle: { "font-size": "14px" } }, [_vm._v(_vm._s(_vm.unit))]) : _vm._e(), _vm._v(" "), _vm.price ? _c("span", { style: { "font-size": (_vm.fontSize ? _vm.fontSize : 20) + "px" } }, [_vm._v(_vm._s(parseFloat(_vm.price).toFixed(2).replace(".00", "")))]) : _vm._e()]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 683 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_style_index_0_id_26424954_scoped_true_lang_less__ = __webpack_require__(684);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_style_index_0_id_26424954_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Price_vue_vue_type_style_index_0_id_26424954_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 684 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(685);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("06b15026", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Price.vue?vue&type=style&index=0&id=26424954&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Price.vue?vue&type=style&index=0&id=26424954&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 685 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-price[data-v-26424954] {\n  color: #ff4449;\n  height: 24px;\n  line-height: 24px;\n  font-weight: 500;\n  font-family: \"PingFang SC-Medium\", \"PingFang SC\";\n}\n", ""]);

// exports


/***/ }),
/* 686 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_38276ded_scoped_true__ = __webpack_require__(687);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__ = __webpack_require__(212);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ProductItem_vue_vue_type_style_index_0_id_38276ded_scoped_true_lang_less__ = __webpack_require__(689);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__ProductItem_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_38276ded_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__ProductItem_vue_vue_type_template_id_38276ded_scoped_true__["staticRenderFns"],
  false,
  null,
  "38276ded",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('38276ded')) {
      api.createRecord('38276ded', component.options)
    } else {
      api.reload('38276ded', component.options)
    }
    module.hot.accept("./ProductItem.vue?vue&type=template&id=38276ded&scoped=true", function () {
      api.rerender('38276ded', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/ProductItem.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 687 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__ = __webpack_require__(688);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_template_id_38276ded_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 688 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-img-same-item gwd-inline-column",
    "class": { "gwd-bjg": _vm.isBjg },
    style: { "min-height": _vm.minHeight },
    attrs: { href: _vm.link, target: "_blank" }
  }, [_c("img", {
    attrs: {
      src: _vm.item.img,
      alt: "",
      onerror: "this.src = 'https://cdn.gwdang.com/plt_web/template/metro/images/dp/loading.png'"
    }
  }), _vm._v(" "), _c("div", {
    staticClass: "gwd-row",
    staticStyle: {
      "margin-top": "6px",
      "justify-content": "space-between",
      "align-items": "baseline"
    }
  }, [_c("Price", {
    attrs: { price: _vm.item.price, fontSize: 18, unit: _vm.unit }
  }), _vm._v(" "), _c("span", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.salesText && _vm.salesText !== "NaN",
      expression: "salesText && salesText !== 'NaN'"
    }],
    staticClass: "gwd-sales"
  }, [_vm._v(_vm._s(_vm.salesText) + _vm._s(_vm.item.dpId.endsWith("-3") || _vm.item.dpId.endsWith("-228") ? _vm.transText("评论") : _vm.transText("已售")))])], 1), _vm._v(" "), _c("div", { staticClass: "gwd-title", staticStyle: { "margin-top": "7px" } }, [_vm.item.self ? _c("span", { staticClass: "gwd-jd-self" }, [_vm._v(_vm._s(_vm.transText("自营")))]) : _vm._e(), _vm._v("\n      " + _vm._s(_vm.item.title) + "\n    ")]), _vm._v(" "), _c("div", { staticClass: "gwd-item-promos" }, _vm._l(_vm.item.promos, function (promo) {
    return _c("span", { key: promo.tag + promo.text }, [_vm._v(_vm._s(_vm.getPromoText(promo)))]);
  }), 0), _vm._v(" "), _c("span", {
    staticClass: "gwd-shop-name gwd-row gwd-align",
    staticStyle: { "min-height": "18px" }
  }, [_c("img", {
    staticClass: "gwd-favicon",
    attrs: {
      src: "https://cdn.gwdang.com/images/favicon/" + _vm.siteId + ".png",
      alt: ""
    }
  }), _vm._v(" "), _c("span", [_vm._v(_vm._s(_vm.item.shopName))])])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 689 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_38276ded_scoped_true_lang_less__ = __webpack_require__(690);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_38276ded_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ProductItem_vue_vue_type_style_index_0_id_38276ded_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 690 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(691);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("31cf9332", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductItem.vue?vue&type=style&index=0&id=38276ded&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductItem.vue?vue&type=style&index=0&id=38276ded&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 691 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-jd-self[data-v-38276ded] {\n  display: inline-block;\n  width: 30px;\n  height: 16px;\n  line-height: 16px;\n  text-align: center;\n  border-radius: 2px;\n  background: #ff4449;\n  color: #fff;\n  font-size: 12px;\n  margin-right: 4px;\n}\n.gwd-img-same-item[data-v-38276ded] {\n  transition: all 0.3s;\n  width: 220px;\n  padding: 10px;\n  box-sizing: border-box;\n  background: #ffffff;\n  border-radius: 8px;\n  margin-left: 20px;\n  margin-bottom: 20px;\n}\n.gwd-img-same-item img[data-v-38276ded] {\n  width: 200px;\n  height: 200px;\n  border-radius: 8px;\n}\n.gwd-img-same-item .gwd-sales[data-v-38276ded] {\n  color: #999;\n  font-size: 12px;\n}\n.gwd-img-same-item .gwd-title[data-v-38276ded] {\n  font-size: 14px;\n  color: #3c4c54;\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  word-break: break-all;\n  height: 40px;\n  line-height: 20px;\n}\n.gwd-img-same-item .gwd-shop-name[data-v-38276ded] {\n  color: #999;\n  font-size: 12px;\n  white-space: nowrap;\n}\n.gwd-img-same-item .gwd-shop-name span[data-v-38276ded] {\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.gwd-img-same-item .gwd-item-promos[data-v-38276ded] {\n  margin-top: 10px;\n  margin-bottom: 12px;\n  height: 16px;\n  overflow: hidden;\n}\n.gwd-img-same-item .gwd-item-promos span[data-v-38276ded] {\n  color: #ff4449;\n  font-size: 12px;\n  display: inline-block;\n  margin-right: 4px;\n  border: 1px solid #ff4449;\n  padding-left: 4px;\n  padding-right: 4px;\n  height: 16px;\n  box-sizing: border-box;\n  line-height: 14px;\n}\n.gwd-img-same-item .gwd-favicon[data-v-38276ded] {\n  width: 13px;\n  height: 13px;\n  border-radius: 100%;\n  margin-right: 4px;\n}\n.gwd-img-same-item[data-v-38276ded]:hover {\n  box-shadow: 0px 8px 14px 0px rgba(0, 0, 0, 0.06);\n}\n.gwd-bjg.gwd-img-same-item[data-v-38276ded] {\n  margin-left: 17px;\n  margin-bottom: 17px;\n  border: 1px solid #e6e9eb;\n}\n", ""]);

// exports


/***/ }),
/* 692 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Error_vue_vue_type_template_id_8eca1ada_scoped_true__ = __webpack_require__(693);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Error_vue_vue_type_script_lang_js__ = __webpack_require__(214);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Error_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Error_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Error_vue_vue_type_style_index_0_id_8eca1ada_scoped_true_lang_less__ = __webpack_require__(697);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Error_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Error_vue_vue_type_template_id_8eca1ada_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Error_vue_vue_type_template_id_8eca1ada_scoped_true__["staticRenderFns"],
  false,
  null,
  "8eca1ada",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('8eca1ada')) {
      api.createRecord('8eca1ada', component.options)
    } else {
      api.reload('8eca1ada', component.options)
    }
    module.hot.accept("./Error.vue?vue&type=template&id=8eca1ada&scoped=true", function () {
      api.rerender('8eca1ada', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/Error.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 693 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__ = __webpack_require__(694);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_template_id_8eca1ada_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 694 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-column gwd-align",
    "class": { "gwd-bjg": _vm.bjg },
    staticStyle: { flex: "1", "padding-top": "172px" }
  }, [!_vm.hasPermission && _vm.permissionTextOnly ? [_c("img", {
    staticStyle: {
      width: "151px",
      height: "124px",
      "margin-top": "57px",
      "margin-bottom": "20px"
    },
    attrs: { src: __webpack_require__(695) }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "font-size": "16px",
      color: "#404547",
      "line-height": "14px"
    }
  }, [_vm._v(_vm._s(_vm.transText("第一次使用时需要先同意授权")))])] : _vm._e(), _vm._v(" "), !_vm.hasPermission && !_vm.permissionTextOnly ? _c("div", {
    staticClass: "gwd-permission-hint",
    staticStyle: { color: "121212", "font-size": "14px" }
  }, [_vm._v(_vm._s(_vm.transText("第一次使用时需要先同意授权")))]) : _vm._e(), _vm._v(" "), !_vm.permissionTextOnly ? [_c("img", {
    staticStyle: { width: "150px" },
    attrs: { src: __webpack_require__(696), alt: "" }
  }), _vm._v(" "), _vm.error === "needLogin" ? _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.transText("请先访问"))), _c("a", {
    staticStyle: { color: "#666666" },
    attrs: { href: _vm.index(_vm.site), target: "_blank" }
  }, [_vm._v(_vm._s(_vm.siteMap[_vm.site]) + _vm._s(_vm.transText("首页")))]), _vm._v(_vm._s(_vm.transText("，"))), _c("span", { staticStyle: { color: "#666666" } }, [_vm._v(_vm._s(_vm.transText("登录") + _vm.siteMap[_vm.site] + _vm.transText("帐号")))]), _vm._v(_vm._s(_vm.transText("，然后回来重试。")))]) : _vm.errorDetail.includes("FAIL_SYS_USER_VALIDATE") ? _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.transText("请先去【"))), _c("a", {
    staticStyle: {
      color: "blue",
      "text-decoration": "underline"
    },
    attrs: { href: _vm.verifyLink, target: "_blank" }
  }, [_vm._v(_vm._s(_vm.transText("这里")))]), _vm._v(_vm._s(_vm.transText("】进行滑块验证后再回来重试。")))]) : _vm.error === "needVisit" ? _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.transText("加载失败，请先访问【"))), _c("a", {
    attrs: { target: "_blank", href: _vm.index(_vm.site) }
  }, [_vm._v(_vm._s(_vm.siteMap[_vm.site]) + _vm._s(_vm.transText("首页")))]), _vm._v(_vm._s(_vm.transText("】，再回来重试")))]) : _vm.errorDetail.includes("-FAILSYS::trace") ? _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "6px"
    }
  }, [_vm._v("\n      " + _vm._s(_vm.transText("加载失败，")) + _vm._s(_vm.siteMap[_vm.site]) + _vm._s(_vm.transText("接口故障，请稍后再试")) + "\n    ")]) : _vm.errorDetail.includes("-") ? _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "6px"
    }
  }, [_vm._v(_vm._s(_vm.transText("请先访问【"))), _c("a", {
    staticStyle: {
      color: "blue",
      "text-decoration": "underline"
    },
    attrs: { href: _vm.index(_vm.site), target: "_blank" }
  }, [_vm._v(_vm._s(_vm.siteMap[_vm.site]) + _vm._s(_vm.transText("首页")))]), _vm._v(_vm._s(_vm.transText("】，重新"))), _c("span", { staticStyle: { color: "red" } }, [_vm._v(_vm._s(_vm.transText("登录帐号")))]), _vm._v(_vm._s(_vm.transText("，然后回来重试。")))]) : _c("span", {
    staticStyle: {
      color: "#666666",
      "font-size": "12px",
      "margin-top": "-5px"
    }
  }, [_vm._v(_vm._s(_vm.error) + _vm._s(_vm.transText("，请重试一次")))]), _vm._v(" "), _c("div", {
    staticClass: "gwd-row gwd-align",
    staticStyle: { "margin-top": "31px" }
  }, [_vm.error === "needLogin" ? _c("button", { staticClass: "gwd-red", on: { click: _vm.login } }, [_vm._v(_vm._s(_vm.transText("去登录")))]) : _vm._e(), _vm._v(" "), _c("button", { on: { click: _vm.retry } }, [_vm._v(_vm._s(_vm.transText("再试一次")))])])] : _vm._e()], 2);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 695 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 696 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 697 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_style_index_0_id_8eca1ada_scoped_true_lang_less__ = __webpack_require__(698);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_style_index_0_id_8eca1ada_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Error_vue_vue_type_style_index_0_id_8eca1ada_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 698 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(699);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("0f2536f2", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Error.vue?vue&type=style&index=0&id=8eca1ada&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Error.vue?vue&type=style&index=0&id=8eca1ada&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 699 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "a[data-v-8eca1ada] {\n  color: #ff4449;\n}\nbutton[data-v-8eca1ada] {\n  width: 94px;\n  height: 32px;\n  border-radius: 29px;\n  opacity: 1;\n  border: 1px solid rgba(64, 69, 81, 0.3);\n  background-color: transparent;\n  font-size: 14px;\n  text-align: center;\n  color: #666666;\n  cursor: pointer;\n  margin-left: 28px;\n  margin-right: 28px;\n}\n.gwd-red[data-v-8eca1ada] {\n  border: 1px solid #ff4449;\n  color: #ff4449;\n}\n.gwd-permission-hint[data-v-8eca1ada] {\n  width: 303px;\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n  background: #fff9ed;\n  font-size: 13px;\n  color: #ff9706;\n  margin-top: -50px;\n  margin-bottom: 57px;\n  border-radius: 8px;\n}\n.gwd-bjg .gwd-red[data-v-8eca1ada] {\n  border: 1px solid #ff9706;\n  color: #ff9706;\n}\n", ""]);

// exports


/***/ }),
/* 700 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _standardModuleComponentsImgSameFillPriceAndPromo = __webpack_require__(216);

var _standardModuleComponentsImgSameFillPriceAndPromo2 = _interopRequireDefault(_standardModuleComponentsImgSameFillPriceAndPromo);

var request = __webpack_require__(3);
var bgClient = __webpack_require__(16);
var md5 = __webpack_require__(49);

module.exports = {
  get: function get(imgBase64, source) {
    var appKey, _m_h5_tk, cna, localTkResult, bgVer, token, pcsignResult, time, data, sign, url, apiResult, _ret;

    return regeneratorRuntime.async(function get$(context$1$0) {
      var _this = this;

      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          appKey = '12574478';
          context$1$0.next = 3;
          return regeneratorRuntime.awrap(bgClient.get('/getCookie', {
            url: 'https://www.taobao.com',
            name: '_m_h5_tk'
          }));

        case 3:
          _m_h5_tk = context$1$0.sent;
          context$1$0.next = 6;
          return regeneratorRuntime.awrap(bgClient.get('/getCookie', {
            url: 'https://www.taobao.com',
            name: 'cna'
          }));

        case 6:
          cna = context$1$0.sent;

          if (_m_h5_tk) {
            context$1$0.next = 12;
            break;
          }

          context$1$0.next = 10;
          return regeneratorRuntime.awrap(bgClient.get('/getStorage', { key: 'taobaoTk' }));

        case 10:
          localTkResult = context$1$0.sent;

          if (localTkResult && localTkResult.tk && Date.now() - localTkResult.time < 3600000) {
            _m_h5_tk = {
              value: localTkResult.tk
            };
          }

        case 12:
          if (_m_h5_tk) {
            context$1$0.next = 16;
            break;
          }

          context$1$0.next = 15;
          return regeneratorRuntime.awrap(__webpack_require__(10).sleep(1000));

        case 15:
          return context$1$0.abrupt('return', 'needLogin');

        case 16:
          context$1$0.next = 18;
          return regeneratorRuntime.awrap(bgClient.get('/bgVer'));

        case 18:
          bgVer = context$1$0.sent;

          if (!(parseFloat(bgVer) >= 1.3)) {
            context$1$0.next = 25;
            break;
          }

          bgClient.get('/copyCookie', {
            url: 'https://www.taobao.com',
            name: '_m_h5_tk',
            fromPartition: 'https://taobao.com'
          });
          bgClient.get('/copyCookie', {
            url: 'https://www.taobao.com',
            name: '_m_h5_tk_enc',
            fromPartition: 'https://taobao.com'
          });
          bgClient.get('/copyCookie', {
            url: 'https://www.taobao.com',
            name: 'cna',
            fromPartition: 'https://taobao.com'
          });
          context$1$0.next = 25;
          return regeneratorRuntime.awrap(__webpack_require__(10).sleep(100));

        case 25:
          token = _m_h5_tk.value.split('_')[0];
          context$1$0.next = 28;
          return regeneratorRuntime.awrap(__webpack_require__(701).securitySDK.sign({
            pageFrom: 'a21bo.jianhua/a.201856.dimagesearch',
            imgFrom: 'upload'
          }));

        case 28:
          pcsignResult = context$1$0.sent;
          time = parseInt(pcsignResult.timestamp);
          data = JSON.stringify({
            appId: '46006',
            params: JSON.stringify({
              "m": "pc_picture_search",
              "device": "HMA-AL00",
              "isBeta": "false",
              "grayHair": "false",
              "from": "nt_history",
              "brand": "HUAWEI",
              "info": "wifi",
              "index": "4",
              "rainbow": "",
              "schemaType": "auction",
              "elderHome": "false",
              "isEnterSrpSearch": "true",
              "newSearch": "false",
              "network": "wifi",
              "subtype": "",
              "hasPreposeFilter": "false",
              "prepositionVersion": "v2",
              "client_os": "Android",
              "gpsEnabled": "false",
              "searchDoorFrom": "srp",
              "debug_rerankNewOpenCard": "false",
              "homePageVersion": "v7",
              "searchElderHomeOpen": "false",
              "search_action": "initiative",
              "sugg": "_4_1",
              "sversion": "13.6",
              "style": "list",
              "ttid": "1@tbwang_mac_1.0.0#pc",
              "needTabs": "true",
              "areaCode": "CN",
              "vm": "nw",
              "countryNum": "156",
              "page": 1,
              "n": 48,
              "q": "",
              "qSource": "manual",
              "pageSource": "a21bo.jianhua/a.201856.dimagesearch",
              myCNA: cna.value,
              "tab": "all",
              "sort": "_coefp",
              "filterTag": "",
              "service": "",
              "prop": "",
              "loc": "",
              "start_price": null,
              "end_price": null,
              "startPrice": null,
              "endPrice": null,
              "categoryp": "",
              "pageSize": 60,
              strimg: imgBase64.split('base64,')[1],
              imgFrom: 'upload',
              pageFrom: 'a21bo.jianhua/a.201856.dimagesearch',
              pcSign: pcsignResult.pcSign,
              random: pcsignResult.random,
              timestamp: time.toString()
            })
          });
          sign = md5(token + '&' + time + '&' + appKey + '&' + data);
          url = request.makeUrl('https://h5api.m.taobao.com', '/h5/mtop.relationrecommend.wirelessrecommend.recommend/2.0/', {
            jsv: '2.7.4',
            appKey: appKey,
            t: time,
            sign: sign,
            api: 'mtop.relationrecommend.WirelessRecommend.recommend',
            v: '2.0',
            timeout: 10000,
            type: 'originaljson',
            dataType: 'jsonp'
          });
          context$1$0.next = 35;
          return regeneratorRuntime.awrap(request.post(url, {
            data: data
          }, 'www'));

        case 35:
          apiResult = context$1$0.sent;

          if (!(apiResult.data && apiResult.data.loginUnsafe)) {
            context$1$0.next = 38;
            break;
          }

          return context$1$0.abrupt('return', 'needLogin');

        case 38:
          if (!(apiResult.data && apiResult.data.itemsArray)) {
            context$1$0.next = 46;
            break;
          }

          context$1$0.next = 41;
          return regeneratorRuntime.awrap((function callee$1$0() {
            var resList, dpIdList, resList2;
            return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
              while (1) switch (context$2$0.prev = context$2$0.next) {
                case 0:
                  resList = apiResult.data.itemsArray.map(function (item) {
                    try {
                      var isTmall = item.auctionURL.includes('tmall');
                      // extract number from item.purchaseInfo
                      // let salesAmount = item.purchaseInfo.match(/\d+/g)
                      // if (item.purchaseInfo.includes('万') && salesAmount) {
                      //   salesAmount *= 10000
                      // }
                      var salesAmount = item.realSales.replace('已售', '');
                      return {
                        title: item.title,
                        price: item.priceWap,
                        img: item.pic_path.replace('_60x60.jpg', ''),
                        dpId: item.item_id + (isTmall ? '-83' : '-123'),
                        salesAmount: salesAmount,
                        shopName: item.shopInfo ? item.shopInfo.title : isTmall ? '天猫' : '淘宝',
                        isTmall: isTmall
                      };
                    } catch (e) {
                      console.error(e);
                      debugger;
                    }
                  });
                  dpIdList = [];
                  resList2 = [];

                  resList.forEach(function (item) {
                    if (!dpIdList.includes(item.dpId)) {
                      dpIdList.push(item.dpId);
                      resList2.push(item);
                    }
                  });
                  if (resList.length !== resList2.length) {
                    console.warn('去重前后数量不一致');
                  }

                  context$2$0.next = 7;
                  return regeneratorRuntime.awrap((0, _standardModuleComponentsImgSameFillPriceAndPromo2['default'])(resList2));

                case 7:
                  context$2$0.t0 = context$2$0.sent;
                  return context$2$0.abrupt('return', {
                    v: context$2$0.t0
                  });

                case 9:
                case 'end':
                  return context$2$0.stop();
              }
            }, null, _this);
          })());

        case 41:
          _ret = context$1$0.sent;

          if (!(typeof _ret === 'object')) {
            context$1$0.next = 44;
            break;
          }

          return context$1$0.abrupt('return', _ret.v);

        case 44:
          context$1$0.next = 48;
          break;

        case 46:
          if (!(apiResult.ret[0] !== 'SUCCESS::调用成功')) {
            context$1$0.next = 48;
            break;
          }

          return context$1$0.abrupt('return', 'fail-' + apiResult.ret[0]);

        case 48:
          return context$1$0.abrupt('return', 'fail');

        case 49:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

// 滑动解锁
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 701 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// window.securitySDK.sign({
//   pageFrom: 'https://detail.tmall.com',
//   imgFrom: 'plugin'
// }).then(console.log)


var extConsole = __webpack_require__(6);

var securitySDK = {};
(function () {
  var _gwd_modules = {
    '_crypto': function _crypto(_exports, _module, _require) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.ICrypto = undefined;
      _module.ICrypto = {
        instance: window.crypto || window.msCrypto,
        subtle: {
          instance: (window.crypto || window.msCrypto || {}).subtle,
          digest: function digest(a, b) {
            if (this.instance) {
              if (typeof this.instance.digest != "function") {
                return null;
              } else {
                return this.instance.digest(a, b);
              }
            } else {
              return null;
            }
          }
        },
        getSubtle: function getSubtle() {
          if (this.instance) {
            if (this.instance.subtle) {
              return this.subtle;
            } else {
              return null;
            }
          } else {
            return null;
          }
        },
        getRandomValues: function getRandomValues(_randomConfig) {
          if (this.instance) {
            if (typeof this.instance.getRandomValues != "function") {
              return null;
            } else {
              return this.instance.getRandomValues(_randomConfig);
            }
          } else {
            return null;
          }
        }
      };
    },
    635: function _(_exports, _module, _require) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.getRandom = function () {
        var _rnd = new Uint8Array(32);
        _crypto.ICrypto.getRandomValues(_rnd);
        return (0, _utf8Util.arrayBufferToBase64)(_rnd.buffer);
      };
      var _crypto = _require('_crypto');
      var _utf8Util = _require('_utf8Util');
    },
    544: function _(_exports, _module) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.getSalt = function () {
        return "6dbd0668a0634ae9badd25d3da236f47";
      };
    },
    283: function _(_exports, _module, _require) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.cryptoAlg1 = function (_string) {
        return (0, _utf8Util.stringToUtf8Array)('' + _string).then(function (_res) {
          var _digProcess;
          if ((_digProcess = (function (_a, _b) {
            try {
              var _ret = (function () {
                var _subTle = _crypto.ICrypto.getSubtle();
                if (!_subTle) {
                  return {
                    v: undefined
                  };
                }
                var _sha256Res = _subTle.digest("SHA-256", new Uint8Array());
                if (Promise && (_sha256Res2 = _sha256Res, (_promise = Promise) != null && typeof Symbol != "undefined" && _promise[Symbol.hasInstance] ? _promise[Symbol.hasInstance](_sha256Res2) : _sha256Res2 instanceof _promise)) {
                  return {
                    v: _subTle.digest(_a, _b)
                  };
                } else if (Promise) {
                  return {
                    v: new Promise(function (resolve, reject) {
                      var _subTleDig = _subTle.digest(_a, _b);
                      if (!_subTleDig) {
                        reject("no digest");
                      }
                      _subTleDig.oncomplete = function (digResult) {
                        var _digResTgt;
                        if (digResult != null && (_digResTgt = digResult.target) !== null && _digResTgt !== undefined && _digResTgt.result) {
                          resolve(_digResTgt.result);
                        } else {
                          reject("no digest res");
                        }
                      };
                      _subTleDig.onerror = function (err) {
                        reject(err);
                      };
                    })
                  };
                } else {
                  return {
                    v: null
                  };
                }
              })();

              if (typeof _ret === 'object') return _ret.v;
            } catch (err) {}
            var _sha256Res2;
            var _promise;
          })("SHA-256", _res)) === null || _digProcess === undefined) {
            return undefined;
          } else {
            return _digProcess.then(function (result) {
              return (0, _utf8Util.arrayBufferToBase64)(result);
            });
          }
        })['catch'](function (err) {});
      };
      var _crypto = _require('_crypto');
      var _utf8Util = _require('_utf8Util');
    },
    '_utf8Util': function _utf8Util(_exports, _module, _require) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.stringToUtf8Array = function (_string) {
        try {
          if (typeof TextEncoder == "function") {
            var _res = new TextEncoder().encode(_string);
            return Promise.resolve(_res);
          }
          if (typeof FileReader == "function") {
            var _ret2 = (function () {
              var _blob = new Blob([_string], {
                type: "text/plain;charset=utf-8"
              });
              var _reader = new FileReader();
              _reader.readAsArrayBuffer(_blob);
              return {
                v: new Promise(function (resolve, reject) {
                  _reader.onload = function (data) {
                    var _res;
                    if (data == null || (_res = data.target) === null || _res === undefined || !_res.result) {
                      reject("stringToUtf8Array FileReader failed");
                      return;
                    }
                    var _result = new Uint8Array(data.target.result);
                    resolve(_result);
                  };
                  _reader.onerror = function (err) {
                    reject(err);
                  };
                })
              };
            })();

            if (typeof _ret2 === 'object') return _ret2.v;
          }
          return Promise.resolve(new Uint8Array());
        } catch (err) {
          return Promise.resolve(new Uint8Array());
        }
      };
      _module.arrayBufferToBase64 = function (_arrayBuffer) {
        try {
          var _data = "";
          var _arr = new Uint8Array(_arrayBuffer);
          for (var i = 0; i < _arr.byteLength; i++) {
            _data += String.fromCharCode(_arr[i]);
          }
          return btoa(_data);
        } catch (err) {
          extConsole.warn(err);
          return "";
        }
      };
    },
    860: function _(_exports, _module) {
      'use strict';

      Object.defineProperty(_module, "__esModule", {
        value: true
      });
      _module.simpleStringify = function () {
        var _arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return Object.keys(_arg).map(function (_argKey) {
          var _argValue = _arg == null ? undefined : _arg[_argKey];
          return encodeURIComponent(_argKey) + '=' + encodeURIComponent(JSON.stringify(_argValue));
        }).join("&");
      };
    },
    429: function _(_exports, _module, _require) {
      'use strict';

      function getAllEnumerable(obj, onlyEnumerable) {
        var _keys = Object.keys(obj);
        if (Object.getOwnPropertySymbols) {
          var symbols = Object.getOwnPropertySymbols(obj);
          if (onlyEnumerable) {
            symbols = symbols.filter(function (_symbol) {
              return Object.getOwnPropertyDescriptor(obj, _symbol).enumerable;
            });
          }
          _keys.push.apply(_keys, symbols);
        }
        return _keys;
      }
      function mergeInto(_target) {
        for (var _i = 1; _i < arguments.length; _i++) {
          var _arg = arguments[_i] != null ? arguments[_i] : {};
          if (_i % 2) {
            getAllEnumerable(Object(_arg), true).forEach(function (_enumerable) {
              modifyObject(_target, _enumerable, _arg[_enumerable]);
            });
          } else if (Object.getOwnPropertyDescriptors) {
            Object.defineProperties(_target, Object.getOwnPropertyDescriptors(_arg));
          } else {
            getAllEnumerable(Object(_arg)).forEach(function (_enumerable) {
              Object.defineProperty(_target, _enumerable, Object.getOwnPropertyDescriptor(_arg, _enumerable));
            });
          }
        }
        return _target;
      }
      function modifyObject(_targetObj, _key, _value) {
        if ((_key = (function (_obj) {
          var _result = (function (_toCheck, _type) {
            if (typeof _toCheck != "object" || !_toCheck) {
              return _toCheck;
            }
            var _toPrimitive = _toCheck[Symbol.toPrimitive];
            if (_toPrimitive !== undefined) {
              var _checkResult = _toPrimitive.call(_toCheck, _type || "default");
              if (typeof _checkResult != "object") {
                return _checkResult;
              }
              throw new TypeError("@@toPrimitive must return a primitive value.");
            }
            return (_type === "string" ? String : Number)(_toCheck);
          })(_obj, "string");
          if (typeof _result == "symbol") {
            return _result;
          } else {
            return _result + "";
          }
        })(_key)) in _targetObj) {
          Object.defineProperty(_targetObj, _key, {
            value: _value,
            enumerable: true,
            configurable: true,
            writable: true
          });
        } else {
          _targetObj[_key] = _value;
        }
        return _targetObj;
      }
      Object.defineProperty(_module, "__esModule", {
        value: true
      });

      _module.sign = function () {
        var _arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        try {
          var _signProcess;

          var _ret3 = (function () {
            if (!_crypto.ICrypto.instance) {
              return {
                v: Promise.resolve({})
              };
            }
            var _randomValue = (0, _randomGenerator.getRandom)();
            var _timestamp = '' + Date.now();
            var _object = _arg;
            if (typeof _arg != "object") {
              _object = {};
            }
            var _objToSign = mergeInto(mergeInto({}, _object), {}, {
              random: _randomValue,
              timestamp: _timestamp
            });
            var _stringToSign = JSON.stringify(_objToSign) + (0, _salt.getSalt)();
            return {
              v: ((_signProcess = (0, _cryptoLib.cryptoAlg1)(_stringToSign)) === null || _signProcess === undefined ? undefined : _signProcess.then(function (_pcSignResult) {
                return {
                  pcSign: _pcSignResult || "",
                  random: _randomValue,
                  timestamp: _timestamp
                };
              })) || Promise.resolve({})
            };
          })();

          if (typeof _ret3 === 'object') return _ret3.v;
        } catch (err) {
          return Promise.resolve({});
        }
      };
      var _crypto = _require('_crypto');
      var _randomGenerator = _require(635);
      var _salt = _require(544);
      var _cryptoLib = _require(283);
    }
  };
  var _gwd_installed_modules = {};
  window._gwd_modules = _gwd_installed_modules;
  function _gwd_import(_gwd_module) {
    var installed = _gwd_installed_modules[_gwd_module];
    if (installed !== undefined) {
      return installed.exports;
    }
    var module = _gwd_installed_modules[_gwd_module] = {
      exports: {}
    };
    _gwd_modules[_gwd_module].call(module.exports, module, module.exports, _gwd_import);
    return module.exports;
  }
  _gwd_import.g = (function () {
    if (typeof globalThis == "object") {
      return globalThis;
    }
    try {
      return this || new Function("return this")();
    } catch (error) {
      if (typeof window == "object") {
        return window;
      }
    }
  })();
  var gwd_sec_sdk = {};
  (function () {
    'use strict';

    var _gwdSecSDK = gwd_sec_sdk;
    function _gwdCopy(a, b) {
      if (b == null || b > a.length) {
        b = a.length;
      }
      for (var i = 0, _new = Array(b); i < b; i++) {
        _new[i] = a[i];
      }
      return _new;
    }
    Object.defineProperty(_gwdSecSDK, "__esModule", {
      value: true
    });
    _gwdSecSDK.sign = _gwdSecSDK.BizCode = _gwdSecSDK.PiskMode = undefined;
    _gwdSecSDK['default'] = _gwdDefaultSecSDK;
    _gwdSecSDK.securitySDK = _gwdDefaultSecSDK;
    _gwdSecSDK['default'] = _gwdDefaultSecSDK;
    _gwdSecSDK.securitySDK = _gwdDefaultSecSDK;
    var _GWD_SignModule = _gwd_import(429);
    var GWD_PiskMode;
    var _BizCode;
    function _gwdDefaultSecSDK() {}
    Object.defineProperty(_gwdSecSDK, "sign", {
      enumerable: true,
      get: function get() {
        return _GWD_SignModule.sign;
      }
    });
    (function (_piskMode) {
      _piskMode[_piskMode.DocListen = 1] = "DocListen";
      _piskMode[_piskMode.WindowOpen = 2] = "WindowOpen";
      _piskMode[_piskMode.DomHook = 4] = "DomHook";
      _piskMode[_piskMode.ALL = 3] = "ALL";
    })(GWD_PiskMode || (_gwdSecSDK.PiskMode = GWD_PiskMode = {}));
    (function (bizCode) {
      bizCode.Home = "home";
      bizCode.HomeTmall = "home_tmall";
      bizCode.HomeEnterprise = "home_enterprise";
      bizCode.HomeWorld = "home_world";
      bizCode.My = "my";
      bizCode.Cart = "cart";
      bizCode.Venue = "venue";
      bizCode.Detail = "detail";
      bizCode.Shop = "shop";
      bizCode.Bought = "bought";
      bizCode.Search = "search";
      bizCode.BusinessIndustry = "businessIndustry";
    })(_BizCode || (_gwdSecSDK.BizCode = _BizCode = {}));
  })();
  securitySDK = gwd_sec_sdk;
})();

module.exports = {
  securitySDK: securitySDK
};

/***/ }),
/* 702 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, $) {

var _this = this;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _standardModuleComponentsImgSameFillPriceAndPromo = __webpack_require__(216);

var _standardModuleComponentsImgSameFillPriceAndPromo2 = _interopRequireDefault(_standardModuleComponentsImgSameFillPriceAndPromo);

var request = __webpack_require__(3);
var bgClient = __webpack_require__(16);
var extConsole = __webpack_require__(6);
var commonUtil = __webpack_require__(10);

var fillList = function fillList(list) {
  var shopInfosText, shopInfosList, shopInfos;
  return regeneratorRuntime.async(function fillList$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(request.rawGet(request.makeUrl('https://chat1.jd.com', '/api/checkChat', {
          pidList: list.map(function (item) {
            return item.skuId;
          }).join(','),
          _: Date.now(),
          callback: 'jQuery6537064'
        })));

      case 2:
        shopInfosText = context$1$0.sent;
        shopInfosList = JSON.parse(shopInfosText.replace('jQuery6537064(', '').slice(0, -2));
        shopInfos = commonUtil.arrayToObj(shopInfosList, 'pid');

        extConsole.log('shopInfos', shopInfos);
        return context$1$0.abrupt('return', list.map(function (item) {
          item.shopName = shopInfos[item.skuId] && shopInfos[item.skuId].seller ? shopInfos[item.skuId].seller : '京东商城';
          return item;
        }));

      case 7:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var fillSaleAmount = function fillSaleAmount(list) {
  var ids, saleAmountInfos;
  return regeneratorRuntime.async(function fillSaleAmount$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        ids = list.map(function (item) {
          return item.skuId;
        }).join(',');
        context$1$0.t0 = commonUtil;
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(request.rawGet(request.makeUrl('https://club.jd.com', '/comment/productCommentSummaries.action', {
          referenceIds: ids,
          _: Date.now()
        })));

      case 4:
        context$1$0.t1 = context$1$0.sent.CommentsCount;
        saleAmountInfos = context$1$0.t0.arrayToObj.call(context$1$0.t0, context$1$0.t1, 'SkuId');

        extConsole.log('saleAmountInfos', saleAmountInfos);
        return context$1$0.abrupt('return', list.map(function (item) {
          item.salesAmount = saleAmountInfos[item.skuId] ? saleAmountInfos[item.skuId].CommentCountStr : '';
          return item;
        }));

      case 8:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  get: function get(imgBase64) {
    var uid, res, match, path, searchUrl, jdResultHTML, list;
    return regeneratorRuntime.async(function get$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          context$1$0.next = 2;
          return regeneratorRuntime.awrap(bgClient.get('/getCookie', {
            url: 'https://search.jd.com/image',
            name: 'unick'
          }));

        case 2:
          uid = context$1$0.sent;

          if (uid && uid.value) {
            context$1$0.next = 5;
            break;
          }

          return context$1$0.abrupt('return', 'needLogin');

        case 5:
          context$1$0.next = 7;
          return regeneratorRuntime.awrap(request.post('https://search.jd.com/image?op=upload', {
            file: imgBase64,
            GWD_FORCE_FILE: ['file']
          }, true));

        case 7:
          res = context$1$0.sent;
          match = res.match(/callback\('(.*)'\)/);

          if (match) {
            context$1$0.next = 11;
            break;
          }

          return context$1$0.abrupt('return', 'needLogin');

        case 11:
          path = encodeURIComponent(match[1]);
          searchUrl = request.makeUrl('https://search.jd.com', '/image', {
            path: path,
            op: 'search',
            isur: 0,
            category_id: undefined,
            category_list: '',
            stype: 0,
            main_rect: ''
          }, true);
          context$1$0.next = 15;
          return regeneratorRuntime.awrap(request.rawGet(searchUrl));

        case 15:
          jdResultHTML = context$1$0.sent;

          extConsole.log('jd result', jdResultHTML);
          list = $('li.gl-item', jdResultHTML).toArray().map(function (item) {
            return {
              title: $('.p-name em', item).text(),
              price: $('.p-price i', item).text(),
              img: $('.p-img img', item).attr('src') || $('.p-img img', item).attr('data-lazy-img'),
              url: $('.p-img a', item).attr('href'),
              dpId: $(item).attr('data-sku') + '-3',
              skuId: $(item).attr('data-sku'),
              shopId: $('.p-shop', item).attr('data-venderid'),
              self: $('.p-icons', item).html().includes('自营')
            };
          });
          context$1$0.next = 20;
          return regeneratorRuntime.awrap((0, _standardModuleComponentsImgSameFillPriceAndPromo2['default'])(list));

        case 20:
          list = context$1$0.sent;
          context$1$0.next = 23;
          return regeneratorRuntime.awrap(fillList(list));

        case 23:
          list = context$1$0.sent;
          context$1$0.next = 26;
          return regeneratorRuntime.awrap(fillSaleAmount(list));

        case 26:
          list = context$1$0.sent;

          extConsole.log(list);

          if (!list.length) {
            context$1$0.next = 30;
            break;
          }

          return context$1$0.abrupt('return', list);

        case 30:
          return context$1$0.abrupt('return', 'fail');

        case 31:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

// const uniqueList = [...new Set(list)]
// const shopIds = uniqueList.map(item => item.shopId).join(',')
//
// const shopInfos = commonUtil.arrayToObj(await request.rawGet(
//   request.makeUrl('https://rms.shop.jd.com', '/json/pop/shopInfo.action', {
//     ids: shopIds,
//     _: Date.now()
//   })
// ), 'venderId')

// extConsole.log('jd path', res)

// if (res.includes('<title>京东-欢迎登录</title>')) {
//   return 'needLogin'
// }
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(1)))

/***/ }),
/* 703 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

var request = __webpack_require__(3);
var bgClient = __webpack_require__(16);
var md5 = __webpack_require__(49);

module.exports = {
  get: function get(imgBase64) {
    var appKey, _m_h5_tk, token, time, data, sign, url, apiResult, imgSearchResult, goods;

    return regeneratorRuntime.async(function get$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          appKey = '12574478';
          context$1$0.next = 3;
          return regeneratorRuntime.awrap(bgClient.get('/getCookie', {
            url: 'https://www.1688.com',
            name: '_m_h5_tk'
          }));

        case 3:
          _m_h5_tk = context$1$0.sent;

          if (_m_h5_tk) {
            context$1$0.next = 8;
            break;
          }

          context$1$0.next = 7;
          return regeneratorRuntime.awrap(__webpack_require__(10).sleep(1000));

        case 7:
          return context$1$0.abrupt('return', 'needVisit');

        case 8:
          token = _m_h5_tk.value.split('_')[0];
          time = Date.now();
          data = JSON.stringify({
            imageBase64: imgBase64.split('base64,')[1],
            appName: "searchImageUpload",
            appKey: "pvvljh1grxcmaay2vgpe9nb68gg9ueg2"
          });
          sign = md5(token + '&' + time + '&' + appKey + '&' + data);
          url = request.makeUrl('https://h5api.m.1688.com', '/h5/mtop.1688.imageservice.putimage/1.0/', {
            jsv: '2.7.0',
            appKey: '12574478',
            t: time,
            sign: sign,
            api: 'mtop.1688.imageService.putImage',
            ecode: 0,
            v: '1.0',
            type: 'originaljson',
            dataType: 'jsonp'
          });
          context$1$0.next = 15;
          return regeneratorRuntime.awrap(request.post(url, {
            data: data
          }, 'www'));

        case 15:
          apiResult = context$1$0.sent;

          if (apiResult.data && apiResult.data.imageId) {
            context$1$0.next = 18;
            break;
          }

          return context$1$0.abrupt('return', 'fail-' + apiResult.data.ret[0]);

        case 18:
          context$1$0.next = 20;
          return regeneratorRuntime.awrap(request.get(request.makeUrl('https://search.1688.com', '/service/imageSearchOfferResultViewService', {
            tab: 'imageSearch',
            imageAddress: '',
            imageId: apiResult.data.imageId,
            spm: '',
            imageIdList: apiResult.data.imageId,
            pailitaoCategoryId: '',
            beginPage: 1,
            pageSize: 40,
            requestId: apiResult.data.requestId,
            pageName: 'image',
            sessionId: apiResult.data.sessionId,
            '_bx-v': '1.1.20'
          })));

        case 20:
          imgSearchResult = context$1$0.sent;

          if (imgSearchResult.data && imgSearchResult.data.data && imgSearchResult.data.data.offerList) {
            context$1$0.next = 23;
            break;
          }

          return context$1$0.abrupt('return', 'fail-' + imgSearchResult.data.msg);

        case 23:
          goods = imgSearchResult.data.data.offerList.map(function (item) {
            return {
              title: item.information.subject,
              price: parseFloat(item.tradePrice.offerPrice.valueString),
              img: item.image.imgUrl,
              dpId: item.id + '-471',
              salesAmount: item.tradeQuantity.saleQuantity.toString(),
              shopName: item.company.name,
              isTmall: item.brand.imallBrand === "tmall",
              url: 'https://detail.1688.com/offer/' + item.id + '.html'
            };
          });
          return context$1$0.abrupt('return', goods.filter(function (x) {
            return x.price > 0;
          }));

        case 25:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

// check if imgSearchResult.data.data.offerList exist
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 704 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime) {

var request = __webpack_require__(3);

module.exports = {
  get: function get(img) {
    var shopTheLookPage, shopTheLookPageDom, stylesnap, option, res, amazonProducts;
    return regeneratorRuntime.async(function get$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          context$1$0.prev = 0;
          context$1$0.next = 3;
          return regeneratorRuntime.awrap(request.rawGet('https://www.amazon.com/shopthelook'));

        case 3:
          shopTheLookPage = context$1$0.sent;
          shopTheLookPageDom = new DOMParser().parseFromString(shopTheLookPage, 'text/html');
          stylesnap = shopTheLookPageDom.querySelector('input[name=stylesnap]').getAttribute('value');

          if (stylesnap) {
            context$1$0.next = 8;
            break;
          }

          return context$1$0.abrupt('return', 'fail-noStylesnap');

        case 8:
          option = {
            useForm: true
          };
          context$1$0.next = 11;
          return regeneratorRuntime.awrap(request.post('https://www.amazon.com/stylesnap/upload?stylesnapToken=' + encodeURIComponent(stylesnap), {
            'explore-looks.png': img,
            GWD_FORCE_FILE: ['explore-looks.png']
          }, true));

        case 11:
          res = context$1$0.sent;

          if (res.searchResults.length) {
            context$1$0.next = 14;
            break;
          }

          return context$1$0.abrupt('return', []);

        case 14:
          amazonProducts = res.searchResults[0].bbxAsinMetadataList.map(function (item) {
            return {
              img: item.imageUrl,
              asin: item.asin,
              price: item.price,
              title: item.title,
              shopName: item.byLine,
              salesAmount: item.totalReviewCount || 0,
              url: 'https://www.amazon.com/dp/' + item.asin
            };
          });
          return context$1$0.abrupt('return', amazonProducts.map(function (item) {
            item.dpId = item.asin + '-228';
            // extract number from price string
            if (item.price) {
              item.price = item.price.replace(/[^0-9.]/g, '');
            } else {
              item.price = 0;
            }
            return item;
          }));

        case 18:
          context$1$0.prev = 18;
          context$1$0.t0 = context$1$0['catch'](0);
          return context$1$0.abrupt('return', 'fail=' + context$1$0.t0.message);

        case 21:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this, [[0, 18]]);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))

/***/ }),
/* 705 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64, "

/***/ }),
/* 706 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAAAkCAMAAADo18WhAAAAAXNSR0IArs4c6QAAAQhQTFRFAAAAAP//QL/vPMPwSLf3SL/vRsHwRbr0Rb/vRLv1RMHvR73wSbrzSLvzSL/vR7zzR8DvR771RrzyRr/vRb3ySb70SLzySL/0SL3ySL/vSL/0R73ySL7zR7z0R7/0R73xR730R7/0Sb30SL3xSL3zSL/zSLvzSL3xSL3zSL/zR730R7/zSb3xSb3zSb/zR73xR73zSbzzSb3xSb3zRr7xSb30Sb70SL3ySL30SL/ySL/0SLzySL7xSL7yR7zyRr/zSb3zR73yR73zSb3zSL7ySL/zSL7zSL70R77zR73zR77zR770SL7ySL7ySL70SL7ySL70R77yR77zR77yR77zSL7zSL7zSL7z6L2p4AAAAFd0Uk5TAAEQESAgITAwMTEyP0BAQUFPUFBRXl9fYGBgYW5vb3BwcHB/f3+AgICAj4+Pj4+QkJCQkJGenp+fn5+goKChrq6vr6+wvr+/zc7Pz93e3t/f7u7v7/3+4imx9gAABW1JREFUWMPtmXt32zQUwGV1WkKpTZcy4lKWtKzB4dl1pcVbGxgpNSwjtVmM9f2/CffqEUu2nMRLD+dwDvePxbVs6f50n/II+V/+u8KiKHIOHBweBvoanungb0i3WSqMIl9f04BZYzRYKfZEvqlzwDl3LpdwnuhrzouQkFHO39jP0MNVYqtIPJhxue4+5/fmIKrRLJk9U2TqvDmAN4GfofXM41WrInMjwKecv/1XAXDpnZTz96w9AI2kZDCjuOgLHX6tAqRuWTwYAPmEV/ZtM4DaU3fEmxrW0GqovWFxdFBRd2uAXC7nveCLcQWg8J1ve2sAMl58yZRQG+Ca89dbAlCcFgBmanaSqv2iY0raAzhcyGK6sgBCuPo9VtL7MAAzol4rgCutTfew0xLAEcRHjQDd3ByKHgggEauwg0GcWplIAoRxVYZrALzrqpYaAPVfJFLyVQDLZD0q/wgaASDksiQ3d8wA8G64w8lNAC+1o5t4OS/6mqp4UgIMcJFM+hJolrJGAJeUofMIZAYei79y2w1ZXG4NAB5UsKWrdTUAxh1KPpT68x75QAAjCzHziXQ66D2qBXHdhb6qACRWYp+jM92RHnYWu8ijAWiKmz6GyzhAlvGKLOSqGBfONKo9Jx50ap1QqyAuBfqIoo+Gi9AWd2Ud8PkFrDFWlj7eKI02igaYpdOLs6XJSbA9gAfeOcdaVoQYzd8ZhUwsEsgQT7oPAUCFGzLlqbh59/06ALOlBuAlhh/e70wwhDF8QyxofbMS0+C8DJjZgG0JQEd5YrSjBCson7MqgKWfdOpVAIQM5yr/7OqdEQCD85nynnFnIjmyOHACZBsB5LluJ1Jl6a9hwWOyNYBypMJnvcnbshd6IbVPxIsslAjHdXXPNgGgajMkwI2MNewA5sQJsCh7x2JdEEuAXLtlmYVyvohD2uPZubBy52IGqbEOAGUpTyryxC7Fg0TbUmaeITTSoG9WBnMV4KpsEjYD2LESgIyBAHM0y4T/y1CDXqwOkDhqQFghtNSXUex7ZW5uBVCpY2oTwP35S1c7TXzp/9mINnh8vg5gyE33WTbUr7hK2g8CAGcytKoDAFvSpCysNQAKY7eRKVUAHzb/IrMAIG6Qe862AyiE/A2zeD9y04fKblQVGjZZsAYAfNauPlUAEvv2gUYexmr6t4sB4MBbnresZsYKSwDYt9n5AV6ypqR5VisDNYDqiUydqv4SWYM6Ad6oInbiBDiJDqgEOElulxPmpQk0QKhrWBw0Zn3bNzYDEG2uPNB7Scxa1wEouEwA4D+otPcz2DMql1ieBwZTlb95ftunLoAujA3bAQTvpGK+yt/3fkuAfdFhCwsMVUWB3X+6U5rADGKobjpqqAPg2o739QCBVG+hUtCuEXsa4Mbqav+sAmDX8FQBoNJUGAByEeh2T11ZiHREJUocFmC85kErAUbSovMehHExAmXOjGK8YTd6JF6RAPB+8dzDUD8lSMO/cQKIXiLpOwDQAP0WAFNd0eCbimgiM9UWtfiskqEBdBbyizt/FxSfU1lx5BEbAW5jp7yzADDKU9ICgOW6IOOHOR5/a3YTTgAP5WMY+UyvWRTzMo2SPQ/1L/Z0lyf66U0/LbK8bioHwCiJ0QV/E8sPdN78KHce6qv6v5rJLwrlCPupH+zvnygm7/NcOpCY4b0k2BRgWu1m3AAqG1dd7ahazZwWGJoNg6Y6k7f2ZJ1f6i+WKn6QAC8jpyQmAJ3wGVkPIE/yaf0MnOpqtgLgsWoaTs2bPXHvD3E9Lopn5ci4+AWTO1it4T8fwiSJjT+PHY/ByxU1kLznmrDjm3fp5eVlpxYD38Pdy+d7dgOG975Q755aY88o+QeoMwyTJnu6xAAAAABJRU5ErkJggg=="

/***/ }),
/* 707 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_0_id_74d4d45d_scoped_true_lang_less__ = __webpack_require__(708);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_0_id_74d4d45d_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_0_id_74d4d45d_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 708 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(709);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("31578812", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=style&index=0&id=74d4d45d&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=style&index=0&id=74d4d45d&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 709 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "a[data-v-74d4d45d]:hover {\n  text-decoration: none!important;\n}\n.gwd-scrollbar[data-v-74d4d45d] {\n  height: 100%;\n  z-index: 3;\n  position: relative;\n  overscroll-behavior-y: contain;\n  scrollbar-width: thin;\n}\n.gwd-overlay[data-v-74d4d45d] {\n  overscroll-behavior-y: contain;\n}\n.gwd-overlay .gwd-1688.gwd-app-window[data-v-74d4d45d] {\n  top: 0;\n}\n.gwd-overlay .gwd-app-window[data-v-74d4d45d] {\n  padding: 10px;\n  position: absolute;\n  top: 42px;\n  bottom: 0;\n  left: 0;\n  background: #f4f5f5;\n  width: 735px;\n  border-top-right-radius: 8px;\n  border-bottom-right-radius: 8px;\n  box-sizing: border-box;\n  transition: all 0.3s ease-in-out;\n}\n.gwd-overlay .gwd-app-window .gwd-window-close[data-v-74d4d45d] {\n  position: absolute;\n  top: 0;\n  right: -32px;\n  width: 24px;\n  height: 24px;\n}\n.gwd-overlay .gwd-app-window .gwd-window-close img[data-v-74d4d45d] {\n  width: 24px;\n  height: 24px;\n}\n.gwd-overlay .gwd-app-window .gwd-window-expand[data-v-74d4d45d] {\n  position: absolute;\n  right: -18px;\n  width: 36px;\n  height: 36px;\n  top: 50%;\n  background: #f4f5f5;\n  border-radius: 18px;\n  transform: translateY(-50%);\n}\n.gwd-overlay .gwd-app-window .gwd-window-expand img[data-v-74d4d45d] {\n  transition: all 0.3s ease;\n  width: 16px;\n  height: 16px;\n  transform: rotate(180deg) translate(-5px);\n}\n.gwd-overlay .gwd-app-window .gwd-window-left[data-v-74d4d45d] {\n  width: 220px;\n  background: white;\n  border-radius: 8px;\n}\n.gwd-overlay .gwd-app-window.gwd-expanded[data-v-74d4d45d] {\n  width: 1455px;\n}\n.gwd-overlay .gwd-app-window.gwd-expanded .gwd-window-expand img[data-v-74d4d45d] {\n  transform: rotate(0);\n}\n.gwd-overlay-bottom .gwd-app-window[data-v-74d4d45d] {\n  top: 0;\n  bottom: 60px;\n}\n.gwd-overlay-bottom.gwd-xhs .gwd-app-window[data-v-74d4d45d] {\n  bottom: 0;\n}\n.gwd-site-select[data-v-74d4d45d] {\n  width: 180px;\n  height: 40px;\n  line-height: 40px;\n  text-align: left;\n  border-radius: 8px;\n  font-size: 14px;\n  padding-left: 20px;\n  box-sizing: border-box;\n  color: #3c4c54;\n}\n.gwd-site-select.gwd-active[data-v-74d4d45d] {\n  background: #48bef3;\n  color: white;\n  text-decoration: none;\n  font-weight: bold;\n}\n.gwd-sort[data-v-74d4d45d] {\n  width: 100%;\n  box-sizing: border-box;\n  align-items: flex-start;\n}\n.gwd-sort span[data-v-74d4d45d] {\n  color: #999;\n  font-size: 13px;\n}\n.gwd-sort .gwd-sort-item[data-v-74d4d45d] {\n  display: inline-block;\n  background: white;\n  color: #3c4c54;\n  font-size: 13px;\n  height: 20px;\n  line-height: 20px;\n  padding-left: 8px;\n  padding-right: 8px;\n  border-radius: 10px;\n  margin-top: 23px;\n}\n.gwd-sort .gwd-sort-item.gwd-active[data-v-74d4d45d],\n.gwd-sort .gwd-sort-item[data-v-74d4d45d]:hover {\n  background: rgba(72, 190, 243, 0.1);\n  color: #38b4ee;\n  text-decoration: none;\n}\n.gwd-bjg .gwd-sort .gwd-sort-item.gwd-active[data-v-74d4d45d],\n.gwd-bjg .gwd-sort .gwd-sort-item[data-v-74d4d45d]:hover {\n  background: rgba(255, 193, 78, 0.1);\n  color: #ef6c00;\n  text-decoration: none;\n}\n.gwd-bjg .gwd-site-select.gwd-active[data-v-74d4d45d] {\n  background: #ff9706 !important;\n}\n.gwd-bjg .gwd-same-logo[data-v-74d4d45d] {\n  filter: hue-rotate(190deg) brightness(1);\n}\n.gwd-bjg .gwd-window-right[data-v-74d4d45d] {\n  background: white;\n  margin-left: 10px;\n  padding-top: 11px;\n  border-radius: 8px;\n  z-index: 9;\n}\n.gwd-bjg.gwd-overlay .gwd-app-window[data-v-74d4d45d] {\n  width: 741px;\n}\n.gwd-bjg .gwd-app-window.gwd-expanded[data-v-74d4d45d] {\n  width: 1455px;\n}\nhr[data-v-74d4d45d] {\n  width: 172px;\n  border-top: 1px solid #e6e9eb;\n  border-bottom: none;\n}\n", ""]);

// exports


/***/ }),
/* 710 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_1_id_74d4d45d_scoped_true_lang_less__ = __webpack_require__(711);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_1_id_74d4d45d_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Index_vue_vue_type_style_index_1_id_74d4d45d_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 711 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(712);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("69486331", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=style&index=1&id=74d4d45d&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=style&index=1&id=74d4d45d&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 712 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-bjg-app[data-v-74d4d45d] {\n  width: 180px;\n  height: 122px;\n  background: linear-gradient(133deg, #FFFBF3 0%, #FFFDF2 100%);\n  border-radius: 12px;\n  margin-top: 58px;\n}\n.gwd-bjg-app .gwd-qr-container[data-v-74d4d45d] {\n  width: 59px;\n  height: 59px;\n  background: white;\n  position: relative;\n  margin-top: 10px;\n}\n", ""]);

// exports


/***/ }),
/* 713 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_style_index_0_id_ce3b7f34_scoped_true_lang_less__ = __webpack_require__(714);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_style_index_0_id_ce3b7f34_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip_vue_vue_type_style_index_0_id_ce3b7f34_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 714 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(715);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("7c66852f", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=style&index=0&id=ce3b7f34&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=style&index=0&id=ce3b7f34&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 715 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-img-same[data-v-ce3b7f34]:hover {\n  text-decoration: none!important;\n}\n.gwd-img-same[data-v-ce3b7f34] {\n  width: 108px;\n  height: 46px;\n  position: absolute;\n  border: 1px solid #eaeaea;\n  justify-content: center;\n  font-size: 0;\n  cursor: pointer;\n  background: #fff;\n}\n.gwd-img-same span[data-v-ce3b7f34] {\n  color: #333333;\n  font-size: 12px;\n}\n.gwd-img-same .gwd-img-same-img[data-v-ce3b7f34] {\n  margin-left: 8px;\n  width: 32px;\n  height: 32px;\n  border-radius: 2px;\n}\n.gwd-img-same .gwd-right-arrow[data-v-ce3b7f34] {\n  margin-left: 8px;\n  height: 18px;\n}\n.gwd-360buy[data-v-ce3b7f34] {\n  left: -130px;\n  top: 5px;\n}\n.gwd-tmall[data-v-ce3b7f34],\n.gwd-taobao[data-v-ce3b7f34],\n.gwd-amazon[data-v-ce3b7f34] {\n  left: 0px!important;\n  top: 215px;\n  position: fixed;\n  z-index: 999;\n  box-shadow: 2px 2px 30px 0px rgba(97, 105, 119, 0.18);\n  border-top-right-radius: 8px;\n  border-bottom-right-radius: 8px;\n  border: none;\n}\n.gwd-vipshop[data-v-ce3b7f34] {\n  left: -130px;\n  top: 195px;\n}\n.gwd-1688[data-v-ce3b7f34] {\n  position: absolute;\n  left: -130px;\n  top: 540px;\n}\n.gwd-tb-v3[data-v-ce3b7f34] {\n  top: 95px;\n  left: -125px !important;\n}\n@media screen and (max-width: 1800px) {\n.s1680 .gwd-tb-v3[data-v-ce3b7f34] {\n    display: none;\n}\n}\n@media screen and (max-width: 1540px) {\n.s1400 .gwd-tb-v3[data-v-ce3b7f34] {\n    display: none;\n}\n}\n@media screen and (max-width: 1290px) {\n.s1240 .gwd-tb-v3[data-v-ce3b7f34] {\n    display: none;\n}\n}\n@media screen and (max-width: 1030px) {\n.s1024 .gwd-tb-v3[data-v-ce3b7f34] {\n    display: none;\n}\n}\n", ""]);

// exports


/***/ }),
/* 716 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__ = __webpack_require__(717);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TipTbV3_vue_vue_type_script_lang_js__ = __webpack_require__(217);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__TipTbV3_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__TipTbV3_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TipTbV3_vue_vue_type_style_index_0_id_1580f4de_scoped_true_lang_less__ = __webpack_require__(720);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__TipTbV3_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__["staticRenderFns"],
  false,
  null,
  "1580f4de",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('1580f4de')) {
      api.createRecord('1580f4de', component.options)
    } else {
      api.reload('1580f4de', component.options)
    }
    module.hot.accept("./TipTbV3.vue?vue&type=template&id=1580f4de&scoped=true", function () {
      api.rerender('1580f4de', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/TipTbV3.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 717 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__ = __webpack_require__(718);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_template_id_1580f4de_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 718 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-row gwd-align gwd-img-same",
    "class": "gwd-" + _vm.site,
    attrs: { role: "button", title: _vm.transText("点击查看结果") },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.openApp.apply(null, arguments);
      }
    }
  }, [_c("img", {
    staticStyle: { width: "16px", height: "16px" },
    attrs: { src: __webpack_require__(719), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "5px",
      color: "#11192d",
      "font-size": "14px"
    }
  }, [_vm._v(_vm._s(_vm.transText("根据图片找同款")))])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 719 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABgNJREFUWEe9l0tsVlUQx39zPhAVC5gACS5AXTSagC7qyhStRgsopSb4KopxISVoYpSayKMEFiCNRuNCiHxUE4P2SypqUutrgyiElTVGWBhcEFiAiY30AYWF6ZE5c8592FZx402+3Pvde+7Mf/4z/zlzhas4/CrquEw9lWlNeN8AsgAndUh4eQTnfmWck4gMSP/lw1dhMltiJqY4zLFrQ0R/dWGZ4O0sei24ZCKeHWcR+nGVz+XTsXP/BmZKAP7BShvQToUb1FPw6KK5zKeC0J/36MOwzIcbODmHk6ocHOv/JxCTAvDLXAfQlhlVCynSiCWyESgJR6UATgIYj1fQviYHL705FYgJAHyz2w60WDQasgQcyU+kXtMQcpA9C06ViYjWpVRpoly/9F7YMRmIEoAQuZcnccqrJTwYFdFsK612M0Un4jPaFYA61Tu2zp7ptV3VpPfiBCYyAL650oKIRg9OnWbVFY14BWBR56AKzMQCyZ2r7TJo4S2pXawVmTCoy1iAr+xD5KaM6sxQiB4eeAbmL4JDBzy/n7ZCCxFGSeTqMIYSayFncZ0wwoVrW6VvcDSBMADNrh0n67JKy3JuAdP6Ijz3hr1z4ghsa/ZW7alOojyTUzsXJRsBe1VSVT68UC0DWD6tD1EWotQC6Cz38FI33L/W3jn1E3TcHSVX7An2UqiQlNjAojIVwTqNzI8yMmNVYkH88mlNCBZeQm70SmKPW++Erb0wczb0vQO9O8G5YsFlrSLSHSVYKNIiWxVZLx8MD4Rb/iG3ER+6XUIeC6eUO4t+5o1waTiyl0nQ8p0OVcLNdwjPvA63N8LYMPx+Bs4ch+974ORR8FKTA0NBEeJXTN+H0JCaXWTCzJX0H29k+o7STM5D4UFwvu0ruH52hql08ctR+ODlk9L1wxoD8PD0QyCzYtHkHcequ6zzcKtQ4blze++WJWTOv9kLn3TZegW1dA3c1ghzF6qVURG5zzysvOYHaywx51m/V+dK7bh1xNR8Kolt7QtOQk/Q4p2/ELqOWeSf7YZPu/JU6Rpdq8+WbYDWV9X0XWUAZb3ay+Y4piNuPD42pCzrQnCutM9bCBr5h5tz1lUJaf+wXiG0bkIe2RQBtMz4FqiLDSVKJkZvHc/UUaa/nKpdx4z+08ehs3Fy5/Z+ajWj8t75mIKWa3pwUh8dwLybYdYcOPVzId8m8XwjSgoRz9ouYcXzMHgGdq20sxZq0FTsJ8W9xYW+8KN0n19vKVg1owNHG4vvhSc6YfFSi+DwAeh9zQyGXU93ushl2gtWvABru0xqWxuj83wfi4DzHTWxgNSk+48ow23NDTzeuS9zPDYEF4dh3iID8vEu+HIvXBrJpalX8xd53j5h3j7aDF/vLcwMWeRxdCpI2h69It1DYXQT772OWn2MDdXRvwc+3wOzZnse2yI0xfarjeTgLjjSYyA0TZ1f5EXXsyUWbSr8WLD6N6lK27Af1/9npXp+VSoU24xqO9v5Yk87l2OXS41Nq3u7Vndk47uP4LMuWL2ZoGtNz8YleSe0IoszY2ztOe3ewLj9Uh3822akw+f06/rC4JkkE16M+Xx4A6zeahrXfOtZne+ORZfJLNRJeVIKdmIfEc7hZb1UB7NhNVOzXz2zDec7QgSxhq344m6mGlcQGrke+5+Hoz3lTSgNqGlXVdoL28QVBnbIu4OlITXfRDQVj87soCI6DedTT8qjjl9q7Z6n7NmR2sTNK5uOvT1zaVJNGadapD/LTvZYQTx5w3aEFryO1qFCdKjMO6JaTu3Yho5UeTlblhId1UsBxoUlEJMtwD9e18E03xbne50qzVjxu8BSbayUvhdiyqYGoDgyEJMCCHG31bVQYR2EObFY6XHeSw0nDLD5B4lOP8bYCMh+PCrz9iLLRSamBBBAPH39ApjeQsWvBHeT1UZSR/w0KH6QhHpxozpw8Cc1ed+GT98+VwFMBDHO+n8EUKqNZ+c04WmgIvV46nEhMm0sI3j57crHzAC4w/qRmhyX3p8cRPWqAUxC4X++NYEJz5r/FUBIx7q59QhNjDMg3YMDfwFVcudXJaS4eAAAAABJRU5ErkJggg=="

/***/ }),
/* 720 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_style_index_0_id_1580f4de_scoped_true_lang_less__ = __webpack_require__(721);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_style_index_0_id_1580f4de_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TipTbV3_vue_vue_type_style_index_0_id_1580f4de_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 721 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(722);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("44bad57b", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TipTbV3.vue?vue&type=style&index=0&id=1580f4de&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TipTbV3.vue?vue&type=style&index=0&id=1580f4de&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 722 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-img-same[data-v-1580f4de] {\n  position: absolute;\n  top: 10px;\n  cursor: pointer;\n  width: 165px;\n  height: 36px;\n  justify-content: center;\n  border: 1px solid #dadde0;\n  border-radius: 4px;\n  text-decoration: none!important;\n  box-sizing: border-box;\n}\n", ""]);

// exports


/***/ }),
/* 723 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__ = __webpack_require__(724);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Tip1688_vue_vue_type_script_lang_js__ = __webpack_require__(219);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__Tip1688_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__Tip1688_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Tip1688_vue_vue_type_style_index_0_id_76f946cb_scoped_true_lang_less__ = __webpack_require__(727);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__Tip1688_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__["staticRenderFns"],
  false,
  null,
  "76f946cb",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('76f946cb')) {
      api.createRecord('76f946cb', component.options)
    } else {
      api.reload('76f946cb', component.options)
    }
    module.hot.accept("./Tip1688.vue?vue&type=template&id=76f946cb&scoped=true", function () {
      api.rerender('76f946cb', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/ImgSame/Tip1688.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 724 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__ = __webpack_require__(725);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_template_id_76f946cb_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 725 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-row gwd-align gwd-img-same",
    "class": "gwd-" + _vm.site,
    attrs: { role: "button", title: "点击查看结果" },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.openApp.apply(null, arguments);
      }
    }
  }, [_c("img", {
    staticStyle: { width: "16px" },
    attrs: { src: __webpack_require__(726), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "margin-left": "7px",
      color: "#ff4000",
      "font-size": "14px"
    }
  }, [_vm._v("根据图片找同款")])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 726 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABcBJREFUWEelV01MVUcU/s59VI3Y+EzA7uDpqmmr4LJJQWisSEqFxBqMxpQmXTQ0KaILC0J4bSPYdOEjqdRSjdggxlItTau2m0KNcdNFkbjojp+t/FyaosYQppw5M3PnPh7UxJeYe7nO3POd7/vOmXMJz/BTFUhiQ14pCHUAdoOQAigJIoCWQiAxCuA+SI3Qz0+HnuGVbgmttVgHXhc0gegYiJJ6LUGBiCA7+Z6fkbnygollgH0ALtPQk4n/A7MqAFUVNC0H6AAFWwClJDgH0/9IP7PBGUgQ2GcCjhiIStP1J5fXApETgNobnAV01pydzdS+2D6Tq11jr4rBeAwpdNONx82rgVgBQFUFl6CoIXqxl7nyso6kEElEDrkGBrZlDOijwYX3c4GIAdCZs94+3aJ7pL37v5gX4mzwBsccoBkBZejavyuYcADUW4kGEC6BSBlqrdHiwVlqXxabuYAUSfQzbUzLCkCKmWmmgYVunwlZvQ8pLCWGEVDKZa+p1GaTl+45qrC1mPB7P/BwMnoxA/JBRAx5XjGgiUI8SmyjoTC0IGT33oDdns5RYsJC7cfAB1/Kngd3gPYqP9usewNIfOAxYEo2oM+o/590HMC+xDhAKc94XHZCIf+aLxDePCp7xu8DJ16Xe21Eu05BStHKYJhzTNq1mENeYjv1CQukqhK1CGjIaGdo05SJBAxh+06gdRDI3wxcOw388hUbKwLBm105Oh/ES9SZmVWlSuoPRwRAdV4GoCbjdGsiu9lmKMHyk8DjeRPYmZHXRusYV2oncPQM8EoZsDAPTE8BU2PA3avA33c5bDd9F+pqYwDDIKqQ+jVtVcpI6NdGjDl8JThbFbzu1XLC8QEBm+vHAPqOj9IXf+4SAG+/MOf1+WwGomxdg7GONqgCE0VnXgK03RKpfu0BbnSJCZmRssPAy28ABUW8ISSiLQbAOlP3vnZePedkYEW9A4VFQNc9CX6jC/jxTMSi9cfGzUBVI6H2JOPSvJGqYQC6YqJTbrUzwDnftl6WKCCdVfstAfFbD9DfYpjMfqcxbt1JUO0nBsA7LEHAglkAXpOxIpLp7z793vque4TiHcDkGNBWZjI3B5LrjLEyDenirJFg//q/AJS49vtSsRhoYsxKI1Gl5s1R7Lme3V7dyN0R6KxRmJmy64VV1xssYM32CF2cqxQJ9q8/C8IxvFYOHGqDvvJvuB/4/rTSJRQbONzZD1R/JOW2EErm01PmKI5JamYJfktg23OGLszqg4lU254K1LcPu8D8Mq7drcUCZLATuH1O4dG8NBspTXFz9wP5+0oLa5/ddqP1tkytoRNUR9/M/CQAlGL9x7EQJnHzHHCzR5xcf0ph9xHZyvT+0AXcuSIZbE0Bp25GpmMAWh6uSWO8eAs20jF4TFDv7DbnLr5RVz9P41ZPBx6F8fZZWKTQcZtQaNhgANe7FA60EMqPAA+ngBM7/BkxOo5d+WZPVSpNvbOfxgHUJZPIezoOQNqXO2LNsMkmO9AqzLA8fGVvdNYAM9ojUcPKHtFMvzKlPoFgqZLOh25YjQaSg/lNgMpEg6fX4filBUUK77ZyR5M93zYCdwdM9nJ4yl57r3tEdGjpxFQDfT0TG1IdAC3FwU0ZBKrJlF3U8yULOZ4ZAAfSwf1xPEf3TNg+bZJRSFPvtKPfkmPl0FdVn89jGY9n3rngzX+usbjJN/KNjGJiOF5nj2w/QhaIGAN2nTq8SY7oSD+vCQlOc0rG58doHjQgcubIux0TOQHoCIdfbFgWtAOBKtaSuFnfzXfGeM60nhH1bShjntoChY4YzZKCBrEqAL3mUDKFvKX3EFADgGJT6+YLKPZRYiZoDY5ruRsbFzOUkbFLfViQzgmCULkmgJh0DUn+MK0AoQSgUgTuW3EOwCQIfyARDGHD4qgNHNufC4TC2gysoO05H6xgYol2PTMDzxnbbVeNyVIs5tUhwAidnx75Dyb3yo0IA62zAAAAAElFTkSuQmCC"

/***/ }),
/* 727 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_style_index_0_id_76f946cb_scoped_true_lang_less__ = __webpack_require__(728);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_style_index_0_id_76f946cb_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Tip1688_vue_vue_type_style_index_0_id_76f946cb_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 728 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(729);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("5da319f2", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip1688.vue?vue&type=style&index=0&id=76f946cb&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip1688.vue?vue&type=style&index=0&id=76f946cb&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 729 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-img-same[data-v-76f946cb] {\n  width: 144px;\n  height: 40px;\n  background: rgba(255, 64, 0, 0.05);\n  border-radius: 2px;\n  opacity: 1;\n  border: 1px solid #FF4000;\n  justify-content: center;\n  cursor: pointer;\n  text-decoration: none;\n  margin-top: 15px;\n}\n", ""]);

// exports


/***/ }),
/* 730 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, $, G) {

var _this = this;

var globalCondition = __webpack_require__(4);

module.exports.init = function callee$0$0() {
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        __webpack_require__(6).warn('reload begin');

        if (!(!$('#bjgext_mainbar').length && location.hostname !== 's.taobao.com')) {
          context$1$0.next = 4;
          break;
        }

        __webpack_require__(6).warn('reload interrupted because no bar detected');
        return context$1$0.abrupt('return');

      case 4:
        __webpack_require__(36).clear();
        globalCondition.clearAll();
        G.productChecked = null;
        G.showMinibar = false;
        G.showMainbar = false;
        G.instanceId = null;
        window.bjgActivity = false;
        window.bjgTrendInit = false;
        $('.is_tm_site').remove();
        $('#cptklbox').remove();
        $('#tttgbgbs').remove();
        __webpack_require__(19).clearRun();
        $('#bjgext_mainbar').remove();
        $('.pricedog-tax-bar').remove();
        $('.pricedog-bar').remove();
        $('#biggraph_bijiago').remove();
        $('#biggraph_biyibi').remove();
        $('#bjgext_mb_bg').remove();

        G.instanceId = parseInt(Math.random() * 10000);
        __webpack_require__(6).log('set instance id', G.instanceId);
        $('html').attr('data-bjg-id', G.instanceId);

        __webpack_require__(78).common(function (data) {
          if (data && data.result instanceof Array) {
            G.set_force = false;
            G.forbidCoupon = true;
          } else if (data && data.result) {
            var result = data.result.address;
            if (result.indexOf('北京') > -1 || result.indexOf('上海') > -1 || result.indexOf('广州') > -1 || result.indexOf('深圳') > -1 || result.indexOf('杭州') > -1) {
              G.set_force = false;
              G.forbidAd = true;
            } else if (result.indexOf('南京') > -1) {
              G.set_force = false;
            }
            if (result.indexOf('北京') > -1 || result.indexOf('上海') > -1) {
              G.forbidTkl = true;
            }
            if (result.indexOf('北京') > -1 || result.indexOf('杭州') > -1) {
              G.forbidCoupon = true;
              G.forbidApp = true;
            }
          }

          __webpack_require__(21).getRate(function () {
            __webpack_require__(79).init();
          });
        });

      case 26:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 731 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__ = __webpack_require__(732);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__MiniSameList_vue_vue_type_script_lang_js__ = __webpack_require__(222);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__MiniSameList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__MiniSameList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MiniSameList_vue_vue_type_style_index_0_id_caa5e08c_scoped_true_lang_less__ = __webpack_require__(734);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MiniSameList_vue_vue_type_style_index_1_id_caa5e08c_scoped_true_lang_css__ = __webpack_require__(737);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__MiniSameList_vue_vue_type_style_index_2_id_caa5e08c_scoped_true_lang_less__ = __webpack_require__(740);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);








/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_5__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__MiniSameList_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__["staticRenderFns"],
  false,
  null,
  "caa5e08c",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('caa5e08c')) {
      api.createRecord('caa5e08c', component.options)
    } else {
      api.reload('caa5e08c', component.options)
    }
    module.hot.accept("./MiniSameList.vue?vue&type=template&id=caa5e08c&scoped=true", function () {
      api.rerender('caa5e08c', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/MiniSameList.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 732 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__ = __webpack_require__(733);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_template_id_caa5e08c_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 733 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "minibar-tab",
    "class": { bjg: _vm.isBjg, "gwd-fake-tr": _vm.position.top },
    staticStyle: { flex: "1", display: "inline-block" },
    style: _vm.style,
    attrs: { id: "gwd_mini_compare" },
    on: {
      mouseover: _vm.mouseover,
      mouseleave: _vm.mouseleave,
      "~hover": function hover($event) {
        return _vm.logHover.apply(null, arguments);
      }
    }
  }, [!_vm.position.top ? _c("div", { staticClass: "minibar-btn-box" }, [_c("em", { staticClass: "setting-bg mini-compare-icon" }), _vm._v(" "), _vm.data.length && _vm.data[0].view_price < _vm.pri ? _c("span", { staticStyle: { float: "none" } }, [_vm._v(_vm._s(_vm.transText("更低价")) + ":¥" + _vm._s(_vm.data[0].view_price))]) : _vm.data.length === 0 ? _c("span", { staticStyle: { float: "none" } }, [_vm._v(_vm._s(_vm.transText("暂无结果")))]) : _c("span", { staticStyle: { float: "none" } }, [_vm._v(_vm._s(_vm.transText("其他")) + _vm._s(_vm.data.length) + _vm._s(_vm.transText("家报价")))])]) : _vm._e(), _vm._v(" "), _vm.position.top ? _c("div") : _vm._e(), _vm._v(" "), _c("div", {
    staticClass: "minibar-detail",
    attrs: { id: "gwd_mini_compare_detail" }
  }, [_c("ul", _vm._l(_vm.data, function (item) {
    return _c("li", { key: item.nid }, [_c("a", {
      attrs: { href: item.url, target: "_blank" },
      on: {
        click: function click($event) {
          return _vm.logLink();
        }
      }
    }, [_c("img", {
      attrs: {
        src: "https://cdn.gwdang.com/images/favicon/" + item.site + ".png"
      }
    }), _vm._v(" "), _c("span", { staticClass: "m-item-sitename" }, [_vm._v(_vm._s(item.shopName))]), _vm._v(" "), _c("span", { staticClass: "m-item-price prifontf" }, [_vm._v("¥" + _vm._s(item.view_price))])])]);
  }), 0)])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 734 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_0_id_caa5e08c_scoped_true_lang_less__ = __webpack_require__(735);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_0_id_caa5e08c_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_0_id_caa5e08c_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 735 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(736);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("d1fbcd3c", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=0&id=caa5e08c&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=0&id=caa5e08c&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 736 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "#gwd_mini_compare[data-v-caa5e08c] {\n  width: 155px;\n  cursor: default;\n  text-align: center;\n  font-family: 'Microsoft YaHei', Arial, SimSun !important;\n}\n#gwd_mini_compare[data-v-caa5e08c]:hover {\n  background-color: #edf1f2;\n}\n#gwd_mini_compare.gwd-fake-tr[data-v-caa5e08c]:hover {\n  background-color: transparent;\n}\n#gwd_mini_compare.bjg[data-v-caa5e08c] {\n  border-right: 1px solid #e6e9eb;\n}\n.setting-bg[data-v-caa5e08c] {\n  background: url('https://cdn.gwdang.com/images/extensions/xbt/new_wishlist_pg5_2.png') no-repeat;\n  width: 18px;\n  height: 18px;\n  vertical-align: middle;\n  float: left;\n  margin-right: 8px;\n  margin-top: 0px;\n}\n.mini-compare-icon[data-v-caa5e08c] {\n  background-position: -93px -134px;\n}\n.minibar-btn-box[data-v-caa5e08c] {\n  display: inline-flex;\n  align-items: center;\n  margin: 0 auto;\n  float: none;\n  height: 100%;\n}\n.minibar-btn-box *[data-v-caa5e08c] {\n  float: left;\n}\n.minibar-btn-box span[data-v-caa5e08c] {\n  color: #404547;\n  font-size: 13px;\n}\n.minibar-btn-box span em[data-v-caa5e08c] {\n  font-style: normal;\n  line-height: 36px;\n}\n.minibar-btn-box span .price-em[data-v-caa5e08c] {\n  margin-left: 2px;\n  line-height: 37px;\n}\n#gwd_mini_compare_detail[data-v-caa5e08c] {\n  display: none;\n}\n#gwd_mini_compare:hover #gwd_mini_compare_detail[data-v-caa5e08c] {\n  display: block;\n}\n", ""]);

// exports


/***/ }),
/* 737 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_1_id_caa5e08c_scoped_true_lang_css__ = __webpack_require__(738);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_1_id_caa5e08c_scoped_true_lang_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_1_id_caa5e08c_scoped_true_lang_css__);
/* unused harmony reexport namespace */


/***/ }),
/* 738 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(739);
if(typeof content === 'string') content = [[module.i, content, '']];
// add the styles to the DOM
var update = __webpack_require__(37)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
	// When the styles change, update the <style> tags
	if(!content.locals) {
		module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=1&id=caa5e08c&scoped=true&lang=css", function() {
			var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=1&id=caa5e08c&scoped=true&lang=css");
			if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
			update(newContent);
		});
	}
	// When the module is disposed, remove the <style> tags
	module.hot.dispose(function() { update(); });
}

/***/ }),
/* 739 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, "\n#gwd_mini_compare_detail[data-v-caa5e08c] {\n  position: absolute;\n  margin: 0px 0 12px 0px;\n  height: auto;\n  width: 278px;\n  top: 36px;\n  left: 50%;\n  margin-left: -139px;\n  background-color: #fff;\n  display: none;\n  z-index: 9999999;\n  border: 1px solid #edf1f2;\n  box-shadow: 0 2px 4px 0 rgba(0,0,0,0.11);\n  /* z-index: 999; */\n}\n#gwd_mini_compare_detail li[data-v-caa5e08c]:hover {\n  background-color: #edf1f1;\n}\n#gwd_mini_compare_detail li[data-v-caa5e08c] {\n  height: 40px;\n}\n#gwd_mini_compare_detail li *[data-v-caa5e08c] {\n  float: left;\n}\n#gwd_mini_compare_detail li a[data-v-caa5e08c] {\n  display: inline-block;\n  height: 39px;\n  width: 248px;\n  border-bottom: 1px solid #edf1f1;\n  margin-left: 15px;\n}\n#gwd_mini_compare_detail li img[data-v-caa5e08c] {\n  width: 16px;\n  margin-top: 12px;\n  margin-right: 14px;\n}\n#gwd_mini_compare_detail li .m-item-sitename[data-v-caa5e08c] {\n  width: 113px;\n  margin-right: 6px;\n  line-height: 40px;\n  height: 40px;\n  font-size: 14px;\n  color: #404547;\n  text-align: left;\n  overflow: hidden;\n}\n#gwd_mini_compare_detail li .m-item-price[data-v-caa5e08c] {\n  color: #E4393C;\n  font-size: 14px;\n  float: right;\n  line-height: 40px;\n  font-weight: bold;\n}\n#gwd_mini_compare_detail .m-all-link[data-v-caa5e08c] {\n  color: #969899;\n  text-decoration: none!important;\n  float: right;\n  height: 12px;\n  line-height: 12px;\n  margin-right: 15px;\n  margin-top: 15px;\n  margin-bottom: 15px;\n  font-size: 12px;\n}\n#gwd_mini_compare_detail .m-all-link[data-v-caa5e08c]:hover {\n  color: #48beff!important;\n}\n.bjg-hover-bg[data-v-caa5e08c] {\n  background: #fffbef;\n}\n", ""]);

// exports


/***/ }),
/* 740 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_2_id_caa5e08c_scoped_true_lang_less__ = __webpack_require__(741);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_2_id_caa5e08c_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MiniSameList_vue_vue_type_style_index_2_id_caa5e08c_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 741 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(742);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("6911a364", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=2&id=caa5e08c&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MiniSameList.vue?vue&type=style&index=2&id=caa5e08c&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 742 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".bjg .minibar-btn-box span[data-v-caa5e08c] {\n  color: #6b6761;\n  font-size: 14px;\n}\n.bjg#gwd_mini_compare[data-v-caa5e08c]:hover {\n  background: #fffbef;\n}\n", ""]);

// exports


/***/ }),
/* 743 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function (o) {
  o.__events = {};
  o.on = function (type, listener) {
    o.__events[type] = o.__events[type] || [];
    o.__events[type].push(listener);
  };
  o.off = function (type, listener) {
    var eventsListeners = o.__events[type];
    if (eventsListeners && eventsListeners.length) {
      for (var i = 0; i < eventsListeners.length; i++) {
        if (eventsListeners[i] === listener) {
          eventsListeners.splice(i, 1);
          break;
        }
      }
    }
  };
  o.trigger = function (type) {
    var param = Array.prototype.slice.call(arguments);
    param.shift();
    var eventsListeners = o.__events[type];
    if (eventsListeners && eventsListeners.length) {
      for (var i = 0; i < eventsListeners.length; i++) {
        eventsListeners[i].apply(this, param);
      }
    }
  };
};

/***/ }),
/* 744 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, Vue, $) {

var _this2 = this;

var Index = __webpack_require__(56)['default'];
var request = __webpack_require__(3);
var transText = __webpack_require__(32);

module.exports.init = function callee$0$0() {
  var bgVer, el, xhsSameImgSearcher, tip, addImgBtn;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        context$1$0.next = 2;
        return regeneratorRuntime.awrap(__webpack_require__(16).get('/bgVer'));

      case 2:
        context$1$0.t0 = context$1$0.sent;
        bgVer = parseFloat(context$1$0.t0);

        if (!(bgVer < 1.3)) {
          context$1$0.next = 6;
          break;
        }

        return context$1$0.abrupt('return');

      case 6:
        el = document.createElement('DIV');

        document.body.appendChild(el);
        xhsSameImgSearcher = new Vue({
          el: el,
          data: function data() {
            return {
              img: ''
            };
          },
          render: function render(h) {
            return h(Index, {
              props: {
                site: 'xhs',
                isOldTm: false,
                img: this.img
              },
              ref: 'index'
            });
          },
          mounted: function mounted() {
            this.$refs.index.close();
          }
        });
        tip = '<div class="bjg-same-tip gwd-align" style="" title="' + transText('点击查看结果') + '"><img src="https://cdn.bijiago.com/images/extensions/bijiago/imgSame@2x.png" style="height: 24px; border-radius: 30px; margin-right: 3px">' + transText('图片') + '找同款</div>';

        addImgBtn = function addImgBtn() {
          var _this = this;

          if ($(this).parent().find('.bjg-same-tip').length) return;
          $(this).after(tip);
          console.log('fraction', $(this).parents('.media-container').find('.fraction'));

          var checkFraction = function checkFraction() {
            if ($(_this).parents('.media-container').find('.fraction').length) {
              $(_this).parent().find('.bjg-same-tip').css('right', '55px');
            }
          };
          checkFraction();
          setTimeout(checkFraction, 500);

          $(this).parent().find('.bjg-same-tip').on('click', function (e) {
            var img = $(_this).find('img').attr('src');
            if (!img) {
              var poster = $(_this).find('.xgplayer-poster');
              if (poster.length) {
                var bg = poster.css('background-image');
                img = bg.replace('url("', '').replace('")', '');
              }
            }
            console.log('click on same img', img);
            request.imgUrlToDataUri(img).then(function (data) {
              xhsSameImgSearcher.img = data;
              xhsSameImgSearcher.$refs.index.reset();
              xhsSameImgSearcher.$refs.index.open();
              xhsSameImgSearcher.$refs.index.currentViewing = 'tb';
              setTimeout(function () {
                xhsSameImgSearcher.$refs.index.doSearch('tb');
              }, 0);
            });
            e.preventDefault();
            e.stopPropagation();
          });
        };

        $('body').on('mouseover', '.cover.ld.mask', addImgBtn);
        $('body').on('mouseover', '.swiper-slide .img-container', addImgBtn);
        $('body').on('mouseover', '.player-container', addImgBtn);

        __webpack_require__(10).appendCss('\n    .bjg-same-tip {\n      position: absolute; \n      right: 10px; \n      top: 13px; \n      display: none; \n      background: rgba(0,0,0,0.5); \n      color: white; \n      cursor: default; \n      z-index: 99999;\n      height: 30px;\n      border-radius: 30px;\n      font-size: 14px;\n      padding-left: 3px;\n      padding-right: 3px;\n      cursor: pointer;\n      padding-right: 7px;\n    }\n\n    .note-item:hover .bjg-same-tip, .img-container:hover .bjg-same-tip, .media-container:hover .bjg-same-tip {\n      display: flex;\n    }\n\n    section.note-item.static-layout { position: relative!important }\n  ');

      case 15:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this2);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(17)["default"], __webpack_require__(1)))

/***/ }),
/* 745 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {// site css fix


module.exports.init = function () {
  if (G.site === '360buy') {
    __webpack_require__(10).appendCss('\n      .gwd-trend-hover-p .information-wrap { overflow: visible!important; }\n    ');

    if ($('.information-wrap').length) {
      __webpack_require__(10).appendCss('\n        .gwd-minibar-bg { margin-right: 100px }\n      ');
    }
  }

  if (G.site.includes('amazon')) {
    __webpack_require__(10).appendCss('\n      #dp { max-width: 1650px; }\n    ');
  }

  if (G.site === 'colipu') {
    __webpack_require__(10).appendCss('\n      .gwd-minibar-bg::after {\n        content: none!important;\n        clear: none!important;\n      }\n    ');
  }

  if (G.site === 'tmall' || G.site === 'taobao') {
    __webpack_require__(10).appendCss('\n      .Price--sale--1huSj6m { z-index: 99 }\n\n      .undefined {\n        // visibility: visible!important;\n      }\n\n      .gwd_top .gwd_unfold .DetailInfo--tabTitleWrap--3q2Jn-e { top: 36px!important }\n\n      .miniPanel .gwd-minibar-bg { display: none }\n      .miniPanel #bjgext_mb_bg { display: none }\n\n      .PurchasePanel--miniPanel--2qnyyyB { top: 126px!important }\n\n      .gwd_top .gwd_unfold .isStickied--cAvTq3XA {\n        top: 36px!important;\n      }\n\n      .Price--priceWrap--3MY0wsh {\n        white-space: nowrap;\n      }\n\n      .Price--priceAction--1hvOH5u {\n        white-space: initial;\n      }\n\n      .miniPanel .beautify-scroll-bar {\n        overflow: hidden scroll!important;\n      }\n\n      .bannerWrap--ApeVpytP { position: relative; top: 102px; }\n\n      .PurchasePanel--footWrap--3w0gUyF { overflow: visible!important }\n\n    ');

    if ($('[class^=GoLoginInfo--]').length) {
      __webpack_require__(10).appendCss('\n      .BasicContent--detailInfoWrap--3U0iFLv, .detailInfoWrap--XXyEmkTY{\n        top: 15px;\n      }\n      ');
    }

    if (location.host === 'chaoshi.detail.tmall.com') {
      __webpack_require__(10).appendCss('\n      .gwd-contact-link { z-index: 0!important }\n      ');
    }

    if ($('.bannerWrap--ApeVpytP').length) {
      __webpack_require__(10).appendCss('\n        .BasicContent--detailInfoWrap--3U0iFLv, .detailInfoWrap--XXyEmkTY {\n          top: 108px;\n        }\n      ');
    }

    if (!$('.GoLoginInfo--M1o9HkO3').length) {
      __webpack_require__(10).appendCss('\n        .BasicContent--detailInfoWrap--3U0iFLv, .detailInfoWrap--XXyEmkTY{\n          position: relative;\n          top: 105px;\n        }\n      ');
    }

    __webpack_require__(11).waitForConditionFn(function () {
      return $('.GoLoginInfo--M1o9HkO3').length;
    }).then(function () {
      __webpack_require__(10).appendCss('\n        .BasicContent--detailInfoWrap--3U0iFLv, .detailInfoWrap--XXyEmkTY{\n          top: 0px;\n        }\n      ');
    });
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 746 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

module.exports = {
  init: function init() {
    var config, newestBuild, currentBuild, _ret;

    return regeneratorRuntime.async(function init$(context$1$0) {
      var _this = this;

      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          __webpack_require__(6).log('ad init');
          context$1$0.next = 3;
          return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

        case 3:
          config = context$1$0.sent;

          __webpack_require__(6).log('ad config', config);

          if (!(config.newestBuild && G.from_device === 'chrome')) {
            context$1$0.next = 12;
            break;
          }

          newestBuild = new Date(config.newestBuild).getTime();
          currentBuild = gwd_G.version;

          if (!(newestBuild > currentBuild)) {
            context$1$0.next = 12;
            break;
          }

          _ret = (function () {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.includes('edg')) {
              return {
                v: undefined
              };
            }

            var add = function add() {
              if (document.getElementById('gwd-upgrade-link')) {
                return;
              }
              var right = document.querySelectorAll('.gwd-topbar-right')[0];
              if (!right) {
                return;
              }
              var a = document.createElement('A');
              a.id = 'gwd-upgrade-link';
              var img = document.createElement('IMG');
              img.src = 'https://cdn.gwdang.com/images/extensions/update@2x.png';
              img.style.height = '15px';
              img.style.verticalAlign = 'middle';
              a.target = '_blank';
              a.style.float = 'left';
              a.style.lineHeight = '36px';
              a.style.marginRight = '15px';
              a.appendChild(img);
              a.href = 'https://www.gwdang.com/v2/app/questions?page=chrome&fromUpgrade=1';
              if (navigator.userAgent.toLowerCase().indexOf('qqbrowser') > -1) {
                a.href = 'https://www.gwdang.com/v2/app/questions?page=qqbrowser&fromUpgrade=1';
              }
              if (navigator.userAgent.toLowerCase().indexOf('yabrowser') > -1) {
                a.href = 'https://www.gwdang.com/app/extension?page=question&guide=yandex';
              }
              // if (navigator.userAgent.toLowerCase.indexOf('opr') > -1) {
              //   a.href = 'https://www.gwdang.com/app/extension?page=question&guide=qq'
              // }
              right.prepend(a);
            };

            if (location.href.includes('.tmall.com') || location.href.includes('.taobao.com')) {
              setInterval(function () {
                if (!document.getElementById('gwd-upgrade-link')) {
                  add();
                }
              }, 2000);
            } else {
              add();
            }
          })();

          if (!(typeof _ret === 'object')) {
            context$1$0.next = 12;
            break;
          }

          return context$1$0.abrupt('return', _ret.v);

        case 12:
          if (G.from_device.includes('bijiago') && config.adsBijiago) {
            config.ads = config.adsBijiago;
          }
          if (G.from_device.includes('biyibi') && config.adsBiyibi) {
            config.ads = config.adsBiyibi;
          }
          if (config.ads) {
            config.ads.forEach(function callee$1$0(item) {
              var el;
              return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
                while (1) switch (context$2$0.prev = context$2$0.next) {
                  case 0:
                    if (!location.host.includes(item.site)) {
                      context$2$0.next = 20;
                      break;
                    }

                    if (!(item.startTime && new Date(item.startTime) > new Date())) {
                      context$2$0.next = 3;
                      break;
                    }

                    return context$2$0.abrupt('return');

                  case 3:
                    if (!(item.endTime && new Date(item.endTime) < new Date())) {
                      context$2$0.next = 5;
                      break;
                    }

                    return context$2$0.abrupt('return');

                  case 5:
                    context$2$0.next = 7;
                    return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
                      return $(item.selector).length;
                    }));

                  case 7:
                    el = $(item.selector);
                    context$2$0.t0 = item.position;
                    context$2$0.next = context$2$0.t0 === 'top' ? 11 : context$2$0.t0 === 'bottom' ? 13 : context$2$0.t0 === 'before' ? 15 : context$2$0.t0 === 'after' ? 17 : 19;
                    break;

                  case 11:
                    el.prepend(item.html);
                    return context$2$0.abrupt('break', 20);

                  case 13:
                    el.append(item.html);
                    return context$2$0.abrupt('break', 20);

                  case 15:
                    el.before(item.html);
                    return context$2$0.abrupt('break', 20);

                  case 17:
                    el.after(item.html);
                    return context$2$0.abrupt('break', 20);

                  case 19:
                    el.append(item.html);

                  case 20:
                  case 'end':
                    return context$2$0.stop();
                }
              }, null, _this);
            });
          }

        case 15:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 747 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var getCoupon = __webpack_require__(33);
var getCouponNew = __webpack_require__(38);
var cnzz = __webpack_require__(12);
var QRReloader = __webpack_require__(61);

var globalInfo = {},
    randomNum = undefined,
    hasReqId = [];
var domPattern = {
  'taobao': {
    '#J_Pine': {
      "isSmall": true,
      'listdom': "li.tuijian-item",
      'href': '.pic-con a.img-con',
      'insertdom': 'div.pic-con'
    },
    '.tb-main-layout .col-sub .skin-box-bd': {
      'listdom': ".item1line1 .photo",
      'href': 'a',
      'insertdom': '.item1line1 .photo'
    },
    '#J_Pinus_Enterprise_Module .tuijian-bd-window': {
      'listdom': ".tuijian-item",
      'href': '.tuijian-img a.img-con',
      'insertdom': '.tuijian-item'
    },
    '#viewed-items-slide .item-list': {
      'listdom': "li .item",
      'href': 'a.side-item',
      'insertdom': 'div.pic'
    },
    '#bought-items-slide .item-list': {
      'listdom': "li .item",
      'href': 'a.side-item',
      'insertdom': 'div.pic'
    },
    '#detail-recommend-linjia .linjia-items-slide .slide-content': {
      'listdom': "li .item",
      'href': 'a.side-item',
      'insertdom': 'div.pic'
    }
  },
  'tmall': {
    '#ald-skuRight': {
      'listdom': ".ald-switchable-content li",
      'href': 'a.ALDCLS-act',
      'insertdom': 'div.img'
    },
    '#J_DcLeft .skin-box-bd': {
      'listdom': ".item1line1 .photo",
      'href': 'a',
      'insertdom': '.item1line1 .photo'
    },
    '#J_TjWaterfall': {
      'listdom': "li",
      'href': 'a.ald-wf-pic',
      'insertdom': 'li'
    }
  },
  'taobao-ju': {}
};

var listenDomPattern = {
  'tmall': ["#J_TabRecommends", "#J_TjWaterfall"],
  'taobao': ['#detail-recommend-viewed', ["#viewed-items-slide .item-list", "#bought-items-slide .item-list", "#detail-recommend-linjia .linjia-items-slide .slide-content"]]
};
var searchZoneId = {
  'bjg923253': '10015',
  'union_bijiago': '10013',
  'union_bijiago_uos': '10013',
  'union_east': '10007',
  'union_universal': '40009',
  'union_cchrome': '10025',
  'union_yunqi': '10025',
  '538625': '10025'
};

var pidConfig = {
  'bjg923253': 'pid-bjg-923253',
  'union_bijiago': 'pid-bjg-union',
  'union_east': 'pid-east',
  'union_universal': 'pid-universal',
  'union_cchrome': 'pid-cchrome',
  'union_yunqi': 'pid-yunqi'
};

// 淘宝天猫商品详情页   一些推荐的商品  添加优惠券
module.exports.init = function () {
  randomNum = parseInt(Math.random() * 100);
  if (G.from_device === "kuaik") {
    randomNum = 100;
  }
  setTimeout(render, 5000);
};

var render = function render() {
  var site = G.site;
  var domOjb = domPattern[site];
  if (!domOjb) return;
  for (var pt in domOjb) {
    if ($(pt).length > 0 && $(pt).is(':visible')) {
      render2(pt, domOjb);
    }
  }
  listenDom();
  addEvent();
};
var render2 = function render2(pt, domOjb) {
  var site = G.site;
  var dom = $(pt).find(domOjb[pt]['listdom']);
  if (dom.find('.detail_coupon_tip').length > 0) return;
  for (var i = 0; i < dom.length; i++) {
    var href = dom.eq(i).find(domOjb[pt]['href']).attr('href');
    var id = href.match(/[?&]id=([0-9]+)/);
    if (id) id = id[1];
    if (!id) continue;
    var insertDom = dom.eq(i).find(domOjb[pt]['insertdom']);
    if ($(insertDom).length === 0) insertDom = dom.eq(i);
    renderTip(id, insertDom, site, domOjb[pt]["isSmall"]);
  }
};

var renderTip = function renderTip(id, insertDom, site, isSmall) {
  var cb = function cb(data) {
    if (!data) return;
    if (!data.data) return;
    data = data.data;
    data.site = site;
    globalInfo[id] = data;
    var dom = '<a href="' + data.click_url2 + '" data-id="' + id + '" title="当前商品领券立减' + data.coupon.coupon_money + '元" class="detail_coupon_tip detail_coupon_tip_big" target="_blank"><span>¥' + data.coupon.coupon_money + '</span> 券</a>';
    if (randomNum > -1) {
      dom = '<a  data-id="' + id + '" class="detail_coupon_tip detail_coupon_tip_big" style="cursor:default;" target="_blank"><span>¥' + data.coupon.coupon_money + '</span> 券</a>';
    }
    if (isSmall) {
      dom = '<a href="' + data.click_url2 + '" data-id="' + id + '" title="当前商品领券立减' + data.coupon.coupon_money + '元" class="detail_coupon_tip detail_coupon_tip_small" target="_blank">¥' + data.coupon.coupon_money + ' </a>';
      if (randomNum > -1) {
        dom = '<a  data-id="' + id + '" class="detail_coupon_tip detail_coupon_tip_small" style="cursor:default;" target="_blank">¥' + data.coupon.coupon_money + '</a>';
      }
    }
    // if (randomNum > -1) {
    //   dom = `<a  data-id="${id}" class="search_coupon_tip" style="cursor:default;" target="_blank">￥${data.coupon.coupon_money} 优惠券<a>`
    // }
    $(insertDom).eq(0).append($(dom));
  };
  getCoupon.init(id, searchZoneId[G.union], cb);
  // if (G.union !== '538625') {
  //   getCouponNew.initWithDp(id, pidConfig[G.union], 'mini', cb)
  // } else {
  //   getCoupon.init(id, searchZoneId[G.union], cb)
  // }
};

var listenDom = function listenDom() {
  var Timer = undefined,
      hasrun = undefined;
  var arr = listenDomPattern[G.site];
  if (!arr) return;
  var dom = $(arr[0])[0];
  if (!dom) return;
  dom.addEventListener('DOMSubtreeModified', function () {
    clearTimeout(Timer);
    if (G.site === 'tmall' && $(dom).find(arr[1]).find('li').length > 0 && hasrun) return;
    if (G.site === 'taobao' && $(dom).find(arr[1][0]).find('li').length > 0 && hasrun) return;
    Timer = setTimeout(function () {
      hasrun = true;
      if (G.site === 'tmall') {
        render2(arr[1], domPattern[G.site]);
      } else {
        render2(arr[1][0], domPattern[G.site]);
        render2(arr[1][1], domPattern[G.site]);
        render2(arr[1][2], domPattern[G.site]);
      }
    }, 3000);
  }, false);
};

var addEvent = function addEvent() {
  $('body').on('click', function (e) {
    if ($(e.target).hasClass('detail_coupon_tip')) {
      cnzz.log('click:searchcoupon');
      // utils.tongjiLog('click:searchcoupon')
    }
  });
  $('body').on('mouseover', function (e) {
    if ($(e.target).hasClass('detail_coupon_tip')) {
      var id = $(e.target).attr('data-id');
      if ($(e.target).find('.qr_coupondetail').length === 0 && randomNum > -1) {
        cnzz.log('track:searchcoupon');
        // utils.tongjiLog('track:searchcoupon')
        addQRcode(id, e.target);
      }
    }
  });
};

var getQRcode = __webpack_require__(23);
var callbacks = undefined,
    hasreq = undefined,
    urls = undefined;
var getPageInfo = function getPageInfo(info, callback) {
  var infoObj = {};
  if (hasreq) {
    callbacks = callback;
    urls = info.click_url;
    return;
  }
  var itemId = info.itemId;
  var obj = {
    itemNumId: itemId
  };
  var url = 'https://acs.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?data=' + encodeURIComponent(JSON.stringify(obj));
  request.getPure(url).then(function (data) {
    try {
      var item = data.data.item;
      var seller = data.data.seller;
      var item2 = JSON.parse(data.data.apiStack[0].value);
      infoObj.title = item.title;
      infoObj.picUrl = item.images[0];
      infoObj.shopName = seller.shopName;
      infoObj.shopLogo = seller.shopIcon;
      infoObj.shopUrl = seller.shopUrl;
      infoObj.biz30Day = item2.item.sellCount;
      infoObj.discountPrice = (Number(item2.skuCore.sku2info['0'].price.priceMoney) / 100).toFixed(2);
    } catch (e) {
      //require('common/extConsole').error(e)
    }
    if (!infoObj.title) {
      infoObj.title = info.titleGot;
    }
    if (!infoObj.picUrl) {
      infoObj.picUrl = info.imgGot;
    }
    if (!infoObj.discountPrice) {
      infoObj.discountPrice = info.priceGot;
    }
    infoObj.id = itemId;
    infoObj.amount = info.coupon.coupon_money;
    infoObj.effectiveStartTime = info.coupon.start_time;
    infoObj.effectiveEndTime = info.coupon.end_time;
    infoObj.pid = info.pid;
    infoObj.tkl = info.tkl;
    infoObj.tmall = location.host.indexOf('tmall') > -1 ? true : false;
    console.log(infoObj);
    callback(infoObj, info.click_url);
    if (callbacks) {
      callbacks(infoObj, urls);
    }
  });
};
var addQRcode = function addQRcode(id, dom) {
  if (G.forbidCoupon) return;
  if (hasReqId.indexOf(id) > -1) return;
  hasReqId.push(id);
  if (!id) return;
  var data = globalInfo[id];
  data.pid = searchZoneId[G.union];
  data.itemId = id;

  data.imgGot = $(dom).parents('li').find('.img img').attr('src');
  data.titleGot = $(dom).parents('li').find('.look_title a').text().replace(/ /g, '').replace(/\n/g, '');
  data.priceGot = $(dom).parents('li').find('.look_price').text().replace(/ /g, '').replace('¥', '');
  getPageInfo(data, function (newData, url) {
    var id = 'gwd-coupon-' + parseInt(Math.random() * 1000);
    var name = '微信';
    var view = '<div class="minicoupon_detail" id="' + id + '">\n        <img src="xxx">\n        <span>' + name + '扫码领券</span>\n      </div>';
    $(dom).append(view);

    QRReloader.init(newData, url, '#' + id + ' > img', function (newData2) {
      $(dom).parent().css('overflow', 'visible');
      $(dom).parents('.tuijian-bd').css('overflow', 'visible');
    }, false, false);
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 748 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime, Vue) {

var _this = this;

var template = __webpack_require__(13);
var request = __webpack_require__(3);
var cnzz = __webpack_require__(12);

var posDict = {
  'taobao': '#J_Social',
  'tmall': '#J_DetailMeta .tm-action.tm-clear'
};
var tokenCache = undefined;

module.exports.init = function () {
  if (G.from_device.indexOf('bijiago') > -1 && $('html').hasClass('gwd_taobao_ju')) return;
  if (window.bjd_tkl_exist && window.bjd_tkl_exist.indexOf(G.from_device) === -1) {
    return;
  }
  window.bjd_tkl_exist = G.from_device;
  if (G.forbidTkl) return;
  if (location.host.indexOf('taobao') === -1 && location.host.indexOf('tmall') === -1) {
    return;
  }

  if (G.site === 'taobao-ju') {
    if ($('#bjg-tkl').length) {
      $('#bjg-tkl').remove();
    }
    renderJu();
    return;
  }

  render();
};

var renderJu = function renderJu() {
  var html = __webpack_require__(749);
  var res = template.compile(html)({
    s_server: G.s_server
  });
  window.$ = $;
  $('.botbar .operation').append(res);

  addEventJu();
};

var addEventJu = function addEventJu() {
  var tklOK = false;
  $('#bjg-tkl').on('click', function (e) {
    if (tklOK) {
      clipboard();
      e.preventDefault();
      return;
    } else {
      cnzz.log("gettklinfo");
      getTkl(function (data) {
        if (data) {
          $('#gwd-tkl-text').text("点击复制淘口令");
          tklOK = true;
          var dptle = getTbTle();
          var newTxt = '7' + data;
          $('#box_btn').text(newTxt);
          $('.gggbox-input').val(newTxt);
        } else {
          // $('.cptkl-remind-err').show()
          cnzz.log("gettklerr");
          $('#bjg-tkl').addClass('gwd-notkl-error');
        }
      });
    }
    e.preventDefault();
  });
};

var getTkl = function getTkl(callback) {
  if (tokenCache) {
    callback(tokenCache);
    return;
  }
  // callback(false); return
  // let id = location.href.match(/id=(\d+)/)[1];
  // if (G.site === 'taobao-ju') {
  //   id = location.href.match(/item_id=(\d+)/)[1];
  // }
  var id = __webpack_require__(10).getParameterByName('id');
  if (!id) id = __webpack_require__(10).getParameterByName('item_id');
  var pic = G.dp.pic;
  // let s = $('#J_UlThumb img')
  // if (s.length) {
  //   pic = s[s.length - 1].src
  // }

  var url = G.server + '/extension/TaoKL?id=' + id + '&title=' + encodeURIComponent(G.dp.name.trim()) + '&img=' + encodeURIComponent(pic) + '&price=' + G.dp.price + '&shopName=' + encodeURIComponent(G.dp.shopName.trim()) + '&sellAmount=' + encodeURIComponent(G.dp.shopAmount);
  if (G.ss_name === 'priceDog') {
    url = G.u_server + '/redirect/tao?id=' + id + '&format=json&tkl=1';
  }
  request.get(url).then(function (data) {
    if (data && data.ios_token) {
      tokenCache = data.ios_token;
      callback(data.ios_token);
    } else {
      callback();
    }
  })['catch'](function () {
    callback();
  });
};
var getTbTle = function getTbTle() {
  var tle = '';
  if (G.site === 'taobao') {
    tle = $('#J_Title h3').text().trim();
  } else if (G.site === 'taobao-ju') {
    tle = $('.title').text().trim();
  } else {
    tle = $('.tb-detail-hd>h1').text().trim();
  }
  return tle;
};

var render = function render() {
  var html, str, posContainer, htmlContainer, config, pos, el, TklSideBar;
  return regeneratorRuntime.async(function render$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!$('.gwd-bottom-img-area').length) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        $('.gwd-bottom-img-area').remove();
        html = __webpack_require__(750);

        if (G.lang === 'zh-tr') {
          html = __webpack_require__(751);
        }
        // let pos = posDict[G.site];
        str = 'is_tb_site';

        if (G.site === 'tmall') str = 'is_tm_site';

        posContainer = '[class^=PicGallery--mainPicWrap--]', htmlContainer = '<div class="gwd-bottom-img-area" style="height: 70px; position: absolute; z-index: 9999; background: white; bottom: -125px; width: 100%"></div>';

        if (!$('[class^=Item2024--main--]').length) {
          posContainer = '[class^=PicGallery--root--]';
          htmlContainer = '<div class="gwd-bottom-img-area" style="height: 70px; position: relative; z-index: 9999; background: white; top: 10px; width: 100%"></div>';
        }
        context$1$0.next = 11;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdConfig'));

      case 11:
        config = context$1$0.sent;

        if ($(posContainer).length) {
          context$1$0.next = 16;
          break;
        }

        __webpack_require__(6).warn('no posContainer');
        context$1$0.next = 16;
        return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
          posContainer = config.tklContainer.find(function (item) {
            return $(item).length;
          });
          htmlContainer = '<div class="gwd-bottom-img-area" style="height: 70px; position: absolute; z-index: 9999; background: white; bottom: -125px; width: 100%"></div>';
          return !!posContainer;
        }));

      case 16:
        if ($('[class^=GoLoginInfo--]').length) {
          posContainer = config.loginTklContainer.find(function (item) {
            return $(item).length;
          });
          htmlContainer = '<div class="gwd-bottom-img-area" style="position: absolute; top: 0; z-index: 9999; width: 500px; left: 110px;"></div>';
        }
        $(posContainer).append(htmlContainer);
        // await require('standard/module/util').waitForConditionFn(() => $('.gwd-bottom-img-area').length > 0)
        pos = '.gwd-bottom-img-area';

        if ($(pos).length > 0) {
          $('.' + str).remove();
          $(pos).append(template.compile(html)({
            s_server: G.s_server,
            str: str
          }));
          if (G.ss_name === 'priceDog') {
            $('#cptklbox').hide();
          }
        }

        __webpack_require__(4).setMet('tklBarReady', true);
        addEvent();

        if (!((G.from_device === 'biyibi' || G.from_device === 'bijiago') && window.gwd_G)) {
          context$1$0.next = 24;
          break;
        }

        return context$1$0.abrupt('return');

      case 24:

        if (G.tklSideBar) {
          G.tklSideBar.$el.remove();
          G.tklSideBar.$destroy();
        }
        el = document.createElement('div');

        document.body.appendChild(el);
        TklSideBar = __webpack_require__(752)['default'];

        G.tklSideBar = new Vue({
          el: el,
          render: function render(h) {
            return h(TklSideBar, {
              props: {
                getTKL: getTkl
              }
            });
          }
        });

      case 29:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
var clicked = undefined;
var clipboard = function clipboard() {
  //if (clicked) return;
  var element = document.getElementById('box_btn');
  var element2 = document.querySelectorAll('.gggbox-input')[0];
  if (element.hasAttribute('contenteditable')) {
    element.focus();
  }
  var selection = window.getSelection();
  var range = document.createRange();
  range.selectNodeContents(element);
  selection.removeAllRanges();
  selection.addRange(range);
  window.selectedText = selection.toString();
  if (!window.selectedText) {
    element2.select();
    element2.setSelectionRange(0, element2.value.length);
    window.selectedText = element2.value;
  }
  try {
    var t = window.document.execCommand("copy");
    if (t) {
      clicked = true;
      cnzz.log("copytklss");
      if (G.site === 'taobao-ju') {
        $('#gwd-tkl-text').text("复制成功");
        $('#bjg-tkl img').attr('src', G.s_server + '/images/extensions/TKLSuccess@2x.png');
      }
      $('.cptkl-btn span').text(G.lang === 'zh-tr' ? '復製成功' : "复制成功");
      $('.cptkl-btn').removeClass('cpready').addClass('cpsuccess');
      $('.cptkl-remind-err').hide();
    }
  } catch (e) {
    __webpack_require__(6).error(e);
  }
};

var addEvent = function addEvent() {
  var tklOK = undefined;
  $('.cptkl-btn').on('click', function () {
    if (tklOK) {
      clipboard();
      return;
    } else {
      cnzz.log("gettklinfo");
    }

    getTkl(function (data) {
      if (data) {
        $('.cptkl-btn span').text(G.lang === 'zh-tr' ? '點擊復製淘口令' : "点击复制淘口令");
        $('.cptkl-btn').addClass('cpready');
        tklOK = true;
        var dptle = getTbTle();
        var newTxt = '7' + data;
        $('#box_btn').text(newTxt);
        $('.gggbox-input').val(newTxt);
      } else {
        $('.cptkl-remind-err').show();
        // setTimeout(() => {
        //   $('.cptkl-remind-err').fadeOut()
        // }, 5000)
        $('.cptkl-btn').addClass('cpready');
        $('.cptkl-btn span').text(G.lang === 'zh-tr' ? '點擊復製URL' : "点击复制链接");
        tklOK = true;
        var dptle = getTbTle();
        var newTxt = location.href;
        $('#box_btn').text(newTxt);
        $('.gggbox-input').val(newTxt);
        cnzz.log("gettklerr");
      }
    });
  });
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5), __webpack_require__(17)["default"]))

/***/ }),
/* 749 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, s_server = $data.s_server;
    $$out += '<a href="#" id="bjg-tkl" style="font-size: 0; position: relative; vertical-align: middle; top: 0.5px;">\n    <img src="';
    $$out += $escape(s_server);
    $$out += '/images/extensions/TKL@2x.png" alt="" style="width: 14px; height: 14px; margin-top: -4px;">\n    <span style="width: 4px; display: inline-block"></span>\n    <span style="font-size: 12px; color: #727272" id="gwd-tkl-text">生成淘口令</span>\n</a>\n<input type="" name="" value="456" class="gggbox-input">\n<a id="box_btn" class="box-btn"  contenteditable="1">456</a>\n<style>\n    .gwd-notkl-error::after {\n        content: \'此商品暂不支持生成淘口令\';\n        position: absolute;\n        top: 6px;\n        left: 50%;\n        width: 150px;\n        margin-left: -75px;\n        font-size: 12px;\n        transform: scale(0.8333);\n        display: inline-block;\n        transform-origin: top center;\n        color: #ff8c2b;\n    }\n\n    .gggbox-input {\n        height: 1px;\n        width: 1px;\n        overflow: hidden;\n        position: fixed;\n        bottom: 0px;\n        left:-999px;\n    }\n\n    #box_btn {\n        height: 1px;\n        width: 1px;\n        overflow: hidden;\n        float: left;\n        position: fixed;\n        bottom: 0px;\n    }\n</style>\n';
    return $$out;
};

/***/ }),
/* 750 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, str = $data.str, s_server = $data.s_server;
    $$out += '<div id="cptklbox" class="';
    $$out += $escape(str);
    $$out += '">\n  <div class="cptkl-btn">\n    <em></em>\n    <span>生成淘口令</span>\n  </div>\n  <span class="cptkl-tle">一键分享到微信或QQ</span>\n  <br>\n  <span class="cptkl-remind-err">抱歉\uFF0C当前商品暂时无法生成淘口令\uFF0C可以点击复制商品链接</span>\n  <style type="text/css">\n    #cptklbox {\n      float: left;\n      height: 52px;\n    }\n    #cptklbox * {\n      float: left;\n      font-family: "Microsoft YaHei";\n    }\n    .cptkl-btn {\n      /* width: 122px; */\n      padding-right: 17px;\n      height: 26px;\n      border-radius: 4px;\n      border: 1px solid #ff9851;\n      background-color: #FFF3ED;\n      cursor: pointer;\n    }\n    .cptkl-remind-err {\n      color: #B66A6A;\n      font-size: 12px;\n      display: none;\n      line-height: 16px;\n      margin-top: 8px;\n    }\n    .cptkl-btn em {\n      width: 16px;\n      height: 16px;\n      background: url(\'';
    $$out += $escape(s_server);
    $$out += '/images/extensions/commonpng/cptkl.png\') 0px 0px no-repeat;\n      margin: 5px 6px 5px 17px;\n    }\n    .cptkl-btn.cpsuccess em {\n      margin-top: 6px;\n      background: url(\'';
    $$out += $escape(s_server);
    $$out += '/images/extensions/commonpng/cptkl-success.png\') 0px 0px no-repeat;\n    }\n    .cptkl-btn.cpready em {\n      margin-left: 17px;\n    }\n    .cptkl-btn span {\n      line-height: 24px;\n      font-size: 12px;\n      color: #EF6701;\n    }\n    .cptkl-tle {\n      margin-left: 10px;\n      font-size: 12px;\n      line-height: 26px;\n      color: #7d7e80;\n    }\n    .tb-gallery p.tm-action {\n      padding-bottom: 15px;\n    }\n\n    #tttgbgbs {\n    height: 1px;\n    width: 1px;\n    overflow: hidden;\n    float: left;\n    position: fixed;\n    bottom: -9px;\n    left: -1000000px;\n  }\n    #box_btn {\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n      float: left;\n      position: fixed;\n      bottom: 0px;\n    }\n    .gggbox-input {\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n      float: left;\n      position: fixed;\n      bottom: 0px;\n      left:-99999px;\n    }\n\n    .Tabs--headerPlaceholder--3rpdDfW .gwd-bottom-img-area {\n      display: none;\n    }\n  </style>\n</div>\n<div id="tttgbgbs">\n<a id="box_btn" class="box-btn"  contenteditable="1">456</a>\n<input type="" name="" value="456" class="gggbox-input">\n</div>';
    return $$out;
};

/***/ }),
/* 751 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, str = $data.str, s_server = $data.s_server;
    $$out += '<div id="cptklbox" class="';
    $$out += $escape(str);
    $$out += '">\n  <div class="cptkl-btn">\n    <em></em>\n    <span>生成淘口令</span>\n  </div>\n  <span class="cptkl-tle">一鍵分享到微信或QQ</span>\n  <span class="cptkl-remind-err">抱歉\uFF0C當前商品暫時無法生成淘口令~</span>\n  <style type="text/css">\n    #cptklbox {\n      float: left;\n      width: 254px;\n      height: 52px;\n    }\n    #cptklbox.is_tm_site {\n      margin-left: 40px;\n    }\n    #cptklbox.is_tb_site {\n      margin-top: 15px;\n    }\n    #cptklbox * {\n      float: left;\n      font-family: "Microsoft YaHei";\n    }\n    .cptkl-btn {\n      width: 122px;\n      height: 26px;\n      border-radius: 2px;\n      border: 1px solid #ff9851;\n      background-color: #FFF3ED;\n      cursor: pointer;\n    }\n    .cptkl-remind-err {\n      color: #B66A6A;\n      font-size: 12px;\n      display: none;\n      line-height: 16px;\n      margin-top: 8px;\n    }\n    .cptkl-btn em {\n      width: 16px;\n      height: 16px;\n      background: url(\'';
    $$out += $escape(s_server);
    $$out += '/images/extensions/commonpng/cptkl.png\') 0px 0px no-repeat;\n      margin: 5px 6px 5px 20px;\n    }\n    .cptkl-btn.cpsuccess em {\n      margin-left: 27px;\n      margin-top: 6px;\n      background: url(\'';
    $$out += $escape(s_server);
    $$out += '/images/extensions/commonpng/cptkl-success.png\') 0px 0px no-repeat;\n    }\n    .cptkl-btn.cpready em {\n      margin-left: 9px;\n    }\n    .cptkl-btn span {\n      line-height: 26px;\n      font-size: 12px;\n      color: #EF6701;\n    }\n    .cptkl-tle {\n      margin-left: 10px;\n      font-size: 12px;\n      line-height: 26px;\n      color: #7d7e80;\n    }\n    .tb-gallery p.tm-action {\n      padding-bottom: 15px;\n    }\n\n    #tttgbgbs {\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n      float: left;\n      position: fixed;\n      bottom: -9px;\n      left: -9px;\n    }\n    #box_btn {\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n      float: left;\n      position: fixed;\n      bottom: 0px;\n    }\n    .gggbox-input {\n      height: 1px;\n      width: 1px;\n      overflow: hidden;\n      float: left;\n      position: fixed;\n      bottom: 0px;\n      left:-999px;\n    }\n  </style>\n</div>\n<div id="tttgbgbs">\n  <a id="box_btn" class="box-btn"  contenteditable="1">456</a>\n  <input type="" name="" value="456" class="gggbox-input">\n</div>\n';
    return $$out;
};

/***/ }),
/* 752 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__ = __webpack_require__(753);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TklSideBar_vue_vue_type_script_lang_js__ = __webpack_require__(224);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__TklSideBar_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__TklSideBar_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TklSideBar_vue_vue_type_style_index_0_id_a3ada6d6_scoped_true_lang_less__ = __webpack_require__(756);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__TklSideBar_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__["staticRenderFns"],
  false,
  null,
  "a3ada6d6",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('a3ada6d6')) {
      api.createRecord('a3ada6d6', component.options)
    } else {
      api.reload('a3ada6d6', component.options)
    }
    module.hot.accept("./TklSideBar.vue?vue&type=template&id=a3ada6d6&scoped=true", function () {
      api.rerender('a3ada6d6', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/common/components/TklSideBar.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 753 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__ = __webpack_require__(754);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_template_id_a3ada6d6_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 754 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("a", {
    staticClass: "gwd-tkl-float gwd-column gwd-align",
    attrs: { title: _vm.transText("一键分享到微信/QQ") },
    on: {
      click: function click($event) {
        $event.preventDefault();
        return _vm.click.apply(null, arguments);
      }
    }
  }, [_c("img", {
    staticStyle: { "margin-top": "14px", width: "24px", height: "24px" },
    attrs: { src: __webpack_require__(755), alt: "" }
  }), _vm._v(" "), _c("span", {
    staticStyle: {
      "text-decoration": "none",
      "font-size": "12px",
      color: "#333",
      "margin-top": "4px"
    }
  }, [_vm._v(_vm._s(_vm.tkl ? _vm.transText(_vm.copied ? "复制成功" : "点击复制") : _vm.transText("淘口令")))])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 755 */
/***/ (function(module, exports) {

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABWBJREFUaEPtWVtOG0kUPbdNpDCaMO182eRjzN9IoaFZQWAHZAXACiArCKwAsoLACjArwDugB4M0f2k+Bns0Eq5IiWAGXHdU/bD7Uf3wS6NI1A/Crq6+5z7OPbdM+MEX/eD24xnA/x3BmUXArP3WiIF7eBBCuGLagKcCwDQbJl6+2oSBd8S0DnDc+NBqggDDIfDvkqglbtvNSQFNBMCsLa8T0UcA62MZQhAENKV8PBDdP9xxzhgLwMSGaywlwvE4QEYCoFKF5l99BrCZ5S0GO2B2ALoBGT0wfx2kFGGVQDYAfYoBIKL9u9vLg7LRKA3AfPPWJmmc6l7OzC2ATvBQaQrhFBaqWbMbQH+dCCr9dGBazI87ZdKqFADPeDbOwTCjnvENx4HoXqm/Yy2zZm1nAHGZHzeKQBQC0BpPEAzsTINFQtRmbXk/IISoIwpB5AJQXE704jwRZpe5siG6zliskRcmjxwMOo1Hmpxe53It67lcANW6pYyPUuTMjB9Gwm6Q0b+IgiDg6K7T/qADkQkgyE3FOOGaufGRdFL9RTlvsPhJrom/r50kiEwA1br1JZo6zLwxSbGOWuGammj1Ou2NUgCS3mfGsei2d0Y1omi/uWhtEmOLCSc6QijjRG0EqosrF2BWDcdbzJWlaRataojG/MJHBu8FrxC9TruaBBx0/EEqEfjTXecqfMbbngIQMI9Kn8D46Xpf3xDZ6XWutExTXbR6kYJOAdUA8BrLoHhZYlP81T4rSgf1va9Kf7YBagDs4uGbE5XQZn1ll8BH0bOUV+X93H5WBzfry0cE2h069HEp2tzSAJIP3FeqpeSBMo54P9mtPZFG8hNJ41CnWvMo0nOKXydKwgQZIXdE9/o4/F8DwDqnIfdrczMZjdeLq5+Z5XaZKAV7VBMcaKA8hlO6iagfSWlW0mW/JIDs3AwPSPULJTOkbILIDpRnDFdYiGbdOqWhqnX5vrKmi7TZsE36p98bRmDKAKJUR8wHdxHvmPWVPQKr1PHDT3gf0mVg2EUYCc5J1Wrd4jEBwO112ktZqZGgOe3eqKcZ8oPoXA+KWDES+nQI4rPo59H3jZ5CNeuYCFvhIb1OO1tuRAqMgTPRaacGHbP+do/gFTCY4+EvUzPJXpB0gqaIhy8MXpopIQJOV2mglrbVv160jpl9h4wFIOIAnT2aPuAN6sPul8jrWHhVgf3b/xJSZ5JNknJ8HD1l1mOsiGStZEiJ/O4Xz9H4IOLxPnBmgFY9qTCc4nLrSZdOSVUA5lavexUTdFoA6e5H26J7eaJ9iU9zAzbR5rVHrZW1UfVUNP389EnboQfwxrZJekaFK5On1QZvSKf+YYTXozhcNirvxZ9OSsvnFXHK+9AzYt5AE2MjlRp3t/mSWjGGLxf4VxB9BaM5zgwRXN/EoqrzvnJADgDNaDfinU0ZmtTtqdYtpX2ilJxZPwVDfVyZeohnCMKbE3765TCmqwrqp/haRXPdMQ4dFkXDz/m5U/g3d4PFHFefyXMKAagHEkPF9Ce0LCme04NCIIUA8uZjP+QLu1LCzaLZLM97w8/8whb5Y2XqerHI8+UBJDvhk1xDhUzNtbpLhJaU1ALkTWoa837wmGuAjFUCb4JgJ4efwKiRaLegiOOyAoDweCtxR1qU32W/LxovdecUAdDdV5a1p9w+j2XQBCoHo3bq3D7gd9hUBGJGebfTZDQBqWaGd7oJLFtasOM9e2+clJm5s7xRXMSJGoDyGPOJrsuapm3i5ZOt8hwsq15HHiy6AchFRTr4/sKdxOgomEIAfiSsbf9XFnLL/ohRLn8m31UKwOSvmd0JzwBm59tyJz9HoJyfZrfrPztEHV7AYkOQAAAAAElFTkSuQmCC"

/***/ }),
/* 756 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_style_index_0_id_a3ada6d6_scoped_true_lang_less__ = __webpack_require__(757);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_style_index_0_id_a3ada6d6_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TklSideBar_vue_vue_type_style_index_0_id_a3ada6d6_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 757 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(758);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("74fdfe0a", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TklSideBar.vue?vue&type=style&index=0&id=a3ada6d6&scoped=true&lang=less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/less-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TklSideBar.vue?vue&type=style&index=0&id=a3ada6d6&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 758 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-tkl-float[data-v-a3ada6d6] {\n  position: fixed;\n  right: 0;\n  width: 56px;\n  height: 72px;\n  top: calc(50% - 290px);\n  background-color: #f7f9fa;\n  cursor: pointer;\n  box-shadow: 2px 2px 30px 0px rgba(97, 105, 119, 0.18);\n  border-radius: 18px 0 0 18px;\n  text-decoration: none;\n  font: 12px/1.5 tahoma, arial, 'Hiragino Sans GB', '\\5B8B\\4F53', sans-serif;\n}\n.gwd-tkl-float[data-v-a3ada6d6]:hover {\n  text-decoration: none;\n}\n", ""]);

// exports


/***/ }),
/* 759 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $, Vue) {

var _this = this;

var request = __webpack_require__(3);
var globalCondition = __webpack_require__(4);
var JdRankList = __webpack_require__(760)['default'];
var util = __webpack_require__(10);

var jdOriginRank = null;

var addLink = function addLink() {
  var a, id, now_url;
  return regeneratorRuntime.async(function addLink$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        a = document.createElement('A');

        a.innerHTML = '\n        <img style="width: 24px; height: 24px; margin-right: 5px;" src="https://cdn.gwdang.com/images/extensions/hand-white@2x.png">\n        <img src="https://cdn.gwdang.com/images/extensions/switchToPc.svg">\n      ';
        a.id = 'gwd-link';
        a.style.position = 'fixed';
        a.style.width = '258px';
        a.style.height = '43px';
        a.style.background = '#e03024';
        a.style.borderRadius = '4px';
        a.style.top = '50%';
        a.style.left = '75%';
        a.style.zIndex = 9;
        a.classList.add('gwd-row');
        a.classList.add('gwd-align');
        a.style.justifyContent = 'center';
        a.id = 'gwd-link-m';

        id = location.href.split('product/')[1];

        if (id) {
          context$1$0.next = 21;
          break;
        }

        context$1$0.next = 19;
        return regeneratorRuntime.awrap(__webpack_require__(4).met('GwdDpIdGot'));

      case 19:
        id = context$1$0.sent;

        id = id.replace('-3', '.html');

      case 21:
        now_url = 'https://item.jd.com/' + id;

        a.href = G.u_server + '/union/go?site_id=3&target_url=' + encodeURI(now_url) + '&union=' + G.union + '&column=h5_to_pc';

        location.href = a.href;

        document.body.appendChild(a);

      case 25:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var dpAddRanking = function dpAddRanking(dpId) {
  var aList, cat, last, lastUrl, res, e, r, catId, link, a, widthLeft, widthRight, total, length, e2;
  return regeneratorRuntime.async(function dpAddRanking$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        aList = $('.crumb-wrap .crumb.fl .item > a').toArray();
        cat = '';

        if (aList.length) {
          last = aList[aList.length - 1];
          lastUrl = last.href;

          cat = util.getParameterByName('cat', lastUrl);
        }
        context$1$0.next = 5;
        return regeneratorRuntime.awrap(request.get(G.server + '/extension/RelatedRank?dp_id=' + dpId + (cat ? '&jcid=' + cat : '')));

      case 5:
        res = context$1$0.sent;
        e = document.createElement('DIV');

        $('.preview-wrap').append(e);
        r = [];

        if (res.data) {
          if (res.data.rank_p) {
            r = r.concat(res.data.rank_p);
          }
          if (res.data.rank_c) {
            r = r.concat(res.data.rank_c);
          }
        }

        if (r.length) {
          context$1$0.next = 16;
          break;
        }

        catId = G.dp.cat_id.split('-').join(',');
        context$1$0.next = 14;
        return regeneratorRuntime.awrap(request.get(G.server + '/extension/RelatedRank?jcid=' + catId));

      case 14:
        r = context$1$0.sent;

        if (r.data) {
          r = r.data.rank_c;
        }

      case 16:

        if (!r.length && jdOriginRank) {
          link = 'https://ranking.m.jd.com/comLandingPage/comLandingPage?contentId=' + jdOriginRank.rankId + '&rankType=' + jdOriginRank.rankTypeInt + '&from=gwdang';

          link = encodeURIComponent(link);
          r = [{
            rname: jdOriginRank.name.split('·')[0],
            site_id: '3',
            s: 1,
            rurl: G.u_server + '/union/go/?site_id=3&target_url=' + link + '&union=union_gwdang&column=rank&crc64=1'
          }];
        }

        if (r.length) {
          context$1$0.next = 19;
          break;
        }

        return context$1$0.abrupt('return');

      case 19:
        a = document.createElement('A');

        a.innerHTML = '查看榜单全部商品';
        if (G.lang === 'zh-tr') a.innerHTML = '查看榜單全部商品';
        a.classList.add('gwd-font11');
        a.classList.add('gwd-red-after-visit');
        a.href = r[0].rurl;
        a.target = '_blank';
        a.style.color = '#7d7e80';
        a.style.textDecoration = 'underline';
        a.style.position = 'relative';
        a.style.top = '-3px';
        a.style.display = 'inline-block';
        a.style.marginLeft = '15px';
        // a.addEventListener('click', e => {
        //   e.preventDefault()
        //   window.gwdRank.rankClick(r[0])
        // })
        $('.preview-wrap').append(a);

        new Vue({
          el: e,
          render: function render(h) {
            return h(JdRankList, {
              props: {
                data: r.map(function (item) {
                  return item;
                }),
                top: 15,
                additionalClass: 'gwd-w210'
              }
            });
          }
        });

        context$1$0.next = 36;
        return regeneratorRuntime.awrap(__webpack_require__(10).sleep(2000));

      case 36:
        widthLeft = $('.crumb.fl').css('width'), widthRight = $('.contact.fr').css('width'), total = $('#crumb-wrap .w').css('width');
        length = parseInt(total) - parseInt(widthLeft) - parseInt(widthRight);

        if (!(length < 235)) {
          context$1$0.next = 40;
          break;
        }

        return context$1$0.abrupt('return');

      case 40:
        e2 = document.createElement('DIV');

        $('.crumb.fl').append(e2);
        new Vue({
          el: e2,
          render: function render(h) {
            return h(JdRankList, {
              props: {
                data: r.map(function (item) {
                  return item;
                }),
                top: -3,
                additionalClass: 'gwd-w235'
              }
            });
          }
        });
        // const a2 = document.createElement('A')
        // a2.innerHTML = '查看'
        // a2.classList.add('gwd-font11')
        // a2.classList.add('gwd-red-after-visit')
        // a2.href = r[0].rurl
        // a2.target = '_blank'
        // a2.style.color = '#7d7e80'
        // a2.style.textDecoration = 'underline'
        // a2.style.position = 'relative'
        // a2.style.top = '-3px'
        // a2.style.display = 'inline-block'
        // a2.style.marginLeft = '15px'
        // $('.crumb.fl').append(a2)

        // setTimeout(() => {
        //   let h = $('#crumb-wrap').height()
        //   debugger
        //   if (h > 50) {
        //     a2.remove()
        //   }
        // }, 300)

      case 43:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var listPageAddRanking = function listPageAddRanking(res) {
  if (!res || !res.data) {
    return;
  }
  setInterval(function () {
    if (!$('.gwd-jd-rank').length) {
      var e = document.createElement('DIV');
      $('#J_selectorPrice').after(e);
      new Vue({
        el: e,
        render: function render(h) {
          return h(JdRankList, {
            props: {
              data: res.data.rank_c,
              top: -1,
              additionalClass: 'gwd-w217'
            }
          });
        }
      });
    }
  }, 2000);
};

var searchAddRanking = function searchAddRanking() {
  var word, res;
  return regeneratorRuntime.async(function searchAddRanking$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        word = util.getParameterByName('keyword');
        context$1$0.next = 3;
        return regeneratorRuntime.awrap(request.get(G.server + '/extension/RelatedRank?w=' + word));

      case 3:
        res = context$1$0.sent;

        listPageAddRanking(res);

      case 5:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var listAddRanking = function listAddRanking() {
  var word, res;
  return regeneratorRuntime.async(function listAddRanking$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        word = util.getParameterByName('cat');
        context$1$0.next = 3;
        return regeneratorRuntime.awrap(request.get(G.server + '/extension/RelatedRank?jcid=' + word));

      case 3:
        res = context$1$0.sent;

        console.log(res);
        listPageAddRanking(res);

      case 6:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

module.exports = {
  init: function init() {
    var s, dpId;
    return regeneratorRuntime.async(function init$(context$1$0) {
      while (1) switch (context$1$0.prev = context$1$0.next) {
        case 0:
          if (!(G.site !== '360buy')) {
            context$1$0.next = 2;
            break;
          }

          return context$1$0.abrupt('return');

        case 2:
          if (!(G.from_device === 'bijiago' || G.from_device === 'biyibi')) {
            context$1$0.next = 5;
            break;
          }

          if (!window.gwd_G) {
            context$1$0.next = 5;
            break;
          }

          return context$1$0.abrupt('return');

        case 5:
          s = document.createElement('STYLE');

          s.innerHTML = ' .gwd_unfold .fixed { top: initial } ';
          document.body.appendChild(s);

          if (location.href.includes('item.m.jd.com/') || location.href.includes('mitem.jd.hk/product') || location.href.includes('.m.jd.com/product')) {
            addLink();
          }

          if (!(G.pageInfo.type === 2)) {
            context$1$0.next = 20;
            break;
          }

          context$1$0.next = 12;
          return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
            return pageConfig.eventTarget;
          }, 0));

        case 12:
          context$1$0.next = 14;
          return regeneratorRuntime.awrap(globalCondition.met('GwdDpIdGot'));

        case 14:
          dpId = context$1$0.sent;
          context$1$0.next = 17;
          return regeneratorRuntime.awrap(globalCondition.met('QRLinkReady'));

        case 17:
          dpAddRanking(dpId);
          context$1$0.next = 21;
          break;

        case 20:
          if (location.href.toLowerCase().includes('search.jd.com/search?keyword')) {
            searchAddRanking();
          } else if (location.href.includes('https://list.jd.com/list.html')) {
            listAddRanking();
          }

        case 21:
        case 'end':
          return context$1$0.stop();
      }
    }, null, this);
  }
};

//console.log('add dpId', dpId)

// window.pageConfig.eventTarget.addListener('onStockReady', e => {
//   require('common/extConsole').log('tg', e.stock.data.rankUnited.revertItem)
//   jdOriginRank = e.stock.data.rankUnited.revertItem
// })
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1), __webpack_require__(17)["default"]))

/***/ }),
/* 760 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__ = __webpack_require__(761);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__JdRankList_vue_vue_type_script_lang_js__ = __webpack_require__(226);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_1__JdRankList_vue_vue_type_script_lang_js__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_1__JdRankList_vue_vue_type_script_lang_js__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__JdRankList_vue_vue_type_style_index_0_id_a48d90ba_scoped_true_lang_less__ = __webpack_require__(763);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__ = __webpack_require__(9);






/* normalize component */

var component = Object(__WEBPACK_IMPORTED_MODULE_3__node_modules_vue_loader_lib_runtime_componentNormalizer_js__["a" /* default */])(
  __WEBPACK_IMPORTED_MODULE_1__JdRankList_vue_vue_type_script_lang_js__["default"],
  __WEBPACK_IMPORTED_MODULE_0__JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__["render"],
  __WEBPACK_IMPORTED_MODULE_0__JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__["staticRenderFns"],
  false,
  null,
  "a48d90ba",
  null
  
)

/* hot reload */
if (false) {
  var api = require("/Users/huangdie/work-gwdang/extension/browser/dev/node_modules/vue-hot-reload-api/dist/index.js")
  api.install(require('vue'))
  if (api.compatible) {
    module.hot.accept()
    if (!api.isRecorded('a48d90ba')) {
      api.createRecord('a48d90ba', component.options)
    } else {
      api.reload('a48d90ba', component.options)
    }
    module.hot.accept("./JdRankList.vue?vue&type=template&id=a48d90ba&scoped=true", function () {
      api.rerender('a48d90ba', {
        render: render,
        staticRenderFns: staticRenderFns
      })
    })
  }
}
component.options.__file = "src/standard/module/components/JdRankList.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),
/* 761 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__ = __webpack_require__(762);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__);
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__, "render")) __webpack_require__.d(__webpack_exports__, "render", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__["render"]; });
/* harmony namespace reexport (by used) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__, "staticRenderFns")) __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return __WEBPACK_IMPORTED_MODULE_0__node_modules_babel_loader_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_2_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_template_id_a48d90ba_scoped_true__["staticRenderFns"]; });


/***/ }),
/* 762 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;
  return _c("div", {
    staticClass: "gwd-inline-row gwd-align gwd-jd-rank",
    "class": _vm.additionalClass,
    style: "margin-top: " + _vm.mt + "px"
  }, [_c("img", {
    staticClass: "gwd-icon-rank",
    attrs: {
      src: "https://cdn.gwdang.com/images/extensions/jdRanking/icon.svg",
      alt: ""
    }
  }), _vm._v(" "), _vm.additionalClass === "gwd-w217" ? _c("img", {
    staticStyle: { "margin-left": "-2px" },
    attrs: {
      src: "https://cdn.gwdang.com/images/extensions/jdRanking/text.svg",
      alt: ""
    }
  }) : _vm._e(), _vm._v(" "), _vm.additionalClass === "gwd-w210" || _vm.additionalClass === "gwd-w235" ? _c("img", {
    staticStyle: { "margin-left": "2px", "margin-right": "1px" },
    attrs: {
      src: "https://cdn.gwdang.com/images/extensions/jdRanking/text-w210.svg",
      alt: ""
    }
  }) : _vm._e(), _vm._v(" "), _c("hr", { staticClass: "gwd-vline" }), _vm._v(" "), _c("div", {
    staticClass: "gwd-rank-list gwd-row gwd-align",
    "class": _vm.data.length > 1 ? "gwd-rotate" : "",
    staticStyle: { position: "relative" }
  }, [_c("a", {
    staticClass: "gwd-row gwd-align gwd-rank-first",
    attrs: {
      title: _vm.data[0].rname,
      href: _vm.data[0].rurl,
      target: "_blank"
    }
  }, [_c("span", { staticClass: "gwd-font11" }, [_c("span", { staticClass: "gwd-mw" }, [_vm._v(_vm._s(_vm.data[0].rname))]), _vm.data[0].rank ? _c("span", [_vm._v("第" + _vm._s(_vm.data[0].rank) + "名")]) : _vm._e()])]), _vm._v(" "), _vm.data.length > 1 ? _c("div", { staticClass: "gwd-rank-addition" }, _vm._l(_vm.addition, function (item) {
    return _c("a", {
      key: item.rurl,
      attrs: {
        title: item.rname,
        href: item.rurl,
        target: "_blank"
      }
    }, [_c("span", { staticClass: "gwd-font11 gwd-mw" }, [_vm._v(_vm._s(item.rname))])]);
  }), 0) : _vm._e()]), _vm._v(" "), _c("form", {
    staticStyle: { display: "none" },
    attrs: {
      action: _vm.debugMode ? "https://localdev.gwdang.com:3000/v2/ext/jd_rank" : "https://www.gwdang.com/v2/ext/jd_rank",
      method: "post",
      target: "_blank"
    }
  }, [_c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.content,
      expression: "content"
    }],
    attrs: { type: "hidden", name: "products" },
    domProps: { value: _vm.content },
    on: {
      input: function input($event) {
        if ($event.target.composing) return;
        _vm.content = $event.target.value;
      }
    }
  }), _vm._v(" "), _c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.search,
      expression: "search"
    }],
    attrs: { type: "hidden", name: "search" },
    domProps: { value: _vm.search },
    on: {
      input: function input($event) {
        if ($event.target.composing) return;
        _vm.search = $event.target.value;
      }
    }
  }), _vm._v(" "), _c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.rankName,
      expression: "rankName"
    }],
    attrs: { type: "hidden", name: "rank" },
    domProps: { value: _vm.rankName },
    on: {
      input: function input($event) {
        if ($event.target.composing) return;
        _vm.rankName = $event.target.value;
      }
    }
  }), _vm._v(" "), _c("input", {
    directives: [{
      name: "model",
      rawName: "v-model",
      value: _vm.from,
      expression: "from"
    }],
    attrs: { type: "hidden", name: "from" },
    domProps: { value: _vm.from },
    on: {
      input: function input($event) {
        if ($event.target.composing) return;
        _vm.from = $event.target.value;
      }
    }
  }), _vm._v(" "), _c("input", {
    staticStyle: {
      display: "inline-block",
      "font-size": "20px",
      color: "#666"
    },
    attrs: {
      type: "submit",
      value: "测试",
      id: "gwd-jdrank-submit-" + _vm.id
    }
  })])]);
};
var staticRenderFns = [];
render._withStripped = true;

exports.render = render;
exports.staticRenderFns = staticRenderFns;

/***/ }),
/* 763 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_style_index_0_id_a48d90ba_scoped_true_lang_less__ = __webpack_require__(764);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_style_index_0_id_a48d90ba_scoped_true_lang_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__node_modules_vue_style_loader_index_js_node_modules_css_loader_index_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_less_loader_dist_cjs_js_node_modules_vue_loader_lib_index_js_vue_loader_options_JdRankList_vue_vue_type_style_index_0_id_a48d90ba_scoped_true_lang_less__);
/* unused harmony reexport namespace */


/***/ }),
/* 764 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(765);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("1ea2ab4f", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JdRankList.vue?vue&type=style&index=0&id=a48d90ba&scoped=true&lang=less", function() {
     var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/less-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./JdRankList.vue?vue&type=style&index=0&id=a48d90ba&scoped=true&lang=less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 765 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-jd-rank[data-v-a48d90ba] {\n  width: 232px;\n  height: 32px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/ranklistBg.svg);\n}\n.gwd-jd-rank .gwd-icon-rank[data-v-a48d90ba] {\n  width: 15px;\n  height: 15px;\n  margin-left: 5px;\n}\n.gwd-jd-rank .gwd-vline[data-v-a48d90ba] {\n  display: block;\n  width: 1px;\n  height: 10px;\n  background: #000000;\n  margin-left: 0px;\n  border: 0;\n}\n.gwd-jd-rank .gwd-rank-list[data-v-a48d90ba] {\n  flex: 1;\n  height: 100%;\n}\n.gwd-jd-rank .gwd-rank-list a[data-v-a48d90ba] {\n  padding-left: 7px;\n  flex: 1;\n}\n.gwd-jd-rank .gwd-rank-list a span[data-v-a48d90ba] {\n  display: inline-block;\n  transform-origin: left center;\n  color: #111111;\n  white-space: nowrap;\n  overflow: hidden;\n  vertical-align: middle;\n  text-overflow: ellipsis;\n}\n.gwd-jd-rank .gwd-rank-list a span.gwd-mw[data-v-a48d90ba] {\n  max-width: 130px;\n}\n.gwd-jd-rank .gwd-rank-list a:hover span[data-v-a48d90ba] {\n  color: #e03024;\n  font-weight: bold;\n}\n.gwd-jd-rank .gwd-rank-list .gwd-rank-first span[data-v-a48d90ba] {\n  color: #e03024;\n}\n.gwd-jd-rank .gwd-rank-list .gwd-rank-addition[data-v-a48d90ba] {\n  display: none;\n  position: absolute;\n  right: 0;\n  width: 153px;\n  top: 100%;\n  border: 1px solid #ffeded;\n  overflow: hidden;\n  background: white;\n  z-index: 9;\n}\n.gwd-jd-rank .gwd-rank-list .gwd-rank-addition a[data-v-a48d90ba] {\n  height: 25px;\n  line-height: 25px;\n  display: inline-block;\n  width: 100%;\n  vertical-align: middle;\n  border-bottom: 1px solid #f1f1f1;\n}\n.gwd-jd-rank .gwd-rank-list .gwd-rank-addition a[data-v-a48d90ba]:last-of-type {\n  border-bottom: none;\n}\n.gwd-jd-rank .gwd-rank-list:hover .gwd-rank-addition[data-v-a48d90ba] {\n  display: block;\n}\n.gwd-jd-rank .gwd-rank-list[data-v-a48d90ba]::after {\n  content: '';\n  position: absolute;\n  width: 16px;\n  height: 16px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/arrow-right-default.svg);\n  right: 3px;\n  top: 5px;\n  pointer-events: none;\n}\n.gwd-jd-rank .gwd-rank-list.gwd-rotate[data-v-a48d90ba]::after {\n  transform: rotate(90deg);\n}\n.gwd-jd-rank .gwd-rank-list.gwd-rotate[data-v-a48d90ba]:hover::after {\n  transform: rotate(270deg);\n}\n.gwd-jd-rank .gwd-rank-list[data-v-a48d90ba]:hover::after {\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/arrow-right-hilighted.svg);\n}\n.gwd-w217[data-v-a48d90ba] {\n  width: 217px;\n  height: 26px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/w217.svg);\n}\n.gwd-w210[data-v-a48d90ba],\n.gwd-w235[data-v-a48d90ba] {\n  width: 210px;\n  height: 30px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/w210.svg);\n}\n.gwd-w210 .gwd-rank-list .gwd-rank-addition[data-v-a48d90ba],\n.gwd-w235 .gwd-rank-list .gwd-rank-addition[data-v-a48d90ba] {\n  width: 140px;\n}\n.gwd-w210 .gwd-rank-list[data-v-a48d90ba]::after,\n.gwd-w235 .gwd-rank-list[data-v-a48d90ba]::after {\n  top: 7px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/arrow-right-default-gray.svg);\n}\n.gwd-w210 .gwd-rank-list a span[data-v-a48d90ba],\n.gwd-w235 .gwd-rank-list a span[data-v-a48d90ba] {\n  color: #555555;\n}\n.gwd-w210 .gwd-rank-list a span span.gwd-mw[data-v-a48d90ba],\n.gwd-w235 .gwd-rank-list a span span.gwd-mw[data-v-a48d90ba] {\n  max-width: 80px;\n}\n.gwd-w210 .gwd-font11[data-v-a48d90ba],\n.gwd-w235 .gwd-font11[data-v-a48d90ba] {\n  transform: scale(1);\n}\n.gwd-w235[data-v-a48d90ba] {\n  width: 235px;\n  height: 23px;\n  background: url(https://cdn.gwdang.com/images/extensions/jdRanking/w235.svg);\n}\n.gwd-w235 .gwd-rank-list a[data-v-a48d90ba] {\n  padding-left: 12px;\n}\n.gwd-w235 .gwd-rank-list a span span.gwd-mw[data-v-a48d90ba] {\n  max-width: 95px;\n}\n.gwd-w235 .gwd-rank-list .gwd-rank-addition[data-v-a48d90ba] {\n  width: 165px;\n}\n.gwd-w235 .gwd-rank-list[data-v-a48d90ba]::after {\n  right: 6px;\n  top: 3px;\n}\n", ""]);

// exports


/***/ }),
/* 766 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, G, $) {

var _this = this;

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

var globalCondition = __webpack_require__(4);
var extConsole = __webpack_require__(6);

module.exports.init = function callee$0$0() {
  var localPromo, promoUrlMap, promos, coupons, couponLinks, fnName, selector;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        if (!(G.site !== '360buy')) {
          context$1$0.next = 2;
          break;
        }

        return context$1$0.abrupt('return');

      case 2:
        extConsole.log('promo start');
        context$1$0.next = 5;
        return regeneratorRuntime.awrap(globalCondition.met('localPromoGot'));

      case 5:
        localPromo = context$1$0.sent;

        extConsole.log('promo', 'localPromo', localPromo);
        context$1$0.next = 9;
        return regeneratorRuntime.awrap(globalCondition.met('remoteUrlMap'));

      case 9:
        promoUrlMap = context$1$0.sent;

        extConsole.log('promo', 'promoUrlMap', promoUrlMap);
        promos = localPromo.promo.map(function (item) {
          item = item.replace('http://', '//').replace('https://', '//');
          if (item.indexOf(':') > -1) {
            var _item$split = item.split(':');

            var _item$split2 = _slicedToArray(_item$split, 2);

            var url = _item$split2[0];
            var text = _item$split2[1];

            return {
              text: text,
              url: url
            };
          }
        });

        __webpack_require__(6).log('localPromo', localPromo);
        $('#prom .prom-item').toArray().forEach(function (item) {
          var textNode = $(item).find('.hl_red');
          if (!textNode.length) {
            textNode = $(item).find('.mj_red');
          }
          var typeNode = $(item).find('.hl_red_bg');
          var urlNode = $(item).find('a');
          if (!textNode.length || !typeNode.length) {
            return;
          }
          var text = textNode[0].innerText;
          if (text.includes('距结束还剩')) {
            text = text.split('距结束还剩')[0];
          }
          var type = typeNode[0].innerText;
          if (type === '换购') {
            return;
          }
          var thePromo = promos.filter(function (promoItem) {
            if (!promoItem) {
              return false;
            }
            var url = false;
            // if (urlNode && urlNode.attr('href')) {
            //   url = urlNode.attr('href')
            // }
            if (url && promoItem.url) {
              return url.indexOf(promoItem.url) > -1;
            } else {
              if (!(promoItem && promoItem.text)) {
                return false;
              }
              var toCompare = promoItem.text;
              if (toCompare.indexOf('--') > -1) {
                toCompare = toCompare.split('--')[1];
              }
              if (toCompare.includes('距结束还剩')) {
                toCompare = toCompare.split('距结束还剩')[0];
              }
              __webpack_require__(6).log(toCompare, text);
              return toCompare === text;
            }
          });
          if (thePromo.length && G.ss_name !== 'priceDog') {
            var url = thePromo[0].url;
            var link = promoUrlMap[' ' + url];
            var title = G.lang === 'zh-tr' ? '查看此活動全部商品' : '查看此活动全部商品';
            $(item).append('<a href=' + link + ' target="_blank" style="color: #ee2f36; text-decoration: underline; margin-left: 5px; font-size: 12px; white-space: nowrap">' + title + '<img src="https://cdn.gwdang.com/images/extensions/redArrow.svg" style="width: 10px; height: 10px;"></a>');
          }
        });

        coupons = localPromo.quan.map(function (item) {
          item = item.toString().replace('http://', '//').replace('https://', '//');
          if (item.indexOf(':') > -1) {
            var itemArr = item.split(':');
            // let [url, text] = item.split(':')
            // url = '//search.jd.com/Search?activity_id=' + url.split('_')[0] + '&sku=' + G.dp.itemId.replace('-3', '')
            return {
              text: itemArr[itemArr.length - 1],
              url: itemArr[0]
            };
          }
        });

        // const remotePromos = await globalCondition.met('promoGot')
        // let coupons = remotePromos.promo_list.filter(x => x.tag === 'coupon').map(x => {
        //   return {
        //     text: x.text.split(':').length > 1 ? x.text.split(':')[1] : x.text,
        //     url: x.id
        //   }
        // })

        coupons = coupons.filter(function (item) {
          return item && item.url;
        });
        coupons = __webpack_require__(10).arrayUnique(coupons, function (x) {
          return x.url;
        });
        couponLinks = coupons.map(function (item, idx) {
          var link = promoUrlMap[' ' + item.url];
          return '<a href=' + link + ' target="_blank"">查看' + item.text.split(',')[0] + '商品' + (idx === 0 ? '<img src="https://cdn.gwdang.com/images/extensions/redArrow.svg" style="width: 10px; height: 10px;">' : '') + '</a>';
        }).join('');
        fnName = 'append', selector = '#summary-quan .lh';

        if ($('.information-wrap').length) {
          fnName = 'after';
          selector = '#summary-quan';
        }
        extConsole.log('promo appended');
        if (coupons.length > 1) {
          $(selector)[fnName]('\n      <div class="gwd-jd-promo-coupons-wrapper ' + (coupons.length === 1 ? 'gwd-single-coupon' : '') + '">\n        <div class="gwd-jd-promo-coupons">\n          ' + couponLinks + '\n        </div>\n      </div>\n    ');
        } else {
          $(selector)[fnName]('\n      <div class="gwd-single-coupon">\n        ' + couponLinks + '\n      </div>\n    ');
        }

        if (!$('.information-wrap').length) {
          __webpack_require__(6).log('adding lineHeight');
          $('#summary-quan .lh').css('line-height', 0);
        }

        __webpack_require__(767);

      case 24:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 767 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(768);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(8).default
var update = add("65d4022a", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./jdPromoLink.less", function() {
     var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/less-loader/dist/cjs.js!./jdPromoLink.less");
     if(newContent.__esModule) newContent = newContent.default;
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),
/* 768 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)();
// imports


// module
exports.push([module.i, ".gwd-single-coupon {\n  display: inline-block;\n}\n.gwd-single-coupon a {\n  display: inline-block;\n  width: 143px;\n  height: 20px;\n  line-height: 20px;\n  text-align: center;\n  font-size: 12px;\n  color: #ee2f36;\n  text-decoration: underline;\n  white-space: nowrap;\n}\n.gwd-single-coupon a img {\n  display: none;\n}\n.gwd-jd-promo-coupons-wrapper {\n  display: inline-block;\n  position: relative;\n  height: 22px;\n  margin-left: 5px;\n  margin-top: -2px;\n}\n.gwd-jd-promo-coupons {\n  display: inline-block;\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 20px;\n  overflow: hidden;\n  border-bottom: 1px solid transparent;\n  border-top: 1px solid transparent;\n}\n.gwd-jd-promo-coupons a {\n  display: block;\n  width: 150px;\n  height: 20px;\n  line-height: 20px;\n  text-align: center;\n  font-size: 12px;\n  color: #999999;\n  border-bottom: 1px solid transparent;\n  border-left: 1px solid transparent;\n  border-right: 1px solid transparent;\n  text-decoration: underline;\n  white-space: nowrap;\n}\n.gwd-jd-promo-coupons a:hover {\n  background: #ededed;\n  color: #ee2f36;\n}\n.gwd-jd-promo-coupons a:first-of-type {\n  color: #ee2f36;\n}\n.gwd-jd-promo-coupons a:first-of-type img {\n  transform: rotate(90deg);\n  margin-top: -3px;\n  margin-left: 2px;\n}\n.gwd-jd-promo-coupons:hover {\n  height: unset;\n  z-index: 9;\n  border-bottom: 1px solid #e3e3e3;\n  border-top: 1px solid #e3e3e3;\n  background: #ffffff;\n}\n.gwd-jd-promo-coupons:hover a {\n  border-bottom: 1px solid #e3e3e3;\n  border-left: 1px solid #e3e3e3;\n  border-right: 1px solid #e3e3e3;\n  text-decoration: none;\n}\n.gwd-jd-promo-coupons:hover a img {\n  transform: rotate(-90deg);\n  margin-top: 0px;\n}\n.lh:hover {\n  overflow: visible;\n}\n", ""]);

// exports


/***/ }),
/* 769 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $, regeneratorRuntime, Highcharts) {var __WEBPACK_AMD_DEFINE_RESULT__;

!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {

  if (['smzdm'].indexOf(G.site) > -1) {
    return;
  }

  /* TODO
  支持常用网站列表 支持定时查找 鼠标滚动查找
  浏览器兼容性检测
  */
  var exports = {};
  var $ = __webpack_require__(1);
  var lang = __webpack_require__(39);
  var langCfg = __webpack_require__(60);
  var template = __webpack_require__(13);
  var siteinfo = __webpack_require__(35);
  var userData = __webpack_require__(15);
  var countryConfig = __webpack_require__(26);
  var parseprice = __webpack_require__(21);
  var util = __webpack_require__(11);
  var viewPriceTip = __webpack_require__(770);
  if (G.lang == 'zh-tr') {
    viewPriceTip = __webpack_require__(771);
  }
  var pageInfo = G.pageInfo;
  var smallTip, smallTip2;
  var tipDetail;
  var time, nowTipDom;
  var nowUrl,
      newId,
      nowPrice = 0;
  var tipResult = {};
  var blacklist = [/shangpin\.com/, /cfe\.m\.jd\.com/, /1688\.com/, /plogin\.m\.jd\.com/];
  var moneyInfo = undefined;
  var priceTle = {
    'pri-t1': lang.getString(langCfg, 'priceUp'),
    'pri-t0': lang.getString(langCfg, 'priceStable'),
    'pri-t-1': lang.getString(langCfg, 'priceDecrease'),
    'pri-t-2': lang.getString(langCfg, 'priceLowest')
  };

  var request = __webpack_require__(3);

  function block() {
    var r = false;
    for (var i = blacklist.length - 1; i >= 0; i--) {
      r = blacklist[i].test(location.href);
      if (r) return r;
    };
  }

  //获取元素和页面顶部的距离
  var getTop = function getTop(e) {
    var offset = e.offsetTop;
    if (e.offsetParent != null) offset += getTop(e.offsetParent);
    return offset;
  };

  //获取元素和页面左侧的距离
  var getLeft = function getLeft(e) {
    var offset = e.offsetLeft;
    if (e.offsetParent != null) offset += getLeft(e.offsetParent);
    return offset;
  };
  // const getWidth = (e) => {
  //   let w = $(e).width()
  //   if (!w)
  //     return getWidth(e.parentElement)
  //   return w;
  // }
  var getListPrice = function getListPrice() {
    // 获取列表页鼠标所在当前商品价格
    var price = '0';
    switch (G.site) {
      case "360buy":
        price = $(nowTipDom).parent().parent().find('.p-price strong i').eq(0).text();
        break;
      case "suning":
        price = $(nowTipDom).parent().parent().parent().find('.res-info .price-box .def-price').eq(0).text();
        break;
      case "taobao":
        price = $(nowTipDom).parent().next().find('.c-price').text();
        if (!price) {
          price = $(nowTipDom).parent().parent().parent().parent().find('.J_IconMoreNew .g_price').eq(0).text();
        }
        break;
      case "tmall":
        price = $(nowTipDom).parent().parent().find('.productPrice>em').eq(0).text();
        break;
      case "amazon":
        price = $(nowTipDom).parent().parent().parent().parent().find('.a-spacing-mini span.s-price').eq(0).text();
        break;
      case "gome":
        price = $(nowTipDom).parent().parent().find('.item-price-info .item-price .price').eq(0).text();
        break;
      case "dangdang":
        price = $(nowTipDom).parent().find('.price .price_n').eq(0).text();
        break;
      case "vipshop":
        price = $(nowTipDom).parent().parent().parent().parent().find('.special-price .title').eq(0).text();
        if (!price) {
          price = $(nowTipDom).parent().parent().parent().parent().find('.goods-price-info .price').eq(0).text();
        }
        break;
      default:
        price = '0';
    }
    price = price.replace(/[,￥¥]+/g, '');
    return price;
  };
  // 没有价格走势数据时候的伪造虚拟点
  var noTrendAddTrendData = function noTrendAddTrendData(data) {
    var site_name = undefined;
    var price = getListPrice();
    if (price === '0') return data;
    var date = util.getTimeNumber(new Date().getTime() - 86400000 * 179, "5");
    var date2 = util.getTimeNumber(new Date().getTime(), "5");
    var arr = [];
    date = new Date(date).getTime();
    date2 = new Date(date2).getTime();
    arr.push([date, Number(price)]);
    arr.push([date2, Number(price)]);
    site_name = data.site_name;
    var noTrendObj = {
      current_price: price,
      data: arr,
      max_price: price,
      min_price: price,
      min_stamp: date2 / 1000,
      name: site_name,
      start: date,
      price_status: 0
    };
    data.trend.store = [noTrendObj];
    data.taobaoNoTrend = true;
    data.start = date;
    return data;
  };

  var inited = false;

  exports.init = function () {
    if (inited) return;
    if (!inited) {
      inited = true;
    }
    // 获取价格符号
    moneyInfo = countryConfig.getMoneyInfo(G.logsite);
    var b = G.extBrand;
    if (G.from_device !== 'bijiago' && G.from_device !== 'biyibi') {
      var permanent = userData.get('permanent');
      if (permanent.setTip === '0') return;
    } else {
      b = 'bjgou';
    }
    if (block()) return;
    if (pageInfo.type === 1) {
      $('body').append('<a id ="' + b + '_price_tip" class="' + G.from_device + '-ext" src="javascript:void(0)" target="_self">\n          <div class="tip_btn_box">\n            <em></em>\n            <span>' + (G.lang === 'zh-tr' ? '比價' : '比价') + '</span>\n          </div>\n          <div id="' + b + '_price_tip_detail"></div>\n        </a>');
      smallTip = $('#' + b + '_price_tip');
      smallTip2 = $('#' + b + '_price_tip .tip_btn_box');
      tipDetail = $('#' + b + '_price_tip_detail');
    }
    bindDpEvent();

    // if (location.hostname.includes('s.taobao.com')) {
    //   $('body').append(`
    //     <style> #mainsrp-header.m-header-fixed { display: block !important; } </style>
    //   `)
    // }
  };

  function bindDpEvent(area) {
    var isNewTb = false; // 是否是新版淘宝
    if ($('[class^=PageContent--contentWrap--]').length) {
      isNewTb = true;
    }
    var dpMouseOver = function dpMouseOver(e) {
      var img, elList, parent, id, parentEl, a;
      return regeneratorRuntime.async(function dpMouseOver$(context$3$0) {
        while (1) switch (context$3$0.prev = context$3$0.next) {
          case 0:
            img = e.target;

            if (G.site === '360buy' && img.tagName !== 'IMG' && $(img).parents('.more2_img')) {
              elList = $(img).parents('.more2_img').find('img');

              if (elList.length) {
                img = elList[0];
              }
              if (img.tagName !== 'IMG') {
                img = $(e.target).parents('.more2_item').find('.more2_img img')[0];
              }
            }
            if (img.tagName !== 'IMG' && !isNewTb) {
              img = $(img).find('img')[0];
            }
            if (!img) {
              img = $(e.target).parents('.item-link').find('.img-wrapper')[0];
            }

            if (img) {
              context$3$0.next = 6;
              break;
            }

            return context$3$0.abrupt('return');

          case 6:
            if (!img.parentElement.getAttribute('data-tip')) {
              context$3$0.next = 8;
              break;
            }

            return context$3$0.abrupt('return', false);

          case 8:
            if (!(img.tagName === 'A' || $(img).parents('.item-link').length || img.className.includes('MainPic--mask') || img.width > 50 && img.height > 50)) {
              context$3$0.next = 37;
              break;
            }

            parent = img.tagName === 'A' ? img : img.parentElement;

            if (!(parent.href && parent.href.includes('.gwdang.com'))) {
              context$3$0.next = 12;
              break;
            }

            return context$3$0.abrupt('return');

          case 12:
            if (!(parent.href && parent.href.includes('store.taobao.com'))) {
              context$3$0.next = 14;
              break;
            }

            return context$3$0.abrupt('return');

          case 14:
            if (!$(parent).parents('[class^=ShopInfo--shopInfo--]').length) {
              context$3$0.next = 16;
              break;
            }

            return context$3$0.abrupt('return');

          case 16:
            nowTipDom = parent;

            if (!(G.site === 'taobao' && parent.tagName === 'A' && /^https?:\/\//.test(parent.href))) {
              context$3$0.next = 36;
              break;
            }

            id = parent.getAttribute('data-nid');

            nowPrice = $(parent).parent().parent().parent().next().find('.price strong').text();
            addId(img);

            if (!parent.href.match(/(?:item\.taobao\.com|detail\.tmall\.com)/)) {
              context$3$0.next = 25;
              break;
            }

            nowUrl = parent.href;
            context$3$0.next = 32;
            break;

          case 25:
            if (!id) {
              context$3$0.next = 29;
              break;
            }

            nowUrl = 'https://item.taobao.com/item.htm?id=' + id;
            context$3$0.next = 32;
            break;

          case 29:
            nowUrl = parent.href;

            if (nowUrl.includes('click.simba.taobao.com')) {
              context$3$0.next = 32;
              break;
            }

            return context$3$0.abrupt('return');

          case 32:
            // 加载小标签
            renderTip(parent);
            bindDpEvent2(parent);
            context$3$0.next = 37;
            break;

          case 36:
            if (isNewTb) {
              parentEl = $(parent).parents('[class^=Card--doubleCard--]');

              if (!parentEl.length) {
                parentEl = $(parent).parents('[class^=Card--listCard--]');
              }
              if (parentEl.length) {
                nowPrice = parentEl.find('.Card--price').text();
                // let nowId = parentEl.find('.ww-light.ww-small').attr('data-item')
                // nowUrl = `https://item.taobao.com/item.htm?id=${nowId}`
                nowUrl = parentEl.parents('a').attr('href');
                addId(img);
                renderTip(parent);
                bindDpEvent2(parent);
              }
            } else if (parent.tagName === 'A' && /^https?:\/\//.test(parent.href) && siteinfo.isProductPage(parent.href)) {
              addId(img);
              nowUrl = makeUrl(img, parent.href);
              renderTip(parent);
              bindDpEvent2(parent);
            } else if (parent.parentElement.tagName === 'A' && /^https?:\/\//.test(parent.parentElement.href) && siteinfo.isProductPage(parent.parentElement.href)) {
              /*amazon.com有一种情况是 a div img 的结构*/
              parent = parent.parentElement;
              addId(img);
              nowUrl = makeUrl(img, parent.href);
              renderTip(parent);
              bindDpEvent2(parent);
            } else if ($(parent).parents('a').length) {
              a = $(parent).parents('a')[0];

              if (siteinfo.isProductPage(a.href)) {
                parent = a;
                addId(img);
                nowUrl = makeUrl(img, parent.href);
                renderTip(parent);
                bindDpEvent2(parent);
              }
              //require('common/extConsole').log('find a parent', a)
            }

          case 37:
          case 'end':
            return context$3$0.stop();
        }
      }, null, this);
    };
    $('body').on('mouseover', 'img, .pd_pic_wrap', dpMouseOver);
    $('body').on('mouseover', '[class^=Card--doubleCard--]', dpMouseOver);
    $('body').on('mouseover', '[class^=Card--listCard--]', dpMouseOver);
    $('body').on('mouseover', '.item-link', dpMouseOver);
    $('body').on('mouseover', '.more2_item', dpMouseOver);
    $('body').on('mouseover', '.pic.imglink', dpMouseOver);
    smallTip2.on('mouseenter', smallTipOnMouseOver);
    smallTip.on('mouseleave', function () {
      tipDetail.hide();
      smallTip.hide();
    });
    tipDetail.on('mouseleave', function () {
      tipDetail.hide();
      smallTip.hide();
    });
  }

  function makeUrl(obj, url) {
    if (G.crc64) {
      return url;
    }
    switch (pageInfo.siteName) {
      case 'suning':
        console.log($(obj));
        var productId = $(obj).parents('.wrap').find('input.hidenInfo').attr('datapro').split('||')[0];
        url = "http://www.suning.com/emall/prd_10052_10051_-7_" + productId + "_.html";
        break;
    }
    return url;
  }

  function bindDpEvent2(dom) {
    var $dom = $(dom);
    if ($dom.attr(G.extBrand + '_tip_bind')) return;
    $dom.on('mouseleave', dpMouseLeave);
    $dom.attr(G.extBrand + '_tip_bind', 1);
  }

  function smallTipOnMouseOver() {
    clearTimeout(time);
    smallTip.show();
    render();
  }

  function dpMouseLeave() {
    smallTip.hide();
    tipDetail.hide();
  }

  function renderTip(dom) {
    smallTip.css('left', getLeft(dom));
    smallTip.css('top', getTop(dom));
    smallTip.show().css('display', 'inline-block');
  }

  function addId(obj) {
    var id = '';
    switch (G.site) {
      case 'yihaodian':
        var d = $(obj).parent().attr('id').split('_');
        if (d) d = d[1];
        id = "&id=" + d + '-31';
        break;
    }
    newId = id;
  }

  // function currencyChange(data) {
  //   if (!G.currency || !data) return data;
  //   if (data.store && data.store.length > 0) {
  //     for (var i = 0; i < data.store.length; i++) {
  //       var item = data.store[i];
  //       if (item.price && item.price.match(/\d+/))
  //         data.store[i].price = '¥' + parseprice(item.price);
  //     }
  //   }
  //   if (data.trend && data.trend.store.length > 0) {
  //     for (var j = 0; j < data.trend.store[0].data.length; j++) {
  //       var item2 = data.trend.store[0].data[j];
  //       data.trend.store[0].data[j][1] = parseprice(item2[1]);
  //     }
  //     data.trend.store[0].min_price = parseprice(data.trend.store[0].min_price).toFixed(2);
  //     data.trend.store[0].max_price = parseprice(data.trend.store[0].max_price).toFixed(2);
  //     data.trend.store[0].current_price = parseprice(data.trend.store[0].current_price);
  //   }

  //   return data;
  // }
  var yanzhengma = function yanzhengma(url) {
    var html = __webpack_require__(772);
    tipDetail.empty().append(template.compile(html)({
      url: url
    }));
    tipDetail.css('width', 370);
  };

  function render() {
    var res, url;
    return regeneratorRuntime.async(function render$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          tipDetail.html('<img src="' + G.server + '/template/aug/images/035.gif" style="margin: 5px;" id="' + G.extBrand + '_price_tip_loading">');
          tipDetail.css('width', 50);
          // tipDetail.css('left', getLeft($(smallTip)[0]) + $(smallTip).width())
          // tipDetail.css('top', getTop($(smallTip)[0]))
          tipDetail.show();

          if (tipResult[nowUrl]) {
            context$2$0.next = 13;
            break;
          }

          if (!nowUrl.includes('click.simba.taobao.com')) {
            context$2$0.next = 9;
            break;
          }

          context$2$0.next = 7;
          return regeneratorRuntime.awrap(__webpack_require__(16).get('/remoteAddress', {
            url: nowUrl
          }));

        case 7:
          res = context$2$0.sent;

          nowUrl = res;

        case 9:
          url = G.server + '/brwext/tip_new?days=180&ver=1&site=' + G.site + '&price=' + nowPrice + '&url=' + encodeURIComponent(nowUrl) + newId;

          request.getOnce(url).then(function (msg) {
            try {
              if (msg && msg.now_url) {
                nowUrl = msg.now_url;
              }
              if (msg.is_ban && msg.action && msg.action.method === 'redirect' && msg.action.to) {
                yanzhengma(msg.action.to);
                return;
              }
              if (msg.trend.store.length === 0) {
                msg = noTrendAddTrendData(msg);
              }
              // msg = currencyChange(msg);         //暂时不转化汇率  使用原始货币  价格走势提示框里面才加人民币提示
              if (!msg || msg.trend.store.length === 0) return renderError();
              if (msg.trend.store[0].current_price == '0.00') return renderError();
              tipResult[nowUrl] = msg;
              render2(msg);
            } catch (e) {}
          })['catch'](function () {
            return renderError();
          });
          context$2$0.next = 14;
          break;

        case 13:
          render2(tipResult[nowUrl]);

        case 14:
        case 'end':
          return context$2$0.stop();
      }
    }, null, this);
  }

  function render2(msg) {
    // 处理数据
    processData(msg);
    var nostore = undefined;
    if (!msg.store || msg.store.length === 0) nostore = true;
    var lowestTime = util.getTimeNumber(msg.trend.store[0].min_stamp * 1000);
    tipDetail.removeClass('tip-error-info');
    if (msg.trend.store[0].max_price === msg.trend.store[0].min_price) {
      msg.trend.store[0].nowprice = msg.trend.store[0].min_price;
    }
    //msg.trend.store[0].price_status = require('bjgou/modules/trend').getPriceStatus(msg.trend.store[0].data).price_status
    tipDetail.html(template.compile(viewPriceTip)({
      data: msg,
      new_extension: G.new_extension,
      extName: G.extName,
      isAliSite: G.aliSite,
      nostore: nostore,
      lowestTime: lowestTime,
      extBrand: G.extBrand,
      isGwd: G.from_device !== 'bijiago' && G.from_device !== 'biyibi',
      site: G.site,
      ss_name: G.ss_name
    }));
    if (G.aliSite || nostore) {
      tipDetail.css('width', 370);
    } else {
      tipDetail.css('width', 460);
    }

    if ($(window).width() - getLeft($(smallTip)[0]) - $(smallTip).width() < 460) {
      tipDetail.css('left', 0 - $(tipDetail).width() - 3 + 'px');
    } else {
      tipDetail.css('left', '67px');
    }
    initMiniTrend(msg.trend, msg.taobaoNoTrend, msg.start);
    bindFavorEvent(msg);
  }

  function bindFavorEvent(data) {
    $('#' + G.extBrand + '_price_tip_notify_btn').on('click', function (event) {
      event.preventDefault();
      $('#' + G.extBrand + '_notify_error').hide();
      $('#' + G.extBrand + '_price_tip_notify_btn').text('正在添加......');
      request.get(G.c_server + '/collect/aj_add?' + 'dp_id=' + data.dp_id + '&from=tip').done(function (msg) {
        if (msg.code == 100 || msg.code <= 0) {
          window.location.href = 'http://www.' + G.extName + '.com/user/login?from_url=' + encodeURIComponent(window.location.href);
        } else if (msg.code == 1) {
          $('#' + G.extBrand + '_price_tip_notify_btn').text('已添加到收藏夹').attr('style', 'float:right;color:#fff;background:#18A0F5;');
        } else if (msg.code == 2) {
          if ($('#' + G.extBrand + '_price_tip_notify_btn').text() == '正在添加......') {
            $('#' + G.extBrand + '_price_tip_notify_btn').text('你已经添加过啦').attr('style', 'float:right;color:#fff;background:#18A0F5;');
          }
        }
      });
    });
  }

  function processData(msg) {
    var new_icon_site_ids = [1, 103, 108, 123, 124, 126, 129, 134, 136, 14, 141, 15, 167, 168, 19, 2, 21, 25, 26, 28, 3, 31, 34, 35, 41, 6, 66, 7, 86, 93, 9];
    var store = msg.store;
    if (store) {
      for (var i = store.length - 1; i >= 0; i--) {
        store[i].icon_url = store[i].icon_url.replace("browser", "s1");
        if (store[i].price.indexOf('￥') > -1) store[i].price = '￥' + Number(store[i].price.replace('￥', '').replace(',', '')).toFixed(2);
        var site_id = /\/(\d+)\.ico/.exec(store[i].icon_url);
        if (site_id) {
          site_id = site_id[1];
          if (!G.IE6 && new_icon_site_ids.indexOf(Number(site_id)) > -1) {
            store[i].icon_url = store[i].icon_url.replace(/\d+\.ico/, site_id + ".png").replace(/browser\./, "s1.");
          }
        }
      }
    }
    var status_str = 'pri-t' + msg.trend.store[0].price_status;
    msg.trend.store[0].status_tle = priceTle[status_str];
    msg.trend.store[0].max_price = Number(msg.trend.store[0].max_price.replace(',', '')).toFixed(2);
    msg.trend.store[0].min_price = Number(msg.trend.store[0].min_price.replace(',', '')).toFixed(2);
  }

  function renderError(data) {
    if (data && data.is_ban) {
      yanzhengma(data.action.to);
    } else {
      tipDetail.html(G.lang === 'zh-tr' ? '<div>抱歉，當前商品暫無價格走勢~</div>' : '<div>抱歉，当前商品暂无价格走势~</div>');
      tipDetail.addClass('tip-error-info');
      tipDetail.css('width', 220);
      tipDetail.show();
    }
  }

  function initMiniTrend(data, taobaoNoTrend, sstart) {
    if (G.site == '360buy') {
      // 京东上的这个影响图表样式
      var p = $('.elevator_fix style');
      p.remove();
    }
    var yAxistext = '';
    if (moneyInfo) {
      yAxistext = moneyInfo[1];
    }
    var maxP = Number(data.store[0].max_price);
    var maxN = undefined;
    if (maxP > 5) {
      maxN = parseInt(data.store[0].max_price).toString() || '';
    } else {
      maxN = Number(data.store[0].max_price).toString() || '';
    }
    var maxN2 = yAxistext.length * 2;
    var maxS1 = parseInt(maxN.length * 5.6);
    var maxS2 = parseInt(maxN2 * 5.6);
    var maxS = Math.max(maxS1, maxS2);
    var chartML = maxS + 8 + 8;
    var yAxisY = maxS + 8;
    var trend_div = $('#gwd_price_tip_trend');
    var obj = {
      chart: {
        renderTo: 'gwd_price_tip_trend',
        type: 'line',
        marginTop: 10,
        marginLeft: chartML,
        marginRight: 15,
        marginBottom: 27,
        spacing: [0, 0, 0, 0],
        events: {
          load: function load() {
            var xinterval = parseInt((this.xAxis[0].dataMax - this.xAxis[0].dataMin) / 3.9) || 1;
            this.xAxis[0].update({
              tickInterval: xinterval
            });
            var lmin = undefined,
                lmax = undefined;
            lmin = Math.floor(this.yAxis[0].dataMin);
            lmax = Math.ceil(this.yAxis[0].dataMax);
            var interv2 = Math.pow(10, lmin.toString().length - 2);
            var tkinterv = undefined;
            if (this.yAxis[0].dataMax < 1) {
              lmin = this.yAxis[0].dataMin;
              lmax = this.yAxis[0].dataMax;
              tkinterv = 0;
            } else if (this.yAxis[0].dataMin === this.yAxis[0].dataMax) {
              lmin = Math.floor(lmin / interv2) * interv2;
              lmax = lmin * 2;
              lmin = 0;
              tkinterv = parseInt((lmax - lmin) / 2);
            } else {
              lmin = Math.floor(lmin / interv2) * interv2;
              lmax = Math.ceil(lmax / interv2) * interv2;
              if (lmin === lmax) {
                lmin = lmin - 1;
                lmax = lmax + 1;
              }
              tkinterv = parseInt((lmax - lmin) / 4);
              if (lmin + tkinterv < this.yAxis[0].dataMin) {
                lmin = lmin + tkinterv;
              }
            }
            var tkinterv2 = Math.pow(10, tkinterv.toString().length - 1);
            tkinterv = Math.ceil(tkinterv / tkinterv2) * tkinterv2;
            // console.log(lmin, lmax, tkinterv)
            this.yAxis[0].update({
              min: lmin,
              max: lmax,
              tickInterval: tkinterv || 1
            });
          }
        }
      },
      credits: {
        enabled: false
      },
      colors: ['#2f7ed8'],
      title: {
        text: null
      },
      xAxis: {
        type: 'datetime',
        labels: {
          rotation: 0,
          y: 16,
          step: 2,
          style: {
            fontSize: '10px',
            fontFamily: 'Helvetica',
            color: '#9D9D9D'
          },
          align: 'center'
        },
        dateTimeLabelFormats: {
          day: '%m-%e',
          week: '%m-%e',
          month: '%Y/%m',
          year: '%Y/%m'
        },
        tickLength: 0,
        gridLineColor: '#e6e9eb',
        lineColor: '#e6e9eb',
        minorTickLength: 0,
        gridLineWidth: 1
      },
      yAxis: {
        title: {
          text: "",
          rotation: 0,
          y: -20,
          x: -13,
          align: 'high',
          offset: 0,
          style: {
            fontFamily: 'Microsoft YaHei',
            fontSize: '10px',
            color: '#969899'
          }
        },
        labels: {
          align: 'left',
          padding: 4,
          x: -yAxisY,
          y: 3,
          style: {
            fontSize: '10px',
            fontFamily: 'Helvetica',
            color: '#9D9D9D'
          },
          formatter: function formatter() {
            return this.value;
          }
        },
        plotLines: [{
          value: 0,
          width: 1,
          color: '#808080'
        }],
        gridLineColor: '#e6e9eb',
        lineColor: '#e6e9eb',
        tickPixelInterval: 50
      },
      plotOptions: {
        series: {
          animation: false,
          marker: {
            radius: 2
          },
          enableMouseTracking: true,
          states: {
            hover: {
              enabled: true
            }
          },
          shadow: false
        }
      },
      tooltip: {
        xDateFormat: '%Y-%m-%d',
        borderColor: "#48BEFE",
        useHTML: true,
        backgroundColor: 'white',
        formatter: function formatter() {
          var x = new Date(this.x);
          var year = x.getFullYear();
          var month = x.getMonth() + 1;
          var day = x.getDate();
          if (month < 10) month = '0' + month.toString();
          if (day < 10) day = '0' + day.toString();
          // let format = data.msg.formatted[this.x.toString()];
          // let disc = format.discount
          // if (disc !== 0)
          //   disc = '-' + disc.toString() + '%';
          if (taobaoNoTrend) {
            var nowDate = new Date();
            if (x.getMonth() !== nowDate.getMonth() || x.getDate() !== nowDate.getDate()) {
              return false;
            }
          }
          var price = undefined;
          if (this.y !== 0) price = this.y.toFixed(2);else price = '0';
          var price2 = "";
          if (moneyInfo) {
            price2 = '(¥' + parseprice(price) + ')';
            price = moneyInfo[0] + price;
          }
          var dom = '\n                <div style="background: white">\n              <div>' + year + '/' + month + '/' + day + '</div>\n              <div class="price-tip-item">\n                <span class="price-tip-sp1" style="color: ' + this.series.color + ';font-size:12px;font-family:arial;float:none">●</span>\n                <span class="price-tip-sp2">' + this.series.name + '</span>\n                <span class="price-tip-sp3" style="font-family:Helvetica">' + price + price2 + '</span>\n              </div>\n</div>';
          return dom;
        }
      },
      legend: {
        enabled: false
      },
      series: []
    };

    obj.series[0] = {
      visible: true,
      name: data.store[0].name,
      pointStart: sstart,
      pointInterval: 86400000 * 179,
      color: "#48BEFE",
      lineWidth: 1,
      marker: {
        enabled: false
      },
      states: {
        enabled: false,
        hover: {
          lineWidth: 1
        }
      },
      data: []
    };
    if (taobaoNoTrend) {
      obj.series[0].dashStyle = "Dash";
    }
    if (data.store[0].data.length > 0) {
      var store = data.store[0];
      var len2 = store.data.length;
      var datas = store.data;
      if (store.min_stamp * 1000 > parseInt(Date.UTC(data.startY, data.startM, data.startD))) {
        obj.series[0].data.push(null);
      }
      if (taobaoNoTrend) {
        for (var j = 0; j < len2; j++) {
          obj.series[0].data.push({
            y: datas[j][1]
          });
        }
      } else {
        obj.series[0].data = data.store[0].data;
      }
    }
    if (taobaoNoTrend) {
      obj.series[0].data[1].marker = {
        enabled: true,
        fillColor: '#5ACFFB',
        radius: 2.5,
        lineWidth: 0,
        symbol: "circle"
      };
      obj.plotOptions.series.states = {
        hover: {
          enabled: false
        }
      };
    }
    if (moneyInfo) {
      obj.yAxis.title.text = moneyInfo[1];
      obj.yAxis.title.y = 104;
      obj.yAxis.title.x = -(chartML - 6 - maxS2);
    }
    if ($('#' + obj.chart.renderTo).length) {
      new Highcharts.Chart(obj);
    }
    trend_div.show();
  }
  return exports;
}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

// console.log('[img]', img)

// console.log('[img] use last a element')
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1), __webpack_require__(5), __webpack_require__(48)))

/***/ }),
/* 770 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', isAliSite = $data.isAliSite, nostore = $data.nostore, $escape = $imports.$escape, data = $data.data, lowestTime = $data.lowestTime, isGwd = $data.isGwd, site = $data.site, $each = $imports.$each, $value = $data.$value, $index = $data.$index;
    $$out += '<div class="price_tip_detail ';
    if (isAliSite) {
        $$out += ' alitip';
    }
    $$out += ' ';
    if (nostore) {
        $$out += ' nostoretip ';
    }
    $$out += '">\n  <div class="tip-box-left">\n    <div class="tip-title">最近180天价格历史</div>\n    <div class="tip-price-status status';
    $$out += $escape(data.trend.store[0].price_status);
    $$out += '">\n      <em class="tip-bg"></em>\n      <span>';
    $$out += $escape(data.trend.store[0].status_tle);
    $$out += '</span>\n    </div>\n    <div class="highest-lowest-box">\n      ';
    if (data.trend.store[0].nowprice) {
        $$out += '\n        <span class="tip-now-btn" style="color: #3fc0f0">现价:<span class="fontSizec" style="color: #3fc0f0">';
        $$out += $escape(data.trend.store[0].nowprice);
        $$out += '</span></span>\n      ';
    } else {
        $$out += '\n      <span class="tip-highest-btn">最高:<span class="fontSizec">';
        $$out += $escape(data.trend.store[0].max_price);
        $$out += '</span></span>\n      <span class="tip-lowest-btn">最低:<span class="fontSizec">';
        $$out += $escape(data.trend.store[0].min_price);
        $$out += '</span></span>\n      ';
    }
    $$out += '\n      <span class="tip-lowest-time fontSizec">';
    $$out += $escape(lowestTime);
    $$out += '</span>\n    </div>\n    <div class="tip-chart" id="gwd_price_tip_trend"></div>\n    ';
    if (!isAliSite) {
        $$out += '\n      <div class="tip-info-btm">\n        <a class="tip-info-store">\n          <em class="tip-bg"></em>\n          <span>';
        $$out += $escape(data.site_name);
        $$out += '</span>\n        </a>\n        ';
        if (isGwd && site === '360buy') {
            $$out += '\n        ';
            $each(data.more, function ($value, $index) {
                $$out += '\n        <a href="';
                $$out += $escape($value.url);
                $$out += '" class="tip-info-promo">\n          <em class="tip-bg"></em>\n          <span>';
                $$out += $escape($value.title);
                $$out += '</span>\n        </a>\n        ';
            });
            $$out += '\n        ';
        }
        $$out += '\n      </div>\n    ';
    }
    $$out += '\n  </div>\n  ';
    if (!isAliSite && !nostore) {
        $$out += '\n  <div class="tip-box-right">\n    <p>商城比价</p>\n    <ul>\n      ';
        $each(data.store, function ($value, $index) {
            $$out += '\n      <li>\n        <a href="';
            $$out += $escape($value.url);
            $$out += '" class="tip-com-item" target="_blank">\n          <img src="';
            $$out += $escape($value.icon_url);
            $$out += '" alt="';
            $$out += $escape($value.site_name);
            $$out += '" title="';
            $$out += $escape($value.site_name);
            $$out += '">\n          <span class="fontSizec">';
            $$out += $escape($value.price);
            $$out += '</span>\n        </a>\n      </li>\n      ';
        });
        $$out += '\n    </ul>\n    ';
        if (isGwd) {
            $$out += '\n    <a class="tip-com-all" href="';
            $$out += $escape(data.more_link);
            $$out += '" target="_blank">';
            $$out += $escape(data.more_tle);
            $$out += '</a>\n    ';
        }
        $$out += '\n  </div>\n  ';
    }
    $$out += '\n  <style type="text/css">\n    .tip-bg {\n      background: url("https://cdn.gwdang.com/images/extensions/xbt/mini-icon.png") 0px 0px no-repeat;\n    }\n    .price_tip_detail {\n      height: 238px;\n    }\n    .price_tip_detail.alitip {\n      height: 218px;\n    }\n    #gwd_price_tip_detail, #gwd_price_tip_detail * {\n      font-family: "Microsoft YaHei";\n      box-sizing: content-box;\n    }\n    #bjgou_price_tip_detail, #bjgou_price_tip_detail * {\n        font-family: "Microsoft YaHei";\n        box-sizing: content-box;\n    }\n    .tip-box-left {\n      float: left;\n      width: 336px;\n      height: 100%;\n      margin-left: 6px;\n      margin-right: 5px;\n      position: relative;\n    }\n    .nostoretip .tip-box-left{\n      margin-left: 17px;\n      margin-right: 17px;\n    }\n    #gwd_price_tip_detail .fontSizec {\n      font-family: Helvetica;\n    }\n    #bjgou_price_tip_detail .fontSizec {\n        font-family: Helvetica;\n    }\n    .tip-title {\n      height: 15px;\n      line-height: 15px;\n      margin-top: 14px;\n      margin-bottom: 13px;\n      text-align: center;\n      width: 100%;\n      font-weight: bold;\n      float: left;\n      font-size: 12px;\n      color: #5E707C;\n    }\n    .tip-price-status {\n      float: left;\n      width: 70px;\n      height: 16px;\n      margin-left: 8px;\n      white-space: nowrap;\n    }\n    .tip-price-status em {\n      width: 16px;\n      height: 10px;\n      float: left;\n      margin-top: 3px;\n    }\n    .tip-price-status span {\n      float: left;\n      margin-left: 5px;\n      width: 48px;\n      height: 16px;\n      color: #5E707C;\n      font-size: 12px;\n      line-height: 16px;\n    }\n    .tip-highest-btn, .tip-now-btn {\n      color: #E4393C;\n      font-weight: bold;\n      margin-left: 14px;\n      margin-right: 10px;\n    }\n    .highest-lowest-box .tip-now-btn {\n      color: #3FC0F0;\n      margin-right: 0px;\n    }\n    .tip-lowest-btn {\n      color: #35bd67;\n      font-weight: bold;\n    }\n    .tip-lowest-time {\n      font-size: 12px;\n      color: #9D9D9D;\n      float: left;\n      line-height: 18px!important;\n      margin-left: 2px;\n    }\n    .highest-lowest-box {\n      float: left;\n      height: 16px;\n      line-height: 16px;\n      width: 254px;\n    }\n    .highest-lowest-box>span {\n      float: left;\n      line-height: 16px;\n      font-size: 12px;\n    }\n    .tip-info-btm {\n      font-size: 12px;\n      float: left;\n      height: 16px;\n      width: 324px;\n      line-height: 16px;\n      margin-top: 10px;\n    }\n    .tip-info-btm a {\n      float: left;\n    }\n    .tip-info-btm span {\n      float: left;\n    }\n    .tip-info-store {\n      cursor: default!important;\n    }\n    .tip-info-store em {\n      width: 10px;\n      height: 10px;\n      float: left;\n      margin-left: 31px;\n      margin-right: 5px;\n      margin-top: 5px!important;\n      background-position: -39px -23px;\n    }\n    a.tip-info-store span{\n      color: #5E707C;\n    }\n    .tip-info-promo em {\n      width: 12px;\n      height: 12px;\n      float: left;\n      margin-left: 24px;\n      margin-right: 5px;\n      background-position: -25px -22px;\n    }\n    .tip-info-promo span{\n      color: #48BEFE;\n    }\n    .tip-info-promo span:hover {\n      text-decoration: underline;\n    }\n    .tip-info-btm em {\n      margin-top: 3px;\n    }\n    .tip-box-right {\n      float: left;\n      width: 111px;\n      height: 100%;\n      border-left: 1px solid #F4F7F9;\n    }\n    .tip-box-right ul {\n      float: left;\n      margin: 0px;\n      margin-top: 12px;\n      padding: 0px;\n    }\n    .tip-box-right ul li {\n      height: 30px;\n      width: 113px;\n      float: left;\n      line-height: 30px;\n      list-style: none;\n      margin-top: 1px;\n    }\n    .tip-box-right ul li:first-child {\n      margin-top: 0px;\n    }\n    .tip-box-right ul li:hover {\n      background: #EDF5F8;\n    }\n    #gwd_price_tip_detail .tip-com-all, #bjgou_price_tip_detail .tip-com-all {\n      float: left;\n      margin-left: 15px;\n      margin-top: 16px;\n      color: #6B8393;\n      line-height: 13px;\n      height: 13px;\n      font-size: 12px;\n    }\n    #gwd_price_tip_detail .tip-com-all:hover, #bjgou_price_tip_detail .tip-com-all:hover{\n      color: #48BEFE;\n    }\n    .tip-box-right p{\n      font-size: 12px;\n      color: #5E707C;\n      font-weight: bold;\n      height: 15px;\n      width: 100%;\n      text-align: center;\n      line-height: 15px;\n      margin: 0px;\n      margin-top: 14px;\n    }\n    .tip-com-item {\n      float: left;\n      height: 30px;\n      width: 100%;\n      line-height: 30px;\n    }\n    .tip-com-item img {\n      height: 16px;\n      width: 16px;\n      float: left;\n      margin-left: 15px;\n      margin-right: 7px;\n      margin-top: 7px;\n    }\n    .tip-com-item span{\n      font-size: 12px;\n      color: #6B8393;\n    }\n    .tip-com-item, .tip-com-item span, .tip-com-all {\n      text-decoration: none!important;\n    }\n    .tip-chart {\n      width: 336px;\n      height: 126px;\n      margin-top: 6px;\n    }\n    .tip-chart svg .highcharts-series path {\n        fill: none;\n    }\n    .tip-chart .highcharts-tooltip path {\n        fill: white;\n    }\n  </style>\n  ';
    if (!isGwd) {
        $$out += '\n  <style>\n    .price_tip_detail {\n        height: 220px;\n    }\n\n    .tip-price-status em {\n        background-size: contain!important;\n        background-repeat: no-repeat!important;\n    }\n\n    .tip-price-status.status-1 em {\n        background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_down@2x.png);\n    }\n    .tip-price-status.status-2 em {\n        background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_lowest@2x.png);\n    }\n    .tip-price-status.status0 em {\n        background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_stable@2x.png);\n    }\n    .tip-price-status.status1 em {\n        background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_up@2x.png);\n    }\n  </style>\n  ';
    } else {
        $$out += '\n  <style>\n      .tip-price-status.status-1 em {\n          background-position: -5px -5px;\n      }\n      .tip-price-status.status-2 em {\n          background-position: -71px -5px;\n      }\n      .tip-price-status.status0 em {\n          background-position: -49px -5px;\n      }\n      .tip-price-status.status1 em {\n          background-position: -26px -5px;\n      }\n  </style>\n  ';
    }
    $$out += '\n</div>\n';
    return $$out;
};

/***/ }),
/* 771 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', isAliSite = $data.isAliSite, nostore = $data.nostore, $escape = $imports.$escape, data = $data.data, lowestTime = $data.lowestTime, isGwd = $data.isGwd, site = $data.site, $each = $imports.$each, $value = $data.$value, $index = $data.$index;
    $$out += '<div class="price_tip_detail ';
    if (isAliSite) {
        $$out += ' alitip';
    }
    $$out += ' ';
    if (nostore) {
        $$out += ' nostoretip ';
    }
    $$out += '">\n  <div class="tip-box-left">\n    <div class="tip-title">最近180天價格歷史</div>\n    <div class="tip-price-status status';
    $$out += $escape(data.trend.store[0].price_status);
    $$out += '">\n      <em class="tip-bg"></em>\n      <span>';
    $$out += $escape(data.trend.store[0].status_tle);
    $$out += '</span>\n    </div>\n    <div class="highest-lowest-box">\n      ';
    if (data.trend.store[0].nowprice) {
        $$out += '\n      <span class="tip-now-btn" style="color: #3fc0f0">現價:<span class="fontSizec" style="color: #3fc0f0">';
        $$out += $escape(data.trend.store[0].nowprice);
        $$out += '</span></span>\n      ';
    } else {
        $$out += '\n      <span class="tip-highest-btn">最高:<span class="fontSizec">';
        $$out += $escape(data.trend.store[0].max_price);
        $$out += '</span></span>\n      <span class="tip-lowest-btn">最低:<span class="fontSizec">';
        $$out += $escape(data.trend.store[0].min_price);
        $$out += '</span></span>\n      ';
    }
    $$out += '\n      <span class="tip-lowest-time fontSizec">';
    $$out += $escape(lowestTime);
    $$out += '</span>\n    </div>\n    <div class="tip-chart" id="gwd_price_tip_trend"></div>\n    ';
    if (!isAliSite) {
        $$out += '\n    <div class="tip-info-btm">\n      <a class="tip-info-store">\n        <em class="tip-bg"></em>\n        <span>';
        $$out += $escape(data.site_name);
        $$out += '</span>\n      </a>\n      ';
        if (isGwd && site === '360buy') {
            $$out += '\n      ';
            $each(data.more, function ($value, $index) {
                $$out += '\n      <a href="';
                $$out += $escape($value.url);
                $$out += '" class="tip-info-promo">\n        <em class="tip-bg"></em>\n        <span>';
                $$out += $escape($value.title);
                $$out += '</span>\n      </a>\n      ';
            });
            $$out += '\n      ';
        }
        $$out += '\n    </div>\n    ';
    }
    $$out += '\n  </div>\n  ';
    if (!isAliSite && !nostore) {
        $$out += '\n  <div class="tip-box-right">\n    <p>商城比價</p>\n    <ul>\n      ';
        $each(data.store, function ($value, $index) {
            $$out += '\n      <li>\n        <a href="';
            $$out += $escape($value.url);
            $$out += '" class="tip-com-item" target="_blank">\n          <img src="';
            $$out += $escape($value.icon_url);
            $$out += '" alt="';
            $$out += $escape($value.site_name);
            $$out += '" title="';
            $$out += $escape($value.site_name);
            $$out += '">\n          <span class="fontSizec">';
            $$out += $escape($value.price);
            $$out += '</span>\n        </a>\n      </li>\n      ';
        });
        $$out += '\n    </ul>\n    ';
        if (isGwd) {
            $$out += '\n    <a class="tip-com-all" href="';
            $$out += $escape(data.more_link);
            $$out += '" target="_blank">';
            $$out += $escape(data.more_tle);
            $$out += '</a>\n    ';
        }
        $$out += '\n  </div>\n  ';
    }
    $$out += '\n  <style type="text/css">\n    .tip-bg {\n      background: url("https://cdn.gwdang.com/images/extensions/xbt/mini-icon.png") 0px 0px no-repeat;\n    }\n    .price_tip_detail {\n      height: 238px;\n    }\n    .price_tip_detail.alitip {\n      height: 218px;\n    }\n    #gwd_price_tip_detail, #gwd_price_tip_detail * {\n      font-family: "Microsoft YaHei";\n      box-sizing: content-box;\n    }\n    #bjgou_price_tip_detail, #bjgou_price_tip_detail * {\n      font-family: "Microsoft YaHei";\n      box-sizing: content-box;\n    }\n    .tip-box-left {\n      float: left;\n      width: 336px;\n      height: 100%;\n      margin-left: 6px;\n      margin-right: 5px;\n      position: relative;\n    }\n    .nostoretip .tip-box-left{\n      margin-left: 17px;\n      margin-right: 17px;\n    }\n    #gwd_price_tip_detail .fontSizec {\n      font-family: Helvetica;\n    }\n    #bjgou_price_tip_detail .fontSizec {\n      font-family: Helvetica;\n    }\n    .tip-title {\n      height: 15px;\n      line-height: 15px;\n      margin-top: 14px;\n      margin-bottom: 13px;\n      text-align: center;\n      width: 100%;\n      font-weight: bold;\n      float: left;\n      font-size: 12px;\n      color: #5E707C;\n    }\n    .tip-price-status {\n      float: left;\n      width: 70px;\n      height: 16px;\n      margin-left: 8px;\n    }\n    .tip-price-status em {\n      width: 16px;\n      height: 10px;\n      float: left;\n      margin-top: 3px;\n    }\n    .tip-price-status span {\n      float: left;\n      margin-left: 5px;\n      width: 48px;\n      height: 16px;\n      color: #5E707C;\n      font-size: 12px;\n      line-height: 16px;\n    }\n    .tip-highest-btn, .tip-now-btn {\n      color: #E4393C;\n      font-weight: bold;\n      margin-left: 14px;\n      margin-right: 10px;\n    }\n    .highest-lowest-box .tip-now-btn {\n      color: #3FC0F0;\n      margin-right: 0px;\n    }\n    .tip-lowest-btn {\n      color: #35bd67;\n      font-weight: bold;\n    }\n    .tip-lowest-time {\n      font-size: 12px;\n      color: #9D9D9D;\n      float: left;\n      line-height: 18px!important;\n      margin-left: 2px;\n    }\n    .highest-lowest-box {\n      float: left;\n      height: 16px;\n      line-height: 16px;\n      width: 254px;\n    }\n    .highest-lowest-box>span {\n      float: left;\n      line-height: 16px;\n      font-size: 12px;\n    }\n    .tip-info-btm {\n      font-size: 12px;\n      float: left;\n      height: 16px;\n      width: 324px;\n      line-height: 16px;\n      margin-top: 10px;\n    }\n    .tip-info-btm a {\n      float: left;\n    }\n    .tip-info-btm span {\n      float: left;\n    }\n    .tip-info-store {\n      cursor: default!important;\n    }\n    .tip-info-store em {\n      width: 10px;\n      height: 10px;\n      float: left;\n      margin-left: 31px;\n      margin-right: 5px;\n      margin-top: 5px!important;\n      background-position: -39px -23px;\n    }\n    a.tip-info-store span{\n      color: #5E707C;\n    }\n    .tip-info-promo em {\n      width: 12px;\n      height: 12px;\n      float: left;\n      margin-left: 24px;\n      margin-right: 5px;\n      background-position: -25px -22px;\n    }\n    .tip-info-promo span{\n      color: #48BEFE;\n    }\n    .tip-info-promo span:hover {\n      text-decoration: underline;\n    }\n    .tip-info-btm em {\n      margin-top: 3px;\n    }\n    .tip-box-right {\n      float: left;\n      width: 111px;\n      height: 100%;\n      border-left: 1px solid #F4F7F9;\n    }\n    .tip-box-right ul {\n      float: left;\n      margin: 0px;\n      margin-top: 12px;\n      padding: 0px;\n    }\n    .tip-box-right ul li {\n      height: 30px;\n      width: 113px;\n      float: left;\n      line-height: 30px;\n      list-style: none;\n      margin-top: 1px;\n    }\n    .tip-box-right ul li:first-child {\n      margin-top: 0px;\n    }\n    .tip-box-right ul li:hover {\n      background: #EDF5F8;\n    }\n    #gwd_price_tip_detail .tip-com-all, #bjgou_price_tip_detail .tip-com-all {\n      float: left;\n      margin-left: 15px;\n      margin-top: 16px;\n      color: #6B8393;\n      line-height: 13px;\n      height: 13px;\n      font-size: 12px;\n    }\n    #gwd_price_tip_detail .tip-com-all:hover, #bjgou_price_tip_detail .tip-com-all:hover{\n      color: #48BEFE;\n    }\n    .tip-box-right p{\n      font-size: 12px;\n      color: #5E707C;\n      font-weight: bold;\n      height: 15px;\n      width: 100%;\n      text-align: center;\n      line-height: 15px;\n      margin: 0px;\n      margin-top: 14px;\n    }\n    .tip-com-item {\n      float: left;\n      height: 30px;\n      width: 100%;\n      line-height: 30px;\n    }\n    .tip-com-item img {\n      height: 16px;\n      width: 16px;\n      float: left;\n      margin-left: 15px;\n      margin-right: 7px;\n      margin-top: 7px;\n    }\n    .tip-com-item span{\n      font-size: 12px;\n      color: #6B8393;\n    }\n    .tip-com-item, .tip-com-item span, .tip-com-all {\n      text-decoration: none!important;\n    }\n    .tip-chart {\n      width: 336px;\n      height: 126px;\n      margin-top: 6px;\n    }\n    .tip-chart svg .highcharts-series path {\n      fill: none;\n    }\n    .tip-chart .highcharts-tooltip path {\n      fill: white;\n    }\n  </style>\n  ';
    if (!isGwd) {
        $$out += '\n  <style>\n    .price_tip_detail {\n      height: 220px;\n    }\n\n    .tip-price-status em {\n      background-size: contain!important;\n      background-repeat: no-repeat!important;\n    }\n\n    .tip-price-status.status-1 em {\n      background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_down@2x.png);\n    }\n    .tip-price-status.status-2 em {\n      background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_lowest@2x.png);\n    }\n    .tip-price-status.status0 em {\n      background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_stable@2x.png);\n    }\n    .tip-price-status.status1 em {\n      background: url(https://cdn.bijiago.com/images/extensions/bijiago/trend_up@2x.png);\n    }\n  </style>\n  ';
    } else {
        $$out += '\n  <style>\n    .tip-price-status.status-1 em {\n      background-position: -5px -5px;\n    }\n    .tip-price-status.status-2 em {\n      background-position: -71px -5px;\n    }\n    .tip-price-status.status0 em {\n      background-position: -49px -5px;\n    }\n    .tip-price-status.status1 em {\n      background-position: -26px -5px;\n    }\n  </style>\n  ';
    }
    $$out += '\n</div>';
    return $$out;
};

/***/ }),
/* 772 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, url = $data.url;
    $$out += '<div class="trend-error-info-mini">\n  <p class="error-p">我们检测到访问异常\uFF0C请您验证后继续使用</p>\n  <a class="error-sp" href="';
    $$out += $escape(url);
    $$out += '">点击验证</a>\n  <style type="text/css">\n    .trend-error-info-mini {\n      float: left;\n      width: 370px;\n      height: 242px;\n      background: #fff;\n      z-index: 99999999;\n      height: 268px;\n    }\n    .error-p {\n      width: 100%;\n      float: left;\n      text-align: center;\n      margin-top: 45px!important;\n      font-size: 14px;\n      color: #666;\n    }\n    .error-sp {\n      width: 95px;\n      margin: 110px auto!important;\n      height: 20px;\n      line-height: 20px;\n      text-align: center;\n      color: #000!important;\n      border: 1px solid #333;\n      border-radius: 5px;\n      display: block;\n      text-decoration: none!important;\n    }\n  </style>\n</div>';
    return $$out;
};

/***/ }),
/* 773 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, G, regeneratorRuntime) {

var _this = this;

var getCoupon = __webpack_require__(33);
var getCouponNew = __webpack_require__(38);
var request = __webpack_require__(3);
var cnzz = __webpack_require__(12);
var log = __webpack_require__(14);
var util = __webpack_require__(11);
var extConsole = __webpack_require__(6);
var mutationObserver = __webpack_require__(40);

var globalInfo = {},
    hasReqId = [];
var useQrCode = undefined;

var domPattern = {
  'tmall1': {
    list: '#J_ItemList>div.product',
    dom: '.productImg-wrap',
    url: 'a.productImg'
  },
  'taobao1': {
    list: '#mainsrp-itemlist .items .item',
    dom: '.pic-box',
    listen: '#mainsrp-itemlist',
    lschild: '.m-itemlist',
    url: 'a.pic-link'
  },
  'taobao11': {
    list: '#listsrp-itemlist div.items .J_ItemListSKUItem',
    dom: '.pic-box',
    listen: '#listsrp-itemlist',
    lschild: '.m-itemlist',
    url: 'a.pic-link'
  },
  'taobao2': {
    list: 'ul li',
    dom: '.x',
    listen: '.m-itemlist',
    url: 'a'
  },
  'taobao3': {
    list: '.module-wrap.J_tb_lazyload .pro-list li',
    dom: '.x',
    listen: '.m-itemlist',
    url: 'a.item'
  },
  'taobao4': {
    list: '#list-itemList ul.items li.item',
    dom: '.J_ItemMainImgWraper',
    listen: '.m-itemlist',
    url: 'a.J_AtpLog'
  },
  'taobao5': {
    list: '.module-wrap.J_tb_lazyload ul.items li',
    dom: '.x',
    listen: '.m-itemlist',
    url: '.shopTitle+a.img_url'
  },
  'taobao6': {
    list: '.m-itemList ul.items li.item',
    dom: 'span.img-inner',
    listen: '#minilist-itemList-1',
    lschild: '.m-itemList',
    url: '.J_ItemLink'
  },
  'taobao7': {
    list: 'ul li',
    dom: '.x',
    listen: '',
    lschild: '',
    url: 'a'
  },
  'taobao8': {
    list: '[class^=Card--doubleCardWrapper--]',
    dom: '[class^=Card--mainPicAndDesc]'
  },
  'taobao9': {
    list: '[class^=Card--listCard--]',
    dom: '[class^=MainPic--listMod--]'
  },
  'taobao10': {
    list: '[class^=doubleCard--]',
    dom: '[class^=mainPicAndDesc--]',
    parent: 'a'
  },
  'taobaoIndex': {
    list: '.tb-recommend-content-item',
    url: 'a.item-link',
    dom: '.img-wrapper'
  },
  'taobaoIndex1': {
    list: '.tb-pick-content-item',
    url: 'a.item-link',
    dom: '.img-wrapper'
  },
  'tmallSearch': {
    list: '[class^=Content--contentInner] > div',
    dom: '[class^=Card--mainPicAndDesc]',
    url: 'a'
  }
};

var getTypes = function getTypes() {
  var urlPattern = {
    'list\\.tmall\\.com': 'tmall1',
    's\\.taobao\\.com': 'taobao1',
    'fake\\.taobao\\.com': 'taobao11',
    'www\\.taobao\\.com/market/': 'taobao2',
    'www\\.taobao\\.com/markets/promotion/': 'taobao3',
    'www\\.taobao\\.com/markets/amusement/': 'taobao6',
    'www\\.taobao\\.com/markets/': 'taobao7',
    'list\\.taobao\\.com': 'taobao4',
    'www\\.taobao\\.com': 'taobaoIndex'
  };

  var url = location.href;
  for (var i in urlPattern) {
    if (url.match(new RegExp(i))) {
      return urlPattern[i];
    }
  }
  return 'taobao8';
};
var callbacks = undefined,
    hasreq = undefined,
    urls = undefined;
var getPageInfo = function getPageInfo(info, callback) {
  var infoObj = {};
  if (hasreq) {
    callbacks = callback;
    urls = info.click_url;
    return;
  }
  var itemId = info.itemId;
  var obj = {
    itemNumId: itemId
  };
  var url = 'https://acs.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?data=' + encodeURIComponent(JSON.stringify(obj));
  request.getPure(url).done(function (data) {
    try {
      var item = data.data.item;
      var seller = data.data.seller;
      var item2 = JSON.parse(data.data.apiStack[0].value);
      infoObj.title = item.title;
      infoObj.picUrl = item.images[0];
      infoObj.shopName = seller.shopName;
      infoObj.shopLogo = seller.shopIcon;
      infoObj.shopUrl = seller.shopUrl;
      infoObj.biz30Day = item2.item.sellCount;
      infoObj.discountPrice = (Number(item2.skuCore.sku2info['0'].price.priceMoney) / 100).toFixed(2);
    } catch (e) {
      __webpack_require__(6).error(e);
    }
    if (!infoObj.title) {
      console.log(obj);
      infoObj.title = info.titleGot;
    }
    if (!infoObj.picUrl) {
      infoObj.picUrl = info.imgGot;
    }
    if (!infoObj.discountPrice) {
      infoObj.discountPrice = info.priceGot;
    }
    infoObj.id = itemId;
    infoObj.amount = info.coupon.coupon_money;
    infoObj.effectiveStartTime = info.coupon.start_time;
    infoObj.effectiveEndTime = info.coupon.end_time;
    infoObj.pid = info.pid;
    infoObj.tkl = info.tkl;
    infoObj.tmall = location.host.indexOf('tmall') > -1 ? true : false;
    callback(infoObj, info.click_url);
    if (callbacks) {
      callbacks(infoObj, urls);
    }
  });
};

var QRReloader = __webpack_require__(61);

var addQRcode = function addQRcode(id, dom) {
  if (hasReqId.indexOf(id) > -1) return;
  hasReqId.push(id);
  if (!id) return;
  var data = globalInfo[id];
  data.pid = '10002';
  data.itemId = id;
  console.log('dom:', dom);
  data.priceGot = parseInt($(dom).parents('.item').find('.price').text().replace(/ /g, '').replace('¥', ''));
  data.titleGot = $(dom).parents('.item').find('.title').text().replace(/ /g, '').replace(/\n/g, '');
  data.imgGot = $(dom).parents('.item').find('.pic img').attr('src');
  getPageInfo(data, function (newData, url) {
    var id = 'gwd-coupon-' + parseInt(Math.random() * 1000);
    var view = '<div class="minicoupon_detail" id="' + id + '">\n        <img src="xxx">\n        <span>微信扫码领券</span>\n      </div>';
    $(dom).append(view);
    QRReloader.init(newData, url, '#' + id + ' > img', function (newData2) {}, false, false);
  });
};

var renderCouponTip = function renderCouponTip(id, parentD, site) {
  __webpack_require__(6).log('renderCouponTip', id);
  var price = $(parentD).parent().find('.price strong').text();
  if (!price) {
    price = $(parentD).find('[class^=Price--priceInt]').text();
  }
  if (!price) {
    price = $(parentD).find('[class^=priceInt--]').text();
  }

  getCoupon.init(id, '10002', function (data) {
    if (!data) {
      __webpack_require__(6).log('renderCouponTip nodata', id);
      return;
    }
    if (!data.data) {
      __webpack_require__(6).log('renderCouponTip nodata', id);
      return;
    }
    data = data.data;
    if (data.rebate) {
      $(parentD).append('<span class="search_coupon_tip" style="pointer-events: none">' + (G.lang === 'zh-tr' ? '可以領紅包' : '可以领红包') + '</span>');
      return;
    }
    data.site = site;
    globalInfo[id] = data;
    var domain = G.from_device.includes('bijiago') ? 'bijiago' : 'gwdang';
    var browser = G.browser;
    if (G.from_device.includes('bijiago') || G.from_device.includes('biyibi')) {
      browser = 'chrome';
    }

    var productInfo = {
      title: $(parentD).find('[class^=title--]').text(),
      price: price,
      img: $(parentD).find('img[class^=mainPic--]').attr('src'),
      shopName: $(parentD).find('[class^=shopNameText--]').text(),
      saleAmount: $(parentD).find('[class^=realSales--]').text().replace('人付款', '')
    };

    var link = G.tb_server + '/extension/qrpage?dp_id=' + id + '-83&tag=9_' + browser + '&discount=' + data.coupon.coupon_money + '&union=' + G.union + '&title=' + encodeURIComponent(productInfo.title) + '&price=' + productInfo.price + '&shopName=' + encodeURIComponent(productInfo.shopName) + '&img=' + encodeURIComponent(productInfo.img) + '&sellAmount=' + encodeURIComponent(productInfo.saleAmount);
    if (G.lang === 'zh-tr') {
      link += '&lang=zh-tr';
    }
    var dom = '<a href="' + link + '" data-id="' + id + '" title="当前商品点击领券立减' + data.coupon.coupon_money + '元" class="search_coupon_tip" target="_blank">￥' + data.coupon.coupon_money + ' 优惠券</a>';
    if (useQrCode) {
      dom = '<a  data-id="' + id + '" class="search_coupon_tip" style="cursor:default;" target="_blank">￥' + data.coupon.coupon_money + ' 优惠券<a>';
    }
    if (G.lang === 'zh-tr') {
      dom = dom.replaceAll('优惠券', '優惠券').replaceAll('当前商品点击领券立减', '當前商品點擊領券立減').replaceAll('元', '元');
    }
    var pos = $(parentD).css('position');
    if (pos === 'static') {
      $(parentD).css('position', 'relative');
    }
    $(parentD).append($(dom));
  }, true, price);
};
var listenDom = function listenDom() {
  var lastCouponCount = 0;
  var timer = setInterval(function () {
    var couponCount = $('.search_coupon_tip').length;
    if (couponCount >= lastCouponCount) {
      lastCouponCount = couponCount;
      return;
    }
    clearInterval(timer);
    window.extNeedReload = true;
  }, 2000);
};

var renderInit = function renderInit() {
  var type, obj, list, i, dom, id, site, href, appendDom;
  return regeneratorRuntime.async(function renderInit$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        // 获取链接形式 不同页面  列表页不同
        extConsole.log('renderInit');
        type = getTypes();

        if (type) {
          context$1$0.next = 4;
          break;
        }

        return context$1$0.abrupt('return');

      case 4:
        obj = domPattern[type];
        list = undefined;
        context$1$0.next = 8;
        return regeneratorRuntime.awrap(util.waitForConditionFn(function () {
          list = $(obj['list']);
          if (type === 'taobao1' && list.length === 0) {
            obj = domPattern['taobao11'];
            list = $(obj['list']);
          }
          if (list.length === 0) {
            obj = domPattern['taobao8'];
            list = $(obj['list']);
          }
          if (list.length === 0) {
            obj = domPattern['taobao9'];
            list = $(obj['list']);
          }
          if (list.length === 0) {
            obj = domPattern['taobao10'];
            list = $(obj['list']);
          }
          if (list.length === 0) {
            obj = domPattern['tmallSearch'];
            list = $(obj['list']);
          }
          if (type === 'taobaoIndex' && list.length === 0) {
            obj = domPattern['taobaoIndex1'];
            list = $(obj['list']);
          }
          return list && list.length > 0;
        }, 1000, 10));

      case 8:

        // 对于新版淘宝，给每个商品添加class
        $('[class^=Card--mainPicAndDesc]').addClass('gwd-item').css('position', 'relative');
        $('[class^=MainPic--listMod--]').addClass('gwd-item').css('position', 'relative');

        $('[class^=mainPicAndDesc--]').addClass('gwd-item').css('position', 'relative');

        // 获取商品id
        i = 0;

      case 12:
        if (!(i < list.length)) {
          context$1$0.next = 40;
          break;
        }

        dom = list.eq(i);

        if (obj['url']) {
          dom = dom.find(obj['url']);
        }
        if (obj['parent']) {
          dom = dom.parents(obj['parent']);
        }

        if (!$(dom).attr('gwd-coupon-checked')) {
          context$1$0.next = 18;
          break;
        }

        return context$1$0.abrupt('continue', 37);

      case 18:
        id = null;
        site = 'taobao';

        if (!dom.length) {
          context$1$0.next = 29;
          break;
        }

        href = dom.attr('href');

        if (href) {
          context$1$0.next = 24;
          break;
        }

        return context$1$0.abrupt('continue', 37);

      case 24:
        if (href.indexOf('detail.tmall.com') > -1) site = 'tmall';
        id = href.match(/[?&]id=(\d+)/) && href.match(/[?&]id=(\d+)/)[1];
        if (!id) {
          id = dom.attr('data-nid');
        }
        context$1$0.next = 31;
        break;

      case 29:
        id = list.eq(i).find('.ww-light.ww-small').attr('data-item');
        __webpack_require__(6).log('find new type id', id);

      case 31:
        if (id) {
          context$1$0.next = 33;
          break;
        }

        return context$1$0.abrupt('continue', 37);

      case 33:
        appendDom = list.eq(i).find(obj['dom']);

        if (appendDom.length === 0) appendDom = list.eq(i);
        $(dom).attr('gwd-coupon-checked', 1);
        renderCouponTip(id, appendDom, site);

      case 37:
        i++;
        context$1$0.next = 12;
        break;

      case 40:
        if (type.indexOf('taobao') > -1) {
          $(obj['listen']).find(obj['lschild']).attr('c_coupon', '1');
        }
        // $('body').on('click', function(e) {
        //   if ($(e.target).hasClass('search_coupon_tip')) {
        //     cnzz.log('click:searchcoupon')
        //     log('click:searchcoupon')
        //   }
        // })
        // $('body').on('mouseover', function(e) {
        //   if ($(e.target).hasClass('search_coupon_tip')) {
        //     let id = $(e.target).attr('data-id')
        //     if ($(e.target).find('.qr_coupondetail').length === 0 && useQrCode) {
        //       cnzz.log('track:searchcoupon')
        //       log('track:searchcoupon')
        //       addQRcode(id, e.target)
        //     }
        //   }
        // })

      case 41:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};
module.exports.init = function () {
  if (G.forbidCoupon) return;
  // 360浏览器版本不加载优惠券  不然审核不通过
  if (G.from_device === '360') return;
  // useQrCode = true;
  useQrCode = false;
  setTimeout(function callee$1$0() {
    var cb;
    return regeneratorRuntime.async(function callee$1$0$(context$2$0) {
      while (1) switch (context$2$0.prev = context$2$0.next) {
        case 0:
          context$2$0.next = 2;
          return regeneratorRuntime.awrap(renderInit());

        case 2:
          cb = __webpack_require__(10).limit(renderInit);

          if ((location.href === 'https://www.taobao.com/' || location.href.startsWith('https://www.taobao.com/?')) && ($('.tb-recommend-content').length || $('.tb-pick-feeds-container').length)) {
            if ($('.tb-recommend-content').length) {
              $('.tb-recommend-content')[0].addEventListener('DOMNodeInserted', cb, false);
            }
            if ($('.tb-pick-feeds-container').length) {
              // $('.tb-pick-feeds-container')[0].addEventListener('DOMNodeInserted', cb, false)
              mutationObserver.observe('.tb-pick-feeds-container', function (mutations, observer) {
                var _iteratorNormalCompletion = true;
                var _didIteratorError = false;
                var _iteratorError = undefined;

                try {
                  for (var _iterator = mutations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                    var mutation = _step.value;

                    if (mutation.type === 'childList') {
                      cb();
                    }
                  }
                } catch (err) {
                  _didIteratorError = true;
                  _iteratorError = err;
                } finally {
                  try {
                    if (!_iteratorNormalCompletion && _iterator['return']) {
                      _iterator['return']();
                    }
                  } finally {
                    if (_didIteratorError) {
                      throw _iteratorError;
                    }
                  }
                }
              }, {
                childList: true,
                subtree: true
              });
            }
          }

          extConsole.log('searchCoupon loop check');

          if (!location.href.startsWith('https://s.taobao.com')) {
            context$2$0.next = 9;
            break;
          }

          context$2$0.next = 8;
          return regeneratorRuntime.awrap(__webpack_require__(11).waitForConditionFn(function () {
            return $('#content_items_wrapper').length;
          }));

        case 8:
          mutationObserver.observe('#content_items_wrapper', function (mutations, observer) {
            var _iteratorNormalCompletion2 = true;
            var _didIteratorError2 = false;
            var _iteratorError2 = undefined;

            try {
              for (var _iterator2 = mutations[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
                var mutation = _step2.value;

                if (mutation.type === 'childList') {
                  extConsole.log('searchCoupon', 'A child node has been added or removed.');
                  cb();
                }
              }
            } catch (err) {
              _didIteratorError2 = true;
              _iteratorError2 = err;
            } finally {
              try {
                if (!_iteratorNormalCompletion2 && _iterator2['return']) {
                  _iterator2['return']();
                }
              } finally {
                if (_didIteratorError2) {
                  throw _iteratorError2;
                }
              }
            }
          }, {
            childList: true,
            subtree: true
          });

        case 9:
        case 'end':
          return context$2$0.stop();
      }
    }, null, this);
  }, 1000);
};

// 监听dom 有更新， 再一次加载优惠券
// listenDom()

// if ($('[class^=Card--doubleCard--]').length) {
//   listenDom()
// }
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(5)))

/***/ }),
/* 774 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(regeneratorRuntime, $, G) {

var _this = this;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var request = __webpack_require__(3);
var siteInfo = __webpack_require__(35);
var cachedRes = {};

var t = 0;

var process = function process(list) {
  var lang, result;
  return regeneratorRuntime.async(function process$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        $('i[data-tips=京东自营，品质保障]').parents('li').addClass('gwd-self');

        lang = G.lang === 'zh-tr' ? '&lang=zh-tr' : '';
        context$1$0.next = 4;
        return regeneratorRuntime.awrap(request.post(G.server + '/extension/CouponMulti?union=' + G.union + lang, {
          ids: list.join(','),
          site_id: 3
        }, true, false));

      case 4:
        result = context$1$0.sent;

        render(result);
        cachedRes = _extends({}, result, cachedRes);

      case 7:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

var mode = 'searchPage';

var render = function render(result) {
  if (!result) return;
  Object.keys(result).map(function (key) {
    if (result[key]) {
      var d = result[key];
      if ($('li[data-sku=' + key + '] .p-img .search_coupon_tip').length) {
        return;
      }
      if ($('a[data-sku=' + key + '] .search_coupon_tip').length) {
        return;
      }
      $('li[data-sku=' + key + ']').addClass('gwd-has-coupon');
      var txt1 = '当前商品点击领券立减' + d.coupon + '元',
          txt2 = '￥' + d.coupon + ' 优惠券';
      if (G.lang === 'zh-tr') {
        txt1 = '當前商品點擊領券立減' + d.coupon + '元';
        txt2 = '￥' + d.coupon + ' 優惠券';
      }
      if (mode === 'promoPage') {
        $('a[data-sku=' + key + ']:eq(0)').css('position', 'relative').append('\n          <a href="' + d.click_url + '" class="search_coupon_tip" title="' + txt1 + '" style="position: absolute; cursor:pointer; line-height: 23px; top: 0; right: 0; width: unset; min-width: 92px" target="_blank">' + txt2 + '</a>\n        ');
      } else {
        $('li[data-sku=' + key + '] .p-img').append('\n          <a href="' + d.click_url + '" class="search_coupon_tip" title="' + txt1 + '" style="position: absolute; cursor:pointer; line-height: 23px; top: 0; right: 0" target="_blank">' + txt2 + '</a>\n        ');
      }
    }
  });
};

module.exports.init = function callee$0$0() {
  var excludeHosts, list, url, dom, modding, check;
  return regeneratorRuntime.async(function callee$0$0$(context$1$0) {
    while (1) switch (context$1$0.prev = context$1$0.next) {
      case 0:
        excludeHosts = ['order.jd.com', 'club.jd.com'];

        if (!excludeHosts.includes(location.hostname)) {
          context$1$0.next = 3;
          break;
        }

        return context$1$0.abrupt('return');

      case 3:
        list = [];
        url = location.href;
        dom = $('#J_main')[0];

        if (!dom) {
          dom = $('.babel-app')[0];
          mode = 'promoPage';
          $('body').on('click', '.search_coupon_tip', function (e) {
            e.preventDefault();
            e.stopPropagation();
            window.open(e.target.href);
          });
        }
        if (!dom) dom = document.body;
        modding = false;

        check = function check(e) {
          if (modding) return;
          modding = true;
          var newList = $('ul.gl-warp li.gl-item').toArray().map(function (item) {
            return item.dataset.sku;
          });
          if (!newList.length) {
            newList = $('.pd_common').toArray().filter(function (x) {
              return !x.dataset.sku;
            }).map(function (item) {
              if (item.attributes.jsonparams) {
                var p = JSON.parse(item.attributes.jsonparams.value);
                $(item).attr('data-sku', p.sku);
                return p.sku;
              }
              return false;
            }).filter(function (x) {
              return x;
            });
          }
          if (!newList.length) {
            newList = $('a img').toArray().map(function (x) {
              var a = $(x).parents('a');
              return {
                el: a,
                href: a.attr('href')
              };
            }).filter(function (x) {
              if (x.el.attr('data-sku')) return false;
              if (siteInfo.isProductPage('https:' + x.href)) {
                var sku = x.href.replace(/[^\d]*/g, '');
                x.el.attr('data-sku', sku);
                x.sku = sku;
                return true;
              }
              return false;
            }).map(function (x) {
              return x.sku;
            });
          }
          modding = false;
          newList = newList.filter(function (x) {
            return list.indexOf(x) === -1;
          });

          if (newList.length > 0) {
            console.log(newList);
            process(newList);
            list = list.concat(newList);
          } else if (location.href !== url) {
            setTimeout(function () {
              render(cachedRes);
            }, 1000);
          }
          url = location.href;
        };

        check();
        dom.addEventListener('DOMSubtreeModified', __webpack_require__(10).debounce(check), false);

      case 12:
      case 'end':
        return context$1$0.stop();
    }
  }, null, _this);
};

// let list = $('ul.gl-warp li.gl-item').toArray().map(item => item.dataset.sku)
// if (list.length) {
//   process(list)
// }
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(1), __webpack_require__(0)))

/***/ }),
/* 775 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, $) {

var request = __webpack_require__(3);
var template = __webpack_require__(13);
var util = __webpack_require__(19);
var userData = __webpack_require__(15);

var pagesite = undefined,
    urlArr = undefined,
    clickTime = {},
    show_ljfqrcode = true;

var ListPattern = {
  'lianjia': {
    list: '.sellListContent li.clear',
    hrefitem: '.info .title a',
    insertdom: '.sellListContent li.clear'
  },
  'maitian': {
    list: '.list_wrap li.clearfix',
    hrefitem: '.list_title h1 a',
    insertdom: '.list_wrap li.clearfix'
  },
  'lianjia2': {
    list: '#js-ershoufangList .m-list>ul>li',
    hrefitem: '.prop-title a',
    insertdom: '#js-ershoufangList .m-list>ul>li'
  },
  'ke': {
    list: '.sellListContent li.clear',
    hrefitem: '.info .title a',
    insertdom: '.sellListContent li.clear'
  },
  'ke2': {
    list: '.sellListContent li.clear',
    hrefitem: '.info .title a',
    insertdom: '.sellListContent li.clear'
  },
  '5i5j': {
    list: '.pListBox .pList>li',
    hrefitem: 'a',
    insertdom: '.pListBox .pList>li'
  },
  'centanet': {
    list: '.section-houselists .house-item',
    hrefitem: '.house-title a',
    insertdom: '.section-houselists .house-item'
  },
  'centanet2': {
    list: '.result-lists .house-main .house-item',
    hrefitem: '.house-title a',
    insertdom: '.result-lists .house-main .house-item'
  }

};
var dpPattern = {
  'lianjia': ['.content .price-container', '#topImg+.info>.price'],
  'lianjia2': ['.houseInfo', '.maininfo-price'],
  'ke': ['.content .price-container', '#topImg+.info>.price'],
  'ke2': ['.houseInfo', '.maininfo-price'],
  '5i5j': ['.housesty'],
  'centanet': ['#sidefixedbox .infotop'],
  'centanet2': ['.roombase-infor .roombase-price'],
  "maitian": ['.home_content .hc_left table tr:first-child', '.home_content .home_infos li:first-child']
};
var siteIdPattern = {
  'lianjia': 441,
  '5i5j': 442,
  'ke': 441,
  'maitian': 443,
  'centanet': 511
};

var getHouseCode = function getHouseCode() {
  var type = pageType();
  var housecode = undefined;
  if (type == 2) {
    var url = location.href;
    switch (G.site) {
      case 'lianjia':
        housecode = url.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        break;
      case 'ke':
        housecode = url.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        break;
      case 'maitian':
        housecode = url.match(/\/esfxq\/([a-z0-9A-Z]+)/)[1];
        break;
      case '5i5j':
        housecode = url.match(/\/([a-z0-9]+)\.html/)[1];
        break;
      case 'centanet':
        housecode = url.match(/\/([a-z0-9]+)\.html/)[1];
        break;
    }
  } else {
    var urls = urlArr;
    switch (G.site) {
      case 'lianjia':
        housecode = Array.prototype.map.call(urls, function (e) {
          return e.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        }).join(',');
        break;
      case 'ke':
        housecode = Array.prototype.map.call(urls, function (e) {
          return e.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        }).join(',');
        break;
      case 'maitian':
        housecode = Array.prototype.map.call(urls, function (e) {
          return e.match(/\/esfxq\/([a-z0-9A-Z]+)/)[1];
        }).join(',');
        break;
      case '5i5j':
        housecode = Array.prototype.map.call(urls, function (e) {
          return e.match(/\/([a-z0-9]+)\.html/)[1];
        }).join(',');
        break;
      case 'centanet':
        housecode = Array.prototype.map.call(urls, function (e) {
          return e.match(/\/([a-z0-9]+)\.html/)[1];
        }).join(',');
        break;
    }
  }
  return housecode;
};

var existRemind = function existRemind() {
  var siteId = siteIdPattern[G.site];
  if (!siteId) return;
  var housecode = getHouseCode();
  var url = G.u_house + '/api/house_collection?ac=exist&site_id=' + siteId + '&house_code=' + housecode;
  request.get(url).done(function (data) {
    if (data && data.exist) {
      var list = $('.ht-price-remind');
      for (var i = 0; i < list.length; i++) {
        var code = list.eq(i).attr('data-id');
        if (data.exist[code]) {
          list.eq(i).addClass('hasremind');
          list.eq(i).find('span').text('已添加提醒');
          list.eq(i).attr('data-colid', data.exist[code]);
        }
      }
    }
  });
};
var addRemind = function addRemind(code, callback) {
  if (clickTime[code] >= 4) {
    return;
  }
  if (!clickTime[code]) {
    clickTime[code] = 1;
  }
  clickTime[code]++;
  var siteId = siteIdPattern[G.site];
  var url = G.u_house + '/api/house_collection?ac=add&site_id=' + siteId + '&house_code=' + code + '&from_url=' + encodeURIComponent(location.href);
  request.get(url).done(function (data) {
    if (data && data.msg === '收藏成功') {
      callback(data);
    } else if (data.msg === '请先登录') {
      location.href = data.loginUrl;
    }
  });
};

var delRemind = function delRemind(id, callback) {
  var url = G.u_house + '/api/house_collection?ac=del&collection_id=' + id;
  request.get(url).done(function (data) {
    if (data && data.msg === '删除成功') {
      callback();
    }
  });
};

var addEvent = function addEvent() {
  var time = undefined,
      time2 = undefined;
  $('.ht-trend-desc, #bdext_minibar .bdext-toptabs').on('mouseenter', function () {
    var c = $(this).parent().parent().hasClass('trend-box-1');
    if (c) return;
    var oldsrc = $(this).parent().next().find('.house-trend-img img').attr('src');
    if (!oldsrc) {
      var src = $(this).parent().next().find('.house-trend-img img').attr('data-src');
      $(this).parent().next().find('.house-trend-img img').attr('src', src);
    }
    $(this).addClass('mshover');
    $(this).parent().next().show();
  });
  $('.ht-trend-desc, #bdext_minibar .bdext-toptabs').on('mouseleave', function () {
    var that = this;
    time = setTimeout(function () {
      $(that).parent().next().hide();
      $(that).removeClass('mshover');
    }, 300);
  });
  $('.houset-detail').on('mouseenter', function () {
    clearTimeout(time);
  });
  $('.houset-detail').on('mouseleave', function () {
    $(this).hide();
    $('.ht-trend-desc, #bdext_minibar').removeClass('mshover');
  });
  $('.ht-price-remind').on('click', function () {
    var that = this;
    var txt = $(this).find('span').text();
    var code = $(this).attr('data-id');
    if (txt === '降价提醒') {
      addRemind(code, function (data) {
        $(that).addClass('hasremind');
        $(that).find('span').text('已添加提醒');
        $(that).attr('data-colid', data.collect_id);
      });
    } else {
      var collect_id = $(this).attr('data-colid');
      delRemind(collect_id, function () {
        $(that).attr('data-colid', null);
        $(that).removeClass('hasremind');
        $(that).find('span').text('降价提醒');
      });
    }
  });
  $('.ht-price-remind').on('mouseenter', function () {
    if (userData.get('show_ljfqrcode') == 0 || !show_ljfqrcode) return;
    $(this).parent().parent().find('.ht-wxqrcode').show();
  });
  $('.ht-price-remind').on('mouseleave', function () {
    var that = this;
    time2 = setTimeout(function () {
      $(that).parent().parent().find('.ht-wxqrcode').hide();
    }, 150);
  });
  $('.ht-wxqrcode').on('mouseenter', function () {
    clearTimeout(time2);
  });
  $('.ht-wxqrcode').on('mouseleave', function () {
    $('.ht-wxqrcode').hide();
  });

  $('.ht-wxqrcode .ht-wx-sp3').on('click', function () {
    $('.ht-wxqrcode').hide();
    show_ljfqrcode = false;
    util.settings('set_show_ljfqrcode', 'show_ljfqrcode', '0');
  });
  $('body').on('click', function (e) {
    var dom = $(e.target);
    var communityDom = dom.parent().parent().parent().find('.community-price');
    if (dom.hasClass('bjg-house-trend-b')) {
      communityDom.hide();
      dom.parent().find('span').removeClass('trend-choose');
      dom.addClass('trend-choose');
    } else if (dom.hasClass('bjg-community-trend-b')) {
      if (communityDom.children().length === 0) {
        renderChart(communityDom, function () {
          dom.parent().find('span').removeClass('trend-choose');
          dom.addClass('trend-choose');
          communityDom.show();
        });
      } else {
        dom.parent().find('span').removeClass('trend-choose');
        dom.addClass('trend-choose');
        communityDom.show();
      }
    }
  });
};

var renderChart = function renderChart(dom, callback) {
  var href = dom.attr('data-u');
  var id = dom.attr('id');
  getInfo(href, function (data) {
    __webpack_require__(776)({
      el: id,
      msg: data
    });

    if (callback && data.community) {
      callback();
    }
  });
};

var renderBtn = function renderBtn(data) {
  var html = __webpack_require__(228);
  var listobj = ListPattern[pagesite];
  var list = $(listobj['list']);
  for (var i = 0; i < list.length; i++) {
    var item = list.eq(i).find(listobj['hrefitem']);
    var href = item.attr('href');
    if (href.indexOf('http') === -1) href = location.protocol + '//' + location.host + href;
    var housecode = undefined;
    switch (G.site) {
      case 'lianjia':
        housecode = href.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        break;
      case 'ke':
        housecode = href.match(/\/([a-z0-9A-Z]+)\.html/)[1];
        break;
      case '5i5j':
        housecode = href.match(/\/([a-z0-9]+)\.html/)[1];
        break;
      case 'maitian':
        housecode = href.match(/\/esfxq\/([a-z0-9A-Z]+)/)[1];
        break;
      case 'centanet':
        housecode = href.match(/\/([a-z0-9]+)\.html/)[1];
        break;
    }
    href = encodeURIComponent(href.replace('.ke.', '.lianjia.'));
    if (data.data[href]) {
      list.eq(i).append(template.compile(html)({
        data: data.data[href],
        server: G.server,
        s_server: G.s_server,
        housecode: housecode
      }));
    }
  }
  setTimeout(existRemind, 500);
  addEvent();
};
var renderBtnDp = function renderBtnDp(data) {
  var housecode = getHouseCode();
  var dpdom = undefined;
  var dpobj = dpPattern[pagesite];
  for (var i = 0; i < dpobj.length; i++) {
    if ($(dpobj[i]).length > 0) {
      dpdom = dpobj[i];
      break;
    }
  }
  var html = __webpack_require__(228);
  var href = encodeURIComponent(location.href.replace('.ke.', '.lianjia.'));
  $(dpdom).eq(0).after(template.compile(html)({
    data: data.data[href],
    server: G.server,
    s_server: G.s_server,
    pagetype: 'dppage',
    housecode: housecode
  }));
  addEvent();
  setTimeout(existRemind, 500);
};

var getUrls = function getUrls(type) {
  var obj = ListPattern[pagesite];
  var hrefdom = obj['list'] + ' ' + obj['hrefitem'];
  var host = location.host;
  if (host.indexOf('lianjia') > -1 && type === 2) {
    return location.href;
  } else if (host.indexOf('lianjia') > -1) {
    var arr = Array.prototype.map.call($(hrefdom), function (e) {
      var href = $(e).attr('href');
      return (href.indexOf('http') > -1 ? '' : 'http://' + location.host) + href;
    });
    urlArr = arr;
    return arr.join('||');
  }
  if (host.indexOf('maitian') > -1 && type === 2) {
    return location.href;
  } else if (host.indexOf('maitian') > -1) {
    var arr = Array.prototype.map.call($(hrefdom), function (e) {
      var href = $(e).attr('href');
      return (href.indexOf('http') > -1 ? '' : 'http://' + location.host) + href;
    });
    urlArr = arr;
    return arr.join('||');
  }
  if (host.indexOf('ke') > -1 && type === 2) {
    return location.href;
  } else if (host.indexOf('ke') > -1) {
    var arr = Array.prototype.map.call($(hrefdom), function (e) {
      var href = $(e).attr('href');
      return (href.indexOf('http') > -1 ? '' : 'http://' + location.host) + href;
    });
    urlArr = arr;
    return arr.join('||');
  }
  if (host.indexOf('5i5j') > -1 && type === 2) {
    return location.href;
  } else if (host.indexOf('5i5j') > -1) {
    var arr = Array.prototype.map.call($('.pListBox .pList>li .listTit>a'), function (e) {
      return location.protocol + '//' + location.host + $(e).attr('href');
    });
    urlArr = arr;
    return arr.join('||');
  }

  if (host.indexOf('centanet') > -1 && type === 2) {
    return location.href;
  } else if (host.indexOf('centanet') > -1) {
    var arr = Array.prototype.map.call($(hrefdom), function (e) {
      return location.protocol + '//' + location.host + $(e).attr('href');
    });
    urlArr = arr;
    return arr.join('||');
  }
};

var getInfo = function getInfo(url, callback) {
  request.get(url).done(function (data) {
    callback(data);
  });
};
var pageType = function pageType() {
  var url = location.href;
  var type = 0;
  var site = pagesite;
  switch (site) {
    case 'lianjia':
      if (url.match(/\d+\.html/)) {
        type = 2;
      } else {
        type = 1;
      }
      break;
    case 'maitian':
      if (url.match(/esfxq\/\w+/)) {
        type = 2;
      } else {
        type = 1;
      }
      break;
    case 'lianjia2':
      if (url.match(/\d+\.html/)) {
        type = 2;
      } else {
        type = 1;
      }
      break;
    case '5i5j':
      if (url.match(/(?:exchange|ershoufang)\/\d+\.html/) && $('.big-slide').length > 0) {
        type = 2;
      } else if (url.match(/(?:exchange|ershoufang)/)) {
        type = 1;
      }
      break;
    case 'centanet':
      if (url.match(/ershoufang\/[a-z0-9]+\.html/) && $('#picBox').length > 0) {
        type = 2;
      } else if (url.match(/ershoufang/)) {
        type = 1;
      }
      break;
    case 'centanet2':
      if (url.match(/ershoufang\/[a-z0-9]+\.html/)) {
        type = 2;
      } else if (url.match(/ershoufang/)) {
        type = 1;
      }
      break;
    case 'ke':
      if (url.match(/\d+\.html/)) {
        type = 2;
      } else {
        type = 1;
      }
      break;
  }
  return type;
};
var renderStyle = function renderStyle() {
  var html = __webpack_require__(777);
  $('body').append(template.compile(html)({
    s_server: G.s_server,
    extBrand: G.extBrand
  }));
  $('body').addClass('house_' + pagesite);
};

var _init = function _init() {
  pagesite = G.site;
  if (pagesite != 'lianjia' && pagesite != '5i5j' && pagesite != 'centanet' && pagesite != 'ke' && pagesite != 'maitian') return;
  if (location.host === 'sh.lianjia.com' || location.host === 'su.lianjia.com') {
    pagesite = 'lianjia2';
  }
  if (location.host === 'sh.centanet.com') {
    pagesite = 'centanet2';
  }
  var type = pageType();
  var urls = getUrls(type);
  var url = G.server + '/extension/houseTip?url=' + encodeURIComponent(urls);
  if (type === 2) {
    getInfo(url, renderBtnDp);
  } else {
    getInfo(url, renderBtn);
  }
  renderStyle();
};
module.exports.init = function () {
  setTimeout(function () {
    if ($('html').hasClass('gwd_top') || $('html').hasClass('gwd_bottom')) return;
    _init();
  }, 1000);
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(1)))

/***/ }),
/* 776 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(G, Highcharts) {

var timeFormat = function timeFormat(date) {
  var x = new Date(date);
  var year = x.getFullYear();
  if (G.IE7 || G.IE8) {
    year = x.getFullYear();
  }
  var month = x.getMonth() + 1;
  var day = x.getDate();
  if (month < 10) {
    month = '0' + month + '';
  }
  if (day < 10) {
    day = '0' + day + '';
  }
  // let hour = x.getHours();
  var timeStr = year + '/' + month + '/' + day;
  return timeStr;
};
var supplementPoint = function supplementPoint(data) {
  if (data.length === 1) {
    data.unshift([data[0][0] - 1000, data[0][1]]);
  }
  console.log(data);
  return data;
  // let newdata = []
  // for (let i=0; i<data.length-1; i++) {
  //   newdata.push(data[i])
  //   let days = parseInt( (data[i+1][0] - data[i][0]) / (3600*1000*24) );
  //   if (days >= 2) {
  //     for (let j=1; j<days; j++) {
  //       newdata.push([
  //         data[i][0] + (3600*1000*24)*j, data[i][1]
  //       ])
  //     }
  //   }
  // }
  // newdata.push(data[data.length-1])
  // return newdata;
};
module.exports = function (data) {
  var opt = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];

  // console.log(data)
  try {
    var obj = {
      chart: {
        renderTo: data.el,
        type: 'line',
        style: {
          marginLeft: '4px',
          paddingLeft: '0px',
          marginTop: '0',
          paddingTop: '0px',
          marginBottom: '0px',
          paddingBottom: '0px'
        },
        events: {
          load: function load() {
            this.xAxis[0].update({
              max: this.xAxis[0].max + 3600 * 1000 * 24 * 10
            });
          }
        }
      },
      credits: {
        enabled: false
      },
      colors: ['#d150f0', '#f0b507', '#3ebdf7'],
      title: {
        text: data.title || '',
        x: -20,
        style: {
          color: '#2f7ed8'
        }
      },
      xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
          day: '%Y/%m',
          week: '%Y/%m',
          month: '%Y/%m'
        },
        minTickInterval: 3600 * 24 * 1000 * 30,
        plotLines: [{
          color: 'red',
          dashStyle: 'longdashdot',
          value: 3,
          width: 2
        }],
        minorGridLineColor: "#dfdfdf",
        labels: {
          rotation: -25,
          y: 30,
          style: {
            fontSize: '12px',
            fontFamily: 'Arial',
            color: '#323333'
          },
          align: 'center'
        }
      },
      yAxis: {
        title: {
          text: '',
          rotation: 0,
          align: 'high',
          y: -16,
          x: -12,
          offset: -55,
          margin: 0,
          style: {
            color: '#585858'
          }
        },
        plotLines: [{
          value: 0,
          width: 1,
          color: '#808080'
        }],
        gridLineColor: '#c0d0e0',
        minorGridLineColor: '#dfdfdf',
        tickPixelInterval: 50
      },
      tooltip: {
        xDateFormat: '%Y-%m-%d',
        shared: true,
        valueDecimals: 2,
        valuePrefix: '',
        useHTML: true,
        valueSuffix: ' 万',
        borderColor: 'none',
        padding: 20,
        formatter: function formatter() {
          var timeStr = timeFormat(this.x);
          var result = '<table style="margin-left:12px"><tr><td width="100%" colspan="8" style="text-align: center;font-weight: bold;font-family: Arial;font-size:14px">' + timeStr + '</td></td></tr>';
          for (var i = 0; i < this.points.length; i++) {
            var priceStr = parseFloat(Number(this.points[i].y).toFixed(2)) + '万';
            result += '<tr><td style="width: 80px; text-align: left"><span style="color: ' + this.points[i].point.series.color + ';font-size:12px;font-family:arial;float:none;margin-right:5px;">●</span>' + this.points[i].point.series.name + '</td>\n          <td style="padding-left:4px;">' + priceStr + '</td></tr>';
          }
          result += '</table>';
          return result;
        }
      },
      plotOptions: {
        series: {
          marker: {
            radius: 1,
            states: {
              hover: {
                radius: 2
              }
            }
          },
          lineWidth: 1.5,
          shadow: false,
          states: {
            hover: {
              lineWidth: 1
            }
          }
        }
      },
      legend: {
        enabled: true,
        borderWidth: 0,
        verticalAlign: 'top',
        x: 228,
        y: -8,
        itemStyle: {
          color: '#585858',
          fontWeight: 'normal',
          fontSize: '14px',
          marginBottom: '0px'
        },
        symbolWidth: 12,
        symbolHeight: 3,
        itemMarginBottom: 0,
        itemMarginTop: 0,
        margin: 12
      },
      series: []
    };
    if (opt) {
      obj = opt;
    }
    obj.title.style.display = 'none';
    var msg = data.msg;
    if (data.mainTrend) {
      obj.series[0] = {
        visible: true,
        name: '房源价格走势',
        marker: {
          symbol: 'circle'
        },
        data: []
      };
      obj.series[0].data = msg.price_history;
      obj.series[0].data = supplementPoint(obj.series[0].data);
      obj.colors = ['#3ebdf7'];
      obj.legend.enabled = false;
    } else {
      var index1 = 0,
          index2 = 0,
          index3 = 0;
      var colorArr = [];
      if (msg.onsale.length >= 1) {
        obj.series[index1] = {
          visible: true,
          name: '挂牌单价',
          marker: {
            symbol: 'circle'
          },
          data: []
        };
        index2++;
        index3++;
        colorArr.push('#d150f0');
        obj.legend.x = obj.legend.x - 48;
        for (var i = 0; i < data.msg.onsale.length; i++) {
          var arr = new Array(2);
          arr[0] = data.msg.onsale[i][0] * 1000;
          arr[1] = Math.round(data.msg.onsale[i][1] * 100) / 100;
          obj.series[index1].data.push(arr);
        }
        obj.series[index1].data = supplementPoint(obj.series[index1].data);
      }
      if (msg.dealt.length >= 1) {
        obj.series[index2] = {
          visible: true,
          name: '成交单价',
          marker: {
            symbol: 'circle'
          },
          data: []
        };
        index3++;
        colorArr.push('#f0b507');
        obj.legend.x = obj.legend.x - 48;
        for (var i = 0; i < data.msg.dealt.length; i++) {
          var arr = new Array(2);
          arr[0] = data.msg.dealt[i][0] * 1000;
          arr[1] = Math.round(data.msg.dealt[i][1] * 100) / 100;
          obj.series[index2].data.push(arr);
        }
        obj.series[index2].data = supplementPoint(obj.series[index2].data);
      }
      obj.yAxis.title.text = '单位(万)';
      obj.colors = colorArr;
    }
    new Highcharts.Chart(obj);
  } catch (e) {}
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0), __webpack_require__(48)))

/***/ }),
/* 777 */
/***/ (function(module, exports, __webpack_require__) {

var $imports = __webpack_require__(2);
module.exports = function ($data) {
    'use strict';
    $data = $data || {};
    var $$out = '', $escape = $imports.$escape, s_server = $data.s_server, extBrand = $data.extBrand;
    $$out += '<style type="text/css">\n  .house_centanet2 .house-item {\n    position: relative;\n    overflow: visible;\n  }\n  .house_5i5j #bdext_mb_bg.dppage, .house_centanet2 #bdext_mb_bg.dppage {\n    position: relative;\n  }\n  #bdext_mb_bg.dppage {\n    height: 40px;\n  }\n  .house-trend-bg {\n      background: url("';
    $$out += $escape(s_server);
    $$out += '/images/extensions/xbt/house-trend-icon3.png") no-repeat;\n    }\n    .house-trend-box {\n      position: absolute;\n      right: 0px;\n      bottom: 50px;\n      width: 282px;\n      height: 32px;\n      border: 1px solid #eee;\n      border-radius: 5px;\n      background: #fff;\n      display: block!important;\n      box-sizing: content-box;\n      font-family: "Microsoft Yahei","微软雅黑"\n    }\n    #bdext_mb_bg #bdext_minibar {\n      position: absolute;\n      right: 0px;\n      bottom: 56px;\n      display: block;\n    }\n    .house_centanet2 #bdext_mb_bg #bdext_minibar {\n      right: 6px;\n      bottom: 29px;\n    }\n    .house_centanet2 #bdext_mb_bg.dppage #bdext_minibar {\n      right: -32px;\n    }\n    .house_centanet #bdext_mb_bg.dppage #bdext_minibar {\n      right: -18px;\n    }\n    .house_5i5j #bdext_mb_bg #bdext_minibar {\n      bottom: 30px;\n    }\n    .house_centanet #bdext_mb_bg #bdext_minibar {\n      bottom: 20px;\n    }\n    #bdext_mb_bg.dppage #bdext_minibar {\n      bottom: -8px;\n      position: relative;\n      display: block;\n    }\n    .house-trend-box * {\n      box-sizing: content-box;\n    }\n    .house-trend-box.trend-box-1 .ht-trend-desc {\n      background-color: #f0f0f0;\n    }\n    .house_lianjia2 .house-trend-box {\n      bottom: 32px;\n    }\n    .house_centanet .house-trend-box {\n      right: 40px;\n      bottom: 22px;\n    }\n    .house_centanet2 .house-trend-box {\n      right: 52px;\n      bottom: 32px;\n    }\n    .house_centanet .house-trend-box.dppage {\n      right: -16px;\n      bottom: 0px;\n    }\n    .house_centanet2 .house-trend-box.dppage {\n      right: -38px;\n      bottom: -15px;\n    }\n    .bd_5i5j .house-trend-box {\n      bottom: 29px;\n    }\n    .house-trend-box.dppage, .bd_lianjia .house-trend-box.dppage {\n      position: relative;\n      bottom: 0px;\n    }\n    .house_lianjia2 .house-trend-box.dppage {\n      bottom: 1px;\n    }\n    .bd_lianjia .house-trend-box {\n      bottom: 37px;\n    }\n\n    .houset-btn {\n      width: 100%;\n      height: 100%;\n    }\n    .houset-btn:after {\n      content: "";\n      display: block;\n      clear: both;\n    }\n    .houset-detail {\n      position: absolute;\n      top: 32px;\n      right: 0px;\n      height: 285px;\n      width: 580px;\n      z-index: 999999999;\n      border: 1px solid #eee;\n      background-color: #fff;\n      box-sizing: content-box;\n      box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);\n      display: none;\n    }\n    #bdext_mb_bg .houset-detail {\n      top: 188px;\n      right: 0px;\n    }\n    .house_centanet2 #bdext_mb_bg .houset-detail {\n      top: 196px;\n      right: 5px;\n    }\n    .house_5i5j #bdext_mb_bg .houset-detail {\n      top: 133px;\n    }\n    .house_centanet #bdext_mb_bg .houset-detail {\n      top: 230px;\n    }\n    #bdext_mb_bg.dppage .houset-detail {\n      top: 97px;\n      right: 149px;\n    }\n    .house_centanet2 #bdext_mb_bg.dppage .houset-detail {\n      top: 48px;\n      right: 235px;\n    }\n    .house_centanet #bdext_mb_bg.dppage .houset-detail {\n      top: 152px;\n      right: 51px;\n    }\n    .house_5i5j #bdext_mb_bg.dppage .houset-detail {\n      top: 46px;\n      right: 78px;\n    }\n    .house-trend-img {\n      float: left;\n      width: 452px;\n      height: 217px;\n      margin-top: 28px;\n    }\n    .houset-detail .house-trend-img img {\n      width: 100%;\n      height: 100%;\n    }\n    .houset-btn a {\n      float: left;\n      width: 32px;\n      height: 32px;\n      background-position: -6px -48px;\n      border-top-left-radius: 5px;\n      border-bottom-left-radius: 5px;\n    }\n    .ht-trend-desc {\n      float: left;\n      height: 32px;\n      width: 124px;\n      cursor: pointer;\n    }\n    .ht-price-remind {\n      float: left;\n      width: 124px;\n      height: 32px;\n      border-left: 1px solid #e6e6e6;\n      cursor: pointer;\n    }\n    .ht-price-remind:hover {\n      background-color: #f1f5f6;\n    }\n    .ht-price-remind span {\n      color: #f7705b;\n      font-size: 14px;\n      float: right;\n      height: 32px;\n      width: auto;\n      line-height: 32px;\n      margin-right: 6px;\n    }\n    .ht-price-remind em {\n      background-position: -30px -22px;\n      height: 16px;\n      width: 16px;\n      float: right;\n      margin-right: 22px;\n      margin-top: 8px;\n    }\n    .ht-price-remind.hasremind span {\n      color: #333;\n    }\n    .ht-price-remind.hasremind em {\n      background-position: -57px -22px;\n      margin-right: 16px;\n    }\n    .bdext-mini-trend.mshover{\n      border: 1px solid #425766;\n      z-index: 2;\n    }\n    .ht-trend-desc.mshover {\n      background-color: #f1f5f6;\n    }\n    .ht-trend-desc span {\n      line-height: 32px;\n      font-size: 14px;\n      float: left;\n      cursor: pointer;\n      margin-left: 22px;\n    }\n    .ht-trend-desc span.h-color0 {\n      color: #f7a82b;\n    }\n    .ht-trend-desc span.h-color1 {\n      color: #ff1e1e;\n    }\n    .ht-trend-desc span.h-color2, .ht-trend-desc span.h-color3 {\n      color: #0baa74;\n    }\n    .ht-trend-desc span.h-color3 {\n      margin-left: 10px;\n    }\n    .ht-trend-desc span.h-color-1 {\n      color: #888;\n    }\n    .ht-trend-desc em {\n      float: left;\n      height: 20px;\n      width: 26px;\n      margin-top: 6px;\n      margin-left: 8px;\n    }\n    .ht-trend-desc .trend-icon0 {\n        background-position: -32px -2px;\n    }\n    .ht-trend-desc .trend-icon1 {\n        background-position: -66px -2px;\n    }\n    .ht-trend-desc .trend-icon2 {\n        background-position: -5px -2px;\n    }\n    .ht-trend-desc .trend-icon3 {\n        background-position: -4px -20px;\n    }\n    .ht-trend-desc .trend-icon-1 {\n      display: none;\n    }\n    #bdext_mb_bg .trend-icon2, #bdext_mb_bg .trend-icon3 {\n      background-position: 0px -109px;\n    }\n    #bdext_mb_bg .trend-icon0 {\n      background-position: 0px -84px;\n    }\n    #bdext_mb_bg .trend-icon1 {\n      background-position: 0px -57px;\n    }\n    #bdext_mb_bg .trend-icon-1 {\n      display: none;\n    }\n    .price-range {\n      position: absolute;\n      top: 8px;\n      right: 129px;\n      width: auto;\n      text-align: right;\n    }\n    .price-range span {\n      line-height: 20px;\n      font-size: 14px;\n      color: #505050;\n    }\n    .price-range .toppri {\n      color: #e64340;\n    }\n    .price-range .lowpri {\n      color: #0baa74;\n      margin-left: 14px;\n    }\n    .house-price-qrcode {\n      float: right;\n      height: 100%;\n      width: 123px;\n      text-align: center;\n      border-left: 1px solid #f0f0f0;\n    }\n    .house-price-qrcode span {\n      font-size: 14px;\n      float: left;\n      width: 100%;\n      height: 14px;\n      margin-bottom: 8px;\n      line-height: 14px!important;\n      text-align: center;\n      color: #353535;\n    }\n    .house-price-qrcode .mgtop {\n      margin-top: 51px;\n      margin-bottom: 10px;\n    }\n    .house-price-qrcode img {\n      display: inline-block!important;\n      width: 100px!important;\n      height: auto!important;\n      float: left;\n      margin-left: 11px;\n    }\n    .house-price-qrcode p {\n      font-size: 12px;\n      line-height: 12px;\n      margin-top: 5px;\n      float: left;\n      margin-left: 20px;\n    }\n    .house-price-qrcode p.house-p-p2{\n      margin-left: 32px;\n      margin-top: 8px;\n    }\n    #exchangeList .list-body>li {\n      overflow: visible;\n      height: 166px;\n    }\n    .house-basic-main {\n      overflow: visible;\n      height: 378px;\n    }\n    .';
    $$out += $escape(extBrand);
    $$out += '_lianjia .content  {\n      padding-bottom: 70px;\n    }\n    .house_lianjia2 .m-list li {\n      height: 214px;\n      overflow: visible;\n      position: relative;\n    }\n    .ht-wxqrcode {\n      position: absolute;\n      top: 32px;\n      right: 0px;\n      width: 124px;\n      height: 176px;\n      border: 1px solid #dadee1;\n      background-color: #fff;\n      z-index: 999999999999;\n      box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);\n      display: none;\n    }\n    .ht-wxqrcode * {\n      float: left;\n    }\n    .ht-wxqrcode span {\n      width: 100%;\n      height: 14px;\n      line-height: 14px;\n      font-size: 14px;\n      text-align: center;\n    }\n    .ht-wxqrcode img {\n      width: 100px!important;\n      height: 100px!important;\n      margin-top: 4px;\n      margin-left: 11px;\n    }\n    .ht-wx-sp1 {\n      margin-top: 10px;\n      color: #585858;\n    }\n    .ht-wx-sp2 {\n      margin-top: 8px;\n      color: #eb6862;\n    }\n    .ht-wx-sp3 {\n      color: #b2b2b2;\n      text-decoration: underline!important;\n      font-size: 12px!important;\n      cursor: pointer;\n    }\n\n    .community-price {\n      position: absolute;\n      height: 247px;\n      width: 452px;\n      top: 0px;\n      display: none;\n      background: #fff;\n    }\n    .change_trend_btn {\n      text-align: center;\n      position: absolute;\n      bottom: 16px;\n      width: 462px;\n      z-index: 99;\n    }\n    .change_trend_btn div {\n      margin: 0 auto;\n      display: inline-block;\n      width: auto;\n      height: 22px;\n    }\n    .change_trend_btn span {\n      float: left;\n      cursor: pointer;\n      height: 22px;\n      width: 80px;\n      font-size: 12px;\n      border: 1px solid #3ebdef;\n      border-radius: 20px;\n      color: #3ebdef;\n      margin-left: 70px;\n      line-height: 22px;\n      text-align: center;\n    }\n    .change_trend_btn span.trend-choose {\n      background-color: #3ebdef;\n      color: #fff;\n    }\n    .change_trend_btn .bjg-house-trend-b {\n      margin-left: 0px;\n    }\n    .pList li {\n      position: relative;\n      height: 195px;\n      overflow: visible!important;\n    }\n    .gwd_maitian .list_wrap ul li {\n      overflow: visible!important;\n    }\n    .gwd_maitian .house-trend-box {\n      float: left;\n    }\n    .houset-detail .community-price table {\n      width: auto!important;\n    }\n</style>';
    return $$out;
};

/***/ })
/******/ ]);