govuk_publishing_components 34.7.0 → 34.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +0 -7
  3. data/lib/govuk_publishing_components/version.rb +1 -1
  4. data/node_modules/govuk-frontend/govuk/all.js +4029 -3792
  5. data/node_modules/govuk-frontend/govuk/all.js.map +1 -0
  6. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +52 -51
  7. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js.map +1 -0
  8. data/node_modules/govuk-frontend/govuk/common/index.js +153 -145
  9. data/node_modules/govuk-frontend/govuk/common/index.js.map +1 -0
  10. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +324 -321
  11. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js.map +1 -0
  12. data/node_modules/govuk-frontend/govuk/common.js +154 -146
  13. data/node_modules/govuk-frontend/govuk/common.js.map +1 -0
  14. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -1
  15. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +23 -4
  16. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2059 -1654
  17. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js.map +1 -0
  18. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +11 -11
  19. data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +1 -1
  20. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +19 -19
  21. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +21 -10
  22. data/node_modules/govuk-frontend/govuk/components/button/button.js +927 -917
  23. data/node_modules/govuk-frontend/govuk/components/button/button.js.map +1 -0
  24. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2050 -2040
  25. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js.map +1 -0
  26. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1155 -1147
  27. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js.map +1 -0
  28. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +23 -23
  29. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +1 -1
  30. data/node_modules/govuk-frontend/govuk/components/details/details.js +800 -799
  31. data/node_modules/govuk-frontend/govuk/components/details/details.js.map +1 -0
  32. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1058 -1045
  33. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js.map +1 -0
  34. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
  35. data/node_modules/govuk-frontend/govuk/components/header/header.js +646 -998
  36. data/node_modules/govuk-frontend/govuk/components/header/header.js.map +1 -0
  37. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +760 -752
  38. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js.map +1 -0
  39. data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +61 -0
  40. data/node_modules/govuk-frontend/govuk/components/pagination/template.njk +1 -1
  41. data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +1 -1
  42. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1110 -1107
  43. data/node_modules/govuk-frontend/govuk/components/radios/radios.js.map +1 -0
  44. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1017 -1014
  45. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js.map +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
  47. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +318 -23
  48. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +110 -0
  49. data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +72 -28
  50. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1392 -1264
  51. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js.map +1 -0
  52. data/node_modules/govuk-frontend/govuk/i18n.js +363 -364
  53. data/node_modules/govuk-frontend/govuk/i18n.js.map +1 -0
  54. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
  55. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +242 -241
  56. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js.map +1 -0
  57. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +13 -12
  58. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js.map +1 -0
  59. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +17 -16
  60. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js.map +1 -0
  61. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +547 -546
  62. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js.map +1 -0
  63. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +37 -36
  64. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js.map +1 -0
  65. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +251 -250
  66. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js.map +1 -0
  67. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +21 -20
  68. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js.map +1 -0
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +198 -197
  70. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js.map +1 -0
  71. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +198 -197
  72. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js.map +1 -0
  73. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +106 -105
  74. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js.map +1 -0
  75. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +400 -399
  76. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js.map +1 -0
  77. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +239 -238
  78. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js.map +1 -0
  79. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +72 -71
  80. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js.map +1 -0
  81. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +14 -13
  82. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js.map +1 -0
  83. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +17 -16
  84. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js.map +1 -0
  85. data/node_modules/govuk-frontend/govuk-esm/all.mjs +2 -2
  86. data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +17 -10
  87. data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +3 -1
  88. data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +135 -52
  89. data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +11 -9
  90. data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +10 -7
  91. data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +24 -18
  92. data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +23 -16
  93. data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +15 -11
  94. data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +3 -2
  95. data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +3 -4
  96. data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +10 -9
  97. data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +5 -3
  98. data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +165 -38
  99. data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +9 -11
  100. data/node_modules/govuk-frontend/package.json +1 -1
  101. metadata +34 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Event.js","sources":["../../../../src/govuk/vendor/polyfills/Window.mjs","../../../../src/govuk/vendor/polyfills/Document.mjs","../../../../src/govuk/vendor/polyfills/Element.mjs","../../../../src/govuk/vendor/polyfills/Object/defineProperty.mjs","../../../../src/govuk/vendor/polyfills/Event.mjs"],"sourcesContent":["(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js\nvar detect = ('Window' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\t(function (global) {\n\t\tif (global.constructor) {\n\t\t\tglobal.Window = global.constructor;\n\t\t} else {\n\t\t\t(global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this;\n\t\t}\n\t}(this));\n}\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js\nvar detect = (\"Document\" in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always\nif ((typeof WorkerGlobalScope === \"undefined\") && (typeof importScripts !== \"function\")) {\n\n\tif (this.HTMLDocument) { // IE8\n\n\t\t// HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.\n\t\tthis.Document = this.HTMLDocument;\n\n\t} else {\n\n\t\t// Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.\n\t\tthis.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());\n\t\tthis.Document.prototype = document;\n\t}\n}\n\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import './Document.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js\nvar detect = ('Element' in this && 'HTMLElement' in this)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always\n(function () {\n\n\t// IE8\n\tif (window.Element && !window.HTMLElement) {\n\t\twindow.HTMLElement = window.Element;\n\t\treturn;\n\t}\n\n\t// create Element constructor\n\twindow.Element = window.HTMLElement = new Function('return function Element() {}')();\n\n\t// generate sandboxed iframe\n\tvar vbody = document.appendChild(document.createElement('body'));\n\tvar frame = vbody.appendChild(document.createElement('iframe'));\n\n\t// use sandboxed iframe to replicate Element functionality\n\tvar frameDocument = frame.contentWindow.document;\n\tvar prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*'));\n\tvar cache = {};\n\n\t// polyfill Element.prototype on an element\n\tvar shiv = function (element, deep) {\n\t\tvar\n\t\tchildNodes = element.childNodes || [],\n\t\tindex = -1,\n\t\tkey, value, childNode;\n\n\t\tif (element.nodeType === 1 && element.constructor !== Element) {\n\t\t\telement.constructor = Element;\n\n\t\t\tfor (key in cache) {\n\t\t\t\tvalue = cache[key];\n\t\t\t\telement[key] = value;\n\t\t\t}\n\t\t}\n\n\t\twhile (childNode = deep && childNodes[++index]) {\n\t\t\tshiv(childNode, deep);\n\t\t}\n\n\t\treturn element;\n\t};\n\n\tvar elements = document.getElementsByTagName('*');\n\tvar nativeCreateElement = document.createElement;\n\tvar interval;\n\tvar loopLimit = 100;\n\n\tprototype.attachEvent('onpropertychange', function (event) {\n\t\tvar\n\t\tpropertyName = event.propertyName,\n\t\tnonValue = !cache.hasOwnProperty(propertyName),\n\t\tnewValue = prototype[propertyName],\n\t\toldValue = cache[propertyName],\n\t\tindex = -1,\n\t\telement;\n\n\t\twhile (element = elements[++index]) {\n\t\t\tif (element.nodeType === 1) {\n\t\t\t\tif (nonValue || element[propertyName] === oldValue) {\n\t\t\t\t\telement[propertyName] = newValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcache[propertyName] = newValue;\n\t});\n\n\tprototype.constructor = Element;\n\n\tif (!prototype.hasAttribute) {\n\t\t// <Element>.hasAttribute\n\t\tprototype.hasAttribute = function hasAttribute(name) {\n\t\t\treturn this.getAttribute(name) !== null;\n\t\t};\n\t}\n\n\t// Apply Element prototype to the pre-existing DOM as soon as the body element appears.\n\tfunction bodyCheck() {\n\t\tif (!(loopLimit--)) clearTimeout(interval);\n\t\tif (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) {\n\t\t\tshiv(document, true);\n\t\t\tif (interval && document.body.prototype) clearTimeout(interval);\n\t\t\treturn (!!document.body.prototype);\n\t\t}\n\t\treturn false;\n\t}\n\tif (!bodyCheck()) {\n\t\tdocument.onreadystatechange = bodyCheck;\n\t\tinterval = setInterval(bodyCheck, 25);\n\t}\n\n\t// Apply to any new elements created after load\n\tdocument.createElement = function createElement(nodeName) {\n\t\tvar element = nativeCreateElement(String(nodeName).toLowerCase());\n\t\treturn shiv(element);\n\t};\n\n\t// remove sandboxed iframe\n\tdocument.removeChild(vbody);\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js\nvar detect = (\n // In IE8, defineProperty could only act on DOM elements, so full support\n // for the feature requires the ability to set a property on an arbitrary object\n 'defineProperty' in Object && (function() {\n \ttry {\n \t\tvar a = {};\n \t\tObject.defineProperty(a, 'test', {value:42});\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false\n \t}\n }())\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always\n(function (nativeDefineProperty) {\n\n\tvar supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');\n\tvar ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';\n\tvar ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';\n\n\tObject.defineProperty = function defineProperty(object, property, descriptor) {\n\n\t\t// Where native support exists, assume it\n\t\tif (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {\n\t\t\treturn nativeDefineProperty(object, property, descriptor);\n\t\t}\n\n\t\tif (object === null || !(object instanceof Object || typeof object === 'object')) {\n\t\t\tthrow new TypeError('Object.defineProperty called on non-object');\n\t\t}\n\n\t\tif (!(descriptor instanceof Object)) {\n\t\t\tthrow new TypeError('Property description must be an object');\n\t\t}\n\n\t\tvar propertyString = String(property);\n\t\tvar hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;\n\t\tvar getterType = 'get' in descriptor && typeof descriptor.get;\n\t\tvar setterType = 'set' in descriptor && typeof descriptor.set;\n\n\t\t// handle descriptor.get\n\t\tif (getterType) {\n\t\t\tif (getterType !== 'function') {\n\t\t\t\tthrow new TypeError('Getter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineGetter__.call(object, propertyString, descriptor.get);\n\t\t} else {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\t// handle descriptor.set\n\t\tif (setterType) {\n\t\t\tif (setterType !== 'function') {\n\t\t\t\tthrow new TypeError('Setter must be a function');\n\t\t\t}\n\t\t\tif (!supportsAccessors) {\n\t\t\t\tthrow new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n\t\t\t}\n\t\t\tif (hasValueOrWritable) {\n\t\t\t\tthrow new TypeError(ERR_VALUE_ACCESSORS);\n\t\t\t}\n\t\t\tObject.__defineSetter__.call(object, propertyString, descriptor.set);\n\t\t}\n\n\t\t// OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above\n\t\tif ('value' in descriptor) {\n\t\t\tobject[propertyString] = descriptor.value;\n\t\t}\n\n\t\treturn object;\n\t};\n}(Object.defineProperty));\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n","import './Window.mjs'\nimport './Element.mjs'\nimport './Object/defineProperty.mjs'\n\n(function(undefined) {\n\n// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js\nvar detect = (\n (function(global) {\n\n \tif (!('Event' in global)) return false;\n \tif (typeof global.Event === 'function') return true;\n\n \ttry {\n\n \t\t// In IE 9-11, the Event object exists but cannot be instantiated\n \t\tnew Event('click');\n \t\treturn true;\n \t} catch(e) {\n \t\treturn false;\n \t}\n }(this))\n)\n\nif (detect) return\n\n// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always\n(function () {\n\tvar unlistenableWindowEvents = {\n\t\tclick: 1,\n\t\tdblclick: 1,\n\t\tkeyup: 1,\n\t\tkeypress: 1,\n\t\tkeydown: 1,\n\t\tmousedown: 1,\n\t\tmouseup: 1,\n\t\tmousemove: 1,\n\t\tmouseover: 1,\n\t\tmouseenter: 1,\n\t\tmouseleave: 1,\n\t\tmouseout: 1,\n\t\tstorage: 1,\n\t\tstoragecommit: 1,\n\t\ttextinput: 1\n\t};\n\n\t// This polyfill depends on availability of `document` so will not run in a worker\n\t// However, we asssume there are no browsers with worker support that lack proper\n\t// support for `Event` within the worker\n\tif (typeof document === 'undefined' || typeof window === 'undefined') return;\n\n\tfunction indexOf(array, element) {\n\t\tvar\n\t\tindex = -1,\n\t\tlength = array.length;\n\n\t\twhile (++index < length) {\n\t\t\tif (index in array && array[index] === element) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tvar existingProto = (window.Event && window.Event.prototype) || null;\n\twindow.Event = Window.prototype.Event = function Event(type, eventInitDict) {\n\t\tif (!type) {\n\t\t\tthrow new Error('Not enough arguments');\n\t\t}\n\n\t\tvar event;\n\t\t// Shortcut if browser supports createEvent\n\t\tif ('createEvent' in document) {\n\t\t\tevent = document.createEvent('Event');\n\t\t\tvar bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\t\tvar cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\t\tevent.initEvent(type, bubbles, cancelable);\n\n\t\t\treturn event;\n\t\t}\n\n\t\tevent = document.createEventObject();\n\n\t\tevent.type = type;\n\t\tevent.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;\n\t\tevent.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;\n\n\t\treturn event;\n\t};\n\tif (existingProto) {\n\t\tObject.defineProperty(window.Event, 'prototype', {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: existingProto\n\t\t});\n\t}\n\n\tif (!('createEvent' in document)) {\n\t\twindow.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1];\n\n\t\t\tif (element === window && type in unlistenableWindowEvents) {\n\t\t\t\tthrow new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.');\n\t\t\t}\n\n\t\t\tif (!element._events) {\n\t\t\t\telement._events = {};\n\t\t\t}\n\n\t\t\tif (!element._events[type]) {\n\t\t\t\telement._events[type] = function (event) {\n\t\t\t\t\tvar\n\t\t\t\t\tlist = element._events[event.type].list,\n\t\t\t\t\tevents = list.slice(),\n\t\t\t\t\tindex = -1,\n\t\t\t\t\tlength = events.length,\n\t\t\t\t\teventElement;\n\n\t\t\t\t\tevent.preventDefault = function preventDefault() {\n\t\t\t\t\t\tif (event.cancelable !== false) {\n\t\t\t\t\t\t\tevent.returnValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopPropagation = function stopPropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.stopImmediatePropagation = function stopImmediatePropagation() {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\t\tevent.cancelImmediate = true;\n\t\t\t\t\t};\n\n\t\t\t\t\tevent.currentTarget = element;\n\t\t\t\t\tevent.relatedTarget = event.fromElement || null;\n\t\t\t\t\tevent.target = event.target || event.srcElement || element;\n\t\t\t\t\tevent.timeStamp = new Date().getTime();\n\n\t\t\t\t\tif (event.clientX) {\n\t\t\t\t\t\tevent.pageX = event.clientX + document.documentElement.scrollLeft;\n\t\t\t\t\t\tevent.pageY = event.clientY + document.documentElement.scrollTop;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (++index < length && !event.cancelImmediate) {\n\t\t\t\t\t\tif (index in events) {\n\t\t\t\t\t\t\teventElement = events[index];\n\n\t\t\t\t\t\t\tif (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') {\n\t\t\t\t\t\t\t\teventElement.call(element, event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\telement._events[type].list = [];\n\n\t\t\t\tif (element.attachEvent) {\n\t\t\t\t\telement.attachEvent('on' + type, element._events[type]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telement._events[type].list.push(listener);\n\t\t};\n\n\t\twindow.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() {\n\t\t\tvar\n\t\t\telement = this,\n\t\t\ttype = arguments[0],\n\t\t\tlistener = arguments[1],\n\t\t\tindex;\n\n\t\t\tif (element._events && element._events[type] && element._events[type].list) {\n\t\t\t\tindex = indexOf(element._events[type].list, listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\telement._events[type].list.splice(index, 1);\n\n\t\t\t\t\tif (!element._events[type].list.length) {\n\t\t\t\t\t\tif (element.detachEvent) {\n\t\t\t\t\t\t\telement.detachEvent('on' + type, element._events[type]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete element._events[type];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\twindow.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) {\n\t\t\tif (!arguments.length) {\n\t\t\t\tthrow new Error('Not enough arguments');\n\t\t\t}\n\n\t\t\tif (!event || typeof event.type !== 'string') {\n\t\t\t\tthrow new Error('DOM Events Exception 0');\n\t\t\t}\n\n\t\t\tvar element = this, type = event.type;\n\n\t\t\ttry {\n\t\t\t\tif (!event.bubbles) {\n\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\tvar cancelBubbleEvent = function (event) {\n\t\t\t\t\t\tevent.cancelBubble = true;\n\n\t\t\t\t\t\t(element || window).detachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.attachEvent('on' + type, cancelBubbleEvent);\n\t\t\t\t}\n\n\t\t\t\tthis.fireEvent('on' + type, event);\n\t\t\t} catch (error) {\n\t\t\t\tevent.target = element;\n\n\t\t\t\tdo {\n\t\t\t\t\tevent.currentTarget = element;\n\n\t\t\t\t\tif ('_events' in element && typeof element._events[type] === 'function') {\n\t\t\t\t\t\telement._events[type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof element['on' + type] === 'function') {\n\t\t\t\t\t\telement['on' + type].call(element, event);\n\t\t\t\t\t}\n\n\t\t\t\t\telement = element.nodeType === 9 ? element.parentWindow : element.parentNode;\n\t\t\t\t} while (element && !event.cancelBubble);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t// Add the DOMContentLoaded Event\n\t\tdocument.attachEvent('onreadystatechange', function() {\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tdocument.dispatchEvent(new Event('DOMContentLoaded', {\n\t\t\t\t\tbubbles: true\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t}\n}());\n\n})\n.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\n"],"names":[],"mappings":";;;;;;CAAA,CAAC,SAAS,SAAS,EAAE;;CAErB;CACA,IAAI,MAAM,IAAI,QAAQ,IAAI,IAAI,EAAC;;CAE/B,IAAI,MAAM,EAAE,MAAM;;CAElB;CACA,IAAI,CAAC,OAAO,iBAAiB,KAAK,WAAW,MAAM,OAAO,aAAa,KAAK,UAAU,CAAC,EAAE;CACzF,CAAC,CAAC,UAAU,MAAM,EAAE;CACpB,EAAE,IAAI,MAAM,CAAC,WAAW,EAAE;CAC1B,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC;CACtC,GAAG,MAAM;CACT,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,QAAQ,CAAC,6BAA6B,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;CACzG,GAAG;CACH,EAAE,CAAC,IAAI,CAAC,EAAE;CACV,CAAC;;CAED,CAAC;CACD,CAAC,IAAI,CAAC,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,QAAQ,KAAK,OAAO,IAAI,IAAI,IAAI,IAAI,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,EAAE,CAAC,CAAC;;CCnB9H,CAAC,SAAS,SAAS,EAAE;;CAErB;CACA,IAAI,MAAM,IAAI,UAAU,IAAI,IAAI,EAAC;;CAEj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OAAO,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE;CAC9E,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CACjD,MAAM;;CAEN,KAAK,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,UAAU,EAAE;CACrD,MAAM,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAChD,MAAM;;CAEN,KAAK,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,CAAC,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;CAClF,KAAK,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;CAC7C,IAAI;;CAEJ,GAAG,OAAO,IAAI,CAAC;CACf,GAAG,CAAC;;CAEJ;CACA,EAAE,QAAQ,CAAC,WAAW,CAAC,oBAAoB,EAAE,WAAW;CACxD,GAAG,IAAI,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;CAC3C,IAAI,QAAQ,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,kBAAkB,EAAE;CACzD,KAAK,OAAO,EAAE,IAAI;CAClB,KAAK,CAAC,CAAC,CAAC;CACR,IAAI;CACJ,GAAG,CAAC,CAAC;CACL,EAAE;CACF,CAAC,EAAE,EAAE;;CAEL,CAAC;CACD,CAAC,IAAI,CAAC,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,QAAQ,KAAK,OAAO,IAAI,IAAI,IAAI,IAAI,QAAQ,KAAK,OAAO,MAAM,IAAI,MAAM,IAAI,EAAE,CAAC,CAAC;;;;"}
@@ -4,249 +4,250 @@
4
4
  (factory());
5
5
  }(this, (function () { 'use strict';
6
6
 
7
- (function(undefined) {
8
-
9
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
10
- var detect = (
11
- // In IE8, defineProperty could only act on DOM elements, so full support
12
- // for the feature requires the ability to set a property on an arbitrary object
13
- 'defineProperty' in Object && (function() {
14
- try {
15
- var a = {};
16
- Object.defineProperty(a, 'test', {value:42});
17
- return true;
18
- } catch(e) {
19
- return false
20
- }
21
- }())
22
- );
23
-
24
- if (detect) return
25
-
26
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
27
- (function (nativeDefineProperty) {
28
-
29
- var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
- var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
- var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
-
33
- Object.defineProperty = function defineProperty(object, property, descriptor) {
34
-
35
- // Where native support exists, assume it
36
- if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
- return nativeDefineProperty(object, property, descriptor);
38
- }
39
-
40
- if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
- throw new TypeError('Object.defineProperty called on non-object');
42
- }
43
-
44
- if (!(descriptor instanceof Object)) {
45
- throw new TypeError('Property description must be an object');
46
- }
47
-
48
- var propertyString = String(property);
49
- var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
- var getterType = 'get' in descriptor && typeof descriptor.get;
51
- var setterType = 'set' in descriptor && typeof descriptor.set;
52
-
53
- // handle descriptor.get
54
- if (getterType) {
55
- if (getterType !== 'function') {
56
- throw new TypeError('Getter must be a function');
7
+ (function(undefined) {
8
+
9
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js
10
+ var detect = (
11
+ // In IE8, defineProperty could only act on DOM elements, so full support
12
+ // for the feature requires the ability to set a property on an arbitrary object
13
+ 'defineProperty' in Object && (function() {
14
+ try {
15
+ var a = {};
16
+ Object.defineProperty(a, 'test', {value:42});
17
+ return true;
18
+ } catch(e) {
19
+ return false
20
+ }
21
+ }())
22
+ );
23
+
24
+ if (detect) return
25
+
26
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always
27
+ (function (nativeDefineProperty) {
28
+
29
+ var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__');
30
+ var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';
31
+ var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';
32
+
33
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
34
+
35
+ // Where native support exists, assume it
36
+ if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {
37
+ return nativeDefineProperty(object, property, descriptor);
57
38
  }
58
- if (!supportsAccessors) {
59
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
39
+
40
+ if (object === null || !(object instanceof Object || typeof object === 'object')) {
41
+ throw new TypeError('Object.defineProperty called on non-object');
60
42
  }
61
- if (hasValueOrWritable) {
62
- throw new TypeError(ERR_VALUE_ACCESSORS);
43
+
44
+ if (!(descriptor instanceof Object)) {
45
+ throw new TypeError('Property description must be an object');
63
46
  }
64
- Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
- } else {
66
- object[propertyString] = descriptor.value;
67
- }
68
-
69
- // handle descriptor.set
70
- if (setterType) {
71
- if (setterType !== 'function') {
72
- throw new TypeError('Setter must be a function');
47
+
48
+ var propertyString = String(property);
49
+ var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;
50
+ var getterType = 'get' in descriptor && typeof descriptor.get;
51
+ var setterType = 'set' in descriptor && typeof descriptor.set;
52
+
53
+ // handle descriptor.get
54
+ if (getterType) {
55
+ if (getterType !== 'function') {
56
+ throw new TypeError('Getter must be a function');
57
+ }
58
+ if (!supportsAccessors) {
59
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
60
+ }
61
+ if (hasValueOrWritable) {
62
+ throw new TypeError(ERR_VALUE_ACCESSORS);
63
+ }
64
+ Object.__defineGetter__.call(object, propertyString, descriptor.get);
65
+ } else {
66
+ object[propertyString] = descriptor.value;
73
67
  }
74
- if (!supportsAccessors) {
75
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
68
+
69
+ // handle descriptor.set
70
+ if (setterType) {
71
+ if (setterType !== 'function') {
72
+ throw new TypeError('Setter must be a function');
73
+ }
74
+ if (!supportsAccessors) {
75
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
76
+ }
77
+ if (hasValueOrWritable) {
78
+ throw new TypeError(ERR_VALUE_ACCESSORS);
79
+ }
80
+ Object.__defineSetter__.call(object, propertyString, descriptor.set);
76
81
  }
77
- if (hasValueOrWritable) {
78
- throw new TypeError(ERR_VALUE_ACCESSORS);
82
+
83
+ // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
+ if ('value' in descriptor) {
85
+ object[propertyString] = descriptor.value;
79
86
  }
80
- Object.__defineSetter__.call(object, propertyString, descriptor.set);
81
- }
82
-
83
- // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above
84
- if ('value' in descriptor) {
85
- object[propertyString] = descriptor.value;
86
- }
87
-
88
- return object;
89
- };
90
- }(Object.defineProperty));
91
- })
92
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
-
94
- (function(undefined) {
95
- // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
96
- var detect = 'bind' in Function.prototype;
97
-
98
- if (detect) return
99
-
100
- // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always
101
- Object.defineProperty(Function.prototype, 'bind', {
102
- value: function bind(that) { // .length is 1
103
- // add necessary es5-shim utilities
104
- var $Array = Array;
105
- var $Object = Object;
106
- var ObjectPrototype = $Object.prototype;
107
- var ArrayPrototype = $Array.prototype;
108
- var Empty = function Empty() {};
109
- var to_string = ObjectPrototype.toString;
110
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
111
- var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
112
- var array_slice = ArrayPrototype.slice;
113
- var array_concat = ArrayPrototype.concat;
114
- var array_push = ArrayPrototype.push;
115
- var max = Math.max;
116
- // /add necessary es5-shim utilities
117
-
118
- // 1. Let Target be the this value.
119
- var target = this;
120
- // 2. If IsCallable(Target) is false, throw a TypeError exception.
121
- if (!isCallable(target)) {
122
- throw new TypeError('Function.prototype.bind called on incompatible ' + target);
123
- }
124
- // 3. Let A be a new (possibly empty) internal list of all of the
125
- // argument values provided after thisArg (arg1, arg2 etc), in order.
126
- // XXX slicedArgs will stand in for "A" if used
127
- var args = array_slice.call(arguments, 1); // for normal call
128
- // 4. Let F be a new native ECMAScript object.
129
- // 11. Set the [[Prototype]] internal property of F to the standard
130
- // built-in Function prototype object as specified in 15.3.3.1.
131
- // 12. Set the [[Call]] internal property of F as described in
132
- // 15.3.4.5.1.
133
- // 13. Set the [[Construct]] internal property of F as described in
134
- // 15.3.4.5.2.
135
- // 14. Set the [[HasInstance]] internal property of F as described in
136
- // 15.3.4.5.3.
137
- var bound;
138
- var binder = function () {
139
-
140
- if (this instanceof bound) {
141
- // 15.3.4.5.2 [[Construct]]
142
- // When the [[Construct]] internal method of a function object,
143
- // F that was created using the bind function is called with a
144
- // list of arguments ExtraArgs, the following steps are taken:
145
- // 1. Let target be the value of F's [[TargetFunction]]
146
- // internal property.
147
- // 2. If target has no [[Construct]] internal method, a
148
- // TypeError exception is thrown.
149
- // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
150
- // property.
151
- // 4. Let args be a new list containing the same values as the
152
- // list boundArgs in the same order followed by the same
153
- // values as the list ExtraArgs in the same order.
154
- // 5. Return the result of calling the [[Construct]] internal
155
- // method of target providing args as the arguments.
156
-
157
- var result = target.apply(
158
- this,
159
- array_concat.call(args, array_slice.call(arguments))
160
- );
161
- if ($Object(result) === result) {
162
- return result;
163
- }
164
- return this;
165
-
166
- } else {
167
- // 15.3.4.5.1 [[Call]]
168
- // When the [[Call]] internal method of a function object, F,
169
- // which was created using the bind function is called with a
170
- // this value and a list of arguments ExtraArgs, the following
171
- // steps are taken:
172
- // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
173
- // property.
174
- // 2. Let boundThis be the value of F's [[BoundThis]] internal
175
- // property.
176
- // 3. Let target be the value of F's [[TargetFunction]] internal
177
- // property.
178
- // 4. Let args be a new list containing the same values as the
179
- // list boundArgs in the same order followed by the same
180
- // values as the list ExtraArgs in the same order.
181
- // 5. Return the result of calling the [[Call]] internal method
182
- // of target providing boundThis as the this value and
183
- // providing args as the arguments.
184
-
185
- // equiv: target.call(this, ...boundArgs, ...args)
186
- return target.apply(
187
- that,
188
- array_concat.call(args, array_slice.call(arguments))
189
- );
190
-
191
- }
192
-
193
- };
194
-
195
- // 15. If the [[Class]] internal property of Target is "Function", then
196
- // a. Let L be the length property of Target minus the length of A.
197
- // b. Set the length own property of F to either 0 or L, whichever is
198
- // larger.
199
- // 16. Else set the length own property of F to 0.
200
-
201
- var boundLength = max(0, target.length - args.length);
202
-
203
- // 17. Set the attributes of the length own property of F to the values
204
- // specified in 15.3.5.1.
205
- var boundArgs = [];
206
- for (var i = 0; i < boundLength; i++) {
207
- array_push.call(boundArgs, '$' + i);
208
- }
209
-
210
- // XXX Build a dynamic function with desired amount of arguments is the only
211
- // way to set the length property of a function.
212
- // In environments where Content Security Policies enabled (Chrome extensions,
213
- // for ex.) all use of eval or Function costructor throws an exception.
214
- // However in all of these environments Function.prototype.bind exists
215
- // and so this code will never be executed.
216
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
217
-
218
- if (target.prototype) {
219
- Empty.prototype = target.prototype;
220
- bound.prototype = new Empty();
221
- // Clean up dangling references.
222
- Empty.prototype = null;
223
- }
224
-
225
- // TODO
226
- // 18. Set the [[Extensible]] internal property of F to true.
227
-
228
- // TODO
229
- // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
230
- // 20. Call the [[DefineOwnProperty]] internal method of F with
231
- // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
232
- // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
233
- // false.
234
- // 21. Call the [[DefineOwnProperty]] internal method of F with
235
- // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
236
- // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
237
- // and false.
238
-
239
- // TODO
240
- // NOTE Function objects created using Function.prototype.bind do not
241
- // have a prototype property or the [[Code]], [[FormalParameters]], and
242
- // [[Scope]] internal properties.
243
- // XXX can't delete prototype in pure-js.
244
-
245
- // 22. Return F.
246
- return bound;
247
- }
248
- });
249
- })
250
- .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
87
+
88
+ return object;
89
+ };
90
+ }(Object.defineProperty));
91
+ })
92
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
93
+
94
+ (function(undefined) {
95
+ // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js
96
+ var detect = 'bind' in Function.prototype;
97
+
98
+ if (detect) return
99
+
100
+ // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always
101
+ Object.defineProperty(Function.prototype, 'bind', {
102
+ value: function bind(that) { // .length is 1
103
+ // add necessary es5-shim utilities
104
+ var $Array = Array;
105
+ var $Object = Object;
106
+ var ObjectPrototype = $Object.prototype;
107
+ var ArrayPrototype = $Array.prototype;
108
+ var Empty = function Empty() {};
109
+ var to_string = ObjectPrototype.toString;
110
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
111
+ var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
112
+ var array_slice = ArrayPrototype.slice;
113
+ var array_concat = ArrayPrototype.concat;
114
+ var array_push = ArrayPrototype.push;
115
+ var max = Math.max;
116
+ // /add necessary es5-shim utilities
117
+
118
+ // 1. Let Target be the this value.
119
+ var target = this;
120
+ // 2. If IsCallable(Target) is false, throw a TypeError exception.
121
+ if (!isCallable(target)) {
122
+ throw new TypeError('Function.prototype.bind called on incompatible ' + target);
123
+ }
124
+ // 3. Let A be a new (possibly empty) internal list of all of the
125
+ // argument values provided after thisArg (arg1, arg2 etc), in order.
126
+ // XXX slicedArgs will stand in for "A" if used
127
+ var args = array_slice.call(arguments, 1); // for normal call
128
+ // 4. Let F be a new native ECMAScript object.
129
+ // 11. Set the [[Prototype]] internal property of F to the standard
130
+ // built-in Function prototype object as specified in 15.3.3.1.
131
+ // 12. Set the [[Call]] internal property of F as described in
132
+ // 15.3.4.5.1.
133
+ // 13. Set the [[Construct]] internal property of F as described in
134
+ // 15.3.4.5.2.
135
+ // 14. Set the [[HasInstance]] internal property of F as described in
136
+ // 15.3.4.5.3.
137
+ var bound;
138
+ var binder = function () {
139
+
140
+ if (this instanceof bound) {
141
+ // 15.3.4.5.2 [[Construct]]
142
+ // When the [[Construct]] internal method of a function object,
143
+ // F that was created using the bind function is called with a
144
+ // list of arguments ExtraArgs, the following steps are taken:
145
+ // 1. Let target be the value of F's [[TargetFunction]]
146
+ // internal property.
147
+ // 2. If target has no [[Construct]] internal method, a
148
+ // TypeError exception is thrown.
149
+ // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
150
+ // property.
151
+ // 4. Let args be a new list containing the same values as the
152
+ // list boundArgs in the same order followed by the same
153
+ // values as the list ExtraArgs in the same order.
154
+ // 5. Return the result of calling the [[Construct]] internal
155
+ // method of target providing args as the arguments.
156
+
157
+ var result = target.apply(
158
+ this,
159
+ array_concat.call(args, array_slice.call(arguments))
160
+ );
161
+ if ($Object(result) === result) {
162
+ return result;
163
+ }
164
+ return this;
165
+
166
+ } else {
167
+ // 15.3.4.5.1 [[Call]]
168
+ // When the [[Call]] internal method of a function object, F,
169
+ // which was created using the bind function is called with a
170
+ // this value and a list of arguments ExtraArgs, the following
171
+ // steps are taken:
172
+ // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
173
+ // property.
174
+ // 2. Let boundThis be the value of F's [[BoundThis]] internal
175
+ // property.
176
+ // 3. Let target be the value of F's [[TargetFunction]] internal
177
+ // property.
178
+ // 4. Let args be a new list containing the same values as the
179
+ // list boundArgs in the same order followed by the same
180
+ // values as the list ExtraArgs in the same order.
181
+ // 5. Return the result of calling the [[Call]] internal method
182
+ // of target providing boundThis as the this value and
183
+ // providing args as the arguments.
184
+
185
+ // equiv: target.call(this, ...boundArgs, ...args)
186
+ return target.apply(
187
+ that,
188
+ array_concat.call(args, array_slice.call(arguments))
189
+ );
190
+
191
+ }
192
+
193
+ };
194
+
195
+ // 15. If the [[Class]] internal property of Target is "Function", then
196
+ // a. Let L be the length property of Target minus the length of A.
197
+ // b. Set the length own property of F to either 0 or L, whichever is
198
+ // larger.
199
+ // 16. Else set the length own property of F to 0.
200
+
201
+ var boundLength = max(0, target.length - args.length);
202
+
203
+ // 17. Set the attributes of the length own property of F to the values
204
+ // specified in 15.3.5.1.
205
+ var boundArgs = [];
206
+ for (var i = 0; i < boundLength; i++) {
207
+ array_push.call(boundArgs, '$' + i);
208
+ }
209
+
210
+ // XXX Build a dynamic function with desired amount of arguments is the only
211
+ // way to set the length property of a function.
212
+ // In environments where Content Security Policies enabled (Chrome extensions,
213
+ // for ex.) all use of eval or Function costructor throws an exception.
214
+ // However in all of these environments Function.prototype.bind exists
215
+ // and so this code will never be executed.
216
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
217
+
218
+ if (target.prototype) {
219
+ Empty.prototype = target.prototype;
220
+ bound.prototype = new Empty();
221
+ // Clean up dangling references.
222
+ Empty.prototype = null;
223
+ }
224
+
225
+ // TODO
226
+ // 18. Set the [[Extensible]] internal property of F to true.
227
+
228
+ // TODO
229
+ // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
230
+ // 20. Call the [[DefineOwnProperty]] internal method of F with
231
+ // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
232
+ // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
233
+ // false.
234
+ // 21. Call the [[DefineOwnProperty]] internal method of F with
235
+ // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
236
+ // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
237
+ // and false.
238
+
239
+ // TODO
240
+ // NOTE Function objects created using Function.prototype.bind do not
241
+ // have a prototype property or the [[Code]], [[FormalParameters]], and
242
+ // [[Scope]] internal properties.
243
+ // XXX can't delete prototype in pure-js.
244
+
245
+ // 22. Return F.
246
+ return bound;
247
+ }
248
+ });
249
+ })
250
+ .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
251
251
 
252
252
  })));
253
+ //# sourceMappingURL=bind.js.map