10 lines
156 KiB
JavaScript
10 lines
156 KiB
JavaScript
|
|
/**
|
||
|
|
* Highcharts JS v11.2.0 (2023-10-30)
|
||
|
|
*
|
||
|
|
* Accessibility module
|
||
|
|
*
|
||
|
|
* (c) 2010-2021 Highsoft AS
|
||
|
|
* Author: Oystein Moseng
|
||
|
|
*
|
||
|
|
* License: www.highcharts.com/license
|
||
|
|
*/!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/accessibility",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Accessibility/Utils/HTMLUtilities.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{doc:i,win:s}=t,{css:n}=e,o=s.EventTarget&&new s.EventTarget||"none";function r(t){if("function"==typeof s.MouseEvent)return new s.MouseEvent(t.type,t);if(i.createEvent){let e=i.createEvent("MouseEvent");if(e.initMouseEvent)return e.initMouseEvent(t.type,t.bubbles,t.cancelable,t.view||s,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),e}return a(t.type)}function a(t,e,n){let r=e||{x:0,y:0};if("function"==typeof s.MouseEvent)return new s.MouseEvent(t,{bubbles:!0,cancelable:!0,composed:!0,button:0,buttons:1,relatedTarget:n||o,view:s,detail:"click"===t?1:0,screenX:r.x,screenY:r.y,clientX:r.x,clientY:r.y});if(i.createEvent){let e=i.createEvent("MouseEvent");if(e.initMouseEvent)return e.initMouseEvent(t,!0,!0,s,"click"===t?1:0,r.x,r.y,r.x,r.y,!1,!1,!1,!1,0,null),e}return{type:t}}return{addClass:function(t,e){t.classList?t.classList.add(e):0>t.className.indexOf(e)&&(t.className+=" "+e)},cloneMouseEvent:r,cloneTouchEvent:function(t){let e=t=>{let e=[];for(let i=0;i<t.length;++i){let s=t.item(i);s&&e.push(s)}return e};if("function"==typeof s.TouchEvent){let i=new s.TouchEvent(t.type,{touches:e(t.touches),targetTouches:e(t.targetTouches),changedTouches:e(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:t.detail,view:t.view});return t.defaultPrevented&&i.preventDefault(),i}let i=r(t);return i.touches=t.touches,i.changedTouches=t.changedTouches,i.targetTouches=t.targetTouches,i},escapeStringForHTML:function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(t){return i.getElementById(t)},getFakeMouseEvent:a,getHeadingTagNameForElement:function(t){let e=t=>{let e=parseInt(t.slice(1),10);return"h"+Math.min(6,e+1)},i=t=>/H[1-6]/.test(t),s=t=>{let e=t;for(;e=e.previousSibling;){let t=e.tagName||"";if(i(t))return t}return""},n=t=>{let o=s(t);if(o)return e(o);let r=t.parentElement;if(!r)return"p";let a=r.tagName;return i(a)?e(a):n(r)};return n(t)},removeChildNodes:function(t){for(;t.lastChild;)t.removeChild(t.lastChild)},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(RegExp(e,"g"),"")},removeElement:function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},reverseChildNodes:function(t){let e=t.childNodes.length;for(;e--;)t.appendChild(t.childNodes[e])},simulatedEventTarget:o,stripHTMLTagsFromString:function(t,e=!1){return"string"==typeof t?e?t.replace(/<\/?[^>]+(>|$)/g,""):t.replace(/<\/?(?!\s)[^>]+(>|$)/g,""):t},visuallyHideElement:function(t){n(t,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(1px, 1px, 1px, 1px)",marginTop:"-3px","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)",filter:"alpha(opacity=1)",opacity:.01})}}}),i(e,"Accessibility/A11yI18n.js",[e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e){var i;let{format:s}=t,{getNestedProperty:n,pick:o}=e;return function(t){let i=[];function r(t,e,i){let r=(t,e)=>{let i=t.slice(e||0),s=i.indexOf("{"),n=i.indexOf("}");if(s>-1&&n>s)return{statement:i.substring(s+1,n),begin:e+s+1,end:e+n}},a=[],l,h,c=0;do l=r(t,c),(h=t.substring(c,l&&l.begin-1)).length&&a.push({value:h,type:"constant"}),l&&a.push({value:l.statement,type:"statement"}),c=l?l.end+1:c+1;while(l);return a.forEac
|