diff --git a/.nomedia b/.nomedia
new file mode 100644
index 0000000..8863c00
--- /dev/null
+++ b/.nomedia
@@ -0,0 +1 @@
+/storage/emulated/0/Krita
\ No newline at end of file
diff --git a/.obsidian/app.json b/.obsidian/app.json
new file mode 100644
index 0000000..9c788a9
--- /dev/null
+++ b/.obsidian/app.json
@@ -0,0 +1,10 @@
+{
+ "autoPairBrackets": false,
+ "autoPairMarkdown": false,
+ "alwaysUpdateLinks": true,
+ "newLinkFormat": "absolute",
+ "useMarkdownLinks": true,
+ "showUnsupportedFiles": true,
+ "defaultViewMode": "preview",
+ "livePreview": false
+}
\ No newline at end of file
diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json
new file mode 100644
index 0000000..1d34e00
--- /dev/null
+++ b/.obsidian/appearance.json
@@ -0,0 +1,5 @@
+{
+ "interfaceFontFamily": "Atkinson Hyperlegible",
+ "textFontFamily": "Atkinson Hyperlegible",
+ "monospaceFontFamily": "DejaVu Sans Mono"
+}
\ No newline at end of file
diff --git a/.obsidian/canvas.json b/.obsidian/canvas.json
new file mode 100644
index 0000000..bfc50b8
--- /dev/null
+++ b/.obsidian/canvas.json
@@ -0,0 +1,5 @@
+{
+ "snapToObjects": true,
+ "snapToGrid": true,
+ "defaultWheelBehavior": "zoom"
+}
\ No newline at end of file
diff --git a/.obsidian/command-palette.json b/.obsidian/command-palette.json
new file mode 100644
index 0000000..3f7a1de
--- /dev/null
+++ b/.obsidian/command-palette.json
@@ -0,0 +1,15 @@
+{
+ "pinned": [
+ "dashboard-navigator:navigator",
+ "dashboard-navigator:dashboard",
+ "smart-random-note:open-tagged-random-note",
+ "obsidian-notes-from-template:coloring page",
+ "obsidian-notes-from-template:dot to dot",
+ "obsidian-notes-from-template:drawing",
+ "obsidian-notes-from-template:zia",
+ "obsidian-notes-from-template:zentangle practice",
+ "obsidian-notes-from-template:note",
+ "obsidian-notes-from-template:tangle",
+ "obsidian-notes-from-template:idea - inspiration"
+ ]
+}
\ No newline at end of file
diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json
new file mode 100644
index 0000000..9083595
--- /dev/null
+++ b/.obsidian/community-plugins.json
@@ -0,0 +1,10 @@
+[
+ "colored-tags-wrangler",
+ "obsidian-notes-from-template",
+ "note-gallery",
+ "smart-random-note",
+ "tag-word-cloud",
+ "obsidian-sort-and-permute-lines",
+ "dashboard-navigator",
+ "automatic-table-of-contents"
+]
\ No newline at end of file
diff --git a/.obsidian/core-plugins-migration.json b/.obsidian/core-plugins-migration.json
new file mode 100644
index 0000000..f2483b2
--- /dev/null
+++ b/.obsidian/core-plugins-migration.json
@@ -0,0 +1,30 @@
+{
+ "file-explorer": true,
+ "global-search": true,
+ "switcher": false,
+ "graph": true,
+ "backlink": true,
+ "canvas": true,
+ "outgoing-link": true,
+ "tag-pane": true,
+ "properties": true,
+ "page-preview": true,
+ "daily-notes": false,
+ "templates": false,
+ "note-composer": false,
+ "command-palette": true,
+ "slash-command": false,
+ "editor-status": true,
+ "bookmarks": true,
+ "markdown-importer": false,
+ "zk-prefixer": true,
+ "random-note": false,
+ "outline": true,
+ "word-count": false,
+ "slides": false,
+ "audio-recorder": false,
+ "workspaces": false,
+ "file-recovery": true,
+ "publish": false,
+ "sync": false
+}
\ No newline at end of file
diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json
new file mode 100644
index 0000000..edc2ff5
--- /dev/null
+++ b/.obsidian/core-plugins.json
@@ -0,0 +1,17 @@
+[
+ "file-explorer",
+ "global-search",
+ "graph",
+ "backlink",
+ "canvas",
+ "outgoing-link",
+ "tag-pane",
+ "properties",
+ "page-preview",
+ "command-palette",
+ "editor-status",
+ "bookmarks",
+ "zk-prefixer",
+ "outline",
+ "file-recovery"
+]
\ No newline at end of file
diff --git a/.obsidian/graph.json b/.obsidian/graph.json
new file mode 100644
index 0000000..77961a9
--- /dev/null
+++ b/.obsidian/graph.json
@@ -0,0 +1,22 @@
+{
+ "collapse-filter": true,
+ "search": "",
+ "showTags": false,
+ "showAttachments": false,
+ "hideUnresolved": false,
+ "showOrphans": true,
+ "collapse-color-groups": true,
+ "colorGroups": [],
+ "collapse-display": true,
+ "showArrow": false,
+ "textFadeMultiplier": 0,
+ "nodeSizeMultiplier": 1,
+ "lineSizeMultiplier": 1,
+ "collapse-forces": true,
+ "centerStrength": 0.518713248970312,
+ "repelStrength": 10,
+ "linkStrength": 1,
+ "linkDistance": 250,
+ "scale": 0.13168724279835417,
+ "close": false
+}
\ No newline at end of file
diff --git a/.obsidian/plugins/automatic-table-of-contents/main.js b/.obsidian/plugins/automatic-table-of-contents/main.js
new file mode 100644
index 0000000..bbc2b0f
--- /dev/null
+++ b/.obsidian/plugins/automatic-table-of-contents/main.js
@@ -0,0 +1,291 @@
+let Plugin = class {}
+let MarkdownRenderer = {}
+let MarkdownRenderChild = class {}
+let htmlToMarkdown = (html) => html
+
+if (isObsidian()) {
+ const obsidian = require('obsidian')
+ Plugin = obsidian.Plugin
+ MarkdownRenderer = obsidian.MarkdownRenderer
+ MarkdownRenderChild = obsidian.MarkdownRenderChild
+ htmlToMarkdown = obsidian.htmlToMarkdown
+}
+
+const codeblockId = 'table-of-contents'
+const codeblockIdShort = 'toc'
+const availableOptions = {
+ title: {
+ type: 'string',
+ default: '',
+ comment: '',
+ },
+ style: {
+ type: 'value',
+ default: 'nestedList',
+ values: ['nestedList', 'nestedOrderedList', 'inlineFirstLevel'],
+ comment: 'TOC style (nestedList|nestedOrderedList|inlineFirstLevel)',
+ },
+ minLevel: {
+ type: 'number',
+ default: 0,
+ comment: 'Include headings from the specified level',
+ },
+ maxLevel: {
+ type: 'number',
+ default: 0,
+ comment: 'Include headings up to the specified level',
+ },
+ includeLinks: {
+ type: 'boolean',
+ default: true,
+ comment: 'Make headings clickable',
+ },
+ debugInConsole: {
+ type: 'boolean',
+ default: false,
+ comment: 'Print debug info in Obsidian console',
+ },
+}
+
+class ObsidianAutomaticTableOfContents extends Plugin {
+ async onload() {
+ const handler = (sourceText, element, context) => {
+ context.addChild(new Renderer(this.app, element, context.sourcePath, sourceText))
+ }
+ this.registerMarkdownCodeBlockProcessor(codeblockId, handler)
+ this.registerMarkdownCodeBlockProcessor(codeblockIdShort, handler)
+ this.addCommand({
+ id: 'insert-automatic-table-of-contents',
+ name: 'Insert table of contents',
+ editorCallback: onInsertToc,
+ })
+ this.addCommand({
+ id: 'insert-automatic-table-of-contents-docs',
+ name: 'Insert table of contents (documented)',
+ editorCallback: onInsertTocWithDocs,
+ })
+ }
+}
+
+function onInsertToc(editor) {
+ const markdown = '```' + codeblockId + '\n```'
+ editor.replaceRange(markdown, editor.getCursor())
+}
+
+function onInsertTocWithDocs(editor) {
+ let markdown = ['```' + codeblockId]
+ Object.keys(availableOptions).forEach((optionName) => {
+ const option = availableOptions[optionName]
+ const comment = option.comment.length > 0 ? ` # ${option.comment}` : ''
+ markdown.push(`${optionName}: ${option.default}${comment}`)
+ })
+ markdown.push('```')
+ editor.replaceRange(markdown.join('\n'), editor.getCursor())
+}
+
+class Renderer extends MarkdownRenderChild {
+ constructor(app, element, sourcePath, sourceText) {
+ super(element)
+ this.app = app
+ this.element = element
+ this.sourcePath = sourcePath
+ this.sourceText = sourceText
+ }
+
+ // Render on load
+ onload() {
+ this.render()
+ this.registerEvent(this.app.metadataCache.on('changed', this.onMetadataChange.bind(this)))
+ }
+
+ // Render on file change
+ onMetadataChange() {
+ this.render()
+ }
+
+ render() {
+ try {
+ const options = parseOptionsFromSourceText(this.sourceText)
+ if (options.debugInConsole) debug('Options', options)
+
+ const metadata = this.app.metadataCache.getCache(this.sourcePath)
+ const headings = metadata && metadata.headings ? metadata.headings : []
+ if (options.debugInConsole) debug('Headings', headings)
+
+ const markdown = getMarkdownFromHeadings(headings, options)
+ if (options.debugInConsole) debug('Markdown', markdown)
+
+ this.element.empty()
+ MarkdownRenderer.renderMarkdown(markdown, this.element, this.sourcePath, this)
+ } catch(error) {
+ const readableError = `_💥 Could not render table of contents (${error.message})_`
+ MarkdownRenderer.renderMarkdown(readableError, this.element, this.sourcePath, this)
+ }
+ }
+}
+
+function getMarkdownFromHeadings(headings, options) {
+ const markdownHandlersByStyle = {
+ nestedList: getMarkdownNestedListFromHeadings,
+ nestedOrderedList: getMarkdownNestedOrderedListFromHeadings,
+ inlineFirstLevel: getMarkdownInlineFirstLevelFromHeadings,
+ }
+ let markdown = ''
+ if (options.title && options.title.length > 0) {
+ markdown += options.title + '\n'
+ }
+ const noHeadingMessage = '_Table of contents: no headings found_'
+ markdown += markdownHandlersByStyle[options.style](headings, options) || noHeadingMessage
+ return markdown
+}
+
+function getMarkdownNestedListFromHeadings(headings, options) {
+ return getMarkdownListFromHeadings(headings, false, options)
+}
+
+function getMarkdownNestedOrderedListFromHeadings(headings, options) {
+ return getMarkdownListFromHeadings(headings, true, options)
+}
+
+function getMarkdownListFromHeadings(headings, isOrdered, options) {
+ const prefix = isOrdered ? '1.' : '-'
+ const lines = []
+ const minLevel = options.minLevel > 0
+ ? options.minLevel
+ : Math.min(...headings.map((heading) => heading.level))
+ headings.forEach((heading) => {
+ if (heading.level < minLevel) return
+ if (options.maxLevel > 0 && heading.level > options.maxLevel) return
+ lines.push(`${'\t'.repeat(heading.level - minLevel)}${prefix} ${getMarkdownHeading(heading, options)}`)
+ })
+ return lines.length > 0 ? lines.join('\n') : null
+}
+
+function getMarkdownInlineFirstLevelFromHeadings(headings, options) {
+ const minLevel = options.minLevel > 0
+ ? options.minLevel
+ : Math.min(...headings.map((heading) => heading.level))
+ const items = headings
+ .filter((heading) => heading.level === minLevel)
+ .map((heading) => {
+ return getMarkdownHeading(heading, options)
+ })
+ return items.length > 0 ? items.join(' | ') : null
+}
+
+function getMarkdownHeading(heading, options) {
+ const stripMarkdown = (text) => {
+ text = text.replaceAll('*', '').replaceAll('_', '').replaceAll('`', '')
+ text = text.replaceAll('==', '').replaceAll('~~', '')
+ text = text.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') // Strip markdown links
+ return text
+ }
+ const stripHtml = (text) => stripMarkdown(htmlToMarkdown(text))
+ const stripWikilinks = (text, isForLink) => {
+ // Strip [[link|text]] format
+ // For the text part of the final link we only keep "text"
+ // For the link part we need the text + link
+ // Example: "# Some [[file.md|heading]]" must be translated to "[[#Some file.md heading|Some heading]]"
+ text = text.replace(/\[\[([^\]]+)\|([^\]]+)\]\]/g, isForLink ? '$1 $2' : '$2')
+ text = text.replace(/\[\[([^\]]+)\]\]/g, '$1') // Strip [[link]] format
+ // Replace malformed links & reserved wikilinks chars
+ text = text.replaceAll('[[', '').replaceAll('| ', isForLink ? '' : '- ').replaceAll('|', isForLink ? ' ' : '-')
+ return text
+ }
+ const stripTags = (text) => text.replaceAll('#', '')
+ if (options.includeLinks) {
+ // Remove markdown, HTML & wikilinks from text for readability, as they are not rendered in a wikilink
+ let text = heading.heading
+ text = stripMarkdown(text)
+ text = stripHtml(text)
+ text = stripWikilinks(text, false)
+ // Remove wikilinks & tags from link or it won't be clickable (on the other hand HTML & markdown must stay)
+ let link = heading.heading
+ link = stripWikilinks(link, true)
+ link = stripTags(link)
+
+ // Return wiklink style link
+ return `[[#${link}|${text}]]`
+ // Why not markdown links? Because even if it looks like the text part would have a better compatibility
+ // with complex headings (as it would support HTML, markdown, etc) the link part is messy,
+ // because it requires some encoding that looks buggy and undocumented; official docs state the link must be URL encoded
+ // (https://help.obsidian.md/Linking+notes+and+files/Internal+links#Supported+formats+for+internal+links)
+ // but it doesn't work properly, example: "## Some heading with simple HTML" must be encoded as:
+ // [Some heading with simple HTML](#Some%20heading%20with%20simpler%20HTML)
+ // and not
+ // [Some heading with simple HTML](#Some%20%3Cem%3Eheading%3C%2Fem%3E%20with%20simpler%20HTML)
+ // Also it won't be clickable at all if the heading contains #tags or more complex HTML
+ // (example: ## Some heading #with-a-tag)
+ // (unless there is a way to encode these use cases that I didn't find)
+ }
+ return heading.heading
+}
+
+function parseOptionsFromSourceText(sourceText = '') {
+ const options = {}
+ Object.keys(availableOptions).forEach((option) => {
+ options[option] = availableOptions[option].default
+ })
+ sourceText.split('\n').forEach((line) => {
+ const option = parseOptionFromSourceLine(line)
+ if (option !== null) {
+ options[option.name] = option.value
+ }
+ })
+ return options
+}
+
+function parseOptionFromSourceLine(line) {
+ const matches = line.match(/([a-zA-Z0-9._ ]+):(.*)/)
+ if (line.startsWith('#') || !matches) return null
+ const possibleName = matches[1].trim()
+ const optionParams = availableOptions[possibleName]
+ let possibleValue = matches[2].trim()
+ if (!optionParams || optionParams.type !== 'string') {
+ // Strip comments from values except for strings (as a string may contain markdown)
+ possibleValue = possibleValue.replace(/#[^#]*$/, '').trim()
+ }
+ const valueError = new Error(`Invalid value for \`${possibleName}\``)
+ if (optionParams && optionParams.type === 'number') {
+ const value = parseInt(possibleValue)
+ if (value < 0) throw valueError
+ return { name: possibleName, value }
+ }
+ if (optionParams && optionParams.type === 'boolean') {
+ if (!['true', 'false'].includes(possibleValue)) throw valueError
+ return { name: possibleName, value: possibleValue === 'true' }
+ }
+ if (optionParams && optionParams.type === 'value') {
+ if (!optionParams.values.includes(possibleValue)) throw valueError
+ return { name: possibleName, value: possibleValue }
+ }
+ if (optionParams && optionParams.type === 'string') {
+ return { name: possibleName, value: possibleValue }
+ }
+ return null
+}
+
+function debug(type, data) {
+ console.log(...[
+ `%cAutomatic Table Of Contents %c${type}:\n`,
+ 'color: orange; font-weight: bold',
+ 'font-weight: bold',
+ data,
+ ])
+}
+
+function isObsidian() {
+ if (typeof process !== 'object') {
+ return true // Obsidian mobile doesn't have a global process object
+ }
+ return !process.env || !process.env.JEST_WORKER_ID // Jest runtime is not Obsidian
+}
+
+if (isObsidian()) {
+ module.exports = ObsidianAutomaticTableOfContents
+} else {
+ module.exports = {
+ parseOptionsFromSourceText,
+ getMarkdownFromHeadings,
+ }
+}
diff --git a/.obsidian/plugins/automatic-table-of-contents/manifest.json b/.obsidian/plugins/automatic-table-of-contents/manifest.json
new file mode 100644
index 0000000..535186f
--- /dev/null
+++ b/.obsidian/plugins/automatic-table-of-contents/manifest.json
@@ -0,0 +1,10 @@
+{
+ "id": "automatic-table-of-contents",
+ "name": "Automatic Table Of Contents",
+ "version": "1.4.0",
+ "minAppVersion": "1.3.0",
+ "description": "Create a table of contents in a note, that updates itself when the note changes",
+ "author": "Johan Satgé",
+ "authorUrl": "https://github.com/johansatge",
+ "isDesktopOnly": false
+}
\ No newline at end of file
diff --git a/.obsidian/plugins/colored-tags-wrangler/data.json b/.obsidian/plugins/colored-tags-wrangler/data.json
new file mode 100644
index 0000000..e42ed5d
--- /dev/null
+++ b/.obsidian/plugins/colored-tags-wrangler/data.json
@@ -0,0 +1,160 @@
+{
+ "TagColors": {
+ "ColorPicker": [
+ {
+ "tag_name": "challenge\nnature\nfoliage\nfauna\nweather\nman-made\ngeometric\nabstract\ncloth\nanatomy\nmusic\narchitecture",
+ "color": {
+ "r": 0,
+ "g": 0,
+ "b": 0
+ },
+ "background_color": {
+ "r": 0,
+ "g": 255,
+ "b": 0
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "swatch\npalette\ntangle\nnote\nquick-reference",
+ "color": {
+ "r": 0,
+ "g": 0,
+ "b": 0
+ },
+ "background_color": {
+ "r": 0,
+ "g": 255,
+ "b": 255
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "drawing\ncoloring-page\ndot-to-dot\nkemonine\npractice\nzia\nzentangle-inspired-art",
+ "color": {
+ "r": 255,
+ "g": 255,
+ "b": 255
+ },
+ "background_color": {
+ "r": 161,
+ "g": 87,
+ "b": 234
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "dislike\ndifficult",
+ "color": {
+ "r": 255,
+ "g": 255,
+ "b": 255
+ },
+ "background_color": {
+ "r": 255,
+ "g": 0,
+ "b": 0
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "variation\nhas-variation",
+ "color": {
+ "r": 0,
+ "g": 0,
+ "b": 0
+ },
+ "background_color": {
+ "r": 249,
+ "g": 249,
+ "b": 47
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "to-practice\nin-progress",
+ "color": {
+ "r": 255,
+ "g": 255,
+ "b": 255
+ },
+ "background_color": {
+ "r": 255,
+ "g": 102,
+ "b": 222
+ },
+ "luminance_offset": 0.15
+ },
+ {
+ "tag_name": "idea\ninspiration\nfavorite",
+ "color": {
+ "r": 0,
+ "g": 0,
+ "b": 0
+ },
+ "background_color": {
+ "r": 0,
+ "g": 204,
+ "b": 153
+ },
+ "luminance_offset": 0.15
+ }
+ ],
+ "EnableMultipleTags": true,
+ "EnableSeparateBackground": true,
+ "EnableBackgroundOpacity": false,
+ "Values": {
+ "BackgroundOpacity": 0.45,
+ "LuminanceOffset": 0.15
+ }
+ },
+ "CSS": {
+ "NoteTags": true,
+ "NoteProperties": true,
+ "NoteBackgrounds": false,
+ "TagsNoWrap": true,
+ "TagsNoWrapText": "pre"
+ },
+ "FolderNote": {
+ "Enable": false,
+ "FolderTagLinks": [],
+ "EnableAutoDetect": true,
+ "EnableBackgroundOpacity": false,
+ "Values": {
+ "BackgroundOpacity": 0.45,
+ "ForceImportant": true,
+ "BorderRadius": "12px",
+ "Padding": "5px"
+ }
+ },
+ "Kanban": {
+ "Enable": false,
+ "EnableCards": false,
+ "EnableLists": false,
+ "HideHashtags": false,
+ "EnableBackgroundOpacity": false,
+ "Values": {
+ "BackgroundOpacity": 0.45,
+ "CardBackgroundOpacity": 0.2,
+ "CardBorderOpacity": 0.3,
+ "ListBackgroundOpacity": 0.2,
+ "ListBorderOpacity": 0.3
+ }
+ },
+ "Canvas": {
+ "Enable": false,
+ "EnableBackgroundOpacity": false,
+ "Values": {
+ "BackgroundOpacity": 0.45,
+ "CardBorderOpacity": 0.3,
+ "CardBackgroundLuminanceOffset": 0.15
+ }
+ },
+ "Debug": {
+ "Enable": false,
+ "EnableExperimentalCommands": false
+ },
+ "Info": {
+ "SettingsVersion": 14
+ }
+}
\ No newline at end of file
diff --git a/.obsidian/plugins/colored-tags-wrangler/main.js b/.obsidian/plugins/colored-tags-wrangler/main.js
new file mode 100644
index 0000000..a6cc8f8
--- /dev/null
+++ b/.obsidian/plugins/colored-tags-wrangler/main.js
@@ -0,0 +1,8414 @@
+/*
+THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
+if you want to view the source, please visit the github repository of this plugin
+*/
+
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// node_modules/jquery/dist/jquery.js
+var require_jquery = __commonJS({
+ "node_modules/jquery/dist/jquery.js"(exports, module2) {
+ (function(global, factory) {
+ "use strict";
+ if (typeof module2 === "object" && typeof module2.exports === "object") {
+ module2.exports = global.document ? factory(global, true) : function(w) {
+ if (!w.document) {
+ throw new Error("jQuery requires a window with a document");
+ }
+ return factory(w);
+ };
+ } else {
+ factory(global);
+ }
+ })(typeof window !== "undefined" ? window : exports, function(window2, noGlobal) {
+ "use strict";
+ var arr = [];
+ var getProto = Object.getPrototypeOf;
+ var slice = arr.slice;
+ var flat = arr.flat ? function(array) {
+ return arr.flat.call(array);
+ } : function(array) {
+ return arr.concat.apply([], array);
+ };
+ var push = arr.push;
+ var indexOf = arr.indexOf;
+ var class2type = {};
+ var toString = class2type.toString;
+ var hasOwn = class2type.hasOwnProperty;
+ var fnToString = hasOwn.toString;
+ var ObjectFunctionString = fnToString.call(Object);
+ var support = {};
+ var isFunction = function isFunction2(obj) {
+ return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
+ };
+ var isWindow = function isWindow2(obj) {
+ return obj != null && obj === obj.window;
+ };
+ var document2 = window2.document;
+ var preservedScriptAttributes = {
+ type: true,
+ src: true,
+ nonce: true,
+ noModule: true
+ };
+ function DOMEval(code, node, doc) {
+ doc = doc || document2;
+ var i, val, script = doc.createElement("script");
+ script.text = code;
+ if (node) {
+ for (i in preservedScriptAttributes) {
+ val = node[i] || node.getAttribute && node.getAttribute(i);
+ if (val) {
+ script.setAttribute(i, val);
+ }
+ }
+ }
+ doc.head.appendChild(script).parentNode.removeChild(script);
+ }
+ function toType(obj) {
+ if (obj == null) {
+ return obj + "";
+ }
+ return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
+ }
+ var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) {
+ return new jQuery.fn.init(selector, context);
+ };
+ jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+ constructor: jQuery,
+ // The default length of a jQuery object is 0
+ length: 0,
+ toArray: function() {
+ return slice.call(this);
+ },
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function(num) {
+ if (num == null) {
+ return slice.call(this);
+ }
+ return num < 0 ? this[num + this.length] : this[num];
+ },
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function(elems) {
+ var ret = jQuery.merge(this.constructor(), elems);
+ ret.prevObject = this;
+ return ret;
+ },
+ // Execute a callback for every element in the matched set.
+ each: function(callback) {
+ return jQuery.each(this, callback);
+ },
+ map: function(callback) {
+ return this.pushStack(jQuery.map(this, function(elem, i) {
+ return callback.call(elem, i, elem);
+ }));
+ },
+ slice: function() {
+ return this.pushStack(slice.apply(this, arguments));
+ },
+ first: function() {
+ return this.eq(0);
+ },
+ last: function() {
+ return this.eq(-1);
+ },
+ even: function() {
+ return this.pushStack(jQuery.grep(this, function(_elem, i) {
+ return (i + 1) % 2;
+ }));
+ },
+ odd: function() {
+ return this.pushStack(jQuery.grep(this, function(_elem, i) {
+ return i % 2;
+ }));
+ },
+ eq: function(i) {
+ var len = this.length, j = +i + (i < 0 ? len : 0);
+ return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
+ },
+ end: function() {
+ return this.prevObject || this.constructor();
+ },
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push,
+ sort: arr.sort,
+ splice: arr.splice
+ };
+ jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
+ if (typeof target === "boolean") {
+ deep = target;
+ target = arguments[i] || {};
+ i++;
+ }
+ if (typeof target !== "object" && !isFunction(target)) {
+ target = {};
+ }
+ if (i === length) {
+ target = this;
+ i--;
+ }
+ for (; i < length; i++) {
+ if ((options = arguments[i]) != null) {
+ for (name in options) {
+ copy = options[name];
+ if (name === "__proto__" || target === copy) {
+ continue;
+ }
+ if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
+ src = target[name];
+ if (copyIsArray && !Array.isArray(src)) {
+ clone = [];
+ } else if (!copyIsArray && !jQuery.isPlainObject(src)) {
+ clone = {};
+ } else {
+ clone = src;
+ }
+ copyIsArray = false;
+ target[name] = jQuery.extend(deep, clone, copy);
+ } else if (copy !== void 0) {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+ return target;
+ };
+ jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+ error: function(msg) {
+ throw new Error(msg);
+ },
+ noop: function() {
+ },
+ isPlainObject: function(obj) {
+ var proto, Ctor;
+ if (!obj || toString.call(obj) !== "[object Object]") {
+ return false;
+ }
+ proto = getProto(obj);
+ if (!proto) {
+ return true;
+ }
+ Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
+ },
+ isEmptyObject: function(obj) {
+ var name;
+ for (name in obj) {
+ return false;
+ }
+ return true;
+ },
+ // Evaluates a script in a provided context; falls back to the global one
+ // if not specified.
+ globalEval: function(code, options, doc) {
+ DOMEval(code, { nonce: options && options.nonce }, doc);
+ },
+ each: function(obj, callback) {
+ var length, i = 0;
+ if (isArrayLike(obj)) {
+ length = obj.length;
+ for (; i < length; i++) {
+ if (callback.call(obj[i], i, obj[i]) === false) {
+ break;
+ }
+ }
+ } else {
+ for (i in obj) {
+ if (callback.call(obj[i], i, obj[i]) === false) {
+ break;
+ }
+ }
+ }
+ return obj;
+ },
+ // Retrieve the text value of an array of DOM nodes
+ text: function(elem) {
+ var node, ret = "", i = 0, nodeType = elem.nodeType;
+ if (!nodeType) {
+ while (node = elem[i++]) {
+ ret += jQuery.text(node);
+ }
+ }
+ if (nodeType === 1 || nodeType === 11) {
+ return elem.textContent;
+ }
+ if (nodeType === 9) {
+ return elem.documentElement.textContent;
+ }
+ if (nodeType === 3 || nodeType === 4) {
+ return elem.nodeValue;
+ }
+ return ret;
+ },
+ // results is for internal usage only
+ makeArray: function(arr2, results) {
+ var ret = results || [];
+ if (arr2 != null) {
+ if (isArrayLike(Object(arr2))) {
+ jQuery.merge(
+ ret,
+ typeof arr2 === "string" ? [arr2] : arr2
+ );
+ } else {
+ push.call(ret, arr2);
+ }
+ }
+ return ret;
+ },
+ inArray: function(elem, arr2, i) {
+ return arr2 == null ? -1 : indexOf.call(arr2, elem, i);
+ },
+ isXMLDoc: function(elem) {
+ var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
+ return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");
+ },
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
+ merge: function(first, second) {
+ var len = +second.length, j = 0, i = first.length;
+ for (; j < len; j++) {
+ first[i++] = second[j];
+ }
+ first.length = i;
+ return first;
+ },
+ grep: function(elems, callback, invert) {
+ var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert;
+ for (; i < length; i++) {
+ callbackInverse = !callback(elems[i], i);
+ if (callbackInverse !== callbackExpect) {
+ matches.push(elems[i]);
+ }
+ }
+ return matches;
+ },
+ // arg is for internal usage only
+ map: function(elems, callback, arg) {
+ var length, value, i = 0, ret = [];
+ if (isArrayLike(elems)) {
+ length = elems.length;
+ for (; i < length; i++) {
+ value = callback(elems[i], i, arg);
+ if (value != null) {
+ ret.push(value);
+ }
+ }
+ } else {
+ for (i in elems) {
+ value = callback(elems[i], i, arg);
+ if (value != null) {
+ ret.push(value);
+ }
+ }
+ }
+ return flat(ret);
+ },
+ // A global GUID counter for objects
+ guid: 1,
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support
+ });
+ if (typeof Symbol === "function") {
+ jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
+ }
+ jQuery.each(
+ "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
+ function(_i, name) {
+ class2type["[object " + name + "]"] = name.toLowerCase();
+ }
+ );
+ function isArrayLike(obj) {
+ var length = !!obj && "length" in obj && obj.length, type = toType(obj);
+ if (isFunction(obj) || isWindow(obj)) {
+ return false;
+ }
+ return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
+ }
+ function nodeName(elem, name) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ }
+ var pop = arr.pop;
+ var sort = arr.sort;
+ var splice = arr.splice;
+ var whitespace = "[\\x20\\t\\r\\n\\f]";
+ var rtrimCSS = new RegExp(
+ "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
+ "g"
+ );
+ jQuery.contains = function(a, b) {
+ var bup = b && b.parentNode;
+ return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
+ // IE doesn't have `contains` on SVG.
+ (a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
+ };
+ var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
+ function fcssescape(ch, asCodePoint) {
+ if (asCodePoint) {
+ if (ch === "\0") {
+ return "\uFFFD";
+ }
+ return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
+ }
+ return "\\" + ch;
+ }
+ jQuery.escapeSelector = function(sel) {
+ return (sel + "").replace(rcssescape, fcssescape);
+ };
+ var preferredDoc = document2, pushNative = push;
+ (function() {
+ var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) {
+ if (a === b) {
+ hasDuplicate = true;
+ }
+ return 0;
+ }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ `*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
+ ID: new RegExp("^#(" + identifier + ")"),
+ CLASS: new RegExp("^\\.(" + identifier + ")"),
+ TAG: new RegExp("^(" + identifier + "|[*])"),
+ ATTR: new RegExp("^" + attributes),
+ PSEUDO: new RegExp("^" + pseudos),
+ CHILD: new RegExp(
+ "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)",
+ "i"
+ ),
+ bool: new RegExp("^(?:" + booleans + ")$", "i"),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
+ }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) {
+ var high = "0x" + escape.slice(1) - 65536;
+ if (nonHex) {
+ return nonHex;
+ }
+ return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
+ }, unloadHandler = function() {
+ setDocument();
+ }, inDisabledFieldset = addCombinator(
+ function(elem) {
+ return elem.disabled === true && nodeName(elem, "fieldset");
+ },
+ { dir: "parentNode", next: "legend" }
+ );
+ function safeActiveElement() {
+ try {
+ return document3.activeElement;
+ } catch (err) {
+ }
+ }
+ try {
+ push2.apply(
+ arr = slice.call(preferredDoc.childNodes),
+ preferredDoc.childNodes
+ );
+ arr[preferredDoc.childNodes.length].nodeType;
+ } catch (e) {
+ push2 = {
+ apply: function(target, els) {
+ pushNative.apply(target, slice.call(els));
+ },
+ call: function(target) {
+ pushNative.apply(target, slice.call(arguments, 1));
+ }
+ };
+ }
+ function find(selector, context, results, seed) {
+ var m, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
+ results = results || [];
+ if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
+ return results;
+ }
+ if (!seed) {
+ setDocument(context);
+ context = context || document3;
+ if (documentIsHTML) {
+ if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) {
+ if (m = match[1]) {
+ if (nodeType === 9) {
+ if (elem = context.getElementById(m)) {
+ if (elem.id === m) {
+ push2.call(results, elem);
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) {
+ push2.call(results, elem);
+ return results;
+ }
+ }
+ } else if (match[2]) {
+ push2.apply(results, context.getElementsByTagName(selector));
+ return results;
+ } else if ((m = match[3]) && context.getElementsByClassName) {
+ push2.apply(results, context.getElementsByClassName(m));
+ return results;
+ }
+ }
+ if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
+ newSelector = selector;
+ newContext = context;
+ if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
+ newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
+ if (newContext != context || !support.scope) {
+ if (nid = context.getAttribute("id")) {
+ nid = jQuery.escapeSelector(nid);
+ } else {
+ context.setAttribute("id", nid = expando);
+ }
+ }
+ groups = tokenize(selector);
+ i2 = groups.length;
+ while (i2--) {
+ groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]);
+ }
+ newSelector = groups.join(",");
+ }
+ try {
+ push2.apply(
+ results,
+ newContext.querySelectorAll(newSelector)
+ );
+ return results;
+ } catch (qsaError) {
+ nonnativeSelectorCache(selector, true);
+ } finally {
+ if (nid === expando) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+ return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
+ }
+ function createCache() {
+ var keys = [];
+ function cache(key, value) {
+ if (keys.push(key + " ") > Expr.cacheLength) {
+ delete cache[keys.shift()];
+ }
+ return cache[key + " "] = value;
+ }
+ return cache;
+ }
+ function markFunction(fn) {
+ fn[expando] = true;
+ return fn;
+ }
+ function assert(fn) {
+ var el = document3.createElement("fieldset");
+ try {
+ return !!fn(el);
+ } catch (e) {
+ return false;
+ } finally {
+ if (el.parentNode) {
+ el.parentNode.removeChild(el);
+ }
+ el = null;
+ }
+ }
+ function createInputPseudo(type) {
+ return function(elem) {
+ return nodeName(elem, "input") && elem.type === type;
+ };
+ }
+ function createButtonPseudo(type) {
+ return function(elem) {
+ return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
+ };
+ }
+ function createDisabledPseudo(disabled) {
+ return function(elem) {
+ if ("form" in elem) {
+ if (elem.parentNode && elem.disabled === false) {
+ if ("label" in elem) {
+ if ("label" in elem.parentNode) {
+ return elem.parentNode.disabled === disabled;
+ } else {
+ return elem.disabled === disabled;
+ }
+ }
+ return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
+ elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
+ }
+ return elem.disabled === disabled;
+ } else if ("label" in elem) {
+ return elem.disabled === disabled;
+ }
+ return false;
+ };
+ }
+ function createPositionalPseudo(fn) {
+ return markFunction(function(argument) {
+ argument = +argument;
+ return markFunction(function(seed, matches2) {
+ var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length;
+ while (i2--) {
+ if (seed[j = matchIndexes[i2]]) {
+ seed[j] = !(matches2[j] = seed[j]);
+ }
+ }
+ });
+ });
+ }
+ function testContext(context) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+ }
+ function setDocument(node) {
+ var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
+ if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
+ return document3;
+ }
+ document3 = doc;
+ documentElement2 = document3.documentElement;
+ documentIsHTML = !jQuery.isXMLDoc(document3);
+ matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
+ if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
+ subWindow.addEventListener("unload", unloadHandler);
+ }
+ support.getById = assert(function(el) {
+ documentElement2.appendChild(el).id = jQuery.expando;
+ return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length;
+ });
+ support.disconnectedMatch = assert(function(el) {
+ return matches.call(el, "*");
+ });
+ support.scope = assert(function() {
+ return document3.querySelectorAll(":scope");
+ });
+ support.cssHas = assert(function() {
+ try {
+ document3.querySelector(":has(*,:jqfake)");
+ return false;
+ } catch (e) {
+ return true;
+ }
+ });
+ if (support.getById) {
+ Expr.filter.ID = function(id) {
+ var attrId = id.replace(runescape, funescape);
+ return function(elem) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ Expr.find.ID = function(id, context) {
+ if (typeof context.getElementById !== "undefined" && documentIsHTML) {
+ var elem = context.getElementById(id);
+ return elem ? [elem] : [];
+ }
+ };
+ } else {
+ Expr.filter.ID = function(id) {
+ var attrId = id.replace(runescape, funescape);
+ return function(elem) {
+ var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node2 && node2.value === attrId;
+ };
+ };
+ Expr.find.ID = function(id, context) {
+ if (typeof context.getElementById !== "undefined" && documentIsHTML) {
+ var node2, i2, elems, elem = context.getElementById(id);
+ if (elem) {
+ node2 = elem.getAttributeNode("id");
+ if (node2 && node2.value === id) {
+ return [elem];
+ }
+ elems = context.getElementsByName(id);
+ i2 = 0;
+ while (elem = elems[i2++]) {
+ node2 = elem.getAttributeNode("id");
+ if (node2 && node2.value === id) {
+ return [elem];
+ }
+ }
+ }
+ return [];
+ }
+ };
+ }
+ Expr.find.TAG = function(tag, context) {
+ if (typeof context.getElementsByTagName !== "undefined") {
+ return context.getElementsByTagName(tag);
+ } else {
+ return context.querySelectorAll(tag);
+ }
+ };
+ Expr.find.CLASS = function(className, context) {
+ if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
+ return context.getElementsByClassName(className);
+ }
+ };
+ rbuggyQSA = [];
+ assert(function(el) {
+ var input;
+ documentElement2.appendChild(el).innerHTML = "";
+ if (!el.querySelectorAll("[selected]").length) {
+ rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
+ }
+ if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
+ rbuggyQSA.push("~=");
+ }
+ if (!el.querySelectorAll("a#" + expando + "+*").length) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ if (!el.querySelectorAll(":checked").length) {
+ rbuggyQSA.push(":checked");
+ }
+ input = document3.createElement("input");
+ input.setAttribute("type", "hidden");
+ el.appendChild(input).setAttribute("name", "D");
+ documentElement2.appendChild(el).disabled = true;
+ if (el.querySelectorAll(":disabled").length !== 2) {
+ rbuggyQSA.push(":enabled", ":disabled");
+ }
+ input = document3.createElement("input");
+ input.setAttribute("name", "");
+ el.appendChild(input);
+ if (!el.querySelectorAll("[name='']").length) {
+ rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
+ }
+ });
+ if (!support.cssHas) {
+ rbuggyQSA.push(":has");
+ }
+ rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
+ sortOrder = function(a, b) {
+ if (a === b) {
+ hasDuplicate = true;
+ return 0;
+ }
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if (compare) {
+ return compare;
+ }
+ compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : (
+ // Otherwise we know they are disconnected
+ 1
+ );
+ if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
+ if (a === document3 || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) {
+ return -1;
+ }
+ if (b === document3 || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) {
+ return 1;
+ }
+ return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
+ }
+ return compare & 4 ? -1 : 1;
+ };
+ return document3;
+ }
+ find.matches = function(expr, elements) {
+ return find(expr, null, null, elements);
+ };
+ find.matchesSelector = function(elem, expr) {
+ setDocument(elem);
+ if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
+ try {
+ var ret = matches.call(elem, expr);
+ if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11) {
+ return ret;
+ }
+ } catch (e) {
+ nonnativeSelectorCache(expr, true);
+ }
+ }
+ return find(expr, document3, null, [elem]).length > 0;
+ };
+ find.contains = function(context, elem) {
+ if ((context.ownerDocument || context) != document3) {
+ setDocument(context);
+ }
+ return jQuery.contains(context, elem);
+ };
+ find.attr = function(elem, name) {
+ if ((elem.ownerDocument || elem) != document3) {
+ setDocument(elem);
+ }
+ var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
+ if (val !== void 0) {
+ return val;
+ }
+ return elem.getAttribute(name);
+ };
+ find.error = function(msg) {
+ throw new Error("Syntax error, unrecognized expression: " + msg);
+ };
+ jQuery.uniqueSort = function(results) {
+ var elem, duplicates = [], j = 0, i2 = 0;
+ hasDuplicate = !support.sortStable;
+ sortInput = !support.sortStable && slice.call(results, 0);
+ sort.call(results, sortOrder);
+ if (hasDuplicate) {
+ while (elem = results[i2++]) {
+ if (elem === results[i2]) {
+ j = duplicates.push(i2);
+ }
+ }
+ while (j--) {
+ splice.call(results, duplicates[j], 1);
+ }
+ }
+ sortInput = null;
+ return results;
+ };
+ jQuery.fn.uniqueSort = function() {
+ return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
+ };
+ Expr = jQuery.expr = {
+ // Can be adjusted by the user
+ cacheLength: 50,
+ createPseudo: markFunction,
+ match: matchExpr,
+ attrHandle: {},
+ find: {},
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+ preFilter: {
+ ATTR: function(match) {
+ match[1] = match[1].replace(runescape, funescape);
+ match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
+ if (match[2] === "~=") {
+ match[3] = " " + match[3] + " ";
+ }
+ return match.slice(0, 4);
+ },
+ CHILD: function(match) {
+ match[1] = match[1].toLowerCase();
+ if (match[1].slice(0, 3) === "nth") {
+ if (!match[3]) {
+ find.error(match[0]);
+ }
+ match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
+ match[5] = +(match[7] + match[8] || match[3] === "odd");
+ } else if (match[3]) {
+ find.error(match[0]);
+ }
+ return match;
+ },
+ PSEUDO: function(match) {
+ var excess, unquoted = !match[6] && match[2];
+ if (matchExpr.CHILD.test(match[0])) {
+ return null;
+ }
+ if (match[3]) {
+ match[2] = match[4] || match[5] || "";
+ } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
+ (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis
+ (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
+ match[0] = match[0].slice(0, excess);
+ match[2] = unquoted.slice(0, excess);
+ }
+ return match.slice(0, 3);
+ }
+ },
+ filter: {
+ TAG: function(nodeNameSelector) {
+ var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
+ return nodeNameSelector === "*" ? function() {
+ return true;
+ } : function(elem) {
+ return nodeName(elem, expectedNodeName);
+ };
+ },
+ CLASS: function(className) {
+ var pattern = classCache[className + " "];
+ return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
+ return pattern.test(
+ typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""
+ );
+ });
+ },
+ ATTR: function(name, operator, check) {
+ return function(elem) {
+ var result = find.attr(elem, name);
+ if (result == null) {
+ return operator === "!=";
+ }
+ if (!operator) {
+ return true;
+ }
+ result += "";
+ if (operator === "=") {
+ return result === check;
+ }
+ if (operator === "!=") {
+ return result !== check;
+ }
+ if (operator === "^=") {
+ return check && result.indexOf(check) === 0;
+ }
+ if (operator === "*=") {
+ return check && result.indexOf(check) > -1;
+ }
+ if (operator === "$=") {
+ return check && result.slice(-check.length) === check;
+ }
+ if (operator === "~=") {
+ return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
+ }
+ if (operator === "|=") {
+ return result === check || result.slice(0, check.length + 1) === check + "-";
+ }
+ return false;
+ };
+ },
+ CHILD: function(type, what, _argument, first, last) {
+ var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type";
+ return first === 1 && last === 0 ? (
+ // Shortcut for :nth-*(n)
+ function(elem) {
+ return !!elem.parentNode;
+ }
+ ) : function(elem, _context, xml) {
+ var cache, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
+ if (parent) {
+ if (simple) {
+ while (dir2) {
+ node = elem;
+ while (node = node[dir2]) {
+ if (ofType ? nodeName(node, name) : node.nodeType === 1) {
+ return false;
+ }
+ }
+ start = dir2 = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+ start = [forward ? parent.firstChild : parent.lastChild];
+ if (forward && useCache) {
+ outerCache = parent[expando] || (parent[expando] = {});
+ cache = outerCache[type] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = nodeIndex && cache[2];
+ node = nodeIndex && parent.childNodes[nodeIndex];
+ while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) {
+ if (node.nodeType === 1 && ++diff && node === elem) {
+ outerCache[type] = [dirruns, nodeIndex, diff];
+ break;
+ }
+ }
+ } else {
+ if (useCache) {
+ outerCache = elem[expando] || (elem[expando] = {});
+ cache = outerCache[type] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = nodeIndex;
+ }
+ if (diff === false) {
+ while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) {
+ if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
+ if (useCache) {
+ outerCache = node[expando] || (node[expando] = {});
+ outerCache[type] = [dirruns, diff];
+ }
+ if (node === elem) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ diff -= last;
+ return diff === first || diff % first === 0 && diff / first >= 0;
+ }
+ };
+ },
+ PSEUDO: function(pseudo, argument) {
+ var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo);
+ if (fn[expando]) {
+ return fn(argument);
+ }
+ if (fn.length > 1) {
+ args = [pseudo, pseudo, "", argument];
+ return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
+ var idx, matched = fn(seed, argument), i2 = matched.length;
+ while (i2--) {
+ idx = indexOf.call(seed, matched[i2]);
+ seed[idx] = !(matches2[idx] = matched[i2]);
+ }
+ }) : function(elem) {
+ return fn(elem, 0, args);
+ };
+ }
+ return fn;
+ }
+ },
+ pseudos: {
+ // Potentially complex pseudos
+ not: markFunction(function(selector) {
+ var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
+ return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
+ var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length;
+ while (i2--) {
+ if (elem = unmatched[i2]) {
+ seed[i2] = !(matches2[i2] = elem);
+ }
+ }
+ }) : function(elem, _context, xml) {
+ input[0] = elem;
+ matcher(input, null, xml, results);
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+ has: markFunction(function(selector) {
+ return function(elem) {
+ return find(selector, elem).length > 0;
+ };
+ }),
+ contains: markFunction(function(text) {
+ text = text.replace(runescape, funescape);
+ return function(elem) {
+ return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1;
+ };
+ }),
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // https://www.w3.org/TR/selectors/#lang-pseudo
+ lang: markFunction(function(lang) {
+ if (!ridentifier.test(lang || "")) {
+ find.error("unsupported lang: " + lang);
+ }
+ lang = lang.replace(runescape, funescape).toLowerCase();
+ return function(elem) {
+ var elemLang;
+ do {
+ if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
+ }
+ } while ((elem = elem.parentNode) && elem.nodeType === 1);
+ return false;
+ };
+ }),
+ // Miscellaneous
+ target: function(elem) {
+ var hash = window2.location && window2.location.hash;
+ return hash && hash.slice(1) === elem.id;
+ },
+ root: function(elem) {
+ return elem === documentElement2;
+ },
+ focus: function(elem) {
+ return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+ // Boolean properties
+ enabled: createDisabledPseudo(false),
+ disabled: createDisabledPseudo(true),
+ checked: function(elem) {
+ return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
+ },
+ selected: function(elem) {
+ if (elem.parentNode) {
+ elem.parentNode.selectedIndex;
+ }
+ return elem.selected === true;
+ },
+ // Contents
+ empty: function(elem) {
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
+ if (elem.nodeType < 6) {
+ return false;
+ }
+ }
+ return true;
+ },
+ parent: function(elem) {
+ return !Expr.pseudos.empty(elem);
+ },
+ // Element/input types
+ header: function(elem) {
+ return rheader.test(elem.nodeName);
+ },
+ input: function(elem) {
+ return rinputs.test(elem.nodeName);
+ },
+ button: function(elem) {
+ return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
+ },
+ text: function(elem) {
+ var attr;
+ return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
+ // New HTML5 attribute values (e.g., "search") appear
+ // with elem.type === "text"
+ ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
+ },
+ // Position-in-collection
+ first: createPositionalPseudo(function() {
+ return [0];
+ }),
+ last: createPositionalPseudo(function(_matchIndexes, length) {
+ return [length - 1];
+ }),
+ eq: createPositionalPseudo(function(_matchIndexes, length, argument) {
+ return [argument < 0 ? argument + length : argument];
+ }),
+ even: createPositionalPseudo(function(matchIndexes, length) {
+ var i2 = 0;
+ for (; i2 < length; i2 += 2) {
+ matchIndexes.push(i2);
+ }
+ return matchIndexes;
+ }),
+ odd: createPositionalPseudo(function(matchIndexes, length) {
+ var i2 = 1;
+ for (; i2 < length; i2 += 2) {
+ matchIndexes.push(i2);
+ }
+ return matchIndexes;
+ }),
+ lt: createPositionalPseudo(function(matchIndexes, length, argument) {
+ var i2;
+ if (argument < 0) {
+ i2 = argument + length;
+ } else if (argument > length) {
+ i2 = length;
+ } else {
+ i2 = argument;
+ }
+ for (; --i2 >= 0; ) {
+ matchIndexes.push(i2);
+ }
+ return matchIndexes;
+ }),
+ gt: createPositionalPseudo(function(matchIndexes, length, argument) {
+ var i2 = argument < 0 ? argument + length : argument;
+ for (; ++i2 < length; ) {
+ matchIndexes.push(i2);
+ }
+ return matchIndexes;
+ })
+ }
+ };
+ Expr.pseudos.nth = Expr.pseudos.eq;
+ for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
+ Expr.pseudos[i] = createInputPseudo(i);
+ }
+ for (i in { submit: true, reset: true }) {
+ Expr.pseudos[i] = createButtonPseudo(i);
+ }
+ function setFilters() {
+ }
+ setFilters.prototype = Expr.filters = Expr.pseudos;
+ Expr.setFilters = new setFilters();
+ function tokenize(selector, parseOnly) {
+ var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
+ if (cached) {
+ return parseOnly ? 0 : cached.slice(0);
+ }
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+ while (soFar) {
+ if (!matched || (match = rcomma.exec(soFar))) {
+ if (match) {
+ soFar = soFar.slice(match[0].length) || soFar;
+ }
+ groups.push(tokens = []);
+ }
+ matched = false;
+ if (match = rleadingCombinator.exec(soFar)) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace(rtrimCSS, " ")
+ });
+ soFar = soFar.slice(matched.length);
+ }
+ for (type in Expr.filter) {
+ if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type,
+ matches: match
+ });
+ soFar = soFar.slice(matched.length);
+ }
+ }
+ if (!matched) {
+ break;
+ }
+ }
+ if (parseOnly) {
+ return soFar.length;
+ }
+ return soFar ? find.error(selector) : (
+ // Cache the tokens
+ tokenCache(selector, groups).slice(0)
+ );
+ }
+ function toSelector(tokens) {
+ var i2 = 0, len = tokens.length, selector = "";
+ for (; i2 < len; i2++) {
+ selector += tokens[i2].value;
+ }
+ return selector;
+ }
+ function addCombinator(matcher, combinator, base) {
+ var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++;
+ return combinator.first ? (
+ // Check against closest ancestor/preceding element
+ function(elem, context, xml) {
+ while (elem = elem[dir2]) {
+ if (elem.nodeType === 1 || checkNonElements) {
+ return matcher(elem, context, xml);
+ }
+ }
+ return false;
+ }
+ ) : (
+ // Check against all ancestor/preceding elements
+ function(elem, context, xml) {
+ var oldCache, outerCache, newCache = [dirruns, doneName];
+ if (xml) {
+ while (elem = elem[dir2]) {
+ if (elem.nodeType === 1 || checkNonElements) {
+ if (matcher(elem, context, xml)) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while (elem = elem[dir2]) {
+ if (elem.nodeType === 1 || checkNonElements) {
+ outerCache = elem[expando] || (elem[expando] = {});
+ if (skip && nodeName(elem, skip)) {
+ elem = elem[dir2] || elem;
+ } else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
+ return newCache[2] = oldCache[2];
+ } else {
+ outerCache[key] = newCache;
+ if (newCache[2] = matcher(elem, context, xml)) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+ );
+ }
+ function elementMatcher(matchers) {
+ return matchers.length > 1 ? function(elem, context, xml) {
+ var i2 = matchers.length;
+ while (i2--) {
+ if (!matchers[i2](elem, context, xml)) {
+ return false;
+ }
+ }
+ return true;
+ } : matchers[0];
+ }
+ function multipleContexts(selector, contexts, results) {
+ var i2 = 0, len = contexts.length;
+ for (; i2 < len; i2++) {
+ find(selector, contexts[i2], results);
+ }
+ return results;
+ }
+ function condense(unmatched, map, filter, context, xml) {
+ var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null;
+ for (; i2 < len; i2++) {
+ if (elem = unmatched[i2]) {
+ if (!filter || filter(elem, context, xml)) {
+ newUnmatched.push(elem);
+ if (mapped) {
+ map.push(i2);
+ }
+ }
+ }
+ }
+ return newUnmatched;
+ }
+ function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
+ if (postFilter && !postFilter[expando]) {
+ postFilter = setMatcher(postFilter);
+ }
+ if (postFinder && !postFinder[expando]) {
+ postFinder = setMatcher(postFinder, postSelector);
+ }
+ return markFunction(function(seed, results, context, xml) {
+ var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
+ selector || "*",
+ context.nodeType ? [context] : context,
+ []
+ ), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
+ if (matcher) {
+ matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
+ // ...intermediate processing is necessary
+ []
+ ) : (
+ // ...otherwise use results directly
+ results
+ );
+ matcher(matcherIn, matcherOut, context, xml);
+ } else {
+ matcherOut = matcherIn;
+ }
+ if (postFilter) {
+ temp = condense(matcherOut, postMap);
+ postFilter(temp, [], context, xml);
+ i2 = temp.length;
+ while (i2--) {
+ if (elem = temp[i2]) {
+ matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem);
+ }
+ }
+ }
+ if (seed) {
+ if (postFinder || preFilter) {
+ if (postFinder) {
+ temp = [];
+ i2 = matcherOut.length;
+ while (i2--) {
+ if (elem = matcherOut[i2]) {
+ temp.push(matcherIn[i2] = elem);
+ }
+ }
+ postFinder(null, matcherOut = [], temp, xml);
+ }
+ i2 = matcherOut.length;
+ while (i2--) {
+ if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i2]) > -1) {
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+ } else {
+ matcherOut = condense(
+ matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
+ );
+ if (postFinder) {
+ postFinder(null, results, matcherOut, xml);
+ } else {
+ push2.apply(results, matcherOut);
+ }
+ }
+ });
+ }
+ function matcherFromTokens(tokens) {
+ var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
+ return elem === checkContext;
+ }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
+ return indexOf.call(checkContext, elem) > -1;
+ }, implicitRelative, true), matchers = [function(elem, context, xml) {
+ var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
+ checkContext = null;
+ return ret;
+ }];
+ for (; i2 < len; i2++) {
+ if (matcher = Expr.relative[tokens[i2].type]) {
+ matchers = [addCombinator(elementMatcher(matchers), matcher)];
+ } else {
+ matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches);
+ if (matcher[expando]) {
+ j = ++i2;
+ for (; j < len; j++) {
+ if (Expr.relative[tokens[j].type]) {
+ break;
+ }
+ }
+ return setMatcher(
+ i2 > 1 && elementMatcher(matchers),
+ i2 > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" })
+ ).replace(rtrimCSS, "$1"),
+ matcher,
+ i2 < j && matcherFromTokens(tokens.slice(i2, j)),
+ j < len && matcherFromTokens(tokens = tokens.slice(j)),
+ j < len && toSelector(tokens)
+ );
+ }
+ matchers.push(matcher);
+ }
+ }
+ return elementMatcher(matchers);
+ }
+ function matcherFromGroupMatchers(elementMatchers, setMatchers) {
+ var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) {
+ var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
+ if (outermost) {
+ outermostContext = context == document3 || context || outermost;
+ }
+ for (; i2 !== len && (elem = elems[i2]) != null; i2++) {
+ if (byElement && elem) {
+ j = 0;
+ if (!context && elem.ownerDocument != document3) {
+ setDocument(elem);
+ xml = !documentIsHTML;
+ }
+ while (matcher = elementMatchers[j++]) {
+ if (matcher(elem, context || document3, xml)) {
+ push2.call(results, elem);
+ break;
+ }
+ }
+ if (outermost) {
+ dirruns = dirrunsUnique;
+ }
+ }
+ if (bySet) {
+ if (elem = !matcher && elem) {
+ matchedCount--;
+ }
+ if (seed) {
+ unmatched.push(elem);
+ }
+ }
+ }
+ matchedCount += i2;
+ if (bySet && i2 !== matchedCount) {
+ j = 0;
+ while (matcher = setMatchers[j++]) {
+ matcher(unmatched, setMatched, context, xml);
+ }
+ if (seed) {
+ if (matchedCount > 0) {
+ while (i2--) {
+ if (!(unmatched[i2] || setMatched[i2])) {
+ setMatched[i2] = pop.call(results);
+ }
+ }
+ }
+ setMatched = condense(setMatched);
+ }
+ push2.apply(results, setMatched);
+ if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
+ jQuery.uniqueSort(results);
+ }
+ }
+ if (outermost) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+ return unmatched;
+ };
+ return bySet ? markFunction(superMatcher) : superMatcher;
+ }
+ function compile(selector, match) {
+ var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
+ if (!cached) {
+ if (!match) {
+ match = tokenize(selector);
+ }
+ i2 = match.length;
+ while (i2--) {
+ cached = matcherFromTokens(match[i2]);
+ if (cached[expando]) {
+ setMatchers.push(cached);
+ } else {
+ elementMatchers.push(cached);
+ }
+ }
+ cached = compilerCache(
+ selector,
+ matcherFromGroupMatchers(elementMatchers, setMatchers)
+ );
+ cached.selector = selector;
+ }
+ return cached;
+ }
+ function select(selector, context, results, seed) {
+ var i2, tokens, token, type, find2, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector);
+ results = results || [];
+ if (match.length === 1) {
+ tokens = match[0] = match[0].slice(0);
+ if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
+ context = (Expr.find.ID(
+ token.matches[0].replace(runescape, funescape),
+ context
+ ) || [])[0];
+ if (!context) {
+ return results;
+ } else if (compiled) {
+ context = context.parentNode;
+ }
+ selector = selector.slice(tokens.shift().value.length);
+ }
+ i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
+ while (i2--) {
+ token = tokens[i2];
+ if (Expr.relative[type = token.type]) {
+ break;
+ }
+ if (find2 = Expr.find[type]) {
+ if (seed = find2(
+ token.matches[0].replace(runescape, funescape),
+ rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
+ )) {
+ tokens.splice(i2, 1);
+ selector = seed.length && toSelector(tokens);
+ if (!selector) {
+ push2.apply(results, seed);
+ return results;
+ }
+ break;
+ }
+ }
+ }
+ }
+ (compiled || compile(selector, match))(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ !context || rsibling.test(selector) && testContext(context.parentNode) || context
+ );
+ return results;
+ }
+ support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
+ setDocument();
+ support.sortDetached = assert(function(el) {
+ return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
+ });
+ jQuery.find = find;
+ jQuery.expr[":"] = jQuery.expr.pseudos;
+ jQuery.unique = jQuery.uniqueSort;
+ find.compile = compile;
+ find.select = select;
+ find.setDocument = setDocument;
+ find.tokenize = tokenize;
+ find.escape = jQuery.escapeSelector;
+ find.getText = jQuery.text;
+ find.isXML = jQuery.isXMLDoc;
+ find.selectors = jQuery.expr;
+ find.support = jQuery.support;
+ find.uniqueSort = jQuery.uniqueSort;
+ })();
+ var dir = function(elem, dir2, until) {
+ var matched = [], truncate = until !== void 0;
+ while ((elem = elem[dir2]) && elem.nodeType !== 9) {
+ if (elem.nodeType === 1) {
+ if (truncate && jQuery(elem).is(until)) {
+ break;
+ }
+ matched.push(elem);
+ }
+ }
+ return matched;
+ };
+ var siblings = function(n, elem) {
+ var matched = [];
+ for (; n; n = n.nextSibling) {
+ if (n.nodeType === 1 && n !== elem) {
+ matched.push(n);
+ }
+ }
+ return matched;
+ };
+ var rneedsContext = jQuery.expr.match.needsContext;
+ var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
+ function winnow(elements, qualifier, not) {
+ if (isFunction(qualifier)) {
+ return jQuery.grep(elements, function(elem, i) {
+ return !!qualifier.call(elem, i, elem) !== not;
+ });
+ }
+ if (qualifier.nodeType) {
+ return jQuery.grep(elements, function(elem) {
+ return elem === qualifier !== not;
+ });
+ }
+ if (typeof qualifier !== "string") {
+ return jQuery.grep(elements, function(elem) {
+ return indexOf.call(qualifier, elem) > -1 !== not;
+ });
+ }
+ return jQuery.filter(qualifier, elements, not);
+ }
+ jQuery.filter = function(expr, elems, not) {
+ var elem = elems[0];
+ if (not) {
+ expr = ":not(" + expr + ")";
+ }
+ if (elems.length === 1 && elem.nodeType === 1) {
+ return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
+ }
+ return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) {
+ return elem2.nodeType === 1;
+ }));
+ };
+ jQuery.fn.extend({
+ find: function(selector) {
+ var i, ret, len = this.length, self = this;
+ if (typeof selector !== "string") {
+ return this.pushStack(jQuery(selector).filter(function() {
+ for (i = 0; i < len; i++) {
+ if (jQuery.contains(self[i], this)) {
+ return true;
+ }
+ }
+ }));
+ }
+ ret = this.pushStack([]);
+ for (i = 0; i < len; i++) {
+ jQuery.find(selector, self[i], ret);
+ }
+ return len > 1 ? jQuery.uniqueSort(ret) : ret;
+ },
+ filter: function(selector) {
+ return this.pushStack(winnow(this, selector || [], false));
+ },
+ not: function(selector) {
+ return this.pushStack(winnow(this, selector || [], true));
+ },
+ is: function(selector) {
+ return !!winnow(
+ this,
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [],
+ false
+ ).length;
+ }
+ });
+ var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) {
+ var match, elem;
+ if (!selector) {
+ return this;
+ }
+ root = root || rootjQuery;
+ if (typeof selector === "string") {
+ if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
+ match = [null, selector, null];
+ } else {
+ match = rquickExpr.exec(selector);
+ }
+ if (match && (match[1] || !context)) {
+ if (match[1]) {
+ context = context instanceof jQuery ? context[0] : context;
+ jQuery.merge(this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document2,
+ true
+ ));
+ if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
+ for (match in context) {
+ if (isFunction(this[match])) {
+ this[match](context[match]);
+ } else {
+ this.attr(match, context[match]);
+ }
+ }
+ }
+ return this;
+ } else {
+ elem = document2.getElementById(match[2]);
+ if (elem) {
+ this[0] = elem;
+ this.length = 1;
+ }
+ return this;
+ }
+ } else if (!context || context.jquery) {
+ return (context || root).find(selector);
+ } else {
+ return this.constructor(context).find(selector);
+ }
+ } else if (selector.nodeType) {
+ this[0] = selector;
+ this.length = 1;
+ return this;
+ } else if (isFunction(selector)) {
+ return root.ready !== void 0 ? root.ready(selector) : (
+ // Execute immediately if ready is not present
+ selector(jQuery)
+ );
+ }
+ return jQuery.makeArray(selector, this);
+ };
+ init.prototype = jQuery.fn;
+ rootjQuery = jQuery(document2);
+ var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+ jQuery.fn.extend({
+ has: function(target) {
+ var targets = jQuery(target, this), l = targets.length;
+ return this.filter(function() {
+ var i = 0;
+ for (; i < l; i++) {
+ if (jQuery.contains(this, targets[i])) {
+ return true;
+ }
+ }
+ });
+ },
+ closest: function(selectors, context) {
+ var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors);
+ if (!rneedsContext.test(selectors)) {
+ for (; i < l; i++) {
+ for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
+ if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
+ // Don't pass non-elements to jQuery#find
+ cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)
+ ))) {
+ matched.push(cur);
+ break;
+ }
+ }
+ }
+ }
+ return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
+ },
+ // Determine the position of an element within the set
+ index: function(elem) {
+ if (!elem) {
+ return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
+ }
+ if (typeof elem === "string") {
+ return indexOf.call(jQuery(elem), this[0]);
+ }
+ return indexOf.call(
+ this,
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem
+ );
+ },
+ add: function(selector, context) {
+ return this.pushStack(
+ jQuery.uniqueSort(
+ jQuery.merge(this.get(), jQuery(selector, context))
+ )
+ );
+ },
+ addBack: function(selector) {
+ return this.add(
+ selector == null ? this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+ });
+ function sibling(cur, dir2) {
+ while ((cur = cur[dir2]) && cur.nodeType !== 1) {
+ }
+ return cur;
+ }
+ jQuery.each({
+ parent: function(elem) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function(elem) {
+ return dir(elem, "parentNode");
+ },
+ parentsUntil: function(elem, _i, until) {
+ return dir(elem, "parentNode", until);
+ },
+ next: function(elem) {
+ return sibling(elem, "nextSibling");
+ },
+ prev: function(elem) {
+ return sibling(elem, "previousSibling");
+ },
+ nextAll: function(elem) {
+ return dir(elem, "nextSibling");
+ },
+ prevAll: function(elem) {
+ return dir(elem, "previousSibling");
+ },
+ nextUntil: function(elem, _i, until) {
+ return dir(elem, "nextSibling", until);
+ },
+ prevUntil: function(elem, _i, until) {
+ return dir(elem, "previousSibling", until);
+ },
+ siblings: function(elem) {
+ return siblings((elem.parentNode || {}).firstChild, elem);
+ },
+ children: function(elem) {
+ return siblings(elem.firstChild);
+ },
+ contents: function(elem) {
+ if (elem.contentDocument != null && // Support: IE 11+
+ //