@cruk/cruk-react-components 1.2.2 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +17 -3
  2. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js +1 -1
  3. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -1
  4. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  5. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  6. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +2 -0
  7. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
  8. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +2 -0
  9. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
  10. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js +2 -0
  11. package/lib/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
  12. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +2 -0
  13. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -0
  14. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusMerge.js +1 -1
  15. package/lib/cjs/node_modules/focus-lock/dist/es2015/focusMerge.js.map +1 -1
  16. package/lib/cjs/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  17. package/lib/cjs/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  18. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  19. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  20. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/auto-focus.js +2 -0
  21. package/lib/cjs/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -0
  22. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  23. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  24. package/lib/cjs/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
  25. package/lib/cjs/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -1
  26. package/lib/cjs/node_modules/tslib/tslib.es6.js.map +1 -1
  27. package/lib/cjs/src/components/AddressLookup/index.js +1 -1
  28. package/lib/cjs/src/components/Avatar/README.md.js +1 -1
  29. package/lib/cjs/src/components/Avatar/README.md.js.map +1 -1
  30. package/lib/cjs/src/components/Button/styles.js +1 -1
  31. package/lib/cjs/src/components/Carousel/Dots.js +1 -1
  32. package/lib/cjs/src/components/Checkbox/index.js +1 -1
  33. package/lib/cjs/src/components/Checkbox/styles.js +1 -1
  34. package/lib/cjs/src/components/Collapse/index.js +1 -1
  35. package/lib/cjs/src/components/Header/index.js +1 -1
  36. package/lib/cjs/src/components/Header/styles.js +1 -1
  37. package/lib/cjs/src/components/Link/index.js +1 -1
  38. package/lib/cjs/src/components/Modal/index.js +1 -1
  39. package/lib/cjs/src/components/ProgressBar/styles.js +1 -1
  40. package/lib/cjs/src/components/Radio/styles.js +1 -1
  41. package/lib/cjs/src/components/Select/styles.js +1 -1
  42. package/lib/cjs/src/components/TextField/styles.js +1 -1
  43. package/lib/components/AddressLookup/index.d.ts +27 -2
  44. package/lib/components/Avatar/index.d.ts +1 -1
  45. package/lib/components/Avatar/styles.d.ts +1 -1
  46. package/lib/components/Badge/index.d.ts +1 -1
  47. package/lib/components/Badge/styles.d.ts +1 -1
  48. package/lib/components/Box/index.d.ts +1 -1
  49. package/lib/components/Button/index.d.ts +20 -2
  50. package/lib/components/Button/styles.d.ts +1 -1
  51. package/lib/components/Carousel/Dots.d.ts +1 -1
  52. package/lib/components/Carousel/index.d.ts +1 -1
  53. package/lib/components/Carousel/styles.d.ts +4 -4
  54. package/lib/components/Checkbox/index.d.ts +9 -2
  55. package/lib/components/Checkbox/styles.d.ts +1 -1
  56. package/lib/components/Collapse/index.d.ts +1 -1
  57. package/lib/components/Collapse/styles.d.ts +11 -1
  58. package/lib/components/DateField/index.d.ts +1 -1
  59. package/lib/components/Divider.d.ts +1 -1
  60. package/lib/components/ErrorText/index.d.ts +1 -1
  61. package/lib/components/Footer/index.d.ts +1 -1
  62. package/lib/components/Header/index.d.ts +1 -1
  63. package/lib/components/Header/styles.d.ts +15 -8
  64. package/lib/components/Heading/index.d.ts +1 -1
  65. package/lib/components/Icon/index.d.ts +2 -1
  66. package/lib/components/IconFa/index.d.ts +2 -1
  67. package/lib/components/InfoBox/index.d.ts +1 -1
  68. package/lib/components/LabelWrapper/index.d.ts +1 -1
  69. package/lib/components/LegendWrapper/index.d.ts +1 -1
  70. package/lib/components/LegendWrapper/styles.d.ts +1 -1
  71. package/lib/components/Link/index.d.ts +22 -2
  72. package/lib/components/Loader/index.d.ts +1 -0
  73. package/lib/components/Modal/index.d.ts +1 -1
  74. package/lib/components/Modal/styles.d.ts +12 -2
  75. package/lib/components/Pagination/index.d.ts +1 -1
  76. package/lib/components/Pagination/styles.d.ts +1 -1
  77. package/lib/components/PopOver/index.d.ts +1 -1
  78. package/lib/components/ProgressBar/index.d.ts +1 -1
  79. package/lib/components/ProgressBar/styles.d.ts +4 -4
  80. package/lib/components/Radio/index.d.ts +9 -2
  81. package/lib/components/Radio/styles.d.ts +3 -3
  82. package/lib/components/RadioConsent/index.d.ts +1 -1
  83. package/lib/components/RadioConsent/styles.d.ts +7 -2
  84. package/lib/components/Select/index.d.ts +1 -1
  85. package/lib/components/Select/styles.d.ts +1 -1
  86. package/lib/components/Spacing/index.d.ts +1 -1
  87. package/lib/components/Step/index.d.ts +1 -1
  88. package/lib/components/Step/styles.d.ts +2 -2
  89. package/lib/components/TestWrapper.d.ts +2 -2
  90. package/lib/components/Text/index.d.ts +1 -1
  91. package/lib/components/Text/styles.d.ts +1 -1
  92. package/lib/components/TextAreaField/index.d.ts +1 -1
  93. package/lib/components/TextAreaField/styles.d.ts +1 -1
  94. package/lib/components/TextField/index.d.ts +1 -1
  95. package/lib/components/TextField/styles.d.ts +2 -2
  96. package/lib/components/ThemeCheatSheet.d.ts +3 -1
  97. package/lib/components/Totaliser/index.d.ts +1 -1
  98. package/lib/components/Totaliser/styles.d.ts +2 -1
  99. package/lib/components/UserBlock/index.d.ts +1 -1
  100. package/lib/es/node_modules/@babel/runtime/helpers/esm/defineProperty.js +1 -1
  101. package/lib/es/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -1
  102. package/lib/es/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
  103. package/lib/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
  104. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +2 -0
  105. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
  106. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +2 -0
  107. package/lib/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
  108. package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js +2 -0
  109. package/lib/es/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
  110. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +2 -0
  111. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -0
  112. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js +1 -1
  113. package/lib/es/node_modules/focus-lock/dist/es2015/focusMerge.js.map +1 -1
  114. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js +1 -1
  115. package/lib/es/node_modules/focus-lock/dist/es2015/solver.js.map +1 -1
  116. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js +1 -1
  117. package/lib/es/node_modules/focus-lock/dist/es2015/utils/DOMutils.js.map +1 -1
  118. package/lib/es/node_modules/focus-lock/dist/es2015/utils/auto-focus.js +2 -0
  119. package/lib/es/node_modules/focus-lock/dist/es2015/utils/auto-focus.js.map +1 -0
  120. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js +1 -1
  121. package/lib/es/node_modules/react-focus-lock/dist/es2015/Lock.js.map +1 -1
  122. package/lib/es/node_modules/react-focus-lock/dist/es2015/medium.js.map +1 -1
  123. package/lib/es/node_modules/react-intersection-observer/react-intersection-observer.modern.mjs.js.map +1 -1
  124. package/lib/es/node_modules/tslib/tslib.es6.js.map +1 -1
  125. package/lib/es/src/components/AddressLookup/index.js +1 -1
  126. package/lib/es/src/components/Avatar/README.md.js +1 -1
  127. package/lib/es/src/components/Avatar/README.md.js.map +1 -1
  128. package/lib/es/src/components/Button/styles.js +1 -1
  129. package/lib/es/src/components/Carousel/Dots.js +1 -1
  130. package/lib/es/src/components/Checkbox/index.js +1 -1
  131. package/lib/es/src/components/Checkbox/styles.js +1 -1
  132. package/lib/es/src/components/Collapse/index.js +1 -1
  133. package/lib/es/src/components/Header/index.js +1 -1
  134. package/lib/es/src/components/Header/styles.js +1 -1
  135. package/lib/es/src/components/Link/index.js +1 -1
  136. package/lib/es/src/components/Modal/index.js +1 -1
  137. package/lib/es/src/components/ProgressBar/styles.js +1 -1
  138. package/lib/es/src/components/Radio/styles.js +1 -1
  139. package/lib/es/src/components/Select/styles.js +1 -1
  140. package/lib/es/src/components/TextField/styles.js +1 -1
  141. package/lib/hocs/MdxProvider.d.ts +1 -1
  142. package/lib/types.d.ts +21 -21
  143. package/package.json +25 -26
  144. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.es.js +0 -8
  145. package/lib/cjs/node_modules/@fortawesome/free-solid-svg-icons/index.es.js.map +0 -1
  146. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.es.js +0 -7
  147. package/lib/es/node_modules/@fortawesome/free-solid-svg-icons/index.es.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./solver.js"),t=require("./utils/DOMutils.js"),r=require("./utils/all-affected.js"),u=require("./utils/firstFocus.js"),i=require("./utils/getActiveElement.js"),o=require("./utils/is.js"),n=require("./utils/parenting.js");exports.getFocusMerge=function(s,l){var a=document&&i.getActiveElement(),c=r.getAllAffectedNodes(s).filter(o.isNotAGuard),f=n.getTopCommonParent(a||s,s,c),d=new Map,b=t.getAllTabbableNodes(c,d),g=t.getTabbableNodes(c,d).filter((function(e){var t=e.node;return o.isNotAGuard(t)}));if(g[0]||(g=b)[0]){var p,v,A,F,m=t.getAllTabbableNodes([f],d).map((function(e){return e.node})),j=(p=m,v=g,A=new Map,v.forEach((function(e){return A.set(e.node,e)})),p.map((function(e){return A.get(e)})).filter(o.isDefined)),q=j.map((function(e){return e.node})),N=e.newFocus(q,m,a,l);if(N===e.NEW_FOCUS){var M=t.filterAutoFocusable(b.map((function(e){return e.node}))).filter((F=n.allParentAutofocusables(c,d),function(e){var t;return e.autofocus||!!(null===(t=o.getDataset(e))||void 0===t?void 0:t.autofocus)||F.indexOf(e)>=0}));return{node:M&&M.length?u.pickFirstFocus(M):u.pickFirstFocus(t.filterAutoFocusable(q))}}return void 0===N?N:j[N]}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./solver.js"),t=require("./utils/DOMutils.js"),r=require("./utils/all-affected.js"),o=require("./utils/auto-focus.js"),n=require("./utils/getActiveElement.js"),u=require("./utils/is.js"),i=require("./utils/parenting.js");exports.getFocusMerge=function(s,a){var l=document&&n.getActiveElement(),c=r.getAllAffectedNodes(s).filter(u.isNotAGuard),f=i.getTopCommonParent(l||s,s,c),d=new Map,v=t.getAllTabbableNodes(c,d),b=t.getTabbableNodes(c,d).filter((function(e){var t=e.node;return u.isNotAGuard(t)}));if(b[0]||(b=v)[0]){var g,p,A,m=t.getAllTabbableNodes([f],d).map((function(e){return e.node})),j=(g=m,p=b,A=new Map,p.forEach((function(e){return A.set(e.node,e)})),g.map((function(e){return A.get(e)})).filter(u.isDefined)),q=j.map((function(e){return e.node})),N=e.newFocus(q,m,l,a);if(N===e.NEW_FOCUS){var M=o.pickAutofocus(v,q,i.allParentAutofocusables(c,d));return M?{node:M}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===N?N:j[N]}};
2
2
  //# sourceMappingURL=focusMerge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusMerge.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusMerge.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["topNode","lastNode","activeElement","document","getActiveElement","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getAllTabbableNodes","innerElements","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","autoFocusables","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","autoFocusable","filterAutoFocusable","allParentAutofocusables","autofocus","getDataset","indexOf","length","pickFirstFocus","undefined"],"mappings":"sUAwB2B,SAAUA,EAASC,GAC1C,IAAIC,EAAgBC,UAAYC,EAAAA,mBAC5BC,EAAUC,EAAAA,oBAAoBN,GAASO,OAAOC,EAAWA,aACzDC,EAAeC,EAAAA,mBAAmBR,GAAiBF,EAASA,EAASK,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAAA,oBAAoBT,EAASM,GAC5CI,EAAgBC,EAAAA,iBAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAAA,YAAYU,EAC3B,IACI,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IA5ByBM,EAAUC,EAC/BC,EANwBC,EAiCxBC,EAAaT,EAAmBA,oBAAC,CAACL,GAAeE,GAAiBa,KAAI,SAAUP,GAEhF,OADWA,EAAGC,IAEtB,IACQO,GAhCqBN,EAgCeI,EAhCLH,EAgCiBL,EA/BhDM,EAAQ,IAAIT,IAEhBQ,EAASM,SAAQ,SAAUC,GAAU,OAAON,EAAMO,IAAID,EAAOT,KAAMS,EAAU,IAEtER,EAASK,KAAI,SAAUN,GAAQ,OAAOG,EAAMQ,IAAIX,EAAQ,IAAEX,OAAOuB,EAASA,YA4B7EC,EAAaN,EAAqBD,KAAI,SAAUP,GAEhD,OADWA,EAAGC,IAEtB,IACQc,EAAQC,EAAAA,SAASF,EAAYR,EAAYrB,EAAeD,GAC5D,GAAI+B,IAAUE,EAAAA,UAAW,CACrB,IAAIC,EAAgBC,EAAmBA,oBAACvB,EAAaW,KAAI,SAAUP,GAE/D,OADWA,EAAGC,IAE1B,KAAYX,QA/CoBe,EA+CGe,EAAuBA,wBAAChC,EAASM,GA9CzD,SAAUO,GAAQ,IAAID,EAE7B,OAAOC,EAAKoB,cAA4C,QAA3BrB,EAAKsB,EAAAA,WAAWrB,UAA0B,IAAPD,OAAgB,EAASA,EAAGqB,YAAchB,EAAekB,QAAQtB,IAAS,KA6CtI,MAAO,CACHA,KAAMiB,GAAiBA,EAAcM,OAC/BC,EAAAA,eAAeP,GACfO,iBAAeN,EAAAA,oBAAoBL,IAEhD,CACD,YAAcY,IAAVX,EACOA,EAEJP,EAAqBO,EAzB3B,CA0BL"}
1
+ {"version":3,"file":"focusMerge.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/focusMerge.js"],"sourcesContent":["import { NEW_FOCUS, newFocus } from './solver';\nimport { getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickAutofocus } from './utils/auto-focus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var focusNode = pickAutofocus(anyFocusable, innerNodes, allParentAutofocusables(entries, visibilityCache));\n if (focusNode) {\n return { node: focusNode };\n }\n else {\n console.warn('focus-lock: cannot find any node to move focus into');\n return undefined;\n }\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n"],"names":["topNode","lastNode","activeElement","document","getActiveElement","entries","getAllAffectedNodes","filter","isNotAGuard","commonParent","getTopCommonParent","visibilityCache","Map","anyFocusable","getAllTabbableNodes","innerElements","getTabbableNodes","_a","node","srcNodes","dstNodes","remap","outerNodes","map","orderedInnerElements","forEach","entity","set","get","isDefined","innerNodes","newId","newFocus","NEW_FOCUS","focusNode","pickAutofocus","allParentAutofocusables","console","warn","undefined"],"mappings":"sUAmB2B,SAAUA,EAASC,GAC1C,IAAIC,EAAgBC,UAAYC,EAAAA,mBAC5BC,EAAUC,EAAAA,oBAAoBN,GAASO,OAAOC,EAAWA,aACzDC,EAAeC,EAAAA,mBAAmBR,GAAiBF,EAASA,EAASK,GACrEM,EAAkB,IAAIC,IACtBC,EAAeC,EAAAA,oBAAoBT,EAASM,GAC5CI,EAAgBC,EAAAA,iBAAiBX,EAASM,GAAiBJ,QAAO,SAAUU,GAC5E,IAAIC,EAAOD,EAAGC,KACd,OAAOV,EAAAA,YAAYU,EAC3B,IACI,GAAKH,EAAc,KACfA,EAAgBF,GACG,GAFvB,CAMA,IA5ByBM,EAAUC,EAC/BC,EA2BAC,EAAaR,EAAmBA,oBAAC,CAACL,GAAeE,GAAiBY,KAAI,SAAUN,GAEhF,OADWA,EAAGC,IAEtB,IACQM,GAhCqBL,EAgCeG,EAhCLF,EAgCiBL,EA/BhDM,EAAQ,IAAIT,IAEhBQ,EAASK,SAAQ,SAAUC,GAAU,OAAOL,EAAMM,IAAID,EAAOR,KAAMQ,EAAU,IAEtEP,EAASI,KAAI,SAAUL,GAAQ,OAAOG,EAAMO,IAAIV,EAAQ,IAAEX,OAAOsB,EAASA,YA4B7EC,EAAaN,EAAqBD,KAAI,SAAUN,GAEhD,OADWA,EAAGC,IAEtB,IACQa,EAAQC,EAAAA,SAASF,EAAYR,EAAYpB,EAAeD,GAC5D,GAAI8B,IAAUE,EAAAA,UAAW,CACrB,IAAIC,EAAYC,EAAaA,cAACtB,EAAciB,EAAYM,EAAAA,wBAAwB/B,EAASM,IACzF,OAAIuB,EACO,CAAEhB,KAAMgB,QAGfG,QAAQC,KAAK,sDAGpB,CACD,YAAcC,IAAVR,EACOA,EAEJP,EAAqBO,EAxB3B,CAyBL"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/correctFocus.js"),i=require("./utils/firstFocus.js"),s=require("./utils/is.js");exports.NEW_FOCUS="NEW_FOCUS",exports.newFocus=function(r,t,o,u){var a=r.length,d=r[0],c=r[a-1],n=s.isGuard(o);if(!(o&&r.indexOf(o)>=0)){var f=void 0!==o?t.indexOf(o):-1,O=u?t.indexOf(u):f,x=u?r.indexOf(u):-1,l=f-O,F=t.indexOf(d),b=t.indexOf(c),v=e.correctNodes(t),p=(void 0!==o?v.indexOf(o):-1)-(u?v.indexOf(u):f),h=i.pickFocusable(r,0),M=i.pickFocusable(r,a-1);return-1===f||-1===x?"NEW_FOCUS":!l&&x>=0?x:f<=F&&n&&Math.abs(l)>1?M:f>=b&&n&&Math.abs(l)>1?h:l&&Math.abs(p)>1?x:f<=F?M:f>b?h:l?Math.abs(l)>1?x:(a+x+l)%a:void 0}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/correctFocus.js"),i=require("./utils/firstFocus.js"),s=require("./utils/is.js"),r="NEW_FOCUS";exports.NEW_FOCUS=r,exports.newFocus=function(t,o,u,a){var d=t.length,c=t[0],n=t[d-1],f=s.isGuard(u);if(!(u&&t.indexOf(u)>=0)){var x=void 0!==u?o.indexOf(u):-1,O=a?o.indexOf(a):x,l=a?t.indexOf(a):-1,b=x-O,v=o.indexOf(c),F=o.indexOf(n),p=e.correctNodes(o),h=(void 0!==u?p.indexOf(u):-1)-(a?p.indexOf(a):x),M=i.pickFocusable(t,0),j=i.pickFocusable(t,d-1);return-1===x||-1===l?r:!b&&l>=0?l:x<=v&&f&&Math.abs(b)>1?j:x>=F&&f&&Math.abs(b)>1?M:b&&Math.abs(h)>1?l:x<=v?j:x>F?M:b?Math.abs(b)>1?l:(d+l+b)%d:void 0}};
2
2
  //# sourceMappingURL=solver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"solver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n"],"names":["innerNodes","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"6LAGuB,6BASD,SAAUA,EAAYC,EAAYC,EAAeC,GACnE,IAAIC,EAAMJ,EAAWK,OACjBC,EAAaN,EAAW,GACxBO,EAAYP,EAAWI,EAAM,GAC7BI,EAAYC,UAAQP,GAExB,KAAIA,GAAiBF,EAAWU,QAAQR,IAAkB,GAA1D,CAGA,IAAIS,OAAgCC,IAAlBV,EAA8BD,EAAWS,QAAQR,IAAkB,EACjFW,EAAYV,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDG,EAAiBX,EAAWH,EAAWU,QAAQP,IAAa,EAC5DY,EAAYJ,EAAcE,EAC1BG,EAAiBf,EAAWS,QAAQJ,GACpCW,EAAgBhB,EAAWS,QAAQH,GACnCW,EAAiBC,eAAalB,GAE9BmB,QADmCR,IAAlBV,EAA8BgB,EAAeR,QAAQR,IAAkB,IACjDC,EAAWe,EAAeR,QAAQP,GAAYQ,GACrFU,EAAkBC,EAAAA,cAActB,EAAY,GAC5CuB,EAAiBD,EAAaA,cAACtB,EAAYI,EAAM,GAErD,OAAqB,IAAjBO,IAA0C,IAApBG,EA9BP,aAkCdC,GAAaD,GAAkB,EACzBA,EAGPH,GAAeK,GAAkBR,GAAagB,KAAKC,IAAIV,GAAa,EAC7DQ,EAGPZ,GAAeM,GAAiBT,GAAagB,KAAKC,IAAIV,GAAa,EAC5DM,EAGPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAGPH,GAAeK,EACRO,EAGPZ,EAAcM,EACPI,EAGPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD,CAzCC,CAiDL"}
