{"version":3,"sources":["jsdelivr-header.js","/npm/vue-turnjs@1.3.2/src/utils/array.js","/npm/vue-turnjs@1.3.2/src/utils/object.js","/npm/vue-turnjs@1.3.2/src/utils/env.js","/npm/vue-turnjs@1.3.2/src/utils/inspect.js","/npm/vue-turnjs@1.3.2/src/utils/clone-deep.js","/npm/vue-turnjs@1.3.2/src/utils/identity.js","/npm/vue-turnjs@1.3.2/src/utils/get.js","/npm/vue-turnjs@1.3.2/src/utils/warn.js","/npm/vue-turnjs@1.3.2/src/utils/config-defaults.js","/npm/vue-turnjs@1.3.2/src/utils/config-set.js","/npm/vue-turnjs@1.3.2/src/utils/plugin.js","/npm/vue-turnjs@1.3.2/src/lib/modernizr-custom.js","/npm/vue-turnjs@1.3.2/src/lib/jquerypp.custom.js","/npm/vue-turnjs@1.3.2/src/lib/jquery.bookblock.modified.js","/npm/vue-turnjs@1.3.2/node_modules/nanoid/url-alphabet/index.js","/npm/vue-turnjs@1.3.2/node_modules/nanoid/index.js","/npm/vue-turnjs@1.3.2/src/components/bookblock/bookblock.vue","/npm/vue-turnjs@1.3.2/node_modules/vue-runtime-helpers/dist/normalize-component.mjs","/npm/vue-turnjs@1.3.2/src/components/bookblock/index.js","/npm/vue-turnjs@1.3.2/src/components/bookblock2/bookblock2.vue","/npm/vue-turnjs@1.3.2/src/components/bookblock2/index.js","/npm/vue-turnjs@1.3.2/src/lib/turn.js","/npm/vue-turnjs@1.3.2/src/components/turn/turn.vue","/npm/vue-turnjs@1.3.2/src/components/turn/index.js","/npm/vue-turnjs@1.3.2/src/components/book/loading.vue","/npm/vue-turnjs@1.3.2/src/components/book/book.vue","/npm/vue-turnjs@1.3.2/src/components/book/index.js","/npm/vue-turnjs@1.3.2/src/components/index.js","/npm/vue-turnjs@1.3.2/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,6DCHO,MAAM,QAAU,GAAO,MAAM,QAAQ,GCQ/B,OAAS,GAAO,OAAO,OAAO,GAC9B,o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":"/npm/vue-turnjs@1.3.2/dist/vue-turnjs.esm.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vue-turnjs@1.3.2/dist/vue-turnjs.esm.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// --- Static ---\r\n\r\nexport const from = (...args) => Array.from(...args);\r\nexport const isArray = val => Array.isArray(val);\r\n\r\n// --- Instance ---\r\n\r\nexport const arrayIncludes = (array, value) => array.indexOf(value) !== -1;\r\nexport const concat = (...args) => Array.prototype.concat.apply([], args);\r\n","import { isArray } from \"./array\";\r\n\r\n// --- Static ---\r\n\r\nexport const assign = (...args) => Object.assign(...args);\r\nexport const create = (proto, optionalProps) =>\r\n  Object.create(proto, optionalProps);\r\nexport const defineProperties = (obj, props) =>\r\n  Object.defineProperties(obj, props);\r\nexport const defineProperty = (obj, prop, descriptor) =>\r\n  Object.defineProperty(obj, prop, descriptor);\r\nexport const freeze = obj => Object.freeze(obj);\r\nexport const getOwnPropertyNames = obj => Object.getOwnPropertyNames(obj);\r\nexport const getOwnPropertyDescriptor = (obj, prop) =>\r\n  Object.getOwnPropertyDescriptor(obj, prop);\r\nexport const getOwnPropertySymbols = obj => Object.getOwnPropertySymbols(obj);\r\nexport const getPrototypeOf = obj => Object.getPrototypeOf(obj);\r\nexport const is = (value1, value2) => Object.is(value1, value2);\r\nexport const isFrozen = obj => Object.isFrozen(obj);\r\nexport const keys = obj => Object.keys(obj);\r\n\r\n// --- \"Instance\" ---\r\n\r\nexport const hasOwnProperty = (obj, prop) =>\r\n  Object.prototype.hasOwnProperty.call(obj, prop);\r\nexport const toString = obj => Object.prototype.toString.call(obj);\r\n\r\n// --- Utilities ---\r\n\r\n/**\r\n * Quick object check - this is primarily used to tell\r\n * Objects from primitive values when we know the value\r\n * is a JSON-compliant type.\r\n * Note object could be a complex type like array, date, etc.\r\n */\r\nexport const isObject = obj => obj !== null && typeof obj === \"object\";\r\n\r\n/**\r\n * Strict object type check. Only returns true\r\n * for plain JavaScript objects.\r\n */\r\nexport const isPlainObject = obj =>\r\n  Object.prototype.toString.call(obj) === \"[object Object]\";\r\n\r\n/**\r\n * Shallow copy an object. If the passed in object\r\n * is null or undefined, returns an empty object\r\n */\r\nexport const clone = obj => ({ ...obj });\r\n\r\n/**\r\n * Return a shallow copy of object with the specified properties only\r\n * @link https://gist.github.com/bisubus/2da8af7e801ffd813fab7ac221aa7afc\r\n */\r\nexport const pick = (obj, props) =>\r\n  keys(obj)\r\n    .filter(key => props.indexOf(key) !== -1)\r\n    .reduce((result, key) => ({ ...result, [key]: obj[key] }), {});\r\n\r\n/**\r\n * Return a shallow copy of object with the specified properties omitted\r\n * @link https://gist.github.com/bisubus/2da8af7e801ffd813fab7ac221aa7afc\r\n */\r\nexport const omit = (obj, props) =>\r\n  keys(obj)\r\n    .filter(key => props.indexOf(key) === -1)\r\n    .reduce((result, key) => ({ ...result, [key]: obj[key] }), {});\r\n\r\n/**\r\n * Convenience method to create a read-only descriptor\r\n */\r\nexport const readonlyDescriptor = () => ({\r\n  enumerable: true,\r\n  configurable: false,\r\n  writable: false\r\n});\r\n\r\n/**\r\n * Deep-freezes and object, making it immutable / read-only.\r\n * Returns the same object passed-in, but frozen.\r\n * Freezes inner object/array/values first.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\r\n * Note: this method will not work for property values using Symbol() as a key\r\n */\r\nexport const deepFreeze = obj => {\r\n  // Retrieve the property names defined on object/array\r\n  // Note: `keys` will ignore properties that are keyed by a `Symbol()`\r\n  const props = keys(obj);\r\n  // Iterate over each prop and recursively freeze it\r\n  props.forEach(prop => {\r\n    const value = obj[prop];\r\n    // If value is a plain object or array, we deepFreeze it\r\n    obj[prop] =\r\n      value && (isPlainObject(value) || isArray(value))\r\n        ? deepFreeze(value)\r\n        : value;\r\n  });\r\n  return freeze(obj);\r\n};\r\n","/**\r\n * Utilities to get information about the current environment\r\n */\r\n\r\n// --- Constants ---\r\n\r\nexport const hasWindowSupport = typeof window !== \"undefined\";\r\nexport const hasDocumentSupport = typeof document !== \"undefined\";\r\nexport const hasNavigatorSupport = typeof navigator !== \"undefined\";\r\nexport const hasPromiseSupport = typeof Promise !== \"undefined\";\r\n/* istanbul ignore next: JSDOM always returns false */\r\nexport const hasMutationObserverSupport =\r\n  typeof MutationObserver !== \"undefined\" ||\r\n  typeof WebKitMutationObserver !== \"undefined\" ||\r\n  typeof MozMutationObserver !== \"undefined\";\r\n\r\nexport const isBrowser =\r\n  hasWindowSupport && hasDocumentSupport && hasNavigatorSupport;\r\n\r\n// Browser type sniffing\r\nexport const userAgent = isBrowser\r\n  ? window.navigator.userAgent.toLowerCase()\r\n  : \"\";\r\n\r\nexport const isJSDOM = userAgent.indexOf(\"jsdom\") > 0;\r\nexport const isIE = /msie|trident/.test(userAgent);\r\n\r\n// Determine if the browser supports the option passive for events\r\nexport const hasPassiveEventSupport = (() => {\r\n  let passiveEventSupported = false;\r\n  if (isBrowser) {\r\n    try {\r\n      const options = {\r\n        get passive() {\r\n          // This function will be called when the browser\r\n          // attempts to access the passive property.\r\n          /* istanbul ignore next: will never be called in JSDOM */\r\n          passiveEventSupported = true;\r\n        }\r\n      };\r\n      window.addEventListener(\"test\", options, options);\r\n      window.removeEventListener(\"test\", options, options);\r\n    } catch (err) {\r\n      /* istanbul ignore next: will never be called in JSDOM */\r\n      passiveEventSupported = false;\r\n    }\r\n  }\r\n  return passiveEventSupported;\r\n})();\r\n\r\nexport const hasTouchSupport =\r\n  isBrowser &&\r\n  (\"ontouchstart\" in document.documentElement || navigator.maxTouchPoints > 0);\r\n\r\nexport const hasPointerEventSupport =\r\n  isBrowser && Boolean(window.PointerEvent || window.MSPointerEvent);\r\n\r\n/* istanbul ignore next: JSDOM only checks for 'IntersectionObserver' */\r\nexport const hasIntersectionObserverSupport =\r\n  isBrowser &&\r\n  \"IntersectionObserver\" in window &&\r\n  \"IntersectionObserverEntry\" in window &&\r\n  // Edge 15 and UC Browser lack support for `isIntersecting`\r\n  // but we an use intersectionRatio > 0 instead\r\n  // 'isIntersecting' in window.IntersectionObserverEntry.prototype &&\r\n  \"intersectionRatio\" in window.IntersectionObserverEntry.prototype;\r\n\r\n// --- Getters ---\r\n\r\nexport const getEnv = (key, fallback = null) => {\r\n  const env =\r\n    typeof process !== \"undefined\" && process ? process.env || {} : {};\r\n  if (!key) {\r\n    /* istanbul ignore next */\r\n    return env;\r\n  }\r\n  return env[key] || fallback;\r\n};\r\n\r\nexport const getNoWarn = () => getEnv(\"BOOTSTRAP_VUE_NO_WARN\");\r\n","import { isArray } from \"./array\";\r\nimport { isObject, isPlainObject } from \"./object\";\r\nimport { File } from \"./safe-types\";\r\n\r\n// --- Convenience inspection utilities ---\r\n\r\nexport const toType = val => typeof val;\r\n\r\nexport const toRawType = val =>\r\n  Object.prototype.toString.call(val).slice(8, -1);\r\n\r\nexport const toRawTypeLC = val => toRawType(val).toLowerCase();\r\n\r\nexport const isUndefined = val => val === undefined;\r\n\r\nexport const isNull = val => val === null;\r\n\r\nexport const isEmptyString = val => val === \"\";\r\n\r\nexport const isUndefinedOrNull = val => isUndefined(val) || isNull(val);\r\n\r\nexport const isUndefinedOrNullOrEmpty = val =>\r\n  isUndefinedOrNull(val) || isEmptyString(val);\r\n\r\nexport const isFunction = val => toType(val) === \"function\";\r\n\r\nexport const isBoolean = val => toType(val) === \"boolean\";\r\n\r\nexport const isString = val => toType(val) === \"string\";\r\n\r\nexport const isNumber = val => toType(val) === \"number\";\r\n\r\nexport const isPrimitive = val =>\r\n  isBoolean(val) || isString(val) || isNumber(val);\r\n\r\nexport const isDate = val => val instanceof Date;\r\n\r\nexport const isEvent = val => val instanceof Event;\r\n\r\nexport const isFile = val => val instanceof File;\r\n\r\nexport const isRegExp = val => toRawType(val) === \"RegExp\";\r\n\r\nexport const isPromise = val =>\r\n  !isUndefinedOrNull(val) && isFunction(val.then) && isFunction(val.catch);\r\n\r\n// Extra convenience named re-exports\r\nexport { isArray, isObject, isPlainObject };\r\n","import { isArray, isPlainObject } from \"./inspect\";\r\nimport { keys } from \"./object\";\r\n\r\nexport const cloneDeep = (obj, defaultValue = obj) => {\r\n  if (isArray(obj)) {\r\n    return obj.reduce((result, val) => [...result, cloneDeep(val, val)], []);\r\n  }\r\n  if (isPlainObject(obj)) {\r\n    return keys(obj).reduce(\r\n      (result, key) => ({ ...result, [key]: cloneDeep(obj[key], obj[key]) }),\r\n      {}\r\n    );\r\n  }\r\n  return defaultValue;\r\n};\r\n\r\nexport default cloneDeep;\r\n","const identity = x => x;\r\n\r\nexport default identity;\r\n","import identity from \"./identity\";\r\nimport { isArray, isNull, isObject, isUndefinedOrNull } from \"./inspect\";\r\n\r\nconst RX_ARRAY_NOTATION = /\\[(\\d+)]/g;\r\n\r\n/**\r\n * Get property defined by dot/array notation in string, returns undefined if not found\r\n *\r\n * @link https://gist.github.com/jeneg/9767afdcca45601ea44930ea03e0febf#gistcomment-1935901\r\n *\r\n * @param {Object} obj\r\n * @param {string|Array} path\r\n * @return {*}\r\n */\r\nexport const getRaw = (obj, path, defaultValue = undefined) => {\r\n  // Handle array of path values\r\n  path = isArray(path) ? path.join(\".\") : path;\r\n\r\n  // If no path or no object passed\r\n  if (!path || !isObject(obj)) {\r\n    return defaultValue;\r\n  }\r\n\r\n  // Handle edge case where user has dot(s) in top-level item field key\r\n  // See https://github.com/bootstrap-vue/bootstrap-vue/issues/2762\r\n  // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters\r\n  // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463\r\n  if (path in obj) {\r\n    return obj[path];\r\n  }\r\n\r\n  // Handle string array notation (numeric indices only)\r\n  path = String(path).replace(RX_ARRAY_NOTATION, \".$1\");\r\n\r\n  const steps = path.split(\".\").filter(identity);\r\n\r\n  // Handle case where someone passes a string of only dots\r\n  if (steps.length === 0) {\r\n    return defaultValue;\r\n  }\r\n\r\n  // Traverse path in object to find result\r\n  // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters\r\n  // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463\r\n  return steps.every(\r\n    step =>\r\n      isObject(obj) && step in obj && !isUndefinedOrNull((obj = obj[step]))\r\n  )\r\n    ? obj\r\n    : isNull(obj)\r\n    ? null\r\n    : defaultValue;\r\n};\r\n\r\n/**\r\n * Get property defined by dot/array notation in string.\r\n *\r\n * @link https://gist.github.com/jeneg/9767afdcca45601ea44930ea03e0febf#gistcomment-1935901\r\n *\r\n * @param {Object} obj\r\n * @param {string|Array} path\r\n * @param {*} defaultValue (optional)\r\n * @return {*}\r\n */\r\nexport const get = (obj, path, defaultValue = null) => {\r\n  const val = getRaw(obj, path);\r\n  return isUndefinedOrNull(val) ? defaultValue : val;\r\n};\r\n\r\nexport default get;\r\n","import {\r\n  isBrowser,\r\n  hasPromiseSupport,\r\n  hasMutationObserverSupport,\r\n  getNoWarn\r\n} from \"./env\";\r\n\r\n/**\r\n * Log a warning message to the console with BootstrapVue formatting\r\n * @param {string} message\r\n */\r\nexport const warn = (message, source = null) => /* istanbul ignore next */ {\r\n  if (!getNoWarn()) {\r\n    console.warn(\r\n      `[BootstrapVue warn]: ${source ? `${source} - ` : \"\"}${message}`\r\n    );\r\n  }\r\n};\r\n\r\n/**\r\n * Warn when no Promise support is given\r\n * @param {string} source\r\n * @returns {boolean} warned\r\n */\r\nexport const warnNotClient = source => {\r\n  /* istanbul ignore else */\r\n  if (isBrowser) {\r\n    return false;\r\n  } else {\r\n    warn(`${source}: Can not be called during SSR.`);\r\n    return true;\r\n  }\r\n};\r\n\r\n/**\r\n * Warn when no Promise support is given\r\n * @param {string} source\r\n * @returns {boolean} warned\r\n */\r\nexport const warnNoPromiseSupport = source => {\r\n  /* istanbul ignore else */\r\n  if (hasPromiseSupport) {\r\n    return false;\r\n  } else {\r\n    warn(`${source}: Requires Promise support.`);\r\n    return true;\r\n  }\r\n};\r\n\r\n/**\r\n * Warn when no MutationObserver support is given\r\n * @param {string} source\r\n * @returns {boolean} warned\r\n */\r\nexport const warnNoMutationObserverSupport = source => {\r\n  /* istanbul ignore else */\r\n  if (hasMutationObserverSupport) {\r\n    return false;\r\n  } else {\r\n    warn(`${source}: Requires MutationObserver support.`);\r\n    return true;\r\n  }\r\n};\r\n","import { deepFreeze } from \"./object\";\r\n\r\n// --- General BootstrapVue configuration ---\r\n\r\n// NOTES\r\n//\r\n// The global config SHALL NOT be used to set defaults for Boolean props, as the props\r\n// would loose their semantic meaning, and force people writing 3rd party components to\r\n// explicitly set a true or false value using the v-bind syntax on boolean props\r\n//\r\n// Supported config values (depending on the prop's supported type(s)):\r\n// `String`, `Array`, `Object`, `null` or `undefined`\r\n\r\n// BREAKPOINT DEFINITIONS\r\n//\r\n// Some components (`<b-col>` and `<b-form-group>`) generate props based on breakpoints,\r\n// and this occurs when the component is first loaded (evaluated), which may happen\r\n// before the config is created/modified\r\n//\r\n// To get around this we make these components' props async (lazy evaluation)\r\n// The component definition is only called/executed when the first access to the\r\n// component is used (and cached on subsequent uses)\r\n\r\n// PROP DEFAULTS\r\n//\r\n// For default values on props, we use the default value factory function approach so\r\n// that the default values are pulled in at each component instantiation\r\n//\r\n//  props: {\r\n//    variant: {\r\n//      type: String,\r\n//      default: () => getConfigComponent('BAlert', 'variant')\r\n//    }\r\n//  }\r\n//\r\n// We also provide a cached getter for breakpoints, which are \"frozen\" on first access\r\n\r\n// prettier-ignore\r\nexport default deepFreeze({\r\n  FwBookblock: {},\r\n  FwBookblock2: {},\r\n  FwTurn: {}\r\n})\r\n","import Vue from \"vue\";\r\nimport cloneDeep from \"./clone-deep\";\r\nimport { getRaw } from \"./get\";\r\nimport { isArray, isPlainObject, isString, isUndefined } from \"./inspect\";\r\nimport { getOwnPropertyNames, hasOwnProperty } from \"./object\";\r\nimport { warn } from \"./warn\";\r\nimport DEFAULTS from \"./config-defaults\";\r\n\r\n// --- Constants ---\r\n\r\nconst NAME = \"BvConfig\";\r\nconst PROP_NAME = \"$bvConfig\";\r\n\r\n// Config manager class\r\nclass BvConfig {\r\n  constructor() {\r\n    // TODO: pre-populate with default config values (needs updated tests)\r\n    // this.$_config = cloneDeep(DEFAULTS)\r\n    this.$_config = {};\r\n    this.$_cachedBreakpoints = null;\r\n  }\r\n\r\n  /* istanbul ignore next */\r\n  static get Defaults() /* istanbul ignore next */ {\r\n    return DEFAULTS;\r\n  }\r\n\r\n  /* istanbul ignore next */\r\n  get defaults() /* istanbul ignore next */ {\r\n    return DEFAULTS;\r\n  }\r\n\r\n  // Returns the defaults\r\n  /* istanbul ignore next */\r\n  getDefaults() /* istanbul ignore next */ {\r\n    return this.defaults;\r\n  }\r\n\r\n  // Method to merge in user config parameters\r\n  setConfig(config = {}) {\r\n    if (!isPlainObject(config)) {\r\n      /* istanbul ignore next */\r\n      return;\r\n    }\r\n    const configKeys = getOwnPropertyNames(config);\r\n    configKeys.forEach(cmpName => {\r\n      /* istanbul ignore next */\r\n      if (!hasOwnProperty(DEFAULTS, cmpName)) {\r\n        warn(`Unknown config property \"${cmpName}\"`, NAME);\r\n        return;\r\n      }\r\n      const cmpConfig = config[cmpName];\r\n      if (cmpName === \"breakpoints\") {\r\n        // Special case for breakpoints\r\n        const breakpoints = config.breakpoints;\r\n        /* istanbul ignore if */\r\n        if (\r\n          !isArray(breakpoints) ||\r\n          breakpoints.length < 2 ||\r\n          breakpoints.some(b => !isString(b) || b.length === 0)\r\n        ) {\r\n          warn(\r\n            '\"breakpoints\" must be an array of at least 2 breakpoint names',\r\n            NAME\r\n          );\r\n        } else {\r\n          this.$_config.breakpoints = cloneDeep(breakpoints);\r\n        }\r\n      } else if (isPlainObject(cmpConfig)) {\r\n        // Component prop defaults\r\n        const props = getOwnPropertyNames(cmpConfig);\r\n        props.forEach(prop => {\r\n          /* istanbul ignore if */\r\n          if (!hasOwnProperty(DEFAULTS[cmpName], prop)) {\r\n            warn(`Unknown config property \"${cmpName}.${prop}\"`, NAME);\r\n          } else {\r\n            // TODO: If we pre-populate the config with defaults, we can skip this line\r\n            this.$_config[cmpName] = this.$_config[cmpName] || {};\r\n            if (!isUndefined(cmpConfig[prop])) {\r\n              this.$_config[cmpName][prop] = cloneDeep(cmpConfig[prop]);\r\n            }\r\n          }\r\n        });\r\n      }\r\n    });\r\n  }\r\n\r\n  // Clear the config. For testing purposes only\r\n  resetConfig() {\r\n    this.$_config = {};\r\n  }\r\n\r\n  // Returns a deep copy of the user config\r\n  getConfig() {\r\n    return cloneDeep(this.$_config);\r\n  }\r\n\r\n  getConfigValue(key) {\r\n    // First we try the user config, and if key not found we fall back to default value\r\n    // NOTE: If we deep clone DEFAULTS into config, then we can skip the fallback for get\r\n    return cloneDeep(getRaw(this.$_config, key, getRaw(DEFAULTS, key)));\r\n  }\r\n}\r\n\r\n// Method for applying a global config\r\nexport const setConfig = (config = {}, Vue = Vue) => {\r\n  // Ensure we have a $bvConfig Object on the Vue prototype.\r\n  // We set on Vue and Vue just in case consumer has not set an alias of `vue`.\r\n  Vue.prototype[PROP_NAME] = Vue.prototype[PROP_NAME] =\r\n    Vue.prototype[PROP_NAME] || Vue.prototype[PROP_NAME] || new BvConfig();\r\n  // Apply the config values\r\n  Vue.prototype[PROP_NAME].setConfig(config);\r\n};\r\n\r\n// Method for resetting the user config. Exported for testing purposes only.\r\nexport const resetConfig = () => {\r\n  if (Vue.prototype[PROP_NAME] && Vue.prototype[PROP_NAME].resetConfig) {\r\n    Vue.prototype[PROP_NAME].resetConfig();\r\n  }\r\n};\r\n","import Vue from \"vue\";\r\nimport { setConfig } from \"./config-set\";\r\nimport { hasWindowSupport, isJSDOM } from \"./env\";\r\nimport { warn } from \"./warn\";\r\n\r\n/**\r\n * Checks if there are multiple instances of Vue, and warns (once) about possible issues.\r\n * @param {object} Vue\r\n */\r\nexport const checkMultipleVue = (() => {\r\n  let checkMultipleVueWarned = false;\r\n\r\n  const MULTIPLE_VUE_WARNING = [\r\n    \"Multiple instances of Vue detected!\",\r\n    \"You may need to set up an alias for Vue in your bundler config.\",\r\n    \"See: https://bootstrap-vue.org/docs#using-module-bundlers\"\r\n  ].join(\"\\n\");\r\n\r\n  return Vue => {\r\n    /* istanbul ignore next */\r\n    if (!checkMultipleVueWarned && Vue !== Vue && !isJSDOM) {\r\n      warn(MULTIPLE_VUE_WARNING);\r\n    }\r\n    checkMultipleVueWarned = true;\r\n  };\r\n})();\r\n\r\n/**\r\n * Plugin install factory function.\r\n * @param {object} { components, directives }\r\n * @returns {function} plugin install function\r\n */\r\nexport const installFactory = ({ components, directives, plugins } = {}) => {\r\n  const install = (Vue, config = {}) => {\r\n    if (install.installed) {\r\n      /* istanbul ignore next */\r\n      return;\r\n    }\r\n    install.installed = true;\r\n    checkMultipleVue(Vue);\r\n    setConfig(config, Vue);\r\n    registerComponents(Vue, components);\r\n    registerDirectives(Vue, directives);\r\n    registerPlugins(Vue, plugins);\r\n  };\r\n\r\n  install.installed = false;\r\n\r\n  return install;\r\n};\r\n\r\n/**\r\n * Plugin install factory function (no plugin config option).\r\n * @param {object} { components, directives }\r\n * @returns {function} plugin install function\r\n */\r\nexport const installFactoryNoConfig = ({\r\n  components,\r\n  directives,\r\n  plugins\r\n} = {}) => {\r\n  const install = Vue => {\r\n    if (install.installed) {\r\n      /* istanbul ignore next */\r\n      return;\r\n    }\r\n    install.installed = true;\r\n    checkMultipleVue(Vue);\r\n    registerComponents(Vue, components);\r\n    registerDirectives(Vue, directives);\r\n    registerPlugins(Vue, plugins);\r\n  };\r\n\r\n  install.installed = false;\r\n\r\n  return install;\r\n};\r\n\r\n/**\r\n * Plugin object factory function.\r\n * @param {object} { components, directives, plugins }\r\n * @returns {object} plugin install object\r\n */\r\nexport const pluginFactory = (options = {}, extend = {}) => ({\r\n  ...extend,\r\n  install: installFactory(options)\r\n});\r\n\r\n/**\r\n * Plugin object factory function (no config option).\r\n * @param {object} { components, directives, plugins }\r\n * @returns {object} plugin install object\r\n */\r\nexport const pluginFactoryNoConfig = (options = {}, extend = {}) => ({\r\n  ...extend,\r\n  install: installFactoryNoConfig(options)\r\n});\r\n\r\n/**\r\n * Load a group of plugins.\r\n * @param {object} Vue\r\n * @param {object} Plugin definitions\r\n */\r\nexport const registerPlugins = (Vue, plugins = {}) => {\r\n  for (const plugin in plugins) {\r\n    if (plugin && plugins[plugin]) {\r\n      Vue.use(plugins[plugin]);\r\n    }\r\n  }\r\n};\r\n\r\n/**\r\n * Load a component.\r\n * @param {object} Vue\r\n * @param {string} Component name\r\n * @param {object} Component definition\r\n */\r\nexport const registerComponent = (Vue, name, def) => {\r\n  if (Vue && name && def) {\r\n    Vue.component(name, def);\r\n  }\r\n};\r\n\r\n/**\r\n * Load a group of components.\r\n * @param {object} Vue\r\n * @param {object} Object of component definitions\r\n */\r\nexport const registerComponents = (Vue, components = {}) => {\r\n  for (const component in components) {\r\n    registerComponent(Vue, component, components[component]);\r\n  }\r\n};\r\n\r\n/**\r\n * Load a directive.\r\n * @param {object} Vue\r\n * @param {string} Directive name\r\n * @param {object} Directive definition\r\n */\r\nexport const registerDirective = (Vue, name, def) => {\r\n  if (Vue && name && def) {\r\n    // Ensure that any leading V is removed from the\r\n    // name, as Vue adds it automatically\r\n    Vue.directive(name.replace(/^VB/, \"B\"), def);\r\n  }\r\n};\r\n\r\n/**\r\n * Load a group of directives.\r\n * @param {object} Vue\r\n * @param {object} Object of directive definitions\r\n */\r\nexport const registerDirectives = (Vue, directives = {}) => {\r\n  for (const directive in directives) {\r\n    registerDirective(Vue, directive, directives[directive]);\r\n  }\r\n};\r\n\r\n/**\r\n * Install plugin if window.Vue available\r\n * @param {object} Plugin definition\r\n */\r\nexport const vueUse = VuePlugin => {\r\n  /* istanbul ignore next */\r\n  if (hasWindowSupport && window.Vue) {\r\n    window.Vue.use(VuePlugin);\r\n  }\r\n  /* istanbul ignore next */\r\n  if (hasWindowSupport && VuePlugin.NAME) {\r\n    window[VuePlugin.NAME] = VuePlugin;\r\n  }\r\n};\r\n","/*!\n * modernizr v3.6.0\n * Build https://modernizr.com/download?-csstransforms3d-csstransitions-preserve3d-addtest-prefixed-teststyles-dontmin\n *\n * Copyright (c)\n *  Faruk Ates\n *  Paul Irish\n *  Alex Sexton\n *  Ryan Seddon\n *  Patrick Kettner\n *  Stu Cox\n *  Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `<html>` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n */\n\n(function(window, document, undefined) {\n  var tests = [];\n\n  /**\n   *\n   * ModernizrProto is the constructor for Modernizr\n   *\n   * @class\n   * @access public\n   */\n\n  var ModernizrProto = {\n    // The current version, dummy\n    _version: \"3.6.0\",\n\n    // Any settings that don't work as separate modules\n    // can go in here as configuration.\n    _config: {\n      classPrefix: \"\",\n      enableClasses: true,\n      enableJSClass: true,\n      usePrefixes: true\n    },\n\n    // Queue of tests\n    _q: [],\n\n    // Stub these for people who are listening\n    on: function(test, cb) {\n      // I don't really think people should do this, but we can\n      // safe guard it a bit.\n      // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n      // This is in case people listen to synchronous tests. I would leave it out,\n      // but the code to *disallow* sync tests in the real version of this\n      // function is actually larger than this.\n      var self = this;\n      setTimeout(function() {\n        cb(self[test]);\n      }, 0);\n    },\n\n    addTest: function(name, fn, options) {\n      tests.push({ name: name, fn: fn, options: options });\n    },\n\n    addAsyncTest: function(fn) {\n      tests.push({ name: null, fn: fn });\n    }\n  };\n\n  // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n  var Modernizr = function() {};\n  Modernizr.prototype = ModernizrProto;\n\n  // Leak modernizr globally when you `require` it rather than force it here.\n  // Overwrite name so constructor name is nicer :D\n  Modernizr = new Modernizr();\n\n  var classes = [];\n\n  /**\n   * is returns a boolean if the typeof an obj is exactly type.\n   *\n   * @access private\n   * @function is\n   * @param {*} obj - A thing we want to check the type of\n   * @param {string} type - A string to compare the typeof against\n   * @returns {boolean}\n   */\n\n  function is(obj, type) {\n    return typeof obj === type;\n  }\n  /**\n   * Run through all tests and detect their support in the current UA.\n   *\n   * @access private\n   */\n\n  function testRunner() {\n    var featureNames;\n    var feature;\n    var aliasIdx;\n    var result;\n    var nameIdx;\n    var featureName;\n    var featureNameSplit;\n\n    for (var featureIdx in tests) {\n      if (tests.hasOwnProperty(featureIdx)) {\n        featureNames = [];\n        feature = tests[featureIdx];\n        // run the test, throw the return value into the Modernizr,\n        // then based on that boolean, define an appropriate className\n        // and push it into an array of classes we'll join later.\n        //\n        // If there is no name, it's an 'async' test that is run,\n        // but not directly added to the object. That should\n        // be done with a post-run addTest call.\n        if (feature.name) {\n          featureNames.push(feature.name.toLowerCase());\n\n          if (\n            feature.options &&\n            feature.options.aliases &&\n            feature.options.aliases.length\n          ) {\n            // Add all the aliases into the names list\n            for (\n              aliasIdx = 0;\n              aliasIdx < feature.options.aliases.length;\n              aliasIdx++\n            ) {\n              featureNames.push(\n                feature.options.aliases[aliasIdx].toLowerCase()\n              );\n            }\n          }\n        }\n\n        // Run the test, or use the raw value if it's not a function\n        result = is(feature.fn, \"function\") ? feature.fn() : feature.fn;\n\n        // Set each of the names on the Modernizr object\n        for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n          featureName = featureNames[nameIdx];\n          // Support dot properties as sub tests. We don't do checking to make sure\n          // that the implied parent tests have been added. You must call them in\n          // order (either in the test, or make the parent test a dependency).\n          //\n          // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n          // hashtag famous last words\n          featureNameSplit = featureName.split(\".\");\n\n          if (featureNameSplit.length === 1) {\n            Modernizr[featureNameSplit[0]] = result;\n          } else {\n            // cast to a Boolean, if not one already\n            if (\n              Modernizr[featureNameSplit[0]] &&\n              !(Modernizr[featureNameSplit[0]] instanceof Boolean)\n            ) {\n              Modernizr[featureNameSplit[0]] = new Boolean(\n                Modernizr[featureNameSplit[0]]\n              );\n            }\n\n            Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n          }\n\n          classes.push((result ? \"\" : \"no-\") + featureNameSplit.join(\"-\"));\n        }\n      }\n    }\n  }\n  /**\n   * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support\n   *\n   * @author kangax\n   * @access private\n   * @function hasOwnProp\n   * @param {object} object - The object to check for a property\n   * @param {string} property - The property to check for\n   * @returns {boolean}\n   */\n\n  // hasOwnProperty shim by kangax needed for Safari 2.0 support\n  var hasOwnProp;\n\n  (function() {\n    var _hasOwnProperty = {}.hasOwnProperty;\n    /* istanbul ignore else */\n    /* we have no way of testing IE 5.5 or safari 2,\n     * so just assume the else gets hit */\n    if (\n      !is(_hasOwnProperty, \"undefined\") &&\n      !is(_hasOwnProperty.call, \"undefined\")\n    ) {\n      hasOwnProp = function(object, property) {\n        return _hasOwnProperty.call(object, property);\n      };\n    } else {\n      hasOwnProp = function(object, property) {\n        /* yes, this can give false positives/negatives, but most of the time we don't care about those */\n        return (\n          property in object &&\n          is(object.constructor.prototype[property], \"undefined\")\n        );\n      };\n    }\n  })();\n\n  /**\n   * cssToDOM takes a kebab-case string and converts it to camelCase\n   * e.g. box-sizing -> boxSizing\n   *\n   * @access private\n   * @function cssToDOM\n   * @param {string} name - String name of kebab-case prop we want to convert\n   * @returns {string} The camelCase version of the supplied name\n   */\n\n  function cssToDOM(name) {\n    return name\n      .replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n        return m1 + m2.toUpperCase();\n      })\n      .replace(/^-/, \"\");\n  }\n  /*!\n{\n  \"name\": \"CSS Supports\",\n  \"property\": \"supports\",\n  \"caniuse\": \"css-featurequeries\",\n  \"tags\": [\"css\"],\n  \"builderAliases\": [\"css_supports\"],\n  \"notes\": [{\n    \"name\": \"W3 Spec\",\n    \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n  },{\n    \"name\": \"Related Github Issue\",\n    \"href\": \"https://github.com/Modernizr/Modernizr/issues/648\"\n  },{\n    \"name\": \"W3 Info\",\n    \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n  }]\n}\n!*/\n\n  var newSyntax = \"CSS\" in window && \"supports\" in window.CSS;\n  var oldSyntax = \"supportsCSS\" in window;\n  Modernizr.addTest(\"supports\", newSyntax || oldSyntax);\n\n  /**\n   * docElement is a convenience wrapper to grab the root element of the document\n   *\n   * @access private\n   * @returns {HTMLElement|SVGElement} The root element of the document\n   */\n\n  var docElement = document.documentElement;\n\n  /**\n   * A convenience helper to check if the document we are running in is an SVG document\n   *\n   * @access private\n   * @returns {boolean}\n   */\n\n  var isSVG = docElement.nodeName.toLowerCase() === \"svg\";\n\n  /**\n   * setClasses takes an array of class names and adds them to the root element\n   *\n   * @access private\n   * @function setClasses\n   * @param {string[]} classes - Array of class names\n   */\n\n  // Pass in an and array of class names, e.g.:\n  //  ['no-webp', 'borderradius', ...]\n  function setClasses(classes) {\n    var className = docElement.className;\n    var classPrefix = Modernizr._config.classPrefix || \"\";\n\n    if (isSVG) {\n      className = className.baseVal;\n    }\n\n    // Change `no-js` to `js` (independently of the `enableClasses` option)\n    // Handle classPrefix on this too\n    if (Modernizr._config.enableJSClass) {\n      var reJS = new RegExp(\"(^|\\\\s)\" + classPrefix + \"no-js(\\\\s|$)\");\n      className = className.replace(reJS, \"$1\" + classPrefix + \"js$2\");\n    }\n\n    if (Modernizr._config.enableClasses) {\n      // Add the new classes\n      className += \" \" + classPrefix + classes.join(\" \" + classPrefix);\n      if (isSVG) {\n        docElement.className.baseVal = className;\n      } else {\n        docElement.className = className;\n      }\n    }\n  }\n\n  // _l tracks listeners for async tests, as well as tests that execute after the initial run\n  ModernizrProto._l = {};\n\n  /**\n   * Modernizr.on is a way to listen for the completion of async tests. Being\n   * asynchronous, they may not finish before your scripts run. As a result you\n   * will get a possibly false negative `undefined` value.\n   *\n   * @memberof Modernizr\n   * @name Modernizr.on\n   * @access public\n   * @function on\n   * @param {string} feature - String name of the feature detect\n   * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not\n   * @example\n   *\n   * ```js\n   * Modernizr.on('flash', function( result ) {\n   *   if (result) {\n   *    // the browser has flash\n   *   } else {\n   *     // the browser does not have flash\n   *   }\n   * });\n   * ```\n   */\n\n  ModernizrProto.on = function(feature, cb) {\n    // Create the list of listeners if it doesn't exist\n    if (!this._l[feature]) {\n      this._l[feature] = [];\n    }\n\n    // Push this test on to the listener list\n    this._l[feature].push(cb);\n\n    // If it's already been resolved, trigger it on next tick\n    if (Modernizr.hasOwnProperty(feature)) {\n      // Next Tick\n      setTimeout(function() {\n        Modernizr._trigger(feature, Modernizr[feature]);\n      }, 0);\n    }\n  };\n\n  /**\n   * _trigger is the private function used to signal test completion and run any\n   * callbacks registered through [Modernizr.on](#modernizr-on)\n   *\n   * @memberof Modernizr\n   * @name Modernizr._trigger\n   * @access private\n   * @function _trigger\n   * @param {string} feature - string name of the feature detect\n   * @param {function|boolean} [res] - A feature detection function, or the boolean =\n   * result of a feature detection function\n   */\n\n  ModernizrProto._trigger = function(feature, res) {\n    if (!this._l[feature]) {\n      return;\n    }\n\n    var cbs = this._l[feature];\n\n    // Force async\n    setTimeout(function() {\n      var i, cb;\n      for (i = 0; i < cbs.length; i++) {\n        cb = cbs[i];\n        cb(res);\n      }\n    }, 0);\n\n    // Don't trigger these again\n    delete this._l[feature];\n  };\n\n  /**\n   * addTest allows you to define your own feature detects that are not currently\n   * included in Modernizr (under the covers it's the exact same code Modernizr\n   * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result\n   * will be added onto the Modernizr object, as well as an appropriate className set on\n   * the html element when configured to do so\n   *\n   * @memberof Modernizr\n   * @name Modernizr.addTest\n   * @optionName Modernizr.addTest()\n   * @optionProp addTest\n   * @access public\n   * @function addTest\n   * @param {string|object} feature - The string name of the feature detect, or an\n   * object of feature detect names and test\n   * @param {function|boolean} test - Function returning true if feature is supported,\n   * false if not. Otherwise a boolean representing the results of a feature detection\n   * @example\n   *\n   * The most common way of creating your own feature detects is by calling\n   * `Modernizr.addTest` with a string (preferably just lowercase, without any\n   * punctuation), and a function you want executed that will return a boolean result\n   *\n   * ```js\n   * Modernizr.addTest('itsTuesday', function() {\n   *  var d = new Date();\n   *  return d.getDay() === 2;\n   * });\n   * ```\n   *\n   * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,\n   * and to `false` every other day of the week. One thing to notice is that the names of\n   * feature detect functions are always lowercased when added to the Modernizr object. That\n   * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.\n   *\n   *\n   *  Since we only look at the returned value from any feature detection function,\n   *  you do not need to actually use a function. For simple detections, just passing\n   *  in a statement that will return a boolean value works just fine.\n   *\n   * ```js\n   * Modernizr.addTest('hasJquery', 'jQuery' in window);\n   * ```\n   *\n   * Just like before, when the above runs `Modernizr.hasjquery` will be true if\n   * jQuery has been included on the page. Not using a function saves a small amount\n   * of overhead for the browser, as well as making your code much more readable.\n   *\n   * Finally, you also have the ability to pass in an object of feature names and\n   * their tests. This is handy if you want to add multiple detections in one go.\n   * The keys should always be a string, and the value can be either a boolean or\n   * function that returns a boolean.\n   *\n   * ```js\n   * var detects = {\n   *  'hasjquery': 'jQuery' in window,\n   *  'itstuesday': function() {\n   *    var d = new Date();\n   *    return d.getDay() === 2;\n   *  }\n   * }\n   *\n   * Modernizr.addTest(detects);\n   * ```\n   *\n   * There is really no difference between the first methods and this one, it is\n   * just a convenience to let you write more readable code.\n   */\n\n  function addTest(feature, test) {\n    if (typeof feature == \"object\") {\n      for (var key in feature) {\n        if (hasOwnProp(feature, key)) {\n          addTest(key, feature[key]);\n        }\n      }\n    } else {\n      feature = feature.toLowerCase();\n      var featureNameSplit = feature.split(\".\");\n      var last = Modernizr[featureNameSplit[0]];\n\n      // Again, we don't check for parent test existence. Get that right, though.\n      if (featureNameSplit.length == 2) {\n        last = last[featureNameSplit[1]];\n      }\n\n      if (typeof last != \"undefined\") {\n        // we're going to quit if you're trying to overwrite an existing test\n        // if we were to allow it, we'd do this:\n        //   var re = new RegExp(\"\\\\b(no-)?\" + feature + \"\\\\b\");\n        //   docElement.className = docElement.className.replace( re, '' );\n        // but, no rly, stuff 'em.\n        return Modernizr;\n      }\n\n      test = typeof test == \"function\" ? test() : test;\n\n      // Set the value (this is the magic, right here).\n      if (featureNameSplit.length == 1) {\n        Modernizr[featureNameSplit[0]] = test;\n      } else {\n        // cast to a Boolean, if not one already\n        if (\n          Modernizr[featureNameSplit[0]] &&\n          !(Modernizr[featureNameSplit[0]] instanceof Boolean)\n        ) {\n          Modernizr[featureNameSplit[0]] = new Boolean(\n            Modernizr[featureNameSplit[0]]\n          );\n        }\n\n        Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;\n      }\n\n      // Set a single class (either `feature` or `no-feature`)\n      setClasses([\n        (!!test && test != false ? \"\" : \"no-\") + featureNameSplit.join(\"-\")\n      ]);\n\n      // Trigger the event\n      Modernizr._trigger(feature, test);\n    }\n\n    return Modernizr; // allow chaining.\n  }\n\n  // After all the tests are run, add self to the Modernizr prototype\n  Modernizr._q.push(function() {\n    ModernizrProto.addTest = addTest;\n  });\n\n  /**\n   * createElement is a convenience wrapper around document.createElement. Since we\n   * use createElement all over the place, this allows for (slightly) smaller code\n   * as well as abstracting away issues with creating elements in contexts other than\n   * HTML documents (e.g. SVG documents).\n   *\n   * @access private\n   * @function createElement\n   * @returns {HTMLElement|SVGElement} An HTML or SVG element\n   */\n\n  function createElement() {\n    if (typeof document.createElement !== \"function\") {\n      // This is the case in IE7, where the type of createElement is \"object\".\n      // For this reason, we cannot call apply() as Object is not a Function.\n      return document.createElement(arguments[0]);\n    } else if (isSVG) {\n      return document.createElementNS.call(\n        document,\n        \"http://www.w3.org/2000/svg\",\n        arguments[0]\n      );\n    } else {\n      return document.createElement.apply(document, arguments);\n    }\n  }\n\n  /*!\n{\n  \"name\": \"CSS Transform Style preserve-3d\",\n  \"property\": \"preserve3d\",\n  \"authors\": [\"denyskoch\", \"aFarkas\"],\n  \"tags\": [\"css\"],\n  \"notes\": [{\n    \"name\": \"MDN Docs\",\n    \"href\": \"https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style\"\n  },{\n    \"name\": \"Related Github Issue\",\n    \"href\": \"https://github.com/Modernizr/Modernizr/issues/1748\"\n  }]\n}\n!*/\n  /* DOC\nDetects support for `transform-style: preserve-3d`, for getting a proper 3D perspective on elements.\n*/\n\n  Modernizr.addTest(\"preserve3d\", function() {\n    var outerAnchor, innerAnchor;\n    var CSS = window.CSS;\n    var result = false;\n\n    if (CSS && CSS.supports && CSS.supports(\"(transform-style: preserve-3d)\")) {\n      return true;\n    }\n\n    outerAnchor = createElement(\"a\");\n    innerAnchor = createElement(\"a\");\n\n    outerAnchor.style.cssText =\n      \"display: block; transform-style: preserve-3d; transform-origin: right; transform: rotateY(40deg);\";\n    innerAnchor.style.cssText =\n      \"display: block; width: 9px; height: 1px; background: #000; transform-origin: right; transform: rotateY(40deg);\";\n\n    outerAnchor.appendChild(innerAnchor);\n    docElement.appendChild(outerAnchor);\n\n    result = innerAnchor.getBoundingClientRect();\n    docElement.removeChild(outerAnchor);\n\n    result = result.width && result.width < 4;\n    return result;\n  });\n\n  /**\n   * getBody returns the body of a document, or an element that can stand in for\n   * the body if a real body does not exist\n   *\n   * @access private\n   * @function getBody\n   * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n   * artificially created element that stands in for the body\n   */\n\n  function getBody() {\n    // After page load injecting a fake body doesn't work so check if body exists\n    var body = document.body;\n\n    if (!body) {\n      // Can't use the real body create a fake one.\n      body = createElement(isSVG ? \"svg\" : \"body\");\n      body.fake = true;\n    }\n\n    return body;\n  }\n\n  /**\n   * injectElementWithStyles injects an element with style element and some CSS rules\n   *\n   * @access private\n   * @function injectElementWithStyles\n   * @param {string} rule - String representing a css rule\n   * @param {function} callback - A function that is used to test the injected element\n   * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n   * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n   * @returns {boolean}\n   */\n\n  function injectElementWithStyles(rule, callback, nodes, testnames) {\n    var mod = \"modernizr\";\n    var style;\n    var ret;\n    var node;\n    var docOverflow;\n    var div = createElement(\"div\");\n    var body = getBody();\n\n    if (parseInt(nodes, 10)) {\n      // In order not to give false positives we create a node for each test\n      // This also allows the method to scale for unspecified uses\n      while (nodes--) {\n        node = createElement(\"div\");\n        node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n        div.appendChild(node);\n      }\n    }\n\n    style = createElement(\"style\");\n    style.type = \"text/css\";\n    style.id = \"s\" + mod;\n\n    // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n    // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n    (!body.fake ? div : body).appendChild(style);\n    body.appendChild(div);\n\n    if (style.styleSheet) {\n      style.styleSheet.cssText = rule;\n    } else {\n      style.appendChild(document.createTextNode(rule));\n    }\n    div.id = mod;\n\n    if (body.fake) {\n      //avoid crashing IE8, if background image is used\n      body.style.background = \"\";\n      //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n      body.style.overflow = \"hidden\";\n      docOverflow = docElement.style.overflow;\n      docElement.style.overflow = \"hidden\";\n      docElement.appendChild(body);\n    }\n\n    ret = callback(div, rule);\n    // If this is done after page load we don't want to remove the body so check if body exists\n    if (body.fake) {\n      body.parentNode.removeChild(body);\n      docElement.style.overflow = docOverflow;\n      // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n      // eslint-disable-next-line\n      docElement.offsetHeight;\n    } else {\n      div.parentNode.removeChild(div);\n    }\n\n    return !!ret;\n  }\n\n  /**\n   * testStyles injects an element with style element and some CSS rules\n   *\n   * @memberof Modernizr\n   * @name Modernizr.testStyles\n   * @optionName Modernizr.testStyles()\n   * @optionProp testStyles\n   * @access public\n   * @function testStyles\n   * @param {string} rule - String representing a css rule\n   * @param {function} callback - A function that is used to test the injected element\n   * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n   * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n   * @returns {boolean}\n   * @example\n   *\n   * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n   * along with (possibly multiple) DOM elements. This lets you check for features\n   * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n   *\n   * ```js\n   * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n   *   // elem is the first DOM node in the page (by default #modernizr)\n   *   // rule is the first argument you supplied - the CSS rule in string form\n   *\n   *   addTest('widthworks', elem.style.width === '9px')\n   * });\n   * ```\n   *\n   * If your test requires multiple nodes, you can include a third argument\n   * indicating how many additional div elements to include on the page. The\n   * additional nodes are injected as children of the `elem` that is returned as\n   * the first argument to the callback.\n   *\n   * ```js\n   * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n   *   document.getElementById('modernizr').style.width === '1px'; // true\n   *   document.getElementById('modernizr2').style.width === '2px'; // true\n   *   elem.firstChild === document.getElementById('modernizr2'); // true\n   * }, 1);\n   * ```\n   *\n   * By default, all of the additional elements have an ID of `modernizr[n]`, where\n   * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n   * the second additional is `#modernizr3`, etc.).\n   * If you want to have more meaningful IDs for your function, you can provide\n   * them as the fourth argument, as an array of strings\n   *\n   * ```js\n   * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n   *   elem.firstChild === document.getElementById('foo'); // true\n   *   elem.lastChild === document.getElementById('bar'); // true\n   * }, 2, ['foo', 'bar']);\n   * ```\n   *\n   */\n\n  var testStyles = (ModernizrProto.testStyles = injectElementWithStyles);\n\n  /**\n   * If the browsers follow the spec, then they would expose vendor-specific styles as:\n   *   elem.style.WebkitBorderRadius\n   * instead of something like the following (which is technically incorrect):\n   *   elem.style.webkitBorderRadius\n\n   * WebKit ghosts their properties in lowercase but Opera & Moz do not.\n   * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n   *   erik.eae.net/archives/2008/03/10/21.48.10/\n\n   * More here: github.com/Modernizr/Modernizr/issues/issue/21\n   *\n   * @access private\n   * @returns {string} The string representing the vendor-specific style properties\n   */\n\n  var omPrefixes = \"Moz O ms Webkit\";\n\n  var cssomPrefixes = ModernizrProto._config.usePrefixes\n    ? omPrefixes.split(\" \")\n    : [];\n  ModernizrProto._cssomPrefixes = cssomPrefixes;\n\n  /**\n   * atRule returns a given CSS property at-rule (eg @keyframes), possibly in\n   * some prefixed form, or false, in the case of an unsupported rule\n   *\n   * @memberof Modernizr\n   * @name Modernizr.atRule\n   * @optionName Modernizr.atRule()\n   * @optionProp atRule\n   * @access public\n   * @function atRule\n   * @param {string} prop - String name of the @-rule to test for\n   * @returns {string|boolean} The string representing the (possibly prefixed)\n   * valid version of the @-rule, or `false` when it is unsupported.\n   * @example\n   * ```js\n   *  var keyframes = Modernizr.atRule('@keyframes');\n   *\n   *  if (keyframes) {\n   *    // keyframes are supported\n   *    // could be `@-webkit-keyframes` or `@keyframes`\n   *  } else {\n   *    // keyframes === `false`\n   *  }\n   * ```\n   *\n   */\n\n  var atRule = function(prop) {\n    var length = prefixes.length;\n    var cssrule = window.CSSRule;\n    var rule;\n\n    if (typeof cssrule === \"undefined\") {\n      return undefined;\n    }\n\n    if (!prop) {\n      return false;\n    }\n\n    // remove literal @ from beginning of provided property\n    prop = prop.replace(/^@/, \"\");\n\n    // CSSRules use underscores instead of dashes\n    rule = prop.replace(/-/g, \"_\").toUpperCase() + \"_RULE\";\n\n    if (rule in cssrule) {\n      return \"@\" + prop;\n    }\n\n    for (var i = 0; i < length; i++) {\n      // prefixes gives us something like -o-, and we want O_\n      var prefix = prefixes[i];\n      var thisRule = prefix.toUpperCase() + \"_\" + rule;\n\n      if (thisRule in cssrule) {\n        return \"@-\" + prefix.toLowerCase() + \"-\" + prop;\n      }\n    }\n\n    return false;\n  };\n\n  ModernizrProto.atRule = atRule;\n\n  /**\n   * List of JavaScript DOM values used for tests\n   *\n   * @memberof Modernizr\n   * @name Modernizr._domPrefixes\n   * @optionName Modernizr._domPrefixes\n   * @optionProp domPrefixes\n   * @access public\n   * @example\n   *\n   * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n   * than kebab-case properties, all properties are their Capitalized variant\n   *\n   * ```js\n   * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n   * ```\n   */\n\n  var domPrefixes = ModernizrProto._config.usePrefixes\n    ? omPrefixes.toLowerCase().split(\" \")\n    : [];\n  ModernizrProto._domPrefixes = domPrefixes;\n\n  /**\n   * contains checks to see if a string contains another string\n   *\n   * @access private\n   * @function contains\n   * @param {string} str - The string we want to check for substrings\n   * @param {string} substr - The substring we want to search the first string for\n   * @returns {boolean}\n   */\n\n  function contains(str, substr) {\n    return !!~(\"\" + str).indexOf(substr);\n  }\n\n  /**\n   * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n   *\n   * @access private\n   * @function fnBind\n   * @param {function} fn - a function you want to change `this` reference to\n   * @param {object} that - the `this` you want to call the function with\n   * @returns {function} The wrapped version of the supplied function\n   */\n\n  function fnBind(fn, that) {\n    return function() {\n      return fn.apply(that, arguments);\n    };\n  }\n\n  /**\n   * testDOMProps is a generic DOM property test; if a browser supports\n   *   a certain property, it won't return undefined for it.\n   *\n   * @access private\n   * @function testDOMProps\n   * @param {array.<string>} props - An array of properties to test for\n   * @param {object} obj - An object or Element you want to use to test the parameters again\n   * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n   * @returns {false|*} returns false if the prop is unsupported, otherwise the value that is supported\n   */\n  function testDOMProps(props, obj, elem) {\n    var item;\n\n    for (var i in props) {\n      if (props[i] in obj) {\n        // return the property name as a string\n        if (elem === false) {\n          return props[i];\n        }\n\n        item = obj[props[i]];\n\n        // let's bind a function\n        if (is(item, \"function\")) {\n          // bind to obj unless overriden\n          return fnBind(item, elem || obj);\n        }\n\n        // return the unbound function or obj or value\n        return item;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Create our \"modernizr\" element that we do most feature tests on.\n   *\n   * @access private\n   */\n\n  var modElem = {\n    elem: createElement(\"modernizr\")\n  };\n\n  // Clean up this element\n  Modernizr._q.push(function() {\n    delete modElem.elem;\n  });\n\n  var mStyle = {\n    style: modElem.elem.style\n  };\n\n  // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n  // the front of the queue.\n  Modernizr._q.unshift(function() {\n    delete mStyle.style;\n  });\n\n  /**\n   * domToCSS takes a camelCase string and converts it to kebab-case\n   * e.g. boxSizing -> box-sizing\n   *\n   * @access private\n   * @function domToCSS\n   * @param {string} name - String name of camelCase prop we want to convert\n   * @returns {string} The kebab-case version of the supplied name\n   */\n\n  function domToCSS(name) {\n    return name\n      .replace(/([A-Z])/g, function(str, m1) {\n        return \"-\" + m1.toLowerCase();\n      })\n      .replace(/^ms-/, \"-ms-\");\n  }\n  /**\n   * wrapper around getComputedStyle, to fix issues with Firefox returning null when\n   * called inside of a hidden iframe\n   *\n   * @access private\n   * @function computedStyle\n   * @param {HTMLElement|SVGElement} - The element we want to find the computed styles of\n   * @param {string|null} [pseudoSelector]- An optional pseudo element selector (e.g. :before), of null if none\n   * @returns {CSSStyleDeclaration}\n   */\n\n  function computedStyle(elem, pseudo, prop) {\n    var result;\n\n    if (\"getComputedStyle\" in window) {\n      result = getComputedStyle.call(window, elem, pseudo);\n      var console = window.console;\n\n      if (result !== null) {\n        if (prop) {\n          result = result.getPropertyValue(prop);\n        }\n      } else {\n        if (console) {\n          var method = console.error ? \"error\" : \"log\";\n          console[method].call(\n            console,\n            \"getComputedStyle returning null, its possible modernizr test results are inaccurate\"\n          );\n        }\n      }\n    } else {\n      result = !pseudo && elem.currentStyle && elem.currentStyle[prop];\n    }\n\n    return result;\n  }\n\n  /**\n   * nativeTestProps allows for us to use native feature detection functionality if available.\n   * some prefixed form, or false, in the case of an unsupported rule\n   *\n   * @access private\n   * @function nativeTestProps\n   * @param {array} props - An array of property names\n   * @param {string} value - A string representing the value we want to check via @supports\n   * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n   */\n\n  // Accepts a list of property names and a single value\n  // Returns `undefined` if native detection not available\n  function nativeTestProps(props, value) {\n    var i = props.length;\n    // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n    if (\"CSS\" in window && \"supports\" in window.CSS) {\n      // Try every prefixed variant of the property\n      while (i--) {\n        if (window.CSS.supports(domToCSS(props[i]), value)) {\n          return true;\n        }\n      }\n      return false;\n    }\n    // Otherwise fall back to at-rule (for Opera 12.x)\n    else if (\"CSSSupportsRule\" in window) {\n      // Build a condition string for every prefixed variant\n      var conditionText = [];\n      while (i--) {\n        conditionText.push(\"(\" + domToCSS(props[i]) + \":\" + value + \")\");\n      }\n      conditionText = conditionText.join(\" or \");\n      return injectElementWithStyles(\n        \"@supports (\" +\n          conditionText +\n          \") { #modernizr { position: absolute; } }\",\n        function(node) {\n          return computedStyle(node, null, \"position\") == \"absolute\";\n        }\n      );\n    }\n    return undefined;\n  }\n  // testProps is a generic CSS / DOM property test.\n\n  // In testing support for a given CSS property, it's legit to test:\n  //    `elem.style[styleName] !== undefined`\n  // If the property is supported it will return an empty string,\n  // if unsupported it will return undefined.\n\n  // We'll take advantage of this quick test and skip setting a style\n  // on our modernizr element, but instead just testing undefined vs\n  // empty string.\n\n  // Property names can be provided in either camelCase or kebab-case.\n\n  function testProps(props, prefixed, value, skipValueTest) {\n    skipValueTest = is(skipValueTest, \"undefined\") ? false : skipValueTest;\n\n    // Try native detect first\n    if (!is(value, \"undefined\")) {\n      var result = nativeTestProps(props, value);\n      if (!is(result, \"undefined\")) {\n        return result;\n      }\n    }\n\n    // Otherwise do it properly\n    var afterInit, i, propsLength, prop, before;\n\n    // If we don't have a style element, that means we're running async or after\n    // the core tests, so we'll need to create our own elements to use\n\n    // inside of an SVG element, in certain browsers, the `style` element is only\n    // defined for valid tags. Therefore, if `modernizr` does not have one, we\n    // fall back to a less used element and hope for the best.\n    // for strict XHTML browsers the hardly used samp element is used\n    var elems = [\"modernizr\", \"tspan\", \"samp\"];\n    while (!mStyle.style && elems.length) {\n      afterInit = true;\n      mStyle.modElem = createElement(elems.shift());\n      mStyle.style = mStyle.modElem.style;\n    }\n\n    // Delete the objects if we created them.\n    function cleanElems() {\n      if (afterInit) {\n        delete mStyle.style;\n        delete mStyle.modElem;\n      }\n    }\n\n    propsLength = props.length;\n    for (i = 0; i < propsLength; i++) {\n      prop = props[i];\n      before = mStyle.style[prop];\n\n      if (contains(prop, \"-\")) {\n        prop = cssToDOM(prop);\n      }\n\n      if (mStyle.style[prop] !== undefined) {\n        // If value to test has been passed in, do a set-and-check test.\n        // 0 (integer) is a valid property value, so check that `value` isn't\n        // undefined, rather than just checking it's truthy.\n        if (!skipValueTest && !is(value, \"undefined\")) {\n          // Needs a try catch block because of old IE. This is slow, but will\n          // be avoided in most cases because `skipValueTest` will be used.\n          try {\n            mStyle.style[prop] = value;\n          } catch (e) {}\n\n          // If the property value has changed, we assume the value used is\n          // supported. If `value` is empty string, it'll fail here (because\n          // it hasn't changed), which matches how browsers have implemented\n          // CSS.supports()\n          if (mStyle.style[prop] != before) {\n            cleanElems();\n            return prefixed == \"pfx\" ? prop : true;\n          }\n        }\n        // Otherwise just return true, or the property name if this is a\n        // `prefixed()` call\n        else {\n          cleanElems();\n          return prefixed == \"pfx\" ? prop : true;\n        }\n      }\n    }\n    cleanElems();\n    return false;\n  }\n\n  /**\n   * testPropsAll tests a list of DOM properties we want to check against.\n   * We specify literally ALL possible (known and/or likely) properties on\n   * the element including the non-vendor prefixed one, for forward-\n   * compatibility.\n   *\n   * @access private\n   * @function testPropsAll\n   * @param {string} prop - A string of the property to test for\n   * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n   * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n   * @param {string} [value] - A string of a css value\n   * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n   * @returns {false|string} returns the string version of the property, or false if it is unsupported\n   */\n  function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n    var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n      props = (prop + \" \" + cssomPrefixes.join(ucProp + \" \") + ucProp).split(\n        \" \"\n      );\n\n    // did they call .prefixed('boxSizing') or are we just testing a prop?\n    if (is(prefixed, \"string\") || is(prefixed, \"undefined\")) {\n      return testProps(props, prefixed, value, skipValueTest);\n\n      // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n    } else {\n      props = (prop + \" \" + domPrefixes.join(ucProp + \" \") + ucProp).split(\" \");\n      return testDOMProps(props, prefixed, elem);\n    }\n  }\n\n  // Modernizr.testAllProps() investigates whether a given style property,\n  // or any of its vendor-prefixed variants, is recognized\n  //\n  // Note that the property names must be provided in the camelCase variant.\n  // Modernizr.testAllProps('boxSizing')\n  ModernizrProto.testAllProps = testPropsAll;\n\n  /**\n   * prefixed returns the prefixed or nonprefixed property name variant of your input\n   *\n   * @memberof Modernizr\n   * @name Modernizr.prefixed\n   * @optionName Modernizr.prefixed()\n   * @optionProp prefixed\n   * @access public\n   * @function prefixed\n   * @param {string} prop - String name of the property to test for\n   * @param {object} [obj] - An object to test for the prefixed properties on\n   * @param {HTMLElement} [elem] - An element used to test specific properties against\n   * @returns {string|false} The string representing the (possibly prefixed) valid\n   * version of the property, or `false` when it is unsupported.\n   * @example\n   *\n   * Modernizr.prefixed takes a string css value in the DOM style camelCase (as\n   * opposed to the css style kebab-case) form and returns the (possibly prefixed)\n   * version of that property that the browser actually supports.\n   *\n   * For example, in older Firefox...\n   * ```js\n   * prefixed('boxSizing')\n   * ```\n   * returns 'MozBoxSizing'\n   *\n   * In newer Firefox, as well as any other browser that support the unprefixed\n   * version would simply return `boxSizing`. Any browser that does not support\n   * the property at all, it will return `false`.\n   *\n   * By default, prefixed is checked against a DOM element. If you want to check\n   * for a property on another object, just pass it as a second argument\n   *\n   * ```js\n   * var rAF = prefixed('requestAnimationFrame', window);\n   *\n   * raf(function() {\n   *  renderFunction();\n   * })\n   * ```\n   *\n   * Note that this will return _the actual function_ - not the name of the function.\n   * If you need the actual name of the property, pass in `false` as a third argument\n   *\n   * ```js\n   * var rAFProp = prefixed('requestAnimationFrame', window, false);\n   *\n   * rafProp === 'WebkitRequestAnimationFrame' // in older webkit\n   * ```\n   *\n   * One common use case for prefixed is if you're trying to determine which transition\n   * end event to bind to, you might do something like...\n   * ```js\n   * var transEndEventNames = {\n   *     'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser\n   *     'MozTransition'    : 'transitionend',       * only for FF < 15\n   *     'transition'       : 'transitionend'        * IE10, Opera, Chrome, FF 15+, Saf 7+\n   * };\n   *\n   * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];\n   * ```\n   *\n   * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).\n   */\n\n  var prefixed = (ModernizrProto.prefixed = function(prop, obj, elem) {\n    if (prop.indexOf(\"@\") === 0) {\n      return atRule(prop);\n    }\n\n    if (prop.indexOf(\"-\") != -1) {\n      // Convert kebab-case to camelCase\n      prop = cssToDOM(prop);\n    }\n    if (!obj) {\n      return testPropsAll(prop, \"pfx\");\n    } else {\n      // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'\n      return testPropsAll(prop, obj, elem);\n    }\n  });\n\n  /**\n   * testAllProps determines whether a given CSS property is supported in the browser\n   *\n   * @memberof Modernizr\n   * @name Modernizr.testAllProps\n   * @optionName Modernizr.testAllProps()\n   * @optionProp testAllProps\n   * @access public\n   * @function testAllProps\n   * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n   * @param {string} [value] - String of the value to test\n   * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n   * @example\n   *\n   * testAllProps determines whether a given CSS property, in some prefixed form,\n   * is supported by the browser.\n   *\n   * ```js\n   * testAllProps('boxSizing')  // true\n   * ```\n   *\n   * It can optionally be given a CSS value in string form to test if a property\n   * value is valid\n   *\n   * ```js\n   * testAllProps('display', 'block') // true\n   * testAllProps('display', 'penguin') // false\n   * ```\n   *\n   * A boolean can be passed as a third parameter to skip the value check when\n   * native detection (@supports) isn't available.\n   *\n   * ```js\n   * testAllProps('shapeOutside', 'content-box', true);\n   * ```\n   */\n\n  function testAllProps(prop, value, skipValueTest) {\n    return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n  }\n  ModernizrProto.testAllProps = testAllProps;\n\n  /*!\n{\n  \"name\": \"CSS Transforms 3D\",\n  \"property\": \"csstransforms3d\",\n  \"caniuse\": \"transforms3d\",\n  \"tags\": [\"css\"],\n  \"warnings\": [\n    \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n  ]\n}\n!*/\n\n  Modernizr.addTest(\"csstransforms3d\", function() {\n    return !!testAllProps(\"perspective\", \"1px\", true);\n  });\n\n  /*!\n{\n  \"name\": \"CSS Transitions\",\n  \"property\": \"csstransitions\",\n  \"caniuse\": \"css-transitions\",\n  \"tags\": [\"css\"]\n}\n!*/\n\n  Modernizr.addTest(\"csstransitions\", testAllProps(\"transition\", \"all\", true));\n\n  // Run each test\n  testRunner();\n\n  delete ModernizrProto.addTest;\n  delete ModernizrProto.addAsyncTest;\n\n  // Run the things that are supposed to run after the tests\n  for (var i = 0; i < Modernizr._q.length; i++) {\n    Modernizr._q[i]();\n  }\n\n  // Leak Modernizr namespace\n  window.Modernizr = Modernizr;\n})(window, document);\n","(function() {\n  var event = jQuery.event,\n    //helper that finds handlers by type and calls back a function, this is basically handle\n    // events - the events object\n    // types - an array of event types to look for\n    // callback(type, handlerFunc, selector) - a callback\n    // selector - an optional selector to filter with, if there, matches by selector\n    //     if null, matches anything, otherwise, matches with no selector\n    findHelper = function(events, types, callback, selector) {\n      var t, type, typeHandlers, all, h, handle, namespaces, namespace, match;\n      for (t = 0; t < types.length; t++) {\n        type = types[t];\n        all = type.indexOf(\".\") < 0;\n        if (!all) {\n          namespaces = type.split(\".\");\n          type = namespaces.shift();\n          namespace = new RegExp(\n            \"(^|\\\\.)\" +\n              namespaces\n                .slice(0)\n                .sort()\n                .join(\"\\\\.(?:.*\\\\.)?\") +\n              \"(\\\\.|$)\"\n          );\n        }\n        typeHandlers = (events[type] || []).slice(0);\n\n        for (h = 0; h < typeHandlers.length; h++) {\n          handle = typeHandlers[h];\n\n          match = all || namespace.test(handle.namespace);\n\n          if (match) {\n            if (selector) {\n              if (handle.selector === selector) {\n                callback(type, handle.origHandler || handle.handler);\n              }\n            } else if (selector === null) {\n              callback(\n                type,\n                handle.origHandler || handle.handler,\n                handle.selector\n              );\n            } else if (!handle.selector) {\n              callback(type, handle.origHandler || handle.handler);\n            }\n          }\n        }\n      }\n    };\n\n  /**\n   * Finds event handlers of a given type on an element.\n   * @param {HTMLElement} el\n   * @param {Array} types an array of event names\n   * @param {String} [selector] optional selector\n   * @return {Array} an array of event handlers\n   */\n  event.find = function(el, types, selector) {\n    var events = ($._data(el) || {}).events,\n      handlers = [],\n      t,\n      liver,\n      live;\n\n    if (!events) {\n      return handlers;\n    }\n    findHelper(\n      events,\n      types,\n      function(type, handler) {\n        handlers.push(handler);\n      },\n      selector\n    );\n    return handlers;\n  };\n  /**\n   * Finds all events.  Group by selector.\n   * @param {HTMLElement} el the element\n   * @param {Array} types event types\n   */\n  event.findBySelector = function(el, types) {\n    var events = $._data(el).events,\n      selectors = {},\n      //adds a handler for a given selector and event\n      add = function(selector, event, handler) {\n        var select = selectors[selector] || (selectors[selector] = {}),\n          events = select[event] || (select[event] = []);\n        events.push(handler);\n      };\n\n    if (!events) {\n      return selectors;\n    }\n    //first check live:\n    /*$.each(events.live || [], function( i, live ) {\n\t\t\tif ( $.inArray(live.origType, types) !== -1 ) {\n\t\t\t\tadd(live.selector, live.origType, live.origHandler || live.handler);\n\t\t\t}\n\t\t});*/\n    //then check straight binds\n    findHelper(\n      events,\n      types,\n      function(type, handler, selector) {\n        add(selector || \"\", type, handler);\n      },\n      null\n    );\n\n    return selectors;\n  };\n  event.supportTouch = \"ontouchend\" in document;\n\n  $.fn.respondsTo = function(events) {\n    if (!this.length) {\n      return false;\n    } else {\n      //add default ?\n      return (\n        event.find(this[0], $.isArray(events) ? events : [events]).length > 0\n      );\n    }\n  };\n  $.fn.triggerHandled = function(event, data) {\n    event = typeof event == \"string\" ? $.Event(event) : event;\n    this.trigger(event, data);\n    return event.handled;\n  };\n  /**\n   * Only attaches one event handler for all types ...\n   * @param {Array} types llist of types that will delegate here\n   * @param {Object} startingEvent the first event to start listening to\n   * @param {Object} onFirst a function to call\n   */\n  event.setupHelper = function(types, startingEvent, onFirst) {\n    if (!onFirst) {\n      onFirst = startingEvent;\n      startingEvent = null;\n    }\n    var add = function(handleObj) {\n        var bySelector,\n          selector = handleObj.selector || \"\";\n        if (selector) {\n          bySelector = event.find(this, types, selector);\n          if (!bySelector.length) {\n            $(this).delegate(selector, startingEvent, onFirst);\n          }\n        } else {\n          //var bySelector = event.find(this, types, selector);\n          if (!event.find(this, types, selector).length) {\n            event.add(this, startingEvent, onFirst, {\n              selector: selector,\n              delegate: this\n            });\n          }\n        }\n      },\n      remove = function(handleObj) {\n        var bySelector,\n          selector = handleObj.selector || \"\";\n        if (selector) {\n          bySelector = event.find(this, types, selector);\n          if (!bySelector.length) {\n            $(this).undelegate(selector, startingEvent, onFirst);\n          }\n        } else {\n          if (!event.find(this, types, selector).length) {\n            event.remove(this, startingEvent, onFirst, {\n              selector: selector,\n              delegate: this\n            });\n          }\n        }\n      };\n    $.each(types, function() {\n      event.special[this] = {\n        add: add,\n        remove: remove,\n        setup: function() {},\n        teardown: function() {}\n      };\n    });\n  };\n})(jQuery);\n(function($) {\n  var isPhantom = /Phantom/.test(navigator.userAgent),\n    supportTouch = !isPhantom && \"ontouchend\" in document,\n    scrollEvent = \"touchmove scroll\",\n    // Use touch events or map it to mouse events\n    touchStartEvent = supportTouch ? \"touchstart\" : \"mousedown\",\n    touchStopEvent = supportTouch ? \"touchend\" : \"mouseup\",\n    touchMoveEvent = supportTouch ? \"touchmove\" : \"mousemove\",\n    data = function(event) {\n      var d = event.originalEvent.touches\n        ? event.originalEvent.touches[0]\n        : event;\n      return {\n        time: new Date().getTime(),\n        coords: [d.pageX, d.pageY],\n        origin: $(event.target)\n      };\n    };\n\n  /**\n   * @add jQuery.event.swipe\n   */\n  var swipe = ($.event.swipe = {\n    /**\n     * @attribute delay\n     * Delay is the upper limit of time the swipe motion can take in milliseconds.  This defaults to 500.\n     *\n     * A user must perform the swipe motion in this much time.\n     */\n    delay: 500,\n    /**\n     * @attribute max\n     * The maximum distance the pointer must travel in pixels.  The default is 75 pixels.\n     */\n    max: 75,\n    /**\n     * @attribute min\n     * The minimum distance the pointer must travel in pixels.  The default is 30 pixels.\n     */\n    min: 30\n  });\n\n  $.event.setupHelper(\n    [\n      /**\n       * @hide\n       * @attribute swipe\n       */\n      \"swipe\",\n      /**\n       * @hide\n       * @attribute swipeleft\n       */\n      \"swipeleft\",\n      /**\n       * @hide\n       * @attribute swiperight\n       */\n      \"swiperight\",\n      /**\n       * @hide\n       * @attribute swipeup\n       */\n      \"swipeup\",\n      /**\n       * @hide\n       * @attribute swipedown\n       */\n      \"swipedown\"\n    ],\n    touchStartEvent,\n    function(ev) {\n      var // update with data when the event was started\n        start = data(ev),\n        stop,\n        delegate = ev.delegateTarget || ev.currentTarget,\n        selector = ev.handleObj.selector,\n        entered = this;\n\n      function moveHandler(event) {\n        if (!start) {\n          return;\n        }\n        // update stop with the data from the current event\n        stop = data(event);\n\n        // prevent scrolling\n        if (Math.abs(start.coords[0] - stop.coords[0]) > 10) {\n          event.preventDefault();\n        }\n      }\n\n      // Attach to the touch move events\n      $(document.documentElement)\n        .bind(touchMoveEvent, moveHandler)\n        .one(touchStopEvent, function(event) {\n          $(this).unbind(touchMoveEvent, moveHandler);\n          // if start and stop contain data figure out if we have a swipe event\n          if (start && stop) {\n            // calculate the distance between start and stop data\n            var deltaX = Math.abs(start.coords[0] - stop.coords[0]),\n              deltaY = Math.abs(start.coords[1] - stop.coords[1]),\n              distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n            // check if the delay and distance are matched\n            if (stop.time - start.time < swipe.delay && distance >= swipe.min) {\n              var events = [\"swipe\"];\n              // check if we moved horizontally\n              if (deltaX >= swipe.min && deltaY < swipe.min) {\n                // based on the x coordinate check if we moved left or right\n                events.push(\n                  start.coords[0] > stop.coords[0] ? \"swipeleft\" : \"swiperight\"\n                );\n              }\n              // check if we moved vertically\n              else if (deltaY >= swipe.min && deltaX < swipe.min) {\n                // based on the y coordinate check if we moved up or down\n                events.push(\n                  start.coords[1] < stop.coords[1] ? \"swipedown\" : \"swipeup\"\n                );\n              }\n\n              // trigger swipe events on this guy\n              $.each($.event.find(delegate, events, selector), function() {\n                this.call(entered, ev, { start: start, end: stop });\n              });\n            }\n          }\n          // reset start and stop\n          start = stop = undefined;\n        });\n    }\n  );\n})(jQuery);\n","/**\n * jquery.bookblock.js v2.0.1\n * http://www.codrops.com\n *\n * Licensed under the MIT license.\n * http://www.opensource.org/licenses/mit-license.php\n *\n * Copyright 2013, Codrops\n * http://www.codrops.com\n */\n(function($, window, undefined) {\n  \"use strict\";\n\n  // global\n  var $window = $(window),\n    Modernizr = window.Modernizr;\n\n  // https://gist.github.com/edankwan/4389601\n  Modernizr.addTest(\"csstransformspreserve3d\", function() {\n    var prop = Modernizr.prefixed(\"transformStyle\");\n    var val = \"preserve-3d\";\n    var computedStyle;\n    if (!prop) return false;\n\n    prop = prop\n      .replace(/([A-Z])/g, function(str, m1) {\n        return \"-\" + m1.toLowerCase();\n      })\n      .replace(/^ms-/, \"-ms-\");\n\n    Modernizr.testStyles(\"#modernizr{\" + prop + \":\" + val + \";}\", function(\n      el,\n      rule\n    ) {\n      computedStyle = window.getComputedStyle\n        ? getComputedStyle(el, null).getPropertyValue(prop)\n        : \"\";\n    });\n\n    return computedStyle === val;\n  });\n\n  /*\n   * debouncedresize: special jQuery event that happens once after a window resize\n   *\n   * latest version and complete README available on Github:\n   * https://github.com/louisremi/jquery-smartresize\n   *\n   * Copyright 2012 @louis_remi\n   * Licensed under the MIT license.\n   *\n   * This saved you an hour of work?\n   * Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON\n   */\n  var $event = $.event,\n    $special,\n    resizeTimeout;\n\n  $special = $event.special.debouncedresize = {\n    setup: function() {\n      $(this).on(\"resize\", $special.handler);\n    },\n    teardown: function() {\n      $(this).off(\"resize\", $special.handler);\n    },\n    handler: function(event, execAsap) {\n      // Save the context\n      var context = this,\n        args = arguments,\n        dispatch = function() {\n          // set correct event type\n          event.type = \"debouncedresize\";\n          $event.dispatch.apply(context, args);\n        };\n\n      if (resizeTimeout) {\n        clearTimeout(resizeTimeout);\n      }\n\n      execAsap\n        ? dispatch()\n        : (resizeTimeout = setTimeout(dispatch, $special.threshold));\n    },\n    threshold: 150\n  };\n\n  $.BookBlock = function(options, element) {\n    this.$el = $(element);\n    this._init(options);\n  };\n\n  // the options\n  $.BookBlock.defaults = {\n    // vertical or horizontal flip\n    orientation: \"vertical\",\n    // ltr (left to right) or rtl (right to left)\n    direction: \"ltr\",\n    // speed for the flip transition in ms\n    speed: 1000,\n    // easing for the flip transition\n    easing: \"ease-in-out\",\n    // if set to true, both the flipping page and the sides will have an overlay to simulate shadows\n    shadows: true,\n    // opacity value for the \"shadow\" on both sides (when the flipping page is over it)\n    // value : 0.1 - 1\n    shadowSides: 0.2,\n    // opacity value for the \"shadow\" on the flipping page (while it is flipping)\n    // value : 0.1 - 1\n    shadowFlip: 0.1,\n    // if we should show the first item after reaching the end\n    circular: false,\n    // if we want to specify a selector that triggers the next() function. example: ´#bb-nav-next´\n    nextEl: \"\",\n    // if we want to specify a selector that triggers the prev() function\n    prevEl: \"\",\n    // autoplay. If true it overwrites the circular option to true\n    autoplay: false,\n    // time (ms) between page switch, if autoplay is true\n    interval: 3000,\n    // callback after the flip transition\n    // old is the index of the previous item\n    // page is the current item´s index\n    // isLimit is true if the current page is the last one (or the first one)\n    onEndFlip: function(old, page, isLimit) {\n      return false;\n    },\n    // callback before the flip transition\n    // page is the current item´s index\n    onBeforeFlip: function(page) {\n      return false;\n    }\n  };\n\n  $.BookBlock.prototype = {\n    _init: function(options) {\n      // options\n      this.options = $.extend(true, {}, $.BookBlock.defaults, options);\n      // orientation class\n      this.$el.addClass(\"bb-\" + this.options.orientation);\n      this.jopaUid = this.$el[0].dataset.uid;\n      this.pluginName = `bookblock-${this.jopaUid}`;\n      // items\n      this.$items = this.$el.children(\".bb-item\").hide();\n      // total items\n      this.itemsCount = this.$items.length;\n      // current item´s index\n      this.current = 0;\n      // previous item´s index\n      this.previous = -1;\n      // show first item\n      this.$current = this.$items.eq(this.current).show();\n      // get width of this.$el\n      // this will be necessary to create the flipping layout\n      this.elWidth = this.$el.width();\n      var transEndEventNames = {\n        WebkitTransition: \"webkitTransitionEnd\",\n        MozTransition: \"transitionend\",\n        OTransition: \"oTransitionEnd\",\n        msTransition: \"MSTransitionEnd\",\n        transition: \"transitionend\"\n      };\n      this.transEndEventName =\n        transEndEventNames[Modernizr.prefixed(\"transition\")] + `.${this.pluginName}`;\n      // support css 3d transforms && css transitions && Modernizr.csstransformspreserve3d\n      this.support =\n        Modernizr.csstransitions &&\n        Modernizr.csstransforms3d &&\n        Modernizr.csstransformspreserve3d;\n      // initialize/bind some events\n      this._initEvents();\n      // start slideshow\n      if (this.options.autoplay) {\n        this.options.circular = true;\n        this._startSlideshow();\n      }\n    },\n    _initEvents: function() {\n      var self = this;\n\n      if (this.options.nextEl !== \"\") {\n        $(this.options.nextEl).on(\n          `click.${this.pluginName} touchstart.${this.pluginName}`,\n          function() {\n            self._action(\"next\");\n            return false;\n          }\n        );\n      }\n\n      if (this.options.prevEl !== \"\") {\n        $(this.options.prevEl).on(\n          `click.${this.pluginName} touchstart.${this.pluginName}`,\n          function() {\n            self._action(\"prev\");\n            return false;\n          }\n        );\n      }\n\n      $window.on(\"debouncedresize\", function() {\n        // update width value\n        self.elWidth = self.$el.width();\n      });\n    },\n    _action: function(dir, page) {\n      this._stopSlideshow();\n      this._navigate(dir, page);\n    },\n    _navigate: function(dir, page) {\n      if (this.isAnimating) {\n        return false;\n      }\n\n      // callback trigger\n      this.options.onBeforeFlip(this.current);\n\n      this.isAnimating = true;\n      // update current value\n      this.$current = this.$items.eq(this.current);\n\n      if (page !== undefined) {\n        this.current = page;\n      } else if (\n        (dir === \"next\" && this.options.direction === \"ltr\") ||\n        (dir === \"prev\" && this.options.direction === \"rtl\")\n      ) {\n        if (!this.options.circular && this.current === this.itemsCount - 1) {\n          this.end = true;\n        } else {\n          this.previous = this.current;\n          this.current =\n            this.current < this.itemsCount - 1 ? this.current + 1 : 0;\n        }\n      } else if (\n        (dir === \"prev\" && this.options.direction === \"ltr\") ||\n        (dir === \"next\" && this.options.direction === \"rtl\")\n      ) {\n        if (!this.options.circular && this.current === 0) {\n          this.end = true;\n        } else {\n          this.previous = this.current;\n          this.current =\n            this.current > 0 ? this.current - 1 : this.itemsCount - 1;\n        }\n      }\n\n      this.$nextItem =\n        !this.options.circular && this.end\n          ? this.$current\n          : this.$items.eq(this.current);\n\n      if (!this.support) {\n        this._layoutNoSupport(dir);\n      } else {\n        this._layout(dir);\n      }\n    },\n    _layoutNoSupport: function(dir) {\n      this.$items.hide();\n      this.$nextItem.show();\n      this.end = false;\n      this.isAnimating = false;\n      var isLimit =\n        (dir === \"next\" && this.current === this.itemsCount - 1) ||\n        (dir === \"prev\" && this.current === 0);\n      // callback trigger\n      this.options.onEndFlip(this.previous, this.current, isLimit);\n    },\n    // creates the necessary layout for the 3d structure\n    _layout: function(dir) {\n      var self = this,\n        // basic structure: 1 element for the left side.\n        $s_left = this._addSide(\"left\", dir),\n        // 1 element for the flipping/middle page\n        $s_middle = this._addSide(\"middle\", dir),\n        // 1 element for the right side\n        $s_right = this._addSide(\"right\", dir),\n        // overlays\n        $o_left = $s_left.find(\"div.bb-overlay\"),\n        $o_middle_f = $s_middle.find(\"div.bb-flipoverlay:first\"),\n        $o_middle_b = $s_middle.find(\"div.bb-flipoverlay:last\"),\n        $o_right = $s_right.find(\"div.bb-overlay\"),\n        speed = this.end ? 400 : this.options.speed;\n\n      this.$items.hide();\n      this.$el.prepend($s_left, $s_middle, $s_right);\n\n      $s_middle\n        .css({\n          transitionDuration: speed + \"ms\",\n          transitionTimingFunction: this.options.easing\n        })\n        .on(this.transEndEventName, function(event) {\n          if ($(event.target).hasClass(\"bb-page\")) {\n            self.$el.children(\".bb-page\").remove();\n            self.$nextItem.show();\n            self.end = false;\n            self.isAnimating = false;\n            var isLimit =\n              (dir === \"next\" && self.current === self.itemsCount - 1) ||\n              (dir === \"prev\" && self.current === 0);\n            // callback trigger\n            self.options.onEndFlip(self.previous, self.current, isLimit);\n          }\n        });\n\n      if (dir === \"prev\") {\n        $s_middle.addClass(\"bb-flip-initial\");\n      }\n\n      // overlays\n      if (this.options.shadows && !this.end) {\n        var o_left_style =\n            dir === \"next\"\n              ? {\n                  transition:\n                    \"opacity \" +\n                    this.options.speed / 2 +\n                    \"ms \" +\n                    \"linear\" +\n                    \" \" +\n                    this.options.speed / 2 +\n                    \"ms\"\n                }\n              : {\n                  transition:\n                    \"opacity \" + this.options.speed / 2 + \"ms \" + \"linear\",\n                  opacity: this.options.shadowSides\n                },\n          o_middle_f_style =\n            dir === \"next\"\n              ? {\n                  transition:\n                    \"opacity \" + this.options.speed / 2 + \"ms \" + \"linear\"\n                }\n              : {\n                  transition:\n                    \"opacity \" +\n                    this.options.speed / 2 +\n                    \"ms \" +\n                    \"linear\" +\n                    \" \" +\n                    this.options.speed / 2 +\n                    \"ms\",\n                  opacity: this.options.shadowFlip\n                },\n          o_middle_b_style =\n            dir === \"next\"\n              ? {\n                  transition:\n                    \"opacity \" +\n                    this.options.speed / 2 +\n                    \"ms \" +\n                    \"linear\" +\n                    \" \" +\n                    this.options.speed / 2 +\n                    \"ms\",\n                  opacity: this.options.shadowFlip\n                }\n              : {\n                  transition:\n                    \"opacity \" + this.options.speed / 2 + \"ms \" + \"linear\"\n                },\n          o_right_style =\n            dir === \"next\"\n              ? {\n                  transition:\n                    \"opacity \" + this.options.speed / 2 + \"ms \" + \"linear\",\n                  opacity: this.options.shadowSides\n                }\n              : {\n                  transition:\n                    \"opacity \" +\n                    this.options.speed / 2 +\n                    \"ms \" +\n                    \"linear\" +\n                    \" \" +\n                    this.options.speed / 2 +\n                    \"ms\"\n                };\n\n        $o_middle_f.css(o_middle_f_style);\n        $o_middle_b.css(o_middle_b_style);\n        $o_left.css(o_left_style);\n        $o_right.css(o_right_style);\n      }\n\n      setTimeout(function() {\n        // first && last pages lift slightly up when we can't go further\n        $s_middle.addClass(\n          self.end ? \"bb-flip-\" + dir + \"-end\" : \"bb-flip-\" + dir\n        );\n\n        // overlays\n        if (self.options.shadows && !self.end) {\n          $o_middle_f.css({\n            opacity: dir === \"next\" ? self.options.shadowFlip : 0\n          });\n\n          $o_middle_b.css({\n            opacity: dir === \"next\" ? 0 : self.options.shadowFlip\n          });\n\n          $o_left.css({\n            opacity: dir === \"next\" ? self.options.shadowSides : 0\n          });\n\n          $o_right.css({\n            opacity: dir === \"next\" ? 0 : self.options.shadowSides\n          });\n        }\n      }, 25);\n    },\n    // adds the necessary sides (bb-page) to the layout\n    _addSide: function(side, dir) {\n      var $side;\n\n      switch (side) {\n        case \"left\":\n          /*\n\t\t\t\t\t\t<div class=\"bb-page\" style=\"z-index:102;\">\n\t\t\t\t\t\t\t<div class=\"bb-back\">\n\t\t\t\t\t\t\t\t<div class=\"bb-outer\">\n\t\t\t\t\t\t\t\t\t<div class=\"bb-content\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bb-inner\">\n\t\t\t\t\t\t\t\t\t\t\tdir==='next' ? [content of current page] : [content of next page]\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"bb-overlay\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t*/\n          $side = $(\n            '<div class=\"bb-page\"><div class=\"bb-back\"><div class=\"bb-outer\"><div class=\"bb-content\"><div class=\"bb-inner\">' +\n              (dir === \"next\" ? this.$current.html() : this.$nextItem.html()) +\n              '</div></div><div class=\"bb-overlay\"></div></div></div></div>'\n          ).css(\"z-index\", 102);\n          break;\n        case \"middle\":\n          /*\n\t\t\t\t\t\t<div class=\"bb-page\" style=\"z-index:103;\">\n\t\t\t\t\t\t\t<div class=\"bb-front\">\n\t\t\t\t\t\t\t\t<div class=\"bb-outer\">\n\t\t\t\t\t\t\t\t\t<div class=\"bb-content\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bb-inner\">\n\t\t\t\t\t\t\t\t\t\t\tdir==='next' ? [content of current page] : [content of next page]\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"bb-flipoverlay\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"bb-back\">\n\t\t\t\t\t\t\t\t<div class=\"bb-outer\">\n\t\t\t\t\t\t\t\t\t<div class=\"bb-content\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bb-inner\">\n\t\t\t\t\t\t\t\t\t\t\tdir==='next' ? [content of next page] : [content of current page]\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"bb-flipoverlay\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t*/\n          $side = $(\n            '<div class=\"bb-page\"><div class=\"bb-front\"><div class=\"bb-outer\"><div class=\"bb-content\"><div class=\"bb-inner\">' +\n              (dir === \"next\" ? this.$current.html() : this.$nextItem.html()) +\n              '</div></div><div class=\"bb-flipoverlay\"></div></div></div><div class=\"bb-back\"><div class=\"bb-outer\"><div class=\"bb-content\" style=\"width:' +\n              this.elWidth +\n              'px\"><div class=\"bb-inner\">' +\n              (dir === \"next\" ? this.$nextItem.html() : this.$current.html()) +\n              '</div></div><div class=\"bb-flipoverlay\"></div></div></div></div>'\n          ).css(\"z-index\", 103);\n          break;\n        case \"right\":\n          /*\n\t\t\t\t\t\t<div class=\"bb-page\" style=\"z-index:101;\">\n\t\t\t\t\t\t\t<div class=\"bb-front\">\n\t\t\t\t\t\t\t\t<div class=\"bb-outer\">\n\t\t\t\t\t\t\t\t\t<div class=\"bb-content\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bb-inner\">\n\t\t\t\t\t\t\t\t\t\t\tdir==='next' ? [content of next page] : [content of current page]\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"bb-overlay\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t*/\n          $side = $(\n            '<div class=\"bb-page\"><div class=\"bb-front\"><div class=\"bb-outer\"><div class=\"bb-content\"><div class=\"bb-inner\">' +\n              (dir === \"next\" ? this.$nextItem.html() : this.$current.html()) +\n              '</div></div><div class=\"bb-overlay\"></div></div></div></div>'\n          ).css(\"z-index\", 101);\n          break;\n      }\n\n      return $side;\n    },\n    _startSlideshow: function() {\n      var self = this;\n      this.slideshow = setTimeout(function() {\n        self._navigate(\"next\");\n        if (self.options.autoplay) {\n          self._startSlideshow();\n        }\n      }, this.options.interval);\n    },\n    _stopSlideshow: function() {\n      if (this.options.autoplay) {\n        clearTimeout(this.slideshow);\n        this.options.autoplay = false;\n      }\n    },\n    // public method: flips next\n    next: function() {\n      this._action(this.options.direction === \"ltr\" ? \"next\" : \"prev\");\n    },\n    // public method: flips back\n    prev: function() {\n      this._action(this.options.direction === \"ltr\" ? \"prev\" : \"next\");\n    },\n    // public method: goes to a specific page\n    jump: function(page) {\n      page -= 1;\n\n      if (page === this.current || page >= this.itemsCount || page < 0) {\n        return false;\n      }\n\n      var dir;\n      if (this.options.direction === \"ltr\") {\n        dir = page > this.current ? \"next\" : \"prev\";\n      } else {\n        dir = page > this.current ? \"prev\" : \"next\";\n      }\n      this._action(dir, page);\n    },\n    // public method: goes to the last page\n    last: function() {\n      this.jump(this.itemsCount);\n    },\n    // public method: goes to the first page\n    first: function() {\n      this.jump(1);\n    },\n    // public method: check if isAnimating is true\n    isActive: function() {\n      return this.isAnimating;\n    },\n    // public method: dynamically adds new elements\n    // call this method after inserting new \"bb-item\" elements inside the BookBlock\n    update: function() {\n      var $currentItem = this.$items.eq(this.current);\n      this.$items = this.$el.children(\".bb-item\");\n      this.itemsCount = this.$items.length;\n      this.current = $currentItem.index();\n    },\n    destroy: function() {\n      if (this.options.autoplay) {\n        this._stopSlideshow();\n      }\n      this.$el.removeClass(\"bb-\" + this.options.orientation);\n      this.$items.show();\n\n      if (this.options.nextEl !== \"\") {\n        $(this.options.nextEl).off(`.${this.pluginName}`);\n      }\n\n      if (this.options.prevEl !== \"\") {\n        $(this.options.prevEl).off(`.${this.pluginName}`);\n      }\n\n      $window.off(\"debouncedresize\");\n    }\n  };\n\n  var logError = function(message) {\n    if (window.console) {\n      window.console.error(message);\n    }\n  };\n\n  $.fn.bookblock = function(options) {\n    if (typeof options === \"string\") {\n      var args = Array.prototype.slice.call(arguments, 1);\n      this.each(function() {\n        var instance = $.data(this, `bookblock-${this.dataset.uid}`);\n        if (!instance) {\n          logError(\n            \"cannot call methods on bookblock prior to initialization; \" +\n              \"attempted to call method '\" +\n              options +\n              \"'\"\n          );\n          return;\n        }\n        if (!$.isFunction(instance[options]) || options.charAt(0) === \"_\") {\n          logError(\"no such method '\" + options + \"' for bookblock instance\");\n          return;\n        }\n        instance[options].apply(instance, args);\n      });\n    } else {\n      this.each(function() {\n        var instance = $.data(this, `bookblock-${this.dataset.uid}`);\n        if (instance) {\n          instance._init(instance.options);\n        } else {\n          instance = $.data(\n            this,\n            `bookblock-${this.dataset.uid}`,\n            new $.BookBlock(options, this)\n          );\n        }\n      });\n    }\n    return this;\n  };\n})(jQuery, window);\n","// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped\n// optimize the gzip compression for this alphabet.\nlet urlAlphabet =\n  'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\n\nexport { urlAlphabet }\n","import crypto from 'crypto'\n\nimport { urlAlphabet } from './url-alphabet/index.js'\n\n// We reuse buffers with the same size to avoid memory fragmentations\n// for better performance.\nlet buffers = {}\nlet random = bytes => {\n  let buffer = buffers[bytes]\n  if (!buffer) {\n    // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory.\n    // Memory flushing is unnecessary since the buffer allocation itself resets\n    // the memory with the new bytes.\n    buffer = Buffer.allocUnsafe(bytes)\n    if (bytes <= 255) buffers[bytes] = buffer\n  }\n  return crypto.randomFillSync(buffer)\n}\n\nlet customRandom = (alphabet, size, getRandom) => {\n  // First, a bitmask is necessary to generate the ID. The bitmask makes bytes\n  // values closer to the alphabet size. The bitmask calculates the closest\n  // `2^31 - 1` number, which exceeds the alphabet size.\n  // For example, the bitmask for the alphabet size 30 is 31 (00011111).\n  let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n  // Though, the bitmask solution is not perfect since the bytes exceeding\n  // the alphabet size are refused. Therefore, to reliably generate the ID,\n  // the random bytes redundancy has to be satisfied.\n\n  // Note: every hardware random generator call is performance expensive,\n  // because the system call for entropy collection takes a lot of time.\n  // So, to avoid additional system calls, extra bytes are requested in advance.\n\n  // Next, a step determines how many random bytes to generate.\n  // The number of random bytes gets decided upon the ID size, mask,\n  // alphabet size, and magic number 1.6 (using 1.6 peaks at performance\n  // according to benchmarks).\n  let step = Math.ceil((1.6 * mask * size) / alphabet.length)\n\n  return () => {\n    let id = ''\n    while (true) {\n      let bytes = getRandom(step)\n      // A compact alternative for `for (var i = 0; i < step; i++)`.\n      let i = step\n      while (i--) {\n        // Adding `|| ''` refuses a random byte that exceeds the alphabet size.\n        id += alphabet[bytes[i] & mask] || ''\n        // `id.length + 1 === size` is a more compact option.\n        if (id.length === +size) return id\n      }\n    }\n  }\n}\n\nlet customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)\n\nlet nanoid = (size = 21) => {\n  let bytes = random(size)\n  let id = ''\n  // A compact alternative for `for (var i = 0; i < step; i++)`.\n  while (size--) {\n    // It is incorrect to use bytes exceeding the alphabet size.\n    // The following mask reduces the random byte in the 0-255 value\n    // range to the 0-63 value range. Therefore, adding hacks, such\n    // as empty string fallback or magic numbers, is unneccessary because\n    // the bitmask trims bytes down to the alphabet size.\n    id += urlAlphabet[bytes[size] & 63]\n  }\n  return id\n}\n\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","<template>\r\n  <div :key=\"componentKey\" :data-uid=\"uid\">\r\n    <slot></slot>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport $ from \"jquery\";\r\nimport \"../../lib/modernizr-custom.js\";\r\nimport \"../../lib/jquerypp.custom.js\";\r\nimport \"../../lib/jquery.bookblock.modified.js\";\r\nimport { nanoid } from \"nanoid\";\r\n\r\nexport default {\r\n  name: \"Bookblock\", // vue component name\r\n  data() {\r\n    return {\r\n      nanoid: nanoid(),\r\n      componentKey: 0\r\n    };\r\n  },\r\n  props: {\r\n    options: {\r\n      type: Object,\r\n      default: () => {}\r\n    }\r\n  },\r\n  watch: {\r\n    defaultOptions: {\r\n      handler(val) {\r\n        this.forceRerender(val);\r\n      },\r\n      deep: true,\r\n      immediate: true\r\n    }\r\n  },\r\n  computed: {\r\n    uid() {\r\n      return `jopa-${this.nanoid}`;\r\n    },\r\n    selector() {\r\n      return `div[data-uid=${this.uid}]`;\r\n    },\r\n    defaultOptions() {\r\n      return {\r\n        // vertical or horizontal flip\r\n        orientation: \"horizontal\",\r\n\r\n        // ltr (left to right) or rtl (right to left)\r\n        direction: \"ltr\",\r\n\r\n        // speed for the flip transition in ms.\r\n        speed: 1000,\r\n\r\n        // easing for the flip transition.\r\n        easing: \"ease-in-out\",\r\n\r\n        // if set to true, both the flipping page and the sides will have an overlay to simulate shadows\r\n        shadows: true,\r\n\r\n        // opacity value for the \"shadow\" on both sides (when the flipping page is over it).\r\n        // value : 0.1 - 1\r\n        shadowSides: 0.2,\r\n\r\n        // opacity value for the \"shadow\" on the flipping page (while it is flipping).\r\n        // value : 0.1 - 1\r\n        shadowFlip: 0.1,\r\n\r\n        // if we should show the first item after reaching the end.\r\n        circular: false,\r\n\r\n        // if we want to specify a selector that triggers the next() function. example: '#bb-nav-next'.\r\n        nextEl: \"\",\r\n\r\n        // if we want to specify a selector that triggers the prev() function.\r\n        prevEl: \"\",\r\n\r\n        // If true it overwrites the circular option to true!\r\n        autoplay: false,\r\n\r\n        // time (ms) between page switch, if autoplay is true.\r\n        interval: 3000,\r\n\r\n        // callback after the flip transition.\r\n        // page is the current item's index.\r\n        // isLimit is true if the current page is the last one (or the first one).\r\n        onEndFlip: function(page, isLimit) {\r\n          return false;\r\n        },\r\n\r\n        // callback before the flip transition.\r\n        // page is the current item's index.\r\n        onBeforeFlip: function(page) {\r\n          return false;\r\n        },\r\n        ...this.options\r\n      };\r\n    }\r\n  },\r\n  mounted() {\r\n    this.forceRerender(this.defaultOptions);\r\n  },\r\n  methods: {\r\n    next() {\r\n      $(this.selector).bookblock(\"next\");\r\n    },\r\n    prev() {\r\n      $(this.selector).bookblock(\"prev\");\r\n    },\r\n    jump(position) {\r\n      $(this.selector).bookblock(\"jump\", position);\r\n    },\r\n    first() {\r\n      $(this.selector).bookblock(\"first\");\r\n    },\r\n    last() {\r\n      $(this.selector).bookblock(\"last\");\r\n    },\r\n    update() {\r\n      console.log(\"updated\");\r\n      $(this.selector).bookblock(\"update\");\r\n    },\r\n    destroy() {\r\n      $(this.selector).bookblock(\"destroy\");\r\n    },\r\n    forceRerender(val) {\r\n      this.nanoid = nanoid();\r\n      this.componentKey += 1;\r\n      this.$nextTick(() => $(this.selector).bookblock(val));\r\n    }\r\n  }\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n@import \"./index.scss\";\r\n</style>\r\n","function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n    if (typeof shadowMode !== 'boolean') {\r\n        createInjectorSSR = createInjector;\r\n        createInjector = shadowMode;\r\n        shadowMode = false;\r\n    }\r\n    // Vue.extend constructor export interop.\r\n    const options = typeof script === 'function' ? script.options : script;\r\n    // render functions\r\n    if (template && template.render) {\r\n        options.render = template.render;\r\n        options.staticRenderFns = template.staticRenderFns;\r\n        options._compiled = true;\r\n        // functional template\r\n        if (isFunctionalTemplate) {\r\n            options.functional = true;\r\n        }\r\n    }\r\n    // scopedId\r\n    if (scopeId) {\r\n        options._scopeId = scopeId;\r\n    }\r\n    let hook;\r\n    if (moduleIdentifier) {\r\n        // server build\r\n        hook = function (context) {\r\n            // 2.3 injection\r\n            context =\r\n                context || // cached call\r\n                    (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n                    (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n            // 2.2 with runInNewContext: true\r\n            if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n                context = __VUE_SSR_CONTEXT__;\r\n            }\r\n            // inject component styles\r\n            if (style) {\r\n                style.call(this, createInjectorSSR(context));\r\n            }\r\n            // register component module identifier for async chunk inference\r\n            if (context && context._registeredComponents) {\r\n                context._registeredComponents.add(moduleIdentifier);\r\n            }\r\n        };\r\n        // used by ssr in case component is cached and beforeCreate\r\n        // never gets called\r\n        options._ssrRegister = hook;\r\n    }\r\n    else if (style) {\r\n        hook = shadowMode\r\n            ? function (context) {\r\n                style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n            }\r\n            : function (context) {\r\n                style.call(this, createInjector(context));\r\n            };\r\n    }\r\n    if (hook) {\r\n        if (options.functional) {\r\n            // register for functional component in vue file\r\n            const originalRender = options.render;\r\n            options.render = function renderWithStyleInjection(h, context) {\r\n                hook.call(context);\r\n                return originalRender(h, context);\r\n            };\r\n        }\r\n        else {\r\n            // inject component registration as beforeCreate hook\r\n            const existing = options.beforeCreate;\r\n            options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n        }\r\n    }\r\n    return script;\r\n}\n\nexport default normalizeComponent;\n//# sourceMappingURL=normalize-component.mjs.map\n","import FwBookblock from \"./bookblock.vue\";\r\nimport { pluginFactory } from \"../../utils/plugin\";\r\n\r\nconst BookblockPlugin = pluginFactory({ components: { FwBookblock } });\r\n\r\nexport { BookblockPlugin, FwBookblock };\r\n","<template>\r\n  <div :key=\"componentKey\" :data-uid=\"uid\">\r\n    <div\r\n      :key=\"`${index}-${nanoid}`\"\r\n      v-for=\"(item, index) in pages\"\r\n      class=\"bb-item\"\r\n    >\r\n      <slot name=\"page\" v-bind=\"{ item, index }\"></slot>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport $ from \"jquery\";\r\nimport \"../../lib/modernizr-custom.js\";\r\nimport \"../../lib/jquerypp.custom.js\";\r\nimport \"../../lib/jquery.bookblock.modified.js\";\r\nimport { nanoid } from \"nanoid\";\r\n\r\nexport default {\r\n  name: \"Bookblock2\", // vue component name\r\n  data() {\r\n    return {\r\n      nanoid: nanoid(),\r\n      componentKey: 0\r\n    };\r\n  },\r\n  props: {\r\n    options: {\r\n      type: Object,\r\n      default: () => {}\r\n    },\r\n    pages: {\r\n      type: Array,\r\n      default: () => []\r\n    }\r\n  },\r\n  watch: {\r\n    defaultOptions: {\r\n      handler(val) {\r\n        this.forceRerender(val);\r\n      },\r\n      deep: true,\r\n      immediate: true\r\n    },\r\n    pages: {\r\n      handler() {\r\n        this.forceRerender(this.defaultOptions);\r\n      },\r\n      deep: true,\r\n      immediate: true\r\n    }\r\n  },\r\n  computed: {\r\n    uid() {\r\n      return `jopa-${this.nanoid}`;\r\n    },\r\n    selector() {\r\n      return `div[data-uid=${this.uid}]`;\r\n    },\r\n    defaultOptions() {\r\n      return {\r\n        // vertical or horizontal flip\r\n        orientation: \"horizontal\",\r\n\r\n        // ltr (left to right) or rtl (right to left)\r\n        direction: \"ltr\",\r\n\r\n        // speed for the flip transition in ms.\r\n        speed: 1000,\r\n\r\n        // easing for the flip transition.\r\n        easing: \"ease-in-out\",\r\n\r\n        // if set to true, both the flipping page and the sides will have an overlay to simulate shadows\r\n        shadows: true,\r\n\r\n        // opacity value for the \"shadow\" on both sides (when the flipping page is over it).\r\n        // value : 0.1 - 1\r\n        shadowSides: 0.2,\r\n\r\n        // opacity value for the \"shadow\" on the flipping page (while it is flipping).\r\n        // value : 0.1 - 1\r\n        shadowFlip: 0.1,\r\n\r\n        // if we should show the first item after reaching the end.\r\n        circular: false,\r\n\r\n        // if we want to specify a selector that triggers the next() function. example: '#bb-nav-next'.\r\n        nextEl: \"\",\r\n\r\n        // if we want to specify a selector that triggers the prev() function.\r\n        prevEl: \"\",\r\n\r\n        // If true it overwrites the circular option to true!\r\n        autoplay: false,\r\n\r\n        // time (ms) between page switch, if autoplay is true.\r\n        interval: 3000,\r\n\r\n        // callback after the flip transition.\r\n        // page is the current item's index.\r\n        // isLimit is true if the current page is the last one (or the first one).\r\n        onEndFlip: function(page, isLimit) {\r\n          return false;\r\n        },\r\n\r\n        // callback before the flip transition.\r\n        // page is the current item's index.\r\n        onBeforeFlip: function(page) {\r\n          return false;\r\n        },\r\n        ...this.options\r\n      };\r\n    }\r\n  },\r\n  mounted() {\r\n    this.forceRerender(this.defaultOptions);\r\n  },\r\n  methods: {\r\n    next() {\r\n      $(this.selector).bookblock(\"next\");\r\n    },\r\n    prev() {\r\n      $(this.selector).bookblock(\"prev\");\r\n    },\r\n    jump(position) {\r\n      $(this.selector).bookblock(\"jump\", position);\r\n    },\r\n    first() {\r\n      $(this.selector).bookblock(\"first\");\r\n    },\r\n    last() {\r\n      $(this.selector).bookblock(\"last\");\r\n    },\r\n    update() {\r\n      console.log(\"updated\");\r\n      $(this.selector).bookblock(\"update\");\r\n    },\r\n    destroy() {\r\n      $(this.selector).bookblock(\"destroy\");\r\n    },\r\n    forceRerender(val) {\r\n      if (this.pages.length === 1) {\r\n        val.autoplay = false;\r\n      }\r\n      this.componentKey += 1;\r\n\r\n      this.$nextTick(() => {\r\n        $(this.selector).bookblock(val);\r\n      });\r\n    }\r\n  }\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n@import \"./index.scss\";\r\n</style>\r\n","import FwBookblock2 from \"./bookblock2.vue\";\r\nimport { pluginFactory } from \"../../utils/plugin\";\r\n\r\nconst Bookblock2Plugin = pluginFactory({ components: { FwBookblock2 } });\r\n\r\nexport { Bookblock2Plugin, FwBookblock2 };\r\n","/**\n * turn.js 4th release\n * turnjs.com\n * turnjs.com/license.txt\n *\n * Copyright (C) 2012 Emmanuel Garcia\n * All rights reserved\n **/\n\n(function($) {\n  \"use strict\";\n\n  var has3d,\n    hasRot,\n    vendor = \"\",\n    version = \"4.1.0\",\n    PI = Math.PI,\n    A90 = PI / 2,\n    isTouch = \"ontouchstart\" in window,\n    mouseEvents = isTouch\n      ? {\n          down: \"touchstart\",\n          move: \"touchmove\",\n          up: \"touchend\",\n          over: \"touchstart\",\n          out: \"touchend\"\n        }\n      : {\n          down: \"mousedown\",\n          move: \"mousemove\",\n          up: \"mouseup\",\n          over: \"mouseover\",\n          out: \"mouseout\"\n        },\n    // Contansts used for each corner\n    //   | tl * tr |\n    // l | *     * | r\n    //   | bl * br |\n\n    corners = {\n      backward: [\"bl\", \"tl\"],\n      forward: [\"br\", \"tr\"],\n      all: [\"tl\", \"bl\", \"tr\", \"br\", \"l\", \"r\"]\n    },\n    // Display values\n\n    displays = [\"single\", \"double\"],\n    // Direction values\n\n    directions = [\"ltr\", \"rtl\"],\n    // Default options\n\n    turnOptions = {\n      // Enables hardware acceleration\n\n      acceleration: true,\n\n      // Display\n\n      display: \"double\",\n\n      // Duration of transition in milliseconds\n\n      duration: 600,\n\n      // First page\n\n      page: 1,\n\n      // Enables gradients\n\n      gradients: true,\n\n      // Corners used when turning the page\n\n      turnCorners: \"bl,br\",\n\n      // Events\n\n      when: null\n    },\n    flipOptions = {\n      // Size of the active zone of each corner\n\n      cornerSize: 100\n    },\n    // Number of pages in the DOM, minimum value: 6\n\n    pagesInDOM = 6,\n    turnMethods = {\n      // Singleton constructor\n      // $('#selector').turn([options]);\n\n      init: function(options) {\n        // Define constants\n\n        has3d =\n          \"WebKitCSSMatrix\" in window ||\n          \"MozPerspective\" in document.body.style;\n        hasRot = rotationAvailable();\n        vendor = getPrefix();\n\n        var i,\n          that = this,\n          pageNum = 0,\n          data = this.data(),\n          ch = this.children();\n\n        // Set initial configuration\n\n        options = $.extend(\n          {\n            width: this.width(),\n            height: this.height(),\n            direction: this.attr(\"dir\") || this.css(\"direction\") || \"ltr\"\n          },\n          turnOptions,\n          options\n        );\n\n        data.opts = options;\n        data.pageObjs = {};\n        data.pages = {};\n        data.pageWrap = {};\n        data.pageZoom = {};\n        data.pagePlace = {};\n        data.pageMv = [];\n        data.zoom = 1;\n        data.totalPages = options.pages || 0;\n        data.eventHandlers = {\n          touchStart: $.proxy(turnMethods._touchStart, this),\n          touchMove: $.proxy(turnMethods._touchMove, this),\n          touchEnd: $.proxy(turnMethods._touchEnd, this),\n          start: $.proxy(turnMethods._eventStart, this)\n        };\n\n        // Add event listeners\n\n        if (options.when)\n          for (i in options.when)\n            if (has(i, options.when)) this.bind(i, options.when[i]);\n\n        // Set the css\n\n        this.css({\n          position: \"relative\",\n          width: options.width,\n          height: options.height\n        });\n\n        // Set the initial display\n\n        this.turn(\"display\", options.display);\n\n        // Set the direction\n\n        if (options.direction !== \"\") this.turn(\"direction\", options.direction);\n\n        // Prevent blue screen problems of switching to hardware acceleration mode\n        // By forcing hardware acceleration for ever\n\n        if (has3d && !isTouch && options.acceleration)\n          this.transform(translate(0, 0, true));\n\n        // Add pages from the DOM\n\n        for (i = 0; i < ch.length; i++) {\n          if ($(ch[i]).attr(\"ignore\") != \"1\") {\n            this.turn(\"addPage\", ch[i], ++pageNum);\n          }\n        }\n\n        // Event listeners\n\n        $(this)\n          .bind(mouseEvents.down, data.eventHandlers.touchStart)\n          .bind(\"end\", turnMethods._eventEnd)\n          .bind(\"pressed\", turnMethods._eventPressed)\n          .bind(\"released\", turnMethods._eventReleased)\n          .bind(\"flip\", turnMethods._flip);\n\n        $(this)\n          .parent()\n          .bind(\"start\", data.eventHandlers.start);\n\n        $(document)\n          .bind(mouseEvents.move, data.eventHandlers.touchMove)\n          .bind(mouseEvents.up, data.eventHandlers.touchEnd);\n\n        // Set the initial page\n\n        this.turn(\"page\", options.page);\n\n        // This flipbook is ready\n\n        data.done = true;\n\n        return this;\n      },\n\n      // Adds a page from external data\n\n      addPage: function(element, page) {\n        var currentPage,\n          className,\n          incPages = false,\n          data = this.data(),\n          lastPage = data.totalPages + 1;\n\n        if (data.destroying) return false;\n\n        // Read the page number from the className of `element` - format: p[0-9]+\n\n        if ((currentPage = /\\bp([0-9]+)\\b/.exec($(element).attr(\"class\"))))\n          page = parseInt(currentPage[1], 10);\n\n        if (page) {\n          if (page == lastPage) incPages = true;\n          else if (page > lastPage)\n            throw turnError('Page \"' + page + '\" cannot be inserted');\n        } else {\n          page = lastPage;\n          incPages = true;\n        }\n\n        if (page >= 1 && page <= lastPage) {\n          if (data.display == \"double\") className = page % 2 ? \" odd\" : \" even\";\n          else className = \"\";\n\n          // Stop animations\n          if (data.done) this.turn(\"stop\");\n\n          // Move pages if it's necessary\n          if (page in data.pageObjs) turnMethods._movePages.call(this, page, 1);\n\n          // Increase the number of pages\n          if (incPages) data.totalPages = lastPage;\n\n          // Add element\n          data.pageObjs[page] = $(element)\n            .css({ float: \"left\" })\n            .addClass(\"page p\" + page + className);\n\n          if (!hasHardPage() && data.pageObjs[page].hasClass(\"hard\")) {\n            data.pageObjs[page].removeClass(\"hard\");\n          }\n\n          // Add page\n          turnMethods._addPage.call(this, page);\n\n          // Remove pages out of range\n          turnMethods._removeFromDOM.call(this);\n        }\n\n        return this;\n      },\n\n      // Adds a page\n\n      _addPage: function(page) {\n        var data = this.data(),\n          element = data.pageObjs[page];\n\n        if (element)\n          if (turnMethods._necessPage.call(this, page)) {\n            if (!data.pageWrap[page]) {\n              // Wrapper\n              data.pageWrap[page] = $(\"<div/>\", {\n                class: \"page-wrapper\",\n                page: page,\n                css: {\n                  position: \"absolute\",\n                  overflow: \"hidden\"\n                }\n              });\n\n              // Append to this flipbook\n              this.append(data.pageWrap[page]);\n\n              if (!data.pagePlace[page]) {\n                data.pagePlace[page] = page;\n                // Move `pageObjs[page]` to wrapper\n                data.pageObjs[page].appendTo(data.pageWrap[page]);\n              }\n\n              // Set the size of the page\n              var prop = turnMethods._pageSize.call(this, page, true);\n              element.css({ width: prop.width, height: prop.height });\n              data.pageWrap[page].css(prop);\n            }\n\n            if (data.pagePlace[page] == page) {\n              // If the page isn't in another place, create the flip effect\n              turnMethods._makeFlip.call(this, page);\n            }\n          } else {\n            // Place\n            data.pagePlace[page] = 0;\n\n            // Remove element from the DOM\n            if (data.pageObjs[page]) data.pageObjs[page].remove();\n          }\n      },\n\n      // Checks if a page is in memory\n\n      hasPage: function(page) {\n        return has(page, this.data().pageObjs);\n      },\n\n      // Centers the flipbook\n\n      center: function(page) {\n        var data = this.data(),\n          size = $(this).turn(\"size\"),\n          left = 0;\n\n        if (!data.noCenter) {\n          if (data.display == \"double\") {\n            var view = this.turn(\"view\", page || data.tpage || data.page);\n\n            if (data.direction == \"ltr\") {\n              if (!view[0]) left -= size.width / 4;\n              else if (!view[1]) left += size.width / 4;\n            } else {\n              if (!view[0]) left += size.width / 4;\n              else if (!view[1]) left -= size.width / 4;\n            }\n          }\n\n          $(this).css({ marginLeft: left });\n        }\n\n        return this;\n      },\n\n      // Destroys the flipbook\n\n      destroy: function() {\n        var page,\n          flipbook = this,\n          data = this.data(),\n          events = [\n            \"end\",\n            \"first\",\n            \"flip\",\n            \"last\",\n            \"pressed\",\n            \"released\",\n            \"start\",\n            \"turning\",\n            \"turned\",\n            \"zooming\",\n            \"missing\"\n          ];\n\n        if (trigger(\"destroying\", this) == \"prevented\") return;\n\n        data.destroying = true;\n\n        $.each(events, function(index, eventName) {\n          flipbook.unbind(eventName);\n        });\n\n        this.parent().unbind(\"start\", data.eventHandlers.start);\n\n        $(document)\n          .unbind(mouseEvents.move, data.eventHandlers.touchMove)\n          .unbind(mouseEvents.up, data.eventHandlers.touchEnd);\n\n        while (data.totalPages !== 0) {\n          this.turn(\"removePage\", data.totalPages);\n        }\n\n        if (data.fparent) data.fparent.remove();\n\n        if (data.shadow) data.shadow.remove();\n\n        this.removeData();\n        data = null;\n\n        return this;\n      },\n\n      // Checks if this element is a flipbook\n\n      is: function() {\n        return typeof this.data().pages == \"object\";\n      },\n\n      // Sets and gets the zoom value\n\n      zoom: function(newZoom) {\n        var data = this.data();\n\n        if (typeof newZoom == \"number\") {\n          if (newZoom < 0.001 || newZoom > 100)\n            throw turnError(newZoom + \" is not a value for zoom\");\n\n          if (trigger(\"zooming\", this, [newZoom, data.zoom]) == \"prevented\")\n            return this;\n\n          var size = this.turn(\"size\"),\n            currentView = this.turn(\"view\"),\n            iz = 1 / data.zoom,\n            newWidth = Math.round(size.width * iz * newZoom),\n            newHeight = Math.round(size.height * iz * newZoom);\n\n          data.zoom = newZoom;\n\n          $(this)\n            .turn(\"stop\")\n            .turn(\"size\", newWidth, newHeight);\n          /*.\n          css({marginTop: size.height * iz / 2 - newHeight / 2});*/\n\n          if (data.opts.autoCenter) this.turn(\"center\");\n          /*else\n            $(this).css({marginLeft: size.width * iz / 2 - newWidth / 2});*/\n\n          turnMethods._updateShadow.call(this);\n\n          for (var i = 0; i < currentView.length; i++) {\n            if (currentView[i] && data.pageZoom[currentView[i]] != data.zoom) {\n              this.trigger(\"zoomed\", [\n                currentView[i],\n                currentView,\n                data.pageZoom[currentView[i]],\n                data.zoom\n              ]);\n\n              data.pageZoom[currentView[i]] = data.zoom;\n            }\n          }\n\n          return this;\n        } else return data.zoom;\n      },\n\n      // Gets the size of a page\n\n      _pageSize: function(page, position) {\n        var data = this.data(),\n          prop = {};\n\n        if (data.display == \"single\") {\n          prop.width = this.width();\n          prop.height = this.height();\n\n          if (position) {\n            prop.top = 0;\n            prop.left = 0;\n            prop.right = \"auto\";\n          }\n        } else {\n          var pageWidth = this.width() / 2,\n            pageHeight = this.height();\n\n          if (data.pageObjs[page].hasClass(\"own-size\")) {\n            prop.width = data.pageObjs[page].width();\n            prop.height = data.pageObjs[page].height();\n          } else {\n            prop.width = pageWidth;\n            prop.height = pageHeight;\n          }\n\n          if (position) {\n            var odd = page % 2;\n            prop.top = (pageHeight - prop.height) / 2;\n\n            if (data.direction == \"ltr\") {\n              prop[odd ? \"right\" : \"left\"] = pageWidth - prop.width;\n              prop[odd ? \"left\" : \"right\"] = \"auto\";\n            } else {\n              prop[odd ? \"left\" : \"right\"] = pageWidth - prop.width;\n              prop[odd ? \"right\" : \"left\"] = \"auto\";\n            }\n          }\n        }\n\n        return prop;\n      },\n\n      // Prepares the flip effect for a page\n\n      _makeFlip: function(page) {\n        var data = this.data();\n\n        if (!data.pages[page] && data.pagePlace[page] == page) {\n          var single = data.display == \"single\",\n            odd = page % 2;\n\n          data.pages[page] = data.pageObjs[page]\n            .css(turnMethods._pageSize.call(this, page))\n            .flip({\n              page: page,\n              next: odd || single ? page + 1 : page - 1,\n              turn: this\n            })\n            .flip(\"disable\", data.disabled);\n\n          // Issue about z-index\n          turnMethods._setPageLoc.call(this, page);\n\n          data.pageZoom[page] = data.zoom;\n        }\n\n        return data.pages[page];\n      },\n\n      // Makes pages within a range\n\n      _makeRange: function() {\n        var page,\n          range,\n          data = this.data();\n\n        if (data.totalPages < 1) return;\n\n        range = this.turn(\"range\");\n\n        for (page = range[0]; page <= range[1]; page++)\n          turnMethods._addPage.call(this, page);\n      },\n\n      // Returns a range of pages that should be in the DOM\n      // Example:\n      // - page in the current view, return true\n      // * page is in the range, return true\n      // Otherwise, return false\n      //\n      // 1 2-3 4-5 6-7 8-9 10-11 12-13\n      //   **  **  --   **  **\n\n      range: function(page) {\n        var remainingPages,\n          left,\n          right,\n          view,\n          data = this.data();\n\n        page = page || data.tpage || data.page || 1;\n        view = turnMethods._view.call(this, page);\n\n        if (page < 1 || page > data.totalPages)\n          throw turnError('\"' + page + '\" is not a valid page');\n\n        view[1] = view[1] || view[0];\n\n        if (view[0] >= 1 && view[1] <= data.totalPages) {\n          remainingPages = Math.floor((pagesInDOM - 2) / 2);\n\n          if (data.totalPages - view[1] > view[0]) {\n            left = Math.min(view[0] - 1, remainingPages);\n            right = 2 * remainingPages - left;\n          } else {\n            right = Math.min(data.totalPages - view[1], remainingPages);\n            left = 2 * remainingPages - right;\n          }\n        } else {\n          left = pagesInDOM - 1;\n          right = pagesInDOM - 1;\n        }\n\n        return [\n          Math.max(1, view[0] - left),\n          Math.min(data.totalPages, view[1] + right)\n        ];\n      },\n\n      // Detects if a page is within the range of `pagesInDOM` from the current view\n\n      _necessPage: function(page) {\n        if (page === 0) return true;\n\n        var range = this.turn(\"range\");\n\n        return (\n          this.data().pageObjs[page].hasClass(\"fixed\") ||\n          (page >= range[0] && page <= range[1])\n        );\n      },\n\n      // Releases memory by removing pages from the DOM\n\n      _removeFromDOM: function() {\n        var page,\n          data = this.data();\n\n        for (page in data.pageWrap)\n          if (\n            has(page, data.pageWrap) &&\n            !turnMethods._necessPage.call(this, page)\n          )\n            turnMethods._removePageFromDOM.call(this, page);\n      },\n\n      // Removes a page from DOM and its internal references\n\n      _removePageFromDOM: function(page) {\n        var data = this.data();\n\n        if (data.pages[page]) {\n          var dd = data.pages[page].data();\n\n          flipMethods._moveFoldingPage.call(data.pages[page], false);\n\n          if (dd.f && dd.f.fwrapper) dd.f.fwrapper.remove();\n\n          data.pages[page].removeData();\n          data.pages[page].remove();\n          delete data.pages[page];\n        }\n\n        if (data.pageObjs[page]) data.pageObjs[page].remove();\n\n        if (data.pageWrap[page]) {\n          data.pageWrap[page].remove();\n          delete data.pageWrap[page];\n        }\n\n        turnMethods._removeMv.call(this, page);\n\n        delete data.pagePlace[page];\n        delete data.pageZoom[page];\n      },\n\n      // Removes a page\n\n      removePage: function(page) {\n        var data = this.data();\n\n        // Delete all the pages\n        if (page == \"*\") {\n          while (data.totalPages !== 0) {\n            this.turn(\"removePage\", data.totalPages);\n          }\n        } else {\n          if (page < 1 || page > data.totalPages)\n            throw turnError(\"The page \" + page + \" doesn't exist\");\n\n          if (data.pageObjs[page]) {\n            // Stop animations\n            this.turn(\"stop\");\n\n            // Remove `page`\n            turnMethods._removePageFromDOM.call(this, page);\n\n            delete data.pageObjs[page];\n          }\n\n          // Move the pages\n          turnMethods._movePages.call(this, page, -1);\n\n          // Resize the size of this flipbook\n          data.totalPages = data.totalPages - 1;\n\n          // Check the current view\n\n          if (data.page > data.totalPages) {\n            data.page = null;\n            turnMethods._fitPage.call(this, data.totalPages);\n          } else {\n            turnMethods._makeRange.call(this);\n            this.turn(\"update\");\n          }\n        }\n\n        return this;\n      },\n\n      // Moves pages\n\n      _movePages: function(from, change) {\n        var page,\n          that = this,\n          data = this.data(),\n          single = data.display == \"single\",\n          move = function(page) {\n            var next = page + change,\n              odd = next % 2,\n              className = odd ? \" odd \" : \" even \";\n\n            if (data.pageObjs[page])\n              data.pageObjs[next] = data.pageObjs[page]\n                .removeClass(\"p\" + page + \" odd even\")\n                .addClass(\"p\" + next + className);\n\n            if (data.pagePlace[page] && data.pageWrap[page]) {\n              data.pagePlace[next] = next;\n\n              if (data.pageObjs[next].hasClass(\"fixed\"))\n                data.pageWrap[next] = data.pageWrap[page].attr(\"page\", next);\n              else\n                data.pageWrap[next] = data.pageWrap[page]\n                  .css(turnMethods._pageSize.call(that, next, true))\n                  .attr(\"page\", next);\n\n              if (data.pages[page])\n                data.pages[next] = data.pages[page].flip(\"options\", {\n                  page: next,\n                  next: single || odd ? next + 1 : next - 1\n                });\n\n              if (change) {\n                delete data.pages[page];\n                delete data.pagePlace[page];\n                delete data.pageZoom[page];\n                delete data.pageObjs[page];\n                delete data.pageWrap[page];\n              }\n            }\n          };\n\n        if (change > 0)\n          for (page = data.totalPages; page >= from; page--) move(page);\n        else for (page = from; page <= data.totalPages; page++) move(page);\n      },\n\n      // Sets or Gets the display mode\n\n      display: function(display) {\n        var data = this.data(),\n          currentDisplay = data.display;\n\n        if (display === undefined) {\n          return currentDisplay;\n        } else {\n          if ($.inArray(display, displays) == -1)\n            throw turnError('\"' + display + '\" is not a value for display');\n\n          switch (display) {\n            case \"single\":\n              // Create a temporal page to use as folded page\n\n              if (!data.pageObjs[0]) {\n                this.turn(\"stop\").css({ overflow: \"hidden\" });\n\n                data.pageObjs[0] = $(\"<div />\", { class: \"page p-temporal\" })\n                  .css({ width: this.width(), height: this.height() })\n                  .appendTo(this);\n              }\n\n              this.addClass(\"shadow\");\n\n              break;\n            case \"double\":\n              // Remove the temporal page\n\n              if (data.pageObjs[0]) {\n                this.turn(\"stop\").css({ overflow: \"\" });\n                data.pageObjs[0].remove();\n                delete data.pageObjs[0];\n              }\n\n              this.removeClass(\"shadow\");\n\n              break;\n          }\n\n          data.display = display;\n\n          if (currentDisplay) {\n            var size = this.turn(\"size\");\n            turnMethods._movePages.call(this, 1, 0);\n            this.turn(\"size\", size.width, size.height).turn(\"update\");\n          }\n\n          return this;\n        }\n      },\n\n      // Gets and sets the direction of the flipbook\n\n      direction: function(dir) {\n        var data = this.data();\n\n        if (dir === undefined) {\n          return data.direction;\n        } else {\n          dir = dir.toLowerCase();\n\n          if ($.inArray(dir, directions) == -1)\n            throw turnError('\"' + dir + '\" is not a value for direction');\n\n          if (dir == \"rtl\") {\n            $(this)\n              .attr(\"dir\", \"ltr\")\n              .css({ direction: \"ltr\" });\n          }\n\n          data.direction = dir;\n\n          if (data.done) this.turn(\"size\", $(this).width(), $(this).height());\n\n          return this;\n        }\n      },\n\n      // Detects animation\n\n      animating: function() {\n        return this.data().pageMv.length > 0;\n      },\n\n      // Gets the current activated corner\n\n      corner: function() {\n        var corner,\n          page,\n          data = this.data();\n\n        for (page in data.pages) {\n          if (has(page, data.pages))\n            if ((corner = data.pages[page].flip(\"corner\"))) {\n              return corner;\n            }\n        }\n\n        return false;\n      },\n\n      // Gets the data stored in the flipbook\n\n      data: function() {\n        return this.data();\n      },\n\n      // Disables and enables the effect\n\n      disable: function(disable) {\n        var page,\n          data = this.data(),\n          view = this.turn(\"view\");\n\n        data.disabled = disable === undefined || disable === true;\n\n        for (page in data.pages) {\n          if (has(page, data.pages))\n            data.pages[page].flip(\n              \"disable\",\n              data.disabled ? true : $.inArray(parseInt(page, 10), view) == -1\n            );\n        }\n\n        return this;\n      },\n\n      // Disables and enables the effect\n\n      disabled: function(disable) {\n        if (disable === undefined) {\n          return this.data().disabled === true;\n        } else {\n          return this.turn(\"disable\", disable);\n        }\n      },\n\n      // Gets and sets the size\n\n      size: function(width, height) {\n        if (width === undefined || height === undefined) {\n          return { width: this.width(), height: this.height() };\n        } else {\n          this.turn(\"stop\");\n\n          var page,\n            prop,\n            data = this.data(),\n            pageWidth = data.display == \"double\" ? width / 2 : width;\n\n          this.css({ width: width, height: height });\n\n          if (data.pageObjs[0])\n            data.pageObjs[0].css({ width: pageWidth, height: height });\n\n          for (page in data.pageWrap) {\n            if (!has(page, data.pageWrap)) continue;\n\n            prop = turnMethods._pageSize.call(this, page, true);\n\n            data.pageObjs[page].css({ width: prop.width, height: prop.height });\n            data.pageWrap[page].css(prop);\n\n            if (data.pages[page])\n              data.pages[page].css({ width: prop.width, height: prop.height });\n          }\n\n          this.turn(\"resize\");\n\n          return this;\n        }\n      },\n\n      // Resizes each page\n\n      resize: function() {\n        var page,\n          data = this.data();\n\n        if (data.pages[0]) {\n          data.pageWrap[0].css({ left: -this.width() });\n          data.pages[0].flip(\"resize\", true);\n        }\n\n        for (page = 1; page <= data.totalPages; page++)\n          if (data.pages[page]) data.pages[page].flip(\"resize\", true);\n\n        turnMethods._updateShadow.call(this);\n\n        if (data.opts.autoCenter) this.turn(\"center\");\n      },\n\n      // Removes an animation from the cache\n\n      _removeMv: function(page) {\n        var i,\n          data = this.data();\n\n        for (i = 0; i < data.pageMv.length; i++)\n          if (data.pageMv[i] == page) {\n            data.pageMv.splice(i, 1);\n            return true;\n          }\n\n        return false;\n      },\n\n      // Adds an animation to the cache\n\n      _addMv: function(page) {\n        var data = this.data();\n\n        turnMethods._removeMv.call(this, page);\n        data.pageMv.push(page);\n      },\n\n      // Gets indexes for a view\n\n      _view: function(page) {\n        var data = this.data();\n\n        page = page || data.page;\n\n        if (data.display == \"double\")\n          return page % 2 ? [page - 1, page] : [page, page + 1];\n        else return [page];\n      },\n\n      // Gets a view\n\n      view: function(page) {\n        var data = this.data(),\n          view = turnMethods._view.call(this, page);\n\n        if (data.display == \"double\")\n          return [\n            view[0] > 0 ? view[0] : 0,\n            view[1] <= data.totalPages ? view[1] : 0\n          ];\n        else return [view[0] > 0 && view[0] <= data.totalPages ? view[0] : 0];\n      },\n\n      // Stops animations\n\n      stop: function(ignore, animate) {\n        if (this.turn(\"animating\")) {\n          var i,\n            opts,\n            page,\n            data = this.data();\n\n          if (data.tpage) {\n            data.page = data.tpage;\n            delete data[\"tpage\"];\n          }\n\n          for (i = 0; i < data.pageMv.length; i++) {\n            if (!data.pageMv[i] || data.pageMv[i] === ignore) continue;\n\n            page = data.pages[data.pageMv[i]];\n            opts = page.data().f.opts;\n\n            page.flip(\"hideFoldedPage\", animate);\n\n            if (!animate) flipMethods._moveFoldingPage.call(page, false);\n\n            if (opts.force) {\n              opts.next = opts.page % 2 === 0 ? opts.page - 1 : opts.page + 1;\n              delete opts[\"force\"];\n            }\n          }\n        }\n\n        this.turn(\"update\");\n\n        return this;\n      },\n\n      // Gets and sets the number of pages\n\n      pages: function(pages) {\n        var data = this.data();\n\n        if (pages) {\n          if (pages < data.totalPages) {\n            for (var page = data.totalPages; page > pages; page--)\n              this.turn(\"removePage\", page);\n          }\n\n          data.totalPages = pages;\n          turnMethods._fitPage.call(this, data.page);\n\n          return this;\n        } else return data.totalPages;\n      },\n\n      // Checks missing pages\n\n      _missing: function(page) {\n        var data = this.data();\n\n        if (data.totalPages < 1) return;\n\n        var p,\n          range = this.turn(\"range\", page),\n          missing = [];\n\n        for (p = range[0]; p <= range[1]; p++) {\n          if (!data.pageObjs[p]) missing.push(p);\n        }\n\n        if (missing.length > 0) this.trigger(\"missing\", [missing]);\n      },\n\n      // Sets a page without effect\n\n      _fitPage: function(page) {\n        var data = this.data(),\n          newView = this.turn(\"view\", page);\n\n        turnMethods._missing.call(this, page);\n\n        if (!data.pageObjs[page]) return;\n\n        data.page = page;\n\n        this.turn(\"stop\");\n\n        for (var i = 0; i < newView.length; i++) {\n          if (newView[i] && data.pageZoom[newView[i]] != data.zoom) {\n            this.trigger(\"zoomed\", [\n              newView[i],\n              newView,\n              data.pageZoom[newView[i]],\n              data.zoom\n            ]);\n\n            data.pageZoom[newView[i]] = data.zoom;\n          }\n        }\n\n        turnMethods._removeFromDOM.call(this);\n        turnMethods._makeRange.call(this);\n        turnMethods._updateShadow.call(this);\n        this.trigger(\"turned\", [page, newView]);\n        this.turn(\"update\");\n\n        if (data.opts.autoCenter) this.turn(\"center\");\n      },\n\n      // Turns the page\n\n      _turnPage: function(page) {\n        var current,\n          next,\n          data = this.data(),\n          place = data.pagePlace[page],\n          view = this.turn(\"view\"),\n          newView = this.turn(\"view\", page);\n\n        if (data.page != page) {\n          var currentPage = data.page;\n\n          if (trigger(\"turning\", this, [page, newView]) == \"prevented\") {\n            if (currentPage == data.page && $.inArray(place, data.pageMv) != -1)\n              data.pages[place].flip(\"hideFoldedPage\", true);\n\n            return;\n          }\n\n          if ($.inArray(1, newView) != -1) this.trigger(\"first\");\n          if ($.inArray(data.totalPages, newView) != -1) this.trigger(\"last\");\n        }\n\n        if (data.display == \"single\") {\n          current = view[0];\n          next = newView[0];\n        } else if (view[1] && page > view[1]) {\n          current = view[1];\n          next = newView[0];\n        } else if (view[0] && page < view[0]) {\n          current = view[0];\n          next = newView[1];\n        }\n\n        var optsCorners = data.opts.turnCorners.split(\",\"),\n          flipData = data.pages[current].data().f,\n          opts = flipData.opts,\n          actualPoint = flipData.point;\n\n        turnMethods._missing.call(this, page);\n\n        if (!data.pageObjs[page]) return;\n\n        this.turn(\"stop\");\n\n        data.page = page;\n\n        turnMethods._makeRange.call(this);\n\n        data.tpage = next;\n\n        if (opts.next != next) {\n          opts.next = next;\n          opts.force = true;\n        }\n\n        this.turn(\"update\");\n\n        flipData.point = actualPoint;\n\n        if (flipData.effect == \"hard\")\n          if (data.direction == \"ltr\")\n            data.pages[current].flip(\"turnPage\", page > current ? \"r\" : \"l\");\n          else data.pages[current].flip(\"turnPage\", page > current ? \"l\" : \"r\");\n        else {\n          if (data.direction == \"ltr\")\n            data.pages[current].flip(\n              \"turnPage\",\n              optsCorners[page > current ? 1 : 0]\n            );\n          else\n            data.pages[current].flip(\n              \"turnPage\",\n              optsCorners[page > current ? 0 : 1]\n            );\n        }\n      },\n\n      // Gets and sets a page\n\n      page: function(page) {\n        var data = this.data();\n\n        if (page === undefined) {\n          return data.page;\n        } else {\n          if (!data.disabled && !data.destroying) {\n            page = parseInt(page, 10);\n\n            if (page > 0 && page <= data.totalPages) {\n              if (page != data.page) {\n                if (!data.done || $.inArray(page, this.turn(\"view\")) != -1)\n                  turnMethods._fitPage.call(this, page);\n                else turnMethods._turnPage.call(this, page);\n              }\n\n              return this;\n            } else {\n              throw turnError(\"The page \" + page + \" does not exist\");\n            }\n          }\n        }\n      },\n\n      // Turns to the next view\n\n      next: function() {\n        return this.turn(\n          \"page\",\n          Math.min(\n            this.data().totalPages,\n            turnMethods._view.call(this, this.data().page).pop() + 1\n          )\n        );\n      },\n\n      // Turns to the previous view\n\n      previous: function() {\n        return this.turn(\n          \"page\",\n          Math.max(\n            1,\n            turnMethods._view.call(this, this.data().page).shift() - 1\n          )\n        );\n      },\n\n      // Shows a peeling corner\n\n      peel: function(corner, animate) {\n        var data = this.data(),\n          view = this.turn(\"view\");\n\n        animate = animate === undefined ? true : animate === true;\n\n        if (corner === false) {\n          this.turn(\"stop\", null, animate);\n        } else {\n          if (data.display == \"single\") {\n            data.pages[data.page].flip(\"peel\", corner, animate);\n          } else {\n            var page;\n\n            if (data.direction == \"ltr\") {\n              page = corner.indexOf(\"l\") != -1 ? view[0] : view[1];\n            } else {\n              page = corner.indexOf(\"l\") != -1 ? view[1] : view[0];\n            }\n\n            if (data.pages[page])\n              data.pages[page].flip(\"peel\", corner, animate);\n          }\n        }\n\n        return this;\n      },\n\n      // Adds a motion to the internal list\n      // This event is called in context of flip\n\n      _addMotionPage: function() {\n        var opts = $(this).data().f.opts,\n          turn = opts.turn,\n          dd = turn.data();\n\n        turnMethods._addMv.call(turn, opts.page);\n      },\n\n      // This event is called in context of flip\n\n      _eventStart: function(e, opts, corner) {\n        var data = opts.turn.data(),\n          actualZoom = data.pageZoom[opts.page];\n\n        if (e.isDefaultPrevented()) {\n          turnMethods._updateShadow.call(opts.turn);\n          return;\n        }\n\n        if (actualZoom && actualZoom != data.zoom) {\n          opts.turn.trigger(\"zoomed\", [\n            opts.page,\n            opts.turn.turn(\"view\", opts.page),\n            actualZoom,\n            data.zoom\n          ]);\n\n          data.pageZoom[opts.page] = data.zoom;\n        }\n\n        if (data.display == \"single\" && corner) {\n          if (\n            (corner.charAt(1) == \"l\" && data.direction == \"ltr\") ||\n            (corner.charAt(1) == \"r\" && data.direction == \"rtl\")\n          ) {\n            opts.next = opts.next < opts.page ? opts.next : opts.page - 1;\n            opts.force = true;\n          } else {\n            opts.next = opts.next > opts.page ? opts.next : opts.page + 1;\n          }\n        }\n\n        turnMethods._addMotionPage.call(e.target);\n        turnMethods._updateShadow.call(opts.turn);\n      },\n\n      // This event is called in context of flip\n\n      _eventEnd: function(e, opts, turned) {\n        var that = $(e.target),\n          data = that.data().f,\n          turn = opts.turn,\n          dd = turn.data();\n\n        if (turned) {\n          var tpage = dd.tpage || dd.page;\n\n          if (tpage == opts.next || tpage == opts.page) {\n            delete dd.tpage;\n\n            turnMethods._fitPage.call(turn, tpage || opts.next, true);\n          }\n        } else {\n          turnMethods._removeMv.call(turn, opts.page);\n          turnMethods._updateShadow.call(turn);\n          turn.turn(\"update\");\n        }\n      },\n\n      // This event is called in context of flip\n\n      _eventPressed: function(e) {\n        var page,\n          data = $(e.target).data().f,\n          turn = data.opts.turn,\n          turnData = turn.data(),\n          pages = turnData.pages;\n\n        turnData.mouseAction = true;\n\n        turn.turn(\"update\");\n\n        return (data.time = new Date().getTime());\n      },\n\n      // This event is called in context of flip\n\n      _eventReleased: function(e, point) {\n        var outArea,\n          page = $(e.target),\n          data = page.data().f,\n          turn = data.opts.turn,\n          turnData = turn.data();\n\n        if (turnData.display == \"single\") {\n          outArea =\n            point.corner == \"br\" || point.corner == \"tr\"\n              ? point.x < page.width() / 2\n              : point.x > page.width() / 2;\n        } else {\n          outArea = point.x < 0 || point.x > page.width();\n        }\n\n        if (new Date().getTime() - data.time < 200 || outArea) {\n          e.preventDefault();\n          turnMethods._turnPage.call(turn, data.opts.next);\n        }\n\n        turnData.mouseAction = false;\n      },\n\n      // This event is called in context of flip\n\n      _flip: function(e) {\n        e.stopPropagation();\n\n        var opts = $(e.target).data().f.opts;\n\n        opts.turn.trigger(\"turn\", [opts.next]);\n\n        if (opts.turn.data().opts.autoCenter) {\n          opts.turn.turn(\"center\", opts.next);\n        }\n      },\n\n      //\n      _touchStart: function() {\n        var data = this.data();\n        for (var page in data.pages) {\n          if (\n            has(page, data.pages) &&\n            flipMethods._eventStart.apply(data.pages[page], arguments) === false\n          ) {\n            return false;\n          }\n        }\n      },\n\n      //\n      _touchMove: function() {\n        var data = this.data();\n        for (var page in data.pages) {\n          if (has(page, data.pages)) {\n            flipMethods._eventMove.apply(data.pages[page], arguments);\n          }\n        }\n      },\n\n      //\n      _touchEnd: function() {\n        var data = this.data();\n        for (var page in data.pages) {\n          if (has(page, data.pages)) {\n            flipMethods._eventEnd.apply(data.pages[page], arguments);\n          }\n        }\n      },\n\n      // Calculate the z-index value for pages during the animation\n\n      calculateZ: function(mv) {\n        var i,\n          page,\n          nextPage,\n          placePage,\n          dpage,\n          that = this,\n          data = this.data(),\n          view = this.turn(\"view\"),\n          currentPage = view[0] || view[1],\n          total = mv.length - 1,\n          r = { pageZ: {}, partZ: {}, pageV: {} },\n          addView = function(page) {\n            var view = that.turn(\"view\", page);\n            if (view[0]) r.pageV[view[0]] = true;\n            if (view[1]) r.pageV[view[1]] = true;\n          };\n\n        for (i = 0; i <= total; i++) {\n          page = mv[i];\n          nextPage = data.pages[page].data().f.opts.next;\n          placePage = data.pagePlace[page];\n          addView(page);\n          addView(nextPage);\n          dpage = data.pagePlace[nextPage] == nextPage ? nextPage : page;\n          r.pageZ[dpage] = data.totalPages - Math.abs(currentPage - dpage);\n          r.partZ[placePage] = data.totalPages * 2 - total + i;\n        }\n\n        return r;\n      },\n\n      // Updates the z-index and display property of every page\n\n      update: function() {\n        var page,\n          data = this.data();\n\n        if (this.turn(\"animating\") && data.pageMv[0] !== 0) {\n          // Update motion\n\n          var p,\n            apage,\n            fixed,\n            pos = this.turn(\"calculateZ\", data.pageMv),\n            corner = this.turn(\"corner\"),\n            actualView = this.turn(\"view\"),\n            newView = this.turn(\"view\", data.tpage);\n\n          for (page in data.pageWrap) {\n            if (!has(page, data.pageWrap)) continue;\n\n            fixed = data.pageObjs[page].hasClass(\"fixed\");\n\n            data.pageWrap[page].css({\n              display: pos.pageV[page] || fixed ? \"\" : \"none\",\n              zIndex:\n                (data.pageObjs[page].hasClass(\"hard\")\n                  ? pos.partZ[page]\n                  : pos.pageZ[page]) || (fixed ? -1 : 0)\n            });\n\n            if ((p = data.pages[page])) {\n              p.flip(\"z\", pos.partZ[page] || null);\n\n              if (pos.pageV[page]) p.flip(\"resize\");\n\n              if (data.tpage) {\n                // Is it turning the page to `tpage`?\n\n                p.flip(\"hover\", false).flip(\n                  \"disable\",\n                  $.inArray(parseInt(page, 10), data.pageMv) == -1 &&\n                    page != newView[0] &&\n                    page != newView[1]\n                );\n              } else {\n                p.flip(\"hover\", corner === false).flip(\n                  \"disable\",\n                  page != actualView[0] && page != actualView[1]\n                );\n              }\n            }\n          }\n        } else {\n          // Update static pages\n\n          for (page in data.pageWrap) {\n            if (!has(page, data.pageWrap)) continue;\n\n            var pageLocation = turnMethods._setPageLoc.call(this, page);\n\n            if (data.pages[page]) {\n              data.pages[page]\n                .flip(\"disable\", data.disabled || pageLocation != 1)\n                .flip(\"hover\", true)\n                .flip(\"z\", null);\n            }\n          }\n        }\n\n        return this;\n      },\n\n      // Updates the position and size of the flipbook's shadow\n\n      _updateShadow: function() {\n        var view,\n          view2,\n          shadow,\n          data = this.data(),\n          width = this.width(),\n          height = this.height(),\n          pageWidth = data.display == \"single\" ? width : width / 2;\n\n        view = this.turn(\"view\");\n\n        if (!data.shadow) {\n          data.shadow = $(\"<div />\", {\n            class: \"shadow\",\n            css: divAtt(0, 0, 0).css\n          }).appendTo(this);\n        }\n\n        for (var i = 0; i < data.pageMv.length; i++) {\n          if (!view[0] || !view[1]) break;\n\n          view = this.turn(\n            \"view\",\n            data.pages[data.pageMv[i]].data().f.opts.next\n          );\n          view2 = this.turn(\"view\", data.pageMv[i]);\n\n          view[0] = view[0] && view2[0];\n          view[1] = view[1] && view2[1];\n        }\n\n        if (!view[0]) shadow = data.direction == \"ltr\" ? 1 : 2;\n        else if (!view[1]) shadow = data.direction == \"ltr\" ? 2 : 1;\n        else shadow = 3;\n\n        switch (shadow) {\n          case 1:\n            data.shadow.css({\n              width: pageWidth,\n              height: height,\n              top: 0,\n              left: pageWidth\n            });\n            break;\n          case 2:\n            data.shadow.css({\n              width: pageWidth,\n              height: height,\n              top: 0,\n              left: 0\n            });\n            break;\n          case 3:\n            data.shadow.css({\n              width: width,\n              height: height,\n              top: 0,\n              left: 0\n            });\n            break;\n        }\n      },\n\n      // Sets the z-index and display property of a page\n      // It depends on the current view\n\n      _setPageLoc: function(page) {\n        var data = this.data(),\n          view = this.turn(\"view\"),\n          loc = 0;\n\n        if (page == view[0] || page == view[1]) loc = 1;\n        else if (\n          (data.display == \"single\" && page == view[0] + 1) ||\n          (data.display == \"double\" && page == view[0] - 2) ||\n            page == view[1] + 2\n        )\n          loc = 2;\n\n        if (!this.turn(\"animating\"))\n          switch (loc) {\n            case 1:\n              data.pageWrap[page].css({\n                zIndex: data.totalPages,\n                display: \"\"\n              });\n              break;\n            case 2:\n              data.pageWrap[page].css({\n                zIndex: data.totalPages - 1,\n                display: \"\"\n              });\n              break;\n            case 0:\n              data.pageWrap[page].css({\n                zIndex: 0,\n                display: data.pageObjs[page].hasClass(\"fixed\") ? \"\" : \"none\"\n              });\n              break;\n          }\n\n        return loc;\n      },\n\n      // Gets and sets the options\n\n      options: function(options) {\n        if (options === undefined) {\n          return this.data().opts;\n        } else {\n          var data = this.data();\n\n          // Set new values\n\n          $.extend(data.opts, options);\n\n          // Set pages\n\n          if (options.pages) this.turn(\"pages\", options.pages);\n\n          // Set page\n\n          if (options.page) this.turn(\"page\", options.page);\n\n          // Set display\n\n          if (options.display) this.turn(\"display\", options.display);\n\n          // Set direction\n\n          if (options.direction) this.turn(\"direction\", options.direction);\n\n          // Set size\n\n          if (options.width && options.height)\n            this.turn(\"size\", options.width, options.height);\n\n          // Add event listeners\n\n          if (options.when)\n            for (var eventName in options.when)\n              if (has(eventName, options.when)) {\n                this.unbind(eventName).bind(eventName, options.when[eventName]);\n              }\n\n          return this;\n        }\n      },\n\n      // Gets the current version\n\n      version: function() {\n        return version;\n      }\n    },\n    // Methods and properties for the flip page effect\n\n    flipMethods = {\n      // Constructor\n\n      init: function(opts) {\n        this.data({\n          f: {\n            disabled: false,\n            hover: false,\n            effect: this.hasClass(\"hard\") ? \"hard\" : \"sheet\"\n          }\n        });\n\n        this.flip(\"options\", opts);\n\n        flipMethods._addPageWrapper.call(this);\n\n        return this;\n      },\n\n      setData: function(d) {\n        var data = this.data();\n\n        data.f = $.extend(data.f, d);\n\n        return this;\n      },\n\n      options: function(opts) {\n        var data = this.data().f;\n\n        if (opts) {\n          flipMethods.setData.call(this, {\n            opts: $.extend({}, data.opts || flipOptions, opts)\n          });\n          return this;\n        } else return data.opts;\n      },\n\n      z: function(z) {\n        var data = this.data().f;\n\n        data.opts[\"z-index\"] = z;\n\n        if (data.fwrapper)\n          data.fwrapper.css({\n            zIndex: z || parseInt(data.parent.css(\"z-index\"), 10) || 0\n          });\n\n        return this;\n      },\n\n      _cAllowed: function() {\n        var data = this.data().f,\n          page = data.opts.page,\n          turnData = data.opts.turn.data(),\n          odd = page % 2;\n\n        if (data.effect == \"hard\") {\n          return turnData.direction == \"ltr\"\n            ? [odd ? \"r\" : \"l\"]\n            : [odd ? \"l\" : \"r\"];\n        } else {\n          if (turnData.display == \"single\") {\n            if (page == 1)\n              return turnData.direction == \"ltr\"\n                ? corners[\"forward\"]\n                : corners[\"backward\"];\n            else if (page == turnData.totalPages)\n              return turnData.direction == \"ltr\"\n                ? corners[\"backward\"]\n                : corners[\"forward\"];\n            else return corners[\"all\"];\n          } else {\n            return turnData.direction == \"ltr\"\n              ? corners[odd ? \"forward\" : \"backward\"]\n              : corners[odd ? \"backward\" : \"forward\"];\n          }\n        }\n      },\n\n      _cornerActivated: function(p) {\n        var data = this.data().f,\n          width = this.width(),\n          height = this.height(),\n          point = { x: p.x, y: p.y, corner: \"\" },\n          csz = data.opts.cornerSize;\n\n        if (\n          point.x <= 0 ||\n          point.y <= 0 ||\n          point.x >= width ||\n          point.y >= height\n        )\n          return false;\n\n        var allowedCorners = flipMethods._cAllowed.call(this);\n\n        switch (data.effect) {\n          case \"hard\":\n            if (point.x > width - csz) point.corner = \"r\";\n            else if (point.x < csz) point.corner = \"l\";\n            else return false;\n\n            break;\n\n          case \"sheet\":\n            if (point.y < csz) point.corner += \"t\";\n            else if (point.y >= height - csz) point.corner += \"b\";\n            else return false;\n\n            if (point.x <= csz) point.corner += \"l\";\n            else if (point.x >= width - csz) point.corner += \"r\";\n            else return false;\n\n            break;\n        }\n\n        return !point.corner || $.inArray(point.corner, allowedCorners) == -1\n          ? false\n          : point;\n      },\n\n      _isIArea: function(e) {\n        var pos = this.data().f.parent.offset();\n\n        e = isTouch && e.originalEvent ? e.originalEvent.touches[0] : e;\n\n        return flipMethods._cornerActivated.call(this, {\n          x: e.pageX - pos.left,\n          y: e.pageY - pos.top\n        });\n      },\n\n      _c: function(corner, opts) {\n        opts = opts || 0;\n\n        switch (corner) {\n          case \"tl\":\n            return point2D(opts, opts);\n          case \"tr\":\n            return point2D(this.width() - opts, opts);\n          case \"bl\":\n            return point2D(opts, this.height() - opts);\n          case \"br\":\n            return point2D(this.width() - opts, this.height() - opts);\n          case \"l\":\n            return point2D(opts, 0);\n          case \"r\":\n            return point2D(this.width() - opts, 0);\n        }\n      },\n\n      _c2: function(corner) {\n        switch (corner) {\n          case \"tl\":\n            return point2D(this.width() * 2, 0);\n          case \"tr\":\n            return point2D(-this.width(), 0);\n          case \"bl\":\n            return point2D(this.width() * 2, this.height());\n          case \"br\":\n            return point2D(-this.width(), this.height());\n          case \"l\":\n            return point2D(this.width() * 2, 0);\n          case \"r\":\n            return point2D(-this.width(), 0);\n        }\n      },\n\n      _foldingPage: function() {\n        var data = this.data().f;\n\n        if (!data) return;\n\n        var opts = data.opts;\n\n        if (opts.turn) {\n          data = opts.turn.data();\n          if (data.display == \"single\")\n            return opts.next > 1 || opts.page > 1 ? data.pageObjs[0] : null;\n          else return data.pageObjs[opts.next];\n        }\n      },\n\n      _backGradient: function() {\n        var data = this.data().f,\n          turnData = data.opts.turn.data(),\n          gradient =\n            turnData.opts.gradients &&\n            (turnData.display == \"single\" ||\n              (data.opts.page != 2 &&\n                data.opts.page != turnData.totalPages - 1));\n\n        if (gradient && !data.bshadow)\n          data.bshadow = $(\"<div/>\", divAtt(0, 0, 1))\n            .css({ position: \"\", width: this.width(), height: this.height() })\n            .appendTo(data.parent);\n\n        return gradient;\n      },\n\n      type: function() {\n        return this.data().f.effect;\n      },\n\n      resize: function(full) {\n        var data = this.data().f,\n          turnData = data.opts.turn.data(),\n          width = this.width(),\n          height = this.height();\n\n        switch (data.effect) {\n          case \"hard\":\n            if (full) {\n              data.wrapper.css({ width: width, height: height });\n              data.fpage.css({ width: width, height: height });\n              if (turnData.opts.gradients) {\n                data.ashadow.css({ width: width, height: height });\n                data.bshadow.css({ width: width, height: height });\n              }\n            }\n\n            break;\n          case \"sheet\":\n            if (full) {\n              var size = Math.round(\n                Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2))\n              );\n\n              data.wrapper.css({ width: size, height: size });\n              data.fwrapper\n                .css({ width: size, height: size })\n                .children(\":first-child\")\n                .css({ width: width, height: height });\n\n              data.fpage.css({ width: width, height: height });\n\n              if (turnData.opts.gradients)\n                data.ashadow.css({ width: width, height: height });\n\n              if (flipMethods._backGradient.call(this))\n                data.bshadow.css({ width: width, height: height });\n            }\n\n            if (data.parent.is(\":visible\")) {\n              var offset = findPos(data.parent[0]);\n\n              data.fwrapper.css({\n                top: offset.top,\n                left: offset.left\n              });\n\n              //if (data.opts.turn) {\n              offset = findPos(data.opts.turn[0]);\n              data.fparent.css({ top: -offset.top, left: -offset.left });\n              //}\n            }\n\n            this.flip(\"z\", data.opts[\"z-index\"]);\n\n            break;\n        }\n      },\n\n      // Prepares the page by adding a general wrapper and another objects\n\n      _addPageWrapper: function() {\n        var att,\n          data = this.data().f,\n          turnData = data.opts.turn.data(),\n          parent = this.parent();\n\n        data.parent = parent;\n\n        if (!data.wrapper)\n          switch (data.effect) {\n            case \"hard\":\n              var cssProperties = {};\n              cssProperties[vendor + \"transform-style\"] = \"preserve-3d\";\n              cssProperties[vendor + \"backface-visibility\"] = \"hidden\";\n\n              data.wrapper = $(\"<div/>\", divAtt(0, 0, 2))\n                .css(cssProperties)\n                .appendTo(parent)\n                .prepend(this);\n\n              data.fpage = $(\"<div/>\", divAtt(0, 0, 1))\n                .css(cssProperties)\n                .appendTo(parent);\n\n              if (turnData.opts.gradients) {\n                data.ashadow = $(\"<div/>\", divAtt(0, 0, 0))\n                  .hide()\n                  .appendTo(parent);\n\n                data.bshadow = $(\"<div/>\", divAtt(0, 0, 0));\n              }\n\n              break;\n            case \"sheet\":\n              var width = this.width(),\n                height = this.height(),\n                size = Math.round(\n                  Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2))\n                );\n\n              data.fparent = data.opts.turn.data().fparent;\n\n              if (!data.fparent) {\n                var fparent = $(\"<div/>\", {\n                  css: { \"pointer-events\": \"none\" }\n                }).hide();\n                fparent.data().flips = 0;\n                fparent\n                  .css(divAtt(0, 0, \"auto\", \"visible\").css)\n                  .appendTo(data.opts.turn);\n\n                data.opts.turn.data().fparent = fparent;\n                data.fparent = fparent;\n              }\n\n              this.css({\n                position: \"absolute\",\n                top: 0,\n                left: 0,\n                bottom: \"auto\",\n                right: \"auto\"\n              });\n\n              data.wrapper = $(\"<div/>\", divAtt(0, 0, this.css(\"z-index\")))\n                .appendTo(parent)\n                .prepend(this);\n\n              data.fwrapper = $(\n                \"<div/>\",\n                divAtt(parent.offset().top, parent.offset().left)\n              )\n                .hide()\n                .appendTo(data.fparent);\n\n              data.fpage = $(\"<div/>\", divAtt(0, 0, 0, \"visible\"))\n                .css({ cursor: \"default\" })\n                .appendTo(data.fwrapper);\n\n              if (turnData.opts.gradients)\n                data.ashadow = $(\"<div/>\", divAtt(0, 0, 1)).appendTo(\n                  data.fpage\n                );\n\n              flipMethods.setData.call(this, data);\n\n              break;\n          }\n\n        // Set size\n        flipMethods.resize.call(this, true);\n      },\n\n      // Takes a 2P point from the screen and applies the transformation\n\n      _fold: function(point) {\n        var data = this.data().f,\n          turnData = data.opts.turn.data(),\n          o = flipMethods._c.call(this, point.corner),\n          width = this.width(),\n          height = this.height();\n\n        switch (data.effect) {\n          case \"hard\":\n            if (point.corner == \"l\")\n              point.x = Math.min(Math.max(point.x, 0), width * 2);\n            else point.x = Math.max(Math.min(point.x, width), -width);\n\n            var leftPos,\n              shadow,\n              gradientX,\n              fpageOrigin,\n              parentOrigin,\n              totalPages = turnData.totalPages,\n              zIndex = data.opts[\"z-index\"] || totalPages,\n              parentCss = { overflow: \"visible\" },\n              relX = o.x ? (o.x - point.x) / width : point.x / width,\n              angle = relX * 90,\n              half = angle < 90;\n\n            switch (point.corner) {\n              case \"l\":\n                fpageOrigin = \"0% 50%\";\n                parentOrigin = \"100% 50%\";\n\n                if (half) {\n                  leftPos = 0;\n                  shadow = data.opts.next - 1 > 0;\n                  gradientX = 1;\n                } else {\n                  leftPos = \"100%\";\n                  shadow = data.opts.page + 1 < totalPages;\n                  gradientX = 0;\n                }\n\n                break;\n              case \"r\":\n                fpageOrigin = \"100% 50%\";\n                parentOrigin = \"0% 50%\";\n                angle = -angle;\n                width = -width;\n\n                if (half) {\n                  leftPos = 0;\n                  shadow = data.opts.next + 1 < totalPages;\n                  gradientX = 0;\n                } else {\n                  leftPos = \"-100%\";\n                  shadow = data.opts.page != 1;\n                  gradientX = 1;\n                }\n\n                break;\n            }\n\n            parentCss[vendor + \"perspective-origin\"] = parentOrigin;\n\n            data.wrapper.transform(\n              \"rotateY(\" +\n                angle +\n                \"deg)\" +\n                \"translate3d(0px, 0px, \" +\n                (this.attr(\"depth\") || 0) +\n                \"px)\",\n              parentOrigin\n            );\n\n            data.fpage.transform(\n              \"translateX(\" + width + \"px) rotateY(\" + (180 + angle) + \"deg)\",\n              fpageOrigin\n            );\n\n            data.parent.css(parentCss);\n\n            if (half) {\n              relX = -relX + 1;\n              data.wrapper.css({ zIndex: zIndex + 1 });\n              data.fpage.css({ zIndex: zIndex });\n            } else {\n              relX = relX - 1;\n              data.wrapper.css({ zIndex: zIndex });\n              data.fpage.css({ zIndex: zIndex + 1 });\n            }\n\n            if (turnData.opts.gradients) {\n              if (shadow)\n                data.ashadow\n                  .css({\n                    display: \"\",\n                    left: leftPos,\n                    backgroundColor: \"rgba(0,0,0,\" + 0.5 * relX + \")\"\n                  })\n                  .transform(\"rotateY(0deg)\");\n              else data.ashadow.hide();\n\n              data.bshadow.css({ opacity: -relX + 1 });\n\n              if (half) {\n                if (data.bshadow.parent()[0] != data.wrapper[0]) {\n                  data.bshadow.appendTo(data.wrapper);\n                }\n              } else {\n                if (data.bshadow.parent()[0] != data.fpage[0]) {\n                  data.bshadow.appendTo(data.fpage);\n                }\n              }\n              /*data.bshadow.css({\n                backgroundColor: 'rgba(0,0,0,'+(0.1)+')'\n              })*/\n              gradient(\n                data.bshadow,\n                point2D(gradientX * 100, 0),\n                point2D((-gradientX + 1) * 100, 0),\n                [\n                  [0, \"rgba(0,0,0,0.3)\"],\n                  [1, \"rgba(0,0,0,0)\"]\n                ],\n                2\n              );\n            }\n\n            break;\n          case \"sheet\":\n            var that = this,\n              a = 0,\n              alpha = 0,\n              beta,\n              px,\n              gradientEndPointA,\n              gradientEndPointB,\n              gradientStartVal,\n              gradientSize,\n              gradientOpacity,\n              shadowVal,\n              mv = point2D(0, 0),\n              df = point2D(0, 0),\n              tr = point2D(0, 0),\n              folding = flipMethods._foldingPage.call(this),\n              tan = Math.tan(alpha),\n              ac = turnData.opts.acceleration,\n              h = data.wrapper.height(),\n              top = point.corner.substr(0, 1) == \"t\",\n              left = point.corner.substr(1, 1) == \"l\",\n              compute = function() {\n                var rel = point2D(0, 0);\n                var middle = point2D(0, 0);\n\n                rel.x = o.x ? o.x - point.x : point.x;\n\n                if (!hasRot) {\n                  rel.y = 0;\n                } else {\n                  rel.y = o.y ? o.y - point.y : point.y;\n                }\n\n                middle.x = left ? width - rel.x / 2 : point.x + rel.x / 2;\n                middle.y = rel.y / 2;\n\n                var alpha = A90 - Math.atan2(rel.y, rel.x),\n                  gamma = alpha - Math.atan2(middle.y, middle.x),\n                  distance = Math.max(\n                    0,\n                    Math.sin(gamma) *\n                      Math.sqrt(Math.pow(middle.x, 2) + Math.pow(middle.y, 2))\n                  );\n\n                a = deg(alpha);\n\n                tr = point2D(\n                  distance * Math.sin(alpha),\n                  distance * Math.cos(alpha)\n                );\n\n                if (alpha > A90) {\n                  tr.x = tr.x + Math.abs((tr.y * rel.y) / rel.x);\n                  tr.y = 0;\n                  if (Math.round(tr.x * Math.tan(PI - alpha)) < height) {\n                    point.y = Math.sqrt(\n                      Math.pow(height, 2) + 2 * middle.x * rel.x\n                    );\n                    if (top) point.y = height - point.y;\n                    return compute();\n                  }\n                }\n\n                if (alpha > A90) {\n                  var beta = PI - alpha,\n                    dd = h - height / Math.sin(beta);\n                  mv = point2D(\n                    Math.round(dd * Math.cos(beta)),\n                    Math.round(dd * Math.sin(beta))\n                  );\n                  if (left) mv.x = -mv.x;\n                  if (top) mv.y = -mv.y;\n                }\n\n                px = Math.round(tr.y / Math.tan(alpha) + tr.x);\n\n                var side = width - px,\n                  sideX = side * Math.cos(alpha * 2),\n                  sideY = side * Math.sin(alpha * 2);\n                df = point2D(\n                  Math.round(left ? side - sideX : px + sideX),\n                  Math.round(top ? sideY : height - sideY)\n                );\n\n                // Gradients\n                if (turnData.opts.gradients) {\n                  gradientSize = side * Math.sin(alpha);\n\n                  var endingPoint = flipMethods._c2.call(that, point.corner),\n                    far =\n                      Math.sqrt(\n                        Math.pow(endingPoint.x - point.x, 2) +\n                          Math.pow(endingPoint.y - point.y, 2)\n                      ) / width;\n\n                  shadowVal = Math.sin(A90 * (far > 1 ? 2 - far : far));\n\n                  gradientOpacity = Math.min(far, 1);\n\n                  gradientStartVal =\n                    gradientSize > 100\n                      ? (gradientSize - 100) / gradientSize\n                      : 0;\n\n                  gradientEndPointA = point2D(\n                    ((gradientSize * Math.sin(alpha)) / width) * 100,\n                    ((gradientSize * Math.cos(alpha)) / height) * 100\n                  );\n\n                  if (flipMethods._backGradient.call(that)) {\n                    gradientEndPointB = point2D(\n                      ((gradientSize * 1.2 * Math.sin(alpha)) / width) * 100,\n                      ((gradientSize * 1.2 * Math.cos(alpha)) / height) * 100\n                    );\n\n                    if (!left) gradientEndPointB.x = 100 - gradientEndPointB.x;\n                    if (!top) gradientEndPointB.y = 100 - gradientEndPointB.y;\n                  }\n                }\n\n                tr.x = Math.round(tr.x);\n                tr.y = Math.round(tr.y);\n\n                return true;\n              },\n              transform = function(tr, c, x, a) {\n                var f = [\"0\", \"auto\"],\n                  mvW = ((width - h) * x[0]) / 100,\n                  mvH = ((height - h) * x[1]) / 100,\n                  cssA = {\n                    left: f[c[0]],\n                    top: f[c[1]],\n                    right: f[c[2]],\n                    bottom: f[c[3]]\n                  },\n                  cssB = {},\n                  aliasingFk = a != 90 && a != -90 ? (left ? -1 : 1) : 0,\n                  origin = x[0] + \"% \" + x[1] + \"%\";\n\n                that\n                  .css(cssA)\n                  .transform(\n                    rotate(a) + translate(tr.x + aliasingFk, tr.y, ac),\n                    origin\n                  );\n\n                data.fpage\n                  .css(cssA)\n                  .transform(\n                    rotate(a) +\n                      translate(\n                        tr.x + df.x - mv.x - (width * x[0]) / 100,\n                        tr.y + df.y - mv.y - (height * x[1]) / 100,\n                        ac\n                      ) +\n                      rotate((180 / a - 2) * a),\n                    origin\n                  );\n\n                data.wrapper.transform(\n                  translate(-tr.x + mvW - aliasingFk, -tr.y + mvH, ac) +\n                    rotate(-a),\n                  origin\n                );\n\n                data.fwrapper.transform(\n                  translate(-tr.x + mv.x + mvW, -tr.y + mv.y + mvH, ac) +\n                    rotate(-a),\n                  origin\n                );\n\n                if (turnData.opts.gradients) {\n                  if (x[0]) gradientEndPointA.x = 100 - gradientEndPointA.x;\n\n                  if (x[1]) gradientEndPointA.y = 100 - gradientEndPointA.y;\n\n                  cssB[\"box-shadow\"] =\n                    \"0 0 20px rgba(0,0,0,\" + 0.5 * shadowVal + \")\";\n                  folding.css(cssB);\n\n                  gradient(\n                    data.ashadow,\n                    point2D(left ? 100 : 0, top ? 0 : 100),\n                    point2D(gradientEndPointA.x, gradientEndPointA.y),\n                    [\n                      [gradientStartVal, \"rgba(0,0,0,0)\"],\n                      [\n                        (1 - gradientStartVal) * 0.8 + gradientStartVal,\n                        \"rgba(0,0,0,\" + 0.2 * gradientOpacity + \")\"\n                      ],\n                      [1, \"rgba(255,255,255,\" + 0.2 * gradientOpacity + \")\"]\n                    ],\n                    3,\n                    alpha\n                  );\n\n                  if (flipMethods._backGradient.call(that))\n                    gradient(\n                      data.bshadow,\n                      point2D(left ? 0 : 100, top ? 0 : 100),\n                      point2D(gradientEndPointB.x, gradientEndPointB.y),\n                      [\n                        [0.6, \"rgba(0,0,0,0)\"],\n                        [0.8, \"rgba(0,0,0,\" + 0.3 * gradientOpacity + \")\"],\n                        [1, \"rgba(0,0,0,0)\"]\n                      ],\n                      3\n                    );\n                }\n              };\n\n            switch (point.corner) {\n              case \"l\":\n                break;\n              case \"r\":\n                break;\n              case \"tl\":\n                point.x = Math.max(point.x, 1);\n                compute();\n                transform(tr, [1, 0, 0, 1], [100, 0], a);\n                break;\n              case \"tr\":\n                point.x = Math.min(point.x, width - 1);\n                compute();\n                transform(point2D(-tr.x, tr.y), [0, 0, 0, 1], [0, 0], -a);\n                break;\n              case \"bl\":\n                point.x = Math.max(point.x, 1);\n                compute();\n                transform(point2D(tr.x, -tr.y), [1, 1, 0, 0], [100, 100], -a);\n                break;\n              case \"br\":\n                point.x = Math.min(point.x, width - 1);\n                compute();\n                transform(point2D(-tr.x, -tr.y), [0, 1, 1, 0], [0, 100], a);\n                break;\n            }\n\n            break;\n        }\n\n        data.point = point;\n      },\n\n      _moveFoldingPage: function(move) {\n        var data = this.data().f;\n\n        if (!data) return;\n\n        var turn = data.opts.turn,\n          turnData = turn.data(),\n          place = turnData.pagePlace;\n\n        if (move) {\n          var nextPage = data.opts.next;\n\n          if (place[nextPage] != data.opts.page) {\n            if (data.folding) flipMethods._moveFoldingPage.call(this, false);\n\n            var folding = flipMethods._foldingPage.call(this);\n\n            folding.appendTo(data.fpage);\n            place[nextPage] = data.opts.page;\n            data.folding = nextPage;\n          }\n\n          turn.turn(\"update\");\n        } else {\n          if (data.folding) {\n            if (turnData.pages[data.folding]) {\n              // If we have flip available\n\n              var flipData = turnData.pages[data.folding].data().f;\n\n              turnData.pageObjs[data.folding].appendTo(flipData.wrapper);\n            } else if (turnData.pageWrap[data.folding]) {\n              // If we have the pageWrapper\n\n              turnData.pageObjs[data.folding].appendTo(\n                turnData.pageWrap[data.folding]\n              );\n            }\n\n            if (data.folding in place) {\n              place[data.folding] = data.folding;\n            }\n\n            delete data.folding;\n          }\n        }\n      },\n\n      _showFoldedPage: function(c, animate) {\n        var folding = flipMethods._foldingPage.call(this),\n          dd = this.data(),\n          data = dd.f,\n          visible = data.visible;\n\n        if (folding) {\n          if (!visible || !data.point || data.point.corner != c.corner) {\n            var corner =\n              data.status == \"hover\" ||\n              data.status == \"peel\" ||\n              data.opts.turn.data().mouseAction\n                ? c.corner\n                : null;\n\n            visible = false;\n\n            if (trigger(\"start\", this, [data.opts, corner]) == \"prevented\")\n              return false;\n          }\n\n          if (animate) {\n            var that = this,\n              point =\n                data.point && data.point.corner == c.corner\n                  ? data.point\n                  : flipMethods._c.call(this, c.corner, 1);\n\n            this.animatef({\n              from: [point.x, point.y],\n              to: [c.x, c.y],\n              duration: 500,\n              frame: function(v) {\n                c.x = Math.round(v[0]);\n                c.y = Math.round(v[1]);\n                flipMethods._fold.call(that, c);\n              }\n            });\n          } else {\n            flipMethods._fold.call(this, c);\n\n            if (dd.effect && !dd.effect.turning) this.animatef(false);\n          }\n\n          if (!visible) {\n            switch (data.effect) {\n              case \"hard\":\n                data.visible = true;\n                flipMethods._moveFoldingPage.call(this, true);\n                data.fpage.show();\n                if (data.opts.shadows) data.bshadow.show();\n\n                break;\n              case \"sheet\":\n                data.visible = true;\n                data.fparent.show().data().flips++;\n                flipMethods._moveFoldingPage.call(this, true);\n                data.fwrapper.show();\n                if (data.bshadow) data.bshadow.show();\n\n                break;\n            }\n          }\n\n          return true;\n        }\n\n        return false;\n      },\n\n      hide: function() {\n        var data = this.data().f,\n          turnData = data.opts.turn.data(),\n          folding = flipMethods._foldingPage.call(this);\n\n        switch (data.effect) {\n          case \"hard\":\n            if (turnData.opts.gradients) {\n              data.bshadowLoc = 0;\n              data.bshadow.remove();\n              data.ashadow.hide();\n            }\n\n            data.wrapper.transform(\"\");\n            data.fpage.hide();\n\n            break;\n          case \"sheet\":\n            if (--data.fparent.data().flips === 0) data.fparent.hide();\n\n            this.css({\n              left: 0,\n              top: 0,\n              right: \"auto\",\n              bottom: \"auto\"\n            }).transform(\"\");\n\n            data.wrapper.transform(\"\");\n\n            data.fwrapper.hide();\n\n            if (data.bshadow) data.bshadow.hide();\n\n            folding.transform(\"\");\n\n            break;\n        }\n\n        data.visible = false;\n\n        return this;\n      },\n\n      hideFoldedPage: function(animate) {\n        var data = this.data().f;\n\n        if (!data.point) return;\n\n        var that = this,\n          p1 = data.point,\n          hide = function() {\n            data.point = null;\n            data.status = \"\";\n            that.flip(\"hide\");\n            that.trigger(\"end\", [data.opts, false]);\n          };\n\n        if (animate) {\n          var p4 = flipMethods._c.call(this, p1.corner),\n            top = p1.corner.substr(0, 1) == \"t\",\n            delta = top\n              ? Math.min(0, p1.y - p4.y) / 2\n              : Math.max(0, p1.y - p4.y) / 2,\n            p2 = point2D(p1.x, p1.y + delta),\n            p3 = point2D(p4.x, p4.y - delta);\n\n          this.animatef({\n            from: 0,\n            to: 1,\n            frame: function(v) {\n              var np = bezier(p1, p2, p3, p4, v);\n              p1.x = np.x;\n              p1.y = np.y;\n              flipMethods._fold.call(that, p1);\n            },\n            complete: hide,\n            duration: 800,\n            hiding: true\n          });\n        } else {\n          this.animatef(false);\n          hide();\n        }\n      },\n\n      turnPage: function(corner) {\n        var that = this,\n          data = this.data().f,\n          turnData = data.opts.turn.data();\n\n        corner = {\n          corner: data.corner\n            ? data.corner.corner\n            : corner || flipMethods._cAllowed.call(this)[0]\n        };\n\n        var p1 =\n            data.point ||\n            flipMethods._c.call(\n              this,\n              corner.corner,\n              data.opts.turn ? turnData.opts.elevation : 0\n            ),\n          p4 = flipMethods._c2.call(this, corner.corner);\n\n        this.trigger(\"flip\").animatef({\n          from: 0,\n          to: 1,\n          frame: function(v) {\n            var np = bezier(p1, p1, p4, p4, v);\n            corner.x = np.x;\n            corner.y = np.y;\n            flipMethods._showFoldedPage.call(that, corner);\n          },\n          complete: function() {\n            that.trigger(\"end\", [data.opts, true]);\n          },\n          duration: turnData.opts.duration,\n          turning: true\n        });\n\n        data.corner = null;\n      },\n\n      moving: function() {\n        return \"effect\" in this.data();\n      },\n\n      isTurning: function() {\n        return this.flip(\"moving\") && this.data().effect.turning;\n      },\n\n      corner: function() {\n        return this.data().f.corner;\n      },\n\n      _eventStart: function(e) {\n        var data = this.data().f,\n          turn = data.opts.turn;\n\n        if (\n          !data.corner &&\n          !data.disabled &&\n          !this.flip(\"isTurning\") &&\n          data.opts.page == turn.data().pagePlace[data.opts.page]\n        ) {\n          data.corner = flipMethods._isIArea.call(this, e);\n\n          if (data.corner && flipMethods._foldingPage.call(this)) {\n            this.trigger(\"pressed\", [data.point]);\n            flipMethods._showFoldedPage.call(this, data.corner);\n\n            return false;\n          } else data.corner = null;\n        }\n      },\n\n      _eventMove: function(e) {\n        var data = this.data().f;\n\n        if (!data.disabled) {\n          e = isTouch ? e.originalEvent.touches : [e];\n\n          if (data.corner) {\n            var pos = data.parent.offset();\n            data.corner.x = e[0].pageX - pos.left;\n            data.corner.y = e[0].pageY - pos.top;\n            flipMethods._showFoldedPage.call(this, data.corner);\n          } else if (data.hover && !this.data().effect && this.is(\":visible\")) {\n            var point = flipMethods._isIArea.call(this, e[0]);\n\n            if (point) {\n              if (\n                (data.effect == \"sheet\" && point.corner.length == 2) ||\n                data.effect == \"hard\"\n              ) {\n                data.status = \"hover\";\n                var origin = flipMethods._c.call(\n                  this,\n                  point.corner,\n                  data.opts.cornerSize / 2\n                );\n                point.x = origin.x;\n                point.y = origin.y;\n                flipMethods._showFoldedPage.call(this, point, true);\n              }\n            } else {\n              if (data.status == \"hover\") {\n                data.status = \"\";\n                flipMethods.hideFoldedPage.call(this, true);\n              }\n            }\n          }\n        }\n      },\n\n      _eventEnd: function() {\n        var data = this.data().f,\n          corner = data.corner;\n\n        if (!data.disabled && corner) {\n          if (\n            trigger(\"released\", this, [data.point || corner]) != \"prevented\"\n          ) {\n            flipMethods.hideFoldedPage.call(this, true);\n          }\n        }\n\n        data.corner = null;\n      },\n\n      disable: function(disable) {\n        flipMethods.setData.call(this, { disabled: disable });\n        return this;\n      },\n\n      hover: function(hover) {\n        flipMethods.setData.call(this, { hover: hover });\n        return this;\n      },\n\n      peel: function(corner, animate) {\n        var data = this.data().f;\n\n        if (corner) {\n          if ($.inArray(corner, corners.all) == -1)\n            throw turnError(\"Corner \" + corner + \" is not permitted\");\n\n          if ($.inArray(corner, flipMethods._cAllowed.call(this)) != -1) {\n            var point = flipMethods._c.call(\n              this,\n              corner,\n              data.opts.cornerSize / 2\n            );\n\n            data.status = \"peel\";\n\n            flipMethods._showFoldedPage.call(\n              this,\n              {\n                corner: corner,\n                x: point.x,\n                y: point.y\n              },\n              animate\n            );\n          }\n        } else {\n          data.status = \"\";\n\n          flipMethods.hideFoldedPage.call(this, animate);\n        }\n\n        return this;\n      }\n    };\n\n  // Processes classes\n\n  function dec(that, methods, args) {\n    if (!args[0] || typeof args[0] == \"object\")\n      return methods.init.apply(that, args);\n    else if (methods[args[0]])\n      return methods[args[0]].apply(that, Array.prototype.slice.call(args, 1));\n    else throw turnError(args[0] + \" is not a method or property\");\n  }\n\n  // Attributes for a layer\n\n  function divAtt(top, left, zIndex, overf) {\n    return {\n      css: {\n        position: \"absolute\",\n        top: top,\n        left: left,\n        overflow: overf || \"hidden\",\n        zIndex: zIndex || \"auto\"\n      }\n    };\n  }\n\n  // Gets a 2D point from a bezier curve of four points\n\n  function bezier(p1, p2, p3, p4, t) {\n    var a = 1 - t,\n      b = a * a * a,\n      c = t * t * t;\n\n    return point2D(\n      Math.round(\n        b * p1.x + 3 * t * a * a * p2.x + 3 * t * t * a * p3.x + c * p4.x\n      ),\n      Math.round(\n        b * p1.y + 3 * t * a * a * p2.y + 3 * t * t * a * p3.y + c * p4.y\n      )\n    );\n  }\n\n  // Converts an angle from degrees to radians\n\n  function rad(degrees) {\n    return (degrees / 180) * PI;\n  }\n\n  // Converts an angle from radians to degrees\n\n  function deg(radians) {\n    return (radians / PI) * 180;\n  }\n\n  // Gets a 2D point\n\n  function point2D(x, y) {\n    return { x: x, y: y };\n  }\n\n  // Webkit 534.3 on Android wrongly repaints elements that use overflow:hidden + rotation\n\n  function rotationAvailable() {\n    var parts;\n\n    if ((parts = /AppleWebkit\\/([0-9\\.]+)/i.exec(navigator.userAgent))) {\n      var webkitVersion = parseFloat(parts[1]);\n      return webkitVersion > 534.3;\n    } else {\n      return true;\n    }\n  }\n\n  // Returns the traslate value\n\n  function translate(x, y, use3d) {\n    return has3d && use3d\n      ? \" translate3d(\" + x + \"px,\" + y + \"px, 0px) \"\n      : \" translate(\" + x + \"px, \" + y + \"px) \";\n  }\n\n  // Returns the rotation value\n\n  function rotate(degrees) {\n    return \" rotate(\" + degrees + \"deg) \";\n  }\n\n  // Checks if a property belongs to an object\n\n  function has(property, object) {\n    return Object.prototype.hasOwnProperty.call(object, property);\n  }\n\n  // Gets the CSS3 vendor prefix\n\n  function getPrefix() {\n    var vendorPrefixes = [\"Moz\", \"Webkit\", \"Khtml\", \"O\", \"ms\"],\n      len = vendorPrefixes.length,\n      vendor = \"\";\n\n    while (len--)\n      if (vendorPrefixes[len] + \"Transform\" in document.body.style)\n        vendor = \"-\" + vendorPrefixes[len].toLowerCase() + \"-\";\n\n    return vendor;\n  }\n\n  // Detects the transitionEnd Event\n\n  function getTransitionEnd() {\n    var t,\n      el = document.createElement(\"fakeelement\"),\n      transitions = {\n        transition: \"transitionend\",\n        OTransition: \"oTransitionEnd\",\n        MSTransition: \"transitionend\",\n        MozTransition: \"transitionend\",\n        WebkitTransition: \"webkitTransitionEnd\"\n      };\n\n    for (t in transitions) {\n      if (el.style[t] !== undefined) {\n        return transitions[t];\n      }\n    }\n  }\n\n  // Gradients\n\n  function gradient(obj, p0, p1, colors, numColors) {\n    var j,\n      cols = [];\n\n    if (vendor == \"-webkit-\") {\n      for (j = 0; j < numColors; j++)\n        cols.push(\"color-stop(\" + colors[j][0] + \", \" + colors[j][1] + \")\");\n\n      obj.css({\n        \"background-image\":\n          \"-webkit-gradient(linear, \" +\n          p0.x +\n          \"% \" +\n          p0.y +\n          \"%,\" +\n          p1.x +\n          \"% \" +\n          p1.y +\n          \"%, \" +\n          cols.join(\",\") +\n          \" )\"\n      });\n    } else {\n      p0 = { x: (p0.x / 100) * obj.width(), y: (p0.y / 100) * obj.height() };\n      p1 = { x: (p1.x / 100) * obj.width(), y: (p1.y / 100) * obj.height() };\n\n      var dx = p1.x - p0.x,\n        dy = p1.y - p0.y,\n        angle = Math.atan2(dy, dx),\n        angle2 = angle - Math.PI / 2,\n        diagonal =\n          Math.abs(obj.width() * Math.sin(angle2)) +\n          Math.abs(obj.height() * Math.cos(angle2)),\n        gradientDiagonal = Math.sqrt(dy * dy + dx * dx),\n        corner = point2D(\n          p1.x < p0.x ? obj.width() : 0,\n          p1.y < p0.y ? obj.height() : 0\n        ),\n        slope = Math.tan(angle),\n        inverse = -1 / slope,\n        x =\n          (inverse * corner.x - corner.y - slope * p0.x + p0.y) /\n          (inverse - slope),\n        c = { x: x, y: inverse * x - inverse * corner.x + corner.y },\n        segA = Math.sqrt(Math.pow(c.x - p0.x, 2) + Math.pow(c.y - p0.y, 2));\n\n      for (j = 0; j < numColors; j++)\n        cols.push(\n          \" \" +\n            colors[j][1] +\n            \" \" +\n            ((segA + gradientDiagonal * colors[j][0]) * 100) / diagonal +\n            \"%\"\n        );\n\n      obj.css({\n        \"background-image\":\n          vendor + \"linear-gradient(\" + -angle + \"rad,\" + cols.join(\",\") + \")\"\n      });\n    }\n  }\n\n  // Triggers an event\n\n  function trigger(eventName, context, args) {\n    var event = $.Event(eventName);\n    context.trigger(event, args);\n    if (event.isDefaultPrevented()) return \"prevented\";\n    else if (event.isPropagationStopped()) return \"stopped\";\n    else return \"\";\n  }\n\n  // JS Errors\n\n  function turnError(message) {\n    function TurnJsError(message) {\n      this.name = \"TurnJsError\";\n      this.message = message;\n    }\n\n    TurnJsError.prototype = new Error();\n    TurnJsError.prototype.constructor = TurnJsError;\n    return new TurnJsError(message);\n  }\n\n  // Find the offset of an element ignoring its transformation\n\n  function findPos(obj) {\n    var offset = { top: 0, left: 0 };\n\n    do {\n      offset.left += obj.offsetLeft;\n      offset.top += obj.offsetTop;\n    } while ((obj = obj.offsetParent));\n\n    return offset;\n  }\n\n  // Checks if there's hard page compatibility\n  // IE9 is the only browser that does not support hard pages\n\n  function hasHardPage() {\n    return navigator.userAgent.indexOf(\"MSIE 9.0\") == -1;\n  }\n\n  // Request an animation\n\n  window.requestAnim = (function() {\n    return (\n      window.requestAnimationFrame ||\n      window.webkitRequestAnimationFrame ||\n      window.mozRequestAnimationFrame ||\n      window.oRequestAnimationFrame ||\n      window.msRequestAnimationFrame ||\n      function(callback) {\n        window.setTimeout(callback, 1000 / 60);\n      }\n    );\n  })();\n\n  // Extend $.fn\n\n  $.extend($.fn, {\n    flip: function() {\n      return dec($(this[0]), flipMethods, arguments);\n    },\n\n    turn: function() {\n      return dec($(this[0]), turnMethods, arguments);\n    },\n\n    transform: function(transform, origin) {\n      var properties = {};\n\n      if (origin) properties[vendor + \"transform-origin\"] = origin;\n\n      properties[vendor + \"transform\"] = transform;\n\n      return this.css(properties);\n    },\n\n    animatef: function(point) {\n      var data = this.data();\n\n      if (data.effect) data.effect.stop();\n\n      if (point) {\n        if (!point.to.length) point.to = [point.to];\n        if (!point.from.length) point.from = [point.from];\n\n        var diff = [],\n          len = point.to.length,\n          animating = true,\n          that = this,\n          time = new Date().getTime(),\n          frame = function() {\n            if (!data.effect || !animating) return;\n\n            var v = [],\n              timeDiff = Math.min(point.duration, new Date().getTime() - time);\n\n            for (var i = 0; i < len; i++)\n              v.push(\n                data.effect.easing(\n                  1,\n                  timeDiff,\n                  point.from[i],\n                  diff[i],\n                  point.duration\n                )\n              );\n\n            point.frame(len == 1 ? v[0] : v);\n\n            if (timeDiff == point.duration) {\n              delete data[\"effect\"];\n              that.data(data);\n              if (point.complete) point.complete();\n            } else {\n              window.requestAnim(frame);\n            }\n          };\n\n        for (var i = 0; i < len; i++) diff.push(point.to[i] - point.from[i]);\n\n        data.effect = $.extend(\n          {\n            stop: function() {\n              animating = false;\n            },\n            easing: function(x, t, b, c, data) {\n              return c * Math.sqrt(1 - (t = t / data - 1) * t) + b;\n            }\n          },\n          point\n        );\n\n        this.data(data);\n\n        frame();\n      } else {\n        delete data[\"effect\"];\n      }\n    }\n  });\n\n  // Export some globals\n\n  $.isTouch = isTouch;\n  $.mouseEvents = mouseEvents;\n  $.cssPrefix = getPrefix;\n  $.cssTransitionEnd = getTransitionEnd;\n  $.findPos = findPos;\n})(jQuery);\n","<script>\nimport $ from \"jquery\";\nimport \"../../lib/turn.js\";\nimport { nanoid } from \"nanoid\";\n\nexport default {\n  name: \"Turn\", // vue component name\n  data() {\n    return {\n      nanoid: nanoid(),\n      componentKey: 0\n    };\n  },\n  props: {\n    options: {\n      type: Object,\n      default: () => {}\n    }\n  },\n  watch: {\n    defaultOptions: {\n      handler(val) {\n        this.forceRerender(val);\n      },\n      deep: true\n    }\n  },\n  computed: {\n    uid() {\n      return `jopa-${this.nanoid}`;\n    },\n    selector() {\n      return `div[data-uid=${this.uid}]`;\n    },\n    defaultOptions() {\n      return {\n        when: {\n          turning: (event, page, pageObj) => {\n            this.currentPage = page;\n          },\n          // triggered before turned\n          first: () => {\n            this.first();\n          },\n          // triggered before turned\n          last: () => {\n            this.last();\n          }\n        },\n        ...this.options\n      };\n    }\n  },\n  mounted() {\n    $(this.selector).turn(this.defaultOptions);\n  },\n  methods: {\n    goTo(page) {\n      $(this.selector).turn(\"page\", page);\n    },\n    first() {},\n    last() {},\n    forceRerender(val) {\n      this.nanoid = nanoid();\n      this.componentKey += 1;\n      this.$nextTick(() => $(this.selector).turn(val));\n    }\n  }\n};\n</script>\n\n<template>\n  <div :key=\"componentKey\" :data-uid=\"this.uid\">\n    <slot> </slot>\n  </div>\n</template>\n","import FwTurn from \"./turn.vue\";\r\nimport { pluginFactory } from \"../../utils/plugin\";\r\n\r\nconst TurnPlugin = pluginFactory({ components: { FwTurn } });\r\n\r\nexport { TurnPlugin, FwTurn };\r\n","<template>\n  <svg viewBox=\"0 0 1024 1024\" width=\"30\" height=\"30\">\n    <path\n      d=\"M858.88 753.408C858.88 756.5824 861.7984 759.4496 864.9216 759.4496 868.096 759.4496 870.9632 756.5824 870.9632 753.408 870.9632 750.2336 868.096 747.3664 864.9216 747.3664 861.7984 747.3664 858.88 750.2336 858.88 753.408L858.88 753.408ZM725.4528 891.0848C725.4528 894.208 726.784 897.3312 728.9856 899.584 731.2384 901.7856 734.3616 903.0656 737.4848 903.0656 740.6592 903.0656 743.7824 901.7856 745.984 899.584 748.2368 897.3312 749.5168 894.208 749.5168 891.0848 749.5168 887.9104 748.2368 884.7872 745.984 882.5856 743.7824 880.3328 740.6592 879.0528 737.4848 879.0528 734.3616 879.0528 731.2384 880.3328 728.9856 882.5856 726.784 884.7872 725.4528 887.9104 725.4528 891.0848L725.4528 891.0848ZM545.6384 961.9456C545.6384 966.656 547.584 971.3664 550.912 974.6944 554.2912 978.0224 558.9504 979.968 563.712 979.968 568.4224 979.968 573.1328 978.0224 576.4608 974.6944 579.84 971.3664 581.7856 966.656 581.7856 961.9456 581.7856 957.184 579.84 952.4736 576.4608 949.1456 573.1328 945.8176 568.4224 943.872 563.712 943.872 558.9504 943.872 554.2912 945.8176 550.912 949.1456 547.584 952.4736 545.6384 957.184 545.6384 961.9456L545.6384 961.9456ZM352.0512 952.4224C352.0512 958.72 354.6624 964.9664 359.0656 969.4208 363.52 973.8752 369.8176 976.4864 376.064 976.4864 382.3616 976.4864 388.6592 973.8752 393.0624 969.4208 397.5168 964.9664 400.128 958.72 400.128 952.4224 400.128 946.1248 397.5168 939.8784 393.0624 935.424 388.6592 930.9696 382.3616 928.4096 376.064 928.4096 369.8176 928.4096 363.52 930.9696 359.0656 935.424 354.6624 939.8784 352.0512 946.1248 352.0512 952.4224L352.0512 952.4224ZM180.3264 864.3072C180.3264 872.192 183.552 880.0256 189.1328 885.5552 194.7136 891.136 202.496 894.3616 210.3808 894.3616 218.2656 894.3616 226.0992 891.136 231.68 885.5552 237.2096 880.0256 240.4864 872.192 240.4864 864.3072 240.4864 856.4224 237.2096 848.5888 231.68 843.008 226.0992 837.4784 218.2656 834.2016 210.3808 834.2016 202.496 834.2016 194.7136 837.4784 189.1328 843.008 183.552 848.5888 180.3264 856.4224 180.3264 864.3072L180.3264 864.3072ZM61.3888 714.496C61.3888 723.9168 65.28 733.3376 71.936 740.0448 78.6432 746.7008 88.064 750.592 97.4848 750.592 106.9568 750.592 116.3776 746.7008 123.0336 740.0448 129.7408 733.3376 133.632 723.9168 133.632 714.496 133.632 705.024 129.7408 695.6032 123.0336 688.9472 116.3776 682.24 106.9568 678.3488 97.4848 678.3488 88.064 678.3488 78.6432 682.24 71.936 688.9472 65.28 695.6032 61.3888 705.024 61.3888 714.496L61.3888 714.496ZM16.7424 530.5344C16.7424 541.5424 21.2992 552.4992 29.0816 560.2816 36.864 568.064 47.8208 572.6208 58.8288 572.6208 69.888 572.6208 80.8448 568.064 88.6272 560.2816 96.4096 552.4992 100.9664 541.5424 100.9664 530.5344 100.9664 519.4752 96.4096 508.5184 88.6272 500.736 80.8448 492.9536 69.888 488.3968 58.8288 488.3968 47.8208 488.3968 36.864 492.9536 29.0816 500.736 21.2992 508.5184 16.7424 519.4752 16.7424 530.5344L16.7424 530.5344ZM53.4528 347.7504C53.4528 360.3456 58.6752 372.8896 67.584 381.7984 76.4928 390.7072 88.9856 395.8784 101.632 395.8784 114.2272 395.8784 126.72 390.7072 135.68 381.7984 144.5888 372.8896 149.76 360.3456 149.76 347.7504 149.76 335.1552 144.5888 322.6112 135.68 313.7024 126.72 304.7936 114.2272 299.6224 101.632 299.6224 88.9856 299.6224 76.4928 304.7936 67.584 313.7024 58.6752 322.6112 53.4528 335.1552 53.4528 347.7504L53.4528 347.7504ZM163.6352 200.3968C163.6352 214.5792 169.472 228.6592 179.5072 238.6944 189.5424 248.7296 203.6224 254.5664 217.856 254.5664 232.0384 254.5664 246.1184 248.7296 256.1536 238.6944 266.1888 228.6592 272.0256 214.5792 272.0256 200.3968 272.0256 186.2144 266.1888 172.0832 256.1536 162.048 246.1184 152.064 232.0384 146.176 217.856 146.176 203.6224 146.176 189.5424 152.064 179.5072 162.048 169.472 172.0832 163.6352 186.2144 163.6352 200.3968L163.6352 200.3968ZM325.4272 115.968C325.4272 131.7376 331.8784 147.4048 343.04 158.5152 354.2016 169.6768 369.8176 176.128 385.5872 176.128 401.3568 176.128 416.9728 169.6768 428.1344 158.5152 439.296 147.4048 445.7472 131.7376 445.7472 115.968 445.7472 100.2496 439.296 84.5824 428.1344 73.4208 416.9728 62.3104 401.3568 55.808 385.5872 55.808 369.8176 55.808 354.2016 62.3104 343.04 73.4208 331.8784 84.5824 325.4272 100.2496 325.4272 115.968L325.4272 115.968ZM507.136 110.7456C507.136 128.0512 514.2528 145.3056 526.4896 157.5424 538.7776 169.8304 555.9808 176.9472 573.3376 176.9472 590.6432 176.9472 607.8976 169.8304 620.1344 157.5424 632.4224 145.3056 639.5392 128.0512 639.5392 110.7456 639.5392 93.3888 632.4224 76.1856 620.1344 63.8976 607.8976 51.6608 590.6432 44.544 573.3376 44.544 555.9808 44.544 538.7776 51.6608 526.4896 63.8976 514.2528 76.1856 507.136 93.3888 507.136 110.7456L507.136 110.7456ZM673.4848 185.6C673.4848 204.4928 681.2672 223.2832 694.6304 236.6464 707.9936 250.0096 726.784 257.792 745.6768 257.792 764.5696 257.792 783.36 250.0096 796.7232 236.6464 810.0864 223.2832 817.8688 204.4928 817.8688 185.6 817.8688 166.7072 810.0864 147.9168 796.7232 134.5536 783.36 121.1904 764.5696 113.408 745.6768 113.408 726.784 113.408 707.9936 121.1904 694.6304 134.5536 681.2672 147.9168 673.4848 166.7072 673.4848 185.6L673.4848 185.6ZM791.7056 326.1952C791.7056 346.6752 800.1024 367.0016 814.592 381.4912 829.0816 395.9808 849.4592 404.4288 869.9392 404.4288 890.4192 404.4288 910.7456 395.9808 925.2352 381.4912 939.7248 367.0016 948.1728 346.6752 948.1728 326.1952 948.1728 305.664 939.7248 285.3376 925.2352 270.848 910.7456 256.3584 890.4192 247.9616 869.9392 247.9616 849.4592 247.9616 829.0816 256.3584 814.592 270.848 800.1024 285.3376 791.7056 305.664 791.7056 326.1952L791.7056 326.1952ZM838.7072 508.2624C838.7072 530.3296 847.7696 552.2432 863.3856 567.8592 879.0016 583.4752 900.9152 592.5376 922.9824 592.5376 945.0496 592.5376 966.9632 583.4752 982.5792 567.8592 998.1952 552.2432 1007.2576 530.3296 1007.2576 508.2624 1007.2576 486.1952 998.1952 464.2816 982.5792 448.6656 966.9632 433.1008 945.0496 423.9872 922.9824 423.9872 900.9152 423.9872 879.0016 433.1008 863.3856 448.6656 847.7696 464.2816 838.7072 486.1952 838.7072 508.2624L838.7072 508.2624Z\"\n      fill=\"#1296db\"\n    ></path>\n  </svg>\n</template>\n\n<script>\nexport default {\n  name: \"loading-svg\"\n};\n</script>\n","<template>\n  <div class=\"fw-book\" :style=\"styleForPageMain\">\n    <div\n      v-for=\"(page, index) in pages\"\n      :key=\"index\"\n      class=\"fw-bookitem\"\n      ref=\"bookItem\"\n      @click=\"turn(index)\"\n      :class=\"[\n        { rotate180: page.rotate180 },\n        page.left ? 'left' : 'right',\n        page.animateClass\n      ]\"\n      :style=\"{\n        zIndex: set_zIndex(index),\n        animationDuration: page.animationDuration + 's'\n      }\"\n    >\n      <slot name=\"page\" v-bind=\"{ page, index }\"></slot>\n      <i\n        v-if=\"showPageIndex && startPageIndex <= index && endPageIndex >= index\"\n        class=\"index\"\n        :class=\"index % 2 === 0 ? 'index-left' : 'index-right'\"\n        :style=\"styleForPageIndex\"\n        >{{ index + 1 - startPageIndex }}</i\n      >\n    </div>\n    <template v-if=\"pages.length === 0\">\n      <div class=\"fw-bookitem left\">\n        <loading-svg class=\"loading\"></loading-svg>\n      </div>\n      <div class=\"fw-bookitem right\">\n        <loading-svg class=\"loading\"></loading-svg>\n      </div>\n    </template>\n  </div>\n</template>\n<script>\nimport loadingSvg from \"./loading.vue\";\nconst TURNTOLEFT = \"left\";\nconst TURNTORIGHT = \"right\";\nconst HIDDEN = \"hidden\";\nconst VISIBLE = \"visible\";\nexport default {\n  name: \"fw-book\",\n  components: {\n    loadingSvg\n  },\n  props: {\n    styleForPageMain: {\n      type: Object,\n      default() {\n        return {};\n      }\n    },\n    styleForPageIndex: {\n      type: Object,\n      default() {\n        return {};\n      }\n    },\n    // Page data\n    data: {\n      type: Array,\n      required: true\n    },\n    // Whether to allow manual page turning\n    turnPageByHand: {\n      type: Boolean,\n      default: true\n    },\n    // Initial page\n    initPage: {\n      type: Number,\n      default: 1\n    },\n    // Whether to turn pages automatically\n    autoNextPage: {\n      type: Boolean,\n      default: false\n    },\n    // Residence time per page\n    autoNextPageDelayTime: {\n      type: Number,\n      default: 3000\n    },\n    loop: {\n      type: Boolean,\n      default: false\n    },\n    // Page turning animation time\n    duration: {\n      type: Number,\n      default: 1000\n    },\n    // Show page number\n    showPageIndex: {\n      type: Boolean,\n      default: true\n    },\n    // Page number start index\n    startPageIndex: {\n      type: Number,\n      default: 0\n    },\n    // End of page index\n    endPageIndex: {\n      type: Number,\n      default: 9999\n    }\n  },\n  data() {\n    return {\n      pages: [],\n      curPage: this.initPage, // Current page number, each page is two and a half pages, counting from 1\n      direction: TURNTOLEFT, // Page turning direction, not button direction\n      curHalfPage: 0, // Each half page, each page is equal to two half pages, starting from 0\n      animating: false, // Animation is in progress to prevent clicks to turn pages\n      staying: false // Status of stay on each page\n    };\n  },\n  computed: {\n    // total pages\n    pageCount() {\n      return Math.ceil(this.pages.length / 2);\n    }\n  },\n  methods: {\n    assign(obj, target) {\n      for (let k in target) {\n        if (Object.prototype.hasOwnProperty.call(target, k)) {\n          obj[k] = target[k];\n        }\n      }\n      return obj;\n    },\n    $$emit(type) {\n      let leftPage = this.curPage * 2 - 1 - 1;\n      let rightPage = this.data[leftPage + 1] ? leftPage + 1 : undefined;\n      this.$emit(\n        type,\n        this.curPage,\n        [leftPage, rightPage],\n        [this.data[leftPage], this.data[rightPage]]\n      );\n    },\n    // Process all pages\n    getPages() {\n      // Initialization data\n      const pages = [];\n      this.data.forEach((item, index) => {\n        let page = this.assign(\n          {\n            animateClass: \"\",\n            rotate180: false,\n            animationDuration: \"0s\",\n            left: false,\n            _left: false\n          },\n          item\n        );\n        // The page before the current page is on the left\n        if (index <= this.curPage * 2 - 1 - 1) {\n          page.left = true;\n          page._left = true;\n        }\n        pages.push(page);\n      });\n      this.pages = pages;\n      if (this.autoNextPage) {\n        this.stay(this.curHalfPage);\n      }\n    },\n    // Get current page number through index\n    getPageNumByIndex(index) {\n      return Math.ceil((index + 1) / 2);\n    },\n    // When turning the page to the right, add the flip class name [excluding the first page] to the even-numbered pages, and add the turning class name [not to the last page] to the odd page when turning the pages to the left.\n    rotate180() {\n      this.pages.forEach((page, index) => {\n        if (this.direction === TURNTOLEFT) {\n          page.rotate180 = index > 1 && index % 2 === 0;\n        } else if (this.direction === TURNTORIGHT) {\n          page.rotate180 = index < this.pages.length - 1 && index % 2 === 1;\n        }\n      });\n    },\n    // Add animation class name, animation will be performed immediately after adding\n    animateClass() {\n      // The end event will be executed twice on both sides of the book page, here the limit is only allowed to trigger once\n      let emitTurnEnd = true;\n      this.pages.forEach((page, index) => {\n        page.animationDuration = this.duration / 1000;\n        if (this.direction === TURNTOLEFT) {\n          // The first page does not add\n          if (this.curPage === 1) return;\n          // Keep the position after the animation after the animation is completed\n          let time = setTimeout(() => {\n            page._left = true;\n            this.animating = false;\n            if (emitTurnEnd) {\n              emitTurnEnd = false;\n              this.$$emit(\"turnEnd\");\n            }\n          }, this.duration + 50);\n          // The previous page in the animation turns over and hides\n          if (this.curPage * 2 - 3 === index) {\n            page.animateClass = `${TURNTOLEFT}-${HIDDEN}`;\n          } else if (this.curPage * 2 - 2 === index) {\n            // Turn the next page in the animation to display\n            page.animateClass = `${TURNTOLEFT}-${VISIBLE}`;\n          } else {\n            // No execution of animation, clear timer\n            clearTimeout(time);\n            // Do not add class name\n            page.animateClass = \"\";\n          }\n        } else if (this.direction === TURNTORIGHT) {\n          // The last page is not added\n          if (this.curPage === this.pageCount) return;\n          // Keep the position after the animation after the animation is completed\n          let time = setTimeout(() => {\n            page._left = false;\n            this.animating = false;\n            if (emitTurnEnd) {\n              emitTurnEnd = false;\n              this.$$emit(\"turnEnd\");\n            }\n          }, this.duration + 50);\n          // The previous page in the animation turns over and hides\n          if (this.curPage * 2 - 1 === index) {\n            page.animateClass = `${TURNTORIGHT}-${VISIBLE}`;\n          } else if (this.curPage * 2 === index) {\n            // Turn the next page in the animation to display\n            page.animateClass = `${TURNTORIGHT}-${HIDDEN}`;\n          } else {\n            // No execution of animation, clear timer\n            clearTimeout(time);\n            // Do not add class name\n            page.animateClass = \"\";\n          }\n        }\n      });\n    },\n    // Reset animation class name to empty\n    resetAnimateClass() {\n      this.pages.forEach(page => {\n        page.animateClass = \"\";\n        page.left = page._left;\n      });\n    },\n    // Set the book stack height to the highest current page, other pages decrease\n    set_zIndex(index) {\n      var pageNum = this.getPageNumByIndex(index);\n      if (this.curPage === pageNum) {\n        // The stacking height decreases sequentially on both sides of the current page\n        return this.pageCount;\n      } else {\n        // The stacking height decreases sequentially on both sides of the current page\n        return Math.abs(this.pageCount - Math.abs(this.curPage - pageNum));\n      }\n    },\n    // Turn page\n    turn(index) {\n      if (!this.turnPageByHand) return;\n      if (this.animating) return;\n      this.resetAnimateClass();\n      if (index % 2 === 0) {\n        this.prev();\n      } else {\n        this.next();\n      }\n    },\n    // Previous\n    prev(num) {\n      num = this.roundNum(num);\n      if (isNaN(num) || num < 1) return;\n      if (this.animating) return;\n      if (this.curPage - num < 1) return;\n      // change direction\n      this.direction = TURNTORIGHT;\n      this.$$emit(\"turnStart\");\n      this.curPage -= num;\n      this.$$emit(\"prev\");\n    },\n    // Next page\n    next(num) {\n      num = this.roundNum(num);\n      if (isNaN(num) || num < 1) return;\n      if (this.animating) return;\n      if (this.curPage + num > this.pageCount) {\n        if (this.loop) {\n          this.resetToFirst();\n        } else {\n          return;\n        }\n      }\n      // change direction\n      this.direction = TURNTOLEFT;\n      this.$$emit(\"turnStart\");\n      this.curPage += num;\n      this.$$emit(\"next\");\n    },\n    resetToFirst() {\n      this.curPage = this.initPage;\n      this.curHalfPage = 0;\n      this.getPages();\n    },\n    // Rounding numbers\n    roundNum(any) {\n      return Math.round(any || 1);\n    },\n    // Stay on current page\n    stay(index) {\n      this.curHalfPage = index;\n      this.staying = true;\n      // Record the current page, if the current page is clicked to change the page before the timer ends, then the end operation in the following state is not performed\n      const temp = this.curHalfPage;\n      setTimeout(() => {\n        if (temp === this.curHalfPage) {\n          this.ended();\n        }\n      }, this.autoNextPageDelayTime);\n    },\n    // Single page preview finished\n    ended() {\n      this.staying = false;\n      // right\n      if (this.curHalfPage % 2 === 1) {\n        if (this.autoNextPage) {\n          this.resetAnimateClass();\n          this.next();\n        }\n      } else {\n        if (this.autoNextPage) {\n          this.curHalfPage += 1;\n          console.log(this.curHalfPage);\n          this.stay(this.curHalfPage);\n        }\n      }\n    },\n    // Calculate after the page changes\n    computedData(pageNum) {\n      // Every time you turn the page, the index on the left side of the page is subtracted by one unit (because each half-page starts with index 0 and the page starts with 1)\n      this.curHalfPage = pageNum * 2 - 1 - 1;\n      // Turn pages to animate\n      this.animating = true;\n      // Calculate which pages need to be turned 180 degrees\n      this.rotate180();\n      // Calculate pages that need to be animated\n      this.animateClass();\n      // Stay on current page\n      this.stay(this.curHalfPage);\n    },\n    // Change the status of automatic page turning\n    changeAutoNextPage() {\n      this.autoNextPage = !this.autoNextPage;\n      // When setting automatic page turning, if it is not staying and is not in the process of turning pages, then turn the next page\n      if (this.autoNextPage && !this.staying && !this.animating) {\n        this.next();\n      }\n    }\n  },\n  mounted() {\n    this.getPages();\n  },\n  watch: {\n    loop() {\n      this.getPages();\n    },\n    autoNextPage(val) {\n      if (val) {\n        this.stay(this.curHalfPage);\n      }\n    },\n    // Listen for changes and re-render\n    data() {\n      this.getPages();\n    },\n    // Animation after page number change\n    curPage(pageNum) {\n      if (pageNum === 1) {\n        this.$$emit(\"atFirstPage\");\n      } else if (pageNum === this.pageCount) {\n        this.$$emit(\"atEndPage\");\n      }\n      this.computedData(pageNum);\n    },\n    // Change every half page\n    curHalfPage(num) {\n      this.$emit(\"indexPageChange\", num);\n    }\n  }\n};\n</script>\n\n<style lang=\"scss\">\n@import \"./index.scss\";\n</style>\n","import FwBook from \"./book.vue\";\r\nimport { pluginFactory } from \"../../utils/plugin\";\r\n\r\nconst BookPlugin = pluginFactory({ components: { FwBook } });\r\n\r\nexport { BookPlugin, FwBook };\r\n","import { BookblockPlugin } from \"./bookblock\";\nimport { Bookblock2Plugin } from \"./bookblock2\";\nimport { TurnPlugin } from \"./turn\";\nimport { BookPlugin } from \"./book\";\nimport { pluginFactory } from \"../utils/plugin\";\n\nexport const componentsPlugin = /*#__PURE__*/ pluginFactory({\n  plugins: { BookblockPlugin, Bookblock2Plugin, TurnPlugin, BookPlugin }\n});\n","import { componentsPlugin } from \"./components\";\nconst { installFactory } = require(\"./utils/plugin\");\n\nconst install = installFactory({\n  plugins: {\n    componentsPlugin\n  }\n});\n\nconst NAME = \"FlippingWidgets\";\n\nconst FlippingWidgets = {\n  install,\n  NAME\n};\n\n// Installer exported in case the consumer does not import `default`\n// as the plugin in CommonJS build (or does not have interop enabled for CommonJS)\n// Both the following will work:\n//   FlippingWidgets = require('vue-turnjs')\n//   FlippingWidgets = require('vue-turnjs').default\n//   Vue.use(FlippingWidgets)\nexport { install, NAME, FlippingWidgets };\n\n// export * from './components/bookblock'\nexport { BookblockPlugin } from \"./components/bookblock\";\nexport { default as FwBookblock } from \"./components/bookblock/bookblock.vue\";\n// backwards compat\nexport { default as Bookblock } from \"./components/bookblock/bookblock.vue\";\n\n// export * from './components/bookblock2'\nexport { Bookblock2Plugin } from \"./components/bookblock2\";\nexport { default as FwBookblock2 } from \"./components/bookblock2/bookblock2.vue\";\n// backwards compat\nexport { default as Bookblock2 } from \"./components/bookblock2/bookblock2.vue\";\n\n// export * from './components/turn'\nexport { TurnPlugin } from \"./components/turn\";\nexport { default as FwTurn } from \"./components/turn/turn.vue\";\n// backwards compat\nexport { default as Turn } from \"./components/turn/turn.vue\";\n\n// export * from './components/book'\nexport { BookPlugin } from \"./components/book\";\nexport { default as FwBook } from \"./components/book/book.vue\";\n\nexport default FlippingWidgets;\n"]}