Path: blob/master/web-gui/buildyourownbotnet/assets/js/codemirror/addon/hint/html-hint.js
2074 views
(function () {1var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" ");2var targets = ["_blank", "_self", "_top", "_parent"];3var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];4var methods = ["get", "post", "put", "delete"];5var encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];6var media = ["all", "screen", "print", "embossed", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "speech",7"3d-glasses", "resolution [>][<][=] [X]", "device-aspect-ratio: X/Y", "orientation:portrait",8"orientation:landscape", "device-height: [X]", "device-width: [X]"];9var s = { attrs: {} }; // Simple tag, reused for a whole lot of tags1011var data = {12a: {13attrs: {14href: null, ping: null, type: null,15media: media,16target: targets,17hreflang: langs18}19},20abbr: s,21acronym: s,22address: s,23applet: s,24area: {25attrs: {26alt: null, coords: null, href: null, target: null, ping: null,27media: media, hreflang: langs, type: null,28shape: ["default", "rect", "circle", "poly"]29}30},31article: s,32aside: s,33audio: {34attrs: {35src: null, mediagroup: null,36crossorigin: ["anonymous", "use-credentials"],37preload: ["none", "metadata", "auto"],38autoplay: ["", "autoplay"],39loop: ["", "loop"],40controls: ["", "controls"]41}42},43b: s,44base: { attrs: { href: null, target: targets } },45basefont: s,46bdi: s,47bdo: s,48big: s,49blockquote: { attrs: { cite: null } },50body: s,51br: s,52button: {53attrs: {54form: null, formaction: null, name: null, value: null,55autofocus: ["", "autofocus"],56disabled: ["", "autofocus"],57formenctype: encs,58formmethod: methods,59formnovalidate: ["", "novalidate"],60formtarget: targets,61type: ["submit", "reset", "button"]62}63},64canvas: { attrs: { width: null, height: null } },65caption: s,66center: s,67cite: s,68code: s,69col: { attrs: { span: null } },70colgroup: { attrs: { span: null } },71command: {72attrs: {73type: ["command", "checkbox", "radio"],74label: null, icon: null, radiogroup: null, command: null, title: null,75disabled: ["", "disabled"],76checked: ["", "checked"]77}78},79data: { attrs: { value: null } },80datagrid: { attrs: { disabled: ["", "disabled"], multiple: ["", "multiple"] } },81datalist: { attrs: { data: null } },82dd: s,83del: { attrs: { cite: null, datetime: null } },84details: { attrs: { open: ["", "open"] } },85dfn: s,86dir: s,87div: s,88dl: s,89dt: s,90em: s,91embed: { attrs: { src: null, type: null, width: null, height: null } },92eventsource: { attrs: { src: null } },93fieldset: { attrs: { disabled: ["", "disabled"], form: null, name: null } },94figcaption: s,95figure: s,96font: s,97footer: s,98form: {99attrs: {100action: null, name: null,101"accept-charset": charsets,102autocomplete: ["on", "off"],103enctype: encs,104method: methods,105novalidate: ["", "novalidate"],106target: targets107}108},109frame: s,110frameset: s,111h1: s, h2: s, h3: s, h4: s, h5: s, h6: s,112head: {113attrs: {},114children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]115},116header: s,117hgroup: s,118hr: s,119html: {120attrs: { manifest: null },121children: ["head", "body"]122},123i: s,124iframe: {125attrs: {126src: null, srcdoc: null, name: null, width: null, height: null,127sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],128seamless: ["", "seamless"]129}130},131img: {132attrs: {133alt: null, src: null, ismap: null, usemap: null, width: null, height: null,134crossorigin: ["anonymous", "use-credentials"]135}136},137input: {138attrs: {139alt: null, dirname: null, form: null, formaction: null,140height: null, list: null, max: null, maxlength: null, min: null,141name: null, pattern: null, placeholder: null, size: null, src: null,142step: null, value: null, width: null,143accept: ["audio/*", "video/*", "image/*"],144autocomplete: ["on", "off"],145autofocus: ["", "autofocus"],146checked: ["", "checked"],147disabled: ["", "disabled"],148formenctype: encs,149formmethod: methods,150formnovalidate: ["", "novalidate"],151formtarget: targets,152multiple: ["", "multiple"],153readonly: ["", "readonly"],154required: ["", "required"],155type: ["hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month",156"week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio",157"file", "submit", "image", "reset", "button"]158}159},160ins: { attrs: { cite: null, datetime: null } },161kbd: s,162keygen: {163attrs: {164challenge: null, form: null, name: null,165autofocus: ["", "autofocus"],166disabled: ["", "disabled"],167keytype: ["RSA"]168}169},170label: { attrs: { "for": null, form: null } },171legend: s,172li: { attrs: { value: null } },173link: {174attrs: {175href: null, type: null,176hreflang: langs,177media: media,178sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]179}180},181map: { attrs: { name: null } },182mark: s,183menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },184meta: {185attrs: {186content: null,187charset: charsets,188name: ["viewport", "application-name", "author", "description", "generator", "keywords"],189"http-equiv": ["content-language", "content-type", "default-style", "refresh"]190}191},192meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },193nav: s,194noframes: s,195noscript: s,196object: {197attrs: {198data: null, type: null, name: null, usemap: null, form: null, width: null, height: null,199typemustmatch: ["", "typemustmatch"]200}201},202ol: { attrs: { reversed: ["", "reversed"], start: null, type: ["1", "a", "A", "i", "I"] } },203optgroup: { attrs: { disabled: ["", "disabled"], label: null } },204option: { attrs: { disabled: ["", "disabled"], label: null, selected: ["", "selected"], value: null } },205output: { attrs: { "for": null, form: null, name: null } },206p: s,207param: { attrs: { name: null, value: null } },208pre: s,209progress: { attrs: { value: null, max: null } },210q: { attrs: { cite: null } },211rp: s,212rt: s,213ruby: s,214s: s,215samp: s,216script: {217attrs: {218type: ["text/javascript"],219src: null,220async: ["", "async"],221defer: ["", "defer"],222charset: charsets223}224},225section: s,226select: {227attrs: {228form: null, name: null, size: null,229autofocus: ["", "autofocus"],230disabled: ["", "disabled"],231multiple: ["", "multiple"]232}233},234small: s,235source: { attrs: { src: null, type: null, media: null } },236span: s,237strike: s,238strong: s,239style: {240attrs: {241type: ["text/css"],242media: media,243scoped: null244}245},246sub: s,247summary: s,248sup: s,249table: s,250tbody: s,251td: { attrs: { colspan: null, rowspan: null, headers: null } },252textarea: {253attrs: {254dirname: null, form: null, maxlength: null, name: null, placeholder: null,255rows: null, cols: null,256autofocus: ["", "autofocus"],257disabled: ["", "disabled"],258readonly: ["", "readonly"],259required: ["", "required"],260wrap: ["soft", "hard"]261}262},263tfoot: s,264th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },265thead: s,266time: { attrs: { datetime: null } },267title: s,268tr: s,269track: {270attrs: {271src: null, label: null, "default": null,272kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],273srclang: langs274}275},276tt: s,277u: s,278ul: s,279"var": s,280video: {281attrs: {282src: null, poster: null, width: null, height: null,283crossorigin: ["anonymous", "use-credentials"],284preload: ["auto", "metadata", "none"],285autoplay: ["", "autoplay"],286mediagroup: ["movie"],287muted: ["", "muted"],288controls: ["", "controls"]289}290},291wbr: s292};293294var globalAttrs = {295accesskey: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],296"class": null,297contenteditable: ["true", "false"],298contextmenu: null,299dir: ["ltr", "rtl", "auto"],300draggable: ["true", "false", "auto"],301dropzone: ["copy", "move", "link", "string:", "file:"],302hidden: ["hidden"],303id: null,304inert: ["inert"],305itemid: null,306itemprop: null,307itemref: null,308itemscope: ["itemscope"],309itemtype: null,310lang: ["en", "es"],311spellcheck: ["true", "false"],312style: null,313tabindex: ["1", "2", "3", "4", "5", "6", "7", "8", "9"],314title: null,315translate: ["yes", "no"],316onclick: null,317rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"]318};319function populate(obj) {320for (var attr in globalAttrs) if (globalAttrs.hasOwnProperty(attr))321obj.attrs[attr] = globalAttrs[attr];322}323324populate(s);325for (var tag in data) if (data.hasOwnProperty(tag) && data[tag] != s)326populate(data[tag]);327328CodeMirror.htmlSchema = data;329function htmlHint(cm, options) {330var local = {schemaInfo: data};331if (options) for (var opt in options) local[opt] = options[opt];332return CodeMirror.hint.xml(cm, local);333}334CodeMirror.htmlHint = htmlHint; // deprecated335CodeMirror.registerHelper("hint", "html", htmlHint);336})();337338339