1
+ {"version":3,"file":"solver.js","sources":["../../../../../../node_modules/focus-lock/dist/es2015/solver.js"],"sourcesContent":["import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n"],"names":["NEW_FOCUS","innerNodes","outerNodes","activeElement","lastNode","cnt","length","firstFocus","lastFocus","isOnGuard","isGuard","indexOf","activeIndex","undefined","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","correctNodes","correctedIndexDiff","returnFirstNode","pickFocusable","returnLastNode","Math","abs"],"mappings":"2KAGWA,EAAY,iDASD,SAAUC,EAAYC,EAAYC,EAAeC,GACnE,IAAIC,EAAMJ,EAAWK,OACjBC,EAAaN,EAAW,GACxBO,EAAYP,EAAWI,EAAM,GAC7BI,EAAYC,UAAQP,GAExB,KAAIA,GAAiBF,EAAWU,QAAQR,IAAkB,GAA1D,CAGA,IAAIS,OAAgCC,IAAlBV,EAA8BD,EAAWS,QAAQR,IAAkB,EACjFW,EAAYV,EAAWF,EAAWS,QAAQP,GAAYQ,EACtDG,EAAiBX,EAAWH,EAAWU,QAAQP,IAAa,EAC5DY,EAAYJ,EAAcE,EAC1BG,EAAiBf,EAAWS,QAAQJ,GACpCW,EAAgBhB,EAAWS,QAAQH,GACnCW,EAAiBC,eAAalB,GAE9BmB,QADmCR,IAAlBV,EAA8BgB,EAAeR,QAAQR,IAAkB,IACjDC,EAAWe,EAAeR,QAAQP,GAAYQ,GACrFU,EAAkBC,EAAAA,cAActB,EAAY,GAC5CuB,EAAiBD,EAAaA,cAACtB,EAAYI,EAAM,GAErD,OAAqB,IAAjBO,IAA0C,IAApBG,EACff,GAGNgB,GAAaD,GAAkB,EACzBA,EAGPH,GAAeK,GAAkBR,GAAagB,KAAKC,IAAIV,GAAa,EAC7DQ,EAGPZ,GAAeM,GAAiBT,GAAagB,KAAKC,IAAIV,GAAa,EAC5DM,EAGPN,GAAaS,KAAKC,IAAIL,GAAsB,EACrCN,EAGPH,GAAeK,EACRO,EAGPZ,EAAcM,EACPI,EAGPN,EACIS,KAAKC,IAAIV,GAAa,EACfD,GAEHV,EAAMU,EAAiBC,GAAaX,OAJhD,CAzCC,CAiDL"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./array.js"),t=require("./is.js"),r=require("./tabOrder.js"),o=require("./tabUtils.js"),n=function(r,o){return e.toArray(r).filter((function(e){return t.isVisibleCached(o,e)})).filter((function(e){return t.notHiddenInput(e)}))},u=function(t,r){return(t.shadowRoot?u(t.shadowRoot,r):Object.getPrototypeOf(t).contains.call(t,r))||e.toArray(t.children).some((function(e){return u(e,r)}))};exports.contains=u,exports.filterAutoFocusable=function(r,o){return void 0===o&&(o=new Map),e.toArray(r).filter((function(e){return t.isAutoFocusAllowedCached(o,e)}))},exports.filterFocusable=n,exports.getAllTabbableNodes=function(e,t){return r.orderByTabIndex(n(o.getFocusables(e),t),!1)},exports.getTabbableNodes=function(e,t,u){return r.orderByTabIndex(n(o.getFocusables(e,u),t),!0,u)},exports.parentAutofocusables=function(e,t){return n(o.getParentAutofocusables(e),t)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./array.js"),t=require("./is.js"),r=require("./tabOrder.js"),o=require("./tabUtils.js"),n=function(r,o){return e.toArray(r).filter((function(e){return t.isVisibleCached(o,e)})).filter((function(e){return t.notHiddenInput(e)}))},u=function(t,r){return t.shadowRoot?u(t.shadowRoot,r):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,r))||e.toArray(t.children).some((function(e){return u(e,r)}))};exports.contains=u,exports.filterAutoFocusable=function(r,o){return void 0===o&&(o=new Map),e.toArray(r).filter((function(e){return t.isAutoFocusAllowedCached(o,e)}))},exports.filterFocusable=n,exports.getAllTabbableNodes=function(e,t){return r.orderByTabIndex(n(o.getFocusables(e),t),!1)},exports.getTabbableNodes=function(e,t,u){return r.orderByTabIndex(n(o.getFocusables(e,u),t),!0,u)},exports.parentAutofocusables=function(e,t){return n(o.getParentAutofocusables(e),t)};
2
2
  //# sourceMappingURL=DOMutils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : Object.getPrototypeOf(scope).contains.call(scope, element)) ||\n toArray(scope.children).some(function (child) { return contains(child, element); }));\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","contains","scope","element","shadowRoot","Object","getPrototypeOf","call","children","some","child","cache","Map","isAutoFocusAllowedCached","topNodes","orderByTabIndex","getFocusables","withGuards","topNode","getParentAutofocusables"],"mappings":"2KASWA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAAA,QAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAeA,gBAACJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAcA,eAACF,EAAM,GAC9D,EA8BWG,EAAW,SAAUC,EAAOC,GACnC,OAASD,EAAME,WACTH,EAASC,EAAME,WAAYD,GAC3BE,OAAOC,eAAeJ,GAAOD,SAASM,KAAKL,EAAOC,KACpDP,EAAAA,QAAQM,EAAMM,UAAUC,MAAK,SAAUC,GAAS,OAAOT,EAASS,EAAOP,EAAW,GAC1F,iDAlCiC,SAAUT,EAAOiB,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BhB,UAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOe,EAAAA,yBAAyBF,EAAOb,EAAQ,GAClG,wDAYiC,SAAUgB,EAAUnB,GACjD,OAAOoB,EAAAA,gBAAgBtB,EAAgBuB,EAAaA,cAACF,GAAWnB,IAAkB,EACtF,2BAT8B,SAAUmB,EAAUnB,EAAiBsB,GAC/D,OAAOF,EAAeA,gBAACtB,EAAgBuB,EAAAA,cAAcF,EAAUG,GAAatB,IAAkB,EAAMsB,EACxG,+BAakC,SAAUC,EAASvB,GACjD,OAAOF,EAAgB0B,EAAuBA,wBAACD,GAAUvB,EAC7D"}
