Commit 0dec546d authored by ms-dev's avatar ms-dev
Browse files

静态资源

parent 7cf2858e
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath?
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
wget "$jarUrl" -O "$wrapperJarPath"
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
curl -o "$wrapperJarPath" "$jarUrl"
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
echo Found %WRAPPER_JAR%
) else (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
echo Finished downloading %WRAPPER_JAR%
)
@REM End of extension
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
/**
* admin.css
*/
/*
fixed-layout 固定头部和边栏布局
*/
html,
body {
height: 100%;
overflow: hidden;
}
ul {
margin-top: 0;
}
.admin-icon-yellow {
color: #ffbe40;
}
.admin-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1500;
font-size: 1.4rem;
margin-bottom: 0;
}
.admin-header-list a:hover :after {
content: none;
}
.admin-main {
position: relative;
height: 100%;
padding-top: 51px;
background: #f3f3f3;
}
.admin-menu {
position: fixed;
z-index: 10;
bottom: 30px;
right: 20px;
}
.admin-sidebar {
width: 260px;
min-height: 100%;
float: left;
border-right: 1px solid #cecece;
}
.admin-sidebar.am-active {
z-index: 1600;
}
.admin-sidebar-list {
margin-bottom: 0;
}
.admin-sidebar-list li a {
color: #5c5c5c;
padding-left: 24px;
}
.admin-sidebar-list li:first-child {
border-top: none;
}
.admin-sidebar-sub {
margin-top: 0;
margin-bottom: 0;
box-shadow: 0 16px 8px -15px #e2e2e2 inset;
background: #ececec;
padding-left: 24px;
}
.admin-sidebar-sub li:first-child {
border-top: 1px solid #dedede;
}
.admin-sidebar-panel {
margin: 10px;
}
.admin-content {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
background: #fff;
}
.admin-content,
.admin-sidebar {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.admin-content-body {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.admin-content-footer {
font-size: 85%;
color: #777;
}
.admin-content-list {
border: 1px solid #e9ecf1;
margin-top: 0;
}
.admin-content-list li {
border: 1px solid #e9ecf1;
border-width: 0 1px;
margin-left: -1px;
}
.admin-content-list li:first-child {
border-left: none;
}
.admin-content-list li:last-child {
border-right: none;
}
.admin-content-table a {
color: #535353;
}
.admin-content-file {
margin-bottom: 0;
color: #666;
}
.admin-content-file p {
margin: 0 0 5px 0;
font-size: 1.4rem;
}
.admin-content-file li {
padding: 10px 0;
}
.admin-content-file li:first-child {
border-top: none;
}
.admin-content-file li:last-child {
border-bottom: none;
}
.admin-content-file li .am-progress {
margin-bottom: 4px;
}
.admin-content-file li .am-progress-bar {
line-height: 14px;
}
.admin-content-task {
margin-bottom: 0;
}
.admin-content-task li {
padding: 5px 0;
border-color: #eee;
}
.admin-content-task li:first-child {
border-top: none;
}
.admin-content-task li:last-child {
border-bottom: none;
}
.admin-task-meta {
font-size: 1.2rem;
color: #999;
}
.admin-task-bd {
font-size: 1.4rem;
margin-bottom: 5px;
}
.admin-content-comment {
margin-bottom: 0;
}
.admin-content-comment .am-comment-bd {
font-size: 1.4rem;
}
.admin-content-pagination {
margin-bottom: 0;
}
.admin-content-pagination li a {
padding: 4px 8px;
}
@media only screen and (min-width: 641px) {
.admin-sidebar {
display: block;
position: static;
background: none;
}
.admin-offcanvas-bar {
position: static;
width: auto;
background: none;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
overflow-y: visible;
min-height: 100%;
}
.admin-offcanvas-bar:after {
content: none;
}
}
@media only screen and (max-width: 640px) {
.admin-sidebar {
width: inherit;
}
.admin-offcanvas-bar {
background: #f3f3f3;
}
.admin-offcanvas-bar:after {
background: #BABABA;
}
.admin-sidebar-list a:hover, .admin-sidebar-list a:active{
-webkit-transition: background-color .3s ease;
-moz-transition: background-color .3s ease;
-ms-transition: background-color .3s ease;
-o-transition: background-color .3s ease;
transition: background-color .3s ease;
background: #E4E4E4;
}
.admin-content-list li {
padding: 10px;
border-width: 1px 0;
margin-top: -1px;
}
.admin-content-list li:first-child {
border-top: none;
}
.admin-content-list li:last-child {
border-bottom: none;
}
.admin-form-text {
text-align: left !important;
}
}
/*
* user.html css
*/
.user-info {
margin-bottom: 15px;
}
.user-info .am-progress {
margin-bottom: 4px;
}
.user-info p {
margin: 5px;
}
.user-info-order {
font-size: 1.4rem;
}
/*
* errorLog.html css
*/
.error-log .am-pre-scrollable {
max-height: 40rem;
}
/*
* table.html css
*/
.table-main {
font-size: 1.4rem;
padding: .5rem;
}
.table-main button {
background: #fff;
}
.table-check {
width: 30px;
}
.table-id {
width: 50px;
}
@media only screen and (max-width: 640px) {
.table-select {
margin-top: 10px;
margin-left: 5px;
}
}
/*
gallery.html css
*/
.gallery-list li {
padding: 10px;
}
.gallery-list a {
color: #666;
}
.gallery-list a:hover {
color: #3bb4f2;
}
.gallery-title {
margin-top: 6px;
font-size: 1.4rem;
}
.gallery-desc {
font-size: 1.2rem;
margin-top: 4px;
}
/*
404.html css
*/
.page-404 {
background: #fff;
border: none;
width: 200px;
margin: 0 auto;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Write your styles */
\ No newline at end of file
/*! Amaze UI v2.7.2 ~ IE8 Fucker | by Amaze UI Team | (c) 2016 AllMobilize, Inc. | Licensed under MIT | 2016-08-17T16:17:24+0800 */
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
// vim: ts=4 sts=4 sw=4 expandtab
// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
;
// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
'use strict';
/* global define, exports, module */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
/**
* Brings an environment as close to ECMAScript 5 compliance
* as is possible with the facilities of erstwhile engines.
*
* Annotated ES5: http://es5.github.com/ (specific links below)
* ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
* Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
*/
// Shortcut to an often accessed properties, in order to avoid multiple
// dereference that costs universally. This also holds a reference to known-good
// functions.
var $Array = Array;
var ArrayPrototype = $Array.prototype;
var $Object = Object;
var ObjectPrototype = $Object.prototype;
var $Function = Function;
var FunctionPrototype = $Function.prototype;
var $String = String;
var StringPrototype = $String.prototype;
var $Number = Number;
var NumberPrototype = $Number.prototype;
var array_slice = ArrayPrototype.slice;
var array_splice = ArrayPrototype.splice;
var array_push = ArrayPrototype.push;
var array_unshift = ArrayPrototype.unshift;
var array_concat = ArrayPrototype.concat;
var array_join = ArrayPrototype.join;
var call = FunctionPrototype.call;
var apply = FunctionPrototype.apply;
var max = Math.max;
var min = Math.min;
// Having a toString local variable name breaks in Opera so use to_string.
var to_string = ObjectPrototype.toString;
/* global Symbol */
/* eslint-disable one-var-declaration-per-line, no-redeclare */
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; };
var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; };
/* eslint-enable one-var-declaration-per-line, no-redeclare */
/* inlined from http://npmjs.com/define-properties */
var supportsDescriptors = $Object.defineProperty && (function () {
try {
var obj = {};
$Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
for (var _ in obj) { return false; }
return obj.x === obj;
} catch (e) { /* this is ES3 */
return false;
}
}());
var defineProperties = (function (has) {
// Define configurable, writable, and non-enumerable props
// if they don't exist.
var defineProperty;
if (supportsDescriptors) {
defineProperty = function (object, name, method, forceAssign) {
if (!forceAssign && (name in object)) { return; }
$Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
writable: true,
value: method
});
};
} else {
defineProperty = function (object, name, method, forceAssign) {
if (!forceAssign && (name in object)) { return; }
object[name] = method;
};
}
return function defineProperties(object, map, forceAssign) {
for (var name in map) {
if (has.call(map, name)) {
defineProperty(object, name, map[name], forceAssign);
}
}
};
}(ObjectPrototype.hasOwnProperty));
//
// Util
// ======
//
/* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */
var isPrimitive = function isPrimitive(input) {
var type = typeof input;
return input === null || (type !== 'object' && type !== 'function');
};
var isActualNaN = $Number.isNaN || function (x) { return x !== x; };
var ES = {
// ES5 9.4
// http://es5.github.com/#x9.4
// http://jsperf.com/to-integer
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */
ToInteger: function ToInteger(num) {
var n = +num;
if (isActualNaN(n)) {
n = 0;
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
return n;
},
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */
ToPrimitive: function ToPrimitive(input) {
var val, valueOf, toStr;
if (isPrimitive(input)) {
return input;
}
valueOf = input.valueOf;
if (isCallable(valueOf)) {
val = valueOf.call(input);
if (isPrimitive(val)) {
return val;
}
}
toStr = input.toString;
if (isCallable(toStr)) {
val = toStr.call(input);
if (isPrimitive(val)) {
return val;
}
}
throw new TypeError();
},
// ES5 9.9
// http://es5.github.com/#x9.9
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */
ToObject: function (o) {
if (o == null) { // this matches both null and undefined
throw new TypeError("can't convert " + o + ' to object');
}
return $Object(o);
},
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */
ToUint32: function ToUint32(x) {
return x >>> 0;
}
};
//
// Function
// ========
//
// ES-5 15.3.4.5
// http://es5.github.com/#x15.3.4.5
var Empty = function Empty() {};
defineProperties(FunctionPrototype, {
bind: function bind(that) { // .length is 1
// 1. Let Target be the this value.
var target = this;
// 2. If IsCallable(Target) is false, throw a TypeError exception.
if (!isCallable(target)) {
throw new TypeError('Function.prototype.bind called on incompatible ' + target);
}
// 3. Let A be a new (possibly empty) internal list of all of the
// argument values provided after thisArg (arg1, arg2 etc), in order.
// XXX slicedArgs will stand in for "A" if used
var args = array_slice.call(arguments, 1); // for normal call
// 4. Let F be a new native ECMAScript object.
// 11. Set the [[Prototype]] internal property of F to the standard
// built-in Function prototype object as specified in 15.3.3.1.
// 12. Set the [[Call]] internal property of F as described in
// 15.3.4.5.1.
// 13. Set the [[Construct]] internal property of F as described in
// 15.3.4.5.2.
// 14. Set the [[HasInstance]] internal property of F as described in
// 15.3.4.5.3.
var bound;
var binder = function () {
if (this instanceof bound) {
// 15.3.4.5.2 [[Construct]]
// When the [[Construct]] internal method of a function object,
// F that was created using the bind function is called with a
// list of arguments ExtraArgs, the following steps are taken:
// 1. Let target be the value of F's [[TargetFunction]]
// internal property.
// 2. If target has no [[Construct]] internal method, a
// TypeError exception is thrown.
// 3. Let boundArgs be the value of F's [[BoundArgs]] internal
// property.
// 4. Let args be a new list containing the same values as the
// list boundArgs in the same order followed by the same
// values as the list ExtraArgs in the same order.
// 5. Return the result of calling the [[Construct]] internal
// method of target providing args as the arguments.
var result = apply.call(
target,
this,
array_concat.call(args, array_slice.call(arguments))
);
if ($Object(result) === result) {
return result;
}
return this;
} else {
// 15.3.4.5.1 [[Call]]
// When the [[Call]] internal method of a function object, F,
// which was created using the bind function is called with a
// this value and a list of arguments ExtraArgs, the following
// steps are taken:
// 1. Let boundArgs be the value of F's [[BoundArgs]] internal
// property.
// 2. Let boundThis be the value of F's [[BoundThis]] internal
// property.
// 3. Let target be the value of F's [[TargetFunction]] internal
// property.
// 4. Let args be a new list containing the same values as the
// list boundArgs in the same order followed by the same
// values as the list ExtraArgs in the same order.
// 5. Return the result of calling the [[Call]] internal method
// of target providing boundThis as the this value and
// providing args as the arguments.
// equiv: target.call(this, ...boundArgs, ...args)
return apply.call(
target,
that,
array_concat.call(args, array_slice.call(arguments))
);
}
};
// 15. If the [[Class]] internal property of Target is "Function", then
// a. Let L be the length property of Target minus the length of A.
// b. Set the length own property of F to either 0 or L, whichever is
// larger.
// 16. Else set the length own property of F to 0.
var boundLength = max(0, target.length - args.length);
// 17. Set the attributes of the length own property of F to the values
// specified in 15.3.5.1.
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
array_push.call(boundArgs, '$' + i);
}
// XXX Build a dynamic function with desired amount of arguments is the only
// way to set the length property of a function.
// In environments where Content Security Policies enabled (Chrome extensions,
// for ex.) all use of eval or Function costructor throws an exception.
// However in all of these environments Function.prototype.bind exists
// and so this code will never be executed.
bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder);
if (target.prototype) {
Empty.prototype = target.prototype;
bound.prototype = new Empty();
// Clean up dangling references.
Empty.prototype = null;
}
// TODO
// 18. Set the [[Extensible]] internal property of F to true.
// TODO
// 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
// 20. Call the [[DefineOwnProperty]] internal method of F with
// arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
// thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
// false.
// 21. Call the [[DefineOwnProperty]] internal method of F with
// arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
// [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
// and false.
// TODO
// NOTE Function objects created using Function.prototype.bind do not
// have a prototype property or the [[Code]], [[FormalParameters]], and
// [[Scope]] internal properties.
// XXX can't delete prototype in pure-js.
// 22. Return F.
return bound;
}
});
// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
// use it in defining shortcuts.
var owns = call.bind(ObjectPrototype.hasOwnProperty);
var toStr = call.bind(ObjectPrototype.toString);
var arraySlice = call.bind(array_slice);
var arraySliceApply = apply.bind(array_slice);
var strSlice = call.bind(StringPrototype.slice);
var strSplit = call.bind(StringPrototype.split);
var strIndexOf = call.bind(StringPrototype.indexOf);
var pushCall = call.bind(array_push);
var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable);
var arraySort = call.bind(ArrayPrototype.sort);
//
// Array
// =====
//
var isArray = $Array.isArray || function isArray(obj) {
return toStr(obj) === '[object Array]';
};
// ES5 15.4.4.12
// http://es5.github.com/#x15.4.4.13
// Return len+argCount.
// [bugfix, ielt8]
// IE < 8 bug: [].unshift(0) === undefined but should be "1"
var hasUnshiftReturnValueBug = [].unshift(0) !== 1;
defineProperties(ArrayPrototype, {
unshift: function () {
array_unshift.apply(this, arguments);
return this.length;
}
}, hasUnshiftReturnValueBug);
// ES5 15.4.3.2
// http://es5.github.com/#x15.4.3.2
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
defineProperties($Array, { isArray: isArray });
// The IsCallable() check in the Array functions
// has been replaced with a strict check on the
// internal class of the object to trap cases where
// the provided function was actually a regular
// expression literal, which in V8 and
// JavaScriptCore is a typeof "function". Only in
// V8 are regular expression literals permitted as
// reduce parameters, so it is desirable in the
// general case for the shim to match the more
// strict and common behavior of rejecting regular
// expressions.
// ES5 15.4.4.18
// http://es5.github.com/#x15.4.4.18
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
// Check failure of by-index access of string characters (IE < 9)
// and failure of `0 in boxedString` (Rhino)
var boxedString = $Object('a');
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
var properlyBoxesContext = function properlyBoxed(method) {
// Check node 0.6.21 bug where third parameter is not boxed
var properlyBoxesNonStrict = true;
var properlyBoxesStrict = true;
var threwException = false;
if (method) {
try {
method.call('foo', function (_, __, context) {
if (typeof context !== 'object') { properlyBoxesNonStrict = false; }
});
method.call([1], function () {
'use strict';
properlyBoxesStrict = typeof this === 'string';
}, 'x');
} catch (e) {
threwException = true;
}
}
return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict;
};
defineProperties(ArrayPrototype, {
forEach: function forEach(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var i = -1;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.forEach callback must be a function');
}
while (++i < length) {
if (i in self) {
// Invoke the callback function with call, passing arguments:
// context, property value, property key, thisArg object
if (typeof T === 'undefined') {
callbackfn(self[i], i, object);
} else {
callbackfn.call(T, self[i], i, object);
}
}
}
}
}, !properlyBoxesContext(ArrayPrototype.forEach));
// ES5 15.4.4.19
// http://es5.github.com/#x15.4.4.19
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
defineProperties(ArrayPrototype, {
map: function map(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var result = $Array(length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.map callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self) {
if (typeof T === 'undefined') {
result[i] = callbackfn(self[i], i, object);
} else {
result[i] = callbackfn.call(T, self[i], i, object);
}
}
}
return result;
}
}, !properlyBoxesContext(ArrayPrototype.map));
// ES5 15.4.4.20
// http://es5.github.com/#x15.4.4.20
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
defineProperties(ArrayPrototype, {
filter: function filter(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var result = [];
var value;
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.filter callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self) {
value = self[i];
if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) {
pushCall(result, value);
}
}
}
return result;
}
}, !properlyBoxesContext(ArrayPrototype.filter));
// ES5 15.4.4.16
// http://es5.github.com/#x15.4.4.16
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
defineProperties(ArrayPrototype, {
every: function every(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.every callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
return false;
}
}
return true;
}
}, !properlyBoxesContext(ArrayPrototype.every));
// ES5 15.4.4.17
// http://es5.github.com/#x15.4.4.17
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
defineProperties(ArrayPrototype, {
some: function some(callbackfn/*, thisArg */) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.some callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
return true;
}
}
return false;
}
}, !properlyBoxesContext(ArrayPrototype.some));
// ES5 15.4.4.21
// http://es5.github.com/#x15.4.4.21
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
var reduceCoercesToObject = false;
if (ArrayPrototype.reduce) {
reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { return list; }) === 'object';
}
defineProperties(ArrayPrototype, {
reduce: function reduce(callbackfn/*, initialValue*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.reduce callback must be a function');
}
// no value to return if no initial value and an empty array
if (length === 0 && arguments.length === 1) {
throw new TypeError('reduce of empty array with no initial value');
}
var i = 0;
var result;
if (arguments.length >= 2) {
result = arguments[1];
} else {
do {
if (i in self) {
result = self[i++];
break;
}
// if array contains no values, no initial value to return
if (++i >= length) {
throw new TypeError('reduce of empty array with no initial value');
}
} while (true);
}
for (; i < length; i++) {
if (i in self) {
result = callbackfn(result, self[i], i, object);
}
}
return result;
}
}, !reduceCoercesToObject);
// ES5 15.4.4.22
// http://es5.github.com/#x15.4.4.22
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
var reduceRightCoercesToObject = false;
if (ArrayPrototype.reduceRight) {
reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { return list; }) === 'object';
}
defineProperties(ArrayPrototype, {
reduceRight: function reduceRight(callbackfn/*, initial*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.reduceRight callback must be a function');
}
// no value to return if no initial value, empty array
if (length === 0 && arguments.length === 1) {
throw new TypeError('reduceRight of empty array with no initial value');
}
var result;
var i = length - 1;
if (arguments.length >= 2) {
result = arguments[1];
} else {
do {
if (i in self) {
result = self[i--];
break;
}
// if array contains no values, no initial value to return
if (--i < 0) {
throw new TypeError('reduceRight of empty array with no initial value');
}
} while (true);
}
if (i < 0) {
return result;
}
do {
if (i in self) {
result = callbackfn(result, self[i], i, object);
}
} while (i--);
return result;
}
}, !reduceRightCoercesToObject);
// ES5 15.4.4.14
// http://es5.github.com/#x15.4.4.14
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
defineProperties(ArrayPrototype, {
indexOf: function indexOf(searchElement/*, fromIndex */) {
var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
var length = ES.ToUint32(self.length);
if (length === 0) {
return -1;
}
var i = 0;
if (arguments.length > 1) {
i = ES.ToInteger(arguments[1]);
}
// handle negative indices
i = i >= 0 ? i : max(0, length + i);
for (; i < length; i++) {
if (i in self && self[i] === searchElement) {
return i;
}
}
return -1;
}
}, hasFirefox2IndexOfBug);
// ES5 15.4.4.15
// http://es5.github.com/#x15.4.4.15
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1;
defineProperties(ArrayPrototype, {
lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) {
var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
var length = ES.ToUint32(self.length);
if (length === 0) {
return -1;
}
var i = length - 1;
if (arguments.length > 1) {
i = min(i, ES.ToInteger(arguments[1]));
}
// handle negative indices
i = i >= 0 ? i : length - Math.abs(i);
for (; i >= 0; i--) {
if (i in self && searchElement === self[i]) {
return i;
}
}
return -1;
}
}, hasFirefox2LastIndexOfBug);
// ES5 15.4.4.12
// http://es5.github.com/#x15.4.4.12
var spliceNoopReturnsEmptyArray = (function () {
var a = [1, 2];
var result = a.splice();
return a.length === 2 && isArray(result) && result.length === 0;
}());
defineProperties(ArrayPrototype, {
// Safari 5.0 bug where .splice() returns undefined
splice: function splice(start, deleteCount) {
if (arguments.length === 0) {
return [];
} else {
return array_splice.apply(this, arguments);
}
}
}, !spliceNoopReturnsEmptyArray);
var spliceWorksWithEmptyObject = (function () {
var obj = {};
ArrayPrototype.splice.call(obj, 0, 0, 1);
return obj.length === 1;
}());
defineProperties(ArrayPrototype, {
splice: function splice(start, deleteCount) {
if (arguments.length === 0) { return []; }
var args = arguments;
this.length = max(ES.ToInteger(this.length), 0);
if (arguments.length > 0 && typeof deleteCount !== 'number') {
args = arraySlice(arguments);
if (args.length < 2) {
pushCall(args, this.length - start);
} else {
args[1] = ES.ToInteger(deleteCount);
}
}
return array_splice.apply(this, args);
}
}, !spliceWorksWithEmptyObject);
var spliceWorksWithLargeSparseArrays = (function () {
// Per https://github.com/es-shims/es5-shim/issues/295
// Safari 7/8 breaks with sparse arrays of size 1e5 or greater
var arr = new $Array(1e5);
// note: the index MUST be 8 or larger or the test will false pass
arr[8] = 'x';
arr.splice(1, 1);
// note: this test must be defined *after* the indexOf shim
// per https://github.com/es-shims/es5-shim/issues/313
return arr.indexOf('x') === 7;
}());
var spliceWorksWithSmallSparseArrays = (function () {
// Per https://github.com/es-shims/es5-shim/issues/295
// Opera 12.15 breaks on this, no idea why.
var n = 256;
var arr = [];
arr[n] = 'a';
arr.splice(n + 1, 0, 'b');
return arr[n] === 'a';
}());
defineProperties(ArrayPrototype, {
splice: function splice(start, deleteCount) {
var O = ES.ToObject(this);
var A = [];
var len = ES.ToUint32(O.length);
var relativeStart = ES.ToInteger(start);
var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len);
var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart);
var k = 0;
var from;
while (k < actualDeleteCount) {
from = $String(actualStart + k);
if (owns(O, from)) {
A[k] = O[from];
}
k += 1;
}
var items = arraySlice(arguments, 2);
var itemCount = items.length;
var to;
if (itemCount < actualDeleteCount) {
k = actualStart;
var maxK = len - actualDeleteCount;
while (k < maxK) {
from = $String(k + actualDeleteCount);
to = $String(k + itemCount);
if (owns(O, from)) {
O[to] = O[from];
} else {
delete O[to];
}
k += 1;
}
k = len;
var minK = len - actualDeleteCount + itemCount;
while (k > minK) {
delete O[k - 1];
k -= 1;
}
} else if (itemCount > actualDeleteCount) {
k = len - actualDeleteCount;
while (k > actualStart) {
from = $String(k + actualDeleteCount - 1);
to = $String(k + itemCount - 1);
if (owns(O, from)) {
O[to] = O[from];
} else {
delete O[to];
}
k -= 1;
}
}
k = actualStart;
for (var i = 0; i < items.length; ++i) {
O[k] = items[i];
k += 1;
}
O.length = len - actualDeleteCount + itemCount;
return A;
}
}, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays);
var originalJoin = ArrayPrototype.join;
var hasStringJoinBug;
try {
hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3';
} catch (e) {
hasStringJoinBug = true;
}
if (hasStringJoinBug) {
defineProperties(ArrayPrototype, {
join: function join(separator) {
var sep = typeof separator === 'undefined' ? ',' : separator;
return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep);
}
}, hasStringJoinBug);
}
var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2';
if (hasJoinUndefinedBug) {
defineProperties(ArrayPrototype, {
join: function join(separator) {
var sep = typeof separator === 'undefined' ? ',' : separator;
return originalJoin.call(this, sep);
}
}, hasJoinUndefinedBug);
}
var pushShim = function push(item) {
var O = ES.ToObject(this);
var n = ES.ToUint32(O.length);
var i = 0;
while (i < arguments.length) {
O[n + i] = arguments[i];
i += 1;
}
O.length = n + i;
return n + i;
};
var pushIsNotGeneric = (function () {
var obj = {};
var result = Array.prototype.push.call(obj, undefined);
return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0);
}());
defineProperties(ArrayPrototype, {
push: function push(item) {
if (isArray(this)) {
return array_push.apply(this, arguments);
}
return pushShim.apply(this, arguments);
}
}, pushIsNotGeneric);
// This fixes a very weird bug in Opera 10.6 when pushing `undefined
var pushUndefinedIsWeird = (function () {
var arr = [];
var result = arr.push(undefined);
return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0);
}());
defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird);
// ES5 15.2.3.14
// http://es5.github.io/#x15.4.4.10
// Fix boxed string bug
defineProperties(ArrayPrototype, {
slice: function (start, end) {
var arr = isString(this) ? strSplit(this, '') : this;
return arraySliceApply(arr, arguments);
}
}, splitString);
var sortIgnoresNonFunctions = (function () {
try {
[1, 2].sort(null);
[1, 2].sort({});
return true;
} catch (e) { /**/ }
return false;
}());
var sortThrowsOnRegex = (function () {
// this is a problem in Firefox 4, in which `typeof /a/ === 'function'`
try {
[1, 2].sort(/a/);
return false;
} catch (e) { /**/ }
return true;
}());
var sortIgnoresUndefined = (function () {
// applies in IE 8, for one.
try {
[1, 2].sort(undefined);
return true;
} catch (e) { /**/ }
return false;
}());
defineProperties(ArrayPrototype, {
sort: function sort(compareFn) {
if (typeof compareFn === 'undefined') {
return arraySort(this);
}
if (!isCallable(compareFn)) {
throw new TypeError('Array.prototype.sort callback must be a function');
}
return arraySort(this, compareFn);
}
}, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex);
//
// Object
// ======
//
// ES5 15.2.3.14
// http://es5.github.com/#x15.2.3.14
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
var hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString');
var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
var hasStringEnumBug = !owns('x', '0');
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var blacklistedKeys = {
$window: true,
$console: true,
$parent: true,
$self: true,
$frame: true,
$frames: true,
$frameElement: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$external: true
};
var hasAutomationEqualityBug = (function () {
/* globals window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {
equalsConstructorPrototype(window[k]);
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (object) {
if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(object); }
try {
return equalsConstructorPrototype(object);
} catch (e) {
return false;
}
};
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var dontEnumsLength = dontEnums.length;
// taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js
// can be replaced with require('is-arguments') if we ever use a build process instead
var isStandardArguments = function isArguments(value) {
return toStr(value) === '[object Arguments]';
};
var isLegacyArguments = function isArguments(value) {
return value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
!isArray(value) &&
isCallable(value.callee);
};
var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;
defineProperties($Object, {
keys: function keys(object) {
var isFn = isCallable(object);
var isArgs = isArguments(object);
var isObject = object !== null && typeof object === 'object';
var isStr = isObject && isString(object);
if (!isObject && !isFn && !isArgs) {
throw new TypeError('Object.keys called on a non-object');
}
var theKeys = [];
var skipProto = hasProtoEnumBug && isFn;
if ((isStr && hasStringEnumBug) || isArgs) {
for (var i = 0; i < object.length; ++i) {
pushCall(theKeys, $String(i));
}
}
if (!isArgs) {
for (var name in object) {
if (!(skipProto && name === 'prototype') && owns(object, name)) {
pushCall(theKeys, $String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var j = 0; j < dontEnumsLength; j++) {
var dontEnum = dontEnums[j];
if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) {
pushCall(theKeys, dontEnum);
}
}
}
return theKeys;
}
});
var keysWorksWithArguments = $Object.keys && (function () {
// Safari 5.0 bug
return $Object.keys(arguments).length === 2;
}(1, 2));
var keysHasArgumentsLengthBug = $Object.keys && (function () {
var argKeys = $Object.keys(arguments);
return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1;
}(1));
var originalKeys = $Object.keys;
defineProperties($Object, {
keys: function keys(object) {
if (isArguments(object)) {
return originalKeys(arraySlice(object));
} else {
return originalKeys(object);
}
}
}, !keysWorksWithArguments || keysHasArgumentsLengthBug);
//
// Date
// ====
//
var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0;
var aNegativeTestDate = new Date(-1509842289600292);
var aPositiveTestDate = new Date(1449662400000);
var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT';
var hasToDateStringFormatBug;
var hasToStringFormatBug;
var timeZoneOffset = aNegativeTestDate.getTimezoneOffset();
if (timeZoneOffset < -720) {
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875';
hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
} else {
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875';
hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
}
var originalGetFullYear = call.bind(Date.prototype.getFullYear);
var originalGetMonth = call.bind(Date.prototype.getMonth);
var originalGetDate = call.bind(Date.prototype.getDate);
var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear);
var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth);
var originalGetUTCDate = call.bind(Date.prototype.getUTCDate);
var originalGetUTCDay = call.bind(Date.prototype.getUTCDay);
var originalGetUTCHours = call.bind(Date.prototype.getUTCHours);
var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes);
var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds);
var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds);
var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var daysInMonth = function daysInMonth(month, year) {
return originalGetDate(new Date(year, month, 0));
};
defineProperties(Date.prototype, {
getFullYear: function getFullYear() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
if (year < 0 && originalGetMonth(this) > 11) {
return year + 1;
}
return year;
},
getMonth: function getMonth() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
var month = originalGetMonth(this);
if (year < 0 && month > 11) {
return 0;
}
return month;
},
getDate: function getDate() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
var month = originalGetMonth(this);
var date = originalGetDate(this);
if (year < 0 && month > 11) {
if (month === 12) {
return date;
}
var days = daysInMonth(0, year + 1);
return (days - date) + 1;
}
return date;
},
getUTCFullYear: function getUTCFullYear() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
if (year < 0 && originalGetUTCMonth(this) > 11) {
return year + 1;
}
return year;
},
getUTCMonth: function getUTCMonth() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
if (year < 0 && month > 11) {
return 0;
}
return month;
},
getUTCDate: function getUTCDate() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
var date = originalGetUTCDate(this);
if (year < 0 && month > 11) {
if (month === 12) {
return date;
}
var days = daysInMonth(0, year + 1);
return (days - date) + 1;
}
return date;
}
}, hasNegativeMonthYearBug);
defineProperties(Date.prototype, {
toUTCString: function toUTCString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = originalGetUTCDay(this);
var date = originalGetUTCDate(this);
var month = originalGetUTCMonth(this);
var year = originalGetUTCFullYear(this);
var hour = originalGetUTCHours(this);
var minute = originalGetUTCMinutes(this);
var second = originalGetUTCSeconds(this);
return dayName[day] + ', ' +
(date < 10 ? '0' + date : date) + ' ' +
monthName[month] + ' ' +
year + ' ' +
(hour < 10 ? '0' + hour : hour) + ':' +
(minute < 10 ? '0' + minute : minute) + ':' +
(second < 10 ? '0' + second : second) + ' GMT';
}
}, hasNegativeMonthYearBug || hasToUTCStringFormatBug);
// Opera 12 has `,`
defineProperties(Date.prototype, {
toDateString: function toDateString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = this.getDay();
var date = this.getDate();
var month = this.getMonth();
var year = this.getFullYear();
return dayName[day] + ' ' +
monthName[month] + ' ' +
(date < 10 ? '0' + date : date) + ' ' +
year;
}
}, hasNegativeMonthYearBug || hasToDateStringFormatBug);
// can't use defineProperties here because of toString enumeration issue in IE <= 8
if (hasNegativeMonthYearBug || hasToStringFormatBug) {
Date.prototype.toString = function toString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = this.getDay();
var date = this.getDate();
var month = this.getMonth();
var year = this.getFullYear();
var hour = this.getHours();
var minute = this.getMinutes();
var second = this.getSeconds();
var timezoneOffset = this.getTimezoneOffset();
var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60);
var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60);
return dayName[day] + ' ' +
monthName[month] + ' ' +
(date < 10 ? '0' + date : date) + ' ' +
year + ' ' +
(hour < 10 ? '0' + hour : hour) + ':' +
(minute < 10 ? '0' + minute : minute) + ':' +
(second < 10 ? '0' + second : second) + ' GMT' +
(timezoneOffset > 0 ? '-' : '+') +
(hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) +
(minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);
};
if (supportsDescriptors) {
$Object.defineProperty(Date.prototype, 'toString', {
configurable: true,
enumerable: false,
writable: true
});
}
}
// ES5 15.9.5.43
// http://es5.github.com/#x15.9.5.43
// This function returns a String value represent the instance in time
// represented by this Date object. The format of the String is the Date Time
// string format defined in 15.9.1.15. All fields are present in the String.
// The time zone is always UTC, denoted by the suffix Z. If the time value of
// this object is not a finite Number a RangeError exception is thrown.
var negativeDate = -62198755200000;
var negativeYearString = '-000001';
var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1;
var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z';
var getTime = call.bind(Date.prototype.getTime);
defineProperties(Date.prototype, {
toISOString: function toISOString() {
if (!isFinite(this) || !isFinite(getTime(this))) {
// Adope Photoshop requires the second check.
throw new RangeError('Date.prototype.toISOString called on non-finite value.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
// see https://github.com/es-shims/es5-shim/issues/111
year += Math.floor(month / 12);
month = (month % 12 + 12) % 12;
// the date time string format is specified in 15.9.1.15.
var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)];
year = (
(year < 0 ? '-' : (year > 9999 ? '+' : '')) +
strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)
);
for (var i = 0; i < result.length; ++i) {
// pad months, days, hours, minutes, and seconds to have two digits.
result[i] = strSlice('00' + result[i], -2);
}
// pad milliseconds to have three digits.
return (
year + '-' + arraySlice(result, 0, 2).join('-') +
'T' + arraySlice(result, 2).join(':') + '.' +
strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'
);
}
}, hasNegativeDateBug || hasSafari51DateBug);
// ES5 15.9.5.44
// http://es5.github.com/#x15.9.5.44
// This function provides a String representation of a Date object for use by
// JSON.stringify (15.12.3).
var dateToJSONIsSupported = (function () {
try {
return Date.prototype.toJSON &&
new Date(NaN).toJSON() === null &&
new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&
Date.prototype.toJSON.call({ // generic
toISOString: function () { return true; }
});
} catch (e) {
return false;
}
}());
if (!dateToJSONIsSupported) {
Date.prototype.toJSON = function toJSON(key) {
// When the toJSON method is called with argument key, the following
// steps are taken:
// 1. Let O be the result of calling ToObject, giving it the this
// value as its argument.
// 2. Let tv be ES.ToPrimitive(O, hint Number).
var O = $Object(this);
var tv = ES.ToPrimitive(O);
// 3. If tv is a Number and is not finite, return null.
if (typeof tv === 'number' && !isFinite(tv)) {
return null;
}
// 4. Let toISO be the result of calling the [[Get]] internal method of
// O with argument "toISOString".
var toISO = O.toISOString;
// 5. If IsCallable(toISO) is false, throw a TypeError exception.
if (!isCallable(toISO)) {
throw new TypeError('toISOString property is not callable');
}
// 6. Return the result of calling the [[Call]] internal method of
// toISO with O as the this value and an empty argument list.
return toISO.call(O);
// NOTE 1 The argument is ignored.
// NOTE 2 The toJSON function is intentionally generic; it does not
// require that its this value be a Date object. Therefore, it can be
// transferred to other kinds of objects for use as a method. However,
// it does require that any such object have a toISOString method. An
// object is free to use the argument key to filter its
// stringification.
};
}
// ES5 15.9.4.2
// http://es5.github.com/#x15.9.4.2
// based on work shared by Daniel Friesen (dantman)
// http://gist.github.com/303249
var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15;
var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z'));
var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z'));
if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {
// XXX global assignment won't work in embeddings that use
// an alternate object for the context.
/* global Date: true */
/* eslint-disable no-undef */
var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1;
var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime());
/* eslint-disable no-implicit-globals */
Date = (function (NativeDate) {
/* eslint-enable no-implicit-globals */
/* eslint-enable no-undef */
// Date.length === 7
var DateShim = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
var date;
if (this instanceof NativeDate) {
var seconds = s;
var millis = ms;
if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) {
// work around a Safari 8/9 bug where it treats the seconds as signed
var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
var sToShift = Math.floor(msToShift / 1e3);
seconds += sToShift;
millis -= sToShift * 1e3;
}
date = length === 1 && $String(Y) === Y ? // isString(Y)
// We explicitly pass it through parse:
new NativeDate(DateShim.parse(Y)) :
// We have to manually make calls depending on argument
// length here
length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) :
length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) :
length >= 5 ? new NativeDate(Y, M, D, h, m) :
length >= 4 ? new NativeDate(Y, M, D, h) :
length >= 3 ? new NativeDate(Y, M, D) :
length >= 2 ? new NativeDate(Y, M) :
length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) :
new NativeDate();
} else {
date = NativeDate.apply(this, arguments);
}
if (!isPrimitive(date)) {
// Prevent mixups with unfixed Date object
defineProperties(date, { constructor: DateShim }, true);
}
return date;
};
// 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp('^' +
'(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign +
// 6-digit extended year
'(?:-(\\d{2})' + // optional month capture
'(?:-(\\d{2})' + // optional day capture
'(?:' + // capture hours:minutes:seconds.milliseconds
'T(\\d{2})' + // hours capture
':(\\d{2})' + // minutes capture
'(?:' + // optional :seconds.milliseconds
':(\\d{2})' + // seconds capture
'(?:(\\.\\d{1,}))?' + // milliseconds capture
')?' +
'(' + // capture UTC offset component
'Z|' + // UTC capture
'(?:' + // offset specifier +/-hours:minutes
'([-+])' + // sign capture
'(\\d{2})' + // hours offset capture
':(\\d{2})' + // minutes offset capture
')' +
')?)?)?)?' +
'$');
var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
var dayFromMonth = function dayFromMonth(year, month) {
var t = month > 1 ? 1 : 0;
return (
months[month] +
Math.floor((year - 1969 + t) / 4) -
Math.floor((year - 1901 + t) / 100) +
Math.floor((year - 1601 + t) / 400) +
365 * (year - 1970)
);
};
var toUTC = function toUTC(t) {
var s = 0;
var ms = t;
if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) {
// work around a Safari 8/9 bug where it treats the seconds as signed
var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
var sToShift = Math.floor(msToShift / 1e3);
s += sToShift;
ms -= sToShift * 1e3;
}
return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms));
};
// Copy any custom methods a 3rd party library may have added
for (var key in NativeDate) {
if (owns(NativeDate, key)) {
DateShim[key] = NativeDate[key];
}
}
// Copy "native" methods explicitly; they may be non-enumerable
defineProperties(DateShim, {
now: NativeDate.now,
UTC: NativeDate.UTC
}, true);
DateShim.prototype = NativeDate.prototype;
defineProperties(DateShim.prototype, {
constructor: DateShim
}, true);
// Upgrade Date.parse to handle simplified ISO 8601 strings
var parseShim = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
// parse months, days, hours, minutes, seconds, and milliseconds
// provide default values if necessary
// parse the UTC offset component
var year = $Number(match[1]),
month = $Number(match[2] || 1) - 1,
day = $Number(match[3] || 1) - 1,
hour = $Number(match[4] || 0),
minute = $Number(match[5] || 0),
second = $Number(match[6] || 0),
millisecond = Math.floor($Number(match[7] || 0) * 1000),
// When time zone is missed, local offset should be used
// (ES 5.1 bug)
// see https://bugs.ecmascript.org/show_bug.cgi?id=112
isLocalTime = Boolean(match[4] && !match[8]),
signOffset = match[9] === '-' ? 1 : -1,
hourOffset = $Number(match[10] || 0),
minuteOffset = $Number(match[11] || 0),
result;
var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0;
if (
hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&
minute < 60 && second < 60 && millisecond < 1000 &&
month > -1 && month < 12 && hourOffset < 24 &&
minuteOffset < 60 && // detect invalid offsets
day > -1 &&
day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))
) {
result = (
(dayFromMonth(year, month) + day) * 24 +
hour +
hourOffset * signOffset
) * 60;
result = (
(result + minute + minuteOffset * signOffset) * 60 +
second
) * 1000 + millisecond;
if (isLocalTime) {
result = toUTC(result);
}
if (-8.64e15 <= result && result <= 8.64e15) {
return result;
}
}
return NaN;
}
return NativeDate.parse.apply(this, arguments);
};
defineProperties(DateShim, { parse: parseShim });
return DateShim;
}(Date));
/* global Date: false */
}
// ES5 15.9.4.4
// http://es5.github.com/#x15.9.4.4
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
//
// Number
// ======
//
// ES5.1 15.7.4.5
// http://es5.github.com/#x15.7.4.5
var hasToFixedBugs = NumberPrototype.toFixed && (
(0.00008).toFixed(3) !== '0.000' ||
(0.9).toFixed(0) !== '1' ||
(1.255).toFixed(2) !== '1.25' ||
(1000000000000000128).toFixed(0) !== '1000000000000000128'
);
var toFixedHelpers = {
base: 1e7,
size: 6,
data: [0, 0, 0, 0, 0, 0],
multiply: function multiply(n, c) {
var i = -1;
var c2 = c;
while (++i < toFixedHelpers.size) {
c2 += n * toFixedHelpers.data[i];
toFixedHelpers.data[i] = c2 % toFixedHelpers.base;
c2 = Math.floor(c2 / toFixedHelpers.base);
}
},
divide: function divide(n) {
var i = toFixedHelpers.size;
var c = 0;
while (--i >= 0) {
c += toFixedHelpers.data[i];
toFixedHelpers.data[i] = Math.floor(c / n);
c = (c % n) * toFixedHelpers.base;
}
},
numToString: function numToString() {
var i = toFixedHelpers.size;
var s = '';
while (--i >= 0) {
if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) {
var t = $String(toFixedHelpers.data[i]);
if (s === '') {
s = t;
} else {
s += strSlice('0000000', 0, 7 - t.length) + t;
}
}
}
return s;
},
pow: function pow(x, n, acc) {
return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc)));
},
log: function log(x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
}
return n;
}
};
var toFixedShim = function toFixed(fractionDigits) {
var f, x, s, m, e, z, j, k;
// Test for NaN and round fractionDigits down
f = $Number(fractionDigits);
f = isActualNaN(f) ? 0 : Math.floor(f);
if (f < 0 || f > 20) {
throw new RangeError('Number.toFixed called with invalid number of decimals');
}
x = $Number(this);
if (isActualNaN(x)) {
return 'NaN';
}
// If it is too big or small, return the string value of the number
if (x <= -1e21 || x >= 1e21) {
return $String(x);
}
s = '';
if (x < 0) {
s = '-';
x = -x;
}
m = '0';
if (x > 1e-21) {
// 1e-21 < x < 1e21
// -70 < log2(x) < 70
e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69;
z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1));
z *= 0x10000000000000; // Math.pow(2, 52);
e = 52 - e;
// -18 < e < 122
// x = z / 2 ^ e
if (e > 0) {
toFixedHelpers.multiply(0, z);
j = f;
while (j >= 7) {
toFixedHelpers.multiply(1e7, 0);
j -= 7;
}
toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
toFixedHelpers.divide(1 << 23);
j -= 23;
}
toFixedHelpers.divide(1 << j);
toFixedHelpers.multiply(1, 1);
toFixedHelpers.divide(2);
m = toFixedHelpers.numToString();
} else {
toFixedHelpers.multiply(0, z);
toFixedHelpers.multiply(1 << (-e), 0);
m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f);
}
}
if (f > 0) {
k = m.length;
if (k <= f) {
m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m;
} else {
m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f);
}
} else {
m = s + m;
}
return m;
};
defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs);
var hasToPrecisionUndefinedBug = (function () {
try {
return 1.0.toPrecision(undefined) === '1';
} catch (e) {
return true;
}
}());
var originalToPrecision = NumberPrototype.toPrecision;
defineProperties(NumberPrototype, {
toPrecision: function toPrecision(precision) {
return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision);
}
}, hasToPrecisionUndefinedBug);
//
// String
// ======
//
// ES5 15.5.4.14
// http://es5.github.com/#x15.5.4.14
// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
// Many browsers do not split properly with regular expressions or they
// do not perform the split correctly under obscure conditions.
// See http://blog.stevenlevithan.com/archives/cross-browser-split
// I've tested in many browsers and this seems to cover the deviant ones:
// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
// [undefined, "t", undefined, "e", ...]
// ''.split(/.?/) should be [], not [""]
// '.'.split(/()()/) should be ["."], not ["", "", "."]
if (
'ab'.split(/(?:ab)*/).length !== 2 ||
'.'.split(/(.?)(.?)/).length !== 4 ||
'tesst'.split(/(s)*/)[1] === 't' ||
'test'.split(/(?:)/, -1).length !== 4 ||
''.split(/.?/).length ||
'.'.split(/()()/).length > 1
) {
(function () {
var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group
var maxSafe32BitInt = Math.pow(2, 32) - 1;
StringPrototype.split = function (separator, limit) {
var string = String(this);
if (typeof separator === 'undefined' && limit === 0) {
return [];
}
// If `separator` is not a regex, use native split
if (!isRegex(separator)) {
return strSplit(this, separator, limit);
}
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') + // in ES6
(separator.sticky ? 'y' : ''), // Firefox 3+ and ES6
lastLastIndex = 0,
// Make `global` and avoid `lastIndex` issues by working with a copy
separator2, match, lastIndex, lastLength;
var separatorCopy = new RegExp(separator.source, flags + 'g');
if (!compliantExecNpcg) {
// Doesn't need flags gy, but they don't hurt
separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
}
/* Values for `limit`, per the spec:
* If undefined: 4294967295 // maxSafe32BitInt
* If 0, Infinity, or NaN: 0
* If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
* If negative number: 4294967296 - Math.floor(Math.abs(limit))
* If other: Type-convert, then use the above rules
*/
var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit);
match = separatorCopy.exec(string);
while (match) {
// `separatorCopy.lastIndex` is not reliable cross-browser
lastIndex = match.index + match[0].length;
if (lastIndex > lastLastIndex) {
pushCall(output, strSlice(string, lastLastIndex, match.index));
// Fix browsers whose `exec` methods don't consistently return `undefined` for
// nonparticipating capturing groups
if (!compliantExecNpcg && match.length > 1) {
/* eslint-disable no-loop-func */
match[0].replace(separator2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (typeof arguments[i] === 'undefined') {
match[i] = void 0;
}
}
});
/* eslint-enable no-loop-func */
}
if (match.length > 1 && match.index < string.length) {
array_push.apply(output, arraySlice(match, 1));
}
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= splitLimit) {
break;
}
}
if (separatorCopy.lastIndex === match.index) {
separatorCopy.lastIndex++; // Avoid an infinite loop
}
match = separatorCopy.exec(string);
}
if (lastLastIndex === string.length) {
if (lastLength || !separatorCopy.test('')) {
pushCall(output, '');
}
} else {
pushCall(output, strSlice(string, lastLastIndex));
}
return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output;
};
}());
// [bugfix, chrome]
// If separator is undefined, then the result array contains just one String,
// which is the this value (converted to a String). If limit is not undefined,
// then the output array is truncated so that it contains no more than limit
// elements.
// "0".split(undefined, 0) -> []
} else if ('0'.split(void 0, 0).length) {
StringPrototype.split = function split(separator, limit) {
if (typeof separator === 'undefined' && limit === 0) { return []; }
return strSplit(this, separator, limit);
};
}
var str_replace = StringPrototype.replace;
var replaceReportsGroupsCorrectly = (function () {
var groups = [];
'x'.replace(/x(.)?/g, function (match, group) {
pushCall(groups, group);
});
return groups.length === 1 && typeof groups[0] === 'undefined';
}());
if (!replaceReportsGroupsCorrectly) {
StringPrototype.replace = function replace(searchValue, replaceValue) {
var isFn = isCallable(replaceValue);
var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source);
if (!isFn || !hasCapturingGroups) {
return str_replace.call(this, searchValue, replaceValue);
} else {
var wrappedReplaceValue = function (match) {
var length = arguments.length;
var originalLastIndex = searchValue.lastIndex;
searchValue.lastIndex = 0;
var args = searchValue.exec(match) || [];
searchValue.lastIndex = originalLastIndex;
pushCall(args, arguments[length - 2], arguments[length - 1]);
return replaceValue.apply(this, args);
};
return str_replace.call(this, searchValue, wrappedReplaceValue);
}
};
}
// ECMA-262, 3rd B.2.3
// Not an ECMAScript standard, although ECMAScript 3rd Edition has a
// non-normative section suggesting uniform semantics and it should be
// normalized across all browsers
// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
var string_substr = StringPrototype.substr;
var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
defineProperties(StringPrototype, {
substr: function substr(start, length) {
var normalizedStart = start;
if (start < 0) {
normalizedStart = max(this.length + start, 0);
}
return string_substr.call(this, normalizedStart, length);
}
}, hasNegativeSubstrBug);
// ES5 15.5.4.20
// whitespace from: http://es5.github.io/#x15.5.4.20
var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' +
'\u2029\uFEFF';
var zeroWidth = '\u200b';
var wsRegexChars = '[' + ws + ']';
var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*');
var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$');
var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim());
defineProperties(StringPrototype, {
// http://blog.stevenlevithan.com/archives/faster-trim-javascript
// http://perfectionkills.com/whitespace-deviations/
trim: function trim() {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, '');
}
}, hasTrimWhitespaceBug);
var trim = call.bind(String.prototype.trim);
var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1;
defineProperties(StringPrototype, {
lastIndexOf: function lastIndexOf(searchString) {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
var S = $String(this);
var searchStr = $String(searchString);
var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN;
var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos);
var start = min(max(pos, 0), S.length);
var searchLen = searchStr.length;
var k = start + searchLen;
while (k > 0) {
k = max(0, k - searchLen);
var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr);
if (index !== -1) {
return k + index;
}
}
return -1;
}
}, hasLastIndexBug);
var originalLastIndexOf = StringPrototype.lastIndexOf;
defineProperties(StringPrototype, {
lastIndexOf: function lastIndexOf(searchString) {
return originalLastIndexOf.apply(this, arguments);
}
}, StringPrototype.lastIndexOf.length !== 1);
// ES-5 15.1.2.2
/* eslint-disable radix */
if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
/* eslint-enable radix */
/* global parseInt: true */
parseInt = (function (origParseInt) {
var hexRegex = /^[\-+]?0[xX]/;
return function parseInt(str, radix) {
var string = trim(str);
var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);
return origParseInt(string, defaultedRadix);
};
}(parseInt));
}
// https://es5.github.io/#x15.1.2.3
if (1 / parseFloat('-0') !== -Infinity) {
/* global parseFloat: true */
parseFloat = (function (origParseFloat) {
return function parseFloat(string) {
var inputString = trim(string);
var result = origParseFloat(inputString);
return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result;
};
}(parseFloat));
}
if (String(new RangeError('test')) !== 'RangeError: test') {
var errorToStringShim = function toString() {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
var name = this.name;
if (typeof name === 'undefined') {
name = 'Error';
} else if (typeof name !== 'string') {
name = $String(name);
}
var msg = this.message;
if (typeof msg === 'undefined') {
msg = '';
} else if (typeof msg !== 'string') {
msg = $String(msg);
}
if (!name) {
return msg;
}
if (!msg) {
return name;
}
return name + ': ' + msg;
};
// can't use defineProperties here because of toString enumeration issue in IE <= 8
Error.prototype.toString = errorToStringShim;
}
if (supportsDescriptors) {
var ensureNonEnumerable = function (obj, prop) {
if (isEnum(obj, prop)) {
var desc = Object.getOwnPropertyDescriptor(obj, prop);
desc.enumerable = false;
Object.defineProperty(obj, prop, desc);
}
};
ensureNonEnumerable(Error.prototype, 'message');
if (Error.prototype.message !== '') {
Error.prototype.message = '';
}
ensureNonEnumerable(Error.prototype, 'name');
}
if (String(/a/mig) !== '/a/gim') {
var regexToString = function toString() {
var str = '/' + this.source + '/';
if (this.global) {
str += 'g';
}
if (this.ignoreCase) {
str += 'i';
}
if (this.multiline) {
str += 'm';
}
return str;
};
// can't use defineProperties here because of toString enumeration issue in IE <= 8
RegExp.prototype.toString = regexToString;
}
}));
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
// vim: ts=4 sts=4 sw=4 expandtab
// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
;
// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
'use strict';
/* global define, exports, module */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
var call = Function.call;
var prototypeOfObject = Object.prototype;
var owns = call.bind(prototypeOfObject.hasOwnProperty);
var isEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable);
var toStr = call.bind(prototypeOfObject.toString);
// If JS engine supports accessors creating shortcuts.
var defineGetter;
var defineSetter;
var lookupGetter;
var lookupSetter;
var supportsAccessors = owns(prototypeOfObject, '__defineGetter__');
if (supportsAccessors) {
/* eslint-disable no-underscore-dangle */
defineGetter = call.bind(prototypeOfObject.__defineGetter__);
defineSetter = call.bind(prototypeOfObject.__defineSetter__);
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
/* eslint-enable no-underscore-dangle */
}
// ES5 15.2.3.2
// http://es5.github.com/#x15.2.3.2
if (!Object.getPrototypeOf) {
// https://github.com/es-shims/es5-shim/issues#issue/2
// http://ejohn.org/blog/objectgetprototypeof/
// recommended by fschaefer on github
//
// sure, and webreflection says ^_^
// ... this will nerever possibly return null
// ... Opera Mini breaks here with infinite loops
Object.getPrototypeOf = function getPrototypeOf(object) {
/* eslint-disable no-proto */
var proto = object.__proto__;
/* eslint-enable no-proto */
if (proto || proto === null) {
return proto;
} else if (toStr(object.constructor) === '[object Function]') {
return object.constructor.prototype;
} else if (object instanceof Object) {
return prototypeOfObject;
} else {
// Correctly return null for Objects created with `Object.create(null)`
// (shammed or native) or `{ __proto__: null}`. Also returns null for
// cross-realm objects on browsers that lack `__proto__` support (like
// IE <11), but that's the best we can do.
return null;
}
};
}
// ES5 15.2.3.3
// http://es5.github.com/#x15.2.3.3
var doesGetOwnPropertyDescriptorWork = function doesGetOwnPropertyDescriptorWork(object) {
try {
object.sentinel = 0;
return Object.getOwnPropertyDescriptor(object, 'sentinel').value === 0;
} catch (exception) {
return false;
}
};
// check whether getOwnPropertyDescriptor works if it's given. Otherwise, shim partially.
if (Object.defineProperty) {
var getOwnPropertyDescriptorWorksOnObject = doesGetOwnPropertyDescriptorWork({});
var getOwnPropertyDescriptorWorksOnDom = typeof document === 'undefined' ||
doesGetOwnPropertyDescriptorWork(document.createElement('div'));
if (!getOwnPropertyDescriptorWorksOnDom || !getOwnPropertyDescriptorWorksOnObject) {
var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor;
}
}
if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) {
var ERR_NON_OBJECT = 'Object.getOwnPropertyDescriptor called on a non-object: ';
/* eslint-disable no-proto */
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
throw new TypeError(ERR_NON_OBJECT + object);
}
// make a valiant attempt to use the real getOwnPropertyDescriptor
// for I8's DOM elements.
if (getOwnPropertyDescriptorFallback) {
try {
return getOwnPropertyDescriptorFallback.call(Object, object, property);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
var descriptor;
// If object does not owns property return undefined immediately.
if (!owns(object, property)) {
return descriptor;
}
// If object has a property then it's for sure `configurable`, and
// probably `enumerable`. Detect enumerability though.
descriptor = {
enumerable: isEnumerable(object, property),
configurable: true
};
// If JS engine supports accessor properties then property may be a
// getter or setter.
if (supportsAccessors) {
// Unfortunately `__lookupGetter__` will return a getter even
// if object has own non getter property along with a same named
// inherited getter. To avoid misbehavior we temporary remove
// `__proto__` so that `__lookupGetter__` will return getter only
// if it's owned by an object.
var prototype = object.__proto__;
var notPrototypeOfObject = object !== prototypeOfObject;
// avoid recursion problem, breaking in Opera Mini when
// Object.getOwnPropertyDescriptor(Object.prototype, 'toString')
// or any other Object.prototype accessor
if (notPrototypeOfObject) {
object.__proto__ = prototypeOfObject;
}
var getter = lookupGetter(object, property);
var setter = lookupSetter(object, property);
if (notPrototypeOfObject) {
// Once we have getter and setter we can put values back.
object.__proto__ = prototype;
}
if (getter || setter) {
if (getter) {
descriptor.get = getter;
}
if (setter) {
descriptor.set = setter;
}
// If it was accessor property we're done and return here
// in order to avoid adding `value` to the descriptor.
return descriptor;
}
}
// If we got this far we know that object has an own property that is
// not an accessor so we set it as a value and return descriptor.
descriptor.value = object[property];
descriptor.writable = true;
return descriptor;
};
/* eslint-enable no-proto */
}
// ES5 15.2.3.4
// http://es5.github.com/#x15.2.3.4
if (!Object.getOwnPropertyNames) {
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
return Object.keys(object);
};
}
// ES5 15.2.3.5
// http://es5.github.com/#x15.2.3.5
if (!Object.create) {
// Contributed by Brandon Benvie, October, 2012
var createEmpty;
var supportsProto = !({ __proto__: null } instanceof Object);
// the following produces false positives
// in Opera Mini => not a reliable check
// Object.prototype.__proto__ === null
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
/* global ActiveXObject */
var shouldUseActiveX = function shouldUseActiveX() {
// return early if document.domain not set
if (!document.domain) {
return false;
}
try {
return !!new ActiveXObject('htmlfile');
} catch (exception) {
return false;
}
};
// This supports IE8 when document.domain is used
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
var getEmptyViaActiveX = function getEmptyViaActiveX() {
var empty;
var xDoc;
xDoc = new ActiveXObject('htmlfile');
xDoc.write('<script><\/script>');
xDoc.close();
empty = xDoc.parentWindow.Object.prototype;
xDoc = null;
return empty;
};
// The original implementation using an iframe
// before the activex approach was added
// see https://github.com/es-shims/es5-shim/issues/150
var getEmptyViaIFrame = function getEmptyViaIFrame() {
var iframe = document.createElement('iframe');
var parent = document.body || document.documentElement;
var empty;
iframe.style.display = 'none';
parent.appendChild(iframe);
/* eslint-disable no-script-url */
iframe.src = 'javascript:';
/* eslint-enable no-script-url */
empty = iframe.contentWindow.Object.prototype;
parent.removeChild(iframe);
iframe = null;
return empty;
};
/* global document */
if (supportsProto || typeof document === 'undefined') {
createEmpty = function () {
return { __proto__: null };
};
} else {
// In old IE __proto__ can't be used to manually set `null`, nor does
// any other method exist to make an object that inherits from nothing,
// aside from Object.prototype itself. Instead, create a new global
// object and *steal* its Object.prototype and strip it bare. This is
// used as the prototype to create nullary objects.
createEmpty = function () {
// Determine which approach to use
// see https://github.com/es-shims/es5-shim/issues/150
var empty = shouldUseActiveX() ? getEmptyViaActiveX() : getEmptyViaIFrame();
delete empty.constructor;
delete empty.hasOwnProperty;
delete empty.propertyIsEnumerable;
delete empty.isPrototypeOf;
delete empty.toLocaleString;
delete empty.toString;
delete empty.valueOf;
var Empty = function Empty() {};
Empty.prototype = empty;
// short-circuit future calls
createEmpty = function () {
return new Empty();
};
return new Empty();
};
}
Object.create = function create(prototype, properties) {
var object;
var Type = function Type() {}; // An empty constructor.
if (prototype === null) {
object = createEmpty();
} else {
if (typeof prototype !== 'object' && typeof prototype !== 'function') {
// In the native implementation `parent` can be `null`
// OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc)
// Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object`
// like they are in modern browsers. Using `Object.create` on DOM elements
// is...err...probably inappropriate, but the native version allows for it.
throw new TypeError('Object prototype may only be an Object or null'); // same msg as Chrome
}
Type.prototype = prototype;
object = new Type();
// IE has no built-in implementation of `Object.getPrototypeOf`
// neither `__proto__`, but this manually setting `__proto__` will
// guarantee that `Object.getPrototypeOf` will work as expected with
// objects created using `Object.create`
/* eslint-disable no-proto */
object.__proto__ = prototype;
/* eslint-enable no-proto */
}
if (properties !== void 0) {
Object.defineProperties(object, properties);
}
return object;
};
}
// ES5 15.2.3.6
// http://es5.github.com/#x15.2.3.6
// Patch for WebKit and IE8 standard mode
// Designed by hax <hax.github.com>
// related issue: https://github.com/es-shims/es5-shim/issues#issue/5
// IE8 Reference:
// http://msdn.microsoft.com/en-us/library/dd282900.aspx
// http://msdn.microsoft.com/en-us/library/dd229916.aspx
// WebKit Bugs:
// https://bugs.webkit.org/show_bug.cgi?id=36423
var doesDefinePropertyWork = function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, 'sentinel', {});
return 'sentinel' in object;
} catch (exception) {
return false;
}
};
// check whether defineProperty works if it's given. Otherwise,
// shim partially.
if (Object.defineProperty) {
var definePropertyWorksOnObject = doesDefinePropertyWork({});
var definePropertyWorksOnDom = typeof document === 'undefined' ||
doesDefinePropertyWork(document.createElement('div'));
if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
var definePropertyFallback = Object.defineProperty,
definePropertiesFallback = Object.defineProperties;
}
}
if (!Object.defineProperty || definePropertyFallback) {
var ERR_NON_OBJECT_DESCRIPTOR = 'Property description must be an object: ';
var ERR_NON_OBJECT_TARGET = 'Object.defineProperty called on non-object: ';
var ERR_ACCESSORS_NOT_SUPPORTED = 'getters & setters can not be defined on this javascript engine';
Object.defineProperty = function defineProperty(object, property, descriptor) {
if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
}
if ((typeof descriptor !== 'object' && typeof descriptor !== 'function') || descriptor === null) {
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
}
// make a valiant attempt to use the real defineProperty
// for I8's DOM elements.
if (definePropertyFallback) {
try {
return definePropertyFallback.call(Object, object, property, descriptor);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
// If it's a data property.
if ('value' in descriptor) {
// fail silently if 'writable', 'enumerable', or 'configurable'
// are requested but not supported
/*
// alternate approach:
if ( // can't implement these features; allow false but not true
('writable' in descriptor && !descriptor.writable) ||
('enumerable' in descriptor && !descriptor.enumerable) ||
('configurable' in descriptor && !descriptor.configurable)
))
throw new RangeError(
'This implementation of Object.defineProperty does not support configurable, enumerable, or writable.'
);
*/
if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) {
// As accessors are supported only on engines implementing
// `__proto__` we can safely override `__proto__` while defining
// a property to make sure that we don't hit an inherited
// accessor.
/* eslint-disable no-proto */
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
// Deleting a property anyway since getter / setter may be
// defined on object itself.
delete object[property];
object[property] = descriptor.value;
// Setting original `__proto__` back now.
object.__proto__ = prototype;
/* eslint-enable no-proto */
} else {
object[property] = descriptor.value;
}
} else {
if (!supportsAccessors && (('get' in descriptor) || ('set' in descriptor))) {
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
}
// If we got that far then getters and setters can be defined !!
if ('get' in descriptor) {
defineGetter(object, property, descriptor.get);
}
if ('set' in descriptor) {
defineSetter(object, property, descriptor.set);
}
}
return object;
};
}
// ES5 15.2.3.7
// http://es5.github.com/#x15.2.3.7
if (!Object.defineProperties || definePropertiesFallback) {
Object.defineProperties = function defineProperties(object, properties) {
// make a valiant attempt to use the real defineProperties
if (definePropertiesFallback) {
try {
return definePropertiesFallback.call(Object, object, properties);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
Object.keys(properties).forEach(function (property) {
if (property !== '__proto__') {
Object.defineProperty(object, property, properties[property]);
}
});
return object;
};
}
// ES5 15.2.3.8
// http://es5.github.com/#x15.2.3.8
if (!Object.seal) {
Object.seal = function seal(object) {
if (Object(object) !== object) {
throw new TypeError('Object.seal can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// ES5 15.2.3.9
// http://es5.github.com/#x15.2.3.9
if (!Object.freeze) {
Object.freeze = function freeze(object) {
if (Object(object) !== object) {
throw new TypeError('Object.freeze can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// detect a Rhino bug and patch it
try {
Object.freeze(function () {});
} catch (exception) {
Object.freeze = (function (freezeObject) {
return function freeze(object) {
if (typeof object === 'function') {
return object;
} else {
return freezeObject(object);
}
};
}(Object.freeze));
}
// ES5 15.2.3.10
// http://es5.github.com/#x15.2.3.10
if (!Object.preventExtensions) {
Object.preventExtensions = function preventExtensions(object) {
if (Object(object) !== object) {
throw new TypeError('Object.preventExtensions can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// ES5 15.2.3.11
// http://es5.github.com/#x15.2.3.11
if (!Object.isSealed) {
Object.isSealed = function isSealed(object) {
if (Object(object) !== object) {
throw new TypeError('Object.isSealed can only be called on Objects.');
}
return false;
};
}
// ES5 15.2.3.12
// http://es5.github.com/#x15.2.3.12
if (!Object.isFrozen) {
Object.isFrozen = function isFrozen(object) {
if (Object(object) !== object) {
throw new TypeError('Object.isFrozen can only be called on Objects.');
}
return false;
};
}
// ES5 15.2.3.13
// http://es5.github.com/#x15.2.3.13
if (!Object.isExtensible) {
Object.isExtensible = function isExtensible(object) {
// 1. If Type(O) is not Object throw a TypeError exception.
if (Object(object) !== object) {
throw new TypeError('Object.isExtensible can only be called on Objects.');
}
// 2. Return the Boolean value of the [[Extensible]] internal property of O.
var name = '';
while (owns(object, name)) {
name += '?';
}
object[name] = true;
var returnValue = owns(object, name);
delete object[name];
return returnValue;
};
}
}));
// Console-polyfill. MIT license.
// https://github.com/paulmillr/console-polyfill
// Make it safe to do console.log() always.
(function(global) {
'use strict';
global.console = global.console || {};
var con = global.console;
var prop, method;
var empty = {};
var dummy = function() {};
var properties = 'memory'.split(',');
var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) if (!con[prop]) con[prop] = empty;
while (method = methods.pop()) if (typeof con[method] !== 'function') con[method] = dummy;
// Using `this` for web workers & supports Browserify / Webpack.
})(typeof window === 'undefined' ? this : window);
!window.addEventListener && (function (WindowPrototype, DocumentPrototype, ElementPrototype, addEventListener, removeEventListener, dispatchEvent, registry) {
WindowPrototype[addEventListener] = DocumentPrototype[addEventListener] = ElementPrototype[addEventListener] = function (type, listener) {
var target = this;
registry.unshift([target, type, listener, function (event) {
event.currentTarget = target;
event.preventDefault = function () { event.returnValue = false };
event.stopPropagation = function () { event.cancelBubble = true };
event.target = event.srcElement || target;
listener.call(target, event);
}]);
this.attachEvent("on" + type, registry[0][3]);
};
WindowPrototype[removeEventListener] = DocumentPrototype[removeEventListener] = ElementPrototype[removeEventListener] = function (type, listener) {
for (var index = 0, register; register = registry[index]; ++index) {
if (register[0] == this && register[1] == type && register[2] == listener) {
return this.detachEvent("on" + type, registry.splice(index, 1)[0][3]);
}
}
};
WindowPrototype[dispatchEvent] = DocumentPrototype[dispatchEvent] = ElementPrototype[dispatchEvent] = function (eventObject) {
return this.fireEvent("on" + eventObject.type, eventObject);
};
})(Window.prototype, HTMLDocument.prototype, Element.prototype, "addEventListener", "removeEventListener", "dispatchEvent", []);
/**
* Module: rem - v1.3.4
* Description: A polyfill to parse CSS links and rewrite pixel equivalents into head for non supporting browsers
* Date Built: 2014-07-02
* Copyright (c) 2014 | Chuck Carpenter <chuck.carpenter@me.com>,Lucas Serven <lserven@gmail.com>;
* @see https://github.com/chuckcarpenter/REM-unit-polyfill
**/
(function (window, undefined) {
"use strict";
// test for REM unit support
var cssremunit = function() {
var div = document.createElement( 'div' );
div.style.cssText = 'font-size: 1rem;';
return (/rem/).test(div.style.fontSize);
},
// filter returned links for stylesheets
isStyleSheet = function () {
var styles = document.getElementsByTagName('link'),
filteredLinks = [];
for ( var i = 0; i < styles.length; i++) {
if ( styles[i].rel.toLowerCase() === 'stylesheet' && styles[i].getAttribute('data-norem') === null ) {
filteredLinks.push( styles[i].href );
}
}
return filteredLinks;
},
processLinks = function () {
//prepare to match each link
for( var i = 0; i < links.length; i++ ){
xhr( links[i], storeCSS );
}
},
storeCSS = function ( response, link ) {
preCSS.push(response.responseText);
CSSLinks.push(link);
if( CSSLinks.length === links.length ){
for( var j = 0; j < CSSLinks.length; j++ ){
matchCSS( preCSS[j], CSSLinks[j] );
}
if( ( links = importLinks.slice(0) ).length > 0 ){ //after finishing all current links, set links equal to the new imports found
CSSLinks = [];
preCSS = [];
importLinks = [];
processLinks();
} else {
buildCSS();
}
}
},
matchCSS = function ( sheetCSS, link ) { // collect all of the rules from the xhr response texts and match them to a pattern
var clean = removeMediaQueries( sheetCSS ).replace(/\/\*[\s\S]*?\*\//g, ''), // remove MediaQueries and comments
pattern = /[\w\d\s\-\/\\\[\]:,.'"*()<>+~%#^$_=|@]+\{[\w\d\s\-\/\\%#:!;,.'"*()]+\d*\.?\d+rem[\w\d\s\-\/\\%#:!;,.'"*()]*\}/g, //find selectors that use rem in one or more of their rules
current = clean.match(pattern),
remPattern =/\d*\.?\d+rem/g,
remCurrent = clean.match(remPattern),
sheetPathPattern = /(.*\/)/,
sheetPath = sheetPathPattern.exec(link)[0], //relative path to css file specified in @import
importPattern = /@import (?:url\()?['"]?([^'\)"]*)['"]?\)?[^;]*/gm, //matches all @import variations outlined at: https://developer.mozilla.org/en-US/docs/Web/CSS/@import
importStatement;
while( (importStatement = importPattern.exec(sheetCSS)) !== null ){
if( importStatement[1].indexOf("/") === 0 ) { // check if the value of importStatement[1] is a root relative path, in which case it shouldn't be concatenated with sheetPath
importLinks.push( importStatement[1] );
} else {
importLinks.push( sheetPath + importStatement[1] );
}
}
if( current !== null && current.length !== 0 ){
found = found.concat( current ); // save all of the blocks of rules with rem in a property
foundProps = foundProps.concat( remCurrent ); // save all of the properties with rem
}
},
buildCSS = function () { // first build each individual rule from elements in the found array and then add it to the string of rules.
var pattern = /[\w\d\s\-\/\\%#:,.'"*()]+\d*\.?\d+rem[\w\d\s\-\/\\%#:!,.'"*()]*[;}]/g; // find properties with rem values in them
for( var i = 0; i < found.length; i++ ){
rules = rules + found[i].substr(0,found[i].indexOf("{")+1); // save the selector portion of each rule with a rem value
var current = found[i].match( pattern );
for( var j = 0; j<current.length; j++ ){ // build a new set of with only the selector and properties that have rem in the value
rules = rules + current[j];
if( j === current.length-1 && rules[rules.length-1] !== "}" ){
rules = rules + "\n}";
}
}
}
parseCSS();
},
parseCSS = function () { // replace each set of parentheses with evaluated content
for( var i = 0; i < foundProps.length; i++ ){
css[i] = Math.round( parseFloat(foundProps[i].substr(0,foundProps[i].length-3)*fontSize) ) + 'px';
}
loadCSS();
},
loadCSS = function () { // replace and load the new rules
for( var i = 0; i < css.length; i++ ){ // only run this loop as many times as css has entries
if( css[i] ){
rules = rules.replace( foundProps[i],css[i] ); // replace old rules with our processed rules
}
}
var remcss = document.createElement( 'style' );
remcss.setAttribute( 'type', 'text/css' );
remcss.id = 'remReplace';
document.getElementsByTagName( 'head' )[0].appendChild( remcss ); // create the new element
if( remcss.styleSheet ) {
remcss.styleSheet.cssText = rules; // IE8 will not support innerHTML on read-only elements, such as STYLE
} else {
remcss.appendChild( document.createTextNode( rules ) );
}
},
xhr = function ( url, callback ) { // create new XMLHttpRequest object and run it
try {
//try to create a request object
//arranging the two conditions this way is for IE7/8's benefit
//so that it works with any combination of ActiveX or Native XHR settings,
//as long as one or the other is enabled; but if both are enabled
//it prefers ActiveX, which means it still works with local files
//(Native XHR in IE7/8 is blocked and throws "access is denied",
// but ActiveX is permitted if the user allows it [default is to prompt])
var xhr = window.ActiveXObject ? ( new ActiveXObject('Microsoft.XMLHTTP') || new ActiveXObject('Msxml2.XMLHTTP') ) : new XMLHttpRequest();
xhr.open( 'GET', url, true );
xhr.onreadystatechange = function() {
if ( xhr.readyState === 4 ){
callback(xhr, url);
} // else { callback function on AJAX error }
};
xhr.send( null );
} catch (e){
if ( window.XDomainRequest ) {
var xdr = new XDomainRequest();
xdr.open('get', url);
xdr.onload = function() {
callback(xdr, url);
};
xdr.onerror = function() {
return false; // xdr load fail
};
xdr.send();
}
}
},
// Remove queries.
removeMediaQueries = function(css) {
// Test for Media Query support
if ( !window.matchMedia && !window.msMatchMedia ) {
// If the browser doesn't support media queries, we find all @media declarations in the CSS and remove them.
// Note: Since @rules can't be nested in the CSS spec, we're safe to just check for the closest following "}}" to the "@media".
css = css.replace(/@media[\s\S]*?\}\s*\}/g, "");
}
return css;
};
if( !cssremunit() ){ // this checks if the rem value is supported
var rules = '', // initialize the rules variable in this scope so it can be used later
links = isStyleSheet(), // initialize the array holding the sheets urls for use later
importLinks = [], //initialize the array holding the import sheet urls for use later
found = [], // initialize the array holding the found rules for use later
foundProps = [], // initialize the array holding the found properties for use later
preCSS = [], // initialize array that holds css before being parsed
CSSLinks = [], //initialize array holding css links returned from xhr
css = [], // initialize the array holding the parsed rules for use later
fontSize = '';
// Notice: rem is a "root em" that means that in case when html element size was changed by css
// or style we should not change document.documentElement.fontSize to 1em - only body size should be changed
// to 1em for calculation
fontSize = (function () {
var doc = document,
docElement = doc.documentElement,
body = doc.body || doc.createElement('body'),
isFakeBody = !doc.body,
div = doc.createElement('div'),
currentSize = body.style.fontSize,
size;
if ( isFakeBody ) {
docElement.appendChild( body );
}
div.style.cssText = 'width:1em; position:absolute; visibility:hidden; padding: 0;';
body.style.fontSize = '1em';
body.appendChild( div );
size = div.offsetWidth;
if ( isFakeBody ) {
docElement.removeChild( body );
}
else {
body.removeChild( div );
body.style.fontSize = currentSize;
}
return size;
}());
processLinks();
} // else { do nothing, you are awesome and have REM support }
})(window);
/*! Respond.js v1.4.2: min/max-width media query polyfill
* Copyright 2014 Scott Jehl
* Licensed under MIT
* http://j.mp/respondjs */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b<t.length;b++){var c=t[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!p[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(w(c.styleSheet.rawCssText,e,f),p[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!s||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}x()};y(),c.update=y,c.getEmValue=u,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
\ No newline at end of file
/*! Amaze UI v2.7.2 ~ IE8 Fucker | by Amaze UI Team | (c) 2016 AllMobilize, Inc. | Licensed under MIT | 2016-08-17T16:17:24+0800 */
!function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e,t,n=Array,r=n.prototype,o=Object,i=o.prototype,a=Function,c=a.prototype,s=String,u=s.prototype,l=Number,f=l.prototype,p=r.slice,h=r.splice,d=r.push,y=r.unshift,g=r.concat,v=r.join,b=c.call,m=c.apply,w=Math.max,O=Math.min,T=i.toString,j="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,x=Function.prototype.toString,E=/^\s*class /,S=function(e){try{var t=x.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),o=r.replace(/\n/gm," ").replace(/ {2}/g," ");return E.test(o)}catch(i){return!1}},D=function(e){try{return!S(e)&&(x.call(e),!0)}catch(t){return!1}},_="[object Function]",M="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(j)return D(e);if(S(e))return!1;var t=T.call(e);return t===_||t===M},P=RegExp.prototype.exec,I=function(e){try{return P.call(e),!0}catch(t){return!1}},C="[object RegExp]";t=function(e){return"object"==typeof e&&(j?I(e):T.call(e)===C)};var F,N=String.prototype.valueOf,k=function(e){try{return N.call(e),!0}catch(t){return!1}},z="[object String]";F=function(e){return"string"==typeof e||"object"==typeof e&&(j?k(e):T.call(e)===z)};var R=o.defineProperty&&function(){try{var e={};o.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),$=function(e){var t;return t=R?function(e,t,n,r){!r&&t in e||o.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,o){for(var i in r)e.call(r,i)&&t(n,i,r[i],o)}}(i.hasOwnProperty),U=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},A=l.isNaN||function(e){return e!==e},L={ToInteger:function(e){var t=+e;return A(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,o;if(U(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),U(n)))return n;if(o=t.toString,e(o)&&(n=o.call(t),U(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return o(e)},ToUint32:function(e){return e>>>0}},X=function(){};$(c,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,i=p.call(arguments,1),c=function(){if(this instanceof r){var e=m.call(n,this,g.call(i,p.call(arguments)));return o(e)===e?e:this}return m.call(n,t,g.call(i,p.call(arguments)))},s=w(0,n.length-i.length),u=[],l=0;l<s;l++)d.call(u,"$"+l);return r=a("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(c),n.prototype&&(X.prototype=n.prototype,r.prototype=new X,X.prototype=null),r}});var B=b.bind(i.hasOwnProperty),G=b.bind(i.toString),J=b.bind(p),q=m.bind(p),Z=b.bind(u.slice),H=b.bind(u.split),W=b.bind(u.indexOf),Y=b.bind(d),Q=b.bind(i.propertyIsEnumerable),V=b.bind(r.sort),K=n.isArray||function(e){return"[object Array]"===G(e)},ee=1!==[].unshift(0);$(r,{unshift:function(){return y.apply(this,arguments),this.length}},ee),$(n,{isArray:K});var te=o("a"),ne="a"!==te[0]||!(0 in te),re=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(o){r=!0}return!!e&&!r&&t&&n};$(r,{forEach:function(t){var n,r=L.ToObject(this),o=ne&&F(this)?H(this,""):r,i=-1,a=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i<a;)i in o&&("undefined"==typeof n?t(o[i],i,r):t.call(n,o[i],i,r))}},!re(r.forEach)),$(r,{map:function(t){var r,o=L.ToObject(this),i=ne&&F(this)?H(this,""):o,a=L.ToUint32(i.length),c=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var s=0;s<a;s++)s in i&&("undefined"==typeof r?c[s]=t(i[s],s,o):c[s]=t.call(r,i[s],s,o));return c}},!re(r.map)),$(r,{filter:function(t){var n,r,o=L.ToObject(this),i=ne&&F(this)?H(this,""):o,a=L.ToUint32(i.length),c=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var s=0;s<a;s++)s in i&&(n=i[s],("undefined"==typeof r?t(n,s,o):t.call(r,n,s,o))&&Y(c,n));return c}},!re(r.filter)),$(r,{every:function(t){var n,r=L.ToObject(this),o=ne&&F(this)?H(this,""):r,i=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a<i;a++)if(a in o&&!("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!1;return!0}},!re(r.every)),$(r,{some:function(t){var n,r=L.ToObject(this),o=ne&&F(this)?H(this,""):r,i=L.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a<i;a++)if(a in o&&("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!0;return!1}},!re(r.some));var oe=!1;r.reduce&&(oe="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),$(r,{reduce:function(t){var n=L.ToObject(this),r=ne&&F(this)?H(this,""):n,o=L.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;a<o;a++)a in r&&(i=t(i,r[a],a,n));return i}},!oe);var ie=!1;r.reduceRight&&(ie="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),$(r,{reduceRight:function(t){var n=L.ToObject(this),r=ne&&F(this)?H(this,""):n,o=L.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return i;do a in r&&(i=t(i,r[a],a,n));while(a--);return i}},!ie);var ae=r.indexOf&&[0,1].indexOf(1,2)!==-1;$(r,{indexOf:function(e){var t=ne&&F(this)?H(this,""):L.ToObject(this),n=L.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=L.ToInteger(arguments[1])),r=r>=0?r:w(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},ae);var ce=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;$(r,{lastIndexOf:function(e){var t=ne&&F(this)?H(this,""):L.ToObject(this),n=L.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=O(r,L.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},ce);var se=function(){var e=[1,2],t=e.splice();return 2===e.length&&K(t)&&0===t.length}();$(r,{splice:function(e,t){return 0===arguments.length?[]:h.apply(this,arguments)}},!se);var ue=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();$(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=w(L.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=J(arguments),n.length<2?Y(n,this.length-e):n[1]=L.ToInteger(t)),h.apply(this,n)}},!ue);var le=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),fe=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();$(r,{splice:function(e,t){for(var n,r=L.ToObject(this),o=[],i=L.ToUint32(r.length),a=L.ToInteger(e),c=a<0?w(i+a,0):O(a,i),u=O(w(L.ToInteger(t),0),i-c),l=0;l<u;)n=s(c+l),B(r,n)&&(o[l]=r[n]),l+=1;var f,p=J(arguments,2),h=p.length;if(h<u){l=c;for(var d=i-u;l<d;)n=s(l+u),f=s(l+h),B(r,n)?r[f]=r[n]:delete r[f],l+=1;l=i;for(var y=i-u+h;l>y;)delete r[l-1],l-=1}else if(h>u)for(l=i-u;l>c;)n=s(l+u-1),f=s(l+h-1),B(r,n)?r[f]=r[n]:delete r[f],l-=1;l=c;for(var g=0;g<p.length;++g)r[l]=p[g],l+=1;return r.length=i-u+h,o}},!le||!fe);var pe,he=r.join;try{pe="1,2,3"!==Array.prototype.join.call("123",",")}catch(de){pe=!0}pe&&$(r,{join:function(e){var t="undefined"==typeof e?",":e;return he.call(F(this)?H(this,""):this,t)}},pe);var ye="1,2"!==[1,2].join(void 0);ye&&$(r,{join:function(e){var t="undefined"==typeof e?",":e;return he.call(this,t)}},ye);var ge=function(e){for(var t=L.ToObject(this),n=L.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},ve=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!B(e,0)}();$(r,{push:function(e){return K(this)?d.apply(this,arguments):ge.apply(this,arguments)}},ve);var be=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!B(e,0)}();$(r,{push:ge},be),$(r,{slice:function(e,t){var n=F(this)?H(this,""):this;return q(n,arguments)}},ne);var me=function(){try{return[1,2].sort(null),[1,2].sort({}),!0}catch(e){}return!1}(),we=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Oe=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();$(r,{sort:function(t){if("undefined"==typeof t)return V(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return V(this,t)}},me||!Oe||!we);var Te=!{toString:null}.propertyIsEnumerable("toString"),je=function(){}.propertyIsEnumerable("prototype"),xe=!B("x","0"),Ee=function(e){var t=e.constructor;return t&&t.prototype===e},Se={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0},De=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!Se["$"+e]&&B(window,e)&&null!==window[e]&&"object"==typeof window[e]&&Ee(window[e])}catch(t){return!0}return!1}(),_e=function(e){if("undefined"==typeof window||!De)return Ee(e);try{return Ee(e)}catch(t){return!1}},Me=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Pe=Me.length,Ie=function(e){return"[object Arguments]"===G(e)},Ce=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!K(t)&&e(t.callee)},Fe=Ie(arguments)?Ie:Ce;$(o,{keys:function(t){var n=e(t),r=Fe(t),o=null!==t&&"object"==typeof t,i=o&&F(t);if(!o&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],c=je&&n;if(i&&xe||r)for(var u=0;u<t.length;++u)Y(a,s(u));if(!r)for(var l in t)c&&"prototype"===l||!B(t,l)||Y(a,s(l));if(Te)for(var f=_e(t),p=0;p<Pe;p++){var h=Me[p];f&&"constructor"===h||!B(t,h)||Y(a,h)}return a}});var Ne=o.keys&&function(){return 2===o.keys(arguments).length}(1,2),ke=o.keys&&function(){var e=o.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),ze=o.keys;$(o,{keys:function(e){return ze(Fe(e)?J(e):e)}},!Ne||ke);var Re,$e,Ue=0!==new Date((-0xc782b5b342b24)).getUTCMonth(),Ae=new Date((-0x55d318d56a724)),Le=new Date(14496624e5),Xe="Mon, 01 Jan -45875 11:59:59 GMT"!==Ae.toUTCString(),Be=Ae.getTimezoneOffset();Be<-720?(Re="Tue Jan 02 -45875"!==Ae.toDateString(),$e=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Le.toString())):(Re="Mon Jan 01 -45875"!==Ae.toDateString(),$e=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Le.toString()));var Ge=b.bind(Date.prototype.getFullYear),Je=b.bind(Date.prototype.getMonth),qe=b.bind(Date.prototype.getDate),Ze=b.bind(Date.prototype.getUTCFullYear),He=b.bind(Date.prototype.getUTCMonth),We=b.bind(Date.prototype.getUTCDate),Ye=b.bind(Date.prototype.getUTCDay),Qe=b.bind(Date.prototype.getUTCHours),Ve=b.bind(Date.prototype.getUTCMinutes),Ke=b.bind(Date.prototype.getUTCSeconds),et=b.bind(Date.prototype.getUTCMilliseconds),tt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rt=function(e,t){return qe(new Date(t,e,0))};$(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ge(this);return e<0&&Je(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ge(this),t=Je(this);return e<0&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ge(this),t=Je(this),n=qe(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ze(this);return e<0&&He(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ze(this),t=He(this);return e<0&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ze(this),t=He(this),n=We(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n}},Ue),$(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ye(this),t=We(this),n=He(this),r=Ze(this),o=Qe(this),i=Ve(this),a=Ke(this);return tt[e]+", "+(t<10?"0"+t:t)+" "+nt[n]+" "+r+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"}},Ue||Xe),$(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r}},Ue||Re),(Ue||$e)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),o=this.getHours(),i=this.getMinutes(),a=this.getSeconds(),c=this.getTimezoneOffset(),s=Math.floor(Math.abs(c)/60),u=Math.floor(Math.abs(c)%60);return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"+(c>0?"-":"+")+(s<10?"0"+s:s)+(u<10?"0"+u:u)},R&&o.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var ot=-621987552e5,it="-000001",at=Date.prototype.toISOString&&new Date(ot).toISOString().indexOf(it)===-1,ct=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date((-1)).toISOString(),st=b.bind(Date.prototype.getTime);$(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(st(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Ze(this),t=He(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,We(this),Qe(this),Ve(this),Ke(this)];e=(e<0?"-":e>9999?"+":"")+Z("00000"+Math.abs(e),0<=e&&e<=9999?-4:-6);for(var r=0;r<n.length;++r)n[r]=Z("00"+n[r],-2);return e+"-"+J(n,0,2).join("-")+"T"+J(n,2).join(":")+"."+Z("000"+et(this),-3)+"Z"}},at||ct);var ut=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&new Date(ot).toJSON().indexOf(it)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ut||(Date.prototype.toJSON=function(t){var n=o(this),r=L.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var i=n.toISOString;if(!e(i))throw new TypeError("toISOString property is not callable");return i.call(n)});var lt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),ft=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),pt=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(pt||ft||!lt){var ht=Math.pow(2,31)-1,dt=A(new Date(1970,0,1,0,0,0,ht+1).getTime());Date=function(e){var t=function(n,r,o,i,a,c,u){var l,f=arguments.length;if(this instanceof e){var p=c,h=u;if(dt&&f>=7&&u>ht){var d=Math.floor(u/ht)*ht,y=Math.floor(d/1e3);p+=y,h-=1e3*y}l=1===f&&s(n)===n?new e(t.parse(n)):f>=7?new e(n,r,o,i,a,p,h):f>=6?new e(n,r,o,i,a,p):f>=5?new e(n,r,o,i,a):f>=4?new e(n,r,o,i):f>=3?new e(n,r,o):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else l=e.apply(this,arguments);return U(l)||$(l,{constructor:t},!0),l},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},i=function(t){var n=0,r=t;if(dt&&r>ht){var o=Math.floor(r/ht)*ht,i=Math.floor(o/1e3);n+=i,r-=1e3*i}return l(new e(1970,0,1,0,0,n,r))};for(var a in e)B(e,a)&&(t[a]=e[a]);$(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,$(t.prototype,{constructor:t},!0);var c=function(t){var r=n.exec(t);if(r){var a,c=l(r[1]),s=l(r[2]||1)-1,u=l(r[3]||1)-1,f=l(r[4]||0),p=l(r[5]||0),h=l(r[6]||0),d=Math.floor(1e3*l(r[7]||0)),y=Boolean(r[4]&&!r[8]),g="-"===r[9]?1:-1,v=l(r[10]||0),b=l(r[11]||0),m=p>0||h>0||d>0;return f<(m?24:25)&&p<60&&h<60&&d<1e3&&s>-1&&s<12&&v<24&&b<60&&u>-1&&u<o(c,s+1)-o(c,s)&&(a=60*(24*(o(c,s)+u)+f+v*g),a=1e3*(60*(a+p+b*g)+h)+d,y&&(a=i(a)),-864e13<=a&&a<=864e13)?a:NaN}return e.parse.apply(this,arguments)};return $(t,{parse:c}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var yt=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),gt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<gt.size;)r+=e*gt.data[n],gt.data[n]=r%gt.base,r=Math.floor(r/gt.base)},divide:function(e){for(var t=gt.size,n=0;--t>=0;)n+=gt.data[t],gt.data[t]=Math.floor(n/e),n=n%e*gt.base},numToString:function(){for(var e=gt.size,t="";--e>=0;)if(""!==t||0===e||0!==gt.data[e]){var n=s(gt.data[e]);""===t?t=n:t+=Z("0000000",0,7-n.length)+n}return t},pow:function zt(e,t,n){return 0===t?n:t%2===1?zt(e,t-1,n*e):zt(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},vt=function(e){var t,n,r,o,i,a,c,u;if(t=l(e),t=A(t)?0:Math.floor(t),t<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),A(n))return"NaN";if(n<=-1e21||n>=1e21)return s(n);if(r="",n<0&&(r="-",n=-n),o="0",n>1e-21)if(i=gt.log(n*gt.pow(2,69,1))-69,a=i<0?n*gt.pow(2,-i,1):n/gt.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(gt.multiply(0,a),c=t;c>=7;)gt.multiply(1e7,0),c-=7;for(gt.multiply(gt.pow(10,c,1),0),c=i-1;c>=23;)gt.divide(1<<23),c-=23;gt.divide(1<<c),gt.multiply(1,1),gt.divide(2),o=gt.numToString()}else gt.multiply(0,a),gt.multiply(1<<-i,0),o=gt.numToString()+Z("0.00000000000000000000",2,2+t);return t>0?(u=o.length,o=u<=t?r+Z("0.0000000000000000000",0,t-u+2)+o:r+Z(o,0,u-t)+"."+Z(o,u-t)):o=r+o,o};$(f,{toFixed:vt},yt);var bt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),mt=f.toPrecision;$(f,{toPrecision:function(e){return"undefined"==typeof e?mt.call(this):mt.call(this,e)}},bt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,o){var i=String(this);if("undefined"==typeof r&&0===o)return[];if(!t(r))return H(this,r,o);var a,c,s,u,l=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),p=0,h=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+h.source+"$(?!\\s)",f));var y="undefined"==typeof o?n:L.ToUint32(o);for(c=h.exec(i);c&&(s=c.index+c[0].length,!(s>p&&(Y(l,Z(i,p,c.index)),!e&&c.length>1&&c[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(c[e]=void 0)}),c.length>1&&c.index<i.length&&d.apply(l,J(c,1)),u=c[0].length,p=s,l.length>=y)));)h.lastIndex===c.index&&h.lastIndex++,c=h.exec(i);return p===i.length?!u&&h.test("")||Y(l,""):Y(l,Z(i,p)),l.length>y?J(l,0,y):l}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:H(this,e,t)});var wt=u.replace,Ot=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){Y(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ot||(u.replace=function(n,r){var o=e(r),i=t(n)&&/\)[*?]/.test(n.source);if(o&&i){var a=function(e){var t=arguments.length,o=n.lastIndex;n.lastIndex=0;var i=n.exec(e)||[];return n.lastIndex=o,Y(i,arguments[t-2],arguments[t-1]),r.apply(this,i)};return wt.call(this,n,a)}return wt.call(this,n,r)});var Tt=u.substr,jt="".substr&&"b"!=="0b".substr(-1);$(u,{substr:function(e,t){var n=e;return e<0&&(n=w(this.length+e,0)),Tt.call(this,n,t)}},jt);var xt="\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff",Et="\u200b",St="["+xt+"]",Dt=new RegExp("^"+St+St+"*"),_t=new RegExp(St+St+"*$"),Mt=u.trim&&(xt.trim()||!Et.trim());$(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return s(this).replace(Dt,"").replace(_t,"")}},Mt);var Pt=b.bind(String.prototype.trim),It=u.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;$(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=s(this),n=s(e),r=arguments.length>1?l(arguments[1]):NaN,o=A(r)?1/0:L.ToInteger(r),i=O(w(o,0),t.length),a=n.length,c=i+a;c>0;){c=w(0,c-a);var u=W(Z(t,c,i+a),n);if(u!==-1)return c+u}return-1}},It);var Ct=u.lastIndexOf;if($(u,{lastIndexOf:function(e){return Ct.apply(this,arguments)}},1!==u.lastIndexOf.length),8===parseInt(xt+"08")&&22===parseInt(xt+"0x16")||(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,r){var o=Pt(n),i=l(r)||(t.test(o)?16:10);return e(o,i)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Pt(t),r=e(n);return 0===r&&"-"===Z(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Ft=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=s(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=s(t)),e?t?e+": "+t:e:t};Error.prototype.toString=Ft}if(R){var Nt=function(e,t){if(Q(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.enumerable=!1,Object.defineProperty(e,t,n)}};Nt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Nt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var kt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=kt}}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e,t,n,r,o=Function.call,i=Object.prototype,a=o.bind(i.hasOwnProperty),c=o.bind(i.propertyIsEnumerable),s=o.bind(i.toString),u=a(i,"__defineGetter__");u&&(e=o.bind(i.__defineGetter__),t=o.bind(i.__defineSetter__),n=o.bind(i.__lookupGetter__),r=o.bind(i.__lookupSetter__)),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){var t=e.__proto__;return t||null===t?t:"[object Function]"===s(e.constructor)?e.constructor.prototype:e instanceof Object?i:null});var l=function(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var f=l({}),p="undefined"==typeof document||l(document.createElement("div"));if(!p||!f)var h=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||h){var d="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(d+e);if(h)try{return h.call(Object,e,t)}catch(o){}var s;if(!a(e,t))return s;if(s={enumerable:c(e,t),configurable:!0},u){var l=e.__proto__,f=e!==i;f&&(e.__proto__=i);var p=n(e,t),y=r(e,t);if(f&&(e.__proto__=l),p||y)return p&&(s.get=p),y&&(s.set=y),s}return s.value=e[t],s.writable=!0,s}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y,g=!({__proto__:null}instanceof Object),v=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},b=function(){var e,t;return t=new ActiveXObject("htmlfile"),t.write("<script></script>"),t.close(),e=t.parentWindow.Object.prototype,t=null,e},m=function(){var e,t=document.createElement("iframe"),n=document.body||document.documentElement;return t.style.display="none",n.appendChild(t),t.src="javascript:",e=t.contentWindow.Object.prototype,n.removeChild(t),t=null,e};y=g||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=v()?b():m();delete e.constructor,delete e.hasOwnProperty,delete e.propertyIsEnumerable,delete e.isPrototypeOf,delete e.toLocaleString,delete e.toString,delete e.valueOf;var t=function(){};return t.prototype=e,y=function(){return new t},new t},Object.create=function(e,t){var n,r=function(){};if(null===e)n=y();else{if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object prototype may only be an Object or null");r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}var w=function(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var O=w({}),T="undefined"==typeof document||w(document.createElement("div"));if(!O||!T)var j=Object.defineProperty,x=Object.defineProperties}if(!Object.defineProperty||j){var E="Property description must be an object: ",S="Object.defineProperty called on non-object: ",D="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(o,a,c){if("object"!=typeof o&&"function"!=typeof o||null===o)throw new TypeError(S+o);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(E+c);if(j)try{return j.call(Object,o,a,c)}catch(s){}if("value"in c)if(u&&(n(o,a)||r(o,a))){var l=o.__proto__;o.__proto__=i,delete o[a],o[a]=c.value,o.__proto__=l}else o[a]=c.value;else{if(!u&&("get"in c||"set"in c))throw new TypeError(D);"get"in c&&e(o,a,c.get),"set"in c&&t(o,a,c.set)}return o}}Object.defineProperties&&!x||(Object.defineProperties=function(e,t){if(x)try{return x.call(Object,e,t)}catch(n){}return Object.keys(t).forEach(function(n){"__proto__"!==n&&Object.defineProperty(e,n,t[n])}),e}),Object.seal||(Object.seal=function(e){if(Object(e)!==e)throw new TypeError("Object.seal can only be called on Objects.");return e}),Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e});try{Object.freeze(function(){})}catch(_){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){if(Object(e)!==e)throw new TypeError("Object.preventExtensions can only be called on Objects.");return e}),Object.isSealed||(Object.isSealed=function(e){if(Object(e)!==e)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(e){if(Object(e)!==e)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)!==e)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var t="";a(e,t);)t+="?";e[t]=!0;var n=a(e,t);return delete e[t],n})}),function(e){"use strict";e.console=e.console||{};for(var t,n,r=e.console,o={},i=function(){},a="memory".split(","),c="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=a.pop();)r[t]||(r[t]=o);for(;n=c.pop();)"function"!=typeof r[n]&&(r[n]=i)}("undefined"==typeof window?this:window),!window.addEventListener&&function(e,t,n,r,o,i,a){e[r]=t[r]=n[r]=function(e,t){var n=this;a.unshift([n,e,t,function(e){e.currentTarget=n,e.preventDefault=function(){e.returnValue=!1},e.stopPropagation=function(){e.cancelBubble=!0},e.target=e.srcElement||n,t.call(n,e)}]),this.attachEvent("on"+e,a[0][3])},e[o]=t[o]=n[o]=function(e,t){for(var n,r=0;n=a[r];++r)if(n[0]==this&&n[1]==e&&n[2]==t)return this.detachEvent("on"+e,a.splice(r,1)[0][3])},e[i]=t[i]=n[i]=function(e){return this.fireEvent("on"+e.type,e)}}(Window.prototype,HTMLDocument.prototype,Element.prototype,"addEventListener","removeEventListener","dispatchEvent",[]),function(e,t){"use strict";var n=function(){var e=document.createElement("div");return e.style.cssText="font-size: 1rem;",/rem/.test(e.style.fontSize)},r=function(){for(var e=document.getElementsByTagName("link"),t=[],n=0;n<e.length;n++)"stylesheet"===e[n].rel.toLowerCase()&&null===e[n].getAttribute("data-norem")&&t.push(e[n].href);return t},o=function(){for(var e=0;e<h.length;e++)l(h[e],i)},i=function(e,t){if(v.push(e.responseText),b.push(t),b.length===h.length){for(var n=0;n<b.length;n++)a(v[n],b[n]);(h=d.slice(0)).length>0?(b=[],v=[],d=[],o()):c()}},a=function(e,t){for(var n,r=f(e).replace(/\/\*[\s\S]*?\*\//g,""),o=/[\w\d\s\-\/\\\[\]:,.'"*()<>+~%#^$_=|@]+\{[\w\d\s\-\/\\%#:!;,.'"*()]+\d*\.?\d+rem[\w\d\s\-\/\\%#:!;,.'"*()]*\}/g,i=r.match(o),a=/\d*\.?\d+rem/g,c=r.match(a),s=/(.*\/)/,u=s.exec(t)[0],l=/@import (?:url\()?['"]?([^'\)"]*)['"]?\)?[^;]*/gm;null!==(n=l.exec(e));)0===n[1].indexOf("/")?d.push(n[1]):d.push(u+n[1]);null!==i&&0!==i.length&&(y=y.concat(i),g=g.concat(c))},c=function(){for(var e=/[\w\d\s\-\/\\%#:,.'"*()]+\d*\.?\d+rem[\w\d\s\-\/\\%#:!,.'"*()]*[;}]/g,t=0;t<y.length;t++){p+=y[t].substr(0,y[t].indexOf("{")+1);for(var n=y[t].match(e),r=0;r<n.length;r++)p+=n[r],r===n.length-1&&"}"!==p[p.length-1]&&(p+="\n}")}s()},s=function(){for(var e=0;e<g.length;e++)m[e]=Math.round(parseFloat(g[e].substr(0,g[e].length-3)*w))+"px";u()},u=function(){for(var e=0;e<m.length;e++)m[e]&&(p=p.replace(g[e],m[e]));var t=document.createElement("style");t.setAttribute("type","text/css"),t.id="remReplace",document.getElementsByTagName("head")[0].appendChild(t),t.styleSheet?t.styleSheet.cssText=p:t.appendChild(document.createTextNode(p))},l=function(t,n){try{var r=e.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP")||new ActiveXObject("Msxml2.XMLHTTP"):new XMLHttpRequest;r.open("GET",t,!0),r.onreadystatechange=function(){4===r.readyState&&n(r,t)},r.send(null)}catch(o){if(e.XDomainRequest){var i=new XDomainRequest;i.open("get",t),i.onload=function(){n(i,t)},i.onerror=function(){return!1},i.send()}}},f=function(t){return e.matchMedia||e.msMatchMedia||(t=t.replace(/@media[\s\S]*?\}\s*\}/g,"")),t};if(!n()){var p="",h=r(),d=[],y=[],g=[],v=[],b=[],m=[],w="";w=function(){var e,t=document,n=t.documentElement,r=t.body||t.createElement("body"),o=!t.body,i=t.createElement("div"),a=r.style.fontSize;return o&&n.appendChild(r),i.style.cssText="width:1em; position:absolute; visibility:hidden; padding: 0;",r.style.fontSize="1em",r.appendChild(i),e=i.offsetWidth,o?n.removeChild(r):(r.removeChild(i),r.style.fontSize=a),e}(),o()}}(window),!function(e){"use strict";e.matchMedia=e.matchMedia||function(e){var t,n=e.documentElement,r=n.firstElementChild||n.firstChild,o=e.createElement("body"),i=e.createElement("div");return i.id="mq-test-1",i.style.cssText="position:absolute;top:-100em",o.style.background="none",o.appendChild(i),function(e){return i.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',n.insertBefore(o,r),t=42===i.offsetWidth,n.removeChild(o),{matches:t,media:e}}}(e.document)}(this),function(e){"use strict";function t(){O(!0)}var n={};e.respond=n,n.update=function(){};var r=[],o=function(){var t=!1;try{t=new e.XMLHttpRequest}catch(n){t=new e.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t;
}}(),i=function(e,t){var n=o();n&&(n.open("GET",e,!0),n.onreadystatechange=function(){4!==n.readyState||200!==n.status&&304!==n.status||t(n.responseText)},4!==n.readyState&&n.send(null))},a=function(e){return e.replace(n.regex.minmaxwh,"").match(n.regex.other)};if(n.ajax=i,n.queue=r,n.unsupportedmq=a,n.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},n.mediaQueriesSupported=e.matchMedia&&null!==e.matchMedia("only all")&&e.matchMedia("only all").matches,!n.mediaQueriesSupported){var c,s,u,l=e.document,f=l.documentElement,p=[],h=[],d=[],y={},g=30,v=l.getElementsByTagName("head")[0]||f,b=l.getElementsByTagName("base")[0],m=v.getElementsByTagName("link"),w=function(){var e,t=l.createElement("div"),n=l.body,r=f.style.fontSize,o=n&&n.style.fontSize,i=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=i=l.createElement("body"),n.style.background="none"),f.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),i&&f.insertBefore(n,f.firstChild),e=t.offsetWidth,i?f.removeChild(n):n.removeChild(t),f.style.fontSize=r,o&&(n.style.fontSize=o),e=u=parseFloat(e)},O=function(t){var n="clientWidth",r=f[n],o="CSS1Compat"===l.compatMode&&r||l.body[n]||r,i={},a=m[m.length-1],y=(new Date).getTime();if(t&&c&&g>y-c)return e.clearTimeout(s),void(s=e.setTimeout(O,g));c=y;for(var b in p)if(p.hasOwnProperty(b)){var T=p[b],j=T.minw,x=T.maxw,E=null===j,S=null===x,D="em";j&&(j=parseFloat(j)*(j.indexOf(D)>-1?u||w():1)),x&&(x=parseFloat(x)*(x.indexOf(D)>-1?u||w():1)),T.hasquery&&(E&&S||!(E||o>=j)||!(S||x>=o))||(i[T.media]||(i[T.media]=[]),i[T.media].push(h[T.rules]))}for(var _ in d)d.hasOwnProperty(_)&&d[_]&&d[_].parentNode===v&&v.removeChild(d[_]);d.length=0;for(var M in i)if(i.hasOwnProperty(M)){var P=l.createElement("style"),I=i[M].join("\n");P.type="text/css",P.media=M,v.insertBefore(P,a.nextSibling),P.styleSheet?P.styleSheet.cssText=I:P.appendChild(l.createTextNode(I)),d.push(P)}},T=function(e,t,r){var o=e.replace(n.regex.comments,"").replace(n.regex.keyframes,"").match(n.regex.media),i=o&&o.length||0;t=t.substring(0,t.lastIndexOf("/"));var c=function(e){return e.replace(n.regex.urls,"$1"+t+"$2$3")},s=!i&&r;t.length&&(t+="/"),s&&(i=1);for(var u=0;i>u;u++){var l,f,d,y;s?(l=r,h.push(c(e))):(l=o[u].match(n.regex.findStyles)&&RegExp.$1,h.push(RegExp.$2&&c(RegExp.$2))),d=l.split(","),y=d.length;for(var g=0;y>g;g++)f=d[g],a(f)||p.push({media:f.split("(")[0].match(n.regex.only)&&RegExp.$2||"all",rules:h.length-1,hasquery:f.indexOf("(")>-1,minw:f.match(n.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:f.match(n.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}O()},j=function(){if(r.length){var t=r.shift();i(t.href,function(n){T(n,t.href,t.media),y[t.href]=!0,e.setTimeout(function(){j()},0)})}},x=function(){for(var t=0;t<m.length;t++){var n=m[t],o=n.href,i=n.media,a=n.rel&&"stylesheet"===n.rel.toLowerCase();o&&a&&!y[o]&&(n.styleSheet&&n.styleSheet.rawCssText?(T(n.styleSheet.rawCssText,o,i),y[o]=!0):(!/^([a-zA-Z:]*\/\/)/.test(o)&&!b||o.replace(RegExp.$1,"").split("/")[0]===e.location.host)&&("//"===o.substring(0,2)&&(o=e.location.protocol+o),r.push({href:o,media:i})))}j()};x(),n.update=x,n.getEmValue=w,e.addEventListener?e.addEventListener("resize",t,!1):e.attachEvent&&e.attachEvent("onresize",t)}}(this);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! Amaze UI v2.7.2 ~ Handlebars helper | by Amaze UI Team | (c) 2016 AllMobilize, Inc. | Licensed under MIT | 2016-08-17T16:17:24+0800 */
(function(undefined) {
'use strict';
var registerIfCondHelper = function(hbs) {
hbs.registerHelper('ifCond', function(v1, operator, v2, options) {
switch (operator) {
case '==':
return (v1 == v2) ? options.fn(this) : options.inverse(this);
break;
case '===':
return (v1 === v2) ? options.fn(this) : options.inverse(this);
break;
case '<':
return (v1 < v2) ? options.fn(this) : options.inverse(this);
break;
case '<=':
return (v1 <= v2) ? options.fn(this) : options.inverse(this);
break;
case '>':
return (v1 > v2) ? options.fn(this) : options.inverse(this);
break;
case '>=':
return (v1 >= v2) ? options.fn(this) : options.inverse(this);
break;
default:
return options.inverse(this);
break;
}
return options.inverse(this);
});
};
if (typeof module !== 'undefined' && module.exports) {
module.exports = registerIfCondHelper;
}
this.Handlebars && registerIfCondHelper(this.Handlebars);
}).call(this);
(function(undefined){
'use strict';
var registerAMUIPartials = function(hbs) {
hbs.registerPartial('accordion', "{{#this}}\n <section data-am-widget=\"accordion\" class=\"am-accordion {{#if theme}}am-accordion-{{theme}}{{else}}am-accordion-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"{{#if id}} id=\"{{id}}\"{{/if}} data-am-accordion='{ {{#if options.multiple}}\"multiple\": true{{/if}} }'>\n {{#each content}}\n <dl class=\"am-accordion-item{{#if active}} am-active{{/if}}{{#if disabled}} am-disabled{{/if}}\">\n <dt class=\"am-accordion-title\">\n {{{title}}}\n </dt>\n <dd class=\"am-accordion-bd am-collapse {{#if active}}am-in{{/if}}\">\n <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题, 加一个容器 -->\n <div class=\"am-accordion-content\">\n {{{content}}}\n </div>\n </dd>\n </dl>\n {{/each}}\n </section>\n{{/this}}\n");
hbs.registerPartial('divider', "{{#this}}\n <hr data-am-widget=\"divider\" style=\"{{#if options.width}}width:{{{options.width}}};{{/if}}{{#if options.height}}height:{{{options.height}}};{{/if}}\" class=\"am-divider {{#if theme}}am-divider-{{theme}}{{else}}am-divider-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"{{#if id}} id=\"{{id}}\"{{/if}} />\n{{/this}}\n");
hbs.registerPartial('duoshuo', "{{#this}}\n <div data-am-widget=\"duoshuo\" class=\"am-duoshuo{{#if theme}} am-duoshuo-{{theme}}{{else}} am-duoshuo-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"{{#if id}} id=\"{{id}}\"{{/if}} {{#if options.shortName}}data-ds-short-name=\"{{options.shortName}}\"{{/if}}>\n <div class=\"ds-thread\" {{#if content}}{{#each content}}{{#ifCond @key '==' 'threadKey'}} data-thread-key=\"{{this}}\"{{else}} data-{{@key}}=\"{{this}}\"{{/ifCond}}{{/each}}{{/if}}>\n </div>\n </div>\n{{/this}}");
hbs.registerPartial('figure', "{{#this}}\n <figure data-am-widget=\"figure\" class=\"am am-figure {{#if theme}}am-figure-{{theme}}{{else}}am-figure-default{{/if}} {{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{#if id}}\n id=\"{{id}}\"{{/if}} data-am-figure=\"{ {{#if options.zoomAble}} pureview: '{{options.zoomAble}}'{{/if}} }\">\n {{#if content.link}}<a href=\"{{content.link}}\" title=\"{{content.figcaption}}\" class=\"{{className}}\">{{/if}}\n\n {{#if options.figcaptionPosition}}\n {{#ifCond options.figcaptionPosition '==' 'top'}}\n {{#if content.figcaption}}\n <figcaption class=\"am-figure-capition-top\">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/ifCond}}\n {{/if}}\n\n {{#if content.img}}\n <img src=\"{{content.img}}\" {{#if content.rel}}data-rel=\"{{content.rel}}\"{{/if}} alt=\"{{#if content.imgAlt}}{{content.imgAlt}}{{else}}{{content.figcaption}}{{/if}}\"/>\n {{/if}}\n {{#if options.figcaptionPosition}}\n {{#ifCond options.figcaptionPosition '==' 'bottom'}}\n {{#if content.figcaption}}\n <figcaption class=\"am-figure-capition-btm\">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/ifCond}}\n {{else}}\n {{#if content.figcaption}}\n <figcaption class=\"am-figure-capition-btm\">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/if}}\n\n {{#if content.link}}</a>{{/if}}\n </figure>\n{{/this}}\n");
hbs.registerPartial('footer', "{{#this}}\n <footer data-am-widget=\"footer\"\n class=\"am-footer {{#if theme}}am-footer-{{theme}}{{else}}am-footer-default {{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n {{#if id}}id=\"{{id}}\"{{/if}} data-am-footer=\"{ {{#if options.addToHS}}addToHS: 1{{/if}} }\">\n <div class=\"am-footer-switch\">\n <span class=\"{{#if options.modal}}am-footer-ysp{{/if}}\" data-rel=\"mobile\"\n data-am-modal=\"{target: '#am-switch-mode'}\">\n {{#unless content.switchName}}\n {{#ifCond content.lang '==' 'en'}}\n Mobile\n {{else}}\n 云适配版\n {{/ifCond}}\n {{else}}\n {{content.switchName}}\n {{/unless}}\n </span>\n <span class=\"am-footer-divider\"> | </span>\n <a id=\"godesktop\" data-rel=\"desktop\" class=\"am-footer-desktop\" href=\"javascript:\">\n {{#ifCond content.lang '==' 'en'}}\n Desktop\n {{else}}\n 电脑版\n {{/ifCond}}\n </a>\n </div>\n <div class=\"am-footer-miscs {{#if options.textPosition}}am-text-left{{/if}}\">\n\n {{#if options.techSupportCo}}\n {{#ifCond content.lang '==' 'en'}}\n <p>Supported by {{#if options.techSupportSite}}<a href=\"{{options.techSupportSite}}\"\n title=\"{{options.techSupportCo}}\"\n target=\"_blank\"> class=\"{{className}}\"{{{options.techSupportCo}}}</a>{{else}}{{{options.techSupportCo}}}{{/if}}\n .</p>\n {{else}}\n <p>由 {{#if options.techSupportSite}}<a href=\"{{options.techSupportSite}}\" title=\"{{options.techSupportCo}}\"\n target=\"_blank\" class=\"{{techSupportClassName}}\">{{{options.techSupportCo}}}</a>{{else}}{{{options.techSupportCo}}}{{/if}}\n 提供技术支持</p>\n {{/ifCond}}\n {{/if}}\n {{#each content.companyInfo}}\n <p>{{{detail}}}</p>\n {{/each}}\n </div>\n </footer>\n\n <div id=\"am-footer-modal\"\n class=\"am-modal am-modal-no-btn am-switch-mode-m {{#if theme}}am-switch-mode-m-{{theme}}{{/if}}\">\n <div class=\"am-modal-dialog\">\n <div class=\"am-modal-hd am-modal-footer-hd\">\n <a href=\"javascript:void(0)\" data-dismiss=\"modal\" class=\"am-close am-close-spin {{className}}\" data-am-modal-close>&times;</a>\n </div>\n <div class=\"am-modal-bd\">\n {{#ifCond content.lang '==' 'en'}}\n You are visiting\n {{else}}\n 您正在浏览的是\n {{/ifCond}}\n\n <span class=\"am-switch-mode-owner\">\n {{#if content.owner}}\n {{content.owner}}\n {{else}}\n 云适配\n {{/if}}\n </span>\n\n <span class=\"am-switch-mode-slogan\">\n {{#if content.slogan}}\n {{{content.slogan}}}\n {{else}}\n {{#ifCond content.lang '==' 'en'}}\n mobilized version for your device.\n {{else}}\n 为您当前手机订制的移动网站。\n {{/ifCond}}\n {{/if}}\n </span>\n </div>\n </div>\n </div>\n{{/this}}\n");
hbs.registerPartial('gallery', "{{#this}}\n <ul data-am-widget=\"gallery\" class=\"am-gallery{{#if options.cols}} am-avg-sm-{{options.cols}}{{else}} am-avg-sm-2{{/if}}\n am-avg-md-3 am-avg-lg-4 {{#if\n theme}}am-gallery-{{theme}}{{else}}am-gallery-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" data-am-gallery=\"{ {{#if options.gallery}}pureview: true{{/if}} }\" {{#if id}}id=\"{{id}}\"{{/if}}>\n {{#each content}}\n <li>\n <div class=\"am-gallery-item\">\n {{#if link}}\n <a href=\"{{link}}\" class=\"{{className}}\">\n {{#if img}}<img src=\"{{img}}\" {{#if rel}}data-rel=\"{{rel}}\"{{/if}} alt=\"{{title}}\"/>{{/if}}\n {{#if title}}\n <h3 class=\"am-gallery-title\">{{{title}}}</h3>\n {{/if}}\n {{#if desc}}\n <div class=\"am-gallery-desc\">{{{desc}}}</div>\n {{/if}}\n </a>\n {{else}}\n {{#if img}}<img src=\"{{img}}\" {{#if rel}}data-rel=\"{{rel}}\"{{/if}} alt=\"{{title}}\"/>{{/if}}\n {{#if title}}\n <h3 class=\"am-gallery-title\">{{{title}}}</h3>\n {{/if}}\n {{#if desc}}\n <div class=\"am-gallery-desc\">{{{desc}}}</div>\n {{/if}}\n {{/if}}\n </div>\n </li>\n {{/each}}\n </ul>\n{{/this}}\n");
hbs.registerPartial('gotop', "{{#this}}\n <div data-am-widget=\"gotop\" class=\"am-gotop {{#if theme}}am-gotop-{{theme}}{{else}}am-gotop-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{#if id}}id=\"{{id}}\"{{/if}}>\n <a href=\"#top\" title=\"{{content.title}}\">\n {{#if content.title}}\n <span class=\"am-gotop-title\">{{content.title}}</span>\n {{/if}}\n {{#if content.customIcon}}\n <img class=\"am-gotop-icon-custom\" src=\"{{content.customIcon}}\" />\n {{else}}\n {{#if content.icon}}\n <i class=\"am-gotop-icon am-icon-{{content.icon}}\"></i>\n {{else}}\n <i class=\"am-gotop-icon am-icon-chevron-up\"></i>\n {{/if}}\n {{/if}}\n </a>\n </div>\n{{/this}}\n");
hbs.registerPartial('header', "{{#this}}\n <header data-am-widget=\"header\"\n class=\"am-header{{#if theme}} am-header-{{theme}}{{else}} am-header-default{{/if}}{{#if options.fixed}} am-header-fixed{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"{{#if id}}\n id=\"{{id}}\"{{/if}}>\n {{#if content.left}}\n <div class=\"am-header-left am-header-nav\">\n {{#each content.left}}\n <a href=\"{{link}}\" class=\"{{className}}\">\n {{#if title}}\n <span class=\"am-header-nav-title\">\n {{title}}\n </span>\n {{/if}}\n\n {{# if customIcon}}\n <img class=\"am-header-icon-custom\" src=\"{{customIcon}}\" alt=\"\"/>\n {{else}}\n {{#if icon}}\n <i class=\"am-header-icon am-icon-{{icon}}\"></i>\n {{/if}}\n {{/if}}\n </a>\n {{/each}}\n </div>\n {{/if}}\n\n {{#if content.title}}\n <h1 class=\"am-header-title\">\n {{#if content.link}}\n <a href=\"{{content.link}}\" class=\"{{content.className}}\">\n {{{content.title}}}\n </a>\n {{else}}\n {{{content.title}}}\n {{/if}}\n </h1>\n {{/if}}\n\n {{#if content.right}}\n <div class=\"am-header-right am-header-nav\">\n {{#each content.right}}\n <a href=\"{{link}}\" class=\"{{className}}\">\n {{#if title}}\n <span class=\"am-header-nav-title\">\n {{title}}\n </span>\n {{/if}}\n\n {{# if customIcon}}\n <img class=\"am-header-icon-custom\" src=\"{{customIcon}}\" alt=\"\"/>\n {{else}}\n {{#if icon}}\n <i class=\"am-header-icon am-icon-{{icon}}\"></i>\n {{/if}}\n {{/if}}\n </a>\n {{/each}}\n </div>\n {{/if}}\n </header>\n{{/this}}\n");
hbs.registerPartial('intro', "{{#this }}\n <div data-am-widget=\"intro\"\n class=\"am-intro am-cf {{#if theme}}am-intro-{{theme}}{{else}}am-intro-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n {{#if id}}id=\"{{id}}\"{{/if}}>\n {{#if content.title}}\n <div class=\"am-intro-hd\">\n <h2 class=\"am-intro-title\">{{{content.title}}}</h2>\n {{#if content.more.link}}\n {{#ifCond options.position '==' 'top'}}\n <a class=\"am-intro-more am-intro-more-top {{content.more.className}}\" href=\"{{content.more.link}}\">{{content.more.title}}</a>\n {{/ifCond}}\n {{/if}}\n </div>\n {{/if}}\n\n <div class=\"am-g am-intro-bd\">\n {{#if content.left}}\n <div\n class=\"am-intro-left {{#if options.leftCols}}am-u-sm-{{options.leftCols}}{{/if}}\">{{{content.left}}}</div>\n {{/if}}\n {{#if content.right}}\n <div\n class=\"am-intro-right {{#if options.rightCols}}am-u-sm-{{options.rightCols}}{{/if}}\">{{{content.right}}}</div>\n {{/if}}\n </div>\n {{#ifCond options.position '==' 'bottom'}}\n <div class=\"am-intro-more-bottom\">\n <a class=\"am-btn am-btn-default {{content.more.className}}\"\n href=\"{{content.more.link}}\">{{content.more.title}}</a>\n </div>\n {{/ifCond}}\n </div>\n{{/this}}\n");
hbs.registerPartial('list_news', "{{#this}}\n <div data-am-widget=\"list_news\" class=\"am-list-news{{#if theme}} am-list-news-{{theme}}{{else}} am-list-news-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{#if id}}id=\"{{id}}\"{{/if}}>\n <!--列表标题-->\n {{#if content.header.title}}\n <div class=\"am-list-news-hd am-cf\">\n {{#if content.header.link}} <!--带更多链接-->\n <a href=\"{{content.header.link}}\" class=\"{{content.header.className}}\">\n <h2>{{{content.header.title}}}</h2>\n {{#ifCond content.header.morePosition '==' 'top'}}\n <span class=\"am-list-news-more am-fr\">{{{content.header.moreText}}}</span>\n {{/ifCond}}\n </a>\n {{else}} <!--不带更多链接-->\n <h2>{{{content.header.title}}}</h2>\n {{/if}}\n </div>\n {{/if}}\n\n <div class=\"am-list-news-bd\">\n <ul class=\"am-list\">\n {{#ifCond options.type '==' 'thumb'}}\n {{#ifCond options.thumbPosition '==' 'top'}} <!--缩略图在标题上方-->\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-top{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if img}}\n <div class=\"am-list-thumb am-u-sm-12\">\n <a href=\"{{link}}\" class=\"{{className}}\">\n <img src=\"{{img}}\" alt=\"{{title}}\"/>\n </a>\n {{#if thumbAddition}}\n <div class=\"am-list-thumb-addon\">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class=\"{{#if img}}{{/if}} am-list-main\">\n {{#if title}}\n <h3 class=\"am-list-item-hd\"><a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a></h3>\n {{/if}}\n\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition '==' 'bottom-left'}} <!--缩略图在标题下方居左-->\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-bottom-left{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <h3 class=\"am-list-item-hd\"><a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a></h3>\n {{/if}}\n {{#if img}}\n <div class=\"am-u-sm-4 am-list-thumb\">\n <a href=\"{{link}}\" class=\"{{className}}\">\n <img src=\"{{img}}\" alt=\"{{title}}\"/>\n </a>\n {{#if thumbAddition}}\n <div class=\"am-list-thumb-addon\">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class=\"{{#if img}} am-u-sm-8 {{/if}} am-list-main\">\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition '==' 'bottom-right'}} <!--缩略图在标题下方居右-->\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-bottom-right{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <h3 class=\"am-list-item-hd\"><a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a></h3>\n {{/if}}\n\n <div class=\"{{#if img}} am-u-sm-8{{/if}} am-list-main\">\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n {{#if img}}\n <div class=\"am-list-thumb am-u-sm-4\">\n <a href=\"{{link}}\" class=\"{{className}}\">\n <img src=\"{{img}}\" alt=\"{{title}}\"/>\n </a>\n {{#if thumbAddition}}\n <div class=\"am-list-thumb-addon\">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition '==' 'left'}} <!--缩略图在标题左边-->\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-left{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if img}}\n <div class=\"am-u-sm-4 am-list-thumb\">\n <a href=\"{{link}}\" class=\"{{className}}\">\n <img src=\"{{img}}\" alt=\"{{title}}\"/>\n </a>\n {{#if thumbAddition}}\n <div class=\"am-list-thumb-addon\">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class=\"{{#if img}} am-u-sm-8{{/if}} am-list-main\">\n {{#if title}}\n <h3 class=\"am-list-item-hd\"><a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a></h3>\n {{/if}}\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition '==' 'right'}} <!--缩略图在标题右边-->\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-right{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n <div class=\"{{#if img}} am-u-sm-8{{/if}} am-list-main\">\n {{#if title}}\n <h3 class=\"am-list-item-hd\"><a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a></h3>\n {{/if}}\n\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n {{#if img}}\n <div class=\"am-u-sm-4 am-list-thumb\">\n <a href=\"{{link}}\" class=\"{{className}}\">\n <img src=\"{{img}}\" alt=\"{{title}}\"/>\n </a>\n {{#if thumbAddition}}\n <div class=\"am-list-thumb-addon\">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{else}}{{!--不带缩略图--}}\n {{#each content.main}}\n <li class=\"am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed{{/if}}\">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <a href=\"{{link}}\" class=\"am-list-item-hd {{className}}\">{{{title}}}</a>\n {{/if}}\n\n {{#if date}}\n <span class=\"am-list-date\">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class=\"am-list-item-text\">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class=\"am-list-news-addon\">{{{mainAddition}}}</div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n </ul>\n </div>\n\n {{#ifCond content.header.morePosition '==' 'bottom'}}<!--更多在底部-->\n {{#if content.header.link}}\n <div class=\"am-list-news-ft\">\n <a class=\"am-list-news-more am-btn am-btn-default {{content.header.className}}\" href=\"{{content.header.link}}\">{{{content.header.moreText}}}</a>\n </div>\n {{/if}}\n {{/ifCond}}\n </div>\n{{/this}}\n");
hbs.registerPartial('map', "{{#this}}\n <div data-am-widget=\"map\" class=\"am-map {{#if theme}}am-map-{{theme}}{{else}}am-map-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n data-name=\"{{options.name}}\" data-address=\"{{options.address}}\" data-longitude=\"{{options.longitude}}\" data-latitude=\"{{options.latitude}}\" data-scaleControl=\"{{options.scaleControl}}\" data-zoomControl=\"{{options.zoomControl}}\" data-setZoom=\"{{options.setZoom}}\" data-icon=\"{{options.icon}}\">\n <div id=\"bd-map\"></div>\n </div>\n{{/this}}");
hbs.registerPartial('mechat', "{{#this}}\n <section data-am-widget=\"mechat\" class=\"am-mechat{{#if theme}} am-mechat-{{theme}}{{else}} am-mechat-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{#if id}} id=\"{{id}}\" {{/if}} {{#if options.unitid}}data-am-mechat-unitid=\"{{options.unitid}}\"{{/if}}>\n <div id=\"mechat\"></div>\n </section>\n{{/this}}");
hbs.registerPartial('menu', "{{#this}}\n <nav data-am-widget=\"menu\" class=\"am-menu {{#if theme}} am-menu-{{theme}}{{else}} am-menu-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{options.dataset}} {{#if id}}id=\"{{id}}\"{{/if}}\n {{#ifCond theme '==' 'dropdown1'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme '==' 'dropdown2'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme '==' 'slide1'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme '==' 'offcanvas1'}} data-am-menu-offcanvas{{/ifCond}}\n {{#ifCond theme '==' 'offcanvas2'}} data-am-menu-offcanvas{{/ifCond}}> {{!-- 与模板深耦合,与 JS 浅耦合 --}}\n <a href=\"javascript: void(0)\" class=\"am-menu-toggle\">\n {{#if options.toggleTitle}}\n <span class=\"am-menu-toggle-title\">{{options.toggleTitle}}</span>\n {{/if}}\n {{#if options.toggleCustomIcon}}\n <img src=\"{{options.toggleCustomIcon}}\" alt=\"Menu Toggle\"/>\n {{else}}\n {{#if options.toggleIcon}}\n <i class=\"am-menu-toggle-icon am-icon-{{options.toggleIcon}}\"></i>\n {{else}}\n <i class=\"am-menu-toggle-icon am-icon-bars\"></i>\n {{/if}}\n {{/if}}\n </a>\n\n {{!-- offCanvas menu Wrap --}}\n {{!-- 问题:方便用户,但是与主题名称(类名)耦合过深 --}}\n {{#ifCond theme '==' 'offcanvas1'}}\n <div class=\"am-offcanvas\" {{#if options.closeOffCanvasOnclick}}data-dismiss-on=\"click\"{{/if}}>\n <div class=\"am-offcanvas-bar{{#if options.offCanvasFlip}} am-offcanvas-bar-flip{{/if}}\">\n {{/ifCond}}\n {{#ifCond theme '==' 'offcanvas2'}}\n <div class=\"am-offcanvas\">\n <div class=\"am-offcanvas-bar{{#if options.offCanvasFlip}} am-offcanvas-bar-flip{{/if}}\">\n {{/ifCond}}\n\n {{#if content}}\n <ul class=\"am-menu-nav {{#if options.cols}}am-avg-sm-{{options\n .cols}}{{else}}am-avg-sm-1{{/if}}{{#ifCond theme '==' 'dropdown1'}} am-collapse{{/ifCond}}{{#ifCond theme\n '==' 'dropdown2'}} am-collapse{{/ifCond}}{{#ifCond theme\n '==' 'slide1'}} am-collapse{{/ifCond}}\">\n {{#each content}}\n <li class=\"{{#if subMenu}}am-parent{{/if}}{{#if className}} {{className}}{{/if}}\">\n <a href=\"{{link}}\" class=\"{{className}}\" {{#if target}}target=\"{{target}}\" {{/if}}>{{{title}}}</a>\n {{#if subMenu}}\n <ul class=\"am-menu-sub am-collapse {{#if subCols}} am-avg-sm-{{subCols}}{{else}}\n am-avg-sm-1{{/if}} {{subMenuClassName}}\">\n {{#each subMenu}}\n <li class=\"{{#if subMenu}} am-parent{{/if}}{{#if className}} {{className}}{{/if}}\">\n <a href=\"{{link}}\" class=\"{{className}}\" {{#if target}}target=\"{{target}}\" {{/if}}>{{{title}}}</a>\n </li>\n {{/each}}\n {{!-- 显示进入栏目链接 --}}\n {{#if channelLink}}\n <li class=\"am-menu-nav-channel\"><a href=\"{{link}}\" class=\"{{className}}\" title=\"{{title}}\">{{{channelLink}}}</a></li>\n {{/if}}\n </ul>\n {{/if}}\n </li>\n {{/each}}\n </ul>\n {{/if}}\n\n {{#ifCond theme '==' 'offcanvas1'}}\n </div>\n </div>\n {{/ifCond}}\n {{#ifCond theme '==' 'offcanvas2'}}\n </div>\n </div>\n {{/ifCond}}\n {{!-- 不要问我为什么这样写,我也不想这样 --}}\n </nav>\n{{/this}}\n");
hbs.registerPartial('navbar', "{{#this}}\n <div data-am-widget=\"navbar\" class=\"am-navbar am-cf {{#if theme}}am-navbar-{{theme}}{{else}}am-navbar-default{{/if}} {{#if options.iconPosition}}am-navbar-inline{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n id=\"{{id}}\">\n {{#if content}}\n <ul class=\"am-navbar-nav am-cf {{#if options.cols}}am-avg-sm-{{options.cols}}{{/if}}\">\n {{#each content}}\n <li {{{dataApi}}}>\n <a href=\"{{link}}\" class=\"{{className}}\">\n {{#if customIcon}}\n <img src=\"{{customIcon}}\" alt=\"{{title}}\"/>\n {{else}}\n {{#if icon}}\n <span class=\"am-icon-{{icon}}\"></span>\n {{/if}}\n {{/if}}\n {{#if title}}\n <span class=\"am-navbar-label\">{{title}}</span>\n {{/if}}\n </a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n </div>\n{{/this}}\n");
hbs.registerPartial('pagination', "{{#this}}\n <ul data-am-widget=\"pagination\"\n class=\"am-pagination {{#if theme}}am-pagination-{{theme}}{{else}}am-pagination-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n {{#if id}}id=\"{{id}}\"{{/if}}>\n\n {{#if content.firstTitle}}\n <li class=\"am-pagination-first {{content.firstClassName}}\">\n <a href=\"{{content.firstLink}}\" class=\"{{content.firstClassName}}\">{{{content.firstTitle}}}</a>\n </li>\n {{/if}}\n\n {{#if content.prevTitle}}\n <li class=\"am-pagination-prev {{content.prevClassName}}\">\n <a href=\"{{content.prevLink}}\" class=\"{{content.prevClassName}}\">{{{content.prevTitle}}}</a>\n </li>\n {{/if}}\n\n {{! 移除 options.select,根据主题来判断结构,无奈 handlebars 逻辑处理...}}\n\n {{#if content.page}}\n {{#ifCond theme '==' 'select'}}\n <li class=\"am-pagination-select\">\n <select>\n {{#each content.page}}\n <option value=\"{{link}}\" class=\"{{className}}\">{{title}}{{#if ../content.total}}\n / {{../../content.total}}{{/if}}\n </option>\n {{/each}}\n </select>\n </li>\n {{else}}\n {{#ifCond theme '==' 'one'}}\n <li class=\"am-pagination-select\">\n <select>\n {{#each content.page}}\n {{content.total}}\n <option value=\"{{link}}\" class=\"{{className}}\">{{title}}{{#if ../content.total}}\n / {{../../content.total}}{{/if}}\n </option>\n {{/each}}\n </select>\n </li>\n {{else}}\n {{#each content.page}}\n <li class=\"{{className}}\">\n <a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a>\n </li>\n {{/each}}\n {{/ifCond}}\n {{/ifCond}}\n\n {{/if}}\n\n {{#if content.nextTitle}}\n <li class=\"am-pagination-next {{content.nextClassName}}\">\n <a href=\"{{content.nextLink}}\" class=\"{{content.nextClassName}}\">{{{content.nextTitle}}}</a>\n </li>\n {{/if}}\n\n {{#if content.lastTitle}}\n <li class=\"am-pagination-last {{content.lastClassName}}\">\n <a href=\"{{content.lastLink}}\" class=\"{{content.lastClassName}}\">{{{content.lastTitle}}}</a>\n </li>\n {{/if}}\n </ul>\n{{/this}}\n");
hbs.registerPartial('paragraph', "{{#this}}\n <article data-am-widget=\"paragraph\"\n class=\"am-paragraph {{#if theme}}am-paragraph-{{theme}}{{else}}am-paragraph-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n {{#if id}}id=\"{{id}}\"{{/if}}\n data-am-paragraph=\"{ {{#if options.tableScrollable}}tableScrollable: true,{{/if}} {{#if options.imgLightbox}}pureview: true{{/if}} }\">\n\n {{#if content}}\n {{{ content.content }}}\n {{/if}}\n </article>\n{{/this}}\n");
hbs.registerPartial('slider', "{{#this}}\n <div data-am-widget=\"slider\" class=\"am-slider {{#if theme}}am-slider-{{theme}}{{else}}am-slider-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" data-am-slider='{{sliderConfig}}' {{#if id}}id=\"{{id}}\"{{/if}}>\n <ul class=\"am-slides\">\n {{#each content}}\n <li{{#if thumb}} data-thumb=\"{{thumb}}\"{{/if}}>\n {{#if link}}\n <a href=\"{{link}}\" class=\"{{className}}\">\n {{/if}}\n {{#if img}}\n \t<img src=\"{{img}}\">\n {{/if}}\n {{#if desc}}\n <div class=\"am-slider-desc\">{{{desc}}}</div>\n {{/if}}\n {{#if link}}</a>{{/if}} {{!--/end link--}}\n </li>\n {{/each}}\n </ul>\n</div>\n{{/this}}");
hbs.registerPartial('tabs', "{{#this}}\n <div data-am-widget=\"tabs\"\n class=\"am-tabs{{#if theme}} am-tabs-{{theme}}{{else}} am-tabs-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"\n {{#if id}}id=\"{{id}}\"{{/if}} {{#if options.noSwipe}}data-am-tabs-noswipe=\"1\"{{/if}}>\n {{#if content}}\n <ul class=\"am-tabs-nav am-cf\">\n {{#each content}}\n <li class=\"{{#if active}}am-active{{/if}}\"><a href=\"[data-tab-panel-{{@index}}]\">{{{title}}}</a></li>\n {{/each}}\n </ul>\n <div class=\"am-tabs-bd\">\n {{#each content}}\n <div data-tab-panel-{{@index}} class=\"am-tab-panel {{#if active}}am-active{{/if}}\">\n {{{content}}}\n </div>\n {{/each}}\n </div>\n {{/if}}\n </div>\n{{/this}}\n");
hbs.registerPartial('titlebar', "{{#this}}\n<div data-am-widget=\"titlebar\" class=\"am-titlebar {{#if theme}}am-titlebar-{{theme}}{{else}}am-titlebar-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\" {{#if id}}id=\"{{id}}\"{{/if}}>\n {{#if content.title}}\n <h2 class=\"am-titlebar-title {{#unless content.link}}{{content.className}}{{/unless}}\">\n {{#if content.link}}\n <a href=\"{{content.link}}\" class=\"{{content.className}}\">{{{content.title}}}</a>\n {{else}}\n {{{content.title}}}\n {{/if}}\n </h2>\n {{/if}}\n\n {{#if content.nav}}\n <nav class=\"am-titlebar-nav\">\n {{#each content.nav}}\n <a href=\"{{link}}\" class=\"{{className}}\">{{{title}}}</a>\n {{/each}}\n </nav>\n {{/if}}\n</div>\n{{/this}}\n");
hbs.registerPartial('wechatpay', "{{#this}}\n <div data-am-widget=\"wechatpay\" class=\"am-wechatpay{{#if theme}} am-wechatpay-{{theme}}{{else}} am-wechatpay-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}\"{{#if id}} id=\"{{id}}\"{{/if}} data-wechat-pay=\"{ {{#each content.order}} {{@key}}: '{{this}}',{{/each}} }\">\n <button type=\"button\" class=\"am-btn am-btn-primary am-btn-block am-wechatpay-btn\">\n {{#if content.title}}\n {{content.title}}\n {{else}}\n 微信支付\n {{/if}}\n </button>\n </div>\n{{/this}}\n");
};
if (typeof module !== 'undefined' && module.exports) {
module.exports = registerAMUIPartials;
}
this.Handlebars && registerAMUIPartials(this.Handlebars);
}).call(this);
/*! Amaze UI v2.7.2 ~ Handlebars helper | by Amaze UI Team | (c) 2016 AllMobilize, Inc. | Licensed under MIT | 2016-08-17T16:17:24+0800 */
(function(i){"use strict";var n=function(i){i.registerHelper("ifCond",function(i,n,t,a){switch(n){case"==":return i==t?a.fn(this):a.inverse(this);case"===":return i===t?a.fn(this):a.inverse(this);case"<":return i<t?a.fn(this):a.inverse(this);case"<=":return i<=t?a.fn(this):a.inverse(this);case">":return i>t?a.fn(this):a.inverse(this);case">=":return i>=t?a.fn(this):a.inverse(this);default:return a.inverse(this)}return a.inverse(this)})};"undefined"!=typeof module&&module.exports&&(module.exports=n),this.Handlebars&&n(this.Handlebars)}).call(this),function(i){"use strict";var n=function(i){i.registerPartial("accordion",'{{#this}}\n <section data-am-widget="accordion" class="am-accordion {{#if theme}}am-accordion-{{theme}}{{else}}am-accordion-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"{{#if id}} id="{{id}}"{{/if}} data-am-accordion=\'{ {{#if options.multiple}}"multiple": true{{/if}} }\'>\n {{#each content}}\n <dl class="am-accordion-item{{#if active}} am-active{{/if}}{{#if disabled}} am-disabled{{/if}}">\n <dt class="am-accordion-title">\n {{{title}}}\n </dt>\n <dd class="am-accordion-bd am-collapse {{#if active}}am-in{{/if}}">\n <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题, 加一个容器 -->\n <div class="am-accordion-content">\n {{{content}}}\n </div>\n </dd>\n </dl>\n {{/each}}\n </section>\n{{/this}}\n'),i.registerPartial("divider",'{{#this}}\n <hr data-am-widget="divider" style="{{#if options.width}}width:{{{options.width}}};{{/if}}{{#if options.height}}height:{{{options.height}}};{{/if}}" class="am-divider {{#if theme}}am-divider-{{theme}}{{else}}am-divider-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"{{#if id}} id="{{id}}"{{/if}} />\n{{/this}}\n'),i.registerPartial("duoshuo",'{{#this}}\n <div data-am-widget="duoshuo" class="am-duoshuo{{#if theme}} am-duoshuo-{{theme}}{{else}} am-duoshuo-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"{{#if id}} id="{{id}}"{{/if}} {{#if options.shortName}}data-ds-short-name="{{options.shortName}}"{{/if}}>\n <div class="ds-thread" {{#if content}}{{#each content}}{{#ifCond @key \'==\' \'threadKey\'}} data-thread-key="{{this}}"{{else}} data-{{@key}}="{{this}}"{{/ifCond}}{{/each}}{{/if}}>\n </div>\n </div>\n{{/this}}'),i.registerPartial("figure",'{{#this}}\n <figure data-am-widget="figure" class="am am-figure {{#if theme}}am-figure-{{theme}}{{else}}am-figure-default{{/if}} {{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{#if id}}\n id="{{id}}"{{/if}} data-am-figure="{ {{#if options.zoomAble}} pureview: \'{{options.zoomAble}}\'{{/if}} }">\n {{#if content.link}}<a href="{{content.link}}" title="{{content.figcaption}}" class="{{className}}">{{/if}}\n\n {{#if options.figcaptionPosition}}\n {{#ifCond options.figcaptionPosition \'==\' \'top\'}}\n {{#if content.figcaption}}\n <figcaption class="am-figure-capition-top">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/ifCond}}\n {{/if}}\n\n {{#if content.img}}\n <img src="{{content.img}}" {{#if content.rel}}data-rel="{{content.rel}}"{{/if}} alt="{{#if content.imgAlt}}{{content.imgAlt}}{{else}}{{content.figcaption}}{{/if}}"/>\n {{/if}}\n {{#if options.figcaptionPosition}}\n {{#ifCond options.figcaptionPosition \'==\' \'bottom\'}}\n {{#if content.figcaption}}\n <figcaption class="am-figure-capition-btm">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/ifCond}}\n {{else}}\n {{#if content.figcaption}}\n <figcaption class="am-figure-capition-btm">\n {{content.figcaption}}\n </figcaption>\n {{/if}}\n {{/if}}\n\n {{#if content.link}}</a>{{/if}}\n </figure>\n{{/this}}\n'),i.registerPartial("footer",'{{#this}}\n <footer data-am-widget="footer"\n class="am-footer {{#if theme}}am-footer-{{theme}}{{else}}am-footer-default {{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n {{#if id}}id="{{id}}"{{/if}} data-am-footer="{ {{#if options.addToHS}}addToHS: 1{{/if}} }">\n <div class="am-footer-switch">\n <span class="{{#if options.modal}}am-footer-ysp{{/if}}" data-rel="mobile"\n data-am-modal="{target: \'#am-switch-mode\'}">\n {{#unless content.switchName}}\n {{#ifCond content.lang \'==\' \'en\'}}\n Mobile\n {{else}}\n 云适配版\n {{/ifCond}}\n {{else}}\n {{content.switchName}}\n {{/unless}}\n </span>\n <span class="am-footer-divider"> | </span>\n <a id="godesktop" data-rel="desktop" class="am-footer-desktop" href="javascript:">\n {{#ifCond content.lang \'==\' \'en\'}}\n Desktop\n {{else}}\n 电脑版\n {{/ifCond}}\n </a>\n </div>\n <div class="am-footer-miscs {{#if options.textPosition}}am-text-left{{/if}}">\n\n {{#if options.techSupportCo}}\n {{#ifCond content.lang \'==\' \'en\'}}\n <p>Supported by {{#if options.techSupportSite}}<a href="{{options.techSupportSite}}"\n title="{{options.techSupportCo}}"\n target="_blank"> class="{{className}}"{{{options.techSupportCo}}}</a>{{else}}{{{options.techSupportCo}}}{{/if}}\n .</p>\n {{else}}\n <p>由 {{#if options.techSupportSite}}<a href="{{options.techSupportSite}}" title="{{options.techSupportCo}}"\n target="_blank" class="{{techSupportClassName}}">{{{options.techSupportCo}}}</a>{{else}}{{{options.techSupportCo}}}{{/if}}\n 提供技术支持</p>\n {{/ifCond}}\n {{/if}}\n {{#each content.companyInfo}}\n <p>{{{detail}}}</p>\n {{/each}}\n </div>\n </footer>\n\n <div id="am-footer-modal"\n class="am-modal am-modal-no-btn am-switch-mode-m {{#if theme}}am-switch-mode-m-{{theme}}{{/if}}">\n <div class="am-modal-dialog">\n <div class="am-modal-hd am-modal-footer-hd">\n <a href="javascript:void(0)" data-dismiss="modal" class="am-close am-close-spin {{className}}" data-am-modal-close>&times;</a>\n </div>\n <div class="am-modal-bd">\n {{#ifCond content.lang \'==\' \'en\'}}\n You are visiting\n {{else}}\n 您正在浏览的是\n {{/ifCond}}\n\n <span class="am-switch-mode-owner">\n {{#if content.owner}}\n {{content.owner}}\n {{else}}\n 云适配\n {{/if}}\n </span>\n\n <span class="am-switch-mode-slogan">\n {{#if content.slogan}}\n {{{content.slogan}}}\n {{else}}\n {{#ifCond content.lang \'==\' \'en\'}}\n mobilized version for your device.\n {{else}}\n 为您当前手机订制的移动网站。\n {{/ifCond}}\n {{/if}}\n </span>\n </div>\n </div>\n </div>\n{{/this}}\n'),i.registerPartial("gallery",'{{#this}}\n <ul data-am-widget="gallery" class="am-gallery{{#if options.cols}} am-avg-sm-{{options.cols}}{{else}} am-avg-sm-2{{/if}}\n am-avg-md-3 am-avg-lg-4 {{#if\n theme}}am-gallery-{{theme}}{{else}}am-gallery-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" data-am-gallery="{ {{#if options.gallery}}pureview: true{{/if}} }" {{#if id}}id="{{id}}"{{/if}}>\n {{#each content}}\n <li>\n <div class="am-gallery-item">\n {{#if link}}\n <a href="{{link}}" class="{{className}}">\n {{#if img}}<img src="{{img}}" {{#if rel}}data-rel="{{rel}}"{{/if}} alt="{{title}}"/>{{/if}}\n {{#if title}}\n <h3 class="am-gallery-title">{{{title}}}</h3>\n {{/if}}\n {{#if desc}}\n <div class="am-gallery-desc">{{{desc}}}</div>\n {{/if}}\n </a>\n {{else}}\n {{#if img}}<img src="{{img}}" {{#if rel}}data-rel="{{rel}}"{{/if}} alt="{{title}}"/>{{/if}}\n {{#if title}}\n <h3 class="am-gallery-title">{{{title}}}</h3>\n {{/if}}\n {{#if desc}}\n <div class="am-gallery-desc">{{{desc}}}</div>\n {{/if}}\n {{/if}}\n </div>\n </li>\n {{/each}}\n </ul>\n{{/this}}\n'),i.registerPartial("gotop",'{{#this}}\n <div data-am-widget="gotop" class="am-gotop {{#if theme}}am-gotop-{{theme}}{{else}}am-gotop-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{#if id}}id="{{id}}"{{/if}}>\n <a href="#top" title="{{content.title}}">\n {{#if content.title}}\n <span class="am-gotop-title">{{content.title}}</span>\n {{/if}}\n {{#if content.customIcon}}\n <img class="am-gotop-icon-custom" src="{{content.customIcon}}" />\n {{else}}\n {{#if content.icon}}\n <i class="am-gotop-icon am-icon-{{content.icon}}"></i>\n {{else}}\n <i class="am-gotop-icon am-icon-chevron-up"></i>\n {{/if}}\n {{/if}}\n </a>\n </div>\n{{/this}}\n'),i.registerPartial("header",'{{#this}}\n <header data-am-widget="header"\n class="am-header{{#if theme}} am-header-{{theme}}{{else}} am-header-default{{/if}}{{#if options.fixed}} am-header-fixed{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"{{#if id}}\n id="{{id}}"{{/if}}>\n {{#if content.left}}\n <div class="am-header-left am-header-nav">\n {{#each content.left}}\n <a href="{{link}}" class="{{className}}">\n {{#if title}}\n <span class="am-header-nav-title">\n {{title}}\n </span>\n {{/if}}\n\n {{# if customIcon}}\n <img class="am-header-icon-custom" src="{{customIcon}}" alt=""/>\n {{else}}\n {{#if icon}}\n <i class="am-header-icon am-icon-{{icon}}"></i>\n {{/if}}\n {{/if}}\n </a>\n {{/each}}\n </div>\n {{/if}}\n\n {{#if content.title}}\n <h1 class="am-header-title">\n {{#if content.link}}\n <a href="{{content.link}}" class="{{content.className}}">\n {{{content.title}}}\n </a>\n {{else}}\n {{{content.title}}}\n {{/if}}\n </h1>\n {{/if}}\n\n {{#if content.right}}\n <div class="am-header-right am-header-nav">\n {{#each content.right}}\n <a href="{{link}}" class="{{className}}">\n {{#if title}}\n <span class="am-header-nav-title">\n {{title}}\n </span>\n {{/if}}\n\n {{# if customIcon}}\n <img class="am-header-icon-custom" src="{{customIcon}}" alt=""/>\n {{else}}\n {{#if icon}}\n <i class="am-header-icon am-icon-{{icon}}"></i>\n {{/if}}\n {{/if}}\n </a>\n {{/each}}\n </div>\n {{/if}}\n </header>\n{{/this}}\n'),i.registerPartial("intro",'{{#this }}\n <div data-am-widget="intro"\n class="am-intro am-cf {{#if theme}}am-intro-{{theme}}{{else}}am-intro-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n {{#if id}}id="{{id}}"{{/if}}>\n {{#if content.title}}\n <div class="am-intro-hd">\n <h2 class="am-intro-title">{{{content.title}}}</h2>\n {{#if content.more.link}}\n {{#ifCond options.position \'==\' \'top\'}}\n <a class="am-intro-more am-intro-more-top {{content.more.className}}" href="{{content.more.link}}">{{content.more.title}}</a>\n {{/ifCond}}\n {{/if}}\n </div>\n {{/if}}\n\n <div class="am-g am-intro-bd">\n {{#if content.left}}\n <div\n class="am-intro-left {{#if options.leftCols}}am-u-sm-{{options.leftCols}}{{/if}}">{{{content.left}}}</div>\n {{/if}}\n {{#if content.right}}\n <div\n class="am-intro-right {{#if options.rightCols}}am-u-sm-{{options.rightCols}}{{/if}}">{{{content.right}}}</div>\n {{/if}}\n </div>\n {{#ifCond options.position \'==\' \'bottom\'}}\n <div class="am-intro-more-bottom">\n <a class="am-btn am-btn-default {{content.more.className}}"\n href="{{content.more.link}}">{{content.more.title}}</a>\n </div>\n {{/ifCond}}\n </div>\n{{/this}}\n'),i.registerPartial("list_news",'{{#this}}\n <div data-am-widget="list_news" class="am-list-news{{#if theme}} am-list-news-{{theme}}{{else}} am-list-news-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{#if id}}id="{{id}}"{{/if}}>\n <!--列表标题-->\n {{#if content.header.title}}\n <div class="am-list-news-hd am-cf">\n {{#if content.header.link}} <!--带更多链接-->\n <a href="{{content.header.link}}" class="{{content.header.className}}">\n <h2>{{{content.header.title}}}</h2>\n {{#ifCond content.header.morePosition \'==\' \'top\'}}\n <span class="am-list-news-more am-fr">{{{content.header.moreText}}}</span>\n {{/ifCond}}\n </a>\n {{else}} <!--不带更多链接-->\n <h2>{{{content.header.title}}}</h2>\n {{/if}}\n </div>\n {{/if}}\n\n <div class="am-list-news-bd">\n <ul class="am-list">\n {{#ifCond options.type \'==\' \'thumb\'}}\n {{#ifCond options.thumbPosition \'==\' \'top\'}} <!--缩略图在标题上方-->\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-top{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if img}}\n <div class="am-list-thumb am-u-sm-12">\n <a href="{{link}}" class="{{className}}">\n <img src="{{img}}" alt="{{title}}"/>\n </a>\n {{#if thumbAddition}}\n <div class="am-list-thumb-addon">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class="{{#if img}}{{/if}} am-list-main">\n {{#if title}}\n <h3 class="am-list-item-hd"><a href="{{link}}" class="{{className}}">{{{title}}}</a></h3>\n {{/if}}\n\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition \'==\' \'bottom-left\'}} <!--缩略图在标题下方居左-->\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-bottom-left{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <h3 class="am-list-item-hd"><a href="{{link}}" class="{{className}}">{{{title}}}</a></h3>\n {{/if}}\n {{#if img}}\n <div class="am-u-sm-4 am-list-thumb">\n <a href="{{link}}" class="{{className}}">\n <img src="{{img}}" alt="{{title}}"/>\n </a>\n {{#if thumbAddition}}\n <div class="am-list-thumb-addon">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class="{{#if img}} am-u-sm-8 {{/if}} am-list-main">\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition \'==\' \'bottom-right\'}} <!--缩略图在标题下方居右-->\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-bottom-right{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <h3 class="am-list-item-hd"><a href="{{link}}" class="{{className}}">{{{title}}}</a></h3>\n {{/if}}\n\n <div class="{{#if img}} am-u-sm-8{{/if}} am-list-main">\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n {{#if img}}\n <div class="am-list-thumb am-u-sm-4">\n <a href="{{link}}" class="{{className}}">\n <img src="{{img}}" alt="{{title}}"/>\n </a>\n {{#if thumbAddition}}\n <div class="am-list-thumb-addon">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition \'==\' \'left\'}} <!--缩略图在标题左边-->\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-left{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if img}}\n <div class="am-u-sm-4 am-list-thumb">\n <a href="{{link}}" class="{{className}}">\n <img src="{{img}}" alt="{{title}}"/>\n </a>\n {{#if thumbAddition}}\n <div class="am-list-thumb-addon">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n\n <div class="{{#if img}} am-u-sm-8{{/if}} am-list-main">\n {{#if title}}\n <h3 class="am-list-item-hd"><a href="{{link}}" class="{{className}}">{{{title}}}</a></h3>\n {{/if}}\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{#ifCond options.thumbPosition \'==\' \'right\'}} <!--缩略图在标题右边-->\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed am-list-item-thumb-right{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n <div class="{{#if img}} am-u-sm-8{{/if}} am-list-main">\n {{#if title}}\n <h3 class="am-list-item-hd"><a href="{{link}}" class="{{className}}">{{{title}}}</a></h3>\n {{/if}}\n\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </div>\n {{#if img}}\n <div class="am-u-sm-4 am-list-thumb">\n <a href="{{link}}" class="{{className}}">\n <img src="{{img}}" alt="{{title}}"/>\n </a>\n {{#if thumbAddition}}\n <div class="am-list-thumb-addon">{{{thumbAddition}}}</div>\n {{/if}}\n </div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n\n {{else}}{{!--不带缩略图--}}\n {{#each content.main}}\n <li class="am-g{{#if date}} am-list-item-dated{{/if}}{{#if desc}} am-list-item-desced{{/if}}{{#if img}} am-list-item-thumbed{{/if}}">\n {{!--\n am-list-item-dated - 带日期\n am-list-item-desced - 带描述\n am-list-item-thumbed - 带缩略图的\n --}}\n {{#if title}}\n <a href="{{link}}" class="am-list-item-hd {{className}}">{{{title}}}</a>\n {{/if}}\n\n {{#if date}}\n <span class="am-list-date">{{date}}</span>\n {{/if}}\n\n {{#if desc}}\n <div class="am-list-item-text">{{{desc}}}</div>\n {{/if}}\n\n {{#if mainAddition}}\n <div class="am-list-news-addon">{{{mainAddition}}}</div>\n {{/if}}\n </li>\n {{/each}}\n {{/ifCond}}\n </ul>\n </div>\n\n {{#ifCond content.header.morePosition \'==\' \'bottom\'}}<!--更多在底部-->\n {{#if content.header.link}}\n <div class="am-list-news-ft">\n <a class="am-list-news-more am-btn am-btn-default {{content.header.className}}" href="{{content.header.link}}">{{{content.header.moreText}}}</a>\n </div>\n {{/if}}\n {{/ifCond}}\n </div>\n{{/this}}\n'),i.registerPartial("map",'{{#this}}\n <div data-am-widget="map" class="am-map {{#if theme}}am-map-{{theme}}{{else}}am-map-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n data-name="{{options.name}}" data-address="{{options.address}}" data-longitude="{{options.longitude}}" data-latitude="{{options.latitude}}" data-scaleControl="{{options.scaleControl}}" data-zoomControl="{{options.zoomControl}}" data-setZoom="{{options.setZoom}}" data-icon="{{options.icon}}">\n <div id="bd-map"></div>\n </div>\n{{/this}}'),i.registerPartial("mechat",'{{#this}}\n <section data-am-widget="mechat" class="am-mechat{{#if theme}} am-mechat-{{theme}}{{else}} am-mechat-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{#if id}} id="{{id}}" {{/if}} {{#if options.unitid}}data-am-mechat-unitid="{{options.unitid}}"{{/if}}>\n <div id="mechat"></div>\n </section>\n{{/this}}'),i.registerPartial("menu",'{{#this}}\n <nav data-am-widget="menu" class="am-menu {{#if theme}} am-menu-{{theme}}{{else}} am-menu-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{options.dataset}} {{#if id}}id="{{id}}"{{/if}}\n {{#ifCond theme \'==\' \'dropdown1\'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme \'==\' \'dropdown2\'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme \'==\' \'slide1\'}} data-am-menu-collapse{{/ifCond}}\n {{#ifCond theme \'==\' \'offcanvas1\'}} data-am-menu-offcanvas{{/ifCond}}\n {{#ifCond theme \'==\' \'offcanvas2\'}} data-am-menu-offcanvas{{/ifCond}}> {{!-- 与模板深耦合,与 JS 浅耦合 --}}\n <a href="javascript: void(0)" class="am-menu-toggle">\n {{#if options.toggleTitle}}\n <span class="am-menu-toggle-title">{{options.toggleTitle}}</span>\n {{/if}}\n {{#if options.toggleCustomIcon}}\n <img src="{{options.toggleCustomIcon}}" alt="Menu Toggle"/>\n {{else}}\n {{#if options.toggleIcon}}\n <i class="am-menu-toggle-icon am-icon-{{options.toggleIcon}}"></i>\n {{else}}\n <i class="am-menu-toggle-icon am-icon-bars"></i>\n {{/if}}\n {{/if}}\n </a>\n\n {{!-- offCanvas menu Wrap --}}\n {{!-- 问题:方便用户,但是与主题名称(类名)耦合过深 --}}\n {{#ifCond theme \'==\' \'offcanvas1\'}}\n <div class="am-offcanvas" {{#if options.closeOffCanvasOnclick}}data-dismiss-on="click"{{/if}}>\n <div class="am-offcanvas-bar{{#if options.offCanvasFlip}} am-offcanvas-bar-flip{{/if}}">\n {{/ifCond}}\n {{#ifCond theme \'==\' \'offcanvas2\'}}\n <div class="am-offcanvas">\n <div class="am-offcanvas-bar{{#if options.offCanvasFlip}} am-offcanvas-bar-flip{{/if}}">\n {{/ifCond}}\n\n {{#if content}}\n <ul class="am-menu-nav {{#if options.cols}}am-avg-sm-{{options\n .cols}}{{else}}am-avg-sm-1{{/if}}{{#ifCond theme \'==\' \'dropdown1\'}} am-collapse{{/ifCond}}{{#ifCond theme\n \'==\' \'dropdown2\'}} am-collapse{{/ifCond}}{{#ifCond theme\n \'==\' \'slide1\'}} am-collapse{{/ifCond}}">\n {{#each content}}\n <li class="{{#if subMenu}}am-parent{{/if}}{{#if className}} {{className}}{{/if}}">\n <a href="{{link}}" class="{{className}}" {{#if target}}target="{{target}}" {{/if}}>{{{title}}}</a>\n {{#if subMenu}}\n <ul class="am-menu-sub am-collapse {{#if subCols}} am-avg-sm-{{subCols}}{{else}}\n am-avg-sm-1{{/if}} {{subMenuClassName}}">\n {{#each subMenu}}\n <li class="{{#if subMenu}} am-parent{{/if}}{{#if className}} {{className}}{{/if}}">\n <a href="{{link}}" class="{{className}}" {{#if target}}target="{{target}}" {{/if}}>{{{title}}}</a>\n </li>\n {{/each}}\n {{!-- 显示进入栏目链接 --}}\n {{#if channelLink}}\n <li class="am-menu-nav-channel"><a href="{{link}}" class="{{className}}" title="{{title}}">{{{channelLink}}}</a></li>\n {{/if}}\n </ul>\n {{/if}}\n </li>\n {{/each}}\n </ul>\n {{/if}}\n\n {{#ifCond theme \'==\' \'offcanvas1\'}}\n </div>\n </div>\n {{/ifCond}}\n {{#ifCond theme \'==\' \'offcanvas2\'}}\n </div>\n </div>\n {{/ifCond}}\n {{!-- 不要问我为什么这样写,我也不想这样 --}}\n </nav>\n{{/this}}\n'),i.registerPartial("navbar",'{{#this}}\n <div data-am-widget="navbar" class="am-navbar am-cf {{#if theme}}am-navbar-{{theme}}{{else}}am-navbar-default{{/if}} {{#if options.iconPosition}}am-navbar-inline{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n id="{{id}}">\n {{#if content}}\n <ul class="am-navbar-nav am-cf {{#if options.cols}}am-avg-sm-{{options.cols}}{{/if}}">\n {{#each content}}\n <li {{{dataApi}}}>\n <a href="{{link}}" class="{{className}}">\n {{#if customIcon}}\n <img src="{{customIcon}}" alt="{{title}}"/>\n {{else}}\n {{#if icon}}\n <span class="am-icon-{{icon}}"></span>\n {{/if}}\n {{/if}}\n {{#if title}}\n <span class="am-navbar-label">{{title}}</span>\n {{/if}}\n </a>\n </li>\n {{/each}}\n </ul>\n {{/if}}\n </div>\n{{/this}}\n'),i.registerPartial("pagination",'{{#this}}\n <ul data-am-widget="pagination"\n class="am-pagination {{#if theme}}am-pagination-{{theme}}{{else}}am-pagination-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n {{#if id}}id="{{id}}"{{/if}}>\n\n {{#if content.firstTitle}}\n <li class="am-pagination-first {{content.firstClassName}}">\n <a href="{{content.firstLink}}" class="{{content.firstClassName}}">{{{content.firstTitle}}}</a>\n </li>\n {{/if}}\n\n {{#if content.prevTitle}}\n <li class="am-pagination-prev {{content.prevClassName}}">\n <a href="{{content.prevLink}}" class="{{content.prevClassName}}">{{{content.prevTitle}}}</a>\n </li>\n {{/if}}\n\n {{! 移除 options.select,根据主题来判断结构,无奈 handlebars 逻辑处理...}}\n\n {{#if content.page}}\n {{#ifCond theme \'==\' \'select\'}}\n <li class="am-pagination-select">\n <select>\n {{#each content.page}}\n <option value="{{link}}" class="{{className}}">{{title}}{{#if ../content.total}}\n / {{../../content.total}}{{/if}}\n </option>\n {{/each}}\n </select>\n </li>\n {{else}}\n {{#ifCond theme \'==\' \'one\'}}\n <li class="am-pagination-select">\n <select>\n {{#each content.page}}\n {{content.total}}\n <option value="{{link}}" class="{{className}}">{{title}}{{#if ../content.total}}\n / {{../../content.total}}{{/if}}\n </option>\n {{/each}}\n </select>\n </li>\n {{else}}\n {{#each content.page}}\n <li class="{{className}}">\n <a href="{{link}}" class="{{className}}">{{{title}}}</a>\n </li>\n {{/each}}\n {{/ifCond}}\n {{/ifCond}}\n\n {{/if}}\n\n {{#if content.nextTitle}}\n <li class="am-pagination-next {{content.nextClassName}}">\n <a href="{{content.nextLink}}" class="{{content.nextClassName}}">{{{content.nextTitle}}}</a>\n </li>\n {{/if}}\n\n {{#if content.lastTitle}}\n <li class="am-pagination-last {{content.lastClassName}}">\n <a href="{{content.lastLink}}" class="{{content.lastClassName}}">{{{content.lastTitle}}}</a>\n </li>\n {{/if}}\n </ul>\n{{/this}}\n'),i.registerPartial("paragraph",'{{#this}}\n <article data-am-widget="paragraph"\n class="am-paragraph {{#if theme}}am-paragraph-{{theme}}{{else}}am-paragraph-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n {{#if id}}id="{{id}}"{{/if}}\n data-am-paragraph="{ {{#if options.tableScrollable}}tableScrollable: true,{{/if}} {{#if options.imgLightbox}}pureview: true{{/if}} }">\n\n {{#if content}}\n {{{ content.content }}}\n {{/if}}\n </article>\n{{/this}}\n'),i.registerPartial("slider",'{{#this}}\n <div data-am-widget="slider" class="am-slider {{#if theme}}am-slider-{{theme}}{{else}}am-slider-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" data-am-slider=\'{{sliderConfig}}\' {{#if id}}id="{{id}}"{{/if}}>\n <ul class="am-slides">\n {{#each content}}\n <li{{#if thumb}} data-thumb="{{thumb}}"{{/if}}>\n {{#if link}}\n <a href="{{link}}" class="{{className}}">\n {{/if}}\n {{#if img}}\n \t<img src="{{img}}">\n {{/if}}\n {{#if desc}}\n <div class="am-slider-desc">{{{desc}}}</div>\n {{/if}}\n {{#if link}}</a>{{/if}} {{!--/end link--}}\n </li>\n {{/each}}\n </ul>\n</div>\n{{/this}}'),i.registerPartial("tabs",'{{#this}}\n <div data-am-widget="tabs"\n class="am-tabs{{#if theme}} am-tabs-{{theme}}{{else}} am-tabs-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"\n {{#if id}}id="{{id}}"{{/if}} {{#if options.noSwipe}}data-am-tabs-noswipe="1"{{/if}}>\n {{#if content}}\n <ul class="am-tabs-nav am-cf">\n {{#each content}}\n <li class="{{#if active}}am-active{{/if}}"><a href="[data-tab-panel-{{@index}}]">{{{title}}}</a></li>\n {{/each}}\n </ul>\n <div class="am-tabs-bd">\n {{#each content}}\n <div data-tab-panel-{{@index}} class="am-tab-panel {{#if active}}am-active{{/if}}">\n {{{content}}}\n </div>\n {{/each}}\n </div>\n {{/if}}\n </div>\n{{/this}}\n'),i.registerPartial("titlebar",'{{#this}}\n<div data-am-widget="titlebar" class="am-titlebar {{#if theme}}am-titlebar-{{theme}}{{else}}am-titlebar-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}" {{#if id}}id="{{id}}"{{/if}}>\n {{#if content.title}}\n <h2 class="am-titlebar-title {{#unless content.link}}{{content.className}}{{/unless}}">\n {{#if content.link}}\n <a href="{{content.link}}" class="{{content.className}}">{{{content.title}}}</a>\n {{else}}\n {{{content.title}}}\n {{/if}}\n </h2>\n {{/if}}\n\n {{#if content.nav}}\n <nav class="am-titlebar-nav">\n {{#each content.nav}}\n <a href="{{link}}" class="{{className}}">{{{title}}}</a>\n {{/each}}\n </nav>\n {{/if}}\n</div>\n{{/this}}\n'),
i.registerPartial("wechatpay",'{{#this}}\n <div data-am-widget="wechatpay" class="am-wechatpay{{#if theme}} am-wechatpay-{{theme}}{{else}} am-wechatpay-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}"{{#if id}} id="{{id}}"{{/if}} data-wechat-pay="{ {{#each content.order}} {{@key}}: \'{{this}}\',{{/each}} }">\n <button type="button" class="am-btn am-btn-primary am-btn-block am-wechatpay-btn">\n {{#if content.title}}\n {{content.title}}\n {{else}}\n 微信支付\n {{/if}}\n </button>\n </div>\n{{/this}}\n')};"undefined"!=typeof module&&module.exports&&(module.exports=n),this.Handlebars&&n(this.Handlebars)}.call(this);
\ No newline at end of file
(function($) {
'use strict';
$(function() {
var $fullText = $('.admin-fullText');
$('#admin-fullscreen').on('click', function() {
$.AMUI.fullscreen.toggle();
});
$(document).on($.AMUI.fullscreen.raw.fullscreenchange, function() {
$fullText.text($.AMUI.fullscreen.isFullscreen ? '退出全屏' : '开启全屏');
});
});
})(jQuery);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment