UNPKG

75.3 kBJavaScriptView Raw
1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2module.exports = {
3 VERSION: '%KARMA_VERSION%',
4 KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
5 KARMA_PROXY_PATH: '%KARMA_PROXY_PATH%',
6 BROWSER_SOCKET_TIMEOUT: '%BROWSER_SOCKET_TIMEOUT%',
7 CONTEXT_URL: 'context.html'
8}
9
10},{}],2:[function(require,module,exports){
11var stringify = require('../common/stringify')
12var constant = require('./constants')
13var util = require('../common/util')
14
15function Karma (updater, socket, iframe, opener, navigator, location, document) {
16 this.updater = updater
17 var startEmitted = false
18 var karmaNavigating = false
19 var self = this
20 var queryParams = util.parseQueryParams(location.search)
21 var browserId = queryParams.id || util.generateId('manual-')
22 var displayName = queryParams.displayName
23 var returnUrl = queryParams['return_url' + ''] || null
24
25 var resultsBufferLimit = 50
26 var resultsBuffer = []
27
28 // This is a no-op if not running with a Trusted Types CSP policy, and
29 // lets tests declare that they trust the way that karma creates and handles
30 // URLs.
31 //
32 // More info about the proposed Trusted Types standard at
33 // https://github.com/WICG/trusted-types
34 var policy = {
35 createURL: function (s) {
36 return s
37 },
38 createScriptURL: function (s) {
39 return s
40 }
41 }
42 var trustedTypes = window.trustedTypes || window.TrustedTypes
43 if (trustedTypes) {
44 policy = trustedTypes.createPolicy('karma', policy)
45 if (!policy.createURL) {
46 // Install createURL for newer browsers. Only browsers that implement an
47 // old version of the spec require createURL.
48 // Should be safe to delete all reference to createURL by
49 // February 2020.
50 // https://github.com/WICG/trusted-types/pull/204
51 policy.createURL = function (s) { return s }
52 }
53 }
54
55 // To start we will signal the server that we are not reconnecting. If the socket loses
56 // connection and was able to reconnect to the Karma server we will get a
57 // second 'connect' event. There we will pass 'true' and that will be passed to the
58 // Karma server then, so that Karma can differentiate between a socket client
59 // econnect and a full browser reconnect.
60 var socketReconnect = false
61
62 this.VERSION = constant.VERSION
63 this.config = {}
64
65 // Expose for testing purposes as there is no global socket.io
66 // registry anymore.
67 this.socket = socket
68
69 // Set up postMessage bindings for current window
70 // DEV: These are to allow windows in separate processes execute local tasks
71 // Electron is one of these environments
72 if (window.addEventListener) {
73 window.addEventListener('message', function handleMessage (evt) {
74 // Resolve the origin of our message
75 var origin = evt.origin || evt.originalEvent.origin
76
77 // If the message isn't from our host, then reject it
78 if (origin !== window.location.origin) {
79 return
80 }
81
82 // Take action based on the message type
83 var method = evt.data.__karmaMethod
84 if (method) {
85 if (!self[method]) {
86 self.error('Received `postMessage` for "' + method + '" but the method doesn\'t exist')
87 return
88 }
89 self[method].apply(self, evt.data.__karmaArguments)
90 }
91 }, false)
92 }
93
94 var childWindow = null
95 function navigateContextTo (url) {
96 karmaNavigating = true
97 if (self.config.useIframe === false) {
98 // run in new window
99 if (self.config.runInParent === false) {
100 // If there is a window already open, then close it
101 // DEV: In some environments (e.g. Electron), we don't have setter access for location
102 if (childWindow !== null && childWindow.closed !== true) {
103 childWindow.close()
104 }
105 childWindow = opener(url)
106 karmaNavigating = false
107 // run context on parent element (client_with_context)
108 // using window.__karma__.scriptUrls to get the html element strings and load them dynamically
109 } else if (url !== 'about:blank') {
110 karmaNavigating = false
111 var loadScript = function (idx) {
112 if (idx < window.__karma__.scriptUrls.length) {
113 var parser = new DOMParser()
114 // Revert escaped characters with special roles in HTML before parsing
115 var string = window.__karma__.scriptUrls[idx]
116 .replace(/\\x3C/g, '<')
117 .replace(/\\x3E/g, '>')
118 var doc = parser.parseFromString(string, 'text/html')
119 var ele = doc.head.firstChild || doc.body.firstChild
120 // script elements created by DomParser are marked as unexecutable,
121 // create a new script element manually and copy necessary properties
122 // so it is executable
123 if (ele.tagName && ele.tagName.toLowerCase() === 'script') {
124 var tmp = ele
125 ele = document.createElement('script')
126 ele.src = policy.createScriptURL(tmp.src)
127 ele.crossOrigin = tmp.crossOrigin
128 }
129 ele.onload = function () {
130 loadScript(idx + 1)
131 }
132 document.body.appendChild(ele)
133 } else {
134 window.__karma__.loaded()
135 }
136 }
137 loadScript(0)
138 }
139 // run in iframe
140 } else {
141 iframe.src = policy.createURL(url)
142 karmaNavigating = false
143 }
144 }
145
146 this.onbeforeunload = function () {
147 if (!karmaNavigating) {
148 // TODO(vojta): show what test (with explanation about jasmine.UPDATE_INTERVAL)
149 self.error('Some of your tests did a full page reload!')
150 }
151 }
152
153 this.log = function (type, args) {
154 var values = []
155
156 for (var i = 0; i < args.length; i++) {
157 values.push(this.stringify(args[i], 3))
158 }
159
160 this.info({ log: values.join(', '), type: type })
161 }
162
163 this.stringify = stringify
164
165 function getLocation (url, lineno, colno) {
166 var location = ''
167
168 if (url !== undefined) {
169 location += url
170 }
171
172 if (lineno !== undefined) {
173 location += ':' + lineno
174 }
175
176 if (colno !== undefined) {
177 location += ':' + colno
178 }
179
180 return location
181 }
182
183 // error during js file loading (most likely syntax error)
184 // we are not going to execute at all. `window.onerror` callback.
185 this.error = function (messageOrEvent, source, lineno, colno, error) {
186 var message
187 if (typeof messageOrEvent === 'string') {
188 message = messageOrEvent
189
190 var location = getLocation(source, lineno, colno)
191 if (location !== '') {
192 message += '\nat ' + location
193 }
194 if (error && error.stack) {
195 message += '\n\n' + error.stack
196 }
197 } else {
198 // create an object with the string representation of the message to
199 // ensure all its content is properly transferred to the console log
200 message = { message: messageOrEvent, str: messageOrEvent.toString() }
201 }
202
203 socket.emit('karma_error', message)
204 self.updater.updateTestStatus(`karma_error ${message}`)
205 this.complete()
206 return false
207 }
208
209 this.result = function (originalResult) {
210 var convertedResult = {}
211
212 // Convert all array-like objects to real arrays.
213 for (var propertyName in originalResult) {
214 if (Object.prototype.hasOwnProperty.call(originalResult, propertyName)) {
215 var propertyValue = originalResult[propertyName]
216
217 if (Object.prototype.toString.call(propertyValue) === '[object Array]') {
218 convertedResult[propertyName] = Array.prototype.slice.call(propertyValue)
219 } else {
220 convertedResult[propertyName] = propertyValue
221 }
222 }
223 }
224
225 if (!startEmitted) {
226 socket.emit('start', { total: null })
227 self.updater.updateTestStatus('start')
228 startEmitted = true
229 }
230
231 if (resultsBufferLimit === 1) {
232 self.updater.updateTestStatus('result')
233 return socket.emit('result', convertedResult)
234 }
235
236 resultsBuffer.push(convertedResult)
237
238 if (resultsBuffer.length === resultsBufferLimit) {
239 socket.emit('result', resultsBuffer)
240 self.updater.updateTestStatus('result')
241 resultsBuffer = []
242 }
243 }
244
245 this.complete = function (result) {
246 if (resultsBuffer.length) {
247 socket.emit('result', resultsBuffer)
248 resultsBuffer = []
249 }
250
251 // A test could have incorrectly issued a navigate. Wait one turn
252 // to ensure the error from an incorrect navigate is processed.
253 setTimeout(() => {
254 if (this.config.clearContext) {
255 navigateContextTo('about:blank')
256 }
257
258 socket.emit('complete', result || {})
259 self.updater.updateTestStatus('complete')
260
261 if (returnUrl) {
262 location.href = returnUrl
263 }
264 })
265 }
266
267 this.info = function (info) {
268 // TODO(vojta): introduce special API for this
269 if (!startEmitted && util.isDefined(info.total)) {
270 socket.emit('start', info)
271 startEmitted = true
272 } else {
273 socket.emit('info', info)
274 }
275 }
276
277 socket.on('execute', function (cfg) {
278 self.updater.updateTestStatus('execute')
279 // reset startEmitted and reload the iframe
280 startEmitted = false
281 self.config = cfg
282
283 navigateContextTo(constant.CONTEXT_URL)
284
285 if (self.config.clientDisplayNone) {
286 [].forEach.call(document.querySelectorAll('#banner, #browsers'), function (el) {
287 el.style.display = 'none'
288 })
289 }
290
291 // clear the console before run
292 // works only on FF (Safari, Chrome do not allow to clear console from js source)
293 if (window.console && window.console.clear) {
294 window.console.clear()
295 }
296 })
297 socket.on('stop', function () {
298 this.complete()
299 }.bind(this))
300
301 // Report the browser name and Id. Note that this event can also fire if the connection has
302 // been temporarily lost, but the socket reconnected automatically. Read more in the docs:
303 // https://socket.io/docs/client-api/#Event-%E2%80%98connect%E2%80%99
304 socket.on('connect', function () {
305 socket.io.engine.on('upgrade', function () {
306 resultsBufferLimit = 1
307 // Flush any results which were buffered before the upgrade to WebSocket protocol.
308 if (resultsBuffer.length > 0) {
309 socket.emit('result', resultsBuffer)
310 resultsBuffer = []
311 }
312 })
313 var info = {
314 name: navigator.userAgent,
315 id: browserId,
316 isSocketReconnect: socketReconnect
317 }
318 if (displayName) {
319 info.displayName = displayName
320 }
321 socket.emit('register', info)
322 socketReconnect = true
323 })
324}
325
326module.exports = Karma
327
328},{"../common/stringify":5,"../common/util":6,"./constants":1}],3:[function(require,module,exports){
329/* global io */
330/* eslint-disable no-new */
331
332var Karma = require('./karma')
333var StatusUpdater = require('./updater')
334var util = require('../common/util')
335var constants = require('./constants')
336
337var KARMA_URL_ROOT = constants.KARMA_URL_ROOT
338var KARMA_PROXY_PATH = constants.KARMA_PROXY_PATH
339var BROWSER_SOCKET_TIMEOUT = constants.BROWSER_SOCKET_TIMEOUT
340
341// Connect to the server using socket.io http://socket.io
342var socket = io(location.host, {
343 reconnectionDelay: 500,
344 reconnectionDelayMax: Infinity,
345 timeout: BROWSER_SOCKET_TIMEOUT,
346 path: KARMA_PROXY_PATH + KARMA_URL_ROOT.substr(1) + 'socket.io',
347 'sync disconnect on unload': true
348})
349
350// instantiate the updater of the view
351var updater = new StatusUpdater(socket, util.elm('title'), util.elm('banner'), util.elm('browsers'))
352window.karma = new Karma(updater, socket, util.elm('context'), window.open,
353 window.navigator, window.location, window.document)
354
355},{"../common/util":6,"./constants":1,"./karma":2,"./updater":4}],4:[function(require,module,exports){
356var VERSION = require('./constants').VERSION
357
358function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
359 function updateBrowsersInfo (browsers) {
360 if (!browsersElement) {
361 return
362 }
363 var status
364
365 // clear browsersElement
366 while (browsersElement.firstChild) {
367 browsersElement.removeChild(browsersElement.firstChild)
368 }
369
370 for (var i = 0; i < browsers.length; i++) {
371 status = browsers[i].isConnected ? 'idle' : 'executing'
372 var li = document.createElement('li')
373 li.setAttribute('class', status)
374 li.textContent = browsers[i].name + ' is ' + status
375 browsersElement.appendChild(li)
376 }
377 }
378
379 var connectionText = 'never-connected'
380 var testText = 'loading'
381 var pingText = ''
382
383 function updateBanner () {
384 if (!titleElement || !bannerElement) {
385 return
386 }
387 titleElement.textContent = `Karma v ${VERSION} - ${connectionText}; test: ${testText}; ${pingText}`
388 bannerElement.className = connectionText === 'connected' ? 'online' : 'offline'
389 }
390
391 function updateConnectionStatus (connectionStatus) {
392 connectionText = connectionStatus || connectionText
393 updateBanner()
394 }
395 function updateTestStatus (testStatus) {
396 testText = testStatus || testText
397 updateBanner()
398 }
399 function updatePingStatus (pingStatus) {
400 pingText = pingStatus || pingText
401 updateBanner()
402 }
403
404 socket.on('connect', () => {
405 updateConnectionStatus('connected')
406 })
407 socket.on('disconnect', () => {
408 updateConnectionStatus('disconnected')
409 })
410 socket.on('reconnecting', (sec) => {
411 updateConnectionStatus(`reconnecting in ${sec} seconds`)
412 })
413 socket.on('reconnect', () => {
414 updateConnectionStatus('reconnected')
415 })
416 socket.on('reconnect_failed', () => {
417 updateConnectionStatus('reconnect_failed')
418 })
419
420 socket.on('info', updateBrowsersInfo)
421 socket.on('disconnect', () => {
422 updateBrowsersInfo([])
423 })
424
425 socket.on('ping', () => {
426 updatePingStatus('ping...')
427 })
428 socket.on('pong', (latency) => {
429 updatePingStatus(`ping ${latency}ms`)
430 })
431
432 return { updateTestStatus: updateTestStatus }
433}
434
435module.exports = StatusUpdater
436
437},{"./constants":1}],5:[function(require,module,exports){
438var serialize = null
439try {
440 serialize = require('dom-serialize')
441} catch (e) {
442 // Ignore failure on IE8
443}
444
445var instanceOf = require('./util').instanceOf
446
447function isNode (obj) {
448 return (obj.tagName || obj.nodeName) && obj.nodeType
449}
450
451function stringify (obj, depth) {
452 if (depth === 0) {
453 return '...'
454 }
455
456 if (obj === null) {
457 return 'null'
458 }
459
460 switch (typeof obj) {
461 case 'symbol':
462 return obj.toString()
463 case 'string':
464 return "'" + obj + "'"
465 case 'undefined':
466 return 'undefined'
467 case 'function':
468 try {
469 // function abc(a, b, c) { /* code goes here */ }
470 // -> function abc(a, b, c) { ... }
471 return obj.toString().replace(/\{[\s\S]*\}/, '{ ... }')
472 } catch (err) {
473 if (err instanceof TypeError) {
474 // Support older browsers
475 return 'function ' + (obj.name || '') + '() { ... }'
476 } else {
477 throw err
478 }
479 }
480 case 'boolean':
481 return obj ? 'true' : 'false'
482 case 'object':
483 var strs = []
484 if (instanceOf(obj, 'Array')) {
485 strs.push('[')
486 for (var i = 0, ii = obj.length; i < ii; i++) {
487 if (i) {
488 strs.push(', ')
489 }
490 strs.push(stringify(obj[i], depth - 1))
491 }
492 strs.push(']')
493 } else if (instanceOf(obj, 'Date')) {
494 return obj.toString()
495 } else if (instanceOf(obj, 'Text')) {
496 return obj.nodeValue
497 } else if (instanceOf(obj, 'Comment')) {
498 return '<!--' + obj.nodeValue + '-->'
499 } else if (obj.outerHTML) {
500 return obj.outerHTML
501 } else if (isNode(obj)) {
502 if (serialize) {
503 return serialize(obj)
504 } else {
505 return 'Skipping stringify, no support for dom-serialize'
506 }
507 } else if (instanceOf(obj, 'Error')) {
508 return obj.toString() + '\n' + obj.stack
509 } else {
510 var constructor = 'Object'
511 if (obj.constructor && typeof obj.constructor === 'function') {
512 constructor = obj.constructor.name
513 }
514
515 strs.push(constructor)
516 strs.push('{')
517 var first = true
518 for (var key in obj) {
519 if (Object.prototype.hasOwnProperty.call(obj, key)) {
520 if (first) {
521 first = false
522 } else {
523 strs.push(', ')
524 }
525
526 strs.push(key + ': ' + stringify(obj[key], depth - 1))
527 }
528 }
529 strs.push('}')
530 }
531 return strs.join('')
532 default:
533 return obj
534 }
535}
536
537module.exports = stringify
538
539},{"./util":6,"dom-serialize":8}],6:[function(require,module,exports){
540exports.instanceOf = function (value, constructorName) {
541 return Object.prototype.toString.apply(value) === '[object ' + constructorName + ']'
542}
543
544exports.elm = function (id) {
545 return document.getElementById(id)
546}
547
548exports.generateId = function (prefix) {
549 return prefix + Math.floor(Math.random() * 10000)
550}
551
552exports.isUndefined = function (value) {
553 return typeof value === 'undefined'
554}
555
556exports.isDefined = function (value) {
557 return !exports.isUndefined(value)
558}
559
560exports.parseQueryParams = function (locationSearch) {
561 var params = {}
562 var pairs = locationSearch.substr(1).split('&')
563 var keyValue
564
565 for (var i = 0; i < pairs.length; i++) {
566 keyValue = pairs[i].split('=')
567 params[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1])
568 }
569
570 return params
571}
572
573},{}],7:[function(require,module,exports){
574(function (global){
575
576var NativeCustomEvent = global.CustomEvent;
577
578function useNative () {
579 try {
580 var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
581 return 'cat' === p.type && 'bar' === p.detail.foo;
582 } catch (e) {
583 }
584 return false;
585}
586
587/**
588 * Cross-browser `CustomEvent` constructor.
589 *
590 * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
591 *
592 * @public
593 */
594
595module.exports = useNative() ? NativeCustomEvent :
596
597// IE >= 9
598'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
599 var e = document.createEvent('CustomEvent');
600 if (params) {
601 e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
602 } else {
603 e.initCustomEvent(type, false, false, void 0);
604 }
605 return e;
606} :
607
608// IE <= 8
609function CustomEvent (type, params) {
610 var e = document.createEventObject();
611 e.type = type;
612 if (params) {
613 e.bubbles = Boolean(params.bubbles);
614 e.cancelable = Boolean(params.cancelable);
615 e.detail = params.detail;
616 } else {
617 e.bubbles = false;
618 e.cancelable = false;
619 e.detail = void 0;
620 }
621 return e;
622}
623
624}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
625},{}],8:[function(require,module,exports){
626
627/**
628 * Module dependencies.
629 */
630
631var extend = require('extend');
632var encode = require('ent/encode');
633var CustomEvent = require('custom-event');
634var voidElements = require('void-elements');
635
636/**
637 * Module exports.
638 */
639
640exports = module.exports = serialize;
641exports.serializeElement = serializeElement;
642exports.serializeAttribute = serializeAttribute;
643exports.serializeText = serializeText;
644exports.serializeComment = serializeComment;
645exports.serializeDocument = serializeDocument;
646exports.serializeDoctype = serializeDoctype;
647exports.serializeDocumentFragment = serializeDocumentFragment;
648exports.serializeNodeList = serializeNodeList;
649
650/**
651 * Serializes any DOM node. Returns a string.
652 *
653 * @param {Node} node - DOM Node to serialize
654 * @param {String} [context] - optional arbitrary "context" string to use (useful for event listeners)
655 * @param {Function} [fn] - optional callback function to use in the "serialize" event for this call
656 * @param {EventTarget} [eventTarget] - optional EventTarget instance to emit the "serialize" event on (defaults to `node`)
657 * return {String}
658 * @public
659 */
660
661function serialize (node, context, fn, eventTarget) {
662 if (!node) return '';
663 if ('function' === typeof context) {
664 fn = context;
665 context = null;
666 }
667 if (!context) context = null;
668
669 var rtn;
670 var nodeType = node.nodeType;
671
672 if (!nodeType && 'number' === typeof node.length) {
673 // assume it's a NodeList or Array of Nodes
674 rtn = exports.serializeNodeList(node, context, fn);
675 } else {
676
677 if ('function' === typeof fn) {
678 // one-time "serialize" event listener
679 node.addEventListener('serialize', fn, false);
680 }
681
682 // emit a custom "serialize" event on `node`, in case there
683 // are event listeners for custom serialization of this node
684 var e = new CustomEvent('serialize', {
685 bubbles: true,
686 cancelable: true,
687 detail: {
688 serialize: null,
689 context: context
690 }
691 });
692
693 e.serializeTarget = node;
694
695 var target = eventTarget || node;
696 var cancelled = !target.dispatchEvent(e);
697
698 // `e.detail.serialize` can be set to a:
699 // String - returned directly
700 // Node - goes through serializer logic instead of `node`
701 // Anything else - get Stringified first, and then returned directly
702 var s = e.detail.serialize;
703 if (s != null) {
704 if ('string' === typeof s) {
705 rtn = s;
706 } else if ('number' === typeof s.nodeType) {
707 // make it go through the serialization logic
708 rtn = serialize(s, context, null, target);
709 } else {
710 rtn = String(s);
711 }
712 } else if (!cancelled) {
713 // default serialization logic
714 switch (nodeType) {
715 case 1 /* element */:
716 rtn = exports.serializeElement(node, context, eventTarget);
717 break;
718 case 2 /* attribute */:
719 rtn = exports.serializeAttribute(node);
720 break;
721 case 3 /* text */:
722 rtn = exports.serializeText(node);
723 break;
724 case 8 /* comment */:
725 rtn = exports.serializeComment(node);
726 break;
727 case 9 /* document */:
728 rtn = exports.serializeDocument(node, context, eventTarget);
729 break;
730 case 10 /* doctype */:
731 rtn = exports.serializeDoctype(node);
732 break;
733 case 11 /* document fragment */:
734 rtn = exports.serializeDocumentFragment(node, context, eventTarget);
735 break;
736 }
737 }
738
739 if ('function' === typeof fn) {
740 node.removeEventListener('serialize', fn, false);
741 }
742 }
743
744 return rtn || '';
745}
746
747/**
748 * Serialize an Attribute node.
749 */
750
751function serializeAttribute (node, opts) {
752 return node.name + '="' + encode(node.value, extend({
753 named: true
754 }, opts)) + '"';
755}
756
757/**
758 * Serialize a DOM element.
759 */
760
761function serializeElement (node, context, eventTarget) {
762 var c, i, l;
763 var name = node.nodeName.toLowerCase();
764
765 // opening tag
766 var r = '<' + name;
767
768 // attributes
769 for (i = 0, c = node.attributes, l = c.length; i < l; i++) {
770 r += ' ' + exports.serializeAttribute(c[i]);
771 }
772
773 r += '>';
774
775 // child nodes
776 r += exports.serializeNodeList(node.childNodes, context, null, eventTarget);
777
778 // closing tag, only for non-void elements
779 if (!voidElements[name]) {
780 r += '</' + name + '>';
781 }
782
783 return r;
784}
785
786/**
787 * Serialize a text node.
788 */
789
790function serializeText (node, opts) {
791 return encode(node.nodeValue, extend({
792 named: true,
793 special: { '<': true, '>': true, '&': true }
794 }, opts));
795}
796
797/**
798 * Serialize a comment node.
799 */
800
801function serializeComment (node) {
802 return '<!--' + node.nodeValue + '-->';
803}
804
805/**
806 * Serialize a Document node.
807 */
808
809function serializeDocument (node, context, eventTarget) {
810 return exports.serializeNodeList(node.childNodes, context, null, eventTarget);
811}
812
813/**
814 * Serialize a DOCTYPE node.
815 * See: http://stackoverflow.com/a/10162353
816 */
817
818function serializeDoctype (node) {
819 var r = '<!DOCTYPE ' + node.name;
820
821 if (node.publicId) {
822 r += ' PUBLIC "' + node.publicId + '"';
823 }
824
825 if (!node.publicId && node.systemId) {
826 r += ' SYSTEM';
827 }
828
829 if (node.systemId) {
830 r += ' "' + node.systemId + '"';
831 }
832
833 r += '>';
834 return r;
835}
836
837/**
838 * Serialize a DocumentFragment instance.
839 */
840
841function serializeDocumentFragment (node, context, eventTarget) {
842 return exports.serializeNodeList(node.childNodes, context, null, eventTarget);
843}
844
845/**
846 * Serialize a NodeList/Array of nodes.
847 */
848
849function serializeNodeList (list, context, fn, eventTarget) {
850 var r = '';
851 for (var i = 0, l = list.length; i < l; i++) {
852 r += serialize(list[i], context, fn, eventTarget);
853 }
854 return r;
855}
856
857},{"custom-event":7,"ent/encode":9,"extend":11,"void-elements":13}],9:[function(require,module,exports){
858var punycode = require('punycode');
859var revEntities = require('./reversed.json');
860
861module.exports = encode;
862
863function encode (str, opts) {
864 if (typeof str !== 'string') {
865 throw new TypeError('Expected a String');
866 }
867 if (!opts) opts = {};
868
869 var numeric = true;
870 if (opts.named) numeric = false;
871 if (opts.numeric !== undefined) numeric = opts.numeric;
872
873 var special = opts.special || {
874 '"': true, "'": true,
875 '<': true, '>': true,
876 '&': true
877 };
878
879 var codePoints = punycode.ucs2.decode(str);
880 var chars = [];
881 for (var i = 0; i < codePoints.length; i++) {
882 var cc = codePoints[i];
883 var c = punycode.ucs2.encode([ cc ]);
884 var e = revEntities[cc];
885 if (e && (cc >= 127 || special[c]) && !numeric) {
886 chars.push('&' + (/;$/.test(e) ? e : e + ';'));
887 }
888 else if (cc < 32 || cc >= 127 || special[c]) {
889 chars.push('&#' + cc + ';');
890 }
891 else {
892 chars.push(c);
893 }
894 }
895 return chars.join('');
896}
897
898},{"./reversed.json":10,"punycode":12}],10:[function(require,module,exports){
899module.exports={
900 "9": "Tab;",
901 "10": "NewLine;",
902 "33": "excl;",
903 "34": "quot;",
904 "35": "num;",
905 "36": "dollar;",
906 "37": "percnt;",
907 "38": "amp;",
908 "39": "apos;",
909 "40": "lpar;",
910 "41": "rpar;",
911 "42": "midast;",
912 "43": "plus;",
913 "44": "comma;",
914 "46": "period;",
915 "47": "sol;",
916 "58": "colon;",
917 "59": "semi;",
918 "60": "lt;",
919 "61": "equals;",
920 "62": "gt;",
921 "63": "quest;",
922 "64": "commat;",
923 "91": "lsqb;",
924 "92": "bsol;",
925 "93": "rsqb;",
926 "94": "Hat;",
927 "95": "UnderBar;",
928 "96": "grave;",
929 "123": "lcub;",
930 "124": "VerticalLine;",
931 "125": "rcub;",
932 "160": "NonBreakingSpace;",
933 "161": "iexcl;",
934 "162": "cent;",
935 "163": "pound;",
936 "164": "curren;",
937 "165": "yen;",
938 "166": "brvbar;",
939 "167": "sect;",
940 "168": "uml;",
941 "169": "copy;",
942 "170": "ordf;",
943 "171": "laquo;",
944 "172": "not;",
945 "173": "shy;",
946 "174": "reg;",
947 "175": "strns;",
948 "176": "deg;",
949 "177": "pm;",
950 "178": "sup2;",
951 "179": "sup3;",
952 "180": "DiacriticalAcute;",
953 "181": "micro;",
954 "182": "para;",
955 "183": "middot;",
956 "184": "Cedilla;",
957 "185": "sup1;",
958 "186": "ordm;",
959 "187": "raquo;",
960 "188": "frac14;",
961 "189": "half;",
962 "190": "frac34;",
963 "191": "iquest;",
964 "192": "Agrave;",
965 "193": "Aacute;",
966 "194": "Acirc;",
967 "195": "Atilde;",
968 "196": "Auml;",
969 "197": "Aring;",
970 "198": "AElig;",
971 "199": "Ccedil;",
972 "200": "Egrave;",
973 "201": "Eacute;",
974 "202": "Ecirc;",
975 "203": "Euml;",
976 "204": "Igrave;",
977 "205": "Iacute;",
978 "206": "Icirc;",
979 "207": "Iuml;",
980 "208": "ETH;",
981 "209": "Ntilde;",
982 "210": "Ograve;",
983 "211": "Oacute;",
984 "212": "Ocirc;",
985 "213": "Otilde;",
986 "214": "Ouml;",
987 "215": "times;",
988 "216": "Oslash;",
989 "217": "Ugrave;",
990 "218": "Uacute;",
991 "219": "Ucirc;",
992 "220": "Uuml;",
993 "221": "Yacute;",
994 "222": "THORN;",
995 "223": "szlig;",
996 "224": "agrave;",
997 "225": "aacute;",
998 "226": "acirc;",
999 "227": "atilde;",
1000 "228": "auml;",
1001 "229": "aring;",
1002 "230": "aelig;",
1003 "231": "ccedil;",
1004 "232": "egrave;",
1005 "233": "eacute;",
1006 "234": "ecirc;",
1007 "235": "euml;",
1008 "236": "igrave;",
1009 "237": "iacute;",
1010 "238": "icirc;",
1011 "239": "iuml;",
1012 "240": "eth;",
1013 "241": "ntilde;",
1014 "242": "ograve;",
1015 "243": "oacute;",
1016 "244": "ocirc;",
1017 "245": "otilde;",
1018 "246": "ouml;",
1019 "247": "divide;",
1020 "248": "oslash;",
1021 "249": "ugrave;",
1022 "250": "uacute;",
1023 "251": "ucirc;",
1024 "252": "uuml;",
1025 "253": "yacute;",
1026 "254": "thorn;",
1027 "255": "yuml;",
1028 "256": "Amacr;",
1029 "257": "amacr;",
1030 "258": "Abreve;",
1031 "259": "abreve;",
1032 "260": "Aogon;",
1033 "261": "aogon;",
1034 "262": "Cacute;",
1035 "263": "cacute;",
1036 "264": "Ccirc;",
1037 "265": "ccirc;",
1038 "266": "Cdot;",
1039 "267": "cdot;",
1040 "268": "Ccaron;",
1041 "269": "ccaron;",
1042 "270": "Dcaron;",
1043 "271": "dcaron;",
1044 "272": "Dstrok;",
1045 "273": "dstrok;",
1046 "274": "Emacr;",
1047 "275": "emacr;",
1048 "278": "Edot;",
1049 "279": "edot;",
1050 "280": "Eogon;",
1051 "281": "eogon;",
1052 "282": "Ecaron;",
1053 "283": "ecaron;",
1054 "284": "Gcirc;",
1055 "285": "gcirc;",
1056 "286": "Gbreve;",
1057 "287": "gbreve;",
1058 "288": "Gdot;",
1059 "289": "gdot;",
1060 "290": "Gcedil;",
1061 "292": "Hcirc;",
1062 "293": "hcirc;",
1063 "294": "Hstrok;",
1064 "295": "hstrok;",
1065 "296": "Itilde;",
1066 "297": "itilde;",
1067 "298": "Imacr;",
1068 "299": "imacr;",
1069 "302": "Iogon;",
1070 "303": "iogon;",
1071 "304": "Idot;",
1072 "305": "inodot;",
1073 "306": "IJlig;",
1074 "307": "ijlig;",
1075 "308": "Jcirc;",
1076 "309": "jcirc;",
1077 "310": "Kcedil;",
1078 "311": "kcedil;",
1079 "312": "kgreen;",
1080 "313": "Lacute;",
1081 "314": "lacute;",
1082 "315": "Lcedil;",
1083 "316": "lcedil;",
1084 "317": "Lcaron;",
1085 "318": "lcaron;",
1086 "319": "Lmidot;",
1087 "320": "lmidot;",
1088 "321": "Lstrok;",
1089 "322": "lstrok;",
1090 "323": "Nacute;",
1091 "324": "nacute;",
1092 "325": "Ncedil;",
1093 "326": "ncedil;",
1094 "327": "Ncaron;",
1095 "328": "ncaron;",
1096 "329": "napos;",
1097 "330": "ENG;",
1098 "331": "eng;",
1099 "332": "Omacr;",
1100 "333": "omacr;",
1101 "336": "Odblac;",
1102 "337": "odblac;",
1103 "338": "OElig;",
1104 "339": "oelig;",
1105 "340": "Racute;",
1106 "341": "racute;",
1107 "342": "Rcedil;",
1108 "343": "rcedil;",
1109 "344": "Rcaron;",
1110 "345": "rcaron;",
1111 "346": "Sacute;",
1112 "347": "sacute;",
1113 "348": "Scirc;",
1114 "349": "scirc;",
1115 "350": "Scedil;",
1116 "351": "scedil;",
1117 "352": "Scaron;",
1118 "353": "scaron;",
1119 "354": "Tcedil;",
1120 "355": "tcedil;",
1121 "356": "Tcaron;",
1122 "357": "tcaron;",
1123 "358": "Tstrok;",
1124 "359": "tstrok;",
1125 "360": "Utilde;",
1126 "361": "utilde;",
1127 "362": "Umacr;",
1128 "363": "umacr;",
1129 "364": "Ubreve;",
1130 "365": "ubreve;",
1131 "366": "Uring;",
1132 "367": "uring;",
1133 "368": "Udblac;",
1134 "369": "udblac;",
1135 "370": "Uogon;",
1136 "371": "uogon;",
1137 "372": "Wcirc;",
1138 "373": "wcirc;",
1139 "374": "Ycirc;",
1140 "375": "ycirc;",
1141 "376": "Yuml;",
1142 "377": "Zacute;",
1143 "378": "zacute;",
1144 "379": "Zdot;",
1145 "380": "zdot;",
1146 "381": "Zcaron;",
1147 "382": "zcaron;",
1148 "402": "fnof;",
1149 "437": "imped;",
1150 "501": "gacute;",
1151 "567": "jmath;",
1152 "710": "circ;",
1153 "711": "Hacek;",
1154 "728": "breve;",
1155 "729": "dot;",
1156 "730": "ring;",
1157 "731": "ogon;",
1158 "732": "tilde;",
1159 "733": "DiacriticalDoubleAcute;",
1160 "785": "DownBreve;",
1161 "913": "Alpha;",
1162 "914": "Beta;",
1163 "915": "Gamma;",
1164 "916": "Delta;",
1165 "917": "Epsilon;",
1166 "918": "Zeta;",
1167 "919": "Eta;",
1168 "920": "Theta;",
1169 "921": "Iota;",
1170 "922": "Kappa;",
1171 "923": "Lambda;",
1172 "924": "Mu;",
1173 "925": "Nu;",
1174 "926": "Xi;",
1175 "927": "Omicron;",
1176 "928": "Pi;",
1177 "929": "Rho;",
1178 "931": "Sigma;",
1179 "932": "Tau;",
1180 "933": "Upsilon;",
1181 "934": "Phi;",
1182 "935": "Chi;",
1183 "936": "Psi;",
1184 "937": "Omega;",
1185 "945": "alpha;",
1186 "946": "beta;",
1187 "947": "gamma;",
1188 "948": "delta;",
1189 "949": "epsilon;",
1190 "950": "zeta;",
1191 "951": "eta;",
1192 "952": "theta;",
1193 "953": "iota;",
1194 "954": "kappa;",
1195 "955": "lambda;",
1196 "956": "mu;",
1197 "957": "nu;",
1198 "958": "xi;",
1199 "959": "omicron;",
1200 "960": "pi;",
1201 "961": "rho;",
1202 "962": "varsigma;",
1203 "963": "sigma;",
1204 "964": "tau;",
1205 "965": "upsilon;",
1206 "966": "phi;",
1207 "967": "chi;",
1208 "968": "psi;",
1209 "969": "omega;",
1210 "977": "vartheta;",
1211 "978": "upsih;",
1212 "981": "varphi;",
1213 "982": "varpi;",
1214 "988": "Gammad;",
1215 "989": "gammad;",
1216 "1008": "varkappa;",
1217 "1009": "varrho;",
1218 "1013": "varepsilon;",
1219 "1014": "bepsi;",
1220 "1025": "IOcy;",
1221 "1026": "DJcy;",
1222 "1027": "GJcy;",
1223 "1028": "Jukcy;",
1224 "1029": "DScy;",
1225 "1030": "Iukcy;",
1226 "1031": "YIcy;",
1227 "1032": "Jsercy;",
1228 "1033": "LJcy;",
1229 "1034": "NJcy;",
1230 "1035": "TSHcy;",
1231 "1036": "KJcy;",
1232 "1038": "Ubrcy;",
1233 "1039": "DZcy;",
1234 "1040": "Acy;",
1235 "1041": "Bcy;",
1236 "1042": "Vcy;",
1237 "1043": "Gcy;",
1238 "1044": "Dcy;",
1239 "1045": "IEcy;",
1240 "1046": "ZHcy;",
1241 "1047": "Zcy;",
1242 "1048": "Icy;",
1243 "1049": "Jcy;",
1244 "1050": "Kcy;",
1245 "1051": "Lcy;",
1246 "1052": "Mcy;",
1247 "1053": "Ncy;",
1248 "1054": "Ocy;",
1249 "1055": "Pcy;",
1250 "1056": "Rcy;",
1251 "1057": "Scy;",
1252 "1058": "Tcy;",
1253 "1059": "Ucy;",
1254 "1060": "Fcy;",
1255 "1061": "KHcy;",
1256 "1062": "TScy;",
1257 "1063": "CHcy;",
1258 "1064": "SHcy;",
1259 "1065": "SHCHcy;",
1260 "1066": "HARDcy;",
1261 "1067": "Ycy;",
1262 "1068": "SOFTcy;",
1263 "1069": "Ecy;",
1264 "1070": "YUcy;",
1265 "1071": "YAcy;",
1266 "1072": "acy;",
1267 "1073": "bcy;",
1268 "1074": "vcy;",
1269 "1075": "gcy;",
1270 "1076": "dcy;",
1271 "1077": "iecy;",
1272 "1078": "zhcy;",
1273 "1079": "zcy;",
1274 "1080": "icy;",
1275 "1081": "jcy;",
1276 "1082": "kcy;",
1277 "1083": "lcy;",
1278 "1084": "mcy;",
1279 "1085": "ncy;",
1280 "1086": "ocy;",
1281 "1087": "pcy;",
1282 "1088": "rcy;",
1283 "1089": "scy;",
1284 "1090": "tcy;",
1285 "1091": "ucy;",
1286 "1092": "fcy;",
1287 "1093": "khcy;",
1288 "1094": "tscy;",
1289 "1095": "chcy;",
1290 "1096": "shcy;",
1291 "1097": "shchcy;",
1292 "1098": "hardcy;",
1293 "1099": "ycy;",
1294 "1100": "softcy;",
1295 "1101": "ecy;",
1296 "1102": "yucy;",
1297 "1103": "yacy;",
1298 "1105": "iocy;",
1299 "1106": "djcy;",
1300 "1107": "gjcy;",
1301 "1108": "jukcy;",
1302 "1109": "dscy;",
1303 "1110": "iukcy;",
1304 "1111": "yicy;",
1305 "1112": "jsercy;",
1306 "1113": "ljcy;",
1307 "1114": "njcy;",
1308 "1115": "tshcy;",
1309 "1116": "kjcy;",
1310 "1118": "ubrcy;",
1311 "1119": "dzcy;",
1312 "8194": "ensp;",
1313 "8195": "emsp;",
1314 "8196": "emsp13;",
1315 "8197": "emsp14;",
1316 "8199": "numsp;",
1317 "8200": "puncsp;",
1318 "8201": "ThinSpace;",
1319 "8202": "VeryThinSpace;",
1320 "8203": "ZeroWidthSpace;",
1321 "8204": "zwnj;",
1322 "8205": "zwj;",
1323 "8206": "lrm;",
1324 "8207": "rlm;",
1325 "8208": "hyphen;",
1326 "8211": "ndash;",
1327 "8212": "mdash;",
1328 "8213": "horbar;",
1329 "8214": "Vert;",
1330 "8216": "OpenCurlyQuote;",
1331 "8217": "rsquor;",
1332 "8218": "sbquo;",
1333 "8220": "OpenCurlyDoubleQuote;",
1334 "8221": "rdquor;",
1335 "8222": "ldquor;",
1336 "8224": "dagger;",
1337 "8225": "ddagger;",
1338 "8226": "bullet;",
1339 "8229": "nldr;",
1340 "8230": "mldr;",
1341 "8240": "permil;",
1342 "8241": "pertenk;",
1343 "8242": "prime;",
1344 "8243": "Prime;",
1345 "8244": "tprime;",
1346 "8245": "bprime;",
1347 "8249": "lsaquo;",
1348 "8250": "rsaquo;",
1349 "8254": "OverBar;",
1350 "8257": "caret;",
1351 "8259": "hybull;",
1352 "8260": "frasl;",
1353 "8271": "bsemi;",
1354 "8279": "qprime;",
1355 "8287": "MediumSpace;",
1356 "8288": "NoBreak;",
1357 "8289": "ApplyFunction;",
1358 "8290": "it;",
1359 "8291": "InvisibleComma;",
1360 "8364": "euro;",
1361 "8411": "TripleDot;",
1362 "8412": "DotDot;",
1363 "8450": "Copf;",
1364 "8453": "incare;",
1365 "8458": "gscr;",
1366 "8459": "Hscr;",
1367 "8460": "Poincareplane;",
1368 "8461": "quaternions;",
1369 "8462": "planckh;",
1370 "8463": "plankv;",
1371 "8464": "Iscr;",
1372 "8465": "imagpart;",
1373 "8466": "Lscr;",
1374 "8467": "ell;",
1375 "8469": "Nopf;",
1376 "8470": "numero;",
1377 "8471": "copysr;",
1378 "8472": "wp;",
1379 "8473": "primes;",
1380 "8474": "rationals;",
1381 "8475": "Rscr;",
1382 "8476": "Rfr;",
1383 "8477": "Ropf;",
1384 "8478": "rx;",
1385 "8482": "trade;",
1386 "8484": "Zopf;",
1387 "8487": "mho;",
1388 "8488": "Zfr;",
1389 "8489": "iiota;",
1390 "8492": "Bscr;",
1391 "8493": "Cfr;",
1392 "8495": "escr;",
1393 "8496": "expectation;",
1394 "8497": "Fscr;",
1395 "8499": "phmmat;",
1396 "8500": "oscr;",
1397 "8501": "aleph;",
1398 "8502": "beth;",
1399 "8503": "gimel;",
1400 "8504": "daleth;",
1401 "8517": "DD;",
1402 "8518": "DifferentialD;",
1403 "8519": "exponentiale;",
1404 "8520": "ImaginaryI;",
1405 "8531": "frac13;",
1406 "8532": "frac23;",
1407 "8533": "frac15;",
1408 "8534": "frac25;",
1409 "8535": "frac35;",
1410 "8536": "frac45;",
1411 "8537": "frac16;",
1412 "8538": "frac56;",
1413 "8539": "frac18;",
1414 "8540": "frac38;",
1415 "8541": "frac58;",
1416 "8542": "frac78;",
1417 "8592": "slarr;",
1418 "8593": "uparrow;",
1419 "8594": "srarr;",
1420 "8595": "ShortDownArrow;",
1421 "8596": "leftrightarrow;",
1422 "8597": "varr;",
1423 "8598": "UpperLeftArrow;",
1424 "8599": "UpperRightArrow;",
1425 "8600": "searrow;",
1426 "8601": "swarrow;",
1427 "8602": "nleftarrow;",
1428 "8603": "nrightarrow;",
1429 "8605": "rightsquigarrow;",
1430 "8606": "twoheadleftarrow;",
1431 "8607": "Uarr;",
1432 "8608": "twoheadrightarrow;",
1433 "8609": "Darr;",
1434 "8610": "leftarrowtail;",
1435 "8611": "rightarrowtail;",
1436 "8612": "mapstoleft;",
1437 "8613": "UpTeeArrow;",
1438 "8614": "RightTeeArrow;",
1439 "8615": "mapstodown;",
1440 "8617": "larrhk;",
1441 "8618": "rarrhk;",
1442 "8619": "looparrowleft;",
1443 "8620": "rarrlp;",
1444 "8621": "leftrightsquigarrow;",
1445 "8622": "nleftrightarrow;",
1446 "8624": "lsh;",
1447 "8625": "rsh;",
1448 "8626": "ldsh;",
1449 "8627": "rdsh;",
1450 "8629": "crarr;",
1451 "8630": "curvearrowleft;",
1452 "8631": "curvearrowright;",
1453 "8634": "olarr;",
1454 "8635": "orarr;",
1455 "8636": "lharu;",
1456 "8637": "lhard;",
1457 "8638": "upharpoonright;",
1458 "8639": "upharpoonleft;",
1459 "8640": "RightVector;",
1460 "8641": "rightharpoondown;",
1461 "8642": "RightDownVector;",
1462 "8643": "LeftDownVector;",
1463 "8644": "rlarr;",
1464 "8645": "UpArrowDownArrow;",
1465 "8646": "lrarr;",
1466 "8647": "llarr;",
1467 "8648": "uuarr;",
1468 "8649": "rrarr;",
1469 "8650": "downdownarrows;",
1470 "8651": "ReverseEquilibrium;",
1471 "8652": "rlhar;",
1472 "8653": "nLeftarrow;",
1473 "8654": "nLeftrightarrow;",
1474 "8655": "nRightarrow;",
1475 "8656": "Leftarrow;",
1476 "8657": "Uparrow;",
1477 "8658": "Rightarrow;",
1478 "8659": "Downarrow;",
1479 "8660": "Leftrightarrow;",
1480 "8661": "vArr;",
1481 "8662": "nwArr;",
1482 "8663": "neArr;",
1483 "8664": "seArr;",
1484 "8665": "swArr;",
1485 "8666": "Lleftarrow;",
1486 "8667": "Rrightarrow;",
1487 "8669": "zigrarr;",
1488 "8676": "LeftArrowBar;",
1489 "8677": "RightArrowBar;",
1490 "8693": "duarr;",
1491 "8701": "loarr;",
1492 "8702": "roarr;",
1493 "8703": "hoarr;",
1494 "8704": "forall;",
1495 "8705": "complement;",
1496 "8706": "PartialD;",
1497 "8707": "Exists;",
1498 "8708": "NotExists;",
1499 "8709": "varnothing;",
1500 "8711": "nabla;",
1501 "8712": "isinv;",
1502 "8713": "notinva;",
1503 "8715": "SuchThat;",
1504 "8716": "NotReverseElement;",
1505 "8719": "Product;",
1506 "8720": "Coproduct;",
1507 "8721": "sum;",
1508 "8722": "minus;",
1509 "8723": "mp;",
1510 "8724": "plusdo;",
1511 "8726": "ssetmn;",
1512 "8727": "lowast;",
1513 "8728": "SmallCircle;",
1514 "8730": "Sqrt;",
1515 "8733": "vprop;",
1516 "8734": "infin;",
1517 "8735": "angrt;",
1518 "8736": "angle;",
1519 "8737": "measuredangle;",
1520 "8738": "angsph;",
1521 "8739": "VerticalBar;",
1522 "8740": "nsmid;",
1523 "8741": "spar;",
1524 "8742": "nspar;",
1525 "8743": "wedge;",
1526 "8744": "vee;",
1527 "8745": "cap;",
1528 "8746": "cup;",
1529 "8747": "Integral;",
1530 "8748": "Int;",
1531 "8749": "tint;",
1532 "8750": "oint;",
1533 "8751": "DoubleContourIntegral;",
1534 "8752": "Cconint;",
1535 "8753": "cwint;",
1536 "8754": "cwconint;",
1537 "8755": "CounterClockwiseContourIntegral;",
1538 "8756": "therefore;",
1539 "8757": "because;",
1540 "8758": "ratio;",
1541 "8759": "Proportion;",
1542 "8760": "minusd;",
1543 "8762": "mDDot;",
1544 "8763": "homtht;",
1545 "8764": "Tilde;",
1546 "8765": "bsim;",
1547 "8766": "mstpos;",
1548 "8767": "acd;",
1549 "8768": "wreath;",
1550 "8769": "nsim;",
1551 "8770": "esim;",
1552 "8771": "TildeEqual;",
1553 "8772": "nsimeq;",
1554 "8773": "TildeFullEqual;",
1555 "8774": "simne;",
1556 "8775": "NotTildeFullEqual;",
1557 "8776": "TildeTilde;",
1558 "8777": "NotTildeTilde;",
1559 "8778": "approxeq;",
1560 "8779": "apid;",
1561 "8780": "bcong;",
1562 "8781": "CupCap;",
1563 "8782": "HumpDownHump;",
1564 "8783": "HumpEqual;",
1565 "8784": "esdot;",
1566 "8785": "eDot;",
1567 "8786": "fallingdotseq;",
1568 "8787": "risingdotseq;",
1569 "8788": "coloneq;",
1570 "8789": "eqcolon;",
1571 "8790": "eqcirc;",
1572 "8791": "cire;",
1573 "8793": "wedgeq;",
1574 "8794": "veeeq;",
1575 "8796": "trie;",
1576 "8799": "questeq;",
1577 "8800": "NotEqual;",
1578 "8801": "equiv;",
1579 "8802": "NotCongruent;",
1580 "8804": "leq;",
1581 "8805": "GreaterEqual;",
1582 "8806": "LessFullEqual;",
1583 "8807": "GreaterFullEqual;",
1584 "8808": "lneqq;",
1585 "8809": "gneqq;",
1586 "8810": "NestedLessLess;",
1587 "8811": "NestedGreaterGreater;",
1588 "8812": "twixt;",
1589 "8813": "NotCupCap;",
1590 "8814": "NotLess;",
1591 "8815": "NotGreater;",
1592 "8816": "NotLessEqual;",
1593 "8817": "NotGreaterEqual;",
1594 "8818": "lsim;",
1595 "8819": "gtrsim;",
1596 "8820": "NotLessTilde;",
1597 "8821": "NotGreaterTilde;",
1598 "8822": "lg;",
1599 "8823": "gtrless;",
1600 "8824": "ntlg;",
1601 "8825": "ntgl;",
1602 "8826": "Precedes;",
1603 "8827": "Succeeds;",
1604 "8828": "PrecedesSlantEqual;",
1605 "8829": "SucceedsSlantEqual;",
1606 "8830": "prsim;",
1607 "8831": "succsim;",
1608 "8832": "nprec;",
1609 "8833": "nsucc;",
1610 "8834": "subset;",
1611 "8835": "supset;",
1612 "8836": "nsub;",
1613 "8837": "nsup;",
1614 "8838": "SubsetEqual;",
1615 "8839": "supseteq;",
1616 "8840": "nsubseteq;",
1617 "8841": "nsupseteq;",
1618 "8842": "subsetneq;",
1619 "8843": "supsetneq;",
1620 "8845": "cupdot;",
1621 "8846": "uplus;",
1622 "8847": "SquareSubset;",
1623 "8848": "SquareSuperset;",
1624 "8849": "SquareSubsetEqual;",
1625 "8850": "SquareSupersetEqual;",
1626 "8851": "SquareIntersection;",
1627 "8852": "SquareUnion;",
1628 "8853": "oplus;",
1629 "8854": "ominus;",
1630 "8855": "otimes;",
1631 "8856": "osol;",
1632 "8857": "odot;",
1633 "8858": "ocir;",
1634 "8859": "oast;",
1635 "8861": "odash;",
1636 "8862": "plusb;",
1637 "8863": "minusb;",
1638 "8864": "timesb;",
1639 "8865": "sdotb;",
1640 "8866": "vdash;",
1641 "8867": "LeftTee;",
1642 "8868": "top;",
1643 "8869": "UpTee;",
1644 "8871": "models;",
1645 "8872": "vDash;",
1646 "8873": "Vdash;",
1647 "8874": "Vvdash;",
1648 "8875": "VDash;",
1649 "8876": "nvdash;",
1650 "8877": "nvDash;",
1651 "8878": "nVdash;",
1652 "8879": "nVDash;",
1653 "8880": "prurel;",
1654 "8882": "vltri;",
1655 "8883": "vrtri;",
1656 "8884": "trianglelefteq;",
1657 "8885": "trianglerighteq;",
1658 "8886": "origof;",
1659 "8887": "imof;",
1660 "8888": "mumap;",
1661 "8889": "hercon;",
1662 "8890": "intercal;",
1663 "8891": "veebar;",
1664 "8893": "barvee;",
1665 "8894": "angrtvb;",
1666 "8895": "lrtri;",
1667 "8896": "xwedge;",
1668 "8897": "xvee;",
1669 "8898": "xcap;",
1670 "8899": "xcup;",
1671 "8900": "diamond;",
1672 "8901": "sdot;",
1673 "8902": "Star;",
1674 "8903": "divonx;",
1675 "8904": "bowtie;",
1676 "8905": "ltimes;",
1677 "8906": "rtimes;",
1678 "8907": "lthree;",
1679 "8908": "rthree;",
1680 "8909": "bsime;",
1681 "8910": "cuvee;",
1682 "8911": "cuwed;",
1683 "8912": "Subset;",
1684 "8913": "Supset;",
1685 "8914": "Cap;",
1686 "8915": "Cup;",
1687 "8916": "pitchfork;",
1688 "8917": "epar;",
1689 "8918": "ltdot;",
1690 "8919": "gtrdot;",
1691 "8920": "Ll;",
1692 "8921": "ggg;",
1693 "8922": "LessEqualGreater;",
1694 "8923": "gtreqless;",
1695 "8926": "curlyeqprec;",
1696 "8927": "curlyeqsucc;",
1697 "8928": "nprcue;",
1698 "8929": "nsccue;",
1699 "8930": "nsqsube;",
1700 "8931": "nsqsupe;",
1701 "8934": "lnsim;",
1702 "8935": "gnsim;",
1703 "8936": "prnsim;",
1704 "8937": "succnsim;",
1705 "8938": "ntriangleleft;",
1706 "8939": "ntriangleright;",
1707 "8940": "ntrianglelefteq;",
1708 "8941": "ntrianglerighteq;",
1709 "8942": "vellip;",
1710 "8943": "ctdot;",
1711 "8944": "utdot;",
1712 "8945": "dtdot;",
1713 "8946": "disin;",
1714 "8947": "isinsv;",
1715 "8948": "isins;",
1716 "8949": "isindot;",
1717 "8950": "notinvc;",
1718 "8951": "notinvb;",
1719 "8953": "isinE;",
1720 "8954": "nisd;",
1721 "8955": "xnis;",
1722 "8956": "nis;",
1723 "8957": "notnivc;",
1724 "8958": "notnivb;",
1725 "8965": "barwedge;",
1726 "8966": "doublebarwedge;",
1727 "8968": "LeftCeiling;",
1728 "8969": "RightCeiling;",
1729 "8970": "lfloor;",
1730 "8971": "RightFloor;",
1731 "8972": "drcrop;",
1732 "8973": "dlcrop;",
1733 "8974": "urcrop;",
1734 "8975": "ulcrop;",
1735 "8976": "bnot;",
1736 "8978": "profline;",
1737 "8979": "profsurf;",
1738 "8981": "telrec;",
1739 "8982": "target;",
1740 "8988": "ulcorner;",
1741 "8989": "urcorner;",
1742 "8990": "llcorner;",
1743 "8991": "lrcorner;",
1744 "8994": "sfrown;",
1745 "8995": "ssmile;",
1746 "9005": "cylcty;",
1747 "9006": "profalar;",
1748 "9014": "topbot;",
1749 "9021": "ovbar;",
1750 "9023": "solbar;",
1751 "9084": "angzarr;",
1752 "9136": "lmoustache;",
1753 "9137": "rmoustache;",
1754 "9140": "tbrk;",
1755 "9141": "UnderBracket;",
1756 "9142": "bbrktbrk;",
1757 "9180": "OverParenthesis;",
1758 "9181": "UnderParenthesis;",
1759 "9182": "OverBrace;",
1760 "9183": "UnderBrace;",
1761 "9186": "trpezium;",
1762 "9191": "elinters;",
1763 "9251": "blank;",
1764 "9416": "oS;",
1765 "9472": "HorizontalLine;",
1766 "9474": "boxv;",
1767 "9484": "boxdr;",
1768 "9488": "boxdl;",
1769 "9492": "boxur;",
1770 "9496": "boxul;",
1771 "9500": "boxvr;",
1772 "9508": "boxvl;",
1773 "9516": "boxhd;",
1774 "9524": "boxhu;",
1775 "9532": "boxvh;",
1776 "9552": "boxH;",
1777 "9553": "boxV;",
1778 "9554": "boxdR;",
1779 "9555": "boxDr;",
1780 "9556": "boxDR;",
1781 "9557": "boxdL;",
1782 "9558": "boxDl;",
1783 "9559": "boxDL;",
1784 "9560": "boxuR;",
1785 "9561": "boxUr;",
1786 "9562": "boxUR;",
1787 "9563": "boxuL;",
1788 "9564": "boxUl;",
1789 "9565": "boxUL;",
1790 "9566": "boxvR;",
1791 "9567": "boxVr;",
1792 "9568": "boxVR;",
1793 "9569": "boxvL;",
1794 "9570": "boxVl;",
1795 "9571": "boxVL;",
1796 "9572": "boxHd;",
1797 "9573": "boxhD;",
1798 "9574": "boxHD;",
1799 "9575": "boxHu;",
1800 "9576": "boxhU;",
1801 "9577": "boxHU;",
1802 "9578": "boxvH;",
1803 "9579": "boxVh;",
1804 "9580": "boxVH;",
1805 "9600": "uhblk;",
1806 "9604": "lhblk;",
1807 "9608": "block;",
1808 "9617": "blk14;",
1809 "9618": "blk12;",
1810 "9619": "blk34;",
1811 "9633": "square;",
1812 "9642": "squf;",
1813 "9643": "EmptyVerySmallSquare;",
1814 "9645": "rect;",
1815 "9646": "marker;",
1816 "9649": "fltns;",
1817 "9651": "xutri;",
1818 "9652": "utrif;",
1819 "9653": "utri;",
1820 "9656": "rtrif;",
1821 "9657": "triangleright;",
1822 "9661": "xdtri;",
1823 "9662": "dtrif;",
1824 "9663": "triangledown;",
1825 "9666": "ltrif;",
1826 "9667": "triangleleft;",
1827 "9674": "lozenge;",
1828 "9675": "cir;",
1829 "9708": "tridot;",
1830 "9711": "xcirc;",
1831 "9720": "ultri;",
1832 "9721": "urtri;",
1833 "9722": "lltri;",
1834 "9723": "EmptySmallSquare;",
1835 "9724": "FilledSmallSquare;",
1836 "9733": "starf;",
1837 "9734": "star;",
1838 "9742": "phone;",
1839 "9792": "female;",
1840 "9794": "male;",
1841 "9824": "spadesuit;",
1842 "9827": "clubsuit;",
1843 "9829": "heartsuit;",
1844 "9830": "diams;",
1845 "9834": "sung;",
1846 "9837": "flat;",
1847 "9838": "natural;",
1848 "9839": "sharp;",
1849 "10003": "checkmark;",
1850 "10007": "cross;",
1851 "10016": "maltese;",
1852 "10038": "sext;",
1853 "10072": "VerticalSeparator;",
1854 "10098": "lbbrk;",
1855 "10099": "rbbrk;",
1856 "10184": "bsolhsub;",
1857 "10185": "suphsol;",
1858 "10214": "lobrk;",
1859 "10215": "robrk;",
1860 "10216": "LeftAngleBracket;",
1861 "10217": "RightAngleBracket;",
1862 "10218": "Lang;",
1863 "10219": "Rang;",
1864 "10220": "loang;",
1865 "10221": "roang;",
1866 "10229": "xlarr;",
1867 "10230": "xrarr;",
1868 "10231": "xharr;",
1869 "10232": "xlArr;",
1870 "10233": "xrArr;",
1871 "10234": "xhArr;",
1872 "10236": "xmap;",
1873 "10239": "dzigrarr;",
1874 "10498": "nvlArr;",
1875 "10499": "nvrArr;",
1876 "10500": "nvHarr;",
1877 "10501": "Map;",
1878 "10508": "lbarr;",
1879 "10509": "rbarr;",
1880 "10510": "lBarr;",
1881 "10511": "rBarr;",
1882 "10512": "RBarr;",
1883 "10513": "DDotrahd;",
1884 "10514": "UpArrowBar;",
1885 "10515": "DownArrowBar;",
1886 "10518": "Rarrtl;",
1887 "10521": "latail;",
1888 "10522": "ratail;",
1889 "10523": "lAtail;",
1890 "10524": "rAtail;",
1891 "10525": "larrfs;",
1892 "10526": "rarrfs;",
1893 "10527": "larrbfs;",
1894 "10528": "rarrbfs;",
1895 "10531": "nwarhk;",
1896 "10532": "nearhk;",
1897 "10533": "searhk;",
1898 "10534": "swarhk;",
1899 "10535": "nwnear;",
1900 "10536": "toea;",
1901 "10537": "tosa;",
1902 "10538": "swnwar;",
1903 "10547": "rarrc;",
1904 "10549": "cudarrr;",
1905 "10550": "ldca;",
1906 "10551": "rdca;",
1907 "10552": "cudarrl;",
1908 "10553": "larrpl;",
1909 "10556": "curarrm;",
1910 "10557": "cularrp;",
1911 "10565": "rarrpl;",
1912 "10568": "harrcir;",
1913 "10569": "Uarrocir;",
1914 "10570": "lurdshar;",
1915 "10571": "ldrushar;",
1916 "10574": "LeftRightVector;",
1917 "10575": "RightUpDownVector;",
1918 "10576": "DownLeftRightVector;",
1919 "10577": "LeftUpDownVector;",
1920 "10578": "LeftVectorBar;",
1921 "10579": "RightVectorBar;",
1922 "10580": "RightUpVectorBar;",
1923 "10581": "RightDownVectorBar;",
1924 "10582": "DownLeftVectorBar;",
1925 "10583": "DownRightVectorBar;",
1926 "10584": "LeftUpVectorBar;",
1927 "10585": "LeftDownVectorBar;",
1928 "10586": "LeftTeeVector;",
1929 "10587": "RightTeeVector;",
1930 "10588": "RightUpTeeVector;",
1931 "10589": "RightDownTeeVector;",
1932 "10590": "DownLeftTeeVector;",
1933 "10591": "DownRightTeeVector;",
1934 "10592": "LeftUpTeeVector;",
1935 "10593": "LeftDownTeeVector;",
1936 "10594": "lHar;",
1937 "10595": "uHar;",
1938 "10596": "rHar;",
1939 "10597": "dHar;",
1940 "10598": "luruhar;",
1941 "10599": "ldrdhar;",
1942 "10600": "ruluhar;",
1943 "10601": "rdldhar;",
1944 "10602": "lharul;",
1945 "10603": "llhard;",
1946 "10604": "rharul;",
1947 "10605": "lrhard;",
1948 "10606": "UpEquilibrium;",
1949 "10607": "ReverseUpEquilibrium;",
1950 "10608": "RoundImplies;",
1951 "10609": "erarr;",
1952 "10610": "simrarr;",
1953 "10611": "larrsim;",
1954 "10612": "rarrsim;",
1955 "10613": "rarrap;",
1956 "10614": "ltlarr;",
1957 "10616": "gtrarr;",
1958 "10617": "subrarr;",
1959 "10619": "suplarr;",
1960 "10620": "lfisht;",
1961 "10621": "rfisht;",
1962 "10622": "ufisht;",
1963 "10623": "dfisht;",
1964 "10629": "lopar;",
1965 "10630": "ropar;",
1966 "10635": "lbrke;",
1967 "10636": "rbrke;",
1968 "10637": "lbrkslu;",
1969 "10638": "rbrksld;",
1970 "10639": "lbrksld;",
1971 "10640": "rbrkslu;",
1972 "10641": "langd;",
1973 "10642": "rangd;",
1974 "10643": "lparlt;",
1975 "10644": "rpargt;",
1976 "10645": "gtlPar;",
1977 "10646": "ltrPar;",
1978 "10650": "vzigzag;",
1979 "10652": "vangrt;",
1980 "10653": "angrtvbd;",
1981 "10660": "ange;",
1982 "10661": "range;",
1983 "10662": "dwangle;",
1984 "10663": "uwangle;",
1985 "10664": "angmsdaa;",
1986 "10665": "angmsdab;",
1987 "10666": "angmsdac;",
1988 "10667": "angmsdad;",
1989 "10668": "angmsdae;",
1990 "10669": "angmsdaf;",
1991 "10670": "angmsdag;",
1992 "10671": "angmsdah;",
1993 "10672": "bemptyv;",
1994 "10673": "demptyv;",
1995 "10674": "cemptyv;",
1996 "10675": "raemptyv;",
1997 "10676": "laemptyv;",
1998 "10677": "ohbar;",
1999 "10678": "omid;",
2000 "10679": "opar;",
2001 "10681": "operp;",
2002 "10683": "olcross;",
2003 "10684": "odsold;",
2004 "10686": "olcir;",
2005 "10687": "ofcir;",
2006 "10688": "olt;",
2007 "10689": "ogt;",
2008 "10690": "cirscir;",
2009 "10691": "cirE;",
2010 "10692": "solb;",
2011 "10693": "bsolb;",
2012 "10697": "boxbox;",
2013 "10701": "trisb;",
2014 "10702": "rtriltri;",
2015 "10703": "LeftTriangleBar;",
2016 "10704": "RightTriangleBar;",
2017 "10716": "iinfin;",
2018 "10717": "infintie;",
2019 "10718": "nvinfin;",
2020 "10723": "eparsl;",
2021 "10724": "smeparsl;",
2022 "10725": "eqvparsl;",
2023 "10731": "lozf;",
2024 "10740": "RuleDelayed;",
2025 "10742": "dsol;",
2026 "10752": "xodot;",
2027 "10753": "xoplus;",
2028 "10754": "xotime;",
2029 "10756": "xuplus;",
2030 "10758": "xsqcup;",
2031 "10764": "qint;",
2032 "10765": "fpartint;",
2033 "10768": "cirfnint;",
2034 "10769": "awint;",
2035 "10770": "rppolint;",
2036 "10771": "scpolint;",
2037 "10772": "npolint;",
2038 "10773": "pointint;",
2039 "10774": "quatint;",
2040 "10775": "intlarhk;",
2041 "10786": "pluscir;",
2042 "10787": "plusacir;",
2043 "10788": "simplus;",
2044 "10789": "plusdu;",
2045 "10790": "plussim;",
2046 "10791": "plustwo;",
2047 "10793": "mcomma;",
2048 "10794": "minusdu;",
2049 "10797": "loplus;",
2050 "10798": "roplus;",
2051 "10799": "Cross;",
2052 "10800": "timesd;",
2053 "10801": "timesbar;",
2054 "10803": "smashp;",
2055 "10804": "lotimes;",
2056 "10805": "rotimes;",
2057 "10806": "otimesas;",
2058 "10807": "Otimes;",
2059 "10808": "odiv;",
2060 "10809": "triplus;",
2061 "10810": "triminus;",
2062 "10811": "tritime;",
2063 "10812": "iprod;",
2064 "10815": "amalg;",
2065 "10816": "capdot;",
2066 "10818": "ncup;",
2067 "10819": "ncap;",
2068 "10820": "capand;",
2069 "10821": "cupor;",
2070 "10822": "cupcap;",
2071 "10823": "capcup;",
2072 "10824": "cupbrcap;",
2073 "10825": "capbrcup;",
2074 "10826": "cupcup;",
2075 "10827": "capcap;",
2076 "10828": "ccups;",
2077 "10829": "ccaps;",
2078 "10832": "ccupssm;",
2079 "10835": "And;",
2080 "10836": "Or;",
2081 "10837": "andand;",
2082 "10838": "oror;",
2083 "10839": "orslope;",
2084 "10840": "andslope;",
2085 "10842": "andv;",
2086 "10843": "orv;",
2087 "10844": "andd;",
2088 "10845": "ord;",
2089 "10847": "wedbar;",
2090 "10854": "sdote;",
2091 "10858": "simdot;",
2092 "10861": "congdot;",
2093 "10862": "easter;",
2094 "10863": "apacir;",
2095 "10864": "apE;",
2096 "10865": "eplus;",
2097 "10866": "pluse;",
2098 "10867": "Esim;",
2099 "10868": "Colone;",
2100 "10869": "Equal;",
2101 "10871": "eDDot;",
2102 "10872": "equivDD;",
2103 "10873": "ltcir;",
2104 "10874": "gtcir;",
2105 "10875": "ltquest;",
2106 "10876": "gtquest;",
2107 "10877": "LessSlantEqual;",
2108 "10878": "GreaterSlantEqual;",
2109 "10879": "lesdot;",
2110 "10880": "gesdot;",
2111 "10881": "lesdoto;",
2112 "10882": "gesdoto;",
2113 "10883": "lesdotor;",
2114 "10884": "gesdotol;",
2115 "10885": "lessapprox;",
2116 "10886": "gtrapprox;",
2117 "10887": "lneq;",
2118 "10888": "gneq;",
2119 "10889": "lnapprox;",
2120 "10890": "gnapprox;",
2121 "10891": "lesseqqgtr;",
2122 "10892": "gtreqqless;",
2123 "10893": "lsime;",
2124 "10894": "gsime;",
2125 "10895": "lsimg;",
2126 "10896": "gsiml;",
2127 "10897": "lgE;",
2128 "10898": "glE;",
2129 "10899": "lesges;",
2130 "10900": "gesles;",
2131 "10901": "eqslantless;",
2132 "10902": "eqslantgtr;",
2133 "10903": "elsdot;",
2134 "10904": "egsdot;",
2135 "10905": "el;",
2136 "10906": "eg;",
2137 "10909": "siml;",
2138 "10910": "simg;",
2139 "10911": "simlE;",
2140 "10912": "simgE;",
2141 "10913": "LessLess;",
2142 "10914": "GreaterGreater;",
2143 "10916": "glj;",
2144 "10917": "gla;",
2145 "10918": "ltcc;",
2146 "10919": "gtcc;",
2147 "10920": "lescc;",
2148 "10921": "gescc;",
2149 "10922": "smt;",
2150 "10923": "lat;",
2151 "10924": "smte;",
2152 "10925": "late;",
2153 "10926": "bumpE;",
2154 "10927": "preceq;",
2155 "10928": "succeq;",
2156 "10931": "prE;",
2157 "10932": "scE;",
2158 "10933": "prnE;",
2159 "10934": "succneqq;",
2160 "10935": "precapprox;",
2161 "10936": "succapprox;",
2162 "10937": "prnap;",
2163 "10938": "succnapprox;",
2164 "10939": "Pr;",
2165 "10940": "Sc;",
2166 "10941": "subdot;",
2167 "10942": "supdot;",
2168 "10943": "subplus;",
2169 "10944": "supplus;",
2170 "10945": "submult;",
2171 "10946": "supmult;",
2172 "10947": "subedot;",
2173 "10948": "supedot;",
2174 "10949": "subseteqq;",
2175 "10950": "supseteqq;",
2176 "10951": "subsim;",
2177 "10952": "supsim;",
2178 "10955": "subsetneqq;",
2179 "10956": "supsetneqq;",
2180 "10959": "csub;",
2181 "10960": "csup;",
2182 "10961": "csube;",
2183 "10962": "csupe;",
2184 "10963": "subsup;",
2185 "10964": "supsub;",
2186 "10965": "subsub;",
2187 "10966": "supsup;",
2188 "10967": "suphsub;",
2189 "10968": "supdsub;",
2190 "10969": "forkv;",
2191 "10970": "topfork;",
2192 "10971": "mlcp;",
2193 "10980": "DoubleLeftTee;",
2194 "10982": "Vdashl;",
2195 "10983": "Barv;",
2196 "10984": "vBar;",
2197 "10985": "vBarv;",
2198 "10987": "Vbar;",
2199 "10988": "Not;",
2200 "10989": "bNot;",
2201 "10990": "rnmid;",
2202 "10991": "cirmid;",
2203 "10992": "midcir;",
2204 "10993": "topcir;",
2205 "10994": "nhpar;",
2206 "10995": "parsim;",
2207 "11005": "parsl;",
2208 "64256": "fflig;",
2209 "64257": "filig;",
2210 "64258": "fllig;",
2211 "64259": "ffilig;",
2212 "64260": "ffllig;"
2213}
2214},{}],11:[function(require,module,exports){
2215'use strict';
2216
2217var hasOwn = Object.prototype.hasOwnProperty;
2218var toStr = Object.prototype.toString;
2219var defineProperty = Object.defineProperty;
2220var gOPD = Object.getOwnPropertyDescriptor;
2221
2222var isArray = function isArray(arr) {
2223 if (typeof Array.isArray === 'function') {
2224 return Array.isArray(arr);
2225 }
2226
2227 return toStr.call(arr) === '[object Array]';
2228};
2229
2230var isPlainObject = function isPlainObject(obj) {
2231 if (!obj || toStr.call(obj) !== '[object Object]') {
2232 return false;
2233 }
2234
2235 var hasOwnConstructor = hasOwn.call(obj, 'constructor');
2236 var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
2237 // Not own constructor property must be Object
2238 if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
2239 return false;
2240 }
2241
2242 // Own properties are enumerated firstly, so to speed up,
2243 // if last one is own, then all properties are own.
2244 var key;
2245 for (key in obj) { /**/ }
2246
2247 return typeof key === 'undefined' || hasOwn.call(obj, key);
2248};
2249
2250// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
2251var setProperty = function setProperty(target, options) {
2252 if (defineProperty && options.name === '__proto__') {
2253 defineProperty(target, options.name, {
2254 enumerable: true,
2255 configurable: true,
2256 value: options.newValue,
2257 writable: true
2258 });
2259 } else {
2260 target[options.name] = options.newValue;
2261 }
2262};
2263
2264// Return undefined instead of __proto__ if '__proto__' is not an own property
2265var getProperty = function getProperty(obj, name) {
2266 if (name === '__proto__') {
2267 if (!hasOwn.call(obj, name)) {
2268 return void 0;
2269 } else if (gOPD) {
2270 // In early versions of node, obj['__proto__'] is buggy when obj has
2271 // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
2272 return gOPD(obj, name).value;
2273 }
2274 }
2275
2276 return obj[name];
2277};
2278
2279module.exports = function extend() {
2280 var options, name, src, copy, copyIsArray, clone;
2281 var target = arguments[0];
2282 var i = 1;
2283 var length = arguments.length;
2284 var deep = false;
2285
2286 // Handle a deep copy situation
2287 if (typeof target === 'boolean') {
2288 deep = target;
2289 target = arguments[1] || {};
2290 // skip the boolean and the target
2291 i = 2;
2292 }
2293 if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
2294 target = {};
2295 }
2296
2297 for (; i < length; ++i) {
2298 options = arguments[i];
2299 // Only deal with non-null/undefined values
2300 if (options != null) {
2301 // Extend the base object
2302 for (name in options) {
2303 src = getProperty(target, name);
2304 copy = getProperty(options, name);
2305
2306 // Prevent never-ending loop
2307 if (target !== copy) {
2308 // Recurse if we're merging plain objects or arrays
2309 if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
2310 if (copyIsArray) {
2311 copyIsArray = false;
2312 clone = src && isArray(src) ? src : [];
2313 } else {
2314 clone = src && isPlainObject(src) ? src : {};
2315 }
2316
2317 // Never move original objects, clone them
2318 setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
2319
2320 // Don't bring in undefined values
2321 } else if (typeof copy !== 'undefined') {
2322 setProperty(target, { name: name, newValue: copy });
2323 }
2324 }
2325 }
2326 }
2327 }
2328
2329 // Return the modified object
2330 return target;
2331};
2332
2333},{}],12:[function(require,module,exports){
2334(function (global){
2335/*! https://mths.be/punycode v1.4.1 by @mathias */
2336;(function(root) {
2337
2338 /** Detect free variables */
2339 var freeExports = typeof exports == 'object' && exports &&
2340 !exports.nodeType && exports;
2341 var freeModule = typeof module == 'object' && module &&
2342 !module.nodeType && module;
2343 var freeGlobal = typeof global == 'object' && global;
2344 if (
2345 freeGlobal.global === freeGlobal ||
2346 freeGlobal.window === freeGlobal ||
2347 freeGlobal.self === freeGlobal
2348 ) {
2349 root = freeGlobal;
2350 }
2351
2352 /**
2353 * The `punycode` object.
2354 * @name punycode
2355 * @type Object
2356 */
2357 var punycode,
2358
2359 /** Highest positive signed 32-bit float value */
2360 maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
2361
2362 /** Bootstring parameters */
2363 base = 36,
2364 tMin = 1,
2365 tMax = 26,
2366 skew = 38,
2367 damp = 700,
2368 initialBias = 72,
2369 initialN = 128, // 0x80
2370 delimiter = '-', // '\x2D'
2371
2372 /** Regular expressions */
2373 regexPunycode = /^xn--/,
2374 regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
2375 regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
2376
2377 /** Error messages */
2378 errors = {
2379 'overflow': 'Overflow: input needs wider integers to process',
2380 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
2381 'invalid-input': 'Invalid input'
2382 },
2383
2384 /** Convenience shortcuts */
2385 baseMinusTMin = base - tMin,
2386 floor = Math.floor,
2387 stringFromCharCode = String.fromCharCode,
2388
2389 /** Temporary variable */
2390 key;
2391
2392 /*--------------------------------------------------------------------------*/
2393
2394 /**
2395 * A generic error utility function.
2396 * @private
2397 * @param {String} type The error type.
2398 * @returns {Error} Throws a `RangeError` with the applicable error message.
2399 */
2400 function error(type) {
2401 throw new RangeError(errors[type]);
2402 }
2403
2404 /**
2405 * A generic `Array#map` utility function.
2406 * @private
2407 * @param {Array} array The array to iterate over.
2408 * @param {Function} callback The function that gets called for every array
2409 * item.
2410 * @returns {Array} A new array of values returned by the callback function.
2411 */
2412 function map(array, fn) {
2413 var length = array.length;
2414 var result = [];
2415 while (length--) {
2416 result[length] = fn(array[length]);
2417 }
2418 return result;
2419 }
2420
2421 /**
2422 * A simple `Array#map`-like wrapper to work with domain name strings or email
2423 * addresses.
2424 * @private
2425 * @param {String} domain The domain name or email address.
2426 * @param {Function} callback The function that gets called for every
2427 * character.
2428 * @returns {Array} A new string of characters returned by the callback
2429 * function.
2430 */
2431 function mapDomain(string, fn) {
2432 var parts = string.split('@');
2433 var result = '';
2434 if (parts.length > 1) {
2435 // In email addresses, only the domain name should be punycoded. Leave
2436 // the local part (i.e. everything up to `@`) intact.
2437 result = parts[0] + '@';
2438 string = parts[1];
2439 }
2440 // Avoid `split(regex)` for IE8 compatibility. See #17.
2441 string = string.replace(regexSeparators, '\x2E');
2442 var labels = string.split('.');
2443 var encoded = map(labels, fn).join('.');
2444 return result + encoded;
2445 }
2446
2447 /**
2448 * Creates an array containing the numeric code points of each Unicode
2449 * character in the string. While JavaScript uses UCS-2 internally,
2450 * this function will convert a pair of surrogate halves (each of which
2451 * UCS-2 exposes as separate characters) into a single code point,
2452 * matching UTF-16.
2453 * @see `punycode.ucs2.encode`
2454 * @see <https://mathiasbynens.be/notes/javascript-encoding>
2455 * @memberOf punycode.ucs2
2456 * @name decode
2457 * @param {String} string The Unicode input string (UCS-2).
2458 * @returns {Array} The new array of code points.
2459 */
2460 function ucs2decode(string) {
2461 var output = [],
2462 counter = 0,
2463 length = string.length,
2464 value,
2465 extra;
2466 while (counter < length) {
2467 value = string.charCodeAt(counter++);
2468 if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
2469 // high surrogate, and there is a next character
2470 extra = string.charCodeAt(counter++);
2471 if ((extra & 0xFC00) == 0xDC00) { // low surrogate
2472 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
2473 } else {
2474 // unmatched surrogate; only append this code unit, in case the next
2475 // code unit is the high surrogate of a surrogate pair
2476 output.push(value);
2477 counter--;
2478 }
2479 } else {
2480 output.push(value);
2481 }
2482 }
2483 return output;
2484 }
2485
2486 /**
2487 * Creates a string based on an array of numeric code points.
2488 * @see `punycode.ucs2.decode`
2489 * @memberOf punycode.ucs2
2490 * @name encode
2491 * @param {Array} codePoints The array of numeric code points.
2492 * @returns {String} The new Unicode string (UCS-2).
2493 */
2494 function ucs2encode(array) {
2495 return map(array, function(value) {
2496 var output = '';
2497 if (value > 0xFFFF) {
2498 value -= 0x10000;
2499 output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
2500 value = 0xDC00 | value & 0x3FF;
2501 }
2502 output += stringFromCharCode(value);
2503 return output;
2504 }).join('');
2505 }
2506
2507 /**
2508 * Converts a basic code point into a digit/integer.
2509 * @see `digitToBasic()`
2510 * @private
2511 * @param {Number} codePoint The basic numeric code point value.
2512 * @returns {Number} The numeric value of a basic code point (for use in
2513 * representing integers) in the range `0` to `base - 1`, or `base` if
2514 * the code point does not represent a value.
2515 */
2516 function basicToDigit(codePoint) {
2517 if (codePoint - 48 < 10) {
2518 return codePoint - 22;
2519 }
2520 if (codePoint - 65 < 26) {
2521 return codePoint - 65;
2522 }
2523 if (codePoint - 97 < 26) {
2524 return codePoint - 97;
2525 }
2526 return base;
2527 }
2528
2529 /**
2530 * Converts a digit/integer into a basic code point.
2531 * @see `basicToDigit()`
2532 * @private
2533 * @param {Number} digit The numeric value of a basic code point.
2534 * @returns {Number} The basic code point whose value (when used for
2535 * representing integers) is `digit`, which needs to be in the range
2536 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
2537 * used; else, the lowercase form is used. The behavior is undefined
2538 * if `flag` is non-zero and `digit` has no uppercase form.
2539 */
2540 function digitToBasic(digit, flag) {
2541 // 0..25 map to ASCII a..z or A..Z
2542 // 26..35 map to ASCII 0..9
2543 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
2544 }
2545
2546 /**
2547 * Bias adaptation function as per section 3.4 of RFC 3492.
2548 * https://tools.ietf.org/html/rfc3492#section-3.4
2549 * @private
2550 */
2551 function adapt(delta, numPoints, firstTime) {
2552 var k = 0;
2553 delta = firstTime ? floor(delta / damp) : delta >> 1;
2554 delta += floor(delta / numPoints);
2555 for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
2556 delta = floor(delta / baseMinusTMin);
2557 }
2558 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
2559 }
2560
2561 /**
2562 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
2563 * symbols.
2564 * @memberOf punycode
2565 * @param {String} input The Punycode string of ASCII-only symbols.
2566 * @returns {String} The resulting string of Unicode symbols.
2567 */
2568 function decode(input) {
2569 // Don't use UCS-2
2570 var output = [],
2571 inputLength = input.length,
2572 out,
2573 i = 0,
2574 n = initialN,
2575 bias = initialBias,
2576 basic,
2577 j,
2578 index,
2579 oldi,
2580 w,
2581 k,
2582 digit,
2583 t,
2584 /** Cached calculation results */
2585 baseMinusT;
2586
2587 // Handle the basic code points: let `basic` be the number of input code
2588 // points before the last delimiter, or `0` if there is none, then copy
2589 // the first basic code points to the output.
2590
2591 basic = input.lastIndexOf(delimiter);
2592 if (basic < 0) {
2593 basic = 0;
2594 }
2595
2596 for (j = 0; j < basic; ++j) {
2597 // if it's not a basic code point
2598 if (input.charCodeAt(j) >= 0x80) {
2599 error('not-basic');
2600 }
2601 output.push(input.charCodeAt(j));
2602 }
2603
2604 // Main decoding loop: start just after the last delimiter if any basic code
2605 // points were copied; start at the beginning otherwise.
2606
2607 for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
2608
2609 // `index` is the index of the next character to be consumed.
2610 // Decode a generalized variable-length integer into `delta`,
2611 // which gets added to `i`. The overflow checking is easier
2612 // if we increase `i` as we go, then subtract off its starting
2613 // value at the end to obtain `delta`.
2614 for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
2615
2616 if (index >= inputLength) {
2617 error('invalid-input');
2618 }
2619
2620 digit = basicToDigit(input.charCodeAt(index++));
2621
2622 if (digit >= base || digit > floor((maxInt - i) / w)) {
2623 error('overflow');
2624 }
2625
2626 i += digit * w;
2627 t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
2628
2629 if (digit < t) {
2630 break;
2631 }
2632
2633 baseMinusT = base - t;
2634 if (w > floor(maxInt / baseMinusT)) {
2635 error('overflow');
2636 }
2637
2638 w *= baseMinusT;
2639
2640 }
2641
2642 out = output.length + 1;
2643 bias = adapt(i - oldi, out, oldi == 0);
2644
2645 // `i` was supposed to wrap around from `out` to `0`,
2646 // incrementing `n` each time, so we'll fix that now:
2647 if (floor(i / out) > maxInt - n) {
2648 error('overflow');
2649 }
2650
2651 n += floor(i / out);
2652 i %= out;
2653
2654 // Insert `n` at position `i` of the output
2655 output.splice(i++, 0, n);
2656
2657 }
2658
2659 return ucs2encode(output);
2660 }
2661
2662 /**
2663 * Converts a string of Unicode symbols (e.g. a domain name label) to a
2664 * Punycode string of ASCII-only symbols.
2665 * @memberOf punycode
2666 * @param {String} input The string of Unicode symbols.
2667 * @returns {String} The resulting Punycode string of ASCII-only symbols.
2668 */
2669 function encode(input) {
2670 var n,
2671 delta,
2672 handledCPCount,
2673 basicLength,
2674 bias,
2675 j,
2676 m,
2677 q,
2678 k,
2679 t,
2680 currentValue,
2681 output = [],
2682 /** `inputLength` will hold the number of code points in `input`. */
2683 inputLength,
2684 /** Cached calculation results */
2685 handledCPCountPlusOne,
2686 baseMinusT,
2687 qMinusT;
2688
2689 // Convert the input in UCS-2 to Unicode
2690 input = ucs2decode(input);
2691
2692 // Cache the length
2693 inputLength = input.length;
2694
2695 // Initialize the state
2696 n = initialN;
2697 delta = 0;
2698 bias = initialBias;
2699
2700 // Handle the basic code points
2701 for (j = 0; j < inputLength; ++j) {
2702 currentValue = input[j];
2703 if (currentValue < 0x80) {
2704 output.push(stringFromCharCode(currentValue));
2705 }
2706 }
2707
2708 handledCPCount = basicLength = output.length;
2709
2710 // `handledCPCount` is the number of code points that have been handled;
2711 // `basicLength` is the number of basic code points.
2712
2713 // Finish the basic string - if it is not empty - with a delimiter
2714 if (basicLength) {
2715 output.push(delimiter);
2716 }
2717
2718 // Main encoding loop:
2719 while (handledCPCount < inputLength) {
2720
2721 // All non-basic code points < n have been handled already. Find the next
2722 // larger one:
2723 for (m = maxInt, j = 0; j < inputLength; ++j) {
2724 currentValue = input[j];
2725 if (currentValue >= n && currentValue < m) {
2726 m = currentValue;
2727 }
2728 }
2729
2730 // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
2731 // but guard against overflow
2732 handledCPCountPlusOne = handledCPCount + 1;
2733 if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
2734 error('overflow');
2735 }
2736
2737 delta += (m - n) * handledCPCountPlusOne;
2738 n = m;
2739
2740 for (j = 0; j < inputLength; ++j) {
2741 currentValue = input[j];
2742
2743 if (currentValue < n && ++delta > maxInt) {
2744 error('overflow');
2745 }
2746
2747 if (currentValue == n) {
2748 // Represent delta as a generalized variable-length integer
2749 for (q = delta, k = base; /* no condition */; k += base) {
2750 t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
2751 if (q < t) {
2752 break;
2753 }
2754 qMinusT = q - t;
2755 baseMinusT = base - t;
2756 output.push(
2757 stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
2758 );
2759 q = floor(qMinusT / baseMinusT);
2760 }
2761
2762 output.push(stringFromCharCode(digitToBasic(q, 0)));
2763 bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
2764 delta = 0;
2765 ++handledCPCount;
2766 }
2767 }
2768
2769 ++delta;
2770 ++n;
2771
2772 }
2773 return output.join('');
2774 }
2775
2776 /**
2777 * Converts a Punycode string representing a domain name or an email address
2778 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
2779 * it doesn't matter if you call it on a string that has already been
2780 * converted to Unicode.
2781 * @memberOf punycode
2782 * @param {String} input The Punycoded domain name or email address to
2783 * convert to Unicode.
2784 * @returns {String} The Unicode representation of the given Punycode
2785 * string.
2786 */
2787 function toUnicode(input) {
2788 return mapDomain(input, function(string) {
2789 return regexPunycode.test(string)
2790 ? decode(string.slice(4).toLowerCase())
2791 : string;
2792 });
2793 }
2794
2795 /**
2796 * Converts a Unicode string representing a domain name or an email address to
2797 * Punycode. Only the non-ASCII parts of the domain name will be converted,
2798 * i.e. it doesn't matter if you call it with a domain that's already in
2799 * ASCII.
2800 * @memberOf punycode
2801 * @param {String} input The domain name or email address to convert, as a
2802 * Unicode string.
2803 * @returns {String} The Punycode representation of the given domain name or
2804 * email address.
2805 */
2806 function toASCII(input) {
2807 return mapDomain(input, function(string) {
2808 return regexNonASCII.test(string)
2809 ? 'xn--' + encode(string)
2810 : string;
2811 });
2812 }
2813
2814 /*--------------------------------------------------------------------------*/
2815
2816 /** Define the public API */
2817 punycode = {
2818 /**
2819 * A string representing the current Punycode.js version number.
2820 * @memberOf punycode
2821 * @type String
2822 */
2823 'version': '1.4.1',
2824 /**
2825 * An object of methods to convert from JavaScript's internal character
2826 * representation (UCS-2) to Unicode code points, and back.
2827 * @see <https://mathiasbynens.be/notes/javascript-encoding>
2828 * @memberOf punycode
2829 * @type Object
2830 */
2831 'ucs2': {
2832 'decode': ucs2decode,
2833 'encode': ucs2encode
2834 },
2835 'decode': decode,
2836 'encode': encode,
2837 'toASCII': toASCII,
2838 'toUnicode': toUnicode
2839 };
2840
2841 /** Expose `punycode` */
2842 // Some AMD build optimizers, like r.js, check for specific condition patterns
2843 // like the following:
2844 if (
2845 typeof define == 'function' &&
2846 typeof define.amd == 'object' &&
2847 define.amd
2848 ) {
2849 define('punycode', function() {
2850 return punycode;
2851 });
2852 } else if (freeExports && freeModule) {
2853 if (module.exports == freeExports) {
2854 // in Node.js, io.js, or RingoJS v0.8.0+
2855 freeModule.exports = punycode;
2856 } else {
2857 // in Narwhal or RingoJS v0.7.0-
2858 for (key in punycode) {
2859 punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
2860 }
2861 }
2862 } else {
2863 // in Rhino or a web browser
2864 root.punycode = punycode;
2865 }
2866
2867}(this));
2868
2869}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2870},{}],13:[function(require,module,exports){
2871/**
2872 * This file automatically generated from `pre-publish.js`.
2873 * Do not manually edit.
2874 */
2875
2876module.exports = {
2877 "area": true,
2878 "base": true,
2879 "br": true,
2880 "col": true,
2881 "embed": true,
2882 "hr": true,
2883 "img": true,
2884 "input": true,
2885 "keygen": true,
2886 "link": true,
2887 "menuitem": true,
2888 "meta": true,
2889 "param": true,
2890 "source": true,
2891 "track": true,
2892 "wbr": true
2893};
2894
2895},{}]},{},[3]);