1
+ {"version":3,"file":"DOMutils.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js"],"sourcesContent":["import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n if (scope.shadowRoot) {\n return contains(scope.shadowRoot, element);\n }\n else {\n if (Object.getPrototypeOf(scope).contains !== undefined &&\n Object.getPrototypeOf(scope).contains.call(scope, element)) {\n return true;\n }\n return toArray(scope.children).some(function (child) { return contains(child, element); });\n }\n};\n"],"names":["filterFocusable","nodes","visibilityCache","toArray","filter","node","isVisibleCached","notHiddenInput","contains","scope","element","shadowRoot","undefined","Object","getPrototypeOf","call","children","some","child","cache","Map","isAutoFocusAllowedCached","topNodes","orderByTabIndex","getFocusables","withGuards","topNode","getParentAutofocusables"],"mappings":"2KASWA,EAAkB,SAAUC,EAAOC,GAC1C,OAAOC,EAAAA,QAAQF,GACVG,QAAO,SAAUC,GAAQ,OAAOC,EAAeA,gBAACJ,EAAiBG,MACjED,QAAO,SAAUC,GAAQ,OAAOE,EAAcA,eAACF,EAAM,GAC9D,EA8BWG,EAAW,SAAUC,EAAOC,GACnC,OAAID,EAAME,WACCH,EAASC,EAAME,WAAYD,UAGYE,IAA1CC,OAAOC,eAAeL,GAAOD,WAC7BK,OAAOC,eAAeL,GAAOD,SAASO,KAAKN,EAAOC,KAG/CP,EAAOA,QAACM,EAAMO,UAAUC,MAAK,SAAUC,GAAS,OAAOV,EAASU,EAAOR,EAAW,GAEjG,iDAxCiC,SAAUT,EAAOkB,GAE9C,YADc,IAAVA,IAAoBA,EAAQ,IAAIC,KAC7BjB,UAAQF,GAAOG,QAAO,SAAUC,GAAQ,OAAOgB,EAAAA,yBAAyBF,EAAOd,EAAQ,GAClG,wDAYiC,SAAUiB,EAAUpB,GACjD,OAAOqB,EAAAA,gBAAgBvB,EAAgBwB,EAAaA,cAACF,GAAWpB,IAAkB,EACtF,2BAT8B,SAAUoB,EAAUpB,EAAiBuB,GAC/D,OAAOF,EAAeA,gBAACvB,EAAgBwB,EAAAA,cAAcF,EAAUG,GAAavB,IAAkB,EAAMuB,EACxG,+BAakC,SAAUC,EAASxB,GACjD,OAAOF,EAAgB2B,EAAuBA,wBAACD,GAAUxB,EAC7D"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./DOMutils.js"),t=require("./firstFocus.js"),u=require("./is.js");exports.pickAutofocus=function(r,o,i){var s,c=r.map((function(e){return e.node})),n=e.filterAutoFocusable(c.filter((s=i,function(e){var t,r=null===(t=u.getDataset(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==r&&"false"!==r||s.indexOf(e)>=0})));return n&&n.length?t.pickFirstFocus(n):t.pickFirstFocus(e.filterAutoFocusable(o))};
2
+ //# sourceMappingURL=auto-focus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-focus.js","sources":["../../../../../../../node_modules/focus-lock/dist/es2015/utils/auto-focus.js"],"sourcesContent":["import { filterAutoFocusable } from './DOMutils';\nimport { pickFirstFocus } from './firstFocus';\nimport { getDataset } from './is';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) {\n var _a;\n var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;\n return (\n // @ts-expect-error\n node.autofocus ||\n //\n (autofocus !== undefined && autofocus !== 'false') ||\n //\n autoFocusables.indexOf(node) >= 0);\n };\n};\nexport var pickAutofocus = function (nodesIndexes, orderedNodes, groups) {\n var nodes = nodesIndexes.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));\n if (autoFocusable && autoFocusable.length) {\n return pickFirstFocus(autoFocusable);\n }\n return pickFirstFocus(filterAutoFocusable(orderedNodes));\n};\n"],"names":["nodesIndexes","orderedNodes","groups","autoFocusables","nodes","map","_a","node","autoFocusable","filterAutoFocusable","filter","autofocus","getDataset","undefined","indexOf","length","pickFirstFocus"],"mappings":"2KAgB2B,SAAUA,EAAcC,EAAcC,GAC7D,IAd4BC,EAcxBC,EAAQJ,EAAaK,KAAI,SAAUC,GAEnC,OADWA,EAAGC,IAEtB,IACQC,EAAgBC,EAAAA,oBAAoBL,EAAMM,QAlBlBP,EAkByCD,EAjB9D,SAAUK,GACb,IAAID,EACAK,EAAwC,QAA3BL,EAAKM,EAAUA,WAACL,UAA0B,IAAPD,OAAgB,EAASA,EAAGK,UAChF,OAEAJ,EAAKI,gBAEcE,IAAdF,GAAyC,UAAdA,GAE5BR,EAAeW,QAAQP,IAAS,CAC5C,KAQI,OAAIC,GAAiBA,EAAcO,OACxBC,EAAAA,eAAeR,GAEnBQ,iBAAeP,EAAAA,oBAAoBR,GAC9C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../@babel/runtime/helpers/esm/extends.js"),o=require("react"),t=require("prop-types"),r=require("../../../focus-lock/dist/es2015/constants.js"),s=require("../../../use-callback-ref/dist/es2015/useMergeRef.js"),u=require("./FocusGuard.js"),n=require("./medium.js");function c(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var a=c(o),i=[],d=a.forwardRef((function(t,c){var d,l=a.useState(),f=l[0],v=l[1],b=a.useRef(),p=a.useRef(!1),m=a.useRef(null),F=t.children,h=t.disabled,y=t.noFocusGuards,O=t.persistentFocus,g=t.crossFrame,j=t.autoFocus,k=t.allowTextSelection,E=t.group,P=t.className,w=t.whiteList,x=t.hasPositiveIndices,C=t.shards,S=void 0===C?i:C,D=t.as,R=void 0===D?"div":D,q=t.lockProps,G=void 0===q?{}:q,N=t.sideCar,_=t.returnFocus,I=t.focusOptions,L=t.onActivation,T=t.onDeactivation,M=a.useState({})[0],A=a.useCallback((function(){m.current=m.current||document&&document.activeElement,b.current&&L&&L(b.current),p.current=!0}),[L]),B=a.useCallback((function(){p.current=!1,T&&T(b.current)}),[T]);o.useEffect((function(){h||(m.current=null)}),[]);var U=a.useCallback((function(e){var o=m.current;if(o&&o.focus){var t="function"==typeof _?_(o):_;if(t){var r="object"==typeof t?t:void 0;m.current=null,e?Promise.resolve().then((function(){return o.focus(r)})):o.focus(r)}}}),[_]),V=a.useCallback((function(e){p.current&&n.mediumFocus.useMedium(e)}),[]),z=n.mediumBlur.useMedium,H=a.useCallback((function(e){b.current!==e&&(b.current=e,v(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==k&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),a.useEffect((function(){b.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var J=e.default(((d={})[r.FOCUS_DISABLED]=h&&"disabled",d[r.FOCUS_GROUP]=E,d),G),K=!0!==y,Q=K&&"tail"!==y,W=s.useMergeRefs([c,H]);return a.createElement(a.Fragment,null,K&&[a.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:u.hiddenGuard}),x?a.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:u.hiddenGuard}):null],!h&&a.createElement(N,{id:M,sideCar:n.mediumSidecar,observed:f,disabled:h,persistentFocus:O,crossFrame:g,autoFocus:j,whiteList:w,shards:S,onActivation:A,onDeactivation:B,returnFocus:U,focusOptions:I}),a.createElement(R,e.default({ref:W},J,{className:P,onBlur:z,onFocus:V}),F),Q&&a.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:u.hiddenGuard}))}));d.propTypes="production"!==process.env.NODE_ENV?{children:t.node,disabled:t.bool,returnFocus:t.oneOfType([t.bool,t.object,t.func]),focusOptions:t.object,noFocusGuards:t.bool,hasPositiveIndices:t.bool,allowTextSelection:t.bool,autoFocus:t.bool,persistentFocus:t.bool,crossFrame:t.bool,group:t.string,className:t.string,whiteList:t.func,shards:t.arrayOf(t.any),as:t.oneOfType([t.string,t.func,t.object]),lockProps:t.object,onActivation:t.func,onDeactivation:t.func,sideCar:t.any.isRequired}:{},d.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0},exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../@babel/runtime/helpers/esm/extends.js"),o=require("react"),t=require("prop-types"),r=require("../../../focus-lock/dist/es2015/constants.js"),s=require("../../../use-callback-ref/dist/es2015/useMergeRef.js"),n=require("./FocusGuard.js"),u=require("./medium.js");function c(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var i=c(o),a=[],d=i.forwardRef((function(t,c){var d,l=i.useState(),f=l[0],v=l[1],b=i.useRef(),p=i.useRef(!1),m=i.useRef(null),F=t.children,h=t.disabled,y=t.noFocusGuards,O=t.persistentFocus,g=t.crossFrame,j=t.autoFocus,k=t.allowTextSelection,E=t.group,P=t.className,w=t.whiteList,x=t.hasPositiveIndices,C=t.shards,S=void 0===C?a:C,D=t.as,R=void 0===D?"div":D,q=t.lockProps,G=void 0===q?{}:q,N=t.sideCar,_=t.returnFocus,I=t.focusOptions,L=t.onActivation,T=t.onDeactivation,M=i.useState({})[0],A=i.useCallback((function(){m.current=m.current||document&&document.activeElement,b.current&&L&&L(b.current),p.current=!0}),[L]),B=i.useCallback((function(){p.current=!1,T&&T(b.current)}),[T]);o.useEffect((function(){h||(m.current=null)}),[]);var U=i.useCallback((function(e){var o=m.current;if(o&&o.focus){var t="function"==typeof _?_(o):_;if(t){var r="object"==typeof t?t:void 0;m.current=null,e?Promise.resolve().then((function(){return o.focus(r)})):o.focus(r)}}}),[_]),V=i.useCallback((function(e){p.current&&u.mediumFocus.useMedium(e)}),[]),z=u.mediumBlur.useMedium,H=i.useCallback((function(e){b.current!==e&&(b.current=e,v(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==k&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),i.useEffect((function(){b.current||"string"==typeof R||console.error("FocusLock: could not obtain ref to internal node")}),[]));var J=e.default(((d={})[r.FOCUS_DISABLED]=h&&"disabled",d[r.FOCUS_GROUP]=E,d),G),K=!0!==y,Q=K&&"tail"!==y,W=s.useMergeRefs([c,H]);return i.createElement(i.Fragment,null,K&&[i.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:h?-1:0,style:n.hiddenGuard}),x?i.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:h?-1:1,style:n.hiddenGuard}):null],!h&&i.createElement(N,{id:M,sideCar:u.mediumSidecar,observed:f,disabled:h,persistentFocus:O,crossFrame:g,autoFocus:j,whiteList:w,shards:S,onActivation:A,onDeactivation:B,returnFocus:U,focusOptions:I}),i.createElement(R,e.default({ref:W},J,{className:P,onBlur:z,onFocus:V}),F),Q&&i.createElement("div",{"data-focus-guard":!0,tabIndex:h?-1:0,style:n.hiddenGuard}))}));d.propTypes="production"!==process.env.NODE_ENV?{children:t.node,disabled:t.bool,returnFocus:t.oneOfType([t.bool,t.object,t.func]),focusOptions:t.object,noFocusGuards:t.bool,hasPositiveIndices:t.bool,allowTextSelection:t.bool,autoFocus:t.bool,persistentFocus:t.bool,crossFrame:t.bool,group:t.string,className:t.string,whiteList:t.func,shards:t.arrayOf(t.any),as:t.oneOfType([t.string,t.func,t.object]),lockProps:t.object,onActivation:t.func,onDeactivation:t.func,sideCar:t.any.isRequired}:{},d.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0},exports.default=d;
2
2
  //# sourceMappingURL=Lock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lock.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { useEffect } from 'react';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n if (!observed.current) {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), // first tabbed element guard\n hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n hasPositiveIndices: undefined,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","React","forwardRef","props","parentRef","_extends2","_React$useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","children","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","allowTextSelection","group","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","current","document","activeElement","useEffect","allowDefer","returnFocusTo","focus","howToReturnFocus","returnFocusOptions","undefined","Promise","resolve","then","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","error","_extends","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired","defaultProps"],"mappings":"2oBAQIA,EAAa,GACbC,EAAyBC,EAAMC,YAAW,SAAqBC,EAAOC,GACxE,IAAIC,EAEAC,EAAkBL,EAAMM,WACxBC,EAAeF,EAAgB,GAC/BG,EAAcH,EAAgB,GAE9BI,EAAWT,EAAMU,SACjBC,EAAWX,EAAMU,QAAO,GACxBE,EAAyBZ,EAAMU,OAAO,MACtCG,EAAWX,EAAMW,SACjBC,EAAWZ,EAAMY,SACjBC,EAAgBb,EAAMa,cACtBC,EAAkBd,EAAMc,gBACxBC,EAAaf,EAAMe,WACnBC,EAAYhB,EAAMgB,UAClBC,EAAqBjB,EAAMiB,mBAC3BC,EAAQlB,EAAMkB,MACdC,EAAYnB,EAAMmB,UAClBC,EAAYpB,EAAMoB,UAClBC,EAAqBrB,EAAMqB,mBAC3BC,EAAgBtB,EAAMuB,OACtBA,OAA2B,IAAlBD,EAA2B1B,EAAa0B,EACjDE,EAAYxB,EAAMyB,GAClBC,OAA0B,IAAdF,EAAuB,MAAQA,EAC3CG,EAAmB3B,EAAM4B,UACzBC,OAAsC,IAArBF,EAA8B,CAAE,EAAGA,EACpDG,EAAU9B,EAAM+B,QAChBC,EAAoBhC,EAAMiC,YAC1BC,EAAelC,EAAMkC,aACrBC,EAAuBnC,EAAMoC,aAC7BC,EAAyBrC,EAAMsC,eAG/BC,EADmBzC,EAAMM,SAAS,IACZ,GAGtBgC,EAAetC,EAAM0C,aAAY,WACnC9B,EAAuB+B,QAAU/B,EAAuB+B,SAAWC,UAAYA,SA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D,EAAAA,UAAU,CAACG,EAAMA,OAAED,EAAIA,KAAED,EAAMA,SACnC5D,UAAW4D,EAAMA,OACjBpD,aAAcqD,EAAIA,KAClBnD,eAAgBmD,EAAIA,KACpB1D,QAAS6D,EAAGA,IAACC,YACX,GACJhG,EAAUiG,aAAe,CACvBnF,cAAUuC,EACVtC,UAAU,EACVqB,aAAa,EACbC,kBAAcgB,EACdrC,eAAe,EACfG,WAAW,EACXF,iBAAiB,EACjBC,YAAY,EACZM,wBAAoB6B,EACpBjC,wBAAoBiC,EACpBhC,WAAOgC,EACP/B,eAAW+B,EACX9B,eAAW8B,EACX3B,YAAQ2B,EACRzB,GAAI,MACJG,UAAW,CAAE,EACbQ,kBAAcc,EACdZ,oBAAgBY"}
