camaleon_cms 2.8.2 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/camaleon_cms/admin/_actions.js +3 -2
- data/app/assets/javascripts/camaleon_cms/admin/_libraries.js +0 -1
- data/app/assets/javascripts/camaleon_cms/admin/admin-manifest.js +1 -2
- data/app/assets/javascripts/camaleon_cms/admin/introjs/intro.min.js +11 -0
- data/app/assets/javascripts/camaleon_cms/admin/introjs/intro.min.js.map +1 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery.validate.js +5 -5
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/messages_ar.js +52 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/messages_de.js +70 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{es.js → messages_es.js} +9 -10
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{fr.js → messages_fr.js} +7 -3
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/messages_it.js +27 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{nl.js → messages_nl.js} +1 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{pt-BR.js → messages_pt-BR.js} +24 -19
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{ru.js → messages_ru.js} +6 -2
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{zh-CN.js → messages_zh-CN.js} +9 -8
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_de.js +12 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_nl.js +12 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_pt.js +9 -0
- data/app/assets/stylesheets/camaleon_cms/admin/_custom_admin.css.scss +19 -7
- data/app/assets/stylesheets/camaleon_cms/admin/admin-manifest.css +1 -1
- data/app/assets/stylesheets/camaleon_cms/admin/introjs/introjs.min.css +2 -0
- data/app/assets/stylesheets/camaleon_cms/admin/introjs/introjs.min.css.map +1 -0
- data/app/controllers/camaleon_cms/admin/media_controller.rb +2 -1
- data/app/helpers/camaleon_cms/uploader_helper.rb +1 -1
- data/app/uploaders/camaleon_cms_aws_uploader.rb +2 -0
- data/app/uploaders/camaleon_cms_local_uploader.rb +3 -1
- data/app/uploaders/camaleon_cms_uploader.rb +2 -4
- data/app/views/layouts/camaleon_cms/admin.html.erb +7 -1
- data/lib/camaleon_cms/version.rb +1 -1
- metadata +20 -15
- data/app/assets/javascripts/camaleon_cms/admin/_underscore.js +0 -1536
- data/app/assets/javascripts/camaleon_cms/admin/introjs/_intro.min.js +0 -1317
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/de.js +0 -20
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/it.js +0 -23
- data/app/assets/stylesheets/camaleon_cms/admin/introjs/_introjs.min.css +0 -1
- /data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/{uk.js → messages_uk.js} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"intro.min.js","sources":["../../src/util/cookie.ts","../../src/core/dontShowAgain.ts","../../src/util/stamp.ts","../../src/core/DOMEvent.ts","../../src/util/isFunction.ts","../../src/util/addClass.ts","../../src/util/getPropValue.ts","../../src/util/setShowElement.ts","../../src/util/scrollParentToElement.ts","../../src/util/getScrollParent.ts","../../src/util/getWindowSize.ts","../../src/util/scrollTo.ts","../../src/util/elementInViewport.ts","../../src/util/setAnchorAsButton.ts","../../src/util/isFixed.ts","../../src/util/getOffset.ts","../../src/util/removeClass.ts","../../src/util/setStyle.ts","../../src/core/setHelperLayerPosition.ts","../../src/util/checkRight.ts","../../src/util/checkLeft.ts","../../src/util/removeEntry.ts","../../src/core/placeTooltip.ts","../../src/core/removeShowElement.ts","../../src/util/createElement.ts","../../src/util/appendChild.ts","../../src/core/showElement.ts","../../src/core/steps.ts","../../src/core/onKeyDown.ts","../../src/util/cloneObject.ts","../../src/util/debounce.ts","../../src/core/hint.ts","../../src/core/fetchIntroSteps.ts","../../src/core/refresh.ts","../../src/core/onResize.ts","../../src/util/removeChild.ts","../../src/core/exitIntro.ts","../../src/core/addOverlayLayer.ts","../../src/core/introForElement.ts","../../src/option.ts","../../src/intro.ts","../../src/index.ts"],"sourcesContent":["export function setCookie(name: string, value: string, days?: number) {\n const cookie: {\n [name: string]: string | undefined;\n path: string;\n expires: string | undefined;\n } = { [name]: value, path: \"/\", expires: undefined };\n\n if (days) {\n let date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n cookie.expires = date.toUTCString();\n }\n\n let arr = [];\n for (let key in cookie) {\n arr.push(`${key}=${cookie[key]}`);\n }\n\n document.cookie = arr.join(\"; \");\n\n return getCookie(name);\n}\n\nexport function getAllCookies() {\n let cookie: { [name: string]: string } = {};\n\n document.cookie.split(\";\").forEach((el) => {\n let [k, v] = el.split(\"=\");\n cookie[k.trim()] = v;\n });\n\n return cookie;\n}\n\nexport function getCookie(name: string) {\n return getAllCookies()[name];\n}\n\nexport function deleteCookie(name: string) {\n setCookie(name, \"\", -1);\n}\n","import { IntroJs } from \"../intro\";\nimport { deleteCookie, getCookie, setCookie } from \"../util/cookie\";\n\nconst dontShowAgainCookieValue = \"true\";\n\n/**\n * Set the \"Don't show again\" state\n *\n * @api private\n */\nexport function setDontShowAgain(intro: IntroJs, dontShowAgain: boolean) {\n if (dontShowAgain) {\n setCookie(\n intro._options.dontShowAgainCookie,\n dontShowAgainCookieValue,\n intro._options.dontShowAgainCookieDays\n );\n } else {\n deleteCookie(intro._options.dontShowAgainCookie);\n }\n}\n\n/**\n * Get the \"Don't show again\" state from cookies\n *\n * @api private\n */\nexport function getDontShowAgain(intro: IntroJs): boolean {\n const dontShowCookie = getCookie(intro._options.dontShowAgainCookie);\n return dontShowCookie !== \"\" && dontShowCookie === dontShowAgainCookieValue;\n}\n","/**\n * Mark any object with an incrementing number\n * used for keeping track of objects\n *\n * @param Object obj Any object or DOM Element\n * @param String key\n * @return Object\n */\nconst stamp = (() => {\n const keys: {\n [key: string]: number;\n } = {};\n return function stamp<T>(obj: T, key = \"introjs-stamp\"): number {\n // each group increments from 0\n keys[key] = keys[key] || 0;\n\n // stamp only once per object\n // @ts-ignore\n if (obj[key] === undefined) {\n // increment key for each new object\n // @ts-ignore\n obj[key] = keys[key]++;\n }\n\n // @ts-ignore\n return obj[key];\n };\n})();\n\nexport default stamp;\n","import { IntroJs } from \"../intro\";\nimport stamp from \"../util/stamp\";\n\n/**\n * DOMEvent Handles all DOM events\n *\n * methods:\n *\n * on - add event handler\n * off - remove event\n */\n\nclass DOMEvent {\n private readonly events_key: string = \"introjs_event\";\n\n /**\n * Gets a unique ID for an event listener\n */\n private _id(type: string, listener: Function, context: IntroJs) {\n return type + stamp(listener) + (context ? `_${stamp(context)}` : \"\");\n }\n\n /**\n * Adds event listener\n */\n public on(\n obj: EventTarget,\n type: string,\n listener: (\n context: IntroJs | EventTarget,\n e: Event\n ) => void | undefined | string | Promise<string | void>,\n context: IntroJs,\n useCapture: boolean\n ) {\n const id = this._id(type, listener, context);\n const handler = (e: Event) => listener(context || obj, e || window.event);\n\n if (\"addEventListener\" in obj) {\n obj.addEventListener(type, handler, useCapture);\n } else if (\"attachEvent\" in obj) {\n // @ts-ignore\n obj.attachEvent(`on${type}`, handler);\n }\n\n // @ts-ignore\n obj[this.events_key] = obj[this.events_key] || {};\n // @ts-ignore\n obj[this.events_key][id] = handler;\n }\n\n /**\n * Removes event listener\n */\n public off(\n obj: EventTarget,\n type: string,\n listener: (\n context: IntroJs | EventTarget,\n e: Event\n ) => void | undefined | string | Promise<string | void>,\n context: IntroJs,\n useCapture: boolean\n ) {\n const id = this._id(type, listener, context);\n // @ts-ignore\n const handler = obj[this.events_key] && obj[this.events_key][id];\n\n if (!handler) {\n return;\n }\n\n if (\"removeEventListener\" in obj) {\n obj.removeEventListener(type, handler, useCapture);\n } else if (\"detachEvent\" in obj) {\n // @ts-ignore\n obj.detachEvent(`on${type}`, handler);\n }\n\n // @ts-ignore\n obj[this.events_key][id] = null;\n }\n}\n\nexport default new DOMEvent();\n","// Returns true if the given parameter is a function\nexport default (x: any): x is Function => typeof x === \"function\";\n","/**\n * Append a class to an element\n * @api private\n */\nexport default function addClass(element: HTMLElement, className: string) {\n if (element instanceof SVGElement) {\n // svg\n const pre = element.getAttribute(\"class\") || \"\";\n\n if (!pre.match(className)) {\n // check if element doesn't already have className\n element.setAttribute(\"class\", `${pre} ${className}`);\n }\n } else {\n if (element.classList !== undefined) {\n // check for modern classList property\n const classes = className.split(\" \");\n for (const cls of classes) {\n element.classList.add(cls);\n }\n } else if (!element.className.match(className)) {\n // check if element doesn't already have className\n element.className += ` ${className}`;\n }\n }\n}\n","/**\n * Get an element CSS property on the page\n * Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml\n *\n * @api private\n * @returns string property value\n */\nexport default function getPropValue(\n element: HTMLElement,\n propName: string\n): string {\n let propValue = \"\";\n if (\"currentStyle\" in element) {\n //IE\n // @ts-ignore\n propValue = element.currentStyle[propName];\n } else if (document.defaultView && document.defaultView.getComputedStyle) {\n //Others\n propValue = document.defaultView\n .getComputedStyle(element, null)\n .getPropertyValue(propName);\n }\n\n //Prevent exception in IE\n if (propValue && propValue.toLowerCase) {\n return propValue.toLowerCase();\n } else {\n return propValue;\n }\n}\n","import addClass from \"./addClass\";\nimport getPropValue from \"./getPropValue\";\n\n/**\n * To set the show element\n * This function set a relative (in most cases) position and changes the z-index\n *\n * @api private\n */\nexport default function setShowElement(targetElement: HTMLElement) {\n addClass(targetElement, \"introjs-showElement\");\n\n const currentElementPosition = getPropValue(targetElement, \"position\");\n if (\n currentElementPosition !== \"absolute\" &&\n currentElementPosition !== \"relative\" &&\n currentElementPosition !== \"sticky\" &&\n currentElementPosition !== \"fixed\"\n ) {\n //change to new intro item\n addClass(targetElement, \"introjs-relativePosition\");\n }\n}\n","import getScrollParent from \"./getScrollParent\";\n\n/**\n * scroll a scrollable element to a child element\n */\nexport default function scrollParentToElement(\n scrollToElement: boolean,\n targetElement: HTMLElement\n) {\n if (!scrollToElement) return;\n\n const parent = getScrollParent(targetElement);\n\n if (parent === document.body) return;\n\n parent.scrollTop = targetElement.offsetTop - parent.offsetTop;\n}\n","/**\n * Find the nearest scrollable parent\n * copied from https://stackoverflow.com/questions/35939886/find-first-scrollable-parent\n */\nexport default function getScrollParent(element: HTMLElement): HTMLElement {\n let style = window.getComputedStyle(element);\n const excludeStaticParent = style.position === \"absolute\";\n const overflowRegex = /(auto|scroll)/;\n\n if (style.position === \"fixed\") return document.body;\n\n for (\n let parent: HTMLElement | null = element;\n (parent = parent.parentElement);\n\n ) {\n style = window.getComputedStyle(parent);\n if (excludeStaticParent && style.position === \"static\") {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX))\n return parent;\n }\n\n return document.body;\n}\n","/**\n * Provides a cross-browser way to get the screen dimensions\n * via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight\n *\n * @api private\n */\nexport default function getWinSize(): { width: number; height: number } {\n if (window.innerWidth !== undefined) {\n return { width: window.innerWidth, height: window.innerHeight };\n } else {\n const D = document.documentElement;\n return { width: D.clientWidth, height: D.clientHeight };\n }\n}\n","import elementInViewport from \"./elementInViewport\";\nimport getWindowSize from \"./getWindowSize\";\nimport { ScrollTo } from \"../core/steps\";\n\n/**\n * To change the scroll of `window` after highlighting an element\n *\n * @api private\n */\nexport default function scrollTo(\n scrollToElement: boolean,\n scrollTo: ScrollTo,\n scrollPadding: number,\n targetElement: HTMLElement,\n tooltipLayer: HTMLElement\n) {\n if (scrollTo === \"off\") return;\n let rect: DOMRect;\n\n if (!scrollToElement) return;\n\n if (scrollTo === \"tooltip\") {\n rect = tooltipLayer.getBoundingClientRect();\n } else {\n rect = targetElement.getBoundingClientRect();\n }\n\n if (!elementInViewport(targetElement)) {\n const winHeight = getWindowSize().height;\n const top = rect.bottom - (rect.bottom - rect.top);\n\n // TODO (afshinm): do we need scroll padding now?\n // I have changed the scroll option and now it scrolls the window to\n // the center of the target element or tooltip.\n\n if (top < 0 || targetElement.clientHeight > winHeight) {\n window.scrollBy(\n 0,\n rect.top - (winHeight / 2 - rect.height / 2) - scrollPadding\n ); // 30px padding from edge to look nice\n\n //Scroll down\n } else {\n window.scrollBy(\n 0,\n rect.top - (winHeight / 2 - rect.height / 2) + scrollPadding\n ); // 30px padding from edge to look nice\n }\n }\n}\n","/**\n * Check to see if the element is in the viewport or not\n * http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\n *\n * @api private\n */\nexport default function elementInViewport(el: HTMLElement): boolean {\n const rect = el.getBoundingClientRect();\n\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom + 80 <= window.innerHeight && // add 80 to get the text right\n rect.right <= window.innerWidth\n );\n}\n","/**\n * Setting anchors to behave like buttons\n *\n * @api private\n */\nexport default function setAnchorAsButton(anchor: HTMLElement) {\n anchor.setAttribute(\"role\", \"button\");\n anchor.tabIndex = 0;\n}\n","import getPropValue from \"./getPropValue\";\n\n/**\n * Checks to see if target element (or parents) position is fixed or not\n *\n * @api private\n */\nexport default function isFixed(element: HTMLElement): boolean {\n const parent = element.parentElement;\n\n if (!parent || parent.nodeName === \"HTML\") {\n return false;\n }\n\n if (getPropValue(element, \"position\") === \"fixed\") {\n return true;\n }\n\n return isFixed(parent);\n}\n","import getPropValue from \"./getPropValue\";\nimport isFixed from \"./isFixed\";\n\n/**\n * Get an element position on the page relative to another element (or body)\n * Thanks to `meouw`: http://stackoverflow.com/a/442474/375966\n *\n * @api private\n * @returns Element's position info\n */\nexport default function getOffset(\n element: HTMLElement,\n relativeEl?: HTMLElement\n): { width: number; height: number; left: number; top: number } {\n const body = document.body;\n const docEl = document.documentElement;\n const scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n const scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n\n relativeEl = relativeEl || body;\n\n const x = element.getBoundingClientRect();\n const xr = relativeEl.getBoundingClientRect();\n const relativeElPosition = getPropValue(relativeEl, \"position\");\n\n let obj = {\n width: x.width,\n height: x.height,\n };\n\n if (\n (relativeEl.tagName.toLowerCase() !== \"body\" &&\n relativeElPosition === \"relative\") ||\n relativeElPosition === \"sticky\"\n ) {\n // when the container of our target element is _not_ body and has either \"relative\" or \"sticky\" position, we should not\n // consider the scroll position but we need to include the relative x/y of the container element\n return Object.assign(obj, {\n top: x.top - xr.top,\n left: x.left - xr.left,\n });\n } else {\n if (isFixed(element)) {\n return Object.assign(obj, {\n top: x.top,\n left: x.left,\n });\n } else {\n return Object.assign(obj, {\n top: x.top + scrollTop,\n left: x.left + scrollLeft,\n });\n }\n }\n}\n","/**\n * Remove a class from an element\n *\n * @api private\n */\nexport default function removeClass(\n element: HTMLElement,\n classNameRegex: RegExp | string\n) {\n if (element instanceof SVGElement) {\n const pre = element.getAttribute(\"class\") || \"\";\n\n element.setAttribute(\n \"class\",\n pre.replace(classNameRegex, \"\").replace(/^\\s+|\\s+$/g, \"\")\n );\n } else {\n element.className = element.className\n .replace(classNameRegex, \"\")\n .replace(/^\\s+|\\s+$/g, \"\");\n }\n}\n","/**\n * Sets the style of an DOM element\n */\nexport default function setStyle(\n element: HTMLElement,\n style: string | { [key: string]: string | number }\n) {\n let cssText = \"\";\n\n if (element.style.cssText) {\n cssText += element.style.cssText;\n }\n\n if (typeof style === \"string\") {\n cssText += style;\n } else {\n for (const rule in style) {\n cssText += `${rule}:${style[rule]};`;\n }\n }\n\n element.style.cssText = cssText;\n}\n","import getOffset from \"../util/getOffset\";\nimport isFixed from \"../util/isFixed\";\nimport addClass from \"../util/addClass\";\nimport removeClass from \"../util/removeClass\";\nimport setStyle from \"../util/setStyle\";\nimport { IntroJs } from \"../intro\";\nimport { HintStep, IntroStep } from \"./steps\";\n\n/**\n * Update the position of the helper layer on the screen\n *\n * @api private\n */\nexport default function setHelperLayerPosition(\n intro: IntroJs,\n step: IntroStep | HintStep,\n helperLayer: HTMLElement\n) {\n if (!helperLayer || !step) return;\n\n const elementPosition = getOffset(\n step.element as HTMLElement,\n intro._targetElement\n );\n let widthHeightPadding = intro._options.helperElementPadding;\n\n // If the target element is fixed, the tooltip should be fixed as well.\n // Otherwise, remove a fixed class that may be left over from the previous\n // step.\n if (step.element instanceof Element && isFixed(step.element)) {\n addClass(helperLayer, \"introjs-fixedTooltip\");\n } else {\n removeClass(helperLayer, \"introjs-fixedTooltip\");\n }\n\n if (step.position === \"floating\") {\n widthHeightPadding = 0;\n }\n\n //set new position to helper layer\n setStyle(helperLayer, {\n width: `${elementPosition.width + widthHeightPadding}px`,\n height: `${elementPosition.height + widthHeightPadding}px`,\n top: `${elementPosition.top - widthHeightPadding / 2}px`,\n left: `${elementPosition.left - widthHeightPadding / 2}px`,\n });\n}\n","/**\n * Set tooltip left so it doesn't go off the right side of the window\n *\n * @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise.\n */\nexport default function checkRight(\n targetOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n },\n tooltipLayerStyleLeft: number,\n tooltipOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n },\n windowSize: {\n width: number;\n height: number;\n },\n tooltipLayer: HTMLElement\n): boolean {\n if (\n targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width >\n windowSize.width\n ) {\n // off the right side of the window\n tooltipLayer.style.left = `${\n windowSize.width - tooltipOffset.width - targetOffset.left\n }px`;\n\n return false;\n }\n\n tooltipLayer.style.left = `${tooltipLayerStyleLeft}px`;\n return true;\n}\n","/**\n * Set tooltip right so it doesn't go off the left side of the window\n *\n * @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise.\n */\nexport default function checkLeft(\n targetOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n },\n tooltipLayerStyleRight: number,\n tooltipOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n },\n tooltipLayer: HTMLElement\n): boolean {\n if (\n targetOffset.left +\n targetOffset.width -\n tooltipLayerStyleRight -\n tooltipOffset.width <\n 0\n ) {\n // off the left side of the window\n tooltipLayer.style.left = `${-targetOffset.left}px`;\n return false;\n }\n tooltipLayer.style.right = `${tooltipLayerStyleRight}px`;\n return true;\n}\n","/**\n * Remove an entry from a string array if it's there, does nothing if it isn't there.\n */\nexport default function removeEntry<K>(stringArray: K[], stringToRemove: K) {\n if (stringArray.includes(stringToRemove)) {\n stringArray.splice(stringArray.indexOf(stringToRemove), 1);\n }\n}\n","import getOffset from \"../util/getOffset\";\nimport getWindowSize from \"../util/getWindowSize\";\nimport addClass from \"../util/addClass\";\nimport checkRight from \"../util/checkRight\";\nimport checkLeft from \"../util/checkLeft\";\nimport removeEntry from \"../util/removeEntry\";\nimport { HintStep, IntroStep, TooltipPosition } from \"./steps\";\nimport { IntroJs } from \"../intro\";\n\n/**\n * auto-determine alignment\n */\nfunction _determineAutoAlignment(\n offsetLeft: number,\n tooltipWidth: number,\n windowWidth: number,\n desiredAlignment: TooltipPosition[]\n): TooltipPosition | null {\n const halfTooltipWidth = tooltipWidth / 2;\n const winWidth = Math.min(windowWidth, window.screen.width);\n\n // valid left must be at least a tooltipWidth\n // away from right side\n if (winWidth - offsetLeft < tooltipWidth) {\n removeEntry<TooltipPosition>(desiredAlignment, \"top-left-aligned\");\n removeEntry<TooltipPosition>(desiredAlignment, \"bottom-left-aligned\");\n }\n\n // valid middle must be at least half\n // width away from both sides\n if (\n offsetLeft < halfTooltipWidth ||\n winWidth - offsetLeft < halfTooltipWidth\n ) {\n removeEntry<TooltipPosition>(desiredAlignment, \"top-middle-aligned\");\n removeEntry<TooltipPosition>(desiredAlignment, \"bottom-middle-aligned\");\n }\n\n // valid right must be at least a tooltipWidth\n // width away from left side\n if (offsetLeft < tooltipWidth) {\n removeEntry<TooltipPosition>(desiredAlignment, \"top-right-aligned\");\n removeEntry<TooltipPosition>(desiredAlignment, \"bottom-right-aligned\");\n }\n\n if (desiredAlignment.length) {\n return desiredAlignment[0];\n }\n\n return null;\n}\n\n/**\n * Determines the position of the tooltip based on the position precedence and availability\n * of screen space.\n */\nfunction _determineAutoPosition(\n positionPrecedence: TooltipPosition[],\n targetElement: HTMLElement,\n tooltipLayer: HTMLElement,\n desiredTooltipPosition: TooltipPosition\n): TooltipPosition {\n // Take a clone of position precedence. These will be the available\n const possiblePositions = positionPrecedence.slice();\n\n const windowSize = getWindowSize();\n const tooltipHeight = getOffset(tooltipLayer).height + 10;\n const tooltipWidth = getOffset(tooltipLayer).width + 20;\n const targetElementRect = targetElement.getBoundingClientRect();\n\n // If we check all the possible areas, and there are no valid places for the tooltip, the element\n // must take up most of the screen real estate. Show the tooltip floating in the middle of the screen.\n let calculatedPosition: TooltipPosition = \"floating\";\n\n /*\n * auto determine position\n */\n\n // Check for space below\n if (targetElementRect.bottom + tooltipHeight > windowSize.height) {\n removeEntry<TooltipPosition>(possiblePositions, \"bottom\");\n }\n\n // Check for space above\n if (targetElementRect.top - tooltipHeight < 0) {\n removeEntry<TooltipPosition>(possiblePositions, \"top\");\n }\n\n // Check for space to the right\n if (targetElementRect.right + tooltipWidth > windowSize.width) {\n removeEntry<TooltipPosition>(possiblePositions, \"right\");\n }\n\n // Check for space to the left\n if (targetElementRect.left - tooltipWidth < 0) {\n removeEntry<TooltipPosition>(possiblePositions, \"left\");\n }\n\n // strip alignment from position\n if (desiredTooltipPosition) {\n // ex: \"bottom-right-aligned\"\n // should return 'bottom'\n desiredTooltipPosition = desiredTooltipPosition.split(\n \"-\"\n )[0] as TooltipPosition;\n }\n\n if (possiblePositions.length) {\n // Pick the first valid position, in order\n calculatedPosition = possiblePositions[0];\n\n if (possiblePositions.includes(desiredTooltipPosition)) {\n // If the requested position is in the list, choose that\n calculatedPosition = desiredTooltipPosition;\n }\n }\n\n // only \"top\" and \"bottom\" positions have optional alignments\n if (calculatedPosition === \"top\" || calculatedPosition === \"bottom\") {\n let defaultAlignment: TooltipPosition;\n let desiredAlignment: TooltipPosition[] = [];\n\n if (calculatedPosition === \"top\") {\n // if screen width is too small\n // for ANY alignment, middle is\n // probably the best for visibility\n defaultAlignment = \"top-middle-aligned\";\n\n desiredAlignment = [\n \"top-left-aligned\",\n \"top-middle-aligned\",\n \"top-right-aligned\",\n ];\n } else {\n defaultAlignment = \"bottom-middle-aligned\";\n\n desiredAlignment = [\n \"bottom-left-aligned\",\n \"bottom-middle-aligned\",\n \"bottom-right-aligned\",\n ];\n }\n\n calculatedPosition =\n _determineAutoAlignment(\n targetElementRect.left,\n tooltipWidth,\n windowSize.width,\n desiredAlignment\n ) || defaultAlignment;\n }\n\n return calculatedPosition;\n}\n\n/**\n * Render tooltip box in the page\n *\n * @api private\n */\nexport default function placeTooltip(\n intro: IntroJs,\n currentStep: IntroStep | HintStep,\n tooltipLayer: HTMLElement,\n arrowLayer: HTMLElement,\n hintMode: boolean = false\n) {\n if (!currentStep) return;\n\n let tooltipCssClass = \"\";\n let tooltipOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n };\n let targetOffset: {\n top: number;\n left: number;\n width: number;\n height: number;\n };\n let windowSize: { width: number; height: number };\n let currentTooltipPosition: TooltipPosition;\n\n //reset the old style\n tooltipLayer.style.top = \"\";\n tooltipLayer.style.right = \"\";\n tooltipLayer.style.bottom = \"\";\n tooltipLayer.style.left = \"\";\n tooltipLayer.style.marginLeft = \"\";\n tooltipLayer.style.marginTop = \"\";\n\n arrowLayer.style.display = \"inherit\";\n\n //if we have a custom css class for each step\n if (typeof currentStep.tooltipClass === \"string\") {\n tooltipCssClass = currentStep.tooltipClass;\n } else {\n tooltipCssClass = intro._options.tooltipClass;\n }\n\n tooltipLayer.className = [\"introjs-tooltip\", tooltipCssClass]\n .filter(Boolean)\n .join(\" \");\n\n tooltipLayer.setAttribute(\"role\", \"dialog\");\n\n currentTooltipPosition = currentStep.position;\n\n // Floating is always valid, no point in calculating\n if (currentTooltipPosition !== \"floating\" && intro._options.autoPosition) {\n currentTooltipPosition = _determineAutoPosition(\n intro._options.positionPrecedence,\n currentStep.element as HTMLElement,\n tooltipLayer,\n currentTooltipPosition\n );\n }\n\n let tooltipLayerStyleLeft: number;\n targetOffset = getOffset(currentStep.element as HTMLElement);\n tooltipOffset = getOffset(tooltipLayer);\n windowSize = getWindowSize();\n\n addClass(tooltipLayer, `introjs-${currentTooltipPosition}`);\n\n let tooltipLayerStyleLeftRight =\n targetOffset.width / 2 - tooltipOffset.width / 2;\n\n switch (currentTooltipPosition) {\n case \"top-right-aligned\":\n arrowLayer.className = \"introjs-arrow bottom-right\";\n\n let tooltipLayerStyleRight = 0;\n checkLeft(\n targetOffset,\n tooltipLayerStyleRight,\n tooltipOffset,\n tooltipLayer\n );\n tooltipLayer.style.bottom = `${targetOffset.height + 20}px`;\n break;\n\n case \"top-middle-aligned\":\n arrowLayer.className = \"introjs-arrow bottom-middle\";\n\n // a fix for middle aligned hints\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (\n checkLeft(\n targetOffset,\n tooltipLayerStyleLeftRight,\n tooltipOffset,\n tooltipLayer\n )\n ) {\n tooltipLayer.style.right = \"\";\n checkRight(\n targetOffset,\n tooltipLayerStyleLeftRight,\n tooltipOffset,\n windowSize,\n tooltipLayer\n );\n }\n tooltipLayer.style.bottom = `${targetOffset.height + 20}px`;\n break;\n\n case \"top-left-aligned\":\n // top-left-aligned is the same as the default top\n case \"top\":\n arrowLayer.className = \"introjs-arrow bottom\";\n\n tooltipLayerStyleLeft = hintMode ? 0 : 15;\n\n checkRight(\n targetOffset,\n tooltipLayerStyleLeft,\n tooltipOffset,\n windowSize,\n tooltipLayer\n );\n tooltipLayer.style.bottom = `${targetOffset.height + 20}px`;\n break;\n case \"right\":\n tooltipLayer.style.left = `${targetOffset.width + 20}px`;\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, right would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n arrowLayer.className = \"introjs-arrow left-bottom\";\n tooltipLayer.style.top = `-${\n tooltipOffset.height - targetOffset.height - 20\n }px`;\n } else {\n arrowLayer.className = \"introjs-arrow left\";\n }\n break;\n case \"left\":\n if (!hintMode && intro._options.showStepNumbers === true) {\n tooltipLayer.style.top = \"15px\";\n }\n\n if (targetOffset.top + tooltipOffset.height > windowSize.height) {\n // In this case, left would have fallen below the bottom of the screen.\n // Modify so that the bottom of the tooltip connects with the target\n tooltipLayer.style.top = `-${\n tooltipOffset.height - targetOffset.height - 20\n }px`;\n arrowLayer.className = \"introjs-arrow right-bottom\";\n } else {\n arrowLayer.className = \"introjs-arrow right\";\n }\n tooltipLayer.style.right = `${targetOffset.width + 20}px`;\n\n break;\n case \"floating\":\n arrowLayer.style.display = \"none\";\n\n //we have to adjust the top and left of layer manually for intro items without element\n tooltipLayer.style.left = \"50%\";\n tooltipLayer.style.top = \"50%\";\n tooltipLayer.style.marginLeft = `-${tooltipOffset.width / 2}px`;\n tooltipLayer.style.marginTop = `-${tooltipOffset.height / 2}px`;\n\n break;\n case \"bottom-right-aligned\":\n arrowLayer.className = \"introjs-arrow top-right\";\n\n tooltipLayerStyleRight = 0;\n checkLeft(\n targetOffset,\n tooltipLayerStyleRight,\n tooltipOffset,\n tooltipLayer\n );\n tooltipLayer.style.top = `${targetOffset.height + 20}px`;\n break;\n\n case \"bottom-middle-aligned\":\n arrowLayer.className = \"introjs-arrow top-middle\";\n\n // a fix for middle aligned hints\n if (hintMode) {\n tooltipLayerStyleLeftRight += 5;\n }\n\n if (\n checkLeft(\n targetOffset,\n tooltipLayerStyleLeftRight,\n tooltipOffset,\n tooltipLayer\n )\n ) {\n tooltipLayer.style.right = \"\";\n checkRight(\n targetOffset,\n tooltipLayerStyleLeftRight,\n tooltipOffset,\n windowSize,\n tooltipLayer\n );\n }\n tooltipLayer.style.top = `${targetOffset.height + 20}px`;\n break;\n\n // case 'bottom-left-aligned':\n // Bottom-left-aligned is the same as the default bottom\n // case 'bottom':\n // Bottom going to follow the default behavior\n default:\n arrowLayer.className = \"introjs-arrow top\";\n\n tooltipLayerStyleLeft = 0;\n checkRight(\n targetOffset,\n tooltipLayerStyleLeft,\n tooltipOffset,\n windowSize,\n tooltipLayer\n );\n tooltipLayer.style.top = `${targetOffset.height + 20}px`;\n }\n}\n","import removeClass from \"../util/removeClass\";\n\n/**\n * To remove all show element(s)\n *\n * @api private\n */\nexport default function removeShowElement() {\n const elms = Array.from(\n document.querySelectorAll<HTMLElement>(\".introjs-showElement\")\n );\n\n for (const elm of elms) {\n removeClass(elm, /introjs-[a-zA-Z]+/g);\n }\n}\n","import setStyle from \"./setStyle\";\n\n/**\n * Create a DOM element with various attributes\n */\nexport default function _createElement<K extends keyof HTMLElementTagNameMap>(\n tagName: K,\n attrs?: { [key: string]: string | Function }\n): HTMLElementTagNameMap[K] {\n let element = document.createElement<K>(tagName);\n\n attrs = attrs || {};\n\n // regex for matching attributes that need to be set with setAttribute\n const setAttRegex = /^(?:role|data-|aria-)/;\n\n for (const k in attrs) {\n let v = attrs[k];\n\n if (k === \"style\" && typeof v !== \"function\") {\n setStyle(element, v);\n } else if (typeof v === \"string\" && k.match(setAttRegex)) {\n element.setAttribute(k, v);\n } else {\n // @ts-ignore\n element[k] = v;\n }\n }\n\n return element;\n}\n","import setStyle from \"./setStyle\";\n\n/**\n * Appends `element` to `parentElement`\n */\nexport default function appendChild(\n parentElement: HTMLElement,\n element: HTMLElement,\n animate: boolean = false\n) {\n if (animate) {\n const existingOpacity = element.style.opacity || \"1\";\n\n setStyle(element, {\n opacity: \"0\",\n });\n\n window.setTimeout(() => {\n setStyle(element, {\n opacity: existingOpacity,\n });\n }, 10);\n }\n\n parentElement.appendChild(element);\n}\n","import setShowElement from \"../util/setShowElement\";\nimport scrollParentToElement from \"../util/scrollParentToElement\";\nimport addClass from \"../util/addClass\";\nimport scrollTo from \"../util/scrollTo\";\nimport exitIntro from \"./exitIntro\";\nimport setAnchorAsButton from \"../util/setAnchorAsButton\";\nimport { IntroStep, nextStep, previousStep } from \"./steps\";\nimport setHelperLayerPosition from \"./setHelperLayerPosition\";\nimport placeTooltip from \"./placeTooltip\";\nimport removeShowElement from \"./removeShowElement\";\nimport createElement from \"../util/createElement\";\nimport setStyle from \"../util/setStyle\";\nimport appendChild from \"../util/appendChild\";\nimport { IntroJs } from \"../intro\";\nimport isFunction from \"../util/isFunction\";\n\n/**\n * Gets the current progress percentage\n *\n * @api private\n * @returns current progress percentage\n */\nfunction _getProgress(currentStep: number, introItemsLength: number) {\n // Steps are 0 indexed\n return ((currentStep + 1) / introItemsLength) * 100;\n}\n\n/**\n * Add disableinteraction layer and adjust the size and position of the layer\n *\n * @api private\n */\nfunction _disableInteraction(intro: IntroJs, step: IntroStep) {\n let disableInteractionLayer = document.querySelector<HTMLElement>(\n \".introjs-disableInteraction\"\n );\n\n if (disableInteractionLayer === null) {\n disableInteractionLayer = createElement(\"div\", {\n className: \"introjs-disableInteraction\",\n });\n\n intro._targetElement.appendChild(disableInteractionLayer);\n }\n\n setHelperLayerPosition(intro, step, disableInteractionLayer);\n}\n\n/**\n * Creates the bullets layer\n * @private\n */\nfunction _createBullets(intro: IntroJs, targetElement: IntroStep): HTMLElement {\n const bulletsLayer = createElement(\"div\", {\n className: \"introjs-bullets\",\n });\n\n if (intro._options.showBullets === false) {\n bulletsLayer.style.display = \"none\";\n }\n\n const ulContainer = createElement(\"ul\");\n ulContainer.setAttribute(\"role\", \"tablist\");\n\n const anchorClick = function (this: HTMLElement) {\n const stepNumber = this.getAttribute(\"data-step-number\");\n if (stepNumber == null) return;\n\n intro.goToStep(parseInt(stepNumber, 10));\n };\n\n for (let i = 0; i < intro._introItems.length; i++) {\n const { step } = intro._introItems[i];\n\n const innerLi = createElement(\"li\");\n const anchorLink = createElement(\"a\");\n\n innerLi.setAttribute(\"role\", \"presentation\");\n anchorLink.setAttribute(\"role\", \"tab\");\n\n anchorLink.onclick = anchorClick;\n\n if (i === targetElement.step - 1) {\n anchorLink.className = \"active\";\n }\n\n setAnchorAsButton(anchorLink);\n anchorLink.innerHTML = \" \";\n anchorLink.setAttribute(\"data-step-number\", step.toString());\n\n innerLi.appendChild(anchorLink);\n ulContainer.appendChild(innerLi);\n }\n\n bulletsLayer.appendChild(ulContainer);\n\n return bulletsLayer;\n}\n\n/**\n * Deletes and recreates the bullets layer\n * @private\n */\nexport function _recreateBullets(intro: IntroJs, targetElement: IntroStep) {\n if (intro._options.showBullets) {\n const existing = document.querySelector(\".introjs-bullets\");\n\n if (existing && existing.parentNode) {\n existing.parentNode.replaceChild(\n _createBullets(intro, targetElement),\n existing\n );\n }\n }\n}\n\n/**\n * Updates the bullets\n */\nfunction _updateBullets(\n showBullets: boolean,\n oldReferenceLayer: HTMLElement,\n targetElement: IntroStep\n) {\n if (showBullets) {\n const oldRefActiveBullet = oldReferenceLayer.querySelector(\n \".introjs-bullets li > a.active\"\n );\n\n const oldRefBulletStepNumber = oldReferenceLayer.querySelector(\n `.introjs-bullets li > a[data-step-number=\"${targetElement.step}\"]`\n );\n\n if (oldRefActiveBullet && oldRefBulletStepNumber) {\n oldRefActiveBullet.className = \"\";\n oldRefBulletStepNumber.className = \"active\";\n }\n }\n}\n\n/**\n * Creates the progress-bar layer and elements\n * @private\n */\nfunction _createProgressBar(intro: IntroJs) {\n const progressLayer = createElement(\"div\");\n\n progressLayer.className = \"introjs-progress\";\n\n if (intro._options.showProgress === false) {\n progressLayer.style.display = \"none\";\n }\n\n const progressBar = createElement(\"div\", {\n className: \"introjs-progressbar\",\n });\n\n if (intro._options.progressBarAdditionalClass) {\n progressBar.className += \" \" + intro._options.progressBarAdditionalClass;\n }\n\n const progress = _getProgress(intro._currentStep, intro._introItems.length);\n progressBar.setAttribute(\"role\", \"progress\");\n progressBar.setAttribute(\"aria-valuemin\", \"0\");\n progressBar.setAttribute(\"aria-valuemax\", \"100\");\n progressBar.setAttribute(\"aria-valuenow\", progress.toString());\n progressBar.style.cssText = `width:${progress}%;`;\n\n progressLayer.appendChild(progressBar);\n\n return progressLayer;\n}\n\n/**\n * Updates an existing progress bar variables\n * @private\n */\nexport function _updateProgressBar(\n oldReferenceLayer: HTMLElement,\n currentStep: number,\n introItemsLength: number\n) {\n const progressBar = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-progress .introjs-progressbar\"\n );\n\n if (!progressBar) return;\n\n const progress = _getProgress(currentStep, introItemsLength);\n\n progressBar.style.cssText = `width:${progress}%;`;\n progressBar.setAttribute(\"aria-valuenow\", progress.toString());\n}\n\n/**\n * Show an element on the page\n *\n * @api private\n */\nexport default async function _showElement(\n intro: IntroJs,\n targetElement: IntroStep\n) {\n if (isFunction(intro._introChangeCallback)) {\n await intro._introChangeCallback.call(intro, targetElement.element);\n }\n\n const oldHelperLayer = document.querySelector<HTMLElement>(\n \".introjs-helperLayer\"\n );\n const oldReferenceLayer = document.querySelector<HTMLElement>(\n \".introjs-tooltipReferenceLayer\"\n );\n let highlightClass = \"introjs-helperLayer\";\n let nextTooltipButton: HTMLElement;\n let prevTooltipButton: HTMLElement;\n let skipTooltipButton: HTMLElement;\n\n //check for a current step highlight class\n if (typeof targetElement.highlightClass === \"string\") {\n highlightClass += ` ${targetElement.highlightClass}`;\n }\n //check for options highlight class\n if (typeof intro._options.highlightClass === \"string\") {\n highlightClass += ` ${intro._options.highlightClass}`;\n }\n\n if (oldHelperLayer !== null && oldReferenceLayer !== null) {\n const oldHelperNumberLayer = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-helperNumberLayer\"\n );\n const oldTooltipLayer = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-tooltiptext\"\n ) as HTMLElement;\n const oldTooltipTitleLayer = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-tooltip-title\"\n ) as HTMLElement;\n const oldArrowLayer = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-arrow\"\n ) as HTMLElement;\n const oldTooltipContainer = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-tooltip\"\n ) as HTMLElement;\n\n skipTooltipButton = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-skipbutton\"\n ) as HTMLElement;\n prevTooltipButton = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-prevbutton\"\n ) as HTMLElement;\n nextTooltipButton = oldReferenceLayer.querySelector<HTMLElement>(\n \".introjs-nextbutton\"\n ) as HTMLElement;\n\n //update or reset the helper highlight class\n oldHelperLayer.className = highlightClass;\n //hide the tooltip\n oldTooltipContainer.style.opacity = \"0\";\n oldTooltipContainer.style.display = \"none\";\n\n // if the target element is within a scrollable element\n scrollParentToElement(\n intro._options.scrollToElement,\n targetElement.element as HTMLElement\n );\n\n // set new position to helper layer\n setHelperLayerPosition(intro, targetElement, oldHelperLayer);\n setHelperLayerPosition(intro, targetElement, oldReferenceLayer);\n\n //remove old classes if the element still exist\n removeShowElement();\n\n //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation\n if (intro._lastShowElementTimer) {\n window.clearTimeout(intro._lastShowElementTimer);\n }\n\n intro._lastShowElementTimer = window.setTimeout(() => {\n // set current step to the label\n if (oldHelperNumberLayer !== null) {\n oldHelperNumberLayer.innerHTML = `${targetElement.step} ${intro._options.stepNumbersOfLabel} ${intro._introItems.length}`;\n }\n\n // set current tooltip text\n oldTooltipLayer.innerHTML = targetElement.intro || \"\";\n\n // set current tooltip title\n oldTooltipTitleLayer.innerHTML = targetElement.title || \"\";\n\n //set the tooltip position\n oldTooltipContainer.style.display = \"block\";\n placeTooltip(intro, targetElement, oldTooltipContainer, oldArrowLayer);\n\n //change active bullet\n _updateBullets(\n intro._options.showBullets,\n oldReferenceLayer,\n targetElement\n );\n\n _updateProgressBar(\n oldReferenceLayer,\n intro._currentStep,\n intro._introItems.length\n );\n\n //show the tooltip\n oldTooltipContainer.style.opacity = \"1\";\n\n //reset button focus\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null &&\n /introjs-donebutton/gi.test(nextTooltipButton.className)\n ) {\n // skip button is now \"done\" button\n nextTooltipButton.focus();\n } else if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n //still in the tour, focus on next\n nextTooltipButton.focus();\n }\n\n // change the scroll of the window, if needed\n scrollTo(\n intro._options.scrollToElement,\n targetElement.scrollTo,\n intro._options.scrollPadding,\n targetElement.element as HTMLElement,\n oldTooltipLayer\n );\n }, 350);\n\n // end of old element if-else condition\n } else {\n const helperLayer = createElement(\"div\", {\n className: highlightClass,\n });\n const referenceLayer = createElement(\"div\", {\n className: \"introjs-tooltipReferenceLayer\",\n });\n const arrowLayer = createElement(\"div\", {\n className: \"introjs-arrow\",\n });\n const tooltipLayer = createElement(\"div\", {\n className: \"introjs-tooltip\",\n });\n const tooltipTextLayer = createElement(\"div\", {\n className: \"introjs-tooltiptext\",\n });\n const tooltipHeaderLayer = createElement(\"div\", {\n className: \"introjs-tooltip-header\",\n });\n const tooltipTitleLayer = createElement(\"h1\", {\n className: \"introjs-tooltip-title\",\n });\n\n const buttonsLayer = createElement(\"div\");\n\n setStyle(helperLayer, {\n \"box-shadow\": `0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ${intro._options.overlayOpacity.toString()}) 0 0 0 5000px`,\n });\n\n // target is within a scrollable element\n scrollParentToElement(\n intro._options.scrollToElement,\n targetElement.element as HTMLElement\n );\n\n //set new position to helper layer\n setHelperLayerPosition(intro, targetElement, helperLayer);\n setHelperLayerPosition(intro, targetElement, referenceLayer);\n\n //add helper layer to target element\n appendChild(intro._targetElement, helperLayer, true);\n appendChild(intro._targetElement, referenceLayer);\n\n tooltipTextLayer.innerHTML = targetElement.intro;\n tooltipTitleLayer.innerHTML = targetElement.title;\n\n buttonsLayer.className = \"introjs-tooltipbuttons\";\n if (intro._options.showButtons === false) {\n buttonsLayer.style.display = \"none\";\n }\n\n tooltipHeaderLayer.appendChild(tooltipTitleLayer);\n tooltipLayer.appendChild(tooltipHeaderLayer);\n tooltipLayer.appendChild(tooltipTextLayer);\n\n // \"Do not show again\" checkbox\n if (intro._options.dontShowAgain) {\n const dontShowAgainWrapper = createElement(\"div\", {\n className: \"introjs-dontShowAgain\",\n });\n const dontShowAgainCheckbox = createElement(\"input\", {\n type: \"checkbox\",\n id: \"introjs-dontShowAgain\",\n name: \"introjs-dontShowAgain\",\n });\n dontShowAgainCheckbox.onchange = (e) => {\n intro.setDontShowAgain((<HTMLInputElement>e.target).checked);\n };\n const dontShowAgainCheckboxLabel = createElement(\"label\", {\n htmlFor: \"introjs-dontShowAgain\",\n });\n dontShowAgainCheckboxLabel.innerText = intro._options.dontShowAgainLabel;\n dontShowAgainWrapper.appendChild(dontShowAgainCheckbox);\n dontShowAgainWrapper.appendChild(dontShowAgainCheckboxLabel);\n\n tooltipLayer.appendChild(dontShowAgainWrapper);\n }\n\n tooltipLayer.appendChild(_createBullets(intro, targetElement));\n tooltipLayer.appendChild(_createProgressBar(intro));\n\n // add helper layer number\n const helperNumberLayer = createElement(\"div\");\n\n if (intro._options.showStepNumbers === true) {\n helperNumberLayer.className = \"introjs-helperNumberLayer\";\n helperNumberLayer.innerHTML = `${targetElement.step} ${intro._options.stepNumbersOfLabel} ${intro._introItems.length}`;\n tooltipLayer.appendChild(helperNumberLayer);\n }\n\n tooltipLayer.appendChild(arrowLayer);\n referenceLayer.appendChild(tooltipLayer);\n\n //next button\n nextTooltipButton = createElement(\"a\");\n\n nextTooltipButton.onclick = async () => {\n if (intro._introItems.length - 1 !== intro._currentStep) {\n await nextStep(intro);\n } else if (/introjs-donebutton/gi.test(nextTooltipButton.className)) {\n if (isFunction(intro._introCompleteCallback)) {\n await intro._introCompleteCallback.call(\n intro,\n intro._currentStep,\n \"done\"\n );\n }\n\n await exitIntro(intro, intro._targetElement);\n }\n };\n\n setAnchorAsButton(nextTooltipButton);\n nextTooltipButton.innerHTML = intro._options.nextLabel;\n\n //previous button\n prevTooltipButton = createElement(\"a\");\n\n prevTooltipButton.onclick = async () => {\n if (intro._currentStep > 0) {\n await previousStep(intro);\n }\n };\n\n setAnchorAsButton(prevTooltipButton);\n prevTooltipButton.innerHTML = intro._options.prevLabel;\n\n //skip button\n skipTooltipButton = createElement(\"a\", {\n className: \"introjs-skipbutton\",\n });\n\n setAnchorAsButton(skipTooltipButton);\n skipTooltipButton.innerHTML = intro._options.skipLabel;\n\n skipTooltipButton.onclick = async () => {\n if (\n intro._introItems.length - 1 === intro._currentStep &&\n isFunction(intro._introCompleteCallback)\n ) {\n await intro._introCompleteCallback.call(\n intro,\n intro._currentStep,\n \"skip\"\n );\n }\n\n if (isFunction(intro._introSkipCallback)) {\n await intro._introSkipCallback.call(intro, intro._currentStep);\n }\n\n await exitIntro(intro, intro._targetElement);\n };\n\n tooltipHeaderLayer.appendChild(skipTooltipButton);\n\n // in order to prevent displaying previous button always\n if (intro._introItems.length > 1) {\n buttonsLayer.appendChild(prevTooltipButton);\n }\n\n // we always need the next button because this\n // button changes to \"Done\" in the last step of the tour\n buttonsLayer.appendChild(nextTooltipButton);\n tooltipLayer.appendChild(buttonsLayer);\n\n // set proper position\n placeTooltip(intro, targetElement, tooltipLayer, arrowLayer);\n\n // change the scroll of the window, if needed\n scrollTo(\n intro._options.scrollToElement,\n targetElement.scrollTo,\n intro._options.scrollPadding,\n targetElement.element as HTMLElement,\n tooltipLayer\n );\n\n //end of new element if-else condition\n }\n\n // removing previous disable interaction layer\n const disableInteractionLayer = intro._targetElement.querySelector(\n \".introjs-disableInteraction\"\n );\n if (disableInteractionLayer && disableInteractionLayer.parentNode) {\n disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);\n }\n\n //disable interaction\n if (targetElement.disableInteraction) {\n _disableInteraction(intro, targetElement);\n }\n\n // when it's the first step of tour\n if (intro._currentStep === 0 && intro._introItems.length > 1) {\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n nextTooltipButton.className = `${intro._options.buttonClass} introjs-nextbutton`;\n nextTooltipButton.innerHTML = intro._options.nextLabel;\n }\n\n if (intro._options.hidePrev === true) {\n if (\n typeof prevTooltipButton !== \"undefined\" &&\n prevTooltipButton !== null\n ) {\n prevTooltipButton.className = `${intro._options.buttonClass} introjs-prevbutton introjs-hidden`;\n }\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n addClass(nextTooltipButton, \"introjs-fullbutton\");\n }\n } else {\n if (\n typeof prevTooltipButton !== \"undefined\" &&\n prevTooltipButton !== null\n ) {\n prevTooltipButton.className = `${intro._options.buttonClass} introjs-prevbutton introjs-disabled`;\n }\n }\n } else if (\n intro._introItems.length - 1 === intro._currentStep ||\n intro._introItems.length === 1\n ) {\n // last step of tour\n if (\n typeof prevTooltipButton !== \"undefined\" &&\n prevTooltipButton !== null\n ) {\n prevTooltipButton.className = `${intro._options.buttonClass} introjs-prevbutton`;\n }\n\n if (intro._options.hideNext === true) {\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n nextTooltipButton.className = `${intro._options.buttonClass} introjs-nextbutton introjs-hidden`;\n }\n if (\n typeof prevTooltipButton !== \"undefined\" &&\n prevTooltipButton !== null\n ) {\n addClass(prevTooltipButton, \"introjs-fullbutton\");\n }\n } else {\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n if (intro._options.nextToDone === true) {\n nextTooltipButton.innerHTML = intro._options.doneLabel;\n addClass(\n nextTooltipButton,\n `${intro._options.buttonClass} introjs-nextbutton introjs-donebutton`\n );\n } else {\n nextTooltipButton.className = `${intro._options.buttonClass} introjs-nextbutton introjs-disabled`;\n }\n }\n }\n } else {\n // steps between start and end\n if (\n typeof prevTooltipButton !== \"undefined\" &&\n prevTooltipButton !== null\n ) {\n prevTooltipButton.className = `${intro._options.buttonClass} introjs-prevbutton`;\n }\n if (\n typeof nextTooltipButton !== \"undefined\" &&\n nextTooltipButton !== null\n ) {\n nextTooltipButton.className = `${intro._options.buttonClass} introjs-nextbutton`;\n nextTooltipButton.innerHTML = intro._options.nextLabel;\n }\n }\n\n if (typeof prevTooltipButton !== \"undefined\" && prevTooltipButton !== null) {\n prevTooltipButton.setAttribute(\"role\", \"button\");\n }\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.setAttribute(\"role\", \"button\");\n }\n if (typeof skipTooltipButton !== \"undefined\" && skipTooltipButton !== null) {\n skipTooltipButton.setAttribute(\"role\", \"button\");\n }\n\n //Set focus on \"next\" button, so that hitting Enter always moves you onto the next step\n if (typeof nextTooltipButton !== \"undefined\" && nextTooltipButton !== null) {\n nextTooltipButton.focus();\n }\n\n setShowElement(targetElement.element as HTMLElement);\n\n if (isFunction(intro._introAfterChangeCallback)) {\n await intro._introAfterChangeCallback.call(intro, targetElement.element);\n }\n}\n","import isFunction from \"../util/isFunction\";\nimport exitIntro from \"./exitIntro\";\nimport showElement from \"./showElement\";\nimport { IntroJs } from \"../intro\";\n\nexport type ScrollTo = \"off\" | \"element\" | \"tooltip\";\n\nexport type TooltipPosition =\n | \"floating\"\n | \"top\"\n | \"bottom\"\n | \"left\"\n | \"right\"\n | \"top-right-aligned\"\n | \"top-left-aligned\"\n | \"top-middle-aligned\"\n | \"bottom-right-aligned\"\n | \"bottom-left-aligned\"\n | \"bottom-middle-aligned\";\n\nexport type HintPosition =\n | \"top-left\"\n | \"top-right\"\n | \"top-middle\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-middle\"\n | \"middle-left\"\n | \"middle-right\"\n | \"middle-middle\";\n\nexport type IntroStep = {\n step: number;\n title: string;\n intro: string;\n tooltipClass?: string;\n highlightClass?: string;\n element?: HTMLElement | string | null;\n position: TooltipPosition;\n scrollTo: ScrollTo;\n disableInteraction?: boolean;\n};\n\nexport type HintStep = {\n element?: HTMLElement | string | null;\n tooltipClass?: string;\n position: TooltipPosition;\n hint?: string;\n hintTargetElement?: HTMLElement;\n hintAnimation?: boolean;\n hintPosition: HintPosition;\n};\n\n/**\n * Go to specific step of introduction\n *\n * @api private\n */\nexport async function goToStep(intro: IntroJs, step: number) {\n //because steps starts with zero\n intro._currentStep = step - 2;\n if (typeof intro._introItems !== \"undefined\") {\n await nextStep(intro);\n }\n}\n\n/**\n * Go to the specific step of introduction with the explicit [data-step] number\n *\n * @api private\n */\nexport async function goToStepNumber(intro: IntroJs, step: number) {\n intro._currentStepNumber = step;\n if (typeof intro._introItems !== \"undefined\") {\n await nextStep(intro);\n }\n}\n\n/**\n * Go to next step on intro\n *\n * @api private\n */\nexport async function nextStep(intro: IntroJs) {\n intro._direction = \"forward\";\n\n if (typeof intro._currentStepNumber !== \"undefined\") {\n for (let i = 0; i < intro._introItems.length; i++) {\n const item = intro._introItems[i];\n if (item.step === intro._currentStepNumber) {\n intro._currentStep = i - 1;\n intro._currentStepNumber = undefined;\n }\n }\n }\n\n if (intro._currentStep === -1) {\n intro._currentStep = 0;\n } else {\n ++intro._currentStep;\n }\n\n const nextStep = intro._introItems[intro._currentStep];\n let continueStep = true;\n\n if (isFunction(intro._introBeforeChangeCallback)) {\n continueStep = await intro._introBeforeChangeCallback.call(\n intro,\n nextStep && (nextStep.element as HTMLElement),\n intro._currentStep,\n intro._direction\n );\n }\n\n // if `onbeforechange` returned `false`, stop displaying the element\n if (continueStep === false) {\n --intro._currentStep;\n return false;\n }\n\n if (intro._introItems.length <= intro._currentStep) {\n // end of the intro\n // check if any callback is defined\n if (isFunction(intro._introCompleteCallback)) {\n await intro._introCompleteCallback.call(intro, intro._currentStep, \"end\");\n }\n\n await exitIntro(intro, intro._targetElement);\n\n return false;\n }\n\n await showElement(intro, nextStep);\n\n return true;\n}\n\n/**\n * Go to previous step on intro\n *\n * @api private\n */\nexport async function previousStep(intro: IntroJs) {\n intro._direction = \"backward\";\n\n if (intro._currentStep <= 0) {\n return false;\n }\n\n --intro._currentStep;\n\n const nextStep = intro._introItems[intro._currentStep];\n let continueStep = true;\n\n if (isFunction(intro._introBeforeChangeCallback)) {\n continueStep = await intro._introBeforeChangeCallback.call(\n intro,\n nextStep && (nextStep.element as HTMLElement),\n intro._currentStep,\n intro._direction\n );\n }\n\n // if `onbeforechange` returned `false`, stop displaying the element\n if (continueStep === false) {\n ++intro._currentStep;\n return false;\n }\n\n await showElement(intro, nextStep);\n\n return true;\n}\n","import { nextStep, previousStep } from \"./steps\";\nimport exitIntro from \"./exitIntro\";\nimport { IntroJs } from \"../intro\";\nimport isFunction from \"../util/isFunction\";\n\n/**\n * on keyCode:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n * This feature has been removed from the Web standards.\n * Though some browsers may still support it, it is in\n * the process of being dropped.\n * Instead, you should use KeyboardEvent.code,\n * if it's implemented.\n *\n * jQuery's approach is to test for\n * (1) e.which, then\n * (2) e.charCode, then\n * (3) e.keyCode\n * https://github.com/jquery/jquery/blob/a6b0705294d336ae2f63f7276de0da1195495363/src/event.js#L638\n */\nexport default async function onKeyDown(intro: IntroJs, e: KeyboardEvent) {\n let code = e.code === undefined ? e.which : e.code;\n\n // if e.which is null\n if (code === null) {\n code = e.charCode === null ? e.keyCode : e.charCode;\n }\n\n if ((code === \"Escape\" || code === 27) && intro._options.exitOnEsc === true) {\n //escape key pressed, exit the intro\n //check if exit callback is defined\n await exitIntro(intro, intro._targetElement);\n } else if (code === \"ArrowLeft\" || code === 37) {\n //left arrow\n await previousStep(intro);\n } else if (code === \"ArrowRight\" || code === 39) {\n //right arrow\n await nextStep(intro);\n } else if (code === \"Enter\" || code === \"NumpadEnter\" || code === 13) {\n //srcElement === ie\n const target = (e.target || e.srcElement) as HTMLElement;\n if (target && target.className.match(\"introjs-prevbutton\")) {\n //user hit enter while focusing on previous button\n await previousStep(intro);\n } else if (target && target.className.match(\"introjs-skipbutton\")) {\n //user hit enter while focusing on skip button\n if (\n intro._introItems.length - 1 === intro._currentStep &&\n isFunction(intro._introCompleteCallback)\n ) {\n await intro._introCompleteCallback.call(\n intro,\n intro._currentStep,\n \"skip\"\n );\n }\n\n await exitIntro(intro, intro._targetElement);\n } else if (target && target.getAttribute(\"data-step-number\")) {\n // user hit enter while focusing on step bullet\n target.click();\n } else {\n //default behavior for responding to enter\n await nextStep(intro);\n }\n\n //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n }\n }\n}\n","/**\n * Makes a copy of an object\n * @api private\n */\nexport default function cloneObject<T>(source: T): T {\n if (source === null || typeof source !== \"object\" || \"nodeType\" in source) {\n return source;\n }\n\n const temp = {} as T;\n\n for (const key in source) {\n // @ts-ignore:next-line\n if (\"jQuery\" in window && source[key] instanceof window.jQuery) {\n temp[key] = source[key];\n } else {\n temp[key] = cloneObject(source[key]);\n }\n }\n return temp;\n}\n","export default function debounce(\n func: Function,\n timeout: number\n): (...args: any) => void {\n let timer: number;\n\n return (...args) => {\n window.clearTimeout(timer);\n\n timer = window.setTimeout(() => {\n func(args);\n }, timeout);\n };\n}\n","import addClass from \"../util/addClass\";\nimport removeClass from \"../util/removeClass\";\nimport isFixed from \"../util/isFixed\";\nimport getOffset from \"../util/getOffset\";\nimport cloneObject from \"../util/cloneObject\";\nimport DOMEvent from \"./DOMEvent\";\nimport setAnchorAsButton from \"../util/setAnchorAsButton\";\nimport setHelperLayerPosition from \"./setHelperLayerPosition\";\nimport placeTooltip from \"./placeTooltip\";\nimport createElement from \"../util/createElement\";\nimport debounce from \"../util/debounce\";\nimport { HintPosition, HintStep, TooltipPosition } from \"./steps\";\nimport { IntroJs } from \"../intro\";\nimport isFunction from \"../util/isFunction\";\n\n/**\n * Get a queryselector within the hint wrapper\n */\nexport function hintQuerySelectorAll(selector: string): HTMLElement[] {\n const hintsWrapper = document.querySelector(\".introjs-hints\");\n return hintsWrapper\n ? Array.from(hintsWrapper.querySelectorAll(selector))\n : [];\n}\n\n/**\n * Hide a hint\n *\n * @api private\n */\nexport async function hideHint(intro: IntroJs, stepId: number) {\n const hint = hintQuerySelectorAll(`.introjs-hint[data-step=\"${stepId}\"]`)[0];\n\n removeHintTooltip();\n\n if (hint) {\n addClass(hint, \"introjs-hidehint\");\n }\n\n // call the callback function (if any)\n if (isFunction(intro._hintCloseCallback)) {\n await intro._hintCloseCallback.call(intro, stepId);\n }\n}\n\n/**\n * Hide all hints\n *\n * @api private\n */\nexport async function hideHints(intro: IntroJs) {\n const hints = hintQuerySelectorAll(\".introjs-hint\");\n\n for (const hint of hints) {\n const step = hint.getAttribute(\"data-step\");\n if (!step) continue;\n\n await hideHint(intro, parseInt(step, 10));\n }\n}\n\n/**\n * Show all hints\n *\n * @api private\n */\nexport async function showHints(intro: IntroJs) {\n const hints = hintQuerySelectorAll(\".introjs-hint\");\n\n if (hints && hints.length) {\n for (const hint of hints) {\n const step = hint.getAttribute(\"data-step\");\n if (!step) continue;\n\n showHint(parseInt(step, 10));\n }\n } else {\n await populateHints(intro, intro._targetElement);\n }\n}\n\n/**\n * Show a hint\n *\n * @api private\n */\nexport function showHint(stepId: number) {\n const hint = hintQuerySelectorAll(`.introjs-hint[data-step=\"${stepId}\"]`)[0];\n\n if (hint) {\n removeClass(hint, /introjs-hidehint/g);\n }\n}\n\n/**\n * Removes all hint elements on the page\n * Useful when you want to destroy the elements and add them again (e.g. a modal or popup)\n *\n * @api private\n */\nexport function removeHints(intro: IntroJs) {\n const hints = hintQuerySelectorAll(\".introjs-hint\");\n\n for (const hint of hints) {\n const step = hint.getAttribute(\"data-step\");\n if (!step) continue;\n\n removeHint(parseInt(step, 10));\n }\n\n DOMEvent.off(document, \"click\", removeHintTooltip, intro, false);\n DOMEvent.off(window, \"resize\", reAlignHints, intro, true);\n\n if (intro._hintsAutoRefreshFunction) {\n DOMEvent.off(\n window,\n \"scroll\",\n intro._hintsAutoRefreshFunction,\n intro,\n true\n );\n }\n}\n\n/**\n * Remove one single hint element from the page\n * Useful when you want to destroy the element and add them again (e.g. a modal or popup)\n * Use removeHints if you want to remove all elements.\n *\n * @api private\n */\nexport function removeHint(stepId: number) {\n const hint = hintQuerySelectorAll(`.introjs-hint[data-step=\"${stepId}\"]`)[0];\n\n if (hint && hint.parentNode) {\n hint.parentNode.removeChild(hint);\n }\n}\n\n/**\n * Add all available hints to the page\n *\n * @api private\n */\nexport async function addHints(intro: IntroJs) {\n let hintsWrapper = document.querySelector(\".introjs-hints\");\n\n if (hintsWrapper === null) {\n hintsWrapper = createElement(\"div\", {\n className: \"introjs-hints\",\n });\n }\n\n /**\n * Returns an event handler unique to the hint iteration\n */\n const getHintClick = (i: number) => (e: Event) => {\n const evt = e ? e : window.event;\n\n if (evt && evt.stopPropagation) {\n evt.stopPropagation();\n }\n\n if (evt && evt.cancelBubble !== null) {\n evt.cancelBubble = true;\n }\n\n showHintDialog(intro, i);\n };\n\n for (let i = 0; i < intro._hintItems.length; i++) {\n const item = intro._hintItems[i];\n\n // avoid append a hint twice\n if (document.querySelector(`.introjs-hint[data-step=\"${i}\"]`)) {\n return;\n }\n\n const hint = createElement(\"a\", {\n className: \"introjs-hint\",\n });\n setAnchorAsButton(hint);\n\n hint.onclick = getHintClick(i);\n\n if (!item.hintAnimation) {\n addClass(hint, \"introjs-hint-no-anim\");\n }\n\n // hint's position should be fixed if the target element's position is fixed\n if (isFixed(item.element as HTMLElement)) {\n addClass(hint, \"introjs-fixedhint\");\n }\n\n const hintDot = createElement(\"div\", {\n className: \"introjs-hint-dot\",\n });\n\n const hintPulse = createElement(\"div\", {\n className: \"introjs-hint-pulse\",\n });\n\n hint.appendChild(hintDot);\n hint.appendChild(hintPulse);\n hint.setAttribute(\"data-step\", i.toString());\n\n // we swap the hint element with target element\n // because _setHelperLayerPosition uses `element` property\n item.hintTargetElement = item.element as HTMLElement;\n item.element = hint;\n\n // align the hint position\n alignHintPosition(\n item.hintPosition,\n hint,\n item.hintTargetElement as HTMLElement\n );\n\n hintsWrapper.appendChild(hint);\n }\n\n // adding the hints wrapper\n document.body.appendChild(hintsWrapper);\n\n // call the callback function (if any)\n if (isFunction(intro._hintsAddedCallback)) {\n await intro._hintsAddedCallback.call(intro);\n }\n\n if (intro._options.hintAutoRefreshInterval >= 0) {\n intro._hintsAutoRefreshFunction = debounce(\n () => reAlignHints(intro),\n intro._options.hintAutoRefreshInterval\n );\n DOMEvent.on(window, \"scroll\", intro._hintsAutoRefreshFunction, intro, true);\n }\n}\n\n/**\n * Aligns hint position\n *\n * @api private\n */\nexport function alignHintPosition(\n position: HintPosition,\n hintElement: HTMLElement,\n targetElement?: HTMLElement\n) {\n if (typeof targetElement === \"undefined\") {\n return;\n }\n\n // get/calculate offset of target element\n const offset = getOffset(targetElement);\n const iconWidth = 20;\n const iconHeight = 20;\n\n // align the hint element\n switch (position) {\n default:\n case \"top-left\":\n hintElement.style.left = `${offset.left}px`;\n hintElement.style.top = `${offset.top}px`;\n break;\n case \"top-right\":\n hintElement.style.left = `${offset.left + offset.width - iconWidth}px`;\n hintElement.style.top = `${offset.top}px`;\n break;\n case \"bottom-left\":\n hintElement.style.left = `${offset.left}px`;\n hintElement.style.top = `${offset.top + offset.height - iconHeight}px`;\n break;\n case \"bottom-right\":\n hintElement.style.left = `${offset.left + offset.width - iconWidth}px`;\n hintElement.style.top = `${offset.top + offset.height - iconHeight}px`;\n break;\n case \"middle-left\":\n hintElement.style.left = `${offset.left}px`;\n hintElement.style.top = `${\n offset.top + (offset.height - iconHeight) / 2\n }px`;\n break;\n case \"middle-right\":\n hintElement.style.left = `${offset.left + offset.width - iconWidth}px`;\n hintElement.style.top = `${\n offset.top + (offset.height - iconHeight) / 2\n }px`;\n break;\n case \"middle-middle\":\n hintElement.style.left = `${\n offset.left + (offset.width - iconWidth) / 2\n }px`;\n hintElement.style.top = `${\n offset.top + (offset.height - iconHeight) / 2\n }px`;\n break;\n case \"bottom-middle\":\n hintElement.style.left = `${\n offset.left + (offset.width - iconWidth) / 2\n }px`;\n hintElement.style.top = `${offset.top + offset.height - iconHeight}px`;\n break;\n case \"top-middle\":\n hintElement.style.left = `${\n offset.left + (offset.width - iconWidth) / 2\n }px`;\n hintElement.style.top = `${offset.top}px`;\n break;\n }\n}\n\n/**\n * Triggers when user clicks on the hint element\n *\n * @api private\n */\nexport async function showHintDialog(intro: IntroJs, stepId: number) {\n const hintElement = document.querySelector<HTMLElement>(\n `.introjs-hint[data-step=\"${stepId}\"]`\n ) as HTMLElement;\n const item = intro._hintItems[stepId];\n\n // call the callback function (if any)\n if (isFunction(intro._hintClickCallback)) {\n await intro._hintClickCallback.call(intro, hintElement, item, stepId);\n }\n\n // remove all open tooltips\n const removedStep = removeHintTooltip();\n\n // to toggle the tooltip\n if (removedStep !== undefined && parseInt(removedStep, 10) === stepId) {\n return;\n }\n\n const tooltipLayer = createElement(\"div\", {\n className: \"introjs-tooltip\",\n });\n const tooltipTextLayer = createElement(\"div\");\n const arrowLayer = createElement(\"div\");\n const referenceLayer = createElement(\"div\");\n\n tooltipLayer.onclick = (e: Event) => {\n //IE9 & Other Browsers\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n //IE8 and Lower\n else {\n e.cancelBubble = true;\n }\n };\n\n tooltipTextLayer.className = \"introjs-tooltiptext\";\n\n const tooltipWrapper = createElement(\"p\");\n tooltipWrapper.innerHTML = item.hint || \"\";\n tooltipTextLayer.appendChild(tooltipWrapper);\n\n if (intro._options.hintShowButton) {\n const closeButton = createElement(\"a\");\n closeButton.className = intro._options.buttonClass;\n closeButton.setAttribute(\"role\", \"button\");\n closeButton.innerHTML = intro._options.hintButtonLabel;\n closeButton.onclick = () => hideHint(intro, stepId);\n tooltipTextLayer.appendChild(closeButton);\n }\n\n arrowLayer.className = \"introjs-arrow\";\n tooltipLayer.appendChild(arrowLayer);\n\n tooltipLayer.appendChild(tooltipTextLayer);\n\n const step = hintElement.getAttribute(\"data-step\") || \"\";\n\n // set current step for _placeTooltip function\n intro._currentStep = parseInt(step, 10);\n const currentStep = intro._hintItems[intro._currentStep];\n\n // align reference layer position\n referenceLayer.className =\n \"introjs-tooltipReferenceLayer introjs-hintReference\";\n referenceLayer.setAttribute(\"data-step\", step);\n setHelperLayerPosition(intro, currentStep, referenceLayer);\n\n referenceLayer.appendChild(tooltipLayer);\n document.body.appendChild(referenceLayer);\n\n // set proper position\n placeTooltip(intro, currentStep, tooltipLayer, arrowLayer, true);\n}\n\n/**\n * Removes open hint (tooltip hint)\n *\n * @api private\n */\nexport function removeHintTooltip(): string | undefined {\n const tooltip = document.querySelector(\".introjs-hintReference\");\n\n if (tooltip && tooltip.parentNode) {\n const step = tooltip.getAttribute(\"data-step\");\n if (!step) return undefined;\n\n tooltip.parentNode.removeChild(tooltip);\n\n return step;\n }\n\n return undefined;\n}\n\n/**\n * Start parsing hint items\n *\n * @api private\n */\nexport async function populateHints(\n intro: IntroJs,\n targetElm: HTMLElement\n): Promise<boolean> {\n intro._hintItems = [];\n\n if (intro._options.hints && intro._options.hints.length > 0) {\n for (const hint of intro._options.hints) {\n const currentItem = cloneObject(hint);\n\n if (typeof currentItem.element === \"string\") {\n //grab the element with given selector from the page\n currentItem.element = document.querySelector<HTMLElement>(\n currentItem.element\n ) as HTMLElement;\n }\n\n currentItem.hintPosition =\n currentItem.hintPosition || intro._options.hintPosition;\n currentItem.hintAnimation =\n currentItem.hintAnimation || intro._options.hintAnimation;\n\n if (currentItem.element !== null) {\n intro._hintItems.push(currentItem as HintStep);\n }\n }\n } else {\n const hints = Array.from(\n targetElm.querySelectorAll<HTMLElement>(\"*[data-hint]\")\n );\n\n if (!hints || !hints.length) {\n return false;\n }\n\n //first add intro items with data-step\n for (const currentElement of hints) {\n // hint animation\n let hintAnimationAttr = currentElement.getAttribute(\n \"data-hint-animation\"\n );\n\n let hintAnimation: boolean = intro._options.hintAnimation;\n if (hintAnimationAttr) {\n hintAnimation = hintAnimationAttr === \"true\";\n }\n\n intro._hintItems.push({\n element: currentElement,\n hint: currentElement.getAttribute(\"data-hint\") || \"\",\n hintPosition: (currentElement.getAttribute(\"data-hint-position\") ||\n intro._options.hintPosition) as HintPosition,\n hintAnimation,\n tooltipClass:\n currentElement.getAttribute(\"data-tooltip-class\") || undefined,\n position: (currentElement.getAttribute(\"data-position\") ||\n intro._options.tooltipPosition) as TooltipPosition,\n });\n }\n }\n\n await addHints(intro);\n\n DOMEvent.on(document, \"click\", removeHintTooltip, intro, false);\n DOMEvent.on(window, \"resize\", reAlignHints, intro, true);\n\n return true;\n}\n\n/**\n * Re-aligns all hint elements\n *\n * @api private\n */\nexport function reAlignHints(intro: IntroJs) {\n for (const { hintTargetElement, hintPosition, element } of intro._hintItems) {\n alignHintPosition(hintPosition, element as HTMLElement, hintTargetElement);\n }\n}\n","import { IntroJs } from \"../intro\";\nimport cloneObject from \"../util/cloneObject\";\nimport createElement from \"../util/createElement\";\nimport { IntroStep, ScrollTo, TooltipPosition } from \"./steps\";\n\n/**\n * Finds all Intro steps from the data-* attributes and the options.steps array\n *\n * @api private\n */\nexport default function fetchIntroSteps(\n intro: IntroJs,\n targetElm: HTMLElement\n) {\n const allIntroSteps: HTMLElement[] = Array.from(\n targetElm.querySelectorAll(\"*[data-intro]\")\n );\n let introItems: IntroStep[] = [];\n\n if (intro._options.steps && intro._options.steps.length) {\n //use steps passed programmatically\n for (const step of intro._options.steps) {\n const currentItem = cloneObject(step);\n\n //set the step\n currentItem.step = introItems.length + 1;\n\n currentItem.title = currentItem.title || \"\";\n\n //use querySelector function only when developer used CSS selector\n if (typeof currentItem.element === \"string\") {\n //grab the element with given selector from the page\n currentItem.element =\n document.querySelector<HTMLElement>(currentItem.element) || undefined;\n }\n\n //intro without element\n if (\n typeof currentItem.element === \"undefined\" ||\n currentItem.element === null\n ) {\n let floatingElementQuery = document.querySelector<HTMLElement>(\n \".introjsFloatingElement\"\n );\n\n if (floatingElementQuery === null) {\n floatingElementQuery = createElement(\"div\", {\n className: \"introjsFloatingElement\",\n });\n\n document.body.appendChild(floatingElementQuery);\n }\n\n currentItem.element = floatingElementQuery;\n currentItem.position = \"floating\";\n }\n\n currentItem.position =\n currentItem.position ||\n (intro._options.tooltipPosition as TooltipPosition);\n currentItem.scrollTo = currentItem.scrollTo || intro._options.scrollTo;\n\n if (typeof currentItem.disableInteraction === \"undefined\") {\n currentItem.disableInteraction = intro._options.disableInteraction;\n }\n\n if (currentItem.element !== null) {\n introItems.push(currentItem as IntroStep);\n }\n }\n } else {\n //use steps from data-* annotations\n const elmsLength = allIntroSteps.length;\n let disableInteraction: boolean;\n\n //if there's no element to intro\n if (elmsLength < 1) {\n return [];\n }\n\n for (const currentElement of allIntroSteps) {\n // start intro for groups of elements\n if (\n intro._options.group &&\n currentElement.getAttribute(\"data-intro-group\") !== intro._options.group\n ) {\n continue;\n }\n\n // skip hidden elements\n if (currentElement.style.display === \"none\") {\n continue;\n }\n\n const step = parseInt(currentElement.getAttribute(\"data-step\") || \"\", 10);\n\n disableInteraction = intro._options.disableInteraction;\n if (currentElement.hasAttribute(\"data-disable-interaction\")) {\n disableInteraction = !!currentElement.getAttribute(\n \"data-disable-interaction\"\n );\n }\n\n if (step > 0) {\n introItems[step - 1] = {\n step: step,\n element: currentElement,\n title: currentElement.getAttribute(\"data-title\") || \"\",\n intro: currentElement.getAttribute(\"data-intro\") || \"\",\n tooltipClass:\n currentElement.getAttribute(\"data-tooltip-class\") || undefined,\n highlightClass:\n currentElement.getAttribute(\"data-highlight-class\") || undefined,\n position: (currentElement.getAttribute(\"data-position\") ||\n intro._options.tooltipPosition) as TooltipPosition,\n scrollTo:\n (currentElement.getAttribute(\"data-scroll-to\") as ScrollTo) ||\n intro._options.scrollTo,\n disableInteraction,\n };\n }\n }\n\n //next add intro items without data-step\n //todo: we need a cleanup here, two loops are redundant\n let nextStep = 0;\n\n for (const currentElement of allIntroSteps) {\n // start intro for groups of elements\n if (\n intro._options.group &&\n currentElement.getAttribute(\"data-intro-group\") !== intro._options.group\n ) {\n continue;\n }\n\n if (currentElement.getAttribute(\"data-step\") === null) {\n while (true) {\n if (typeof introItems[nextStep] === \"undefined\") {\n break;\n } else {\n nextStep++;\n }\n }\n\n if (currentElement.hasAttribute(\"data-disable-interaction\")) {\n disableInteraction = !!currentElement.getAttribute(\n \"data-disable-interaction\"\n );\n } else {\n disableInteraction = intro._options.disableInteraction;\n }\n\n introItems[nextStep] = {\n element: currentElement,\n title: currentElement.getAttribute(\"data-title\") || \"\",\n intro: currentElement.getAttribute(\"data-intro\") || \"\",\n step: nextStep + 1,\n tooltipClass:\n currentElement.getAttribute(\"data-tooltip-class\") || undefined,\n highlightClass:\n currentElement.getAttribute(\"data-highlight-class\") || undefined,\n position: (currentElement.getAttribute(\"data-position\") ||\n intro._options.tooltipPosition) as TooltipPosition,\n scrollTo:\n (currentElement.getAttribute(\"data-scroll-to\") as ScrollTo) ||\n intro._options.scrollTo,\n disableInteraction,\n };\n }\n }\n }\n\n //removing undefined/null elements\n const tempIntroItems = [];\n for (let z = 0; z < introItems.length; z++) {\n if (introItems[z]) {\n // copy non-falsy values to the end of the array\n tempIntroItems.push(introItems[z]);\n }\n }\n\n introItems = tempIntroItems;\n\n //Ok, sort all items with given steps\n introItems.sort((a, b) => a.step - b.step);\n\n return introItems;\n}\n","import { reAlignHints } from \"./hint\";\nimport setHelperLayerPosition from \"./setHelperLayerPosition\";\nimport placeTooltip from \"./placeTooltip\";\nimport fetchIntroSteps from \"./fetchIntroSteps\";\nimport { _recreateBullets, _updateProgressBar } from \"./showElement\";\nimport { IntroJs } from \"../intro\";\n\n/**\n * Update placement of the intro objects on the screen\n * @api private\n */\nexport default function refresh(intro: IntroJs, refreshSteps?: boolean) {\n const currentStep = intro._currentStep;\n\n if (currentStep === undefined || currentStep === null || currentStep == -1)\n return;\n\n const step = intro._introItems[currentStep];\n\n const referenceLayer = document.querySelector<HTMLElement>(\n \".introjs-tooltipReferenceLayer\"\n ) as HTMLElement;\n const helperLayer = document.querySelector<HTMLElement>(\n \".introjs-helperLayer\"\n ) as HTMLElement;\n const disableInteractionLayer = document.querySelector<HTMLElement>(\n \".introjs-disableInteraction\"\n ) as HTMLElement;\n\n // re-align intros\n setHelperLayerPosition(intro, step, helperLayer);\n setHelperLayerPosition(intro, step, referenceLayer);\n setHelperLayerPosition(intro, step, disableInteractionLayer);\n\n if (refreshSteps) {\n intro._introItems = fetchIntroSteps(intro, intro._targetElement);\n _recreateBullets(intro, step);\n _updateProgressBar(referenceLayer, currentStep, intro._introItems.length);\n }\n\n // re-align tooltip\n const oldArrowLayer = document.querySelector<HTMLElement>(\".introjs-arrow\");\n const oldTooltipContainer =\n document.querySelector<HTMLElement>(\".introjs-tooltip\");\n\n if (oldTooltipContainer && oldArrowLayer) {\n placeTooltip(\n intro,\n intro._introItems[currentStep],\n oldTooltipContainer,\n oldArrowLayer\n );\n }\n\n //re-align hints\n reAlignHints(intro);\n\n return intro;\n}\n","import { IntroJs } from \"../intro\";\nimport refresh from \"./refresh\";\n\nexport default function onResize(intro: IntroJs) {\n refresh(intro);\n}\n","import setStyle from \"./setStyle\";\n\n/**\n * Removes `element` from `parentElement`\n */\nexport default function removeChild(\n element: HTMLElement | null,\n animate = false\n) {\n if (!element || !element.parentElement) return;\n\n const parentElement = element.parentElement;\n\n if (animate) {\n setStyle(element, {\n opacity: \"0\",\n });\n\n window.setTimeout(() => {\n try {\n // removeChild(..) throws an exception if the child has already been removed (https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild)\n // this try-catch is added to make sure this function doesn't throw an exception if the child has been removed\n // this scenario can happen when start()/exit() is called multiple times and the helperLayer is removed by the\n // previous exit() call (note: this is a timeout)\n parentElement.removeChild(element);\n } catch (e) {}\n }, 500);\n } else {\n parentElement.removeChild(element);\n }\n}\n","import DOMEvent from \"./DOMEvent\";\nimport onKeyDown from \"./onKeyDown\";\nimport onResize from \"./onResize\";\nimport removeShowElement from \"./removeShowElement\";\nimport removeChild from \"../util/removeChild\";\nimport { IntroJs } from \"../intro\";\nimport isFunction from \"../util/isFunction\";\n\n/**\n * Exit from intro\n *\n * @api private\n * @param {Boolean} force - Setting to `true` will skip the result of beforeExit callback\n */\nexport default async function exitIntro(\n intro: IntroJs,\n targetElement: HTMLElement,\n force: boolean = false\n) {\n let continueExit = true;\n\n // calling onbeforeexit callback\n //\n // If this callback return `false`, it would halt the process\n if (intro._introBeforeExitCallback !== undefined) {\n continueExit = await intro._introBeforeExitCallback.call(\n intro,\n targetElement\n );\n }\n\n // skip this check if `force` parameter is `true`\n // otherwise, if `onbeforeexit` returned `false`, don't exit the intro\n if (!force && continueExit === false) return;\n\n // remove overlay layers from the page\n const overlayLayers = Array.from(\n targetElement.querySelectorAll<HTMLElement>(\".introjs-overlay\")\n );\n\n if (overlayLayers && overlayLayers.length) {\n for (const overlayLayer of overlayLayers) {\n removeChild(overlayLayer);\n }\n }\n\n //remove all helper layers\n const helperLayer = targetElement.querySelector<HTMLElement>(\n \".introjs-helperLayer\"\n );\n removeChild(helperLayer, true);\n\n const referenceLayer = targetElement.querySelector<HTMLElement>(\n \".introjs-tooltipReferenceLayer\"\n );\n removeChild(referenceLayer);\n\n //remove disableInteractionLayer\n const disableInteractionLayer = targetElement.querySelector<HTMLElement>(\n \".introjs-disableInteraction\"\n );\n removeChild(disableInteractionLayer);\n\n //remove intro floating element\n const floatingElement = document.querySelector<HTMLElement>(\n \".introjsFloatingElement\"\n );\n removeChild(floatingElement);\n\n removeShowElement();\n\n //clean listeners\n DOMEvent.off(window, \"keydown\", onKeyDown, intro, true);\n DOMEvent.off(window, \"resize\", onResize, intro, true);\n\n //check if any callback is defined\n if (isFunction(intro._introExitCallback)) {\n await intro._introExitCallback.call(intro);\n }\n\n // set the step to default\n intro._currentStep = -1;\n}\n","import exitIntro from \"./exitIntro\";\nimport createElement from \"../util/createElement\";\nimport setStyle from \"../util/setStyle\";\nimport { IntroJs } from \"../intro\";\n\n/**\n * Add overlay layer to the page\n *\n * @api private\n */\nexport default function addOverlayLayer(\n intro: IntroJs,\n targetElm: HTMLElement\n) {\n const overlayLayer = createElement(\"div\", {\n className: \"introjs-overlay\",\n });\n\n setStyle(overlayLayer, {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n position: \"fixed\",\n });\n\n targetElm.appendChild(overlayLayer);\n\n if (intro._options.exitOnOverlayClick === true) {\n setStyle(overlayLayer, {\n cursor: \"pointer\",\n });\n\n overlayLayer.onclick = async () => {\n await exitIntro(intro, targetElm);\n };\n }\n\n return true;\n}\n","import addOverlayLayer from \"./addOverlayLayer\";\nimport DOMEvent from \"./DOMEvent\";\nimport { nextStep } from \"./steps\";\nimport onKeyDown from \"./onKeyDown\";\nimport onResize from \"./onResize\";\nimport fetchIntroSteps from \"./fetchIntroSteps\";\nimport { IntroJs } from \"../intro\";\nimport isFunction from \"../util/isFunction\";\n\n/**\n * Initiate a new introduction/guide from an element in the page\n *\n * @api private\n */\nexport default async function introForElement(\n intro: IntroJs,\n targetElm: HTMLElement\n): Promise<Boolean> {\n // don't start the tour if the instance is not active\n if (!intro.isActive()) return false;\n\n if (isFunction(intro._introStartCallback)) {\n await intro._introStartCallback.call(intro, targetElm);\n }\n\n //set it to the introJs object\n const steps = fetchIntroSteps(intro, targetElm);\n\n if (steps.length === 0) {\n return false;\n }\n\n intro._introItems = steps;\n\n //add overlay layer to the page\n if (addOverlayLayer(intro, targetElm)) {\n //then, start the show\n await nextStep(intro);\n\n targetElm.addEventListener;\n if (intro._options.keyboardNavigation) {\n DOMEvent.on(window, \"keydown\", onKeyDown, intro, true);\n }\n\n //for window resize\n DOMEvent.on(window, \"resize\", onResize, intro, true);\n }\n\n return false;\n}\n","import {\n HintPosition,\n HintStep,\n IntroStep,\n ScrollTo,\n TooltipPosition,\n} from \"./core/steps\";\n\nexport interface Options {\n steps: Partial<IntroStep>[];\n hints: Partial<HintStep>[];\n /* Is this tour instance active? Don't show the tour again if this flag is set to false */\n isActive: boolean;\n /* Next button label in tooltip box */\n nextLabel: string;\n /* Previous button label in tooltip box */\n prevLabel: string;\n /* Skip button label in tooltip box */\n skipLabel: string;\n /* Done button label in tooltip box */\n doneLabel: string;\n /* Hide previous button in the first step? Otherwise, it will be disabled button. */\n hidePrev: boolean;\n /* Hide next button in the last step? Otherwise, it will be disabled button (note: this will also hide the \"Done\" button) */\n hideNext: boolean;\n /* Change the Next button to Done in the last step of the intro? otherwise, it will render a disabled button */\n nextToDone: boolean;\n /* Default tooltip box position */\n tooltipPosition: string;\n /* Next CSS class for tooltip boxes */\n tooltipClass: string;\n /* Start intro for a group of elements */\n group: string;\n /* CSS class that is added to the helperLayer */\n highlightClass: string;\n /* Close introduction when pressing Escape button? */\n exitOnEsc: boolean;\n /* Close introduction when clicking on overlay layer? */\n exitOnOverlayClick: boolean;\n /* Display the pagination detail */\n showStepNumbers: boolean;\n /* Pagination \"of\" label */\n stepNumbersOfLabel: string;\n /* Let user use keyboard to navigate the tour? */\n keyboardNavigation: boolean;\n /* Show tour control buttons? */\n showButtons: boolean;\n /* Show tour bullets? */\n showBullets: boolean;\n /* Show tour progress? */\n showProgress: boolean;\n /* Scroll to highlighted element? */\n scrollToElement: boolean;\n /*\n * Should we scroll the tooltip or target element?\n * Options are: 'element', 'tooltip' or 'off'\n */\n scrollTo: ScrollTo;\n /* Padding to add after scrolling when element is not in the viewport (in pixels) */\n scrollPadding: number;\n /* Set the overlay opacity */\n overlayOpacity: number;\n /* To determine the tooltip position automatically based on the window.width/height */\n autoPosition: boolean;\n /* Precedence of positions, when auto is enabled */\n positionPrecedence: TooltipPosition[];\n /* Disable an interaction with element? */\n disableInteraction: boolean;\n /* To display the \"Don't show again\" checkbox in the tour */\n dontShowAgain: boolean;\n dontShowAgainLabel: string;\n /* \"Don't show again\" cookie name and expiry (in days) */\n dontShowAgainCookie: string;\n dontShowAgainCookieDays: number;\n /* Set how much padding to be used around helper element */\n helperElementPadding: number;\n /* Default hint position */\n hintPosition: HintPosition;\n /* Hint button label */\n hintButtonLabel: string;\n /* Display the \"Got it\" button? */\n hintShowButton: boolean;\n /* Hints auto-refresh interval in ms (set to -1 to disable) */\n hintAutoRefreshInterval: number;\n /* Adding animation to hints? */\n hintAnimation: boolean;\n /* additional classes to put on the buttons */\n buttonClass: string;\n /* additional classes to put on progress bar */\n progressBarAdditionalClass: boolean;\n}\n\nexport function getDefaultOptions(): Options {\n return {\n steps: [],\n hints: [],\n isActive: true,\n nextLabel: \"Next\",\n prevLabel: \"Back\",\n skipLabel: \"×\",\n doneLabel: \"Done\",\n hidePrev: false,\n hideNext: false,\n nextToDone: true,\n tooltipPosition: \"bottom\",\n tooltipClass: \"\",\n group: \"\",\n highlightClass: \"\",\n exitOnEsc: true,\n exitOnOverlayClick: true,\n showStepNumbers: false,\n stepNumbersOfLabel: \"of\",\n keyboardNavigation: true,\n showButtons: true,\n showBullets: true,\n showProgress: false,\n scrollToElement: true,\n scrollTo: \"element\",\n scrollPadding: 30,\n overlayOpacity: 0.5,\n autoPosition: true,\n positionPrecedence: [\"bottom\", \"top\", \"right\", \"left\"],\n disableInteraction: false,\n\n dontShowAgain: false,\n dontShowAgainLabel: \"Don't show this again\",\n dontShowAgainCookie: \"introjs-dontShowAgain\",\n dontShowAgainCookieDays: 365,\n helperElementPadding: 10,\n\n hintPosition: \"top-middle\",\n hintButtonLabel: \"Got it\",\n hintShowButton: true,\n hintAutoRefreshInterval: 10,\n hintAnimation: true,\n buttonClass: \"introjs-button\",\n progressBarAdditionalClass: false,\n };\n}\n\nexport function setOption<K extends keyof Options>(\n options: Options,\n key: K,\n value: Options[K]\n): Options {\n options[key] = value;\n return options;\n}\n\nexport function setOptions(\n options: Options,\n partialOptions: Partial<Options>\n): Options {\n for (const [key, value] of Object.entries(partialOptions)) {\n options = setOption(options, key as keyof Options, value);\n }\n return options;\n}\n","import { getDontShowAgain, setDontShowAgain } from \"./core/dontShowAgain\";\nimport exitIntro from \"./core/exitIntro\";\nimport {\n hideHint,\n hideHints,\n populateHints,\n removeHint,\n removeHints,\n showHint,\n showHintDialog,\n showHints,\n} from \"./core/hint\";\nimport introForElement from \"./core/introForElement\";\nimport refresh from \"./core/refresh\";\nimport {\n HintStep,\n IntroStep,\n goToStep,\n goToStepNumber,\n nextStep,\n previousStep,\n} from \"./core/steps\";\nimport { Options, getDefaultOptions, setOption, setOptions } from \"./option\";\nimport isFunction from \"./util/isFunction\";\n\ntype introBeforeChangeCallback = (\n this: IntroJs,\n targetElement: HTMLElement,\n currentStep: number,\n direction: \"backward\" | \"forward\"\n) => Promise<boolean> | boolean;\ntype introChangeCallback = (\n this: IntroJs,\n targetElement: HTMLElement\n) => void | Promise<void>;\ntype introAfterChangeCallback = (\n this: IntroJs,\n targetElement: HTMLElement\n) => void | Promise<void>;\ntype introCompleteCallback = (\n this: IntroJs,\n currentStep: number,\n reason: \"skip\" | \"end\" | \"done\"\n) => void | Promise<void>;\ntype introStartCallback = (\n this: IntroJs,\n targetElement: HTMLElement\n) => void | Promise<void>;\ntype introExitCallback = (this: IntroJs) => void | Promise<void>;\ntype introSkipCallback = (\n this: IntroJs,\n currentStep: number\n) => void | Promise<void>;\ntype introBeforeExitCallback = (\n this: IntroJs,\n targetElement: HTMLElement\n) => boolean | Promise<boolean>;\ntype hintsAddedCallback = (this: IntroJs) => void | Promise<void>;\ntype hintClickCallback = (\n this: IntroJs,\n hintElement: HTMLElement,\n item: HintStep,\n stepId: number\n) => void | Promise<void>;\ntype hintCloseCallback = (\n this: IntroJs,\n stepId: number\n) => void | Promise<void>;\n\nexport class IntroJs {\n public _currentStep: number = -1;\n public _currentStepNumber: number | undefined;\n public _direction: \"forward\" | \"backward\";\n public _targetElement: HTMLElement;\n public _introItems: IntroStep[] = [];\n public _hintItems: HintStep[] = [];\n public _options: Options;\n public _introBeforeChangeCallback?: introBeforeChangeCallback;\n public _introChangeCallback?: introChangeCallback;\n public _introAfterChangeCallback?: introAfterChangeCallback;\n public _introCompleteCallback?: introCompleteCallback;\n public _introStartCallback?: introStartCallback;\n public _introExitCallback?: introExitCallback;\n public _introSkipCallback?: introSkipCallback;\n public _introBeforeExitCallback?: introBeforeExitCallback;\n\n public _hintsAddedCallback?: hintsAddedCallback;\n public _hintClickCallback?: hintClickCallback;\n public _hintCloseCallback?: hintCloseCallback;\n\n public _lastShowElementTimer: number;\n public _hintsAutoRefreshFunction: (...args: any[]) => void;\n\n public constructor(targetElement: HTMLElement) {\n this._targetElement = targetElement;\n this._options = getDefaultOptions();\n }\n\n isActive() {\n if (this._options.dontShowAgain && getDontShowAgain(this)) {\n return false;\n }\n\n return this._options.isActive;\n }\n\n clone() {\n return new IntroJs(this._targetElement);\n }\n\n setOption<K extends keyof Options>(key: K, value: Options[K]) {\n this._options = setOption(this._options, key, value);\n return this;\n }\n\n setOptions(partialOptions: Partial<Options>) {\n this._options = setOptions(this._options, partialOptions);\n return this;\n }\n\n async start() {\n await introForElement(this, this._targetElement);\n return this;\n }\n\n async goToStep(step: number) {\n await goToStep(this, step);\n return this;\n }\n\n addStep(step: Partial<IntroStep>) {\n if (!this._options.steps) {\n this._options.steps = [];\n }\n\n this._options.steps.push(step);\n\n return this;\n }\n\n addSteps(steps: Partial<IntroStep>[]) {\n if (!steps.length) return this;\n\n for (let index = 0; index < steps.length; index++) {\n this.addStep(steps[index]);\n }\n\n return this;\n }\n\n async goToStepNumber(step: number) {\n await goToStepNumber(this, step);\n return this;\n }\n\n async nextStep() {\n await nextStep(this);\n return this;\n }\n\n async previousStep() {\n await previousStep(this);\n return this;\n }\n\n currentStep() {\n return this._currentStep;\n }\n\n async exit(force: boolean) {\n await exitIntro(this, this._targetElement, force);\n return this;\n }\n\n refresh(refreshSteps?: boolean) {\n refresh(this, refreshSteps);\n return this;\n }\n\n setDontShowAgain(dontShowAgain: boolean) {\n setDontShowAgain(this, dontShowAgain);\n return this;\n }\n\n onbeforechange(providedCallback: introBeforeChangeCallback) {\n if (isFunction(providedCallback)) {\n this._introBeforeChangeCallback = providedCallback;\n } else {\n throw new Error(\n \"Provided callback for onbeforechange was not a function\"\n );\n }\n return this;\n }\n\n onchange(providedCallback: introChangeCallback) {\n if (isFunction(providedCallback)) {\n this._introChangeCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onchange was not a function.\");\n }\n return this;\n }\n\n onafterchange(providedCallback: introAfterChangeCallback) {\n if (isFunction(providedCallback)) {\n this._introAfterChangeCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onafterchange was not a function\");\n }\n return this;\n }\n\n oncomplete(providedCallback: introCompleteCallback) {\n if (isFunction(providedCallback)) {\n this._introCompleteCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for oncomplete was not a function.\");\n }\n return this;\n }\n\n onhintsadded(providedCallback: hintsAddedCallback) {\n if (isFunction(providedCallback)) {\n this._hintsAddedCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintsadded was not a function.\");\n }\n return this;\n }\n\n onhintclick(providedCallback: hintClickCallback) {\n if (isFunction(providedCallback)) {\n this._hintClickCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintclick was not a function.\");\n }\n return this;\n }\n\n onhintclose(providedCallback: hintCloseCallback) {\n if (isFunction(providedCallback)) {\n this._hintCloseCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onhintclose was not a function.\");\n }\n return this;\n }\n\n onstart(providedCallback: introStartCallback) {\n if (isFunction(providedCallback)) {\n this._introStartCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onstart was not a function.\");\n }\n return this;\n }\n\n onexit(providedCallback: introExitCallback) {\n if (isFunction(providedCallback)) {\n this._introExitCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onexit was not a function.\");\n }\n return this;\n }\n\n onskip(providedCallback: introSkipCallback) {\n if (isFunction(providedCallback)) {\n this._introSkipCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onskip was not a function.\");\n }\n return this;\n }\n\n onbeforeexit(providedCallback: introBeforeExitCallback) {\n if (isFunction(providedCallback)) {\n this._introBeforeExitCallback = providedCallback;\n } else {\n throw new Error(\"Provided callback for onbeforeexit was not a function.\");\n }\n return this;\n }\n\n async addHints() {\n await populateHints(this, this._targetElement);\n return this;\n }\n\n async hideHint(stepId: number) {\n await hideHint(this, stepId);\n return this;\n }\n\n async hideHints() {\n await hideHints(this);\n return this;\n }\n\n showHint(stepId: number) {\n showHint(stepId);\n return this;\n }\n\n async showHints() {\n await showHints(this);\n return this;\n }\n\n removeHints() {\n removeHints(this);\n return this;\n }\n\n removeHint(stepId: number) {\n removeHint(stepId);\n return this;\n }\n\n async showHintDialog(stepId: number) {\n await showHintDialog(this, stepId);\n return this;\n }\n}\n","import { version } from \"../package.json\";\nimport { IntroJs } from \"./intro\";\nimport stamp from \"./util/stamp\";\n\n/**\n * Create a new IntroJS instance\n *\n * @param targetElm Optional target element to start the tour/hint on\n * @returns\n */\nconst introJs = (targetElm?: string | HTMLElement) => {\n let instance: IntroJs;\n\n if (typeof targetElm === \"object\") {\n instance = new IntroJs(targetElm);\n } else if (typeof targetElm === \"string\") {\n //select the target element with query selector\n const targetElement = document.querySelector<HTMLElement>(targetElm);\n\n if (targetElement) {\n instance = new IntroJs(targetElement);\n } else {\n throw new Error(\"There is no element with given selector.\");\n }\n } else {\n instance = new IntroJs(document.body);\n }\n // add instance to list of _instances\n // passing group to stamp to increment\n // from 0 onward somewhat reliably\n introJs.instances[stamp(instance, \"introjs-instance\")] = instance;\n\n return instance;\n};\n\n/**\n * Current IntroJs version\n *\n * @property version\n * @type String\n */\nintroJs.version = version;\n\n/**\n * key-val object helper for introJs instances\n *\n * @property instances\n * @type Object\n */\nintroJs.instances = {} as { [key: number]: IntroJs };\n\nexport default introJs;\n"],"names":["setCookie","name","value","days","_cookie","cookie","_defineProperty","undefined","date","Date","setTime","getTime","expires","toUTCString","arr","key","push","concat","document","join","getCookie","split","forEach","el","_el$split2","_slicedToArray","k","v","trim","dontShowAgainCookieValue","setDontShowAgain","intro","dontShowAgain","_options","dontShowAgainCookie","dontShowAgainCookieDays","keys","stamp","obj","arguments","length","DOMEvent$1","DOMEvent","_classCallCheck","_createClass","type","listener","context","useCapture","id","this","_id","handler","e","window","event","addEventListener","attachEvent","events_key","removeEventListener","detachEvent","isFunction","x","addClass","element","className","SVGElement","pre","getAttribute","match","setAttribute","classList","_step","_iterator","_createForOfIteratorHelper","s","n","done","cls","add","err","f","getPropValue","propName","propValue","currentStyle","defaultView","getComputedStyle","getPropertyValue","toLowerCase","setShowElement","targetElement","currentElementPosition","scrollParentToElement","scrollToElement","parent","style","excludeStaticParent","position","overflowRegex","body","parentElement","test","overflow","overflowY","overflowX","getScrollParent","scrollTop","offsetTop","getWinSize","innerWidth","width","height","innerHeight","D","documentElement","clientWidth","clientHeight","scrollTo","scrollPadding","tooltipLayer","rect","getBoundingClientRect","top","left","bottom","right","elementInViewport","winHeight","getWindowSize","scrollBy","setAnchorAsButton","anchor","tabIndex","isFixed","nodeName","getOffset","relativeEl","docEl","pageYOffset","scrollLeft","pageXOffset","xr","relativeElPosition","tagName","Object","assign","removeClass","classNameRegex","replace","setStyle","cssText","rule","setHelperLayerPosition","step","helperLayer","elementPosition","_targetElement","widthHeightPadding","helperElementPadding","Element","checkRight","targetOffset","tooltipLayerStyleLeft","tooltipOffset","windowSize","checkLeft","tooltipLayerStyleRight","removeEntry","stringArray","stringToRemove","includes","splice","indexOf","_determineAutoPosition","positionPrecedence","desiredTooltipPosition","possiblePositions","slice","tooltipHeight","tooltipWidth","targetElementRect","calculatedPosition","defaultAlignment","desiredAlignment","offsetLeft","windowWidth","halfTooltipWidth","winWidth","Math","min","screen","_determineAutoAlignment","placeTooltip","currentStep","arrowLayer","hintMode","currentTooltipPosition","tooltipCssClass","marginLeft","marginTop","display","tooltipClass","filter","Boolean","autoPosition","tooltipLayerStyleLeftRight","showStepNumbers","removeShowElement","_i","_elms","Array","from","querySelectorAll","_createElement","attrs","createElement","setAttRegex","appendChild","animate","existingOpacity","opacity","setTimeout","_getProgress","introItemsLength","_disableInteraction","disableInteractionLayer","querySelector","_createBullets","bulletsLayer","showBullets","ulContainer","anchorClick","stepNumber","goToStep","parseInt","i","_introItems","innerLi","anchorLink","onclick","innerHTML","toString","_updateBullets","oldReferenceLayer","oldRefActiveBullet","oldRefBulletStepNumber","_createProgressBar","progressLayer","showProgress","progressBar","progressBarAdditionalClass","progress","_currentStep","_updateProgressBar","_showElement","_x","_x2","_showElement2","apply","_asyncToGenerator","_regeneratorRuntime","mark","_callee4","oldHelperLayer","highlightClass","nextTooltipButton","prevTooltipButton","skipTooltipButton","oldHelperNumberLayer","oldTooltipLayer","oldTooltipTitleLayer","oldArrowLayer","oldTooltipContainer","referenceLayer","tooltipTextLayer","tooltipHeaderLayer","tooltipTitleLayer","buttonsLayer","dontShowAgainWrapper","dontShowAgainCheckbox","dontShowAgainCheckboxLabel","helperNumberLayer","wrap","_context4","prev","next","_introChangeCallback","call","_lastShowElementTimer","clearTimeout","stepNumbersOfLabel","title","focus","overlayOpacity","showButtons","onchange","target","checked","htmlFor","innerText","dontShowAgainLabel","_callee","_context","nextStep","_introCompleteCallback","exitIntro","stop","nextLabel","_callee2","_context2","previousStep","prevLabel","skipLabel","_callee3","_context3","_introSkipCallback","parentNode","removeChild","disableInteraction","buttonClass","hidePrev","hideNext","nextToDone","doneLabel","_introAfterChangeCallback","_goToStep","goToStepNumber","_x3","_x4","_goToStepNumber","_currentStepNumber","_x5","_nextStep","continueStep","_direction","_introBeforeChangeCallback","sent","abrupt","showElement","_x6","_previousStep","onKeyDown","_onKeyDown","code","which","charCode","keyCode","exitOnEsc","srcElement","click","preventDefault","returnValue","cloneObject","source","_typeof","temp","jQuery","debounce","func","timeout","timer","_len","args","_key","hintQuerySelectorAll","selector","hintsWrapper","hideHint","_hideHint","stepId","hint","removeHintTooltip","_hintCloseCallback","hideHints","_hideHints","hints","_iterator3","_step3","t0","finish","showHints","_showHints","_iterator4","_step4","showHint","populateHints","removeHint","addHints","_addHints","getHintClick","item","hintDot","hintPulse","evt","stopPropagation","cancelBubble","showHintDialog","_hintItems","hintAnimation","hintTargetElement","alignHintPosition","hintPosition","_hintsAddedCallback","hintAutoRefreshInterval","_hintsAutoRefreshFunction","reAlignHints","on","hintElement","offset","iconWidth","iconHeight","_x7","_showHintDialog","_callee5","removedStep","tooltipWrapper","closeButton","_context5","_hintClickCallback","hintShowButton","hintButtonLabel","tooltip","_x8","_x9","_populateHints","_callee6","targetElm","_iterator5","_step5","currentItem","_hints","currentElement","hintAnimationAttr","_context6","tooltipPosition","_step2","_iterator2","_step2$value","fetchIntroSteps","allIntroSteps","introItems","steps","floatingElementQuery","group","hasAttribute","tempIntroItems","z","sort","a","b","refresh","refreshSteps","existing","replaceChild","_recreateBullets","onResize","_exitIntro","force","continueExit","overlayLayers","_args","_introBeforeExitCallback","off","_introExitCallback","addOverlayLayer","overlayLayer","exitOnOverlayClick","cursor","introForElement","_introForElement","isActive","_introStartCallback","keyboardNavigation","setOption","options","IntroJs","_showHintDialog2","_showHints2","_hideHints2","_hideHint2","_exit","_previousStep2","_nextStep2","_goToStepNumber2","_goToStep2","_start","dontShowCookie","partialOptions","_Object$entries","entries","_Object$entries$_i","setOptions","index","addStep","providedCallback","Error","_callee7","_context7","_callee8","_context8","_callee9","_context9","_callee10","_context10","removeHints","_callee11","_context11","introJs","instance","instances","version"],"mappings":";;;;;;;;;spTAAO,SAASA,EAAUC,EAAcC,EAAeC,GAAe,IAAAC,EAC9DC,GAILC,EAAAF,EAAAE,GAAML,EAAOC,GAAKI,EAAAF,EAAQ,OAAA,KAAGE,EAAAF,EAAWG,eAAAA,GAASH,GAElD,GAAID,EAAM,CACR,IAAIK,EAAO,IAAIC,KACfD,EAAKE,QAAQF,EAAKG,UAAmB,GAAPR,EAAY,GAAK,GAAK,KACpDE,EAAOO,QAAUJ,EAAKK,aACxB,CAEA,IAAIC,EAAM,GACV,IAAK,IAAIC,KAAOV,EACdS,EAAIE,KAAIC,GAAAA,OAAIF,EAAG,KAAAE,OAAIZ,EAAOU,KAK5B,OAFAG,SAASb,OAASS,EAAIK,KAAK,MAEpBC,EAAUnB,EACnB,CAaO,SAASmB,EAAUnB,GACxB,OAXII,EAAqC,CAAA,EAEzCa,SAASb,OAAOgB,MAAM,KAAKC,SAAQ,SAACC,GAClC,IAA0BC,EAAAC,EAAbF,EAAGF,MAAM,KAAI,GAArBK,EAACF,EAAA,GAAEG,EAACH,EAAA,GACTnB,EAAOqB,EAAEE,QAAUD,CACrB,IAEOtB,GAIgBJ,GAZlB,IACDI,CAY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W,IAAIjC,GAAQjD,QAClB,GAAyB,iBAAdA,EAAwB,CAExC,IAAMhV,EAAgBzE,SAASiN,cAA2BwM,GAE1D,IAAIhV,EAGF,MAAM,IAAIqZ,MAAM,4CAFhBa,EAAW,IAAIjC,GAAQjY,EAI3B,MACEka,EAAW,IAAIjC,GAAQ1c,SAASkF,MAOlC,OAFAwZ,EAAQE,UAAUzd,EAAMwd,EAAU,qBAAuBA,EAElDA,CACT,SAQAD,GAAQG,gBAQRH,GAAQE,UAAY,CAAgC"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
/*! jQuery Validation Plugin - v1.
|
2
|
-
*
|
3
|
-
* Copyright (c)
|
4
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){if(this.length){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=h&&g.check(e)))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),d in c||!b.objectLength(a(this).rules())?!1:(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.| |_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e=a(c).attr("type"),f="Step attribute on input type "+e+" is not supported.",g=["text","number","range"],h=new RegExp("\\b"+e+"\\b"),i=e&&!h.test(g.join());if(i)throw new Error(f);return this.optional(c)||b%d===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
|
1
|
+
/*! jQuery Validation Plugin - v1.21.0 - 7/17/2024
|
2
|
+
* https://jqueryvalidation.org/
|
3
|
+
* Copyright (c) 2024 Jörn Zaefferer; Licensed MIT */
|
4
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,customElements:[],onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)});var f=[":text","[type='password']","[type='file']","select","textarea","[type='number']","[type='search']","[type='tel']","[type='url']","[type='email']","[type='datetime']","[type='date']","[type='month']","[type='week']","[type='time']","[type='datetime-local']","[type='range']","[type='color']","[type='radio']","[type='checkbox']","[contenteditable]","[type='button']"],g=["select","option","[type='radio']","[type='checkbox']"];a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",f.concat(this.settings.customElements).join(", "),b).on("click.validate",g.concat(this.settings.customElements).join(", "),b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={},d=["input","select","textarea","[contenteditable]"];return a(this.currentForm).find(d.concat(this.settings.customElements).join(", ")).not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);this.abortRequest(b),"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?h.text(c||""):h.html(c||"")):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?h.text(c||""):h.html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},elementAjaxPort:function(a){return"validate"+a.name},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},abortRequest:function(b){var c;this.pending[b.name]&&(c=this.elementAjaxPort(b),a.ajaxAbort(c),this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass))},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),null!==i.valid&&i.old===h?i.valid:(i.old=h,i.valid=null,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:this.elementAjaxPort(c),dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(b,c,e){var f=b.port;"abort"===b.mode&&(a.ajaxAbort(f),d[f]=e)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(a.ajaxAbort(f),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a.ajaxAbort=function(a){d[a]&&(d[a].abort(),delete d[a])},a});
|
5
5
|
|
6
6
|
//***************customization*****************/
|
7
7
|
// jquery custom validations and default values
|
@@ -120,4 +120,4 @@ jQuery(function(){
|
|
120
120
|
file_format: {file_format: true}
|
121
121
|
});
|
122
122
|
$('form.cama_form_validate').validate();
|
123
|
-
});
|
123
|
+
});
|