1
+ {"version":3,"file":"Lock.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/Lock.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { useEffect } from 'react';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n // report incorrect integration - https://github.com/theKashey/react-focus-lock/issues/123\n if (!observed.current && typeof Container !== 'string') {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), // first tabbed element guard\n hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n hasPositiveIndices: undefined,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;"],"names":["emptyArray","FocusLock","React","forwardRef","props","parentRef","_extends2","_React$useState","useState","realObserved","setObserved","observed","useRef","isActive","originalFocusedElement","children","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","allowTextSelection","group","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","useCallback","current","document","activeElement","useEffect","allowDefer","returnFocusTo","focus","howToReturnFocus","returnFocusOptions","undefined","Promise","resolve","then","onFocus","event","mediumFocus","useMedium","onBlur","mediumBlur","setObserveNode","newObserved","process","env","NODE_ENV","console","warn","error","_extends","constants.FOCUS_DISABLED","constants.FOCUS_GROUP","FOCUS_GROUP","hasLeadingGuards","hasTailingGuards","mergedRef","useMergeRefs","createElement","Fragment","key","tabIndex","style","hiddenGuard","mediumSidecar","ref","propTypes","node","bool","oneOfType","object","func","string","arrayOf","any","isRequired","defaultProps"],"mappings":"2oBAQIA,EAAa,GACbC,EAAyBC,EAAMC,YAAW,SAAqBC,EAAO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C,EACP/B,eAAW+B,EACX9B,eAAW8B,EACX3B,YAAQ2B,EACRzB,GAAI,MACJG,UAAW,CAAE,EACbQ,kBAAcc,EACdZ,oBAAgBY"}
@@ -1 +1 @@
1
- {"version":3,"file":"medium.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/medium.js"],"sourcesContent":["import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true\n});"],"names":["mediumFocus","createMedium","_ref","target","currentTarget","mediumBlur","mediumEffect","mediumSidecar","createSidecarMedium","async"],"mappings":"gMACWA,EAAcC,EAAYA,aAAC,IAAI,SAAUC,GAGlD,MAAO,CACLC,OAHWD,EAAKC,OAIhBC,cAHkBF,EAAKE,cAK3B,IACWC,EAAaJ,EAAAA,eACbK,EAAeL,EAAAA,eACfM,EAAgBC,EAAAA,oBAAoB,CAC7CC,OAAO"}
1
+ {"version":3,"file":"medium.js","sources":["../../../../../../node_modules/react-focus-lock/dist/es2015/medium.js"],"sourcesContent":["import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true // focus-lock sidecar is not required on the server\n // however, it might be required for JSDOM tests\n // ssr: true,\n\n});"],"names":["mediumFocus","createMedium","_ref","target","currentTarget","mediumBlur","mediumEffect","mediumSidecar","createSidecarMedium","async"],"mappings":"gMACWA,EAAcC,EAAYA,aAAC,IAAI,SAAUC,GAGlD,MAAO,CACLC,OAHWD,EAAKC,OAIhBC,cAHkBF,EAAKE,cAK3B,IACWC,EAAaJ,EAAAA,eACbK,EAAeL,EAAAA,eACfM,EAAgBC,EAAAA,oBAAoB,CAC7CC,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-intersection-observer.modern.mjs.js","sources":["../../../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n const unobserve = React.useRef();\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView\n }); // Store the onChange callback in a `ref`, so we can access the latest instance inside the `useCallback`.\n\n callback.current = onChange;\n const setRef = React.useCallback(node => {\n if (unobserve.current !== undefined) {\n unobserve.current();\n unobserve.current = undefined;\n } // Skip creating the observer\n\n\n if (skip) return;\n\n if (node) {\n unobserve.current = observe(node, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve.current) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve.current();\n unobserve.current = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n /* eslint-disable-next-line */\n\n React.useEffect(() => {\n if (!unobserve.current && state.entry && !triggerOnce && !skip) {\n // If we don't have a ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n setState({\n inView: !!initialInView\n });\n }\n });\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","optionsToId","options","keys","sort","filter","undefined","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","React","Component","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","createElement"],"mappings":"6XAEA,SAASA,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN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GAC7C,GAAc,MAAV7F,EAAgB,MAAO,GAC3B,IAEIC,EAAKJ,EAFLD,EAAS,CAAA,EACTkG,EAAapG,OAAOqB,KAAKf,GAG7B,IAAKH,EAAI,EAAGA,EAAIiG,EAAW/F,OAAQF,IACjCI,EAAM6F,EAAWjG,GACbgG,EAASlC,QAAQ1D,IAAQ,IAC7BL,EAAOK,GAAOD,EAAOC,IAGvB,OAAOL,CACT,CAkTkBmG,CAA8BJ,EAAa3B,GAEzD,OAAOK,EAAM2B,cAAcJ,GAAM,MAAOnG,EAAS,CAC/CiG,IAAKpF,KAAKqE,YACTT,GAAQC,EACZ"}
1
+ {"version":3,"file":"react-intersection-observer.modern.mjs.js","sources":["../../../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n React.useEffect(() => {\n if (!ref && entryTarget && !triggerOnce && !skip) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n }, [ref, entryTarget, triggerOnce, skip, initialInView]);\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","optionsToId","options","keys","sort","filter","undefined","map","root","has","set","toString","get","observe","element","callback","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","React","Component","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","createElement"],"mappings":"6XAEA,SAASA,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,GAG1B,CAED,OAAOL,CACX,EAESH,EAASY,MAAMC,KAAMR,UAC9B,CAiBA,MAAMS,EAAc,IAAIC,IAClBC,EAAU,IAAIC,QACpB,IACIC,EADAC,EAAS,EA+Bb,SAASC,EAAYC,GACnB,OAAOpB,OAAOqB,KAAKD,GAASE,OAAOC,QAAOhB,QAAwBiB,IAAjBJ,EAAQb,KAAoBkB,KAAIlB,IAC/E,MAAO,GAAGA,KAAe,SAARA,GAhBFmB,EAgB6BN,EAAQM,KAfjDA,GACDX,EAAQY,IAAID,KAChBR,GAAU,EACVH,EAAQa,IAAIF,EAAMR,EAAOW,aAFKd,EAAQe,IAAIJ,IADxB,KAe4CN,EAAQb,KAhBxE,IAAmBmB,CAgB2D,IACzEG,UACL,CAmDA,SAASE,EAAQC,EAASC,EAAUb,EAAU,CAAE,EAAEc,EAAiBjB,GACjE,QAA2C,IAAhCkB,OAAOC,2BAA2DZ,IAAnBU,EAA8B,CACtF,MAAMG,EAASL,EAAQM,wBAUvB,OATAL,EAASC,EAAgB,CACvBK,eAAgBL,EAChBhC,OAAQ8B,EACRQ,kBAAgD,iBAAtBpB,EAAQqB,UAAyBrB,EAAQqB,UAAY,EAC/EC,KAAM,EACNC,mBAAoBN,EAC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,aAAc,CACxD9C,YACAf,OACAkE,aAEAnC,kBAEAoC,SACC3D,EACJ,CAEDiC,YACMvD,KAAKoE,eACPpE,KAAKoE,eAELpE,KAAKoE,aAAe,KAEvB,CAEDe,SACE,IAAKxB,EAAgB3D,KAAK4D,OAAQ,CAChC,MAAMjB,OACJA,EAAMF,MACNA,GACEzC,KAAK6E,MACT,OAAO7E,KAAK4D,MAAMC,SAAS,CACzBlB,SACAF,QACA2C,IAAKpF,KAAKqE,YAEb,CAED,MAAMgB,EAAcrF,KAAK4D,OACnBC,SACJA,EAAQyB,GACRA,GACED,EACEzB,EA/TV,SAAuClE,EAAQ6F,GAC7C,GAAc,MAAV7F,EAAgB,MAAO,GAC3B,IAEIC,EAAKJ,EAFLD,EAAS,CAAA,EACTkG,EAAapG,OAAOqB,KAAKf,GAG7B,IAAKH,EAAI,EAAGA,EAAIiG,EAAW/F,OAAQF,IACjCI,EAAM6F,EAAWjG,GACbgG,EAASlC,QAAQ1D,IAAQ,IAC7BL,EAAOK,GAAOD,EAAOC,IAGvB,OAAOL,CACT,CAkTkBmG,CAA8BJ,EAAa3B,GAEzD,OAAOK,EAAM2B,cAAcJ,GAAM,MAAOnG,EAAS,CAC/CiG,IAAKpF,KAAKqE,YACTT,GAAQC,EACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"tslib.es6.js","sources":["../../../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","cooked","raw","defineProperty","value","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable"],"mappings":"oEA+BWA,QAAAA,SAAW,WAQlB,OAPAA,QAAAA,SAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,iBAASa,MAAMC,KAAMP,UAChC,+BAwKO,SAA8BQ,EAAQC,GAEzC,OADIf,OAAOgB,eAAkBhB,OAAOgB,eAAeF,EAAQ,MAAO,CAAEG,MAAOF,IAAiBD,EAAOC,IAAMA,EAClGD,CACX,iBAzKO,SAAgBX,EAAGe,GACtB,IAAIhB,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMU,EAAEC,QAAQX,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOoB,sBACtB,KAAIhB,EAAI,EAAb,IAAgBI,EAAIR,OAAOoB,sBAAsBjB,GAAIC,EAAII,EAAED,OAAQH,IAC3Dc,EAAEC,QAAQX,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUY,qBAAqBV,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX"}
1
+ {"version":3,"file":"tslib.es6.js","sources":["../../../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","cooked","raw","defineProperty","value","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable"],"mappings":"oEA+BWA,QAAAA,SAAW,WAQlB,OAPAA,QAAAA,SAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,iBAASa,MAAMC,KAAMP,UAChC,+BAwKO,SAA8BQ,EAAQC,GAEzC,OADIf,OAAOgB,eAAkBhB,OAAOgB,eAAeF,EAAQ,MAAO,CAAEG,MAAOF,IAAiBD,EAAOC,IAAMA,EAClGD,CACX,iBAzKO,SAAgBX,EAAGe,GACtB,IAAIhB,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMU,EAAEC,QAAQX,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOoB,sBACtB,KAAIhB,EAAI,EAAb,IAAgBI,EAAIR,OAAOoB,sBAAsBjB,GAAIC,EAAII,EAAED,OAAQH,IAC3Dc,EAAEC,QAAQX,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUY,qBAAqBV,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),n=require("styled-components"),r=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js"),a=require("../../hooks/useKey.js"),s=require("../../utils/debounce.js"),o=require("../Text/index.js"),i=require("../TextField/index.js"),u=require("../IconFa/index.js"),l=require("../../themes/cruk.js"),d=require("./styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=c(t),h=t.forwardRef((function(c,h){var p=c.apiKey,m=c.countries,g=c.errorMessage,y=c.hasError,v=c.isValid,E=c.isValidVisible,w=c.isInvalidVisible,b=c.label,j=c.onAddressError,x=void 0===j?function(e){}:j,I=c.onAddressSelected,T=c.onChange,_=c.onBlur,k=e.__rest(c,["apiKey","countries","errorMessage","hasError","isValid","isValidVisible","isInvalidVisible","label","onAddressError","onAddressSelected","onChange","onBlur"]),q=t.useState([]),V=q[0],C=q[1],A=t.useState(-1),S=A[0],K=A[1],D=t.useRef(null),F=n.useTheme(),L=e.__assign(e.__assign({},l.default),F),R=function(){K(-1),C([])},M=t.useCallback(s.default(500,(function(e){return O(e)})),[]),O=function(e,t){if(void 0===t&&(t=""),0===e.length)return C([]);var n="".concat("https://api.addressy.com/Capture/Interactive/Find/v1.1/json3.ws","?Key=").concat(p,"&Text=").concat(e,"&Container=").concat(t);return void 0!==m&&(n="".concat(n,"&Countries=").concat(m.join(","))),fetch(n).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){if(e.Items[0].Error)throw new Error("Something went wrong please try again");return C(e.Items||[]),null})).catch((function(e){return x(e)})),null},B=function(e){fetch("".concat("https://api.addressy.com/Capture/Interactive/Retrieve/v1/json3.ws","?Key=").concat(p,"&Id=").concat(e)).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){return R(),I(e.Items[0]),null})).catch((function(e){return x(e)}))},H=function(e){return"Address"===e.Type?B(e.Id):(O(e.Text,e.Id),null)},U=function(e){D.current&&e.target instanceof HTMLElement&&!D.current.contains(e.target)&&R()};return t.useEffect((function(){return document.addEventListener("mousedown",U),function(){document.removeEventListener("mousedown",U)}})),a.useKey((function(){R()}),{detectKeys:["Escape","Tab"]},[]),f.default.createElement(f.default.Fragment,null,f.default.createElement(i.default,e.__assign({"aria-activedescendant":V.length?"addressOptions-".concat(S):"","aria-owns":"found_addresses","aria-autocomplete":"both","aria-expanded":V.length?"true":"false",autoComplete:"off",hasError:y||!!g,errorMessage:g,hintText:"Start typing your address or postcode",isValid:v,isValidVisible:E,isInvalidVisible:w,label:null!=b?b:"Home address",ref:h,required:!0,role:"combobox",type:"search"},k,{onKeyDown:function(e){"Enter"===e.key&&V[S]?(e.preventDefault(),"Address"===V[S].Type&&B(V[S].Id),O(V[S].Text,V[S].Id),K(-1)):"ArrowUp"===e.key?(e.preventDefault(),S<=-1&&K(V.length-1),K(S-1)):"ArrowDown"===e.key?(e.preventDefault(),S+1>=V.length&&K(0),K(S+1)):K(-1)},onChange:function(e){M(e.target.value),T&&T(e)},onBlur:function(e){var t=!!V.length;_&&!t&&_(e)}})),!!V.length&&f.default.createElement(f.default.Fragment,null,f.default.createElement(d.ScreenReaderOnly,{role:"status","aria-live":"assertive"},!!V.length&&"We have found ".concat(V.length," result").concat(1!==V.length?"s":""," matching your search. Use up and down arrow keys to navigate")),f.default.createElement(d.ListWrapper,{ref:D},f.default.createElement(d.List,{"aria-label":"found addresses",id:"found_addresses",role:"listbox",theme:L},V.map((function(e,t){return f.default.createElement(d.ListItem,{tabIndex:0,id:"addressOptions-".concat(t),isActive:t===S,key:e.Id,onClick:function(){H(e)},onKeyDown:function(t){"Enter"===t.key&&H(e)},role:"option","data-hj-suppress":!0,theme:L},f.default.createElement(o.Text,{as:"span","data-hj-suppress":!0},e.Text," ",e.Description),"Address"!==e.Type&&f.default.createElement(f.default.Fragment,null,f.default.createElement(d.ScreenReaderOnly,null,"press enter for these addresses"),f.default.createElement(u.default,{faIcon:r.faChevronRight})))}))))))}));exports.default=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),n=require("styled-components"),r=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),a=require("../../hooks/useKey.js"),s=require("../../utils/debounce.js"),o=require("../Text/index.js"),i=require("../TextField/index.js"),u=require("../IconFa/index.js"),l=require("../../themes/cruk.js"),d=require("./styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=c(t),h=t.forwardRef((function(c,h){var m=c.apiKey,p=c.countries,g=c.errorMessage,y=c.hasError,v=c.isValid,E=c.isValidVisible,w=c.isInvalidVisible,b=c.label,j=c.onAddressError,x=void 0===j?function(e){}:j,I=c.onAddressSelected,T=c.onChange,_=c.onBlur,k=e.__rest(c,["apiKey","countries","errorMessage","hasError","isValid","isValidVisible","isInvalidVisible","label","onAddressError","onAddressSelected","onChange","onBlur"]),q=t.useState([]),V=q[0],C=q[1],A=t.useState(-1),S=A[0],K=A[1],D=t.useRef(null),F=n.useTheme(),L=e.__assign(e.__assign({},l.default),F),R=function(){K(-1),C([])},M=t.useCallback(s.default(500,(function(e){return O(e)})),[]),O=function(e,t){if(void 0===t&&(t=""),0===e.length)return C([]);var n="".concat("https://api.addressy.com/Capture/Interactive/Find/v1.1/json3.ws","?Key=").concat(m,"&Text=").concat(e,"&Container=").concat(t);return void 0!==p&&(n="".concat(n,"&Countries=").concat(p.join(","))),fetch(n).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){if(e.Items[0].Error)throw new Error("Something went wrong please try again");return C(e.Items||[]),null})).catch((function(e){return x(e)})),null},B=function(e){fetch("".concat("https://api.addressy.com/Capture/Interactive/Retrieve/v1/json3.ws","?Key=").concat(m,"&Id=").concat(e)).then((function(e){if(!e.ok)throw new Error("Something went wrong please try again");return e.json()})).then((function(e){return R(),I(e.Items[0]),null})).catch((function(e){return x(e)}))},H=function(e){return"Address"===e.Type?B(e.Id):(O(e.Text,e.Id),null)},U=function(e){D.current&&e.target instanceof HTMLElement&&!D.current.contains(e.target)&&R()};return t.useEffect((function(){return document.addEventListener("mousedown",U),function(){document.removeEventListener("mousedown",U)}})),a.useKey((function(){R()}),{detectKeys:["Escape","Tab"]},[]),f.default.createElement(f.default.Fragment,null,f.default.createElement(i.default,e.__assign({"aria-activedescendant":V.length?"addressOptions-".concat(S):"","aria-owns":"found_addresses","aria-autocomplete":"both","aria-expanded":V.length?"true":"false",autoComplete:"off",hasError:y||!!g,errorMessage:g,hintText:"Start typing your address or postcode",isValid:v,isValidVisible:E,isInvalidVisible:w,label:null!=b?b:"Home address",ref:h,required:!0,role:"combobox",type:"search"},k,{onKeyDown:function(e){"Enter"===e.key&&V[S]?(e.preventDefault(),"Address"===V[S].Type&&B(V[S].Id),O(V[S].Text,V[S].Id),K(-1)):"ArrowUp"===e.key?(e.preventDefault(),S<=-1&&K(V.length-1),K(S-1)):"ArrowDown"===e.key?(e.preventDefault(),S+1>=V.length&&K(0),K(S+1)):K(-1)},onChange:function(e){M(e.target.value),T&&T(e)},onBlur:function(e){var t=!!V.length;_&&!t&&_(e)}})),!!V.length&&f.default.createElement(f.default.Fragment,null,f.default.createElement(d.ScreenReaderOnly,{role:"status","aria-live":"assertive"},!!V.length&&"We have found ".concat(V.length," result").concat(1!==V.length?"s":""," matching your search. Use up and down arrow keys to navigate")),f.default.createElement(d.ListWrapper,{ref:D},f.default.createElement(d.List,{"aria-label":"found addresses",id:"found_addresses",role:"listbox",theme:L},V.map((function(e,t){return f.default.createElement(d.ListItem,{tabIndex:0,id:"addressOptions-".concat(t),isActive:t===S,key:e.Id,onClick:function(){H(e)},onKeyDown:function(t){"Enter"===t.key&&H(e)},role:"option","data-hj-suppress":!0,theme:L},f.default.createElement(o.Text,{as:"span","data-hj-suppress":!0},e.Text," ",e.Description),"Address"!==e.Type&&f.default.createElement(f.default.Fragment,null,f.default.createElement(d.ScreenReaderOnly,null,"press enter for these addresses"),f.default.createElement(u.default,{faIcon:r.faChevronRight})))}))))))}));exports.default=h;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default="IyBBdmF0YXIKCiMjIyBEaXNwbGF5IGFuIGF2YXRhcgoKWW91IGNhbiB1c2UgYW4gYXZhdGFyIHRvIGRpc3BsYXkgb3duZXJzaGlwIG9mIGFuIGl0ZW0gb2YgY29udGVudC4gSWYgeW91IHBhc3MgYSBVUkwgb2YgYW4gaW1hZ2UgdGhhdCB3aWxsIGJlIGRpc3BsYXllZCBvdGhlcndpc2UgdGhlIGZpcnN0IGxldHRlciBvZiB0aGUgbmFtZSB3aWxsIGJlIHVzZWQgdG8gZGlzcGxheSBhIGJyYW5kZWQgYXZhdGFyLgoKIyMjIFRyeSBpdCBvdXQKCmBgYC50c3gKPD4KICA8QXZhdGFyIC8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InMiIGFyaWEtbGFiZWw9InNhbSdzIHByb2ZpbGUiLz4KICA8QXZhdGFyIG5hbWU9IlNhbSIgc2l6ZT0ibSIgYXJpYS1sYWJlbD0ic2FtJ3MgcHJvZmlsZSIvPgogIDxBdmF0YXIgbmFtZT0iU2FtIiBzaXplPSJsIiBhcmlhLWxhYmVsPSJzYW0ncyBwcm9maWxlIi8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InhsIiBhcmlhLWxhYmVsPSJzYW0ncyBwcm9maWxlIi8+CiAgPEF2YXRhcgogICAgbmFtZT0iU2FtIgogICAgYXJpYS1sYWJlbD0ic2FtJ3MgcHJvZmlsZSIKICAgIHVybD0iaHR0cHM6Ly92aWEucGxhY2Vob2xkZXIuY29tLzMwMC8yZTAwOGIvZDkzMThhP3RleHQ9YXZhdGFyIgogIC8+CjwvPgpgYGAKCiMjIFByb3BzCgp8IE5hbWUgfCBUeXBlICAgfCAgICAgT3B0aW9ucyAgICAgIHwgRGVmYXVsdCAgIHwgRGVzY3JpcHRpb24gICAgICAgICAgICAgICAgICAgICAgICAgICB8CnwgOi0tLSB8IDotLS0tLSB8IDotLS0tLS0tLS0tLS0tLTogfCA6LS0tLS0tLS0gfCA6LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIHwKfCBuYW1lIHwgU3RyaW5nIHwgICAgICAgICAgICAgICAgICB8IEFub255bW91cyB8IFRpdGxlIHRvIGJlIGRpc3BsYXllZCBhcyBwcmltYXJ5IHRleHQgfAp8IHNpemUgfCBTdHJpbmcgfCAicyIgIm0iICJsIiAieGwiIHwgIm0iICAgICAgIHwgRGVmaW5lIHRoZSBzaXplIG9mIHRoZSBhdmF0YXIgICAgICAgICB8CnwgdXJsICB8IFN0cmluZyB8ICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgfCBVUkwgb2YgaW1hZ2UgZm9yIGF2YXRhciAgICAgICAgICAgICAgIHwK";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default="IyBBdmF0YXIKCiMjIyBEaXNwbGF5IGFuIGF2YXRhcgoKWW91IGNhbiB1c2UgYW4gYXZhdGFyIHRvIGRpc3BsYXkgb3duZXJzaGlwIG9mIGFuIGl0ZW0gb2YgY29udGVudC4gSXQncyBiYXNpY2FsbHkgYW4gaW1hZ2UgY29tcG9uZW50IHRoYXQgaWYgeW91IHBhc3MgYSBVUkwgb2YgYW4gaW1hZ2UgdGhhdCB3aWxsIGJlIGRpc3BsYXllZCBvdGhlcndpc2UgdGhlIGZpcnN0IGxldHRlciBvZiB0aGUgbmFtZSB3aWxsIGJlIHVzZWQgdG8gZGlzcGxheSBhIGJyYW5kZWQgYXZhdGFyLgoKIyMjIFRyeSBpdCBvdXQKCmBgYC50c3gKPD4KICA8QXZhdGFyIC8+CiA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
@@ -1 +1 @@
1
- {"version":3,"file":"README.md.js","sources":["../../../../../src/components/Avatar/README.md"],"sourcesContent":["export default \"IyBBdmF0YXIKCiMjIyBEaXNwbGF5IGFuIGF2YXRhcgoKWW91IGNhbiB1c2UgYW4gYXZhdGFyIHRvIGRpc3BsYXkgb3duZXJzaGlwIG9mIGFuIGl0ZW0gb2YgY29udGVudC4gSWYgeW91IHBhc3MgYSBVUkwgb2YgYW4gaW1hZ2UgdGhhdCB3aWxsIGJlIGRpc3BsYXllZCBvdGhlcndpc2UgdGhlIGZpcnN0IGxldHRlciBvZiB0aGUgbmFtZSB3aWxsIGJlIHVzZWQgdG8gZGlzcGxheSBhIGJyYW5kZWQgYXZhdGFyLgoKIyMjIFRyeSBpdCBvdXQKCmBgYC50c3gKPD4KICA8QXZhdGFyIC8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InMiIGFyaWEtbGFiZWw9InNhbSdzIHByb2ZpbGUiLz4KICA8QXZhdGFyIG5hbWU9IlNhbSIgc2l6ZT0ibSIgYXJpYS1sYWJlbD0ic2FtJ3MgcHJvZmlsZSIvPgogIDxBdmF0YXIgbmFtZT0iU2FtIiBzaXplPSJsIiBhcmlhLWxhYmVsPSJzYW0ncyBwcm9maWxlIi8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InhsIiBhcmlhLWxhYmVsPSJzYW0ncyBwcm9maWxlIi8+CiAgPEF2YXRhcgogICAgbmFtZT0iU2FtIgogICAgYXJpYS1sYWJlbD0ic2FtJ3MgcHJvZmlsZSIKICAgIHVybD0iaHR0cHM6Ly92aWEucGxhY2Vob2xkZXIuY29tLzMwMC8yZTAwOGIvZDkzMThhP3RleHQ9YXZhdGFyIgogIC8+CjwvPgpgYGAKCiMjIFByb3BzCgp8IE5hbWUgfCBUeXBlICAgfCAgICAgT3B0aW9ucyAgICAgIHwgRGVmYXVsdCAgIHwgRGVzY3JpcHRpb24gICAgICAgICAgICAgICAgICAgICAgICAgICB8CnwgOi0tLSB8IDotLS0tLSB8IDotLS0tLS0tLS0tLS0tLTogfCA6LS0tLS0tLS0gfCA6LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIHwKfCBuYW1lIHwgU3RyaW5nIHwgICAgICAgICAgICAgICAgICB8IEFub255bW91cyB8IFRpdGxlIHRvIGJlIGRpc3BsYXllZCBhcyBwcmltYXJ5IHRleHQgfAp8IHNpemUgfCBTdHJpbmcgfCAicyIgIm0iICJsIiAieGwiIHwgIm0iICAgICAgIHwgRGVmaW5lIHRoZSBzaXplIG9mIHRoZSBhdmF0YXIgICAgICAgICB8CnwgdXJsICB8IFN0cmluZyB8ICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgfCBVUkwgb2YgaW1hZ2UgZm9yIGF2YXRhciAgICAgICAgICAgICAgIHwK\""],"names":[],"mappings":"oFAAe"}
1
+ {"version":3,"file":"README.md.js","sources":["../../../../../src/components/Avatar/README.md"],"sourcesContent":["export default \"IyBBdmF0YXIKCiMjIyBEaXNwbGF5IGFuIGF2YXRhcgoKWW91IGNhbiB1c2UgYW4gYXZhdGFyIHRvIGRpc3BsYXkgb3duZXJzaGlwIG9mIGFuIGl0ZW0gb2YgY29udGVudC4gSXQncyBiYXNpY2FsbHkgYW4gaW1hZ2UgY29tcG9uZW50IHRoYXQgaWYgeW91IHBhc3MgYSBVUkwgb2YgYW4gaW1hZ2UgdGhhdCB3aWxsIGJlIGRpc3BsYXllZCBvdGhlcndpc2UgdGhlIGZpcnN0IGxldHRlciBvZiB0aGUgbmFtZSB3aWxsIGJlIHVzZWQgdG8gZGlzcGxheSBhIGJyYW5kZWQgYXZhdGFyLgoKIyMjIFRyeSBpdCBvdXQKCmBgYC50c3gKPD4KICA8QXZhdGFyIC8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InMiIGFsdD0ic2FtJ3MgcHJvZmlsZSIvPgogIDxBdmF0YXIgbmFtZT0iU2FtIiBzaXplPSJtIiBhbHQ9InNhbSdzIHByb2ZpbGUiLz4KICA8QXZhdGFyIG5hbWU9IlNhbSIgc2l6ZT0ibCIgYWx0PSJzYW0ncyBwcm9maWxlIi8+CiAgPEF2YXRhciBuYW1lPSJTYW0iIHNpemU9InhsIiBhbHQ9InNhbSdzIHByb2ZpbGUiLz4KICA8QXZhdGFyCiAgICBuYW1lPSJTYW0iCiAgICBhbHQ9InNhbSdzIHByb2ZpbGUiCiAgICB1cmw9Imh0dHBzOi8vdmlhLnBsYWNlaG9sZGVyLmNvbS8zMDAvMmUwMDhiL2Q5MzE4YT90ZXh0PWF2YXRhciIKICAvPgo8Lz4KYGBgCgojIyBQcm9wcwoKfCBOYW1lIHwgVHlwZSAgIHwgICAgIE9wdGlvbnMgICAgICB8IERlZmF1bHQgICB8IERlc2NyaXB0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgfAp8IDotLS0gfCA6LS0tLS0gfCA6LS0tLS0tLS0tLS0tLS06IHwgOi0tLS0tLS0tIHwgOi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSB8CnwgbmFtZSB8IFN0cmluZyB8ICAgICAgICAgICAgICAgICAgfCBBbm9ueW1vdXMgfCBUaXRsZSB0byBiZSBkaXNwbGF5ZWQgYXMgcHJpbWFyeSB0ZXh0IHwKfCBzaXplIHwgU3RyaW5nIHwgInMiICJtIiAibCIgInhsIiB8ICJtIiAgICAgICB8IERlZmluZSB0aGUgc2l6ZSBvZiB0aGUgYXZhdGFyICAgICAgICAgfAp8IHVybCAgfCBTdHJpbmcgfCAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgIHwgVVJMIG9mIGltYWdlIGZvciBhdmF0YXIgICAgICAgICAgICAgICB8Cg==\""],"names":[],"mappings":"oFAAe"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,s,u=r(o),b=u.default.span(t||(t=n.__makeTemplateObject(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),m=u.default.button(s||(s=n.__makeTemplateObject(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),"3rem",(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("3rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.isIconButton?"".concat("3rem"):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(r){return"primary"===r.appearance&&o.css(e||(e=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonPrimaryBackground,r.theme.colors.buttonPrimaryBorder,r.theme.colors.buttonPrimaryText,r.theme.colors.buttonPrimaryBackgroundHover,r.theme.colors.buttonPrimaryBorderHover,r.theme.colors.buttonPrimaryTextHover,r.theme.colors.buttonPrimaryDisabledBackground,r.theme.colors.buttonPrimaryDisabledText,r.theme.colors.buttonPrimaryDisabledBorder)}),(function(r){return"secondary"===r.appearance&&o.css(c||(c=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonSecondaryBackground,r.theme.colors.buttonSecondaryBorder,r.theme.colors.buttonSecondaryText,r.theme.colors.buttonSecondaryBackgroundHover,r.theme.colors.buttonSecondaryBorderHover,r.theme.colors.buttonSecondaryTextHover,r.theme.colors.buttonSecondaryDisabledBackground,r.theme.colors.buttonSecondaryDisabledText,r.theme.colors.buttonSecondaryDisabledBorder)}),(function(r){return"tertiary"===r.appearance&&o.css(a||(a=n.__makeTemplateObject(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),r.theme.colors.buttonTertiaryText,r.theme.colors.buttonTertiaryTextHover,r.theme.colors.buttonTertiaryDisabledText)}),(function(r){return"l"===r.size&&o.css(i||(i=n.__makeTemplateObject(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),"4rem",(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat("4rem"," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat("4rem"):"auto"}),(function(n){return n.isIconButton?"".concat("4rem"):"min-content"}))}),(function(r){return r.full&&o.css(l||(l=n.__makeTemplateObject(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(r){return r.css&&o.css(d||(d=n.__makeTemplateObject(["\n ","\n "],["\n ","\n "])),r.css)}));exports.Spacer=b,exports.StyledButton=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),o=require("styled-components");function r(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,e,c,a,i,l,d,s,u=r(o),b="3rem",m="4rem",h=u.default.span(t||(t=n.__makeTemplateObject(["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"],["\n margin-left: ",";\n &:first-of-type {\n margin-left: 0;\n }\n"])),(function(n){return n.theme.spacing.xxs})),p=u.default.button(s||(s=n.__makeTemplateObject(["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"],["\n box-sizing: border-box;\n min-height: ",";\n height: min-content;\n display: inline-block;\n vertical-align: middle;\n padding: ",";\n width: ",";\n min-width: ",";\n\n border-radius: ",";\n border-style: solid;\n border-width: ",";\n\n transition: color 0.2s ease, background-color 0.2s ease,\n border-color 0.2s ease;\n\n cursor: pointer;\n font-size: ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n text-transform: ",";\n text-decoration: ",";\n\n &:focus-visible {\n outline: auto;\n }\n\n ","\n\n ","\n\n ","\n \n ","\n\n ","\n\n ","\n"])),b,(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(b," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat(b):"auto"}),(function(n){return n.isIconButton?"".concat(b):"auto"}),(function(n){return n.theme.button.borderRadius}),(function(n){return n.theme.button.buttonBorderThickness}),(function(n){return n.theme.fontSizes.m}),(function(n){return n.theme.typography.fontFamilyHeadings}),(function(n){return n.theme.typography.fontWeightMedium}),(function(n){return n.theme.button.textTransform}),(function(n){return n.theme.button.textDecoration}),(function(r){return"primary"===r.appearance&&o.css(e||(e=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonPrimaryBackground,r.theme.colors.buttonPrimaryBorder,r.theme.colors.buttonPrimaryText,r.theme.colors.buttonPrimaryBackgroundHover,r.theme.colors.buttonPrimaryBorderHover,r.theme.colors.buttonPrimaryTextHover,r.theme.colors.buttonPrimaryDisabledBackground,r.theme.colors.buttonPrimaryDisabledText,r.theme.colors.buttonPrimaryDisabledBorder)}),(function(r){return"secondary"===r.appearance&&o.css(c||(c=n.__makeTemplateObject(["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "],["\n background-color: ",";\n border-color: ",";\n color: "," !important;\n :focus,\n :hover {\n background-color: ",";\n border-color: ",";\n color: "," !important;\n }\n :disabled {\n cursor: not-allowed;\n background-color: ",";\n color: "," !important;\n border-color: ",";\n }\n "])),r.theme.colors.buttonSecondaryBackground,r.theme.colors.buttonSecondaryBorder,r.theme.colors.buttonSecondaryText,r.theme.colors.buttonSecondaryBackgroundHover,r.theme.colors.buttonSecondaryBorderHover,r.theme.colors.buttonSecondaryTextHover,r.theme.colors.buttonSecondaryDisabledBackground,r.theme.colors.buttonSecondaryDisabledText,r.theme.colors.buttonSecondaryDisabledBorder)}),(function(r){return"tertiary"===r.appearance&&o.css(a||(a=n.__makeTemplateObject(["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "],["\n display: inline-block;\n padding: 0;\n border: 0px;\n background-color: rgba(255, 255, 255, 0);\n transition: color 0.2s ease;\n color: ",";\n :focus,\n :hover {\n color: ",";\n }\n :disabled {\n cursor: not-allowed;\n background-color: transparent;\n color: "," !important;\n border-color: transparent;\n }\n "])),r.theme.colors.buttonTertiaryText,r.theme.colors.buttonTertiaryTextHover,r.theme.colors.buttonTertiaryDisabledText)}),(function(r){return"l"===r.size&&o.css(i||(i=n.__makeTemplateObject(["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "],["\n min-height: ",";\n border-radius: ",";\n padding: ",";\n min-width: ",";\n height: ",";\n "])),m,(function(n){return n.theme.button.borderRadiusLarge}),(function(n){var o=n.theme;return n.isIconButton?"0":"calc( (".concat(m," - ( ").concat(o.button.buttonBorderThickness," * 2) - ").concat(o.typography.lineHeight," ) / 2) ").concat(o.spacing.m)}),(function(n){return n.isIconButton?"".concat(m):"auto"}),(function(n){return n.isIconButton?"".concat(m):"min-content"}))}),(function(r){return r.full&&o.css(l||(l=n.__makeTemplateObject(["\n width: 100%;\n "],["\n width: 100%;\n "])))}),(function(r){return r.css&&o.css(d||(d=n.__makeTemplateObject(["\n ","\n "],["\n ","\n "])),r.css)}));exports.Spacer=h,exports.StyledButton=p;
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),l=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js"),r=require("../IconFa/index.js"),n=require("./styles.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(t),o=function(t){return u.default.createElement("div",null,u.default.createElement(n.CarouselButton,e.__assign({},t,{"aria-label":"previous"}),u.default.createElement(n.VerticalAlign,null,u.default.createElement(r.default,{faIcon:l.faCaretLeft,size:"1.25em"}),u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},c=function(t){return u.default.createElement("div",null,u.default.createElement(n.CarouselButton,e.__assign({},t,{"aria-label":"next"}),u.default.createElement(n.VerticalAlign,null,u.default.createElement(r.default,{faIcon:l.faCaretRight,size:"1.25em"}),u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},i=function(e){var t=e.count,l=e.currentPosition,r=void 0===l?0:l,a=e.scrollToPosition,i=e.next,s=e.previous,d=r!==t-1,f=0!==r,m=Array.from({length:t},(function(e,t){return"arrayIndex".concat(t)}));return u.default.createElement(n.ButtonWrapper,null,u.default.createElement(o,{disabled:!f,onClick:s}),u.default.createElement(n.DotContainer,{count:t},m.map((function(e,t){var l=t===r;return u.default.createElement(n.Dot,{key:e,selected:l,role:"switch","aria-checked":l,onClick:function(){a(t)}},u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to index ".concat(t)))}))),u.default.createElement(c,{disabled:!d,onClick:i}))};exports.CarouselLeftButton=o,exports.CarouselRightButton=c,exports.Dots=i,exports.default=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),l=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),r=require("../IconFa/index.js"),n=require("./styles.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(t),o=function(t){return u.default.createElement("div",null,u.default.createElement(n.CarouselButton,e.__assign({},t,{"aria-label":"previous"}),u.default.createElement(n.VerticalAlign,null,u.default.createElement(r.default,{faIcon:l.faCaretLeft,size:"1.25em"}),u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},c=function(t){return u.default.createElement("div",null,u.default.createElement(n.CarouselButton,e.__assign({},t,{"aria-label":"next"}),u.default.createElement(n.VerticalAlign,null,u.default.createElement(r.default,{faIcon:l.faCaretRight,size:"1.25em"}),u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to previous index"))))},i=function(e){var t=e.count,l=e.currentPosition,r=void 0===l?0:l,a=e.scrollToPosition,i=e.next,s=e.previous,d=r!==t-1,f=0!==r,m=Array.from({length:t},(function(e,t){return"arrayIndex".concat(t)}));return u.default.createElement(n.ButtonWrapper,null,u.default.createElement(o,{disabled:!f,onClick:s}),u.default.createElement(n.DotContainer,{count:t},m.map((function(e,t){var l=t===r;return u.default.createElement(n.Dot,{key:e,selected:l,role:"switch","aria-checked":l,onClick:function(){a(t)}},u.default.createElement(n.ScreenReaderOnly,null,"Scroll carousel to index ".concat(t)))}))),u.default.createElement(c,{disabled:!d,onClick:i}))};exports.CarouselLeftButton=o,exports.CarouselRightButton=c,exports.Dots=i,exports.default=i;
2
2
  //# sourceMappingURL=Dots.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react"),t=require("styled-components"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js"),l=require("../../themes/cruk.js"),s=require("../ErrorText/index.js"),d=require("../IconFa/index.js"),i=require("./styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(r),n=r.forwardRef((function(r,o){var n=t.useTheme(),c=e.__assign(e.__assign({},l.default),n),f=r.children,m=e.__rest(r,["children"]);return u.default.createElement(t.ThemeProvider,{theme:c},u.default.createElement(i.StyledLabel,{hasError:r.hasError||!!r.errorMessage||!1,checked:r.checked||r.defaultChecked||!1,disabled:r.disabled||!1},u.default.createElement(i.StyledInput,e.__assign({},m,{type:"checkbox",ref:o,"aria-describedby":r.id&&r.errorMessage?"".concat(r.id,"-error"):void 0})),u.default.createElement(i.SelectedBorder,null),f||r.value,c.utilities.useDefaultFromControls?null:u.default.createElement(i.CheckWrapper,null,u.default.createElement(i.Check,null,u.default.createElement(d.default,{faIcon:a.faCheck,color:"primary",size:"1.25em"})))),!!r.errorMessage&&u.default.createElement(s.default,{marginTop:"xxs",id:r.id?"".concat(r.id,"-error"):void 0},r.errorMessage))}));exports.default=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react"),t=require("styled-components"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),l=require("../../themes/cruk.js"),s=require("../ErrorText/index.js"),d=require("../IconFa/index.js"),i=require("./styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(r),n=r.forwardRef((function(r,o){var n=t.useTheme(),c=e.__assign(e.__assign({},l.default),n),f=r.children,m=e.__rest(r,["children"]);return u.default.createElement(t.ThemeProvider,{theme:c},u.default.createElement(i.StyledLabel,{hasError:r.hasError||!!r.errorMessage||!1,checked:r.checked||r.defaultChecked||!1,disabled:r.disabled||!1},u.default.createElement(i.StyledInput,e.__assign({},m,{type:"checkbox",ref:o,"aria-describedby":r.id&&r.errorMessage?"".concat(r.id,"-error"):void 0})),u.default.createElement(i.SelectedBorder,null),f||r.value,c.utilities.useDefaultFromControls?null:u.default.createElement(i.CheckWrapper,null,u.default.createElement(i.Check,null,u.default.createElement(d.default,{faIcon:a.faCheck,color:"primary",size:"1.25em"})))),!!r.errorMessage&&u.default.createElement(s.default,{marginTop:"xxs",id:r.id?"".concat(r.id,"-error"):void 0},r.errorMessage))}));exports.default=n;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),t=require("styled-components");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,i,r,s,a,l,c,p,d=e(t),u=d.default.div(o||(o=n.__makeTemplateObject(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),"1.5rem","1.5rem","1.5rem",(function(n){return n.theme.spacing.xs})),h=d.default.span(i||(i=n.__makeTemplateObject(["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),(function(n){return n.theme.colors.selectionBorder}),"1.5rem","1.5rem"),m=d.default.label(s||(s=n.__makeTemplateObject(["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: pointer;\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ","\n"],["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: pointer;\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ","\n"])),(function(n){return n.theme.colors.backgroundLight}),(function(n){return n.theme.utilities.inputBorderWidth}),(function(n){var t=n.hasError,e=n.theme,o=n.checked;return t?e.colors.textError:o&&!e.utilities.useDefaultFocusRect?e.colors.primary:e.colors.inputBorder}),(function(n){var t=n.theme;return n.checked||!t.utilities.useDefaultFocusRect?t.typography.fontWeightHeavy:t.typography.fontWeightNormal}),(function(n){var t=n.theme;return n.disabled?t.colors.disabled:t.colors.textDark}),(function(n){var t=n.theme;return"calc( (".concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.m," calc( (").concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.xl)}),u,h,(function(e){return e.theme.utilities.useDefaultFromControls?null:t.css(r||(r=n.__makeTemplateObject(["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "],["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "])),u,h,(function(n){return n.theme.colors.primary}))})),f=d.default.div(a||(a=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),b=d.default.input(p||(p=n.__makeTemplateObject(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),(function(e){var o=e.theme;return o.utilities.useDefaultFromControls?t.css(l||(l=n.__makeTemplateObject(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),(function(n){return n.theme.spacing.s})):t.css(c||(c=n.__makeTemplateObject(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),(function(n){return n.theme.spacing.xxs}),f,o.colors.inputBorder,u)}));exports.Check=h,exports.CheckWrapper=u,exports.SelectedBorder=f,exports.StyledInput=b,exports.StyledLabel=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../node_modules/tslib/tslib.es6.js"),t=require("styled-components");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,i,r,s,a,l,c,p,d=e(t),u="1.5rem",h=d.default.div(o||(o=n.__makeTemplateObject(["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"],["\n display: inline-block;\n height: ",";\n width: ",";\n position: absolute;\n top: calc(50% - ("," / 2));\n left: ",";\n"])),u,u,u,(function(n){return n.theme.spacing.xs})),m=d.default.span(i||(i=n.__makeTemplateObject(["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"],["\n display: block;\n position: relative;\n border: 1px solid ",";\n height: ",";\n width: ",";\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n transition: border 0.25s ease;\n overflow: hidden;\n\n svg {\n /* asset is little wonky */\n margin-left: 0.05rem;\n path {\n transition: transform 0.25s ease;\n transform: rotateY(90deg);\n transform-origin: center;\n }\n }\n"])),(function(n){return n.theme.colors.selectionBorder}),u,u),f=d.default.label(s||(s=n.__makeTemplateObject(["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: pointer;\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ","\n"],["\n background-color: ",";\n position: relative;\n border-width: ",";\n border-style: solid;\n border-color: ",";\n cursor: pointer;\n display: block;\n font-weight: ",";\n color: ",";\n padding: ",";\n &:focus ~ "," "," {\n outline: 2px solid #7aacfe; /* for non-webkit browsers */\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ","\n"])),(function(n){return n.theme.colors.backgroundLight}),(function(n){return n.theme.utilities.inputBorderWidth}),(function(n){var t=n.hasError,e=n.theme,o=n.checked;return t?e.colors.textError:o&&!e.utilities.useDefaultFocusRect?e.colors.primary:e.colors.inputBorder}),(function(n){var t=n.theme;return n.checked||!t.utilities.useDefaultFocusRect?t.typography.fontWeightHeavy:t.typography.fontWeightNormal}),(function(n){var t=n.theme;return n.disabled?t.colors.disabled:t.colors.textDark}),(function(n){var t=n.theme;return"calc( (".concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.m," calc( (").concat("3em"," - ( ").concat(t.utilities.inputBorderWidth," * 2) - ").concat(t.typography.lineHeight," ) / 2) ").concat(t.spacing.xl)}),h,m,(function(e){return e.theme.utilities.useDefaultFromControls?null:t.css(r||(r=n.__makeTemplateObject(["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "],["\n min-height: 2rem;\n &:hover "," "," {\n border: solid 1px\n ",";\n }\n "])),h,m,(function(n){return n.theme.colors.primary}))})),b=d.default.div(a||(a=n.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),g=d.default.input(p||(p=n.__makeTemplateObject(["\n margin-right: 5px !important;\n\n ","\n"],["\n margin-right: 5px !important;\n\n ","\n"])),(function(e){var o=e.theme;return o.utilities.useDefaultFromControls?t.css(l||(l=n.__makeTemplateObject(["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "],["\n position: absolute;\n display: inline-block;\n transform: translate(-50%, -50%);\n top: 50%;\n margin: 0;\n padding: 0;\n left: ",";\n "])),(function(n){return n.theme.spacing.s})):t.css(c||(c=n.__makeTemplateObject(["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "],["\n /* This hides the original input */\n position: absolute;\n left: ",";\n opacity: 0;\n\n &:focus ~ "," {\n outline: none !important;\n box-shadow: inset 0 0 0 2px ",";\n box-shadow: inset 0 0 0 2px -webkit-focus-ring-color;\n }\n\n &:checked ~ "," svg path {\n transform: rotateY(0deg);\n }\n "])),(function(n){return n.theme.spacing.xxs}),b,o.colors.inputBorder,h)}));exports.Check=m,exports.CheckWrapper=h,exports.SelectedBorder=b,exports.StyledInput=g,exports.StyledLabel=f;
2
2
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),n=require("styled-components"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js"),r=require("../../themes/cruk.js"),i=require("./styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(t);exports.default=function(o){var u=o.id,c=o.headerTitleText,d=o.headerTitleTextColor,s=o.headerTitleTextSize,f=o.headerTitleTextFontFamily,h=o.headerComponent,m=o.startOpen,p=o.onOpenChange,x=o.children,v=t.useState(m||!1),y=v[0],b=v[1],T=t.useState(m?"initial":"0"),C=T[0],g=T[1],_=t.useRef(null),E=t.useRef(null),S=n.useTheme(),j=e.__assign(e.__assign({},r.default),S),k=function(){var e=_.current;(null==E?void 0:E.current)&&clearTimeout(null==E?void 0:E.current);var t=!y;b(t),null!==e&&g("".concat(e.scrollHeight,"px")),!1===t?setTimeout((function(){return g("0")}),10):E.current=setTimeout((function(){return g("initial")}),1e3*i.transitionDurationSeconds),void 0!==p&&p(t)};return t.useEffect((function(){b(m||!1),g(m?"initial":"0")}),[m]),l.default.createElement("div",null,h?l.default.createElement(i.CustomHeader,{theme:j,"aria-controls":"".concat(u,"-header"),"aria-expanded":y,id:"".concat(u,"-header"),onClick:k,"aria-disabled":!1,"aria-label":c,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),k())},role:"button",tabIndex:0},h):l.default.createElement(i.DefaultHeader,{"aria-controls":"".concat(u,"-header"),"aria-expanded":y,id:"".concat(u,"-header"),onClick:k,theme:j,appearance:"tertiary",type:"button",textColor:d,textSize:s,textFontFamily:f},c,l.default.createElement(i.FlippingIcon,{faIcon:a.faChevronDown,open:y})),l.default.createElement(i.CollapseContent,{theme:j,id:"".concat(u,"-content"),ref:_,role:"region","aria-hidden":!y,"aria-labelledby":"".concat(u,"-header"),contentHeight:C,openStatus:y},x))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.js"),t=require("react"),n=require("styled-components"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),r=require("../../themes/cruk.js"),i=require("./styles.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(t);exports.default=function(o){var u=o.id,c=o.headerTitleText,d=o.headerTitleTextColor,s=o.headerTitleTextSize,f=o.headerTitleTextFontFamily,m=o.headerComponent,h=o.startOpen,p=o.onOpenChange,x=o.children,v=t.useState(h||!1),y=v[0],b=v[1],T=t.useState(h?"initial":"0"),C=T[0],g=T[1],_=t.useRef(null),j=t.useRef(null),E=n.useTheme(),S=e.__assign(e.__assign({},r.default),E),k=function(){var e=_.current;(null==j?void 0:j.current)&&clearTimeout(null==j?void 0:j.current);var t=!y;b(t),null!==e&&g("".concat(e.scrollHeight,"px")),!1===t?setTimeout((function(){return g("0")}),10):j.current=setTimeout((function(){return g("initial")}),1e3*i.transitionDurationSeconds),void 0!==p&&p(t)};return t.useEffect((function(){b(h||!1),g(h?"initial":"0")}),[h]),l.default.createElement("div",null,m?l.default.createElement(i.CustomHeader,{theme:S,"aria-controls":"".concat(u,"-header"),"aria-expanded":y,id:"".concat(u,"-header"),onClick:k,"aria-disabled":!1,"aria-label":c,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),k())},role:"button",tabIndex:0},m):l.default.createElement(i.DefaultHeader,{"aria-controls":"".concat(u,"-header"),"aria-expanded":y,id:"".concat(u,"-header"),onClick:k,theme:S,appearance:"tertiary",type:"button",textColor:d,textSize:s,textFontFamily:f},c,l.default.createElement(i.FlippingIcon,{faIcon:a.faChevronDown,open:y})),l.default.createElement(i.CollapseContent,{theme:S,id:"".concat(u,"-content"),ref:_,role:"region","aria-hidden":!y,"aria-labelledby":"".concat(u,"-header"),contentHeight:C,openStatus:y},x))};
2
2
  //# sourceMappingURL=index.js.map