playbook_ui 15.3.0.pre.alpha.PLAY2322popoverconditionalrender11766 → 15.3.0.pre.alpha.PLAY2568richtexteditortiptaprails11790
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_popover/_popover.scss +0 -12
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +29 -43
- data/app/pb_kits/playbook/pb_popover/docs/_popover_close.jsx +0 -7
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +66 -9
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.html.erb +127 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default_rails.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +13 -5
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +37 -0
- data/dist/chunks/{_line_graph-BxC7m53J.js → _line_graph-BEPzmsbH.js} +1 -1
- data/dist/chunks/_typeahead-D2PJbkOa.js +24 -0
- data/dist/chunks/{_weekday_stacked-DxdwXyYM.js → _weekday_stacked-BMW-UQod.js} +1 -1
- data/dist/chunks/{lib-CGxXTQ75.js → lib-DAV78mo-.js} +1 -1
- data/dist/chunks/{pb_form_validation-DebqlUKZ.js → pb_form_validation-BMpMKn3y.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -19
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +9 -8
- data/app/pb_kits/playbook/pb_popover/docs/hook/useSmallScreenIndicator.tsx +0 -27
- data/dist/chunks/_typeahead-B1SiFvbF.js +0 -6
- /data/app/pb_kits/playbook/pb_rich_text_editor/docs/{_rich_text_editor_advanced_default.md → _rich_text_editor_advanced_default_react.md} +0 -0
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            import{jsx as jsx$1,Fragment as Fragment$1,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{createContext,useReducer,useEffect,useMemo,useContext,createElement,useRef,forwardRef,useState,useLayoutEffect,useCallback,useImperativeHandle,useDebugValue,Component,Fragment as Fragment$2}from"react";import{p as getDefaultExportFromCjs$1,z as filter,A as omit,y as noop$3,u as useCollapsible,B as createPopper,C as uniqueId,E as get,F as flip$2,G as offset$2,H as shift$3,I as arrow$4,J as computePosition$1,K as createCoords$1,L as round$1,M as max$1,N as min$1,O as rectToClientRect$1,l as getAllIcons,Q as cloneDeep,t as typography,c as colors$1,r as isEmpty$1,S as isString}from"./lib-DAV78mo-.js";import{TrixEditor}from"react-trix";import*as ReactDOM from"react-dom";import ReactDOM__default,{createPortal}from"react-dom";import Trix from"trix";import require$$0 from"react-is";const initialState={items:[],dragData:{id:"",initialGroup:"",originId:""},isDragging:"",activeContainer:""};const reducer=(state,action)=>{switch(action.type){case"SET_ITEMS":return{...state,items:action.payload};case"SET_DRAG_DATA":return{...state,dragData:action.payload};case"SET_IS_DRAGGING":return{...state,isDragging:action.payload};case"SET_ACTIVE_CONTAINER":return{...state,activeContainer:action.payload};case"CHANGE_CATEGORY":return{...state,items:state.items.map((item=>item.id===action.payload.itemId?{...item,container:action.payload.container}:item))};case"REORDER_ITEMS":{const{dragId:dragId,targetId:targetId}=action.payload;const newItems=[...state.items];const draggedItem=newItems.find((item=>item.id===dragId));const draggedIndex=newItems.indexOf(draggedItem);const targetIndex=newItems.findIndex((item=>item.id===targetId));newItems.splice(draggedIndex,1);newItems.splice(targetIndex,0,draggedItem);return{...state,items:newItems}}default:return state}};const DragContext=createContext({});const DraggableContext=()=>useContext(DragContext);const DraggableProvider=({children:children,initialItems:initialItems,onReorder:onReorder,onDragStart:onDragStart,onDragEnter:onDragEnter,onDragEnd:onDragEnd,onDrop:onDrop,onDragOver:onDragOver,dropZone:dropZone={type:"ghost",color:"neutral",direction:"vertical"},providerId:providerId="default"})=>{const[state,dispatch]=useReducer(reducer,initialState);let dropZoneType="ghost";let dropZoneColor="neutral";let dropZoneDirection="vertical";if(typeof dropZone==="string"){dropZoneType=dropZone}else{dropZoneType=dropZone.type||"ghost";dropZoneColor=dropZone.type==="line"?dropZone.color||"primary":dropZone.color||"neutral";if(dropZoneType==="line"){dropZoneDirection=dropZone.direction||"vertical"}}useEffect((()=>{dispatch({type:"SET_ITEMS",payload:initialItems})}),[initialItems]);useEffect((()=>{onReorder(state.items)}),[state.items]);const handleDragStart=(id,container)=>{dispatch({type:"SET_DRAG_DATA",payload:{id:id,initialGroup:container,originId:providerId}});dispatch({type:"SET_IS_DRAGGING",payload:id});if(onDragStart)onDragStart(id,container)};const handleDragEnter=(id,container)=>{if(state.dragData.originId!==providerId)return;if(state.dragData.id!==id){dispatch({type:"REORDER_ITEMS",payload:{dragId:state.dragData.id,targetId:id}});dispatch({type:"SET_DRAG_DATA",payload:{id:state.dragData.id,initialGroup:container,originId:providerId}})}if(onDragEnter)onDragEnter(id,container)};const handleDragEnd=()=>{dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});dispatch({type:"SET_DRAG_DATA",payload:{id:"",initialGroup:"",originId:""}});if(onDragEnd)onDragEnd()};const changeCategory=(itemId,container)=>{dispatch({type:"CHANGE_CATEGORY",payload:{itemId:itemId,container:container}})};const handleDrop=container=>{if(state.dragData.originId!==providerId)return;dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});changeCategory(state.dragData.id,container);if(onDrop)onDrop(container)};const handleDragOver=(e,container)=>{if(state.dragData.originId!==providerId)return;e.preventDefault();dispatch({type:"SET_ACTIVE_CONTAINER",payload:container});if(onDragOver)onDragOver(e,container)};const contextValue=useMemo((()=>({items:state.items,dragData:state.dragData,isDragging:state.isDragging,activeContainer:state.activeContainer,dropZone:dropZoneType,dropZoneColor:dropZoneColor,...dropZoneType==="line"?{direction:dropZoneDirection}:{},handleDragStart:handleDragStart,handleDragEnter:handleDragEnter,handleDragEnd:handleDragEnd,handleDrop:handleDrop,handleDragOver:handleDragOver})),[state,dropZoneType,dropZoneColor,dropZoneDirection]);return jsx$1(DragContext.Provider,{value:contextValue,children:children})};var classnames$1={exports:{}};
         | 
| 2 | 
            +
            /*!
         | 
| 3 | 
            +
            	Copyright (c) 2018 Jed Watson.
         | 
| 4 | 
            +
            	Licensed under the MIT License (MIT), see
         | 
| 5 | 
            +
            	http://jedwatson.github.io/classnames
         | 
| 6 | 
            +
            */var hasRequiredClassnames;function requireClassnames(){if(hasRequiredClassnames)return classnames$1.exports;hasRequiredClassnames=1;(function(module){(function(){var hasOwn={}.hasOwnProperty;function classNames2(){var classes="";for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg){classes=appendClass(classes,parseValue(arg))}}return classes}function parseValue(arg){if(typeof arg==="string"||typeof arg==="number"){return arg}if(typeof arg!=="object"){return""}if(Array.isArray(arg)){return classNames2.apply(null,arg)}if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]")){return arg.toString()}var classes="";for(var key in arg){if(hasOwn.call(arg,key)&&arg[key]){classes=appendClass(classes,key)}}return classes}function appendClass(value,newClass){if(!newClass){return value}if(value){return value+" "+newClass}return value+newClass}if(module.exports){classNames2.default=classNames2;module.exports=classNames2}else{window.classNames=classNames2}})()})(classnames$1);return classnames$1.exports}var classnamesExports=requireClassnames();const classnames=getDefaultExportFromCjs$1(classnamesExports);const buildPrefixedProps=(prefix2,data)=>Object.keys(data).reduce(((props,key)=>{props[`${prefix2}-${key}`]=data[key];return props}),{});const noop$2=()=>{};const buildAriaProps=aria=>buildPrefixedProps("aria",aria);const buildDataProps=data=>buildPrefixedProps("data",data);const buildCss=(...rules)=>classnames(rules).replace(/\s/g,"_");const buildHtmlProps=htmlOptions=>{const htmlProps={};Object.keys(htmlOptions).forEach((key=>{htmlProps[key]=htmlOptions[key]}));return htmlProps};const isEmpty=value=>!value||value=="";const titleizedWord=word=>word.charAt(0).toUpperCase()+word.slice(1).toLowerCase();const titleize=sentence=>isEmpty(sentence)?sentence:sentence.split(" ").map(titleizedWord).join(" ");const notEmpty=value=>!isEmpty(value);const joinPresent=(array,separator)=>filter(array,notEmpty).join(separator);const camelToSnakeCase=word=>word.split(/([A-Z])/g).map(((w2,i)=>{const prefix2=i>0?"_":"";return w2===w2.toLowerCase()?w2:prefix2+w2.toLowerCase()})).join("");const BitValues=[0,1];const getResponsivePropClasses=(prop,classPrefix)=>{const keys2=Object.keys(prop);return keys2.map((size=>{const propValue=typeof prop[size]==="string"?camelToSnakeCase(prop[size]):prop[size];return`${classPrefix}_${size}_${propValue}`})).join(" ")};const getPositioningPropsClasses=(position2,value)=>{let css4="";if(typeof value==="string"){css4+=`${position2}_${value}`}else if(typeof value==="object"&&value.inset){css4+=`${position2}_${value.value}_inset`}else if(typeof value==="object"){css4+=`${position2}_${value.value}`}return css4};const filterClassName=value=>{if(value.includes("%")){return value.replace("%","_percent")}else{return value}};const PROP_CATEGORIES={groupHoverProps:({groupHover:groupHover})=>groupHover?"group_hover ":"",hoverProps:({hover:hover})=>{let css4="";if(!hover)return css4;css4+=hover.shadow?`hover_shadow_${hover.shadow} `:"";css4+=hover.background?`hover_background-${hover.background} `:"";css4+=hover.underline?`hover_underline `:"";css4+=hover.scale?`hover_scale_${hover.scale} `:"";css4+=hover.color?`hover_color-${hover.color} `:"";css4+=hover.visible?`hover_visible_true`:"";return css4},spacingProps:({marginRight:marginRight,marginLeft:marginLeft,marginTop:marginTop,marginBottom:marginBottom,marginX:marginX,marginY:marginY,margin:margin,paddingRight:paddingRight,paddingLeft:paddingLeft,paddingTop:paddingTop,paddingBottom:paddingBottom,paddingX:paddingX,paddingY:paddingY,padding:padding})=>{let css4="";const spacingProps={marginRight:marginRight,marginLeft:marginLeft,marginTop:marginTop,marginBottom:marginBottom,marginX:marginX,marginY:marginY,margin:margin,paddingRight:paddingRight,paddingLeft:paddingLeft,paddingTop:paddingTop,paddingBottom:paddingBottom,paddingX:paddingX,paddingY:paddingY,padding:padding};const screenSizeValues=["xs","sm","md","lg","xl"];function handleObjectValue(properties,prefix2){let classResult="";const breakValue=properties.break||"on";const defaultValue=properties.default||null;Object.entries(properties).forEach((([key,value])=>{if(screenSizeValues.includes(key)){classResult+=`break_${breakValue}_${key}:${prefix2}_${value} `}}));if(defaultValue){classResult+=`${prefix2}_${defaultValue} `}return classResult}function getPrefix(key){const prefixes={marginRight:"mr",marginLeft:"ml",marginTop:"mt",marginBottom:"mb",marginX:"mx",marginY:"my",margin:"m",paddingRight:"pr",paddingLeft:"pl",paddingTop:"pt",paddingBottom:"pb",paddingX:"px",paddingY:"py",padding:"p"};return prefixes[key]}Object.entries(spacingProps).forEach((([key,value])=>{if(value){if(typeof value==="object"){css4+=handleObjectValue(value,getPrefix(key))}else{const prefix2=getPrefix(key);css4+=`${prefix2}_${value} `}}}));return css4.trim()},borderRadiusProps:({borderRadius:borderRadius2})=>{let css4="";css4+=borderRadius2?`border_radius_${borderRadius2} `:"";return css4},overflowProps:({overflow:overflow,overflowX:overflowX,overflowY:overflowY})=>{let css4="";css4+=overflow?`overflow_${overflow}`:"";css4+=overflowX?`overflow_x_${overflowX}`:"";css4+=overflowY?`overflow_y_${overflowY}`:"";return css4},truncateProps:({truncate:truncate})=>{if(typeof truncate==="object"){return""}else{return truncate?`truncate_${truncate}`:""}},darkProps:({dark:dark})=>dark?"dark":"",numberSpacingProps:({numberSpacing:numberSpacing})=>{let css4="";css4+=numberSpacing?`ns_${numberSpacing} `:"";return css4},widthProps:({width:width})=>{let css4="";css4+=width?`width_${filterClassName(width)} `:"";return css4.trimEnd()},minWidthProps:({minWidth:minWidth})=>{let css4="";css4+=minWidth?`min_width_${filterClassName(minWidth)} `:"";return css4.trimEnd()},maxWidthProps:({maxWidth:maxWidth})=>{let css4="";css4+=maxWidth?`max_width_${filterClassName(maxWidth)} `:"";return css4.trimEnd()},gapProps:({gap:gap})=>{if(typeof gap==="object"){return getResponsivePropClasses(gap,"gap")}else{return gap?`gap_${gap}`:""}},columnGapProps:({columnGap:columnGap})=>{if(typeof columnGap==="object"){return getResponsivePropClasses(columnGap,"column_gap")}else{return columnGap?`column_gap_${columnGap}`:""}},rowGapProps:({rowGap:rowGap})=>{if(typeof rowGap==="object"){return getResponsivePropClasses(rowGap,"row_gap")}else{return rowGap?`row_gap_${rowGap}`:""}},minHeightProps:({minHeight:minHeight})=>{const heightValues=["auto","xs","sm","md","lg","xl","xxl","xxxl"];if(heightValues.includes(minHeight)){let css4="";css4+=minHeight?`min_height_${filterClassName(minHeight)} `:"";return css4.trimEnd()}},maxHeightProps:({maxHeight:maxHeight})=>{const heightValues=["auto","xs","sm","md","lg","xl","xxl","xxxl"];if(heightValues.includes(maxHeight)){let css4="";css4+=maxHeight?`max_height_${filterClassName(maxHeight)} `:"";return css4.trimEnd()}},heightProps:({height:height})=>{const heightValues=["auto","xs","sm","md","lg","xl","xxl","xxxl"];if(heightValues.includes(height)){let css4="";css4+=height?`height_${filterClassName(height)} `:"";return css4.trimEnd()}},zIndexProps:zIndex=>{let css4="";Object.entries(zIndex).forEach((zIndexEntry=>{if(zIndexEntry[0]=="zIndex"){if(typeof zIndexEntry[1]=="number"){css4+=`z_index_${zIndexEntry[1]} `}else if(typeof zIndexEntry[1]=="object"){Object.entries(zIndexEntry[1]).forEach((zIndexObj=>{css4+=`z_index_${zIndexObj[0]}_${zIndexObj[1]} `}))}else if(zIndexEntry[1]==="max"){css4+=`z_index_max `}}}));return css4},shadowProps:({shadow:shadow})=>{let css4="";css4+=shadow?`shadow_${shadow} `:"";return css4},lineHeightProps:({lineHeight:lineHeight})=>{let css4="";css4+=lineHeight?`line_height_${lineHeight} `:"";return css4},displayProps:display=>{let css4="";Object.entries(display).forEach((displayEntry=>{if(displayEntry[0]=="display"){if(typeof displayEntry[1]=="string"){css4+=`display_${displayEntry[1]} `}else if(typeof displayEntry[1]=="object"){Object.entries(displayEntry[1]).forEach((displayObj=>{css4+=`display_${displayObj[0]}_${displayObj[1]} `}))}else;}}));return css4},cursorProps:({cursor:cursor2})=>{let css4="";css4+=cursor2?`cursor_${camelToSnakeCase(cursor2)}`:"";return css4},alignContentProps:({alignContent:alignContent})=>{if(typeof alignContent==="object"){return getResponsivePropClasses(alignContent,"align_content")}return alignContent?`align_content_${camelToSnakeCase(alignContent)}`:""},alignItemsProps:({alignItems:alignItems})=>{if(typeof alignItems==="object"){return getResponsivePropClasses(alignItems,"align_items")}else{return alignItems?`align_items_${camelToSnakeCase(alignItems)}`:""}},alignSelfProps:({alignSelf:alignSelf})=>{if(typeof alignSelf==="object"){return getResponsivePropClasses(alignSelf,"align_self")}else{return alignSelf?`align_self_${alignSelf}`:""}},flexDirectionProps:({flexDirection:flexDirection})=>{if(typeof flexDirection=="object"){return getResponsivePropClasses(flexDirection,"flex_direction")}else{return flexDirection?`flex_direction_${camelToSnakeCase(flexDirection)}`:""}},flexWrapProps:({flexWrap:flexWrap})=>{if(typeof flexWrap=="object"){return getResponsivePropClasses(flexWrap,"flex_wrap")}else{return flexWrap?`flex_wrap_${camelToSnakeCase(flexWrap)}`:""}},flexProps:({flex:flex})=>{if(typeof flex==="object"){return getResponsivePropClasses(flex,"flex")}else{return flex?`flex_${flex}`:""}},flexGrowProps:({flexGrow:flexGrow})=>{if(typeof flexGrow=="object"){return getResponsivePropClasses(flexGrow,"flex_grow")}else if(BitValues.includes(flexGrow)){return`flex_grow_${flexGrow}`}else{return""}},flexShrinkProps:({flexShrink:flexShrink})=>{if(typeof flexShrink=="object"){return getResponsivePropClasses(flexShrink,"flex_shrink")}else if(BitValues.includes(flexShrink)){return`flex_shrink_${flexShrink}`}else{return""}},justifyContentProps:({justifyContent:justifyContent})=>{if(typeof justifyContent==="object"){return getResponsivePropClasses(justifyContent,"justify_content")}else{return justifyContent?`justify_content_${camelToSnakeCase(justifyContent)}`:""}},justifySelfProps:({justifySelf:justifySelf})=>{if(typeof justifySelf==="object"){return getResponsivePropClasses(justifySelf,"justify_self")}else{return justifySelf?`justify_self_${justifySelf}`:""}},orderProps:({order:order})=>{if(typeof order==="object"){return getResponsivePropClasses(order,"flex_order")}else{return order?`flex_order_${order}`:""}},positionProps:({position:position2})=>{let css4="";css4+=position2&&position2!=="static"?`position_${position2}`:"";return css4},topProps:({top:top})=>getPositioningPropsClasses("top",top),rightProps:({right:right})=>getPositioningPropsClasses("right",right),bottomProps:({bottom:bottom})=>getPositioningPropsClasses("bottom",bottom),leftProps:({left:left})=>getPositioningPropsClasses("left",left),textAlignProps:({textAlign:textAlign})=>{if(typeof textAlign==="object"){return getResponsivePropClasses(textAlign,"text_align")}else{return textAlign?`text_align_${textAlign} `:""}},verticalAlignProps:({verticalAlign:verticalAlign})=>{if(typeof verticalAlign==="object"){return getResponsivePropClasses(verticalAlign,"vertical_align")}else{return verticalAlign?`vertical_align_${verticalAlign} `:""}}};const PROP_INLINE_CATEGORIES={heightProps:({height:height})=>height?{height:height}:{},maxHeightProps:({maxHeight:maxHeight})=>maxHeight?{maxHeight:maxHeight}:{},minHeightProps:({minHeight:minHeight})=>minHeight?{minHeight:minHeight}:{}};const globalProps=(props,defaultProps2={})=>{const allProps={...props,...defaultProps2};return Object.keys(PROP_CATEGORIES).map((key=>PROP_CATEGORIES[key](allProps))).filter((value=>(value==null?void 0:value.length)>0)).join(" ")};const globalInlineProps=props=>{const styles=Object.keys(PROP_INLINE_CATEGORIES).reduce(((acc,key)=>{const result=PROP_INLINE_CATEGORIES[key](props);return{...acc,...typeof result==="object"?result:{}}}),{});return styles};const domSafeProps=props=>{const notSafeProps=["marginRight","marginLeft","marginTop","marginBottom","marginX","marginY","margin","paddingRight","paddingLeft","paddingTop","paddingBottom","paddingX","paddingY","padding","dark","enableDrag"];return omit(props,notSafeProps)};const DraggableContainer=props=>{const{aria:aria={},children:children,className:className,container:container,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="div"}=props;const contextValues=DraggableContext();const{handleDragOver:handleDragOver,handleDrop:handleDrop,activeContainer:activeContainer,dropZone:dropZone}=contextValues;const direction=dropZone==="line"?contextValues.direction||"vertical":null;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const Tag=`${tag}`;const classes=classnames(buildCss("pb_draggable_container"),`${activeContainer===container?"active":""}`,dropZone==="line"&&direction==="vertical"?"line_vertical":"",dropZone==="line"&&direction==="horizontal"?"line_horizontal":"",globalProps(props),className);return createElement(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,key:container,onDragOver:e=>handleDragOver(e,container),onDrop:()=>handleDrop(container)},children)};const DraggableItem=props=>{const{aria:aria={},children:children,className:className,container:container,data:data={},htmlOptions:htmlOptions={},id:id,dragId:dragId,tag:tag="div",onDrag:onDrag=noop$3,onDragEnd:onDragEnd=noop$3,onDragEnter:onDragEnter=noop$3,onDragLeave:onDragLeave=noop$3,onDragOver:onDragOver=noop$3,onDragStart:onDragStart=noop$3,onDrop:onDrop=noop$3}=props;const{isDragging:isDragging,handleDragStart:handleDragStart,handleDragEnter:handleDragEnter,handleDragEnd:handleDragEnd,dropZone:dropZone="ghost",dropZoneColor:dropZoneColor="neutral",direction:direction="horizontal"}=DraggableContext();const itemRef=React__default.useRef(null);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const Tag=`${tag}`;const classes=classnames(buildCss("pb_draggable_item"),`${isDragging===dragId?"is_dragging":""}`,isDragging===dragId?`drop_zone_${dropZone}`:"",isDragging===dragId&&dropZone!=="ghost"?`drop_zone_color_${dropZoneColor}`:"",globalProps(props),className);const handleDragStartWithCustom=e=>{if(dropZone!=="ghost"&&itemRef.current){const clone=itemRef.current.cloneNode(true);clone.className=clone.className.replace(/drop_zone_[^ ]*/g,"");clone.className=clone.className.replace(/is_dragging/g,"");const rect=itemRef.current.getBoundingClientRect();clone.style.position="fixed";clone.style.top="-9999px";clone.style.left="-9999px";clone.style.width=`${rect.width}px`;clone.style.height=`${rect.height}px`;clone.style.opacity="1";clone.style.pointerEvents="none";document.body.appendChild(clone);e.dataTransfer.setDragImage(clone,e.clientX-rect.left,e.clientY-rect.top);setTimeout((()=>{document.body.removeChild(clone)}),0)}handleDragStart(dragId,container);onDragStart()};return createElement(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,draggable:true,id:id,key:dragId,onDrag:onDrag,onDragEnd:()=>{handleDragEnd();onDragEnd()},onDragEnter:()=>{handleDragEnter(dragId,container);onDragEnter()},onDragLeave:onDragLeave,onDragOver:onDragOver,onDragStart:handleDragStartWithCustom,onDrop:onDrop,ref:itemRef},children)};const Draggable=props=>{const{aria:aria={},className:className,children:children,data:data={},htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_draggable"),globalProps(props),className);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})};Draggable.Container=DraggableContainer;Draggable.Item=DraggableItem;const showElement=elem=>{elem.style.display="block";const height=elem.scrollHeight+"px";elem.style.height=height;elem.classList.add("is-visible");elem.style.overflow="hidden";window.setTimeout((()=>{if(!elem.classList.contains("is-visible")){elem.classList.add("is-visible")}elem.style.height="";elem.style.overflow="visible"}),300)};const hideElement=elem=>{elem.style.height=elem.scrollHeight+"px";window.setTimeout((()=>{elem.style.height="0";elem.style.paddingTop="0";elem.style.paddingBottom="0";elem.style.overflow="hidden"}),1);window.setTimeout((()=>{elem.classList.remove("is-visible");elem.style.overflow=""}),300)};const CollapsibleContext=createContext({});const CollapsibleContent=({children:children,className:className,...props})=>{const context=useContext(CollapsibleContext);const contentCSS=buildCss("pb_collapsible_content_kit");const contentSpacing=globalProps(props);const contentRef=useRef(null);useEffect((()=>{if(contentRef.current){if(context.collapsed){hideElement(contentRef.current)}else{showElement(contentRef.current)}}}),[context.collapsed]);return jsx$1("div",{className:classnames(contentCSS,contentSpacing,"toggle-content",className),"data-collapsible-content":"true",ref:contentRef,children:children})};const Flex=props=>{const{align:align="none",children:children,className:className,data:data={},inline:inline=false,horizontal:horizontal="left",htmlOptions:htmlOptions={},justify:justify="none",orientation:orientation="row",spacing:spacing2="none",gap:gap="none",rowGap:rowGap="none",columnGap:columnGap="none",reverse:reverse=false,vertical:vertical="top",wrap:wrap2=false,alignSelf:alignSelf="none"}=props;const orientationClass=orientation!==void 0?`pb_flex_kit_orientation_${orientation}`:"";const justifyClass=justify!=="none"?`pb_flex_kit_justify_content_${justify}`:`pb_flex_kit_justify_content_${horizontal}`;const alignClass=align!=="none"?`pb_flex_kit_align_items_${align}`:`pb_flex_kit_align_items_${vertical}`;const inlineClass=inline===true?"pb_flex_kit_inline":"";const spacingClass=spacing2!==void 0?`pb_flex_kit_spacing_${spacing2}`:"";const gapClass=gap!=="none"&&typeof gap==="string"?`pb_flex_kit_gap_${gap}`:"";const rowGapClass=rowGap!=="none"&&typeof rowGap==="string"?`pb_flex_kit_rowGap_${rowGap}`:"";const columnGapClass=columnGap!=="none"&&typeof columnGap==="string"?`pb_flex_kit_columnGap_${columnGap}`:"";const responsiveGapClass=gap!=="none"&&typeof gap==="object"&&gap!==null&&!Array.isArray(gap)?"pb_flex_kit_gap_responsive":"";const responsiveRowGapClass=rowGap!=="none"&&typeof rowGap==="object"&&rowGap!==null&&!Array.isArray(rowGap)?"pb_flex_kit_rowGap_responsive":"";const responsiveColumnGapClass=columnGap!=="none"&&typeof columnGap==="object"&&columnGap!==null&&!Array.isArray(columnGap)?"pb_flex_kit_columnGap_responsive":"";const wrapClass=wrap2===true?"pb_flex_kit_wrap":"";const reverseClass=reverse===true?"pb_flex_kit_reverse":"";const alignSelfClass=alignSelf!=="none"?`pb_flex_kit_align_self_${alignSelf}`:"";const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const dynamicInlineProps=globalInlineProps(props);return jsx$1("div",{className:classnames("pb_flex_kit",orientationClass,justifyClass,alignClass,inlineClass,reverseClass,wrapClass,spacingClass,gapClass,rowGapClass,columnGapClass,responsiveGapClass,responsiveRowGapClass,responsiveColumnGapClass,alignSelfClass,globalProps(props),className),style:dynamicInlineProps,...dataProps,...htmlProps,children:children})};const FlexItem=props=>{const{children:children,className:className,fixedSize:fixedSize,grow:grow,htmlOptions:htmlOptions={},shrink:shrink,flex:flex="none",order:order="none",alignSelf:alignSelf,displayFlex:displayFlex}=props;const growClass=grow===true?"pb_flex_item_kit_grow":"";const displayFlexClass=displayFlex===true?"pb_flex_item_kit_display_flex":"";const flexClass=flex!=="none"?`pb_flex_item_kit_flex_${flex}`:"";const shrinkClass=shrink===true?"pb_flex_item_kit_shrink":"";const alignSelfClass=alignSelf?`pb_flex_item_kit_align_self_${alignSelf}`:"";const fixedStyle=fixedSize!==void 0?{flexBasis:`${fixedSize}`}:null;const orderClass=order!=="none"?`pb_flex_item_kit_order_${order}`:"";const dynamicInlineProps=globalInlineProps(props);const combinedStyles={...fixedStyle,...dynamicInlineProps};const htmlProps=buildHtmlProps(htmlOptions);return jsx$1("div",{...htmlProps,className:classnames("pb_flex_item_kit",growClass,shrinkClass,flexClass,displayFlexClass,orderClass,alignSelfClass,globalProps(props),className),style:combinedStyles,children:children})};const isValidEmoji=emoji2=>{const emojiRegex=new RegExp("^(\\p{Emoji}|\\uFE0F|\\u200D|\\u20E3)+$","u");return emojiRegex.test(emoji2)};const flipMap={fa:{horizontal:"fa-flip-horizontal",vertical:"fa-flip-vertical",both:"fa-flip-horizontal fa-flip-vertical",none:""},svg:{horizontal:"flip_horizontal",vertical:"flip_vertical",both:"flip_horizontal flip_vertical",none:""}};const pulseMap={fa:"fa-pulse",svg:"pulse"};const spinMap={fa:"fa-spin",svg:"spin"};const rotateMap={fa:{90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},svg:{90:"rotate_90",180:"rotate_180",270:"rotate_270"}};const sizeMap={fa:{lg:"fa-lg",xs:"fa-xs",sm:"fa-sm","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x","":""},svg:{lg:"svg_lg",xs:"svg_xs",sm:"svg_sm","1x":"svg_1x","2x":"svg_2x","3x":"svg_3x","4x":"svg_4x","5x":"svg_5x","6x":"svg_6x","7x":"svg_7x","8x":"svg_8x","9x":"svg_9x","10x":"svg_10x","":""}};const Icon=props=>{const{aria:aria={},border:border=false,className:className,color:color,customIcon:customIcon,data:data={},fixedWidth:fixedWidth=true,flip:flip2="none",htmlOptions:htmlOptions={},icon:icon="",id:id,inverse:inverse=false,listItem:listItem=false,pull:pull,pulse:pulse=false,rotation:rotation,size:size,fontStyle:fontStyle="far",spin:spin=false,tabIndex:tabIndex}=props;let iconElement=typeof icon==="object"?icon:null;if(!customIcon&&!iconElement){const PowerIcon=window.PB_ICONS?window.PB_ICONS[icon]:null;if(PowerIcon){iconElement=jsx$1(PowerIcon,{})}}const isFA=!iconElement&&!customIcon;let classes=classnames(!iconElement&&!customIcon?"pb_icon_kit":"",iconElement||customIcon?"pb_custom_icon":fontStyle,iconElement?"svg-inline--fa":"",color?`color_${color}`:"",globalProps(props),className);const transformClasses=classnames(flip2?flipMap[isFA?"fa":"svg"][flip2]:null,pulse?pulseMap[isFA?"fa":"svg"]:null,rotation?rotateMap[isFA?"fa":"svg"][rotation]:null,spin?spinMap[isFA?"fa":"svg"]:null,size?sizeMap[isFA?"fa":"svg"][size]:null,border?isFA?"fa-border":"svg_border":null,fixedWidth?isFA?"fa-fw":"svg_fw":null,inverse?isFA?"fa-inverse":"svg_inverse":null,listItem?isFA?"fa-li":"svg_li":null,pull?isFA?`fa-pull-${pull}`:`pull_${pull}`:null);classes+=` ${transformClasses}`;if(isFA){const faClassList={"fa-border":border,"fa-inverse":inverse,"fa-li":listItem,[`fa-${size}`]:size,[`fa-pull-${pull}`]:pull};faClassList[`fa-${icon}`]=icon;classes+=` ${classnames(faClassList)}`}const classesEmoji=classnames("pb_icon_kit_emoji",globalProps(props),className);aria.label?null:aria.label=`${icon} icon`;const normalizedAria=Object.fromEntries(Object.entries(aria).map((([key,value])=>[key,typeof value==="boolean"?String(value):value])));const ariaProps=buildAriaProps(normalizedAria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const displaySVG=customIcon2=>{if(iconElement||customIcon2)return jsx$1(Fragment$1,{children:React__default.cloneElement(iconElement||customIcon2,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,width:"auto",height:"auto",...props.tabIndex!==void 0&&{tabIndex:tabIndex}})});else if(isValidEmoji(icon))return jsx$1(Fragment$1,{children:jsx$1("span",{...ariaProps,...dataProps,...htmlProps,className:classesEmoji,id:id,children:icon})});else return jsxs(Fragment$1,{children:[jsx$1("i",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id}),jsx$1("span",{...ariaProps,hidden:true})]})};return jsx$1(Fragment$1,{children:displaySVG(customIcon)})};const colorMap={default:"#242B42",light:"#687887",lighter:"#C1CDD6",link:"#0056CF",error:"#FF2229",success:"#00CA74"};const CollapsibleIcon=({collapsed:collapsed,icon:icon,iconSize:iconSize,iconColor:iconColor,onIconClick:onIconClick})=>{const color=colorMap[iconColor];const showIcon=icon2=>{if(icon2==="none"){return[]}else if(typeof icon2==="string"){return[icon2,icon2]}return icon2};const handleIconClick=e=>{if(onIconClick){e.stopPropagation();onIconClick()}};return jsx$1(Fragment$1,{children:icon!=="none"?collapsed?jsx$1("div",{className:"icon_wrapper",onClick:e=>handleIconClick(e),style:{verticalAlign:"middle",color:color},children:jsx$1(Icon,{icon:icon?showIcon(icon)[0]:"chevron-down",size:iconSize})},icon?showIcon(icon)[0]:"chevron-down"):jsx$1("div",{className:"icon_wrapper",onClick:e=>handleIconClick(e),style:{verticalAlign:"middle",color:color},children:jsx$1(Icon,{icon:icon?showIcon(icon)[1]:"chevron-up",size:iconSize})},icon?showIcon(icon)[1]:"chevron-up"):jsx$1("div",{})})};const CollapsibleMain=({children:children,className:className,cursor:cursor2="pointer",...props})=>{const{collapsed:collapsed,toggle:toggle,icon:icon,iconSize:iconSize,iconColor:iconColor,onIconClick:onIconClick,onClick:onClick}=useContext(CollapsibleContext);const mainCSS=buildCss("pb_collapsible_main_kit");const mainSpacing=globalProps(props,{cursor:cursor2});const handleCollapsibleClick=()=>{onClick&&onClick();const disableToggle=onClick&&onClick();if(disableToggle!==true){toggle()}};return jsx$1("div",{className:classnames(mainCSS,mainSpacing,className),children:jsx$1("div",{onClick:handleCollapsibleClick,children:jsxs(Flex,{spacing:"between",vertical:"center",children:[jsx$1(FlexItem,{children:children}),jsx$1(FlexItem,{children:jsx$1(CollapsibleIcon,{collapsed:collapsed,icon:icon,iconColor:iconColor,iconSize:iconSize,onIconClick:onIconClick})})]})})})};const Collapsible=({aria:aria={},className:className,children:children,collapsed:collapsed=true,data:data={},htmlOptions:htmlOptions={},icon:icon,iconColor:iconColor="default",iconSize:iconSize,onIconClick:onIconClick,onClick:onClick,id:id,tag:tag="div",...props})=>{const[isCollapsed,toggle,setIsCollapsed]=useCollapsible(collapsed);useEffect((()=>{setIsCollapsed(collapsed)}),[collapsed]);if(children.length!==2){throw new Error("Collapsible requires <CollapsibleMain> and <CollapsibleContent> to function properly.")}const FirstChild=children[0];const Main=FirstChild.type===CollapsibleMain?FirstChild:null;const Content=children[1];const{children:mainChildren=null,...mainProps}=Main?Main.props:{};const{children:contentChildren,...contentProps}=Content.props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_collapsible_kit"),globalProps(props),className);const dynamicInlineProps=globalInlineProps(props);const Tag=`${tag}`;return jsx$1(CollapsibleContext.Provider,{value:{collapsed:isCollapsed,toggle:toggle,icon:icon,iconSize:iconSize,iconColor:iconColor,onIconClick:onIconClick,onClick:onClick},children:jsxs(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,style:dynamicInlineProps,children:[Main?jsx$1(CollapsibleMain,{...mainProps,children:mainChildren}):FirstChild,jsx$1(CollapsibleContent,{...contentProps,children:contentChildren})]})})};Collapsible.Main=CollapsibleMain;Collapsible.Content=CollapsibleContent;Collapsible.Icon=CollapsibleIcon;var main={exports:{}};var hasRequiredMain;function requireMain(){if(hasRequiredMain)return main.exports;hasRequiredMain=1;(function(module){module.exports=function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module2=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module2.exports,module2,module2.exports,__webpack_require__);module2.loaded=true;return module2.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)}([function(module2,exports,__webpack_require__){module2.exports=__webpack_require__(1)},function(module2,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _Highlighter=__webpack_require__(2);var _Highlighter2=_interopRequireDefault(_Highlighter);exports["default"]=_Highlighter2["default"];module2.exports=exports["default"]},function(module2,exports,__webpack_require__){Object.defineProperty(exports,"__esModule",{value:true});var _extends2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};exports["default"]=Highlighter2;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _objectWithoutProperties2(obj,keys2){var target={};for(var i in obj){if(keys2.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target}var _highlightWordsCore=__webpack_require__(3);var _propTypes=__webpack_require__(4);var _propTypes2=_interopRequireDefault(_propTypes);var _react=__webpack_require__(14);var _memoizeOne=__webpack_require__(15);var _memoizeOne2=_interopRequireDefault(_memoizeOne);Highlighter2.propTypes={activeClassName:_propTypes2["default"].string,activeIndex:_propTypes2["default"].number,activeStyle:_propTypes2["default"].object,autoEscape:_propTypes2["default"].bool,className:_propTypes2["default"].string,findChunks:_propTypes2["default"].func,highlightClassName:_propTypes2["default"].oneOfType([_propTypes2["default"].object,_propTypes2["default"].string]),highlightStyle:_propTypes2["default"].object,highlightTag:_propTypes2["default"].oneOfType([_propTypes2["default"].node,_propTypes2["default"].func,_propTypes2["default"].string]),sanitize:_propTypes2["default"].func,searchWords:_propTypes2["default"].arrayOf(_propTypes2["default"].oneOfType([_propTypes2["default"].string,_propTypes2["default"].instanceOf(RegExp)])).isRequired,textToHighlight:_propTypes2["default"].string.isRequired,unhighlightTag:_propTypes2["default"].oneOfType([_propTypes2["default"].node,_propTypes2["default"].func,_propTypes2["default"].string]),unhighlightClassName:_propTypes2["default"].string,unhighlightStyle:_propTypes2["default"].object};function Highlighter2(_ref3){var _ref$activeClassName=_ref3.activeClassName;var activeClassName=_ref$activeClassName===void 0?"":_ref$activeClassName;var _ref$activeIndex=_ref3.activeIndex;var activeIndex=_ref$activeIndex===void 0?-1:_ref$activeIndex;var activeStyle=_ref3.activeStyle;var autoEscape=_ref3.autoEscape;var _ref$caseSensitive=_ref3.caseSensitive;var caseSensitive=_ref$caseSensitive===void 0?false:_ref$caseSensitive;var className=_ref3.className;var findChunks=_ref3.findChunks;var _ref$highlightClassName=_ref3.highlightClassName;var highlightClassName=_ref$highlightClassName===void 0?"":_ref$highlightClassName;var _ref$highlightStyle=_ref3.highlightStyle;var highlightStyle=_ref$highlightStyle===void 0?{}:_ref$highlightStyle;var _ref$highlightTag=_ref3.highlightTag;var highlightTag=_ref$highlightTag===void 0?"mark":_ref$highlightTag;var sanitize=_ref3.sanitize;var searchWords=_ref3.searchWords;var textToHighlight=_ref3.textToHighlight;var _ref$unhighlightTag=_ref3.unhighlightTag;var unhighlightTag=_ref$unhighlightTag===void 0?"span":_ref$unhighlightTag;var _ref$unhighlightClassName=_ref3.unhighlightClassName;var unhighlightClassName=_ref$unhighlightClassName===void 0?"":_ref$unhighlightClassName;var unhighlightStyle=_ref3.unhighlightStyle;var rest=_objectWithoutProperties2(_ref3,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightTag","unhighlightClassName","unhighlightStyle"]);var chunks=(0,_highlightWordsCore.findAll)({autoEscape:autoEscape,caseSensitive:caseSensitive,findChunks:findChunks,sanitize:sanitize,searchWords:searchWords,textToHighlight:textToHighlight});var HighlightTag=highlightTag;var highlightIndex=-1;var highlightClassNames="";var highlightStyles=void 0;var lowercaseProps=function lowercaseProps2(object){var mapped={};for(var key in object){mapped[key.toLowerCase()]=object[key]}return mapped};var memoizedLowercaseProps=(0,_memoizeOne2["default"])(lowercaseProps);return(0,_react.createElement)("span",_extends2({className:className},rest,{children:chunks.map((function(chunk,index2){var text=textToHighlight.substr(chunk.start,chunk.end-chunk.start);if(chunk.highlight){highlightIndex++;var highlightClass=void 0;if(typeof highlightClassName==="object"){if(!caseSensitive){highlightClassName=memoizedLowercaseProps(highlightClassName);highlightClass=highlightClassName[text.toLowerCase()]}else{highlightClass=highlightClassName[text]}}else{highlightClass=highlightClassName}var isActive2=highlightIndex===+activeIndex;highlightClassNames=highlightClass+" "+(isActive2?activeClassName:"");highlightStyles=isActive2===true&&activeStyle!=null?Object.assign({},highlightStyle,activeStyle):highlightStyle;var props={children:text,className:highlightClassNames,key:index2,style:highlightStyles};if(typeof HighlightTag!=="string"){props.highlightIndex=highlightIndex}return(0,_react.createElement)(HighlightTag,props)}else{return(0,_react.createElement)(unhighlightTag,{children:text,className:unhighlightClassName,key:index2,style:unhighlightStyle})}}))}))}module2.exports=exports["default"]},function(module2,exports){module2.exports=function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module3=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module3.exports,module3,module3.exports,__webpack_require__);module3.loaded=true;return module3.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)}([function(module3,exports2,__webpack_require__){module3.exports=__webpack_require__(1)},function(module3,exports2,__webpack_require__){Object.defineProperty(exports2,"__esModule",{value:true});var _utils=__webpack_require__(2);Object.defineProperty(exports2,"combineChunks",{enumerable:true,get:function get3(){return _utils.combineChunks}});Object.defineProperty(exports2,"fillInChunks",{enumerable:true,get:function get3(){return _utils.fillInChunks}});Object.defineProperty(exports2,"findAll",{enumerable:true,get:function get3(){return _utils.findAll}});Object.defineProperty(exports2,"findChunks",{enumerable:true,get:function get3(){return _utils.findChunks}})},function(module3,exports2){Object.defineProperty(exports2,"__esModule",{value:true});exports2.findAll=function findAll2(_ref3){var autoEscape=_ref3.autoEscape,_ref$caseSensitive=_ref3.caseSensitive,caseSensitive=_ref$caseSensitive===void 0?false:_ref$caseSensitive,_ref$findChunks=_ref3.findChunks,findChunks=_ref$findChunks===void 0?defaultFindChunks:_ref$findChunks,sanitize=_ref3.sanitize,searchWords=_ref3.searchWords,textToHighlight=_ref3.textToHighlight;return fillInChunks({chunksToHighlight:combineChunks({chunks:findChunks({autoEscape:autoEscape,caseSensitive:caseSensitive,sanitize:sanitize,searchWords:searchWords,textToHighlight:textToHighlight})}),totalLength:textToHighlight?textToHighlight.length:0})};var combineChunks=exports2.combineChunks=function combineChunks2(_ref22){var chunks=_ref22.chunks;chunks=chunks.sort((function(first2,second){return first2.start-second.start})).reduce((function(processedChunks,nextChunk){if(processedChunks.length===0){return[nextChunk]}else{var prevChunk=processedChunks.pop();if(nextChunk.start<=prevChunk.end){var endIndex=Math.max(prevChunk.end,nextChunk.end);processedChunks.push({start:prevChunk.start,end:endIndex})}else{processedChunks.push(prevChunk,nextChunk)}return processedChunks}}),[]);return chunks};var defaultFindChunks=function defaultFindChunks2(_ref3){var autoEscape=_ref3.autoEscape,caseSensitive=_ref3.caseSensitive,_ref3$sanitize=_ref3.sanitize,sanitize=_ref3$sanitize===void 0?identity:_ref3$sanitize,searchWords=_ref3.searchWords,textToHighlight=_ref3.textToHighlight;textToHighlight=sanitize(textToHighlight);return searchWords.filter((function(searchWord){return searchWord})).reduce((function(chunks,searchWord){searchWord=sanitize(searchWord);if(autoEscape){searchWord=escapeRegExpFn(searchWord)}var regex=new RegExp(searchWord,caseSensitive?"g":"gi");var match2=void 0;while(match2=regex.exec(textToHighlight)){var start=match2.index;var end=regex.lastIndex;if(end>start){chunks.push({start:start,end:end})}if(match2.index==regex.lastIndex){regex.lastIndex++}}return chunks}),[])};exports2.findChunks=defaultFindChunks;var fillInChunks=exports2.fillInChunks=function fillInChunks2(_ref4){var chunksToHighlight=_ref4.chunksToHighlight,totalLength=_ref4.totalLength;var allChunks=[];var append3=function append22(start,end,highlight){if(end-start>0){allChunks.push({start:start,end:end,highlight:highlight})}};if(chunksToHighlight.length===0){append3(0,totalLength,false)}else{var lastIndex=0;chunksToHighlight.forEach((function(chunk){append3(lastIndex,chunk.start,false);append3(chunk.start,chunk.end,true);lastIndex=chunk.end}));append3(lastIndex,totalLength,false)}return allChunks};function identity(value){return value}function escapeRegExpFn(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}}])},function(module2,exports,__webpack_require__){(function(process){if(process.env.NODE_ENV!=="production"){var REACT_ELEMENT_TYPE=typeof Symbol==="function"&&Symbol.for&&Symbol.for("react.element")||60103;var isValidElement=function(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE};var throwOnDirectAccess=true;module2.exports=__webpack_require__(6)(isValidElement,throwOnDirectAccess)}else{module2.exports=__webpack_require__(13)()}}).call(exports,__webpack_require__(5))},function(module2,exports){var process=module2.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e2){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e2){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item2(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item2(fun,array){this.fun=fun;this.array=array}Item2.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop3(){}process.on=noop3;process.addListener=noop3;process.once=noop3;process.off=noop3;process.removeListener=noop3;process.removeAllListeners=noop3;process.emit=noop3;process.prependListener=noop3;process.prependOnceListener=noop3;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},function(module2,exports,__webpack_require__){(function(process){var emptyFunction=__webpack_require__(7);var invariant=__webpack_require__(8);var warning2=__webpack_require__(9);var assign2=__webpack_require__(10);var ReactPropTypesSecret=__webpack_require__(11);var checkPropTypes=__webpack_require__(12);module2.exports=function(isValidElement,throwOnDirectAccess){var ITERATOR_SYMBOL=typeof Symbol==="function"&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if(typeof iteratorFn==="function"){return iteratorFn}}var ANONYMOUS="<<anonymous>>";var ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:createAnyTypeChecker(),arrayOf:createArrayOfTypeChecker,element:createElementTypeChecker(),instanceOf:createInstanceTypeChecker,node:createNodeChecker(),objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker,exact:createStrictShapeTypeChecker};function is(x,y){if(x===y){return x!==0||1/x===1/y}else{return x!==x&&y!==y}}function PropTypeError(message){this.message=message;this.stack=""}PropTypeError.prototype=Error.prototype;function createChainableTypeChecker(validate){if(process.env.NODE_ENV!=="production"){var manualPropTypeCallCache={};var manualPropTypeWarningCount=0}function checkType(isRequired,props,propName,componentName,location,propFullName,secret){componentName=componentName||ANONYMOUS;propFullName=propFullName||propName;if(secret!==ReactPropTypesSecret){if(throwOnDirectAccess){invariant(false,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types")}else if(process.env.NODE_ENV!=="production"&&typeof console!=="undefined"){var cacheKey=componentName+":"+propName;if(!manualPropTypeCallCache[cacheKey]&&manualPropTypeWarningCount<3){warning2(false,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",propFullName,componentName);manualPropTypeCallCache[cacheKey]=true;manualPropTypeWarningCount++}}}if(props[propName]==null){if(isRequired){if(props[propName]===null){return new PropTypeError("The "+location+" `"+propFullName+"` is marked as required "+("in `"+componentName+"`, but its value is `null`."))}return new PropTypeError("The "+location+" `"+propFullName+"` is marked as required in "+("`"+componentName+"`, but its value is `undefined`."))}return null}else{return validate(props,propName,componentName,location,propFullName)}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location,propFullName,secret){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){var preciseType=getPreciseType(propValue);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+preciseType+"` supplied to `"+componentName+"`, expected ")+("`"+expectedType+"`."))}return null}return createChainableTypeChecker(validate)}function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunction.thatReturnsNull)}function createArrayOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){if(typeof typeChecker!=="function"){return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.")}var propValue=props[propName];if(!Array.isArray(propValue)){var propType=getPropType(propValue);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an array."))}for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location,propFullName+"["+i+"]",ReactPropTypesSecret);if(error instanceof Error){return error}}return null}return createChainableTypeChecker(validate)}function createElementTypeChecker(){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];if(!isValidElement(propValue)){var propType=getPropType(propValue);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected a single ReactElement."))}return null}return createChainableTypeChecker(validate)}function createInstanceTypeChecker(expectedClass){function validate(props,propName,componentName,location,propFullName){if(!(props[propName]instanceof expectedClass)){var expectedClassName=expectedClass.name||ANONYMOUS;var actualClassName=getClassName(props[propName]);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+actualClassName+"` supplied to `"+componentName+"`, expected ")+("instance of `"+expectedClassName+"`."))}return null}return createChainableTypeChecker(validate)}function createEnumTypeChecker(expectedValues){if(!Array.isArray(expectedValues)){process.env.NODE_ENV!=="production"?warning2(false,"Invalid argument supplied to oneOf, expected an instance of array."):void 0;return emptyFunction.thatReturnsNull}function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];for(var i=0;i<expectedValues.length;i++){if(is(propValue,expectedValues[i])){return null}}var valuesString=JSON.stringify(expectedValues);return new PropTypeError("Invalid "+location+" `"+propFullName+"` of value `"+propValue+"` "+("supplied to `"+componentName+"`, expected one of "+valuesString+"."))}return createChainableTypeChecker(validate)}function createObjectOfTypeChecker(typeChecker){function validate(props,propName,componentName,location,propFullName){if(typeof typeChecker!=="function"){return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside objectOf.")}var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an object."))}for(var key in propValue){if(propValue.hasOwnProperty(key)){var error=typeChecker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error instanceof Error){return error}}}return null}return createChainableTypeChecker(validate)}function createUnionTypeChecker(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers)){process.env.NODE_ENV!=="production"?warning2(false,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0;return emptyFunction.thatReturnsNull}for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if(typeof checker!=="function"){warning2(false,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",getPostfixForTypeWarning(checker),i);return emptyFunction.thatReturnsNull}}function validate(props,propName,componentName,location,propFullName){for(var i2=0;i2<arrayOfTypeCheckers.length;i2++){var checker2=arrayOfTypeCheckers[i2];if(checker2(props,propName,componentName,location,propFullName,ReactPropTypesSecret)==null){return null}}return new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to "+("`"+componentName+"`."))}return createChainableTypeChecker(validate)}function createNodeChecker(){function validate(props,propName,componentName,location,propFullName){if(!isNode2(props[propName])){return new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to "+("`"+componentName+"`, expected a ReactNode."))}return null}return createChainableTypeChecker(validate)}function createShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` "+("supplied to `"+componentName+"`, expected `object`."))}for(var key in shapeTypes){var checker=shapeTypes[key];if(!checker){continue}var error=checker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error){return error}}return null}return createChainableTypeChecker(validate)}function createStrictShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` "+("supplied to `"+componentName+"`, expected `object`."))}var allKeys=assign2({},props[propName],shapeTypes);for(var key in allKeys){var checker=shapeTypes[key];if(!checker){return new PropTypeError("Invalid "+location+" `"+propFullName+"` key `"+key+"` supplied to `"+componentName+"`.\nBad object: "+JSON.stringify(props[propName],null,"  ")+"\nValid keys: "+JSON.stringify(Object.keys(shapeTypes),null,"  "))}var error=checker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error){return error}}return null}return createChainableTypeChecker(validate)}function isNode2(propValue){switch(typeof propValue){case"number":case"string":case"undefined":return true;case"boolean":return!propValue;case"object":if(Array.isArray(propValue)){return propValue.every(isNode2)}if(propValue===null||isValidElement(propValue)){return true}var iteratorFn=getIteratorFn(propValue);if(iteratorFn){var iterator=iteratorFn.call(propValue);var step;if(iteratorFn!==propValue.entries){while(!(step=iterator.next()).done){if(!isNode2(step.value)){return false}}}else{while(!(step=iterator.next()).done){var entry=step.value;if(entry){if(!isNode2(entry[1])){return false}}}}}else{return false}return true;default:return false}}function isSymbol(propType,propValue){if(propType==="symbol"){return true}if(propValue["@@toStringTag"]==="Symbol"){return true}if(typeof Symbol==="function"&&propValue instanceof Symbol){return true}return false}function getPropType(propValue){var propType=typeof propValue;if(Array.isArray(propValue)){return"array"}if(propValue instanceof RegExp){return"object"}if(isSymbol(propType,propValue)){return"symbol"}return propType}function getPreciseType(propValue){if(typeof propValue==="undefined"||propValue===null){return""+propValue}var propType=getPropType(propValue);if(propType==="object"){if(propValue instanceof Date){return"date"}else if(propValue instanceof RegExp){return"regexp"}}return propType}function getPostfixForTypeWarning(value){var type=getPreciseType(value);switch(type){case"array":case"object":return"an "+type;case"boolean":case"date":case"regexp":return"a "+type;default:return type}}function getClassName(propValue){if(!propValue.constructor||!propValue.constructor.name){return ANONYMOUS}return propValue.constructor.name}ReactPropTypes.checkPropTypes=checkPropTypes;ReactPropTypes.PropTypes=ReactPropTypes;return ReactPropTypes}}).call(exports,__webpack_require__(5))},function(module2,exports){function makeEmptyFunction(arg){return function(){return arg}}var emptyFunction=function emptyFunction2(){};emptyFunction.thatReturns=makeEmptyFunction;emptyFunction.thatReturnsFalse=makeEmptyFunction(false);emptyFunction.thatReturnsTrue=makeEmptyFunction(true);emptyFunction.thatReturnsNull=makeEmptyFunction(null);emptyFunction.thatReturnsThis=function(){return this};emptyFunction.thatReturnsArgument=function(arg){return arg};module2.exports=emptyFunction},function(module2,exports,__webpack_require__){(function(process){var validateFormat=function validateFormat2(format){};if(process.env.NODE_ENV!=="production"){validateFormat=function validateFormat2(format){if(format===void 0){throw new Error("invariant requires an error message argument")}}}function invariant(condition,format,a,b,c,d,e,f){validateFormat(format);if(!condition){var error;if(format===void 0){error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.")}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,(function(){return args[argIndex++]})));error.name="Invariant Violation"}error.framesToPop=1;throw error}}module2.exports=invariant}).call(exports,__webpack_require__(5))},function(module2,exports,__webpack_require__){(function(process){var emptyFunction=__webpack_require__(7);var warning2=emptyFunction;if(process.env.NODE_ENV!=="production"){var printWarning=function printWarning2(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var argIndex=0;var message="Warning: "+format.replace(/%s/g,(function(){return args[argIndex++]}));if(typeof console!=="undefined"){console.error(message)}try{throw new Error(message)}catch(x){}};warning2=function warning22(condition,format){if(format===void 0){throw new Error("`warning(condition, format, ...args)` requires a warning message argument")}if(format.indexOf("Failed Composite propType: ")===0){return}if(!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){args[_key2-2]=arguments[_key2]}printWarning.apply(void 0,[format].concat(args))}}}module2.exports=warning2}).call(exports,__webpack_require__(5))},function(module2,exports){var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty2=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===void 0){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(val)}function shouldUseNative(){try{if(!Object.assign){return false}var test1=new String("abc");test1[5]="de";if(Object.getOwnPropertyNames(test1)[0]==="5"){return false}var test2={};for(var i=0;i<10;i++){test2["_"+String.fromCharCode(i)]=i}var order2=Object.getOwnPropertyNames(test2).map((function(n){return test2[n]}));if(order2.join("")!=="0123456789"){return false}var test3={};"abcdefghijklmnopqrst".split("").forEach((function(letter){test3[letter]=letter}));if(Object.keys(Object.assign({},test3)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(err){return false}}module2.exports=shouldUseNative()?Object.assign:function(target,source){var from3;var to=toObject(target);var symbols;for(var s=1;s<arguments.length;s++){from3=Object(arguments[s]);for(var key in from3){if(hasOwnProperty2.call(from3,key)){to[key]=from3[key]}}if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from3);for(var i=0;i<symbols.length;i++){if(propIsEnumerable.call(from3,symbols[i])){to[symbols[i]]=from3[symbols[i]]}}}}return to}},function(module2,exports){var ReactPropTypesSecret="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";module2.exports=ReactPropTypesSecret},function(module2,exports,__webpack_require__){(function(process){if(process.env.NODE_ENV!=="production"){var invariant=__webpack_require__(8);var warning2=__webpack_require__(9);var ReactPropTypesSecret=__webpack_require__(11);var loggedTypeFailures={}}function checkPropTypes(typeSpecs,values,location,componentName,getStack){if(process.env.NODE_ENV!=="production"){for(var typeSpecName in typeSpecs){if(typeSpecs.hasOwnProperty(typeSpecName)){var error;try{invariant(typeof typeSpecs[typeSpecName]==="function","%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",componentName||"React class",location,typeSpecName,typeof typeSpecs[typeSpecName]);error=typeSpecs[typeSpecName](values,typeSpecName,componentName,location,null,ReactPropTypesSecret)}catch(ex){error=ex}warning2(!error||error instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",componentName||"React class",location,typeSpecName,typeof error);if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=true;var stack=getStack?getStack():"";warning2(false,"Failed %s type: %s%s",location,error.message,stack!=null?stack:"")}}}}}module2.exports=checkPropTypes}).call(exports,__webpack_require__(5))},function(module2,exports,__webpack_require__){var emptyFunction=__webpack_require__(7);var invariant=__webpack_require__(8);var ReactPropTypesSecret=__webpack_require__(11);module2.exports=function(){function shim2(props,propName,componentName,location,propFullName,secret){if(secret===ReactPropTypesSecret){return}invariant(false,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}shim2.isRequired=shim2;function getShim(){return shim2}var ReactPropTypes={array:shim2,bool:shim2,func:shim2,number:shim2,object:shim2,string:shim2,symbol:shim2,any:shim2,arrayOf:getShim,element:shim2,instanceOf:getShim,node:shim2,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim};ReactPropTypes.checkPropTypes=emptyFunction;ReactPropTypes.PropTypes=ReactPropTypes;return ReactPropTypes}},function(module2,exports){module2.exports=React__default},function(module2,exports){var simpleIsEqual=function simpleIsEqual2(a,b){return a===b};function index2(resultFn){var isEqual2=arguments.length>1&&arguments[1]!==void 0?arguments[1]:simpleIsEqual;var lastThis=void 0;var lastArgs=[];var lastResult=void 0;var calledOnce=false;var isNewArgEqualToLast=function isNewArgEqualToLast2(newArg,index22){return isEqual2(newArg,lastArgs[index22])};var result=function result2(){for(var _len=arguments.length,newArgs=Array(_len),_key=0;_key<_len;_key++){newArgs[_key]=arguments[_key]}if(calledOnce&&lastThis===this&&newArgs.length===lastArgs.length&&newArgs.every(isNewArgEqualToLast)){return lastResult}calledOnce=true;lastThis=this;lastArgs=newArgs;lastResult=resultFn.apply(this,newArgs);return lastResult};return result}module2.exports=index2}])})(main);return main.exports}var mainExports=requireMain();const Highlighter=getDefaultExportFromCjs$1(mainExports);const Highlight=props=>{const{children:children,className:className="pb_highlight_kit",data:data={},highlightedText:highlightedText=["highlight"],htmlOptions:htmlOptions={},id:id="",text:text=""}=props;const htmlProps=buildHtmlProps(htmlOptions);const highlightContent=text||children;return jsx$1(Highlighter,{autoEscape:true,data:data,highlightClassName:classnames(globalProps(props),className),highlightTag:"mark",id:id,searchWords:highlightedText,textToHighlight:highlightContent,...htmlProps})};const Body$1=props=>{if(props.variant);const{aria:aria={},children:children,className:className,color:color="",data:data={},highlightedText:highlightedText=[],highlighting:highlighting=false,htmlOptions:htmlOptions={},id:id="",status:status=null,tag:tag="div",text:text="",variant:variant=null}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_body_kit",color,variant,status),globalProps(props),className);const Tag=`${tag}`;return jsxs(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[highlighting&&jsx$1(Highlight,{highlightedText:highlightedText,text:text,children:children}),!highlighting&&(text||children)]})};const Checkbox=forwardRef(((props,ref)=>{const{aria:aria={},checked:checked=false,children:children,className:className,dark:dark=false,data:data={},disabled:disabled=false,error:error=false,htmlOptions:htmlOptions={},id:id,indeterminate:indeterminate=false,name:name="",onChange:onChange2=()=>{},tabIndex:tabIndex,text:text="",value:value=""}=props;const internalRef=useRef(null);const setRefs=el=>{internalRef.current=el;if(typeof ref==="function"){ref(el)}else if(ref){ref.current=el}};const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_checkbox_kit",checked?"checked":null,error?"error":null,indeterminate?"indeterminate":null),globalProps(props),className);useEffect((()=>{if(internalRef.current){internalRef.current.checked=checked;internalRef.current.indeterminate=indeterminate}}),[indeterminate,checked]);const checkboxChildren=()=>{if(children)return children;else return jsx$1("input",{defaultChecked:checked,disabled:disabled,name:name,onChange:onChange2,ref:setRefs,tabIndex:tabIndex,type:"checkbox",value:value})};return jsxs("label",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx$1(Fragment$1,{children:checkboxChildren()}),!indeterminate&&jsx$1("span",{className:"pb_checkbox_checkmark",children:jsx$1(Icon,{className:"check_icon",fixedWidth:true,icon:"check"})}),indeterminate&&jsx$1("span",{className:"pb_checkbox_indeterminate",children:jsx$1(Icon,{className:"indeterminate_icon",fixedWidth:true,icon:"minus"})}),jsx$1(Body$1,{className:"pb_checkbox_label",dark:dark,status:error?"negative":null,variant:null,children:text})]})}));Checkbox.displayName="Checkbox";const Caption=props=>{if(props.variant);const{aria:aria={},children:children,className:className,color:color,data:data={},htmlOptions:htmlOptions={},id:id,size:size="md",tag:tag="div",text:text,variant:variant=null}=props;const tagOptions=["h1","h2","h3","h4","h5","h6","p","span","div","caption"];const Tag=tagOptions.includes(tag)?tag:"div";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css4=classnames(buildCss("pb_caption_kit",size,variant,color),globalProps(props),className);return jsx$1(Tag,{...ariaProps,...dataProps,...htmlProps,className:css4,id:id,children:text||children})};const SectionSeparator=props=>{const{aria:aria={},children:children,className:className,color:color="default",data:data={},htmlOptions:htmlOptions={},id:id,lineStyle:lineStyle="solid",orientation:orientation="horizontal",text:text,dark:dark=false,variant:variant="card"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_section_separator_kit",`pb_section_separator_${variant}`,`pb_section_separator_${orientation}`,lineStyle==="dashed"?"pb_section_separator_dashed":"pb_section_separator_solid",color!=="default"?`pb_section_separator_color_${color}`:"pb_section_separator_color_default",globalProps(props),className);const dynamicInlineProps=globalInlineProps(props);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,style:dynamicInlineProps,children:children&&children||text&&jsx$1("span",{children:jsx$1(Caption,{dark:dark,text:text})})})};var ManagerReferenceNodeContext=React.createContext();var ManagerReferenceNodeSetterContext=React.createContext();function Manager(_ref3){var children=_ref3.children;var _React$useState=React.useState(null),referenceNode=_React$useState[0],setReferenceNode=_React$useState[1];var hasUnmounted=React.useRef(false);React.useEffect((function(){return function(){hasUnmounted.current=true}}),[]);var handleSetReferenceNode=React.useCallback((function(node2){if(!hasUnmounted.current){setReferenceNode(node2)}}),[]);return React.createElement(ManagerReferenceNodeContext.Provider,{value:referenceNode},React.createElement(ManagerReferenceNodeSetterContext.Provider,{value:handleSetReferenceNode},children))}var unwrapArray=function unwrapArray2(arg){return Array.isArray(arg)?arg[0]:arg};var safeInvoke=function safeInvoke2(fn){if(typeof fn==="function"){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}return fn.apply(void 0,args)}};var setRef=function setRef2(ref,node2){if(typeof ref==="function"){return safeInvoke(ref,node2)}else if(ref!=null){ref.current=node2}};var fromEntries=function fromEntries2(entries){return entries.reduce((function(acc,_ref3){var key=_ref3[0],value=_ref3[1];acc[key]=value;return acc}),{})};var useIsomorphicLayoutEffect$1=typeof window!=="undefined"&&window.document&&window.document.createElement?React.useLayoutEffect:React.useEffect;var reactFastCompare;var hasRequiredReactFastCompare;function requireReactFastCompare(){if(hasRequiredReactFastCompare)return reactFastCompare;hasRequiredReactFastCompare=1;var hasElementType=typeof Element!=="undefined";var hasMap=typeof Map==="function";var hasSet=typeof Set==="function";var hasArrayBuffer=typeof ArrayBuffer==="function"&&!!ArrayBuffer.isView;function equal2(a,b){if(a===b)return true;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return false;var length2,i,keys2;if(Array.isArray(a)){length2=a.length;if(length2!=b.length)return false;for(i=length2;i--!==0;)if(!equal2(a[i],b[i]))return false;return true}var it;if(hasMap&&a instanceof Map&&b instanceof Map){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;it=a.entries();while(!(i=it.next()).done)if(!equal2(i.value[1],b.get(i.value[0])))return false;return true}if(hasSet&&a instanceof Set&&b instanceof Set){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;return true}if(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){length2=a.length;if(length2!=b.length)return false;for(i=length2;i--!==0;)if(a[i]!==b[i])return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys2=Object.keys(a);length2=keys2.length;if(length2!==Object.keys(b).length)return false;for(i=length2;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys2[i]))return false;if(hasElementType&&a instanceof Element)return false;for(i=length2;i--!==0;){if((keys2[i]==="_owner"||keys2[i]==="__v"||keys2[i]==="__o")&&a.$$typeof){continue}if(!equal2(a[keys2[i]],b[keys2[i]]))return false}return true}return a!==a&&b!==b}reactFastCompare=function isEqual2(a,b){try{return equal2(a,b)}catch(error){if((error.message||"").match(/stack|recursion/i)){console.warn("react-fast-compare cannot handle circular refs");return false}throw error}};return reactFastCompare}var reactFastCompareExports=requireReactFastCompare();const isEqual$1=getDefaultExportFromCjs$1(reactFastCompareExports);var EMPTY_MODIFIERS$1=[];var usePopper=function usePopper2(referenceElement,popperElement,options2){if(options2===void 0){options2={}}var prevOptions=React.useRef(null);var optionsWithDefaults={onFirstUpdate:options2.onFirstUpdate,placement:options2.placement||"bottom",strategy:options2.strategy||"absolute",modifiers:options2.modifiers||EMPTY_MODIFIERS$1};var _React$useState=React.useState({styles:{popper:{position:optionsWithDefaults.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),state=_React$useState[0],setState=_React$useState[1];var updateStateModifier=React.useMemo((function(){return{name:"updateState",enabled:true,phase:"write",fn:function fn(_ref3){var state2=_ref3.state;var elements=Object.keys(state2.elements);ReactDOM.flushSync((function(){setState({styles:fromEntries(elements.map((function(element){return[element,state2.styles[element]||{}]}))),attributes:fromEntries(elements.map((function(element){return[element,state2.attributes[element]]})))})}))},requires:["computeStyles"]}}),[]);var popperOptions=React.useMemo((function(){var newOptions={onFirstUpdate:optionsWithDefaults.onFirstUpdate,placement:optionsWithDefaults.placement,strategy:optionsWithDefaults.strategy,modifiers:[].concat(optionsWithDefaults.modifiers,[updateStateModifier,{name:"applyStyles",enabled:false}])};if(isEqual$1(prevOptions.current,newOptions)){return prevOptions.current||newOptions}else{prevOptions.current=newOptions;return newOptions}}),[optionsWithDefaults.onFirstUpdate,optionsWithDefaults.placement,optionsWithDefaults.strategy,optionsWithDefaults.modifiers,updateStateModifier]);var popperInstanceRef=React.useRef();useIsomorphicLayoutEffect$1((function(){if(popperInstanceRef.current){popperInstanceRef.current.setOptions(popperOptions)}}),[popperOptions]);useIsomorphicLayoutEffect$1((function(){if(referenceElement==null||popperElement==null){return}var createPopper$1=options2.createPopper||createPopper;var popperInstance=createPopper$1(referenceElement,popperElement,popperOptions);popperInstanceRef.current=popperInstance;return function(){popperInstance.destroy();popperInstanceRef.current=null}}),[referenceElement,popperElement,options2.createPopper]);return{state:popperInstanceRef.current?popperInstanceRef.current.state:null,styles:state.styles,attributes:state.attributes,update:popperInstanceRef.current?popperInstanceRef.current.update:null,forceUpdate:popperInstanceRef.current?popperInstanceRef.current.forceUpdate:null}};var NOOP=function NOOP2(){return void 0};var NOOP_PROMISE=function NOOP_PROMISE2(){return Promise.resolve(null)};var EMPTY_MODIFIERS=[];function Popper(_ref3){var _ref$placement=_ref3.placement,placement=_ref$placement===void 0?"bottom":_ref$placement,_ref$strategy=_ref3.strategy,strategy=_ref$strategy===void 0?"absolute":_ref$strategy,_ref$modifiers=_ref3.modifiers,modifiers2=_ref$modifiers===void 0?EMPTY_MODIFIERS:_ref$modifiers,referenceElement=_ref3.referenceElement,onFirstUpdate=_ref3.onFirstUpdate,innerRef=_ref3.innerRef,children=_ref3.children;var referenceNode=React.useContext(ManagerReferenceNodeContext);var _React$useState=React.useState(null),popperElement=_React$useState[0],setPopperElement=_React$useState[1];var _React$useState2=React.useState(null),arrowElement=_React$useState2[0],setArrowElement=_React$useState2[1];React.useEffect((function(){setRef(innerRef,popperElement)}),[innerRef,popperElement]);var options2=React.useMemo((function(){return{placement:placement,strategy:strategy,onFirstUpdate:onFirstUpdate,modifiers:[].concat(modifiers2,[{name:"arrow",enabled:arrowElement!=null,options:{element:arrowElement}}])}}),[placement,strategy,onFirstUpdate,modifiers2,arrowElement]);var _usePopper=usePopper(referenceElement||referenceNode,popperElement,options2),state=_usePopper.state,styles=_usePopper.styles,forceUpdate=_usePopper.forceUpdate,update=_usePopper.update;var childrenProps=React.useMemo((function(){return{ref:setPopperElement,style:styles.popper,placement:state?state.placement:placement,hasPopperEscaped:state&&state.modifiersData.hide?state.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:state&&state.modifiersData.hide?state.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:styles.arrow,ref:setArrowElement},forceUpdate:forceUpdate||NOOP,update:update||NOOP_PROMISE}}),[setPopperElement,setArrowElement,placement,state,styles,update,forceUpdate]);return unwrapArray(children)(childrenProps)}var warning_1;var hasRequiredWarning;function requireWarning(){if(hasRequiredWarning)return warning_1;hasRequiredWarning=1;var warning2=function(){};warning_1=warning2;return warning_1}var warningExports=requireWarning();const warning=getDefaultExportFromCjs$1(warningExports);function Reference(_ref3){var children=_ref3.children,innerRef=_ref3.innerRef;var setReferenceNode=React.useContext(ManagerReferenceNodeSetterContext);var refHandler=React.useCallback((function(node2){setRef(innerRef,node2);safeInvoke(setReferenceNode,node2)}),[innerRef,setReferenceNode]);React.useEffect((function(){return function(){return setRef(innerRef,null)}}),[]);React.useEffect((function(){warning(Boolean(setReferenceNode),"`Reference` should not be used outside of a `Manager` component.")}),[setReferenceNode]);return unwrapArray(children)({ref:refHandler})}const POPOVER_MODIFIERS={offset:{enabled:true,name:"offset",options:{offset:[0,20]},phase:"main"}};const popoverModifiers=({modifiers:modifiers2,offset:offset2})=>offset2?modifiers2.concat([POPOVER_MODIFIERS.offset]):modifiers2;const Popover=props=>{const{aria:aria={},className:className,children:children,data:data={},htmlOptions:htmlOptions={},id:id,modifiers:modifiers2,offset:offset2,placement:placement,referenceElement:referenceElement,zIndex:zIndex,maxHeight:maxHeight,maxWidth:maxWidth,minHeight:minHeight,minWidth:minWidth,width:width,targetId:targetId}=props;const items=globalProps(props).split(" ");const filteredItems=items.filter((item=>!item.includes("min-width")&&!item.includes("width")));const filteredGlobalProps=filteredItems.join(" ");const popoverSpacing=filteredGlobalProps.includes("dark")||!filteredGlobalProps?"p_sm":filteredGlobalProps;const overflowHandling=maxHeight||maxWidth?"overflow_handling":"";const zIndexStyle=zIndex?{zIndex:zIndex}:{};const widthHeightStyles=()=>Object.assign({},maxHeight?{maxHeight:maxHeight}:{},maxWidth?{maxWidth:maxWidth}:{},minHeight?{minHeight:minHeight}:{},minWidth?{minWidth:minWidth}:{},width?{width:width}:{});const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_popover_kit"),filteredGlobalProps,className);return jsx$1(Popper,{modifiers:popoverModifiers({modifiers:modifiers2,offset:offset2}),placement:placement,referenceElement:referenceElement,children:({placement:placement2,ref:ref,style:style2})=>jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,"data-placement":placement2,id:id,ref:ref,style:Object.assign({},style2,zIndexStyle),children:jsx$1("div",{className:classnames(`${buildCss("pb_popover_tooltip")} show`),children:jsx$1("div",{className:classnames("pb_popover_body",popoverSpacing,overflowHandling),id:targetId,style:widthHeightStyles(),children:children})})})})};const PbReactPopover=props=>{const[targetId]=useState(uniqueId("id-"));const{className:className,children:children,modifiers:modifiers2=[],offset:offset2=false,placement:placement="left",portal:portal="body",reference:reference,referenceElement:referenceElement,show:show=false,usePortal:usePortal=true,zIndex:zIndex,maxHeight:maxHeight,maxWidth:maxWidth,minHeight:minHeight,minWidth:minWidth,width:width}=props;useEffect((()=>{const{closeOnClick:closeOnClick,shouldClosePopover:shouldClosePopover=noop$2}=props;if(!closeOnClick)return;document.body.addEventListener("click",(e=>{const target=e.target;const targetIsPopover=target.closest("#"+targetId)!==null;const targetIsReference=target.closest("#reference-"+targetId)!==null;const shouldClose=()=>{setTimeout((()=>shouldClosePopover(true)),0)};switch(closeOnClick){case"outside":if(!targetIsPopover&&!targetIsReference)shouldClose();break;case"inside":if(targetIsPopover)shouldClose();break;case"any":if(targetIsPopover||!targetIsPopover&&!targetIsReference)shouldClose();break}}),{capture:true})}),[]);const popoverComponent=jsx$1(Popover,{className:className,maxHeight:maxHeight,maxWidth:maxWidth,minHeight:minHeight,minWidth:minWidth,modifiers:modifiers2,offset:offset2,placement:placement,referenceElement:referenceElement,targetId:targetId,width:width,zIndex:zIndex,...props,children:children});return jsx$1(Manager,{children:jsxs(Fragment$1,{children:[reference&&!referenceElement&&jsx$1(Reference,{children:({ref:ref})=>jsx$1("span",{className:"pb_popover_reference_wrapper",id:"reference-"+targetId,ref:ref,children:jsx$1(reference.type,{...reference.props})})}),show&&(usePortal?jsx$1(Fragment$1,{children:ReactDOM__default.createPortal(popoverComponent,document.querySelector(portal))}):{popoverComponent:popoverComponent})]})})};const Detail=props=>{const{aria:aria={},bold:bold=false,children:children,className:className,color:color="light",data:data={},htmlOptions:htmlOptions={},id:id="",tag:tag="div",text:text=""}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isBold=bold?"bold":null;const classes=classnames(buildCss("pb_detail_kit",`color`,color),isBold,globalProps(props),className);const Tag=`${tag}`;return jsx$1(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text||children})};const Header=props=>{const{children:children,className:className,headerColor:headerColor="category_1",headerColorStriped:headerColorStriped=false}=props;const headerColorCSS=`pb_card_header_kit_${headerColor}`;const headerStripedCSS=headerColorStriped?`pb_card_header_kit_${headerColor}_striped`:"";const headerCSS=classnames("pb_card_header_kit",headerColorCSS,headerStripedCSS);const headerSpacing=globalProps(props);return jsx$1("div",{className:classnames(headerCSS,headerSpacing,className),children:children})};const Body=props=>{const{children:children,className:className}=props;const bodySpacing=globalProps(props);return jsx$1("div",{className:classnames("pb_card_body_kit",bodySpacing,className),children:children})};const Card=props=>{const{aria:aria={},background:background="none",borderNone:borderNone=false,borderRadius:borderRadius2="md",children:children,className:className,data:data={},dragId:dragId,dragHandle:dragHandle=true,draggableItem:draggableItem=false,highlight:highlight={},htmlOptions:htmlOptions={},selected:selected=false,tag:tag="div"}=props;const borderCSS=borderNone==true?"pb_card_kit_border_none":"";const selectedCSS=selected==true?"pb_card_kit_selected":"";const backgroundCSS=background=="none"?"":`pb_card_kit_background_${background}`;const borderRadiusCSS=borderRadius2!=="md"?`pb_card_kit_border_radius_${borderRadius2}`:"";const highlightPositionCSS=highlight.position?`pb_card_kit_highlight_${highlight.position}`:"";const highlightColorCSS=highlight.color?`pb_card_kit_highlight_${highlight.color}`:"";const cardCss=classnames("pb_card_kit",selectedCSS,borderCSS,borderRadiusCSS,backgroundCSS,highlightPositionCSS,highlightColorCSS);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const cardChildren=React__default.Children.toArray(children);const dynamicInlineProps=globalInlineProps(props);const{style:htmlStyle={},...restHtmlProps}=htmlProps;const mergedStyles={...htmlStyle,...dynamicInlineProps};const subComponentTags=tagName=>cardChildren.filter((c=>get(c,"type.displayName")===tagName)).map(((child,i)=>{if(React__default.isValidElement(child)){return React__default.cloneElement(child,{key:`${tagName.toLowerCase()}-${i}`})}}));const nonHeaderChildren=cardChildren.filter((child=>get(child,"type.displayName")!=="Header"));const tagOptions=["div","section","footer","header","article","aside","main","nav"];const Tag=tagOptions.includes(tag)?tag:"div";return jsx$1(Fragment$1,{children:draggableItem?jsx$1(Draggable.Item,{dragId:dragId,children:jsxs(Tag,{...ariaProps,...dataProps,className:classnames(cardCss,globalProps(props),className),...restHtmlProps,style:mergedStyles,children:[subComponentTags("Header"),dragHandle?jsxs(Flex,{children:[jsx$1("span",{className:"card_draggable_handle",children:jsx$1(Icon,{icon:"grip-dots-vertical",paddingRight:"xs",verticalAlign:"middle"})}),jsx$1("div",{style:{width:"100%"},children:nonHeaderChildren})]}):nonHeaderChildren]})},dragId):jsxs(Tag,{...ariaProps,...dataProps,className:classnames(cardCss,globalProps(props),className),...restHtmlProps,style:mergedStyles,children:[subComponentTags("Header"),nonHeaderChildren]})})};Card.Header=Header;Card.Body=Body;function hasWindow(){return typeof window!=="undefined"}function getNodeName$1(node2){if(isNode$1(node2)){return(node2.nodeName||"").toLowerCase()}return"#document"}function getWindow$1(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument=node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement$1(node2){var _ref3;return(_ref3=(isNode$1(node2)?node2.ownerDocument:node2.document)||window.document)==null?void 0:_ref3.documentElement}function isNode$1(value){if(!hasWindow()){return false}return value instanceof Node||value instanceof getWindow$1(value).Node}function isElement$1(value){if(!hasWindow()){return false}return value instanceof Element||value instanceof getWindow$1(value).Element}function isHTMLElement$1(value){if(!hasWindow()){return false}return value instanceof HTMLElement||value instanceof getWindow$1(value).HTMLElement}function isShadowRoot$1(value){if(!hasWindow()||typeof ShadowRoot==="undefined"){return false}return value instanceof ShadowRoot||value instanceof getWindow$1(value).ShadowRoot}function isOverflowElement$1(element){const{overflow:overflow,overflowX:overflowX,overflowY:overflowY,display:display}=getComputedStyle$2(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!["inline","contents"].includes(display)}function isTableElement(element){return["table","td","th"].includes(getNodeName$1(element))}function isTopLayer(element){return[":popover-open",":modal"].some((selector=>{try{return element.matches(selector)}catch(e){return false}}))}function isContainingBlock(elementOrCss){const webkit2=isWebKit$1();const css4=isElement$1(elementOrCss)?getComputedStyle$2(elementOrCss):elementOrCss;return css4.transform!=="none"||css4.perspective!=="none"||(css4.containerType?css4.containerType!=="normal":false)||!webkit2&&(css4.backdropFilter?css4.backdropFilter!=="none":false)||!webkit2&&(css4.filter?css4.filter!=="none":false)||["transform","perspective","filter"].some((value=>(css4.willChange||"").includes(value)))||["paint","layout","strict","content"].some((value=>(css4.contain||"").includes(value)))}function getContainingBlock(element){let currentNode=getParentNode$1(element);while(isHTMLElement$1(currentNode)&&!isLastTraversableNode$1(currentNode)){if(isContainingBlock(currentNode)){return currentNode}else if(isTopLayer(currentNode)){return null}currentNode=getParentNode$1(currentNode)}return null}function isWebKit$1(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode$1(node2){return["html","body","#document"].includes(getNodeName$1(node2))}function getComputedStyle$2(element){return getWindow$1(element).getComputedStyle(element)}function getNodeScroll(element){if(isElement$1(element)){return{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}}return{scrollLeft:element.scrollX,scrollTop:element.scrollY}}function getParentNode$1(node2){if(getNodeName$1(node2)==="html"){return node2}const result=node2.assignedSlot||node2.parentNode||isShadowRoot$1(node2)&&node2.host||getDocumentElement$1(node2);return isShadowRoot$1(result)?result.host:result}function getNearestOverflowAncestor$1(node2){const parentNode2=getParentNode$1(node2);if(isLastTraversableNode$1(parentNode2)){return node2.ownerDocument?node2.ownerDocument.body:node2.body}if(isHTMLElement$1(parentNode2)&&isOverflowElement$1(parentNode2)){return parentNode2}return getNearestOverflowAncestor$1(parentNode2)}function getOverflowAncestors$1(node2,list,traverseIframes){var _node$ownerDocument2;if(list===void 0){list=[]}const scrollableAncestor=getNearestOverflowAncestor$1(node2);const isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body);const win=getWindow$1(scrollableAncestor);if(isBody){getFrameElement(win);return list.concat(win,win.visualViewport||[],isOverflowElement$1(scrollableAncestor)?scrollableAncestor:[],[])}return list.concat(scrollableAncestor,getOverflowAncestors$1(scrollableAncestor,[]))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function contains(parent,child){if(!parent||!child){return false}const rootNode=child.getRootNode==null?void 0:child.getRootNode();if(parent.contains(child)){return true}if(rootNode&&isShadowRoot$1(rootNode)){let next2=child;while(next2){if(parent===next2){return true}next2=next2.parentNode||next2.host}}return false}function isMouseLikePointerType(pointerType,strict){const values=["mouse","pen"];if(!strict){values.push("",void 0)}return values.includes(pointerType)}function getDocument(node2){return(node2==null?void 0:node2.ownerDocument)||document}function getTarget(event2){if("composedPath"in event2){return event2.composedPath()[0]}return event2.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(element){return isHTMLElement$1(element)&&element.matches(TYPEABLE_SELECTOR)}function getCssDimensions$1(element){const css4=getComputedStyle$2(element);let width=parseFloat(css4.width)||0;let height=parseFloat(css4.height)||0;const hasOffset=isHTMLElement$1(element);const offsetWidth=hasOffset?element.offsetWidth:width;const offsetHeight=hasOffset?element.offsetHeight:height;const shouldFallback=round$1(width)!==offsetWidth||round$1(height)!==offsetHeight;if(shouldFallback){width=offsetWidth;height=offsetHeight}return{width:width,height:height,$:shouldFallback}}function unwrapElement$1(element){return!isElement$1(element)?element.contextElement:element}function getScale$1(element){const domElement=unwrapElement$1(element);if(!isHTMLElement$1(domElement)){return createCoords$1(1)}const rect=domElement.getBoundingClientRect();const{width:width,height:height,$:$}=getCssDimensions$1(domElement);let x=($?round$1(rect.width):rect.width)/width;let y=($?round$1(rect.height):rect.height)/height;if(!x||!Number.isFinite(x)){x=1}if(!y||!Number.isFinite(y)){y=1}return{x:x,y:y}}const noOffsets$1=createCoords$1(0);function getVisualOffsets$1(element){const win=getWindow$1(element);if(!isWebKit$1()||!win.visualViewport){return noOffsets$1}return{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets$1(element,isFixed,floatingOffsetParent){if(isFixed===void 0){isFixed=false}if(!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow$1(element)){return false}return isFixed}function getBoundingClientRect$1(element,includeScale,isFixedStrategy,offsetParent){if(includeScale===void 0){includeScale=false}if(isFixedStrategy===void 0){isFixedStrategy=false}const clientRect2=element.getBoundingClientRect();const domElement=unwrapElement$1(element);let scale=createCoords$1(1);if(includeScale){if(offsetParent){if(isElement$1(offsetParent)){scale=getScale$1(offsetParent)}}else{scale=getScale$1(element)}}const visualOffsets=shouldAddVisualOffsets$1(domElement,isFixedStrategy,offsetParent)?getVisualOffsets$1(domElement):createCoords$1(0);let x=(clientRect2.left+visualOffsets.x)/scale.x;let y=(clientRect2.top+visualOffsets.y)/scale.y;let width=clientRect2.width/scale.x;let height=clientRect2.height/scale.y;if(domElement){const win=getWindow$1(domElement);const offsetWin=offsetParent&&isElement$1(offsetParent)?getWindow$1(offsetParent):offsetParent;let currentWin=win;let currentIFrame=getFrameElement(currentWin);while(currentIFrame&&offsetParent&&offsetWin!==currentWin){const iframeScale=getScale$1(currentIFrame);const iframeRect=currentIFrame.getBoundingClientRect();const css4=getComputedStyle$2(currentIFrame);const left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css4.paddingLeft))*iframeScale.x;const top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css4.paddingTop))*iframeScale.y;x*=iframeScale.x;y*=iframeScale.y;width*=iframeScale.x;height*=iframeScale.y;x+=left;y+=top;currentWin=getWindow$1(currentIFrame);currentIFrame=getFrameElement(currentWin)}}return rectToClientRect$1({width:width,height:height,x:x,y:y})}function getWindowScrollBarX(element,rect){const leftScroll=getNodeScroll(element).scrollLeft;if(!rect){return getBoundingClientRect$1(getDocumentElement$1(element)).left+leftScroll}return rect.left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){if(ignoreScrollbarX===void 0){ignoreScrollbarX=false}const htmlRect=documentElement.getBoundingClientRect();const x=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect));const y=htmlRect.top+scroll.scrollTop;return{x:x,y:y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref3){let{elements:elements,rect:rect,offsetParent:offsetParent,strategy:strategy}=_ref3;const isFixed=strategy==="fixed";const documentElement=getDocumentElement$1(offsetParent);const topLayer=elements?isTopLayer(elements.floating):false;if(offsetParent===documentElement||topLayer&&isFixed){return rect}let scroll={scrollLeft:0,scrollTop:0};let scale=createCoords$1(1);const offsets=createCoords$1(0);const isOffsetParentAnElement=isHTMLElement$1(offsetParent);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName$1(offsetParent)!=="body"||isOverflowElement$1(documentElement)){scroll=getNodeScroll(offsetParent)}if(isHTMLElement$1(offsetParent)){const offsetRect=getBoundingClientRect$1(offsetParent);scale=getScale$1(offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft;offsets.y=offsetRect.y+offsetParent.clientTop}}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,true):createCoords$1(0);return{width:rect.width*scale.x,height:rect.height*scale.y,x:rect.x*scale.x-scroll.scrollLeft*scale.x+offsets.x+htmlOffset.x,y:rect.y*scale.y-scroll.scrollTop*scale.y+offsets.y+htmlOffset.y}}function getClientRects(element){return Array.from(element.getClientRects())}function getDocumentRect(element){const html=getDocumentElement$1(element);const scroll=getNodeScroll(element);const body=element.ownerDocument.body;const width=max$1(html.scrollWidth,html.clientWidth,body.scrollWidth,body.clientWidth);const height=max$1(html.scrollHeight,html.clientHeight,body.scrollHeight,body.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element);const y=-scroll.scrollTop;if(getComputedStyle$2(body).direction==="rtl"){x+=max$1(html.clientWidth,body.clientWidth)-width}return{width:width,height:height,x:x,y:y}}function getViewportRect(element,strategy){const win=getWindow$1(element);const html=getDocumentElement$1(element);const visualViewport=win.visualViewport;let width=html.clientWidth;let height=html.clientHeight;let x=0;let y=0;if(visualViewport){width=visualViewport.width;height=visualViewport.height;const visualViewportBased=isWebKit$1();if(!visualViewportBased||visualViewportBased&&strategy==="fixed"){x=visualViewport.offsetLeft;y=visualViewport.offsetTop}}return{width:width,height:height,x:x,y:y}}function getInnerBoundingClientRect(element,strategy){const clientRect2=getBoundingClientRect$1(element,true,strategy==="fixed");const top=clientRect2.top+element.clientTop;const left=clientRect2.left+element.clientLeft;const scale=isHTMLElement$1(element)?getScale$1(element):createCoords$1(1);const width=element.clientWidth*scale.x;const height=element.clientHeight*scale.y;const x=left*scale.x;const y=top*scale.y;return{width:width,height:height,x:x,y:y}}function getClientRectFromClippingAncestor(element,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport"){rect=getViewportRect(element,strategy)}else if(clippingAncestor==="document"){rect=getDocumentRect(getDocumentElement$1(element))}else if(isElement$1(clippingAncestor)){rect=getInnerBoundingClientRect(clippingAncestor,strategy)}else{const visualOffsets=getVisualOffsets$1(element);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect$1(rect)}function hasFixedPositionAncestor(element,stopNode){const parentNode2=getParentNode$1(element);if(parentNode2===stopNode||!isElement$1(parentNode2)||isLastTraversableNode$1(parentNode2)){return false}return getComputedStyle$2(parentNode2).position==="fixed"||hasFixedPositionAncestor(parentNode2,stopNode)}function getClippingElementAncestors(element,cache){const cachedResult2=cache.get(element);if(cachedResult2){return cachedResult2}let result=getOverflowAncestors$1(element,[]).filter((el=>isElement$1(el)&&getNodeName$1(el)!=="body"));let currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle$2(element).position==="fixed";let currentNode=elementIsFixed?getParentNode$1(element):element;while(isElement$1(currentNode)&&!isLastTraversableNode$1(currentNode)){const computedStyle=getComputedStyle$2(currentNode);const currentNodeIsContaining=isContainingBlock(currentNode);if(!currentNodeIsContaining&&computedStyle.position==="fixed"){currentContainingBlockComputedStyle=null}const shouldDropCurrentNode=elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&["absolute","fixed"].includes(currentContainingBlockComputedStyle.position)||isOverflowElement$1(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element,currentNode);if(shouldDropCurrentNode){result=result.filter((ancestor=>ancestor!==currentNode))}else{currentContainingBlockComputedStyle=computedStyle}currentNode=getParentNode$1(currentNode)}cache.set(element,result);return result}function getClippingRect(_ref3){let{element:element,boundary:boundary,rootBoundary:rootBoundary,strategy:strategy}=_ref3;const elementClippingAncestors=boundary==="clippingAncestors"?isTopLayer(element)?[]:getClippingElementAncestors(element,this._c):[].concat(boundary);const clippingAncestors=[...elementClippingAncestors,rootBoundary];const firstClippingAncestor=clippingAncestors[0];const clippingRect=clippingAncestors.reduce(((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(element,clippingAncestor,strategy);accRect.top=max$1(rect.top,accRect.top);accRect.right=min$1(rect.right,accRect.right);accRect.bottom=min$1(rect.bottom,accRect.bottom);accRect.left=max$1(rect.left,accRect.left);return accRect}),getClientRectFromClippingAncestor(element,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element){const{width:width,height:height}=getCssDimensions$1(element);return{width:width,height:height}}function getRectRelativeToOffsetParent(element,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement$1(offsetParent);const documentElement=getDocumentElement$1(offsetParent);const isFixed=strategy==="fixed";const rect=getBoundingClientRect$1(element,true,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords$1(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName$1(offsetParent)!=="body"||isOverflowElement$1(documentElement)){scroll=getNodeScroll(offsetParent)}if(isOffsetParentAnElement){const offsetRect=getBoundingClientRect$1(offsetParent,true,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft;offsets.y=offsetRect.y+offsetParent.clientTop}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement)}}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords$1(0);const x=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x;const y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x:x,y:y,width:rect.width,height:rect.height}}function isStaticPositioned(element){return getComputedStyle$2(element).position==="static"}function getTrueOffsetParent(element,polyfill){if(!isHTMLElement$1(element)||getComputedStyle$2(element).position==="fixed"){return null}if(polyfill){return polyfill(element)}let rawOffsetParent=element.offsetParent;if(getDocumentElement$1(element)===rawOffsetParent){rawOffsetParent=rawOffsetParent.ownerDocument.body}return rawOffsetParent}function getOffsetParent(element,polyfill){const win=getWindow$1(element);if(isTopLayer(element)){return win}if(!isHTMLElement$1(element)){let svgOffsetParent=getParentNode$1(element);while(svgOffsetParent&&!isLastTraversableNode$1(svgOffsetParent)){if(isElement$1(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent)){return svgOffsetParent}svgOffsetParent=getParentNode$1(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element,polyfill);while(offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent)){offsetParent=getTrueOffsetParent(offsetParent,polyfill)}if(offsetParent&&isLastTraversableNode$1(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)){return win}return offsetParent||getContainingBlock(element)||win}const getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent;const getDimensionsFn=this.getDimensions;const floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element){return getComputedStyle$2(element).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect,getOffsetParent:getOffsetParent,getElementRects:getElementRects,getClientRects:getClientRects,getDimensions:getDimensions,getScale:getScale$1,isElement:isElement$1,isRTL:isRTL};const offset$1=offset$2;const shift$2=shift$3;const flip$1=flip$2;const arrow$3=arrow$4;const computePosition=(reference,floating,options2)=>{const cache=new Map;const mergedOptions={platform:platform,...options2};const platformWithCache={...mergedOptions.platform,_c:cache};return computePosition$1(reference,floating,{...mergedOptions,platform:platformWithCache})};var index$2=typeof document!=="undefined"?useLayoutEffect:useEffect;function deepEqual$1(a,b){if(a===b){return true}if(typeof a!==typeof b){return false}if(typeof a==="function"&&a.toString()===b.toString()){return true}let length2;let i;let keys2;if(a&&b&&typeof a==="object"){if(Array.isArray(a)){length2=a.length;if(length2!==b.length)return false;for(i=length2;i--!==0;){if(!deepEqual$1(a[i],b[i])){return false}}return true}keys2=Object.keys(a);length2=keys2.length;if(length2!==Object.keys(b).length){return false}for(i=length2;i--!==0;){if(!{}.hasOwnProperty.call(b,keys2[i])){return false}}for(i=length2;i--!==0;){const key=keys2[i];if(key==="_owner"&&a.$$typeof){continue}if(!deepEqual$1(a[key],b[key])){return false}}return true}return a!==a&&b!==b}function getDPR(element){if(typeof window==="undefined"){return 1}const win=element.ownerDocument.defaultView||window;return win.devicePixelRatio||1}function roundByDPR(element,value){const dpr=getDPR(element);return Math.round(value*dpr)/dpr}function useLatestRef$1(value){const ref=React.useRef(value);index$2((()=>{ref.current=value}));return ref}function useFloating$1(options2){if(options2===void 0){options2={}}const{placement:placement="bottom",strategy:strategy="absolute",middleware:middleware2=[],platform:platform2,elements:{reference:externalReference,floating:externalFloating}={},transform:transform=true,whileElementsMounted:whileElementsMounted,open:open}=options2;const[data,setData]=React.useState({x:0,y:0,strategy:strategy,placement:placement,middlewareData:{},isPositioned:false});const[latestMiddleware,setLatestMiddleware]=React.useState(middleware2);if(!deepEqual$1(latestMiddleware,middleware2)){setLatestMiddleware(middleware2)}const[_reference,_setReference]=React.useState(null);const[_floating,_setFloating]=React.useState(null);const setReference=React.useCallback((node2=>{if(node2!==referenceRef.current){referenceRef.current=node2;_setReference(node2)}}),[]);const setFloating=React.useCallback((node2=>{if(node2!==floatingRef.current){floatingRef.current=node2;_setFloating(node2)}}),[]);const referenceEl=externalReference||_reference;const floatingEl=externalFloating||_floating;const referenceRef=React.useRef(null);const floatingRef=React.useRef(null);const dataRef=React.useRef(data);const hasWhileElementsMounted=whileElementsMounted!=null;const whileElementsMountedRef=useLatestRef$1(whileElementsMounted);const platformRef=useLatestRef$1(platform2);const openRef=useLatestRef$1(open);const update=React.useCallback((()=>{if(!referenceRef.current||!floatingRef.current){return}const config={placement:placement,strategy:strategy,middleware:latestMiddleware};if(platformRef.current){config.platform=platformRef.current}computePosition(referenceRef.current,floatingRef.current,config).then((data2=>{const fullData={...data2,isPositioned:openRef.current!==false};if(isMountedRef.current&&!deepEqual$1(dataRef.current,fullData)){dataRef.current=fullData;ReactDOM.flushSync((()=>{setData(fullData)}))}}))}),[latestMiddleware,placement,strategy,platformRef,openRef]);index$2((()=>{if(open===false&&dataRef.current.isPositioned){dataRef.current.isPositioned=false;setData((data2=>({...data2,isPositioned:false})))}}),[open]);const isMountedRef=React.useRef(false);index$2((()=>{isMountedRef.current=true;return()=>{isMountedRef.current=false}}),[]);index$2((()=>{if(referenceEl)referenceRef.current=referenceEl;if(floatingEl)floatingRef.current=floatingEl;if(referenceEl&&floatingEl){if(whileElementsMountedRef.current){return whileElementsMountedRef.current(referenceEl,floatingEl,update)}update()}}),[referenceEl,floatingEl,update,whileElementsMountedRef,hasWhileElementsMounted]);const refs=React.useMemo((()=>({reference:referenceRef,floating:floatingRef,setReference:setReference,setFloating:setFloating})),[setReference,setFloating]);const elements=React.useMemo((()=>({reference:referenceEl,floating:floatingEl})),[referenceEl,floatingEl]);const floatingStyles=React.useMemo((()=>{const initialStyles={position:strategy,left:0,top:0};if(!elements.floating){return initialStyles}const x=roundByDPR(elements.floating,data.x);const y=roundByDPR(elements.floating,data.y);if(transform){return{...initialStyles,transform:"translate("+x+"px, "+y+"px)",...getDPR(elements.floating)>=1.5&&{willChange:"transform"}}}return{position:strategy,left:x,top:y}}),[strategy,transform,elements.floating,data.x,data.y]);return React.useMemo((()=>({...data,update:update,refs:refs,elements:elements,floatingStyles:floatingStyles})),[data,update,refs,elements,floatingStyles])}const arrow$1=options2=>{function isRef(value){return{}.hasOwnProperty.call(value,"current")}return{name:"arrow",options:options2,fn(state){const{element:element,padding:padding}=typeof options2==="function"?options2(state):options2;if(element&&isRef(element)){if(element.current!=null){return arrow$3({element:element.current,padding:padding}).fn(state)}return{}}if(element){return arrow$3({element:element,padding:padding}).fn(state)}return{}}}};const offset=(options2,deps)=>({...offset$1(options2),options:[options2,deps]});const shift$1=(options2,deps)=>({...shift$2(options2),options:[options2,deps]});const flip=(options2,deps)=>({...flip$1(options2),options:[options2,deps]});const arrow$2=(options2,deps)=>({...arrow$1(options2),options:[options2,deps]});const SafeReact={...React};const useInsertionEffect$1=SafeReact.useInsertionEffect;const useSafeInsertionEffect=useInsertionEffect$1||(fn=>fn());function useEffectEvent(callback){const ref=React.useRef((()=>{}));useSafeInsertionEffect((()=>{ref.current=callback}));return React.useCallback((function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return ref.current==null?void 0:ref.current(...args)}),[])}var index$1=typeof document!=="undefined"?useLayoutEffect:useEffect;let serverHandoffComplete=false;let count=0;const genId=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+count++;function useFloatingId(){const[id,setId]=React.useState((()=>serverHandoffComplete?genId():void 0));index$1((()=>{if(id==null){setId(genId())}}),[]);React.useEffect((()=>{serverHandoffComplete=true}),[]);return id}const useReactId=SafeReact.useId;const useId=useReactId||useFloatingId;function createPubSub(){const map2=new Map;return{emit(event2,data){var _map$get;(_map$get=map2.get(event2))==null||_map$get.forEach((handler=>handler(data)))},on(event2,listener){map2.set(event2,[...map2.get(event2)||[],listener])},off(event2,listener){var _map$get2;map2.set(event2,((_map$get2=map2.get(event2))==null?void 0:_map$get2.filter((l=>l!==listener)))||[])}}}const FloatingNodeContext=React.createContext(null);const FloatingTreeContext=React.createContext(null);const useFloatingParentNodeId=()=>{var _React$useContext;return((_React$useContext=React.useContext(FloatingNodeContext))==null?void 0:_React$useContext.id)||null};const useFloatingTree=()=>React.useContext(FloatingTreeContext);function createAttribute(name){return"data-floating-ui-"+name}function useLatestRef(value){const ref=useRef(value);index$1((()=>{ref.current=value}));return ref}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(value,prop,pointerType){if(pointerType&&!isMouseLikePointerType(pointerType)){return 0}if(typeof value==="number"){return value}return value==null?void 0:value[prop]}function useHover(context,props){if(props===void 0){props={}}const{open:open,onOpenChange:onOpenChange,dataRef:dataRef,events:events,elements:elements}=context;const{enabled:enabled=true,delay:delay=0,handleClose:handleClose=null,mouseOnly:mouseOnly=false,restMs:restMs=0,move:move=true}=props;const tree=useFloatingTree();const parentId=useFloatingParentNodeId();const handleCloseRef=useLatestRef(handleClose);const delayRef=useLatestRef(delay);const openRef=useLatestRef(open);const pointerTypeRef=React.useRef();const timeoutRef=React.useRef(-1);const handlerRef=React.useRef();const restTimeoutRef=React.useRef(-1);const blockMouseMoveRef=React.useRef(true);const performedPointerEventsMutationRef=React.useRef(false);const unbindMouseMoveRef=React.useRef((()=>{}));const restTimeoutPendingRef=React.useRef(false);const isHoverOpen=React.useCallback((()=>{var _dataRef$current$open;const type=(_dataRef$current$open=dataRef.current.openEvent)==null?void 0:_dataRef$current$open.type;return(type==null?void 0:type.includes("mouse"))&&type!=="mousedown"}),[dataRef]);React.useEffect((()=>{if(!enabled)return;function onOpenChange2(_ref3){let{open:open2}=_ref3;if(!open2){clearTimeout(timeoutRef.current);clearTimeout(restTimeoutRef.current);blockMouseMoveRef.current=true;restTimeoutPendingRef.current=false}}events.on("openchange",onOpenChange2);return()=>{events.off("openchange",onOpenChange2)}}),[enabled,events]);React.useEffect((()=>{if(!enabled)return;if(!handleCloseRef.current)return;if(!open)return;function onLeave(event2){if(isHoverOpen()){onOpenChange(false,event2,"hover")}}const html=getDocument(elements.floating).documentElement;html.addEventListener("mouseleave",onLeave);return()=>{html.removeEventListener("mouseleave",onLeave)}}),[elements.floating,open,onOpenChange,enabled,handleCloseRef,isHoverOpen]);const closeWithDelay=React.useCallback((function(event2,runElseBranch,reason){if(runElseBranch===void 0){runElseBranch=true}if(reason===void 0){reason="hover"}const closeDelay=getDelay(delayRef.current,"close",pointerTypeRef.current);if(closeDelay&&!handlerRef.current){clearTimeout(timeoutRef.current);timeoutRef.current=window.setTimeout((()=>onOpenChange(false,event2,reason)),closeDelay)}else if(runElseBranch){clearTimeout(timeoutRef.current);onOpenChange(false,event2,reason)}}),[delayRef,onOpenChange]);const cleanupMouseMoveHandler=useEffectEvent((()=>{unbindMouseMoveRef.current();handlerRef.current=void 0}));const clearPointerEvents=useEffectEvent((()=>{if(performedPointerEventsMutationRef.current){const body=getDocument(elements.floating).body;body.style.pointerEvents="";body.removeAttribute(safePolygonIdentifier);performedPointerEventsMutationRef.current=false}}));const isClickLikeOpenEvent=useEffectEvent((()=>dataRef.current.openEvent?["click","mousedown"].includes(dataRef.current.openEvent.type):false));React.useEffect((()=>{if(!enabled)return;function onMouseEnter(event2){clearTimeout(timeoutRef.current);blockMouseMoveRef.current=false;if(mouseOnly&&!isMouseLikePointerType(pointerTypeRef.current)||restMs>0&&!getDelay(delayRef.current,"open")){return}const openDelay=getDelay(delayRef.current,"open",pointerTypeRef.current);if(openDelay){timeoutRef.current=window.setTimeout((()=>{if(!openRef.current){onOpenChange(true,event2,"hover")}}),openDelay)}else if(!open){onOpenChange(true,event2,"hover")}}function onMouseLeave(event2){if(isClickLikeOpenEvent())return;unbindMouseMoveRef.current();const doc2=getDocument(elements.floating);clearTimeout(restTimeoutRef.current);restTimeoutPendingRef.current=false;if(handleCloseRef.current&&dataRef.current.floatingContext){if(!open){clearTimeout(timeoutRef.current)}handlerRef.current=handleCloseRef.current({...dataRef.current.floatingContext,tree:tree,x:event2.clientX,y:event2.clientY,onClose(){clearPointerEvents();cleanupMouseMoveHandler();if(!isClickLikeOpenEvent()){closeWithDelay(event2,true,"safe-polygon")}}});const handler=handlerRef.current;doc2.addEventListener("mousemove",handler);unbindMouseMoveRef.current=()=>{doc2.removeEventListener("mousemove",handler)};return}const shouldClose=pointerTypeRef.current==="touch"?!contains(elements.floating,event2.relatedTarget):true;if(shouldClose){closeWithDelay(event2)}}function onScrollMouseLeave(event2){if(isClickLikeOpenEvent())return;if(!dataRef.current.floatingContext)return;handleCloseRef.current==null||handleCloseRef.current({...dataRef.current.floatingContext,tree:tree,x:event2.clientX,y:event2.clientY,onClose(){clearPointerEvents();cleanupMouseMoveHandler();if(!isClickLikeOpenEvent()){closeWithDelay(event2)}}})(event2)}if(isElement$1(elements.domReference)){var _elements$floating;const ref=elements.domReference;open&&ref.addEventListener("mouseleave",onScrollMouseLeave);(_elements$floating=elements.floating)==null||_elements$floating.addEventListener("mouseleave",onScrollMouseLeave);move&&ref.addEventListener("mousemove",onMouseEnter,{once:true});ref.addEventListener("mouseenter",onMouseEnter);ref.addEventListener("mouseleave",onMouseLeave);return()=>{var _elements$floating2;open&&ref.removeEventListener("mouseleave",onScrollMouseLeave);(_elements$floating2=elements.floating)==null||_elements$floating2.removeEventListener("mouseleave",onScrollMouseLeave);move&&ref.removeEventListener("mousemove",onMouseEnter);ref.removeEventListener("mouseenter",onMouseEnter);ref.removeEventListener("mouseleave",onMouseLeave)}}}),[elements,enabled,context,mouseOnly,restMs,move,closeWithDelay,cleanupMouseMoveHandler,clearPointerEvents,onOpenChange,open,openRef,tree,delayRef,handleCloseRef,dataRef,isClickLikeOpenEvent]);index$1((()=>{var _handleCloseRef$curre;if(!enabled)return;if(open&&(_handleCloseRef$curre=handleCloseRef.current)!=null&&_handleCloseRef$curre.__options.blockPointerEvents&&isHoverOpen()){performedPointerEventsMutationRef.current=true;const floatingEl=elements.floating;if(isElement$1(elements.domReference)&&floatingEl){var _tree$nodesRef$curren;const body=getDocument(elements.floating).body;body.setAttribute(safePolygonIdentifier,"");const ref=elements.domReference;const parentFloating=tree==null||(_tree$nodesRef$curren=tree.nodesRef.current.find((node2=>node2.id===parentId)))==null||(_tree$nodesRef$curren=_tree$nodesRef$curren.context)==null?void 0:_tree$nodesRef$curren.elements.floating;if(parentFloating){parentFloating.style.pointerEvents=""}body.style.pointerEvents="none";ref.style.pointerEvents="auto";floatingEl.style.pointerEvents="auto";return()=>{body.style.pointerEvents="";ref.style.pointerEvents="";floatingEl.style.pointerEvents=""}}}}),[enabled,open,parentId,elements,tree,handleCloseRef,isHoverOpen]);index$1((()=>{if(!open){pointerTypeRef.current=void 0;restTimeoutPendingRef.current=false;cleanupMouseMoveHandler();clearPointerEvents()}}),[open,cleanupMouseMoveHandler,clearPointerEvents]);React.useEffect((()=>()=>{cleanupMouseMoveHandler();clearTimeout(timeoutRef.current);clearTimeout(restTimeoutRef.current);clearPointerEvents()}),[enabled,elements.domReference,cleanupMouseMoveHandler,clearPointerEvents]);const reference=React.useMemo((()=>{function setPointerRef(event2){pointerTypeRef.current=event2.pointerType}return{onPointerDown:setPointerRef,onPointerEnter:setPointerRef,onMouseMove(event2){const{nativeEvent:nativeEvent}=event2;function handleMouseMove(){if(!blockMouseMoveRef.current&&!openRef.current){onOpenChange(true,nativeEvent,"hover")}}if(mouseOnly&&!isMouseLikePointerType(pointerTypeRef.current)){return}if(open||restMs===0){return}if(restTimeoutPendingRef.current&&event2.movementX**2+event2.movementY**2<2){return}clearTimeout(restTimeoutRef.current);if(pointerTypeRef.current==="touch"){handleMouseMove()}else{restTimeoutPendingRef.current=true;restTimeoutRef.current=window.setTimeout(handleMouseMove,restMs)}}}}),[mouseOnly,onOpenChange,open,openRef,restMs]);const floating=React.useMemo((()=>({onMouseEnter(){clearTimeout(timeoutRef.current)},onMouseLeave(event2){if(!isClickLikeOpenEvent()){closeWithDelay(event2.nativeEvent,false)}}})),[closeWithDelay,isClickLikeOpenEvent]);return React.useMemo((()=>enabled?{reference:reference,floating:floating}:{}),[enabled,reference,floating])}function getChildren(nodes,id){let allChildren=nodes.filter((node2=>{var _node$context;return node2.parentId===id&&((_node$context=node2.context)==null?void 0:_node$context.open)}));let currentChildren=allChildren;while(currentChildren.length){currentChildren=nodes.filter((node2=>{var _currentChildren;return(_currentChildren=currentChildren)==null?void 0:_currentChildren.some((n=>{var _node$context2;return node2.parentId===n.id&&((_node$context2=node2.context)==null?void 0:_node$context2.open)}))}));allChildren=allChildren.concat(currentChildren)}return allChildren}const FOCUSABLE_ATTRIBUTE="data-floating-ui-focusable";function isButtonTarget(event2){return isHTMLElement$1(event2.target)&&event2.target.tagName==="BUTTON"}function isSpaceIgnored(element){return isTypeableElement(element)}function useClick(context,props){if(props===void 0){props={}}const{open:open,onOpenChange:onOpenChange,dataRef:dataRef,elements:{domReference:domReference}}=context;const{enabled:enabled=true,event:eventOption="click",toggle:toggle=true,ignoreMouse:ignoreMouse=false,keyboardHandlers:keyboardHandlers=true,stickIfOpen:stickIfOpen=true}=props;const pointerTypeRef=React.useRef();const didKeyDownRef=React.useRef(false);const reference=React.useMemo((()=>({onPointerDown(event2){pointerTypeRef.current=event2.pointerType},onMouseDown(event2){const pointerType=pointerTypeRef.current;if(event2.button!==0)return;if(eventOption==="click")return;if(isMouseLikePointerType(pointerType,true)&&ignoreMouse)return;if(open&&toggle&&(dataRef.current.openEvent&&stickIfOpen?dataRef.current.openEvent.type==="mousedown":true)){onOpenChange(false,event2.nativeEvent,"click")}else{event2.preventDefault();onOpenChange(true,event2.nativeEvent,"click")}},onClick(event2){const pointerType=pointerTypeRef.current;if(eventOption==="mousedown"&&pointerTypeRef.current){pointerTypeRef.current=void 0;return}if(isMouseLikePointerType(pointerType,true)&&ignoreMouse)return;if(open&&toggle&&(dataRef.current.openEvent&&stickIfOpen?dataRef.current.openEvent.type==="click":true)){onOpenChange(false,event2.nativeEvent,"click")}else{onOpenChange(true,event2.nativeEvent,"click")}},onKeyDown(event2){pointerTypeRef.current=void 0;if(event2.defaultPrevented||!keyboardHandlers||isButtonTarget(event2)){return}if(event2.key===" "&&!isSpaceIgnored(domReference)){event2.preventDefault();didKeyDownRef.current=true}if(event2.key==="Enter"){if(open&&toggle){onOpenChange(false,event2.nativeEvent,"click")}else{onOpenChange(true,event2.nativeEvent,"click")}}},onKeyUp(event2){if(event2.defaultPrevented||!keyboardHandlers||isButtonTarget(event2)||isSpaceIgnored(domReference)){return}if(event2.key===" "&&didKeyDownRef.current){didKeyDownRef.current=false;if(open&&toggle){onOpenChange(false,event2.nativeEvent,"click")}else{onOpenChange(true,event2.nativeEvent,"click")}}}})),[dataRef,domReference,eventOption,ignoreMouse,keyboardHandlers,onOpenChange,open,stickIfOpen,toggle]);return React.useMemo((()=>enabled?{reference:reference}:{}),[enabled,reference])}function useFloatingRootContext(options2){const{open:open=false,onOpenChange:onOpenChangeProp,elements:elementsProp}=options2;const floatingId=useId();const dataRef=React.useRef({});const[events]=React.useState((()=>createPubSub()));const nested=useFloatingParentNodeId()!=null;const[positionReference,setPositionReference]=React.useState(elementsProp.reference);const onOpenChange=useEffectEvent(((open2,event2,reason)=>{dataRef.current.openEvent=open2?event2:void 0;events.emit("openchange",{open:open2,event:event2,reason:reason,nested:nested});onOpenChangeProp==null||onOpenChangeProp(open2,event2,reason)}));const refs=React.useMemo((()=>({setPositionReference:setPositionReference})),[]);const elements=React.useMemo((()=>({reference:positionReference||elementsProp.reference||null,floating:elementsProp.floating||null,domReference:elementsProp.reference})),[positionReference,elementsProp.reference,elementsProp.floating]);return React.useMemo((()=>({dataRef:dataRef,open:open,onOpenChange:onOpenChange,elements:elements,events:events,floatingId:floatingId,refs:refs})),[open,onOpenChange,elements,events,floatingId,refs])}function useFloating(options2){if(options2===void 0){options2={}}const{nodeId:nodeId}=options2;const internalRootContext=useFloatingRootContext({...options2,elements:{reference:null,floating:null,...options2.elements}});const rootContext=options2.rootContext||internalRootContext;const computedElements=rootContext.elements;const[_domReference,setDomReference]=React.useState(null);const[positionReference,_setPositionReference]=React.useState(null);const optionDomReference=computedElements==null?void 0:computedElements.domReference;const domReference=optionDomReference||_domReference;const domReferenceRef=React.useRef(null);const tree=useFloatingTree();index$1((()=>{if(domReference){domReferenceRef.current=domReference}}),[domReference]);const position2=useFloating$1({...options2,elements:{...computedElements,...positionReference&&{reference:positionReference}}});const setPositionReference=React.useCallback((node2=>{const computedPositionReference=isElement$1(node2)?{getBoundingClientRect:()=>node2.getBoundingClientRect(),contextElement:node2}:node2;_setPositionReference(computedPositionReference);position2.refs.setReference(computedPositionReference)}),[position2.refs]);const setReference=React.useCallback((node2=>{if(isElement$1(node2)||node2===null){domReferenceRef.current=node2;setDomReference(node2)}if(isElement$1(position2.refs.reference.current)||position2.refs.reference.current===null||node2!==null&&!isElement$1(node2)){position2.refs.setReference(node2)}}),[position2.refs]);const refs=React.useMemo((()=>({...position2.refs,setReference:setReference,setPositionReference:setPositionReference,domReference:domReferenceRef})),[position2.refs,setReference,setPositionReference]);const elements=React.useMemo((()=>({...position2.elements,domReference:domReference})),[position2.elements,domReference]);const context=React.useMemo((()=>({...position2,...rootContext,refs:refs,elements:elements,nodeId:nodeId})),[position2,refs,elements,nodeId,rootContext]);index$1((()=>{rootContext.dataRef.current.floatingContext=context;const node2=tree==null?void 0:tree.nodesRef.current.find((node22=>node22.id===nodeId));if(node2){node2.context=context}}));return React.useMemo((()=>({...position2,context:context,refs:refs,elements:elements})),[position2,refs,elements,context])}const ACTIVE_KEY="active";const SELECTED_KEY="selected";function mergeProps(userProps,propsList,elementKey){const map2=new Map;const isItem=elementKey==="item";let domUserProps=userProps;if(isItem&&userProps){const{[ACTIVE_KEY]:_,[SELECTED_KEY]:__,...validProps}=userProps;domUserProps=validProps}return{...elementKey==="floating"&&{tabIndex:-1,[FOCUSABLE_ATTRIBUTE]:""},...domUserProps,...propsList.map((value=>{const propsOrGetProps=value?value[elementKey]:null;if(typeof propsOrGetProps==="function"){return userProps?propsOrGetProps(userProps):null}return propsOrGetProps})).concat(userProps).reduce(((acc,props)=>{if(!props){return acc}Object.entries(props).forEach((_ref3=>{let[key,value]=_ref3;if(isItem&&[ACTIVE_KEY,SELECTED_KEY].includes(key)){return}if(key.indexOf("on")===0){if(!map2.has(key)){map2.set(key,[])}if(typeof value==="function"){var _map$get;(_map$get=map2.get(key))==null||_map$get.push(value);acc[key]=function(){var _map$get2;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return(_map$get2=map2.get(key))==null?void 0:_map$get2.map((fn=>fn(...args))).find((val=>val!==void 0))}}}else{acc[key]=value}}));return acc}),{})}}function useInteractions(propsList){if(propsList===void 0){propsList=[]}const referenceDeps=propsList.map((key=>key==null?void 0:key.reference));const floatingDeps=propsList.map((key=>key==null?void 0:key.floating));const itemDeps=propsList.map((key=>key==null?void 0:key.item));const getReferenceProps=React.useCallback((userProps=>mergeProps(userProps,propsList,"reference")),referenceDeps);const getFloatingProps=React.useCallback((userProps=>mergeProps(userProps,propsList,"floating")),floatingDeps);const getItemProps=React.useCallback((userProps=>mergeProps(userProps,propsList,"item")),itemDeps);return React.useMemo((()=>({getReferenceProps:getReferenceProps,getFloatingProps:getFloatingProps,getItemProps:getItemProps})),[getReferenceProps,getFloatingProps,getItemProps])}function isPointInPolygon(point,polygon){const[x,y]=point;let isInside2=false;const length2=polygon.length;for(let i=0,j=length2-1;i<length2;j=i++){const[xi,yi]=polygon[i]||[0,0];const[xj,yj]=polygon[j]||[0,0];const intersect=yi>=y!==yj>=y&&x<=(xj-xi)*(y-yi)/(yj-yi)+xi;if(intersect){isInside2=!isInside2}}return isInside2}function isInside(point,rect){return point[0]>=rect.x&&point[0]<=rect.x+rect.width&&point[1]>=rect.y&&point[1]<=rect.y+rect.height}function safePolygon(options2){if(options2===void 0){options2={}}const{buffer:buffer=.5,blockPointerEvents:blockPointerEvents=false,requireIntent:requireIntent=true}=options2;let timeoutId2;let hasLanded=false;let lastX=null;let lastY=null;let lastCursorTime=performance.now();function getCursorSpeed(x,y){const currentTime=performance.now();const elapsedTime=currentTime-lastCursorTime;if(lastX===null||lastY===null||elapsedTime===0){lastX=x;lastY=y;lastCursorTime=currentTime;return null}const deltaX=x-lastX;const deltaY=y-lastY;const distance=Math.sqrt(deltaX*deltaX+deltaY*deltaY);const speed=distance/elapsedTime;lastX=x;lastY=y;lastCursorTime=currentTime;return speed}const fn=_ref3=>{let{x:x,y:y,placement:placement,elements:elements,onClose:onClose,nodeId:nodeId,tree:tree}=_ref3;return function onMouseMove(event2){function close2(){clearTimeout(timeoutId2);onClose()}clearTimeout(timeoutId2);if(!elements.domReference||!elements.floating||placement==null||x==null||y==null){return}const{clientX:clientX,clientY:clientY}=event2;const clientPoint=[clientX,clientY];const target=getTarget(event2);const isLeave=event2.type==="mouseleave";const isOverFloatingEl=contains(elements.floating,target);const isOverReferenceEl=contains(elements.domReference,target);const refRect=elements.domReference.getBoundingClientRect();const rect=elements.floating.getBoundingClientRect();const side=placement.split("-")[0];const cursorLeaveFromRight=x>rect.right-rect.width/2;const cursorLeaveFromBottom=y>rect.bottom-rect.height/2;const isOverReferenceRect=isInside(clientPoint,refRect);const isFloatingWider=rect.width>refRect.width;const isFloatingTaller=rect.height>refRect.height;const left=(isFloatingWider?refRect:rect).left;const right=(isFloatingWider?refRect:rect).right;const top=(isFloatingTaller?refRect:rect).top;const bottom=(isFloatingTaller?refRect:rect).bottom;if(isOverFloatingEl){hasLanded=true;if(!isLeave){return}}if(isOverReferenceEl){hasLanded=false}if(isOverReferenceEl&&!isLeave){hasLanded=true;return}if(isLeave&&isElement$1(event2.relatedTarget)&&contains(elements.floating,event2.relatedTarget)){return}if(tree&&getChildren(tree.nodesRef.current,nodeId).some((_ref22=>{let{context:context}=_ref22;return context==null?void 0:context.open}))){return}if(side==="top"&&y>=refRect.bottom-1||side==="bottom"&&y<=refRect.top+1||side==="left"&&x>=refRect.right-1||side==="right"&&x<=refRect.left+1){return close2()}let rectPoly=[];switch(side){case"top":rectPoly=[[left,refRect.top+1],[left,rect.bottom-1],[right,rect.bottom-1],[right,refRect.top+1]];break;case"bottom":rectPoly=[[left,rect.top+1],[left,refRect.bottom-1],[right,refRect.bottom-1],[right,rect.top+1]];break;case"left":rectPoly=[[rect.right-1,bottom],[rect.right-1,top],[refRect.left+1,top],[refRect.left+1,bottom]];break;case"right":rectPoly=[[refRect.right-1,bottom],[refRect.right-1,top],[rect.left+1,top],[rect.left+1,bottom]];break}function getPolygon(_ref32){let[x2,y2]=_ref32;switch(side){case"top":{const cursorPointOne=[isFloatingWider?x2+buffer/2:cursorLeaveFromRight?x2+buffer*4:x2-buffer*4,y2+buffer+1];const cursorPointTwo=[isFloatingWider?x2-buffer/2:cursorLeaveFromRight?x2+buffer*4:x2-buffer*4,y2+buffer+1];const commonPoints=[[rect.left,cursorLeaveFromRight?rect.bottom-buffer:isFloatingWider?rect.bottom-buffer:rect.top],[rect.right,cursorLeaveFromRight?isFloatingWider?rect.bottom-buffer:rect.top:rect.bottom-buffer]];return[cursorPointOne,cursorPointTwo,...commonPoints]}case"bottom":{const cursorPointOne=[isFloatingWider?x2+buffer/2:cursorLeaveFromRight?x2+buffer*4:x2-buffer*4,y2-buffer];const cursorPointTwo=[isFloatingWider?x2-buffer/2:cursorLeaveFromRight?x2+buffer*4:x2-buffer*4,y2-buffer];const commonPoints=[[rect.left,cursorLeaveFromRight?rect.top+buffer:isFloatingWider?rect.top+buffer:rect.bottom],[rect.right,cursorLeaveFromRight?isFloatingWider?rect.top+buffer:rect.bottom:rect.top+buffer]];return[cursorPointOne,cursorPointTwo,...commonPoints]}case"left":{const cursorPointOne=[x2+buffer+1,isFloatingTaller?y2+buffer/2:cursorLeaveFromBottom?y2+buffer*4:y2-buffer*4];const cursorPointTwo=[x2+buffer+1,isFloatingTaller?y2-buffer/2:cursorLeaveFromBottom?y2+buffer*4:y2-buffer*4];const commonPoints=[[cursorLeaveFromBottom?rect.right-buffer:isFloatingTaller?rect.right-buffer:rect.left,rect.top],[cursorLeaveFromBottom?isFloatingTaller?rect.right-buffer:rect.left:rect.right-buffer,rect.bottom]];return[...commonPoints,cursorPointOne,cursorPointTwo]}case"right":{const cursorPointOne=[x2-buffer,isFloatingTaller?y2+buffer/2:cursorLeaveFromBottom?y2+buffer*4:y2-buffer*4];const cursorPointTwo=[x2-buffer,isFloatingTaller?y2-buffer/2:cursorLeaveFromBottom?y2+buffer*4:y2-buffer*4];const commonPoints=[[cursorLeaveFromBottom?rect.left+buffer:isFloatingTaller?rect.left+buffer:rect.right,rect.top],[cursorLeaveFromBottom?isFloatingTaller?rect.left+buffer:rect.right:rect.left+buffer,rect.bottom]];return[cursorPointOne,cursorPointTwo,...commonPoints]}}}if(isPointInPolygon([clientX,clientY],rectPoly)){return}if(hasLanded&&!isOverReferenceRect){return close2()}if(!isLeave&&requireIntent){const cursorSpeed=getCursorSpeed(event2.clientX,event2.clientY);const cursorSpeedThreshold=.1;if(cursorSpeed!==null&&cursorSpeed<cursorSpeedThreshold){return close2()}}if(!isPointInPolygon([clientX,clientY],getPolygon([x,y]))){close2()}else if(!hasLanded&&requireIntent){timeoutId2=window.setTimeout(close2,40)}}};fn.__options={blockPointerEvents:blockPointerEvents};return fn}const Tooltip=forwardRef(((props,ref)=>{const{aria:aria={},className:className,children:children,useClickToOpen:useClickToOpen=false,data:data={},delay:delay=0,height:height,htmlOptions:htmlOptions={},icon:icon=null,interaction:interaction=false,maxHeight:maxHeight,maxWidth:maxWidth,minHeight:minHeight,minWidth:minWidth,placement:preferredPlacement="top",position:position2="absolute",text:text,showTooltip:showTooltip=true,width:width,zIndex:zIndex,forceOpenTooltip:forceOpenTooltip=false,...rest}=props;const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const css4=classnames(globalProps({...rest}),className);const[open,setOpen]=useState(false);const arrowRef=useRef(null);const{context:context,middlewareData:{arrow:{x:arrowX,y:arrowY}={}},placement:placement,refs:refs,strategy:strategy,x:x,y:y}=useFloating({strategy:position2,middleware:[arrow$2({element:arrowRef}),flip({fallbackPlacements:["top","right","bottom","left"],fallbackStrategy:"initialPlacement",flipAlignment:false}),offset(10),shift$1()],open:open,onOpenChange(open2){if(!showTooltip){return}else{setOpen(open2)}},placement:preferredPlacement});const hover=useHover(context,{delay:delay,handleClose:interaction?safePolygon({blockPointerEvents:false}):null,enabled:!useClickToOpen});const click=useClick(context,{enabled:useClickToOpen});const{getFloatingProps:getFloatingProps,getReferenceProps:getReferenceProps}=useInteractions([hover,click]);const staticSide={bottom:"top",left:"right",right:"left",top:"bottom"}[placement.split("-")[0]];const tooltipSizing=()=>Object.assign({},height?{height:height}:{},maxHeight?{maxHeight:maxHeight}:{},maxWidth?{maxWidth:maxWidth}:{},minHeight?{minHeight:minHeight}:{},minWidth?{minWidth:minWidth}:{},width?{width:width}:{});return jsxs(Fragment$1,{children:[jsx$1("div",{...getReferenceProps({className:`pb_tooltip_kit ${css4}`,ref:element=>{refs.setReference(element);if(ref){if(typeof ref==="function"){ref(element)}else if(typeof ref==="object"){ref.current=element}}},role:"tooltip_trigger",style:{display:"inline-block"},...ariaProps,...dataProps,...htmlProps}),children:children}),(open||forceOpenTooltip)&&jsxs("div",{...getFloatingProps({className:`tooltip_tooltip ${placement} visible`,ref:refs.setFloating,role:"tooltip",style:{...tooltipSizing(),position:strategy,top:y??0,left:x??0,zIndex:zIndex??0}}),children:[jsxs(Flex,{align:"center",gap:"xs",children:[icon&&jsx$1("i",{className:`pb_icon_kit`,children:jsx$1(Icon,{icon:icon})}),text]}),jsx$1("div",{className:"arrow_bg",ref:arrowRef,style:{position:"absolute",left:arrowX!=null?`${arrowX}px`:"",top:arrowY!=null?`${arrowY}px`:"",[staticSide]:"-5px"}})]})]})}));Tooltip.displayName="Tooltip";const getPlacementProps=(placement,size)=>{let placementMapping={};switch(size){case"xxs":case"xs":placementMapping={"top-right":{top:"xs",right:"xs"},"bottom-left":{bottom:"xs",left:"xs"},"top-left":{top:"xs",left:"xs"},"bottom-right":{bottom:"xs",right:"xs"},"bottom-center":{bottom:"xs",className:"overlay_bottom_center"},"top-center":{top:"xs",className:"overlay_top_center"},"left-center":{left:"sm",className:"overlay_left_center"},"right-center":{right:"sm",className:"overlay_right_center"}};break;case"sm":placementMapping={"top-right":{top:"0",right:"xs"},"bottom-left":{bottom:"0",left:"xs"},"top-left":{top:"0",left:"xs"},"bottom-right":{bottom:"0",right:"xs"},"bottom-center":{bottom:"xs",className:"overlay_bottom_center"},"top-center":{top:"xs",className:"overlay_top_center"},"left-center":{left:"sm",className:"overlay_left_center"},"right-center":{right:"sm",className:"overlay_right_center"}};break;case"md":case"lg":placementMapping={"top-right":{top:"0",right:"0"},"bottom-left":{bottom:"0",left:"0"},"top-left":{top:"0",left:"0"},"bottom-right":{bottom:"0",right:"0"},"bottom-center":{bottom:"xs",className:"overlay_bottom_center"},"top-center":{top:"xs",className:"overlay_top_center"},"left-center":{left:"sm",className:"overlay_left_center"},"right-center":{right:"sm",className:"overlay_right_center"}};break;case"xl":placementMapping={"top-right":{top:{value:"xxs",inset:true},right:{value:"xxs",inset:true}},"bottom-left":{bottom:{value:"xxs",inset:true},left:{value:"xxs",inset:true}},"top-left":{top:{value:"xxs",inset:true},left:{value:"xxs",inset:true}},"bottom-right":{bottom:{value:"xxs",inset:true},right:{value:"xxs",inset:true}},"bottom-center":{bottom:"xs",className:"overlay_bottom_center"},"top-center":{top:"xs",className:"overlay_top_center"},"left-center":{left:"sm",className:"overlay_left_center"},"right-center":{right:"sm",className:"overlay_right_center"}};break}return placementMapping[placement]||{}};const Image=props=>{const{alt:alt="",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,onError:onError=null,rounded:rounded=false,size:size="",transition:transition="fade",url:url=""}=props;const ariaProps=buildAriaProps(aria);const classes=classnames(buildCss("pb_image_kit",size?`size_${size}`:null),"lazyload",transition,{rounded:rounded},globalProps(props),className);const dynamicInlineProps=globalInlineProps(props);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx$1("img",{...ariaProps,...dataProps,...htmlProps,alt:alt,className:classes,"data-src":url,id:id,onError:onError,src:url,style:dynamicInlineProps})};const OnlineStatus=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,status:status="offline",size:size="sm",noBorder:noBorder=false}=props;aria.label=status;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const getBorder=noBorder?"no_border":"";const classes=classnames(buildCss("pb_online_status_kit",getBorder),`${size&&"pb_online_status_size_"+size}`,`pb_online_status_${status&&status}`,globalProps(props),className);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id})};const Badge=props=>{const{aria:aria={},className:className,closeProps:closeProps={},data:data={},htmlOptions:htmlOptions={},id:id,removeIcon:removeIcon=false,removeOnClick:removeOnClick,rounded:rounded=false,text:text,variant:variant="neutral"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css4=classnames(buildCss("pb_badge_kit",variant==="success"?"success_sm":variant==="notificationError"?"notification_error":variant,rounded?"rounded":""),globalProps(props),className);const timesIcon=getAllIcons()["times"];return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:css4,id:id,children:jsxs("span",{children:[text,removeIcon&&jsx$1("span",{onClick:removeOnClick,style:{cursor:"pointer"},...closeProps,children:jsx$1(Icon,{className:"svg-inline--fa",customIcon:timesIcon.icon,fixedWidth:true})})]})})};const IconCircle=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},icon:icon,id:id,size:size="md",variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_icon_circle_kit",`size_${size}`,variant),globalProps(props),className);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx$1(Icon,{dark:dark,icon:icon})})};const firstTwoInitials=name=>name.split(/\s/).map((name2=>name2[0])).join("").substring(0,2);const Avatar=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},name:name=void 0,componentOverlay:componentOverlay,grayscale:grayscale=false,id:id="",imageAlt:imageAlt="",imageUrl:imageUrl,size:size="md",status:status=null,dark:dark=false}=props;const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_avatar_kit",`size_${size}`),globalProps(props),className);const initials=name&&firstTwoInitials(name);dataProps["data-initials"]=initials;const[error,setError]=useState(false);const handleError=()=>setError(true);const canShowImage=imageUrl&&!error;const onlineStatusSize=["xxs","xs"].includes(size)?"sm":["sm","md"].includes(size)?"md":["lg","xl"].includes(size)?"lg":"sm";const onlineStatusPositionProps=["xxs","xs","sm"].includes(size)?{top:{inset:true,value:"0"},right:{inset:false,value:"xxs"}}:{bottom:{inset:true,value:"0"},right:{inset:true,value:size==="xl"?"sm":size==="lg"?"xs":"xxs"}};return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:componentOverlay?jsxs(Flex,{display:"display_inline_block",position:"relative",children:[jsx$1("div",{className:"avatar_wrapper","data-initials":initials,children:canShowImage&&jsx$1(Image,{alt:imageAlt?imageAlt:name,onError:handleError,url:imageUrl})}),componentOverlay.component==="badge"&&jsx$1(Card,{borderNone:true,borderRadius:"rounded",dark:dark,padding:"none",position:"absolute",...getPlacementProps(componentOverlay.placement,size),children:jsx$1(Badge,{dark:dark,rounded:true,text:componentOverlay.text,variant:componentOverlay.variant})}),componentOverlay.component==="iconCircle"&&jsx$1(Card,{borderNone:true,borderRadius:"rounded",dark:dark,htmlOptions:{style:{padding:"2px"}},position:"absolute",...getPlacementProps(componentOverlay.placement,size),children:jsx$1(IconCircle,{dark:dark,icon:componentOverlay.icon,size:"xxs",variant:componentOverlay.variant})})]}):jsxs(Fragment$1,{children:[jsx$1("div",{className:"avatar_wrapper","data-initials":initials,children:canShowImage&&jsx$1(Image,{alt:imageAlt?imageAlt:name,className:grayscale?"grayscale":"",onError:handleError,url:imageUrl})}),status&&jsx$1(OnlineStatus,{dark:dark,position:"absolute",size:onlineStatusSize,status:status,...onlineStatusPositionProps})]})})};const breakpoints={xs:"(max-width: 575px)",sm:"(min-width: 576px) and (max-width: 767px)",md:"(min-width: 768px) and (max-width: 991px)",lg:"(min-width: 992px) and (max-width: 1199px)",xl:"(min-width: 1200px)"};const getResponsiveValue=prop=>{if(typeof prop==="string"){return prop}for(const[bp,value]of Object.entries(prop||{})){if(bp!=="default"&&window.matchMedia(breakpoints[bp]).matches){return value}}return(prop==null?void 0:prop.default)||void 0};const Background=props=>{const{alt:alt=void 0,aria:aria={},backgroundColor:backgroundColor="light",backgroundPosition:backgroundPosition="",backgroundRepeat:backgroundRepeat="initial",backgroundSize:backgroundSize="cover",children:children,className:className,customColor:customColor,data:data={},htmlOptions:htmlOptions={},id:id,imageOverlay:imageOverlay,imageUrl:imageUrl="",tag:tag="div",transition:transition=""}=props;const[responsiveProps,setResponsiveProps]=useState({backgroundSize:getResponsiveValue(backgroundSize),backgroundPosition:getResponsiveValue(backgroundPosition),backgroundRepeat:getResponsiveValue(backgroundRepeat),backgroundColor:getResponsiveValue(backgroundColor),imageUrl:getResponsiveValue(imageUrl)});useEffect((()=>{const updateResponsiveProps=()=>{setResponsiveProps({backgroundSize:getResponsiveValue(props.backgroundSize),backgroundPosition:getResponsiveValue(props.backgroundPosition),backgroundRepeat:getResponsiveValue(props.backgroundRepeat),backgroundColor:getResponsiveValue(props.backgroundColor),imageUrl:getResponsiveValue(props.imageUrl)})};window.addEventListener("resize",updateResponsiveProps);return()=>window.removeEventListener("resize",updateResponsiveProps)}),[props]);const{backgroundColor:resBackgroundColor,backgroundPosition:resBackgroundPosition,backgroundRepeat:resBackgroundRepeat,backgroundSize:resBackgroundSize,imageUrl:resImageUrl}=responsiveProps;const classes=classnames(buildCss("pb_background_kit"),"lazyload",globalProps(props),transition,{[`pb_background_color_${resBackgroundColor}`]:resBackgroundColor&&!customColor,[`pb_background_custom_color`]:!!customColor},imageOverlay?`imageoverlay_${imageOverlay}`:"",className);const backgroundStyle={backgroundColor:customColor||void 0,...resImageUrl!==""?{backgroundImage:resImageUrl?`url(${resImageUrl})`:void 0,backgroundRepeat:resBackgroundRepeat||void 0,backgroundPosition:resBackgroundPosition||void 0,backgroundSize:resBackgroundSize||void 0}:{}};const dynamicInlineProps=globalInlineProps(props);const combinedStyles={...backgroundStyle,...dynamicInlineProps};const Tag=`${tag}`;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx$1(Tag,{...ariaProps,...dataProps,...htmlProps,alt:alt,className:classes,id:id,style:combinedStyles,children:children})};var highchartsReact_min$1={exports:{}};var highchartsReact_min=highchartsReact_min$1.exports;var hasRequiredHighchartsReact_min;function requireHighchartsReact_min(){if(hasRequiredHighchartsReact_min)return highchartsReact_min$1.exports;hasRequiredHighchartsReact_min=1;(function(module,exports){!function(t,e){module.exports=e(React__default)}("undefined"!=typeof self?self:highchartsReact_min,(function(t){return function(t2){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:false,exports:{}};return t2[n].call(o.exports,o,o.exports,e),o.l=true,o.exports}var r={};return e.m=t2,e.c=r,e.d=function(t3,r2,n){e.o(t3,r2)||Object.defineProperty(t3,r2,{configurable:false,enumerable:true,get:n})},e.n=function(t3){var r2=t3&&t3.__esModule?function(){return t3.default}:function(){return t3};return e.d(r2,"a",r2),r2},e.o=function(t3,e2){return Object.prototype.hasOwnProperty.call(t3,e2)},e.p="",e(e.s=0)}([function(t2,e,r){function n(){return n=Object.assign?Object.assign.bind():function(t3){for(var e2=1;e2<arguments.length;e2++){var r2=arguments[e2];for(var n2 in r2)Object.prototype.hasOwnProperty.call(r2,n2)&&(t3[n2]=r2[n2])}return t3},n.apply(this,arguments)}function o(t3){return a(t3)||i(t3)||u(t3)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t3,e2){if(t3){if("string"==typeof t3)return f(t3,e2);var r2=Object.prototype.toString.call(t3).slice(8,-1);return"Object"===r2&&t3.constructor&&(r2=t3.constructor.name),"Map"===r2||"Set"===r2?Array.from(t3):"Arguments"===r2||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r2)?f(t3,e2):void 0}}function i(t3){if("undefined"!=typeof Symbol&&null!=t3[Symbol.iterator]||null!=t3["@@iterator"])return Array.from(t3)}function a(t3){if(Array.isArray(t3))return f(t3)}function f(t3,e2){(null==e2||e2>t3.length)&&(e2=t3.length);for(var r2=0,n2=new Array(e2);r2<e2;r2++)n2[r2]=t3[r2];return n2}function s(t3){"@babel/helpers - typeof";return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t4){return typeof t4}:function(t4){return t4&&"function"==typeof Symbol&&t4.constructor===Symbol&&t4!==Symbol.prototype?"symbol":typeof t4})(t3)}Object.defineProperty(e,"__esModule",{value:true}),r.d(e,"HighchartsReact",(function(){return d}));var p=r(1),l=r.n(p),y="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,d=Object(p.memo)(Object(p.forwardRef)((function(t3,e2){var r2=Object(p.useRef)(),c2=Object(p.useRef)(),u2=Object(p.useRef)(t3.constructorType),i2=Object(p.useRef)(t3.highcharts);return y((function(){function e3(){var e4=t3.highcharts||"object"===("undefined"==typeof window?"undefined":s(window))&&window.Highcharts,n3=t3.constructorType||"chart";e4?e4[n3]?t3.options?c2.current=e4[n3](r2.current,t3.options,t3.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(c2.current){if(false!==t3.allowChartUpdate)if(t3.constructorType!==u2.current||t3.highcharts!==i2.current)u2.current=t3.constructorType,i2.current=t3.highcharts,e3();else if(!t3.immutable&&c2.current){var n2;(n2=c2.current).update.apply(n2,[t3.options].concat(o(t3.updateArgs||[true,true])))}else e3()}else e3()}),[t3.options,t3.allowChartUpdate,t3.updateArgs,t3.containerProps,t3.highcharts,t3.constructorType]),y((function(){return function(){c2.current&&(c2.current.destroy(),c2.current=null)}}),[]),Object(p.useImperativeHandle)(e2,(function(){return{get chart(){return c2.current},container:r2}}),[]),l.a.createElement("div",n({},t3.containerProps,{ref:r2}))})));e.default=d},function(e,r){e.exports=t}])}))})(highchartsReact_min$1);return highchartsReact_min$1.exports}var highchartsReact_minExports=requireHighchartsReact_min();const HighchartsReact=getDefaultExportFromCjs$1(highchartsReact_minExports);var highcharts$1={exports:{}};var highcharts=highcharts$1.exports;var hasRequiredHighcharts;function requireHighcharts(){if(hasRequiredHighcharts)return highcharts$1.exports;hasRequiredHighcharts=1;(function(module){!function(t,e){module.exports?(e.default=e,module.exports=t&&t.document?e(t):e):(t.Highcharts&&t.Highcharts.error(16,true),t.Highcharts=e(t))}("undefined"!=typeof window?window:highcharts,(function(t){var e={};function i(e2,i2,s,r){!e2.hasOwnProperty(i2)&&(e2[i2]=r.apply(null,s),t&&"function"==typeof CustomEvent&&t.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i2,module:e2[i2]}})))}return i(e,"Core/Globals.js",[],(function(){var e2,i2;return(i2=e2||(e2={})).SVG_NS="http://www.w3.org/2000/svg",i2.product="Highcharts",i2.version="11.4.8",i2.win=void 0!==t?t:{},i2.doc=i2.win.document,i2.svg=i2.doc&&i2.doc.createElementNS&&!!i2.doc.createElementNS(i2.SVG_NS,"svg").createSVGRect,i2.userAgent=i2.win.navigator&&i2.win.navigator.userAgent||"",i2.isChrome=i2.win.chrome,i2.isFirefox=-1!==i2.userAgent.indexOf("Firefox"),i2.isMS=/(edge|msie|trident)/i.test(i2.userAgent)&&!i2.win.opera,i2.isSafari=!i2.isChrome&&-1!==i2.userAgent.indexOf("Safari"),i2.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(i2.userAgent),i2.isWebKit=-1!==i2.userAgent.indexOf("AppleWebKit"),i2.deg2rad=2*Math.PI/360,i2.hasBidiBug=i2.isFirefox&&4>parseInt(i2.userAgent.split("Firefox/")[1],10),i2.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i2.noop=function(){},i2.supportsPassiveEvents=function(){let t2=false;if(!i2.isMS){let e3=Object.defineProperty({},"passive",{get:function(){t2=true}});i2.win.addEventListener&&i2.win.removeEventListener&&(i2.win.addEventListener("testPassive",i2.noop,e3),i2.win.removeEventListener("testPassive",i2.noop,e3))}return t2}(),i2.charts=[],i2.composed=[],i2.dateFormats={},i2.seriesTypes={},i2.symbolSizes={},i2.chartCount=0,e2})),i(e,"Core/Utilities.js",[e["Core/Globals.js"]],(function(t2){let e2;let{charts:i2,doc:s,win:r}=t2;function o(e3,i3,s2,n2){let a2=i3?"Highcharts error":"Highcharts warning";32===e3&&(e3=`${a2}: Deprecated member`);let h2=p(e3),l2=h2?`${a2} #${e3}: www.highcharts.com/errors/${e3}/`:e3.toString();if(void 0!==n2){let t3="";h2&&(l2+="?"),C(n2,(function(e4,i4){t3+=`\n - ${i4}: ${e4}`,h2&&(l2+=encodeURI(i4)+"="+encodeURI(e4))})),l2+=t3}M(t2,"displayError",{chart:s2,code:e3,message:l2,params:n2},(function(){if(i3)throw Error(l2);r.console&&-1===o.messages.indexOf(l2)&&console.warn(l2)})),o.messages.push(l2)}function n(t3,e3){return parseInt(t3,e3||10)}function a(t3){return"string"==typeof t3}function h(t3){let e3=Object.prototype.toString.call(t3);return"[object Array]"===e3||"[object Array Iterator]"===e3}function l(t3,e3){return!!t3&&"object"==typeof t3&&(!e3||!h(t3))}function d(t3){return l(t3)&&"number"==typeof t3.nodeType}function c(t3){let e3=t3&&t3.constructor;return!!(l(t3,true)&&!d(t3)&&e3&&e3.name&&"Object"!==e3.name)}function p(t3){return"number"==typeof t3&&!isNaN(t3)&&t3<1/0&&t3>-1/0}function u(t3){return null!=t3}function g(t3,e3,i3){let s2;let r2=a(e3)&&!u(i3),o2=(e4,i4)=>{u(e4)?t3.setAttribute(i4,e4):r2?(s2=t3.getAttribute(i4))||"class"!==i4||(s2=t3.getAttribute(i4+"Name")):t3.removeAttribute(i4)};return a(e3)?o2(i3,e3):C(e3,o2),s2}function f(t3){return h(t3)?t3:[t3]}function m(t3,e3){let i3;for(i3 in t3||(t3={}),e3)t3[i3]=e3[i3];return t3}function x(){let t3=arguments,e3=t3.length;for(let i3=0;i3<e3;i3++){let e4=t3[i3];if(null!=e4)return e4}}function y(t3,e3){m(t3.style,e3)}function b(t3){return Math.pow(10,Math.floor(Math.log(t3)/Math.LN10))}function v(t3,e3){return t3>1e14?t3:parseFloat(t3.toPrecision(e3||14))}(o||(o={})).messages=[],Math.easeInOutSine=function(t3){return-.5*(Math.cos(Math.PI*t3)-1)};let S=Array.prototype.find?function(t3,e3){return t3.find(e3)}:function(t3,e3){let i3;let s2=t3.length;for(i3=0;i3<s2;i3++)if(e3(t3[i3],i3))return t3[i3]};function C(t3,e3,i3){for(let s2 in t3)Object.hasOwnProperty.call(t3,s2)&&e3.call(i3||t3[s2],t3[s2],s2,t3)}function k(t3,e3,i3){function s2(e4,i4){let s3=t3.removeEventListener;s3&&s3.call(t3,e4,i4,false)}function r2(i4){let r3,o3;t3.nodeName&&(e3?(r3={})[e3]=true:r3=i4,C(r3,(function(t4,e4){if(i4[e4])for(o3=i4[e4].length;o3--;)s2(e4,i4[e4][o3].fn)})))}let o2="function"==typeof t3&&t3.prototype||t3;if(Object.hasOwnProperty.call(o2,"hcEvents")){let t4=o2.hcEvents;if(e3){let o3=t4[e3]||[];i3?(t4[e3]=o3.filter((function(t5){return i3!==t5.fn})),s2(e3,i3)):(r2(t4),t4[e3]=[])}else r2(t4),delete o2.hcEvents}}function M(e3,i3,r2,o2){if(r2=r2||{},s.createEvent&&(e3.dispatchEvent||e3.fireEvent&&e3!==t2)){let t3=s.createEvent("Events");t3.initEvent(i3,true,true),r2=m(t3,r2),e3.dispatchEvent?e3.dispatchEvent(r2):e3.fireEvent(i3,r2)}else if(e3.hcEvents){r2.target||m(r2,{preventDefault:function(){r2.defaultPrevented=true},target:e3,type:i3});let t3=[],s2=e3,o3=false;for(;s2.hcEvents;)Object.hasOwnProperty.call(s2,"hcEvents")&&s2.hcEvents[i3]&&(t3.length&&(o3=true),t3.unshift.apply(t3,s2.hcEvents[i3])),s2=Object.getPrototypeOf(s2);o3&&t3.sort(((t4,e4)=>t4.order-e4.order)),t3.forEach((t4=>{false===t4.fn.call(e3,r2)&&r2.preventDefault()}))}o2&&!r2.defaultPrevented&&o2.call(e3,r2)}C({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},(function(e3,i3){t2[i3]=function(t3){return o(32,false,void 0,{[`Highcharts.${i3}`]:`use Array.${e3}`}),Array.prototype[e3].apply(t3,[].slice.call(arguments,1))}}));let w2=function(){let t3=Math.random().toString(36).substring(2,9)+"-",i3=0;return function(){return"highcharts-"+(e2?"":t3)+i3++}}();return r.jQuery&&(r.jQuery.fn.highcharts=function(){let e3=[].slice.call(arguments);if(this[0])return e3[0]?(new(t2[a(e3[0])?e3.shift():"Chart"])(this[0],e3[0],e3[1]),this):i2[g(this[0],"data-highcharts-chart")]}),{addEvent:function(e3,i3,s2,r2={}){let o2="function"==typeof e3&&e3.prototype||e3;Object.hasOwnProperty.call(o2,"hcEvents")||(o2.hcEvents={});let n2=o2.hcEvents;t2.Point&&e3 instanceof t2.Point&&e3.series&&e3.series.chart&&(e3.series.chart.runTrackerClick=true);let a2=e3.addEventListener;a2&&a2.call(e3,i3,s2,!!t2.supportsPassiveEvents&&{passive:void 0===r2.passive?-1!==i3.indexOf("touch"):r2.passive,capture:false}),n2[i3]||(n2[i3]=[]);let h2={fn:s2,order:"number"==typeof r2.order?r2.order:1/0};return n2[i3].push(h2),n2[i3].sort(((t3,e4)=>t3.order-e4.order)),function(){k(e3,i3,s2)}},arrayMax:function(t3){let e3=t3.length,i3=t3[0];for(;e3--;)t3[e3]>i3&&(i3=t3[e3]);return i3},arrayMin:function(t3){let e3=t3.length,i3=t3[0];for(;e3--;)t3[e3]<i3&&(i3=t3[e3]);return i3},attr:g,clamp:function(t3,e3,i3){return t3>e3?t3<i3?t3:i3:e3},clearTimeout:function(t3){u(t3)&&clearTimeout(t3)},correctFloat:v,createElement:function(t3,e3,i3,r2,o2){let n2=s.createElement(t3);return e3&&m(n2,e3),o2&&y(n2,{padding:"0",border:"none",margin:"0"}),i3&&y(n2,i3),r2&&r2.appendChild(n2),n2},crisp:(t3,e3=0,i3)=>{let s2=e3%2/2,r2=i3?-1:1;return(Math.round(t3*r2-s2)+s2)*r2},css:y,defined:u,destroyObjectProperties:function(t3,e3,i3){C(t3,(function(s2,r2){s2!==e3&&(s2==null?void 0:s2.destroy)&&s2.destroy(),((s2==null?void 0:s2.destroy)||!i3)&&delete t3[r2]}))},diffObjects:function(t3,e3,i3,s2){let r2={};return function t4(e4,r3,o2,n2){let a2=i3?r3:e4;C(e4,(function(i4,d2){if(!n2&&s2&&s2.indexOf(d2)>-1&&r3[d2]){i4=f(i4),o2[d2]=[];for(let e5=0;e5<Math.max(i4.length,r3[d2].length);e5++)r3[d2][e5]&&(void 0===i4[e5]?o2[d2][e5]=r3[d2][e5]:(o2[d2][e5]={},t4(i4[e5],r3[d2][e5],o2[d2][e5],n2+1)))}else l(i4,true)&&!i4.nodeType?(o2[d2]=h(i4)?[]:{},t4(i4,r3[d2]||{},o2[d2],n2+1),0!==Object.keys(o2[d2]).length||"colorAxis"===d2&&0===n2||delete o2[d2]):(e4[d2]!==r3[d2]||d2 in e4&&!(d2 in r3))&&"__proto__"!==d2&&"constructor"!==d2&&(o2[d2]=a2[d2])}))}(t3,e3,r2,0),r2},discardElement:function(t3){t3&&t3.parentElement&&t3.parentElement.removeChild(t3)},erase:function(t3,e3){let i3=t3.length;for(;i3--;)if(t3[i3]===e3){t3.splice(i3,1);break}},error:o,extend:m,extendClass:function(t3,e3){let i3=function(){};return i3.prototype=new t3,m(i3.prototype,e3),i3},find:S,fireEvent:M,getClosestDistance:function(t3,e3){let i3,r2,o2;let n2=!e3;return t3.forEach((t4=>{if(t4.length>1)for(o2=t4.length-1;o2>0;o2--)(r2=t4[o2]-t4[o2-1])<0&&!n2?(e3==null?void 0:e3(),e3=void 0):r2&&(void 0===i3||r2<i3)&&(i3=r2)})),i3},getMagnitude:b,getNestedProperty:function(t3,e3){let i3=t3.split(".");for(;i3.length&&u(e3);){let t4=i3.shift();if(void 0===t4||"__proto__"===t4)return;if("this"===t4){let t5;return l(e3)&&(t5=e3["@this"]),t5??e3}let s2=e3[t4];if(!u(s2)||"function"==typeof s2||"number"==typeof s2.nodeType||s2===r)return;e3=s2}return e3},getStyle:function t3(e3,i3,s2){let o2;if("width"===i3){let i4=Math.min(e3.offsetWidth,e3.scrollWidth),s3=e3.getBoundingClientRect&&e3.getBoundingClientRect().width;return s3<i4&&s3>=i4-1&&(i4=Math.floor(s3)),Math.max(0,i4-(t3(e3,"padding-left",true)||0)-(t3(e3,"padding-right",true)||0))}if("height"===i3)return Math.max(0,Math.min(e3.offsetHeight,e3.scrollHeight)-(t3(e3,"padding-top",true)||0)-(t3(e3,"padding-bottom",true)||0));let a2=r.getComputedStyle(e3,void 0);return a2&&(o2=a2.getPropertyValue(i3),x(s2,"opacity"!==i3)&&(o2=n(o2))),o2},inArray:function(t3,e3,i3){return o(32,false,void 0,{"Highcharts.inArray":"use Array.indexOf"}),e3.indexOf(t3,i3)},insertItem:function(t3,e3){let i3;let s2=t3.options.index,r2=e3.length;for(i3=t3.options.isInternal?r2:0;i3<r2+1;i3++)if(!e3[i3]||p(s2)&&s2<x(e3[i3].options.index,e3[i3]._i)||e3[i3].options.isInternal){e3.splice(i3,0,t3);break}return i3},isArray:h,isClass:c,isDOMElement:d,isFunction:function(t3){return"function"==typeof t3},isNumber:p,isObject:l,isString:a,keys:function(t3){return o(32,false,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(t3)},merge:function(){let t3,e3=arguments,i3={},s2=function(t4,e4){return"object"!=typeof t4&&(t4={}),C(e4,(function(i4,r3){"__proto__"!==r3&&"constructor"!==r3&&(!l(i4,true)||c(i4)||d(i4)?t4[r3]=e4[r3]:t4[r3]=s2(t4[r3]||{},i4))})),t4};true===e3[0]&&(i3=e3[1],e3=Array.prototype.slice.call(e3,2));let r2=e3.length;for(t3=0;t3<r2;t3++)i3=s2(i3,e3[t3]);return i3},normalizeTickInterval:function(t3,e3,i3,s2,r2){let o2,n2=t3;i3=x(i3,b(t3));let a2=t3/i3;for(!e3&&(e3=r2?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],false===s2&&(1===i3?e3=e3.filter((function(t4){return t4%1==0})):i3<=.1&&(e3=[1/i3]))),o2=0;o2<e3.length&&(n2=e3[o2],(!r2||!(n2*i3>=t3))&&(r2||!(a2<=(e3[o2]+(e3[o2+1]||e3[o2]))/2)));o2++);return v(n2*i3,-Math.round(Math.log(.001)/Math.LN10))},objectEach:C,offset:function(t3){let e3=s.documentElement,i3=t3.parentElement||t3.parentNode?t3.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i3.top+(r.pageYOffset||e3.scrollTop)-(e3.clientTop||0),left:i3.left+(r.pageXOffset||e3.scrollLeft)-(e3.clientLeft||0),width:i3.width,height:i3.height}},pad:function(t3,e3,i3){return Array((e3||2)+1-String(t3).replace("-","").length).join(i3||"0")+t3},pick:x,pInt:n,pushUnique:function(t3,e3){return 0>t3.indexOf(e3)&&!!t3.push(e3)},relativeLength:function(t3,e3,i3){return/%$/.test(t3)?e3*parseFloat(t3)/100+(i3||0):parseFloat(t3)},removeEvent:k,replaceNested:function(t3,...e3){let i3,s2;do{for(s2 of(i3=t3,e3))t3=t3.replace(s2[0],s2[1])}while(t3!==i3);return t3},splat:f,stableSort:function(t3,e3){let i3,s2;let r2=t3.length;for(s2=0;s2<r2;s2++)t3[s2].safeI=s2;for(t3.sort((function(t4,s3){return 0===(i3=e3(t4,s3))?t4.safeI-s3.safeI:i3})),s2=0;s2<r2;s2++)delete t3[s2].safeI},syncTimeout:function(t3,e3,i3){return e3>0?setTimeout(t3,e3,i3):(t3.call(0,i3),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:w2,useSerialIds:function(t3){return e2=x(t3,e2)},wrap:function(t3,e3,i3){let s2=t3[e3];t3[e3]=function(){let t4=arguments,e4=this;return i3.apply(this,[function(){return s2.apply(e4,arguments.length?arguments:t4)}].concat([].slice.call(arguments)))}}}})),i(e,"Core/Chart/ChartDefaults.js",[],(function(){return{alignThresholds:false,panning:{enabled:false,type:"x"},styledMode:false,borderRadius:0,colorCount:10,allowMutatingData:true,ignoreHiddenSeries:true,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:true,type:"line",zooming:{singleTouch:false,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}})),i(e,"Core/Color/Palettes.js",[],(function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}})),i(e,"Core/Time.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2){let{win:i2}=t2,{defined:s,error:r,extend:o,isNumber:n,isObject:a,merge:h,objectEach:l,pad:d,pick:c,splat:p,timeUnits:u}=e2,g=t2.isSafari&&i2.Intl&&i2.Intl.DateTimeFormat.prototype.formatRange,f=t2.isSafari&&i2.Intl&&!i2.Intl.DateTimeFormat.prototype.formatRange;class m{constructor(t3){this.options={},this.useUTC=false,this.variableTimezone=false,this.Date=i2.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t3)}get(t3,e3){if(this.variableTimezone||this.timezoneOffset){let i3=e3.getTime(),s2=i3-this.getTimezoneOffset(e3);e3.setTime(s2);let r2=e3["getUTC"+t3]();return e3.setTime(i3),r2}return this.useUTC?e3["getUTC"+t3]():e3["get"+t3]()}set(t3,e3,i3){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t3||"Seconds"===t3||"Minutes"===t3&&this.getTimezoneOffset(e3)%36e5==0)return e3["setUTC"+t3](i3);let s2=this.getTimezoneOffset(e3),r2=e3.getTime()-s2;e3.setTime(r2),e3["setUTC"+t3](i3);let o2=this.getTimezoneOffset(e3);return r2=e3.getTime()+o2,e3.setTime(r2)}return this.useUTC||g&&"FullYear"===t3?e3["setUTC"+t3](i3):e3["set"+t3](i3)}update(t3={}){let e3=c(t3.useUTC,true);this.options=t3=h(true,this.options,t3),this.Date=t3.Date||i2.Date||Date,this.useUTC=e3,this.timezoneOffset=e3&&t3.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e3&&!!(t3.getTimezoneOffset||t3.timezone)}makeTime(t3,e3,i3,s2,r2,o2){let n2,a2,h2;return this.useUTC?(n2=this.Date.UTC.apply(0,arguments),a2=this.getTimezoneOffset(n2),n2+=a2,a2!==(h2=this.getTimezoneOffset(n2))?n2+=h2-a2:a2-36e5!==this.getTimezoneOffset(n2-36e5)||f||(n2-=36e5)):n2=new this.Date(t3,e3,c(i3,1),c(s2,0),c(r2,0),c(o2,0)).getTime(),n2}timezoneOffsetFunction(){let t3=this,e3=this.options,i3=e3.getTimezoneOffset;return this.useUTC?e3.timezone?t4=>{try{let i4=`shortOffset,${e3.timezone||""}`,[s2,r2,o2,a2,h2=0]=(m.formatCache[i4]=m.formatCache[i4]||Intl.DateTimeFormat("en",{timeZone:e3.timezone,timeZoneName:"shortOffset"})).format(t4).split(/(GMT|:)/).map(Number),l2=-(36e5*(o2+h2/60));if(n(l2))return l2}catch(t5){r(34)}return 0}:this.useUTC&&i3?t4=>6e4*i3(t4.valueOf()):()=>6e4*(t3.timezoneOffset||0):t4=>6e4*new Date(t4.toString()).getTimezoneOffset()}dateFormat(e3,i3,r2){if(!s(i3)||isNaN(i3))return t2.defaultOptions.lang&&t2.defaultOptions.lang.invalidDate||"";e3=c(e3,"%Y-%m-%d %H:%M:%S");let n2=this,a2=new this.Date(i3),h2=this.get("Hours",a2),p2=this.get("Day",a2),u2=this.get("Date",a2),g2=this.get("Month",a2),f2=this.get("FullYear",a2),m2=t2.defaultOptions.lang,x=m2&&m2.weekdays,y=m2&&m2.shortWeekdays;return l(o({a:y?y[p2]:x[p2].substr(0,3),A:x[p2],d:d(u2),e:d(u2,2," "),w:p2,b:m2.shortMonths[g2],B:m2.months[g2],m:d(g2+1),o:g2+1,y:f2.toString().substr(2,2),Y:f2,H:d(h2),k:h2,I:d(h2%12||12),l:h2%12||12,M:d(this.get("Minutes",a2)),p:h2<12?"AM":"PM",P:h2<12?"am":"pm",S:d(this.get("Seconds",a2)),L:d(Math.floor(i3%1e3),3)},t2.dateFormats),(function(t3,s2){for(;-1!==e3.indexOf("%"+s2);)e3=e3.replace("%"+s2,"function"==typeof t3?t3.call(n2,i3):t3)})),r2?e3.substr(0,1).toUpperCase()+e3.substr(1):e3}resolveDTLFormat(t3){return a(t3,true)?t3:{main:(t3=p(t3))[0],from:t3[1],to:t3[2]}}getTimeTicks(t3,e3,i3,r2){let n2,a2,h2,l2;let d2=this,p2=d2.Date,g2=[],f2={},m2=new p2(e3),x=t3.unitRange,y=t3.count||1;if(r2=c(r2,1),s(e3)){d2.set("Milliseconds",m2,x>=u.second?0:y*Math.floor(d2.get("Milliseconds",m2)/y)),x>=u.second&&d2.set("Seconds",m2,x>=u.minute?0:y*Math.floor(d2.get("Seconds",m2)/y)),x>=u.minute&&d2.set("Minutes",m2,x>=u.hour?0:y*Math.floor(d2.get("Minutes",m2)/y)),x>=u.hour&&d2.set("Hours",m2,x>=u.day?0:y*Math.floor(d2.get("Hours",m2)/y)),x>=u.day&&d2.set("Date",m2,x>=u.month?1:Math.max(1,y*Math.floor(d2.get("Date",m2)/y))),x>=u.month&&(d2.set("Month",m2,x>=u.year?0:y*Math.floor(d2.get("Month",m2)/y)),a2=d2.get("FullYear",m2)),x>=u.year&&(a2-=a2%y,d2.set("FullYear",m2,a2)),x===u.week&&(l2=d2.get("Day",m2),d2.set("Date",m2,d2.get("Date",m2)-l2+r2+(l2<r2?-7:0))),a2=d2.get("FullYear",m2);let t4=d2.get("Month",m2),o2=d2.get("Date",m2),c2=d2.get("Hours",m2);e3=m2.getTime(),(d2.variableTimezone||!d2.useUTC)&&s(i3)&&(h2=i3-e3>4*u.month||d2.getTimezoneOffset(e3)!==d2.getTimezoneOffset(i3));let p3=m2.getTime();for(n2=1;p3<i3;)g2.push(p3),x===u.year?p3=d2.makeTime(a2+n2*y,0):x===u.month?p3=d2.makeTime(a2,t4+n2*y):h2&&(x===u.day||x===u.week)?p3=d2.makeTime(a2,t4,o2+n2*y*(x===u.day?1:7)):h2&&x===u.hour&&y>1?p3=d2.makeTime(a2,t4,o2,c2+n2*y):p3+=x*y,n2++;g2.push(p3),x<=u.hour&&g2.length<1e4&&g2.forEach((function(t5){t5%18e5==0&&"000000000"===d2.dateFormat("%H%M%S%L",t5)&&(f2[t5]="day")}))}return g2.info=o(t3,{higherRanks:f2,totalRange:x*y}),g2}getDateFormat(t3,e3,i3,s2){let r2=this.dateFormat("%m-%d %H:%M:%S.%L",e3),o2="01-01 00:00:00.000",n2={millisecond:15,second:12,minute:9,hour:6,day:3},a2="millisecond",h2=a2;for(a2 in u){if(t3===u.week&&+this.dateFormat("%w",e3)===i3&&r2.substr(6)===o2.substr(6)){a2="week";break}if(u[a2]>t3){a2=h2;break}if(n2[a2]&&r2.substr(n2[a2])!==o2.substr(n2[a2]))break;"week"!==a2&&(h2=a2)}return this.resolveDTLFormat(s2[a2]).main}}return m.formatCache={},m})),i(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r){let{isTouchDevice:o}=e2,{fireEvent:n,merge:a}=r,h={colors:i2.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:true},chart:t2,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:true,align:"center",alignColumns:true,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:false,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:true,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:true,animation:{duration:300,easing:t3=>Math.sqrt(1-Math.pow(t3-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:false,snap:o?25:10,headerFormat:'<span style="font-size: 0.8em">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,shadow:true,stickOnContact:false,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:false},credits:{enabled:true,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};h.chart.styledMode=false;let l=new s(h.time);return{defaultOptions:h,defaultTime:l,getOptions:function(){return h},setOptions:function(t3){return n(e2,"setOptions",{options:t3}),a(true,h,t3),(t3.time||t3.global)&&(e2.time?e2.time.update(a(h.global,h.time,t3.global,t3.time)):e2.time=l),h}}})),i(e,"Core/Color/Color.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2){let{isNumber:i2,merge:s,pInt:r}=e2;class o{static parse(t3){return t3?new o(t3):o.None}constructor(e3){let i3,s2,r2,n;this.rgba=[NaN,NaN,NaN,NaN],this.input=e3;let a=t2.Color;if(a&&a!==o)return new a(e3);if("object"==typeof e3&&void 0!==e3.stops)this.stops=e3.stops.map((t3=>new o(t3[1])));else if("string"==typeof e3){if(this.input=e3=o.names[e3.toLowerCase()]||e3,"#"===e3.charAt(0)){let t3=e3.length,i4=parseInt(e3.substr(1),16);7===t3?s2=[(16711680&i4)>>16,(65280&i4)>>8,255&i4,1]:4===t3&&(s2=[(3840&i4)>>4|(3840&i4)>>8,(240&i4)>>4|240&i4,(15&i4)<<4|15&i4,1])}if(!s2)for(r2=o.parsers.length;r2--&&!s2;)(i3=(n=o.parsers[r2]).regex.exec(e3))&&(s2=n.parse(i3))}s2&&(this.rgba=s2)}get(t3){let e3=this.input,r2=this.rgba;if("object"==typeof e3&&void 0!==this.stops){let i3=s(e3);return i3.stops=[].slice.call(i3.stops),this.stops.forEach(((e4,s2)=>{i3.stops[s2]=[i3.stops[s2][0],e4.get(t3)]})),i3}return r2&&i2(r2[0])?"rgb"!==t3&&(t3||1!==r2[3])?"a"===t3?`${r2[3]}`:"rgba("+r2.join(",")+")":"rgb("+r2[0]+","+r2[1]+","+r2[2]+")":e3}brighten(t3){let e3=this.rgba;if(this.stops)this.stops.forEach((function(e4){e4.brighten(t3)}));else if(i2(t3)&&0!==t3)for(let i3=0;i3<3;i3++)e3[i3]+=r(255*t3),e3[i3]<0&&(e3[i3]=0),e3[i3]>255&&(e3[i3]=255);return this}setOpacity(t3){return this.rgba[3]=t3,this}tweenTo(t3,e3){let s2=this.rgba,r2=t3.rgba;if(!i2(s2[0])||!i2(r2[0]))return t3.input||"none";let o2=1!==r2[3]||1!==s2[3];return(o2?"rgba(":"rgb(")+Math.round(r2[0]+(s2[0]-r2[0])*(1-e3))+","+Math.round(r2[1]+(s2[1]-r2[1])*(1-e3))+","+Math.round(r2[2]+(s2[2]-r2[2])*(1-e3))+(o2?","+(r2[3]+(s2[3]-r2[3])*(1-e3)):"")+")"}}return o.names={white:"#ffffff",black:"#000000"},o.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(t3){return[r(t3[1]),r(t3[2]),r(t3[3]),parseFloat(t3[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(t3){return[r(t3[1]),r(t3[2]),r(t3[3]),1]}}],o.None=new o(""),o})),i(e,"Core/Animation/Fx.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{parse:s}=t2,{win:r}=e2,{isNumber:o,objectEach:n}=i2;class a{constructor(t3,e3,i3){this.pos=NaN,this.options=e3,this.elem=t3,this.prop=i3}dSetter(){let t3=this.paths,e3=t3&&t3[0],i3=t3&&t3[1],s2=this.now||0,r2=[];if(1!==s2&&e3&&i3){if(e3.length===i3.length&&s2<1)for(let t4=0;t4<i3.length;t4++){let n2=e3[t4],a2=i3[t4],h=[];for(let t5=0;t5<a2.length;t5++){let e4=n2[t5],i4=a2[t5];o(e4)&&o(i4)&&!("A"===a2[0]&&(4===t5||5===t5))?h[t5]=e4+s2*(i4-e4):h[t5]=i4}r2.push(h)}else r2=i3}else r2=this.toD||[];this.elem.attr("d",r2,void 0,true)}update(){let t3=this.elem,e3=this.prop,i3=this.now,s2=this.options.step;this[e3+"Setter"]?this[e3+"Setter"]():t3.attr?t3.element&&t3.attr(e3,i3,null,true):t3.style[e3]=i3+this.unit,s2&&s2.call(t3,i3,this)}run(t3,e3,i3){let s2=this,o2=s2.options,n2=function(t4){return!n2.stopped&&s2.step(t4)},h=r.requestAnimationFrame||function(t4){setTimeout(t4,13)},l=function(){for(let t4=0;t4<a.timers.length;t4++)a.timers[t4]()||a.timers.splice(t4--,1);a.timers.length&&h(l)};t3!==e3||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=t3,this.end=e3,this.unit=i3,this.now=this.start,this.pos=0,n2.elem=this.elem,n2.prop=this.prop,n2()&&1===a.timers.push(n2)&&h(l)):(delete o2.curAnim[this.prop],o2.complete&&0===Object.keys(o2.curAnim).length&&o2.complete.call(this.elem))}step(t3){let e3,i3;let s2=+new Date,r2=this.options,o2=this.elem,a2=r2.complete,h=r2.duration,l=r2.curAnim;return o2.attr&&!o2.element?e3=false:t3||s2>=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),l[this.prop]=true,i3=true,n(l,(function(t4){true!==t4&&(i3=false)})),i3&&a2&&a2.call(o2),e3=false):(this.pos=r2.easing((s2-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e3=true),e3}initPath(t3,e3,i3){let s2=t3.startX,r2=t3.endX,n2=i3.slice(),a2=t3.isArea,h=a2?2:1,l=e3&&i3.length>e3.length&&i3.hasStackedCliffs,d,c,p,u,g=e3&&e3.slice();if(!g||l)return[n2,n2];function f(t4,e4){for(;t4.length<c;){let i4=t4[0],s3=e4[c-t4.length];if(s3&&"M"===i4[0]&&("C"===s3[0]?t4[0]=["C",i4[1],i4[2],i4[1],i4[2],i4[1],i4[2]]:t4[0]=["L",i4[1],i4[2]]),t4.unshift(i4),a2){let e5=t4.pop();t4.push(t4[t4.length-1],e5)}}}function m(t4){for(;t4.length<c;){let e4=t4[Math.floor(t4.length/h)-1].slice();if("C"===e4[0]&&(e4[1]=e4[5],e4[2]=e4[6]),a2){let i4=t4[Math.floor(t4.length/h)].slice();t4.splice(t4.length/2,0,e4,i4)}else t4.push(e4)}}if(s2&&r2&&r2.length){for(p=0;p<s2.length;p++){if(s2[p]===r2[0]){d=p;break}if(s2[0]===r2[r2.length-s2.length+p]){d=p,u=true;break}if(s2[s2.length-1]===r2[r2.length-s2.length+p]){d=s2.length-p;break}}void 0===d&&(g=[])}return g.length&&o(d)&&(c=n2.length+d*h,u?(f(g,n2),m(n2)):(f(n2,g),m(g))),[g,n2]}fillSetter(){a.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,s(this.start).tweenTo(s(this.end),this.pos),void 0,true)}}return a.timers=[],a})),i(e,"Core/Animation/AnimationUtilities.js",[e["Core/Animation/Fx.js"],e["Core/Utilities.js"]],(function(t2,e2){let{defined:i2,getStyle:s,isArray:r,isNumber:o,isObject:n,merge:a,objectEach:h,pick:l}=e2;function d(t3){return n(t3)?a({duration:500,defer:0},t3):{duration:t3?500:0,defer:0}}function c(e3,i3){let s2=t2.timers.length;for(;s2--;)t2.timers[s2].elem!==e3||i3&&i3!==t2.timers[s2].prop||(t2.timers[s2].stopped=true)}return{animate:function(e3,i3,l2){let d2,p="",u,g,f;n(l2)||(f=arguments,l2={duration:f[2],easing:f[3],complete:f[4]}),o(l2.duration)||(l2.duration=400),l2.easing="function"==typeof l2.easing?l2.easing:Math[l2.easing]||Math.easeInOutSine,l2.curAnim=a(i3),h(i3,(function(o2,n2){c(e3,n2),g=new t2(e3,l2,n2),u=void 0,"d"===n2&&r(i3.d)?(g.paths=g.initPath(e3,e3.pathArray,i3.d),g.toD=i3.d,d2=0,u=1):e3.attr?d2=e3.attr(n2):(d2=parseFloat(s(e3,n2))||0,"opacity"!==n2&&(p="px")),u||(u=o2),"string"==typeof u&&u.match("px")&&(u=u.replace(/px/g,"")),g.run(d2,u,p)}))},animObject:d,getDeferredAnimation:function(t3,e3,s2){let r2=d(e3),o2=s2?[s2]:t3.series,a2=0,h2=0;return o2.forEach((t4=>{let s3=d(t4.options.animation);a2=n(e3)&&i2(e3.defer)?r2.defer:Math.max(a2,s3.duration+s3.defer),h2=Math.min(r2.duration,s3.duration)})),t3.renderer.forExport&&(a2=0),{defer:Math.max(0,a2-h2),duration:Math.min(a2,h2)}},setAnimation:function(t3,e3){e3.renderer.globalAnimation=l(t3,e3.options.chart.animation,true)},stop:c}})),i(e,"Core/Renderer/HTML/AST.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2){let{SVG_NS:i2,win:s}=t2,{attr:r,createElement:o,css:n,error:a,isFunction:h,isString:l,objectEach:d,splat:c}=e2,{trustedTypes:p}=s,u=p&&h(p.createPolicy)&&p.createPolicy("highcharts",{createHTML:t3=>t3}),g=u?u.createHTML(""):"",f=function(){try{return!!(new DOMParser).parseFromString(g,"text/html")}catch(t3){return false}}();class m{static filterUserAttributes(t3){return d(t3,((e3,i3)=>{let s2=true;-1===m.allowedAttributes.indexOf(i3)&&(s2=false),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i3)&&(s2=l(e3)&&m.allowedReferences.some((t4=>0===e3.indexOf(t4)))),s2||(a(33,false,void 0,{"Invalid attribute in config":`${i3}`}),delete t3[i3]),l(e3)&&t3[i3]&&(t3[i3]=e3.replace(/</g,"<"))})),t3}static parseStyle(t3){return t3.split(";").reduce(((t4,e3)=>{let i3=e3.split(":").map((t5=>t5.trim())),s2=i3.shift();return s2&&i3.length&&(t4[s2.replace(/-([a-z])/g,(t5=>t5[1].toUpperCase()))]=i3.join(":")),t4}),{})}static setElementHTML(t3,e3){t3.innerHTML=m.emptyHTML,e3&&new m(e3).addToDOM(t3)}constructor(t3){this.nodes="string"==typeof t3?this.parseMarkup(t3):t3}addToDOM(e3){return function e4(s2,o2){let h2;return c(s2).forEach((function(s3){let l2;let c2=s3.tagName,p2=s3.textContent?t2.doc.createTextNode(s3.textContent):void 0,u2=m.bypassHTMLFiltering;if(c2){if("#text"===c2)l2=p2;else if(-1!==m.allowedTags.indexOf(c2)||u2){let a2="svg"===c2?i2:o2.namespaceURI||i2,h3=t2.doc.createElementNS(a2,c2),g2=s3.attributes||{};d(s3,(function(t3,e5){"tagName"!==e5&&"attributes"!==e5&&"children"!==e5&&"style"!==e5&&"textContent"!==e5&&(g2[e5]=t3)})),r(h3,u2?g2:m.filterUserAttributes(g2)),s3.style&&n(h3,s3.style),p2&&h3.appendChild(p2),e4(s3.children||[],h3),l2=h3}else a(33,false,void 0,{"Invalid tagName in config":c2})}l2&&o2.appendChild(l2),h2=l2})),h2}(this.nodes,e3)}parseMarkup(t3){let e3;let i3=[];if(t3=t3.trim().replace(/ style=(["'])/g," data-style=$1"),f)e3=(new DOMParser).parseFromString(u?u.createHTML(t3):t3,"text/html");else{let i4=o("div");i4.innerHTML=t3,e3={body:i4}}let s2=(t4,e4)=>{let i4=t4.nodeName.toLowerCase(),r2={tagName:i4};"#text"===i4&&(r2.textContent=t4.textContent||"");let o2=t4.attributes;if(o2){let t5={};[].forEach.call(o2,(e5=>{"data-style"===e5.name?r2.style=m.parseStyle(e5.value):t5[e5.name]=e5.value})),r2.attributes=t5}if(t4.childNodes.length){let e5=[];[].forEach.call(t4.childNodes,(t5=>{s2(t5,e5)})),e5.length&&(r2.children=e5)}e4.push(r2)};return[].forEach.call(e3.body.childNodes,(t4=>s2(t4,i3))),i3}}return m.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],m.allowedReferences=["https://","http://","mailto:","/","../","./","#"],m.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],m.emptyHTML=g,m.bypassHTMLFiltering=false,m})),i(e,"Core/Templating.js",[e["Core/Defaults.js"],e["Core/Utilities.js"]],(function(t2,e2){let{defaultOptions:i2,defaultTime:s}=t2,{extend:r,getNestedProperty:o,isArray:n,isNumber:a,isObject:h,pick:l,pInt:d}=e2,c={add:(t3,e3)=>t3+e3,divide:(t3,e3)=>0!==e3?t3/e3:"",eq:(t3,e3)=>t3==e3,each:function(t3){let e3=arguments[arguments.length-1];return!!n(t3)&&t3.map(((i3,s2)=>p(e3.body,r(h(i3)?i3:{"@this":i3},{"@index":s2,"@first":0===s2,"@last":s2===t3.length-1})))).join("")},ge:(t3,e3)=>t3>=e3,gt:(t3,e3)=>t3>e3,if:t3=>!!t3,le:(t3,e3)=>t3<=e3,lt:(t3,e3)=>t3<e3,multiply:(t3,e3)=>t3*e3,ne:(t3,e3)=>t3!=e3,subtract:(t3,e3)=>t3-e3,unless:t3=>!t3};function p(t3="",e3,r2){let n2=/\{([\w\:\.\,;\-\/<>%@"'’= #\(\)]+)\}/g,a2=/\(([\w\:\.\,;\-\/<>%@"'= ]+)\)/g,h2=[],d2=/f$/,g=/\.(\d)/,f=i2.lang,m=r2&&r2.time||s,x=r2&&r2.numberFormatter||u,y=(t4="")=>{let i3;return"true"===t4||"false"!==t4&&((i3=Number(t4)).toString()===t4?i3:o(t4,e3))},b,v,S=0,C;for(;null!==(b=n2.exec(t3));){let i3=a2.exec(b[1]);i3&&(b=i3,C=true),v&&v.isBlock||(v={ctx:e3,expression:b[1],find:b[0],isBlock:"#"===b[1].charAt(0),start:b.index,startInner:b.index+b[0].length,length:b[0].length});let s2=b[1].split(" ")[0].replace("#","");c[s2]&&(v.isBlock&&s2===v.fn&&S++,v.fn||(v.fn=s2));let r3="else"===b[1];if(v.isBlock&&v.fn&&(b[1]===`/${v.fn}`||r3)){if(S)!r3&&S--;else{let e4=v.startInner,i4=t3.substr(e4,b.index-e4);void 0===v.body?(v.body=i4,v.startInner=b.index+b[0].length):v.elseBody=i4,v.find+=i4+b[0],r3||(h2.push(v),v=void 0)}}else v.isBlock||h2.push(v);if(i3&&!(v==null?void 0:v.isBlock))break}return h2.forEach((i3=>{let s2,o2;let{body:n3,elseBody:a3,expression:h3,fn:u2}=i3;if(u2){let t4=[i3],l2=h3.split(" ");for(o2=c[u2].length;o2--;)t4.unshift(y(l2[o2+1]));s2=c[u2].apply(e3,t4),i3.isBlock&&"boolean"==typeof s2&&(s2=p(s2?n3:a3,e3,r2))}else{let t4=h3.split(":");if(s2=y(t4.shift()||""),t4.length&&"number"==typeof s2){let e4=t4.join(":");if(d2.test(e4)){let t5=parseInt((e4.match(g)||["","-1"])[1],10);null!==s2&&(s2=x(s2,t5,f.decimalPoint,e4.indexOf(",")>-1?f.thousandsSep:""))}else s2=m.dateFormat(e4,s2)}}t3=t3.replace(i3.find,l(s2,""))})),C?p(t3,e3,r2):t3}function u(t3,e3,s2,r2){let o2,n2;t3=+t3||0,e3=+e3;let h2=i2.lang,c2=(t3.toString().split(".")[1]||"").split("e")[0].length,p2=t3.toString().split("e"),u2=e3;-1===e3?e3=Math.min(c2,20):a(e3)?e3&&p2[1]&&p2[1]<0&&((n2=e3+ +p2[1])>=0?(p2[0]=(+p2[0]).toExponential(n2).split("e")[0],e3=n2):(p2[0]=p2[0].split(".")[0]||0,t3=e3<20?(p2[0]*Math.pow(10,p2[1])).toFixed(e3):0,p2[1]=0)):e3=2;let g=(Math.abs(p2[1]?p2[0]:t3)+Math.pow(10,-Math.max(e3,c2)-1)).toFixed(e3),f=String(d(g)),m=f.length>3?f.length%3:0;return s2=l(s2,h2.decimalPoint),r2=l(r2,h2.thousandsSep),o2=(t3<0?"-":"")+(m?f.substr(0,m)+r2:""),0>+p2[1]&&!u2?o2="0":o2+=f.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r2),e3?o2+=s2+g.slice(-e3):0==+o2&&(o2="0"),p2[1]&&0!=+o2&&(o2+="e"+p2[1]),o2}return{dateFormat:function(t3,e3,i3){return s.dateFormat(t3,e3,i3)},format:p,helpers:c,numberFormat:u}})),i(e,"Core/Renderer/RendererRegistry.js",[e["Core/Globals.js"]],(function(t2){var e2,i2;let s;return(i2=e2||(e2={})).rendererTypes={},i2.getRendererType=function(t3=s){return i2.rendererTypes[t3]||i2.rendererTypes[s]},i2.registerRendererType=function(e3,r,o){i2.rendererTypes[e3]=r,(!s||o)&&(s=e3,t2.Renderer=r)},e2})),i(e,"Core/Renderer/RendererUtilities.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{clamp:i2,pick:s,pushUnique:r,stableSort:o}=t2;return(e2||(e2={})).distribute=function t3(e3,n,a){let h=e3,l=h.reducedLen||n,d=(t4,e4)=>t4.target-e4.target,c=[],p=e3.length,u=[],g=c.push,f,m,x,y=true,b,v,S=0,C;for(f=p;f--;)S+=e3[f].size;if(S>l){for(o(e3,((t4,e4)=>(e4.rank||0)-(t4.rank||0))),x=(C=e3[0].rank===e3[e3.length-1].rank)?p/2:-1,m=C?x:p-1;x&&S>l;)b=e3[f=Math.floor(m)],r(u,f)&&(S-=b.size),m+=x,C&&m>=e3.length&&(x/=2,m=x);u.sort(((t4,e4)=>e4-t4)).forEach((t4=>g.apply(c,e3.splice(t4,1))))}for(o(e3,d),e3=e3.map((t4=>({size:t4.size,targets:[t4.target],align:s(t4.align,.5)})));y;){for(f=e3.length;f--;)b=e3[f],v=(Math.min.apply(0,b.targets)+Math.max.apply(0,b.targets))/2,b.pos=i2(v-b.size*b.align,0,n-b.size);for(f=e3.length,y=false;f--;)f>0&&e3[f-1].pos+e3[f-1].size>e3[f].pos&&(e3[f-1].size+=e3[f].size,e3[f-1].targets=e3[f-1].targets.concat(e3[f].targets),e3[f-1].align=.5,e3[f-1].pos+e3[f-1].size>n&&(e3[f-1].pos=n-e3[f-1].size),e3.splice(f,1),y=true)}return g.apply(h,c),f=0,e3.some((e4=>{let i3=0;return(e4.targets||[]).some((()=>(h[f].pos=e4.pos+i3,void 0!==a&&Math.abs(h[f].pos-h[f].target)>a)?(h.slice(0,f+1).forEach((t4=>delete t4.pos)),h.reducedLen=(h.reducedLen||n)-.1*n,h.reducedLen>.1*n&&t3(h,n,a),true):(i3+=h[f].size,f++,false)))})),o(h,d),h},e2})),i(e,"Core/Renderer/SVG/SVGElement.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{animate:r,animObject:o,stop:n}=t2,{deg2rad:a,doc:h,svg:l,SVG_NS:d,win:c}=i2,{addEvent:p,attr:u,createElement:g,crisp:f,css:m,defined:x,erase:y,extend:b,fireEvent:v,isArray:S,isFunction:C,isObject:k,isString:M,merge:w2,objectEach:T,pick:A,pInt:P,pushUnique:L,replaceNested:O,syncTimeout:D,uniqueKey:E}=s;class I{_defaultGetter(t3){let e3=A(this[t3+"Value"],this[t3],this.element?this.element.getAttribute(t3):null,0);return/^-?[\d\.]+$/.test(e3)&&(e3=parseFloat(e3)),e3}_defaultSetter(t3,e3,i3){i3.setAttribute(e3,t3)}add(t3){let e3;let i3=this.renderer,s2=this.element;return t3&&(this.parentGroup=t3),void 0!==this.textStr&&"text"===this.element.nodeName&&i3.buildText(this),this.added=true,(!t3||t3.handleZ||this.zIndex)&&(e3=this.zIndexSetter()),e3||(t3?t3.element:i3.box).appendChild(s2),this.onAdd&&this.onAdd(),this}addClass(t3,e3){let i3=e3?"":this.attr("class")||"";return(t3=(t3||"").split(/ /g).reduce((function(t4,e4){return-1===i3.indexOf(e4)&&t4.push(e4),t4}),i3?[i3]:[]).join(" "))!==i3&&this.attr("class",t3),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=false)}align(t3,e3,i3,s2=true){let r2,o2,n2,a2;let h2={},l2=this.renderer,d2=l2.alignedObjects,c2=!!t3;t3?(this.alignOptions=t3,this.alignByTranslate=e3,this.alignTo=i3):(t3=this.alignOptions||{},e3=this.alignByTranslate,i3=this.alignTo);let p2=!i3||M(i3)?i3||"renderer":void 0;p2&&(c2&&L(d2,this),i3=void 0);let u2=A(i3,l2[p2],l2),g2=t3.align,f2=t3.verticalAlign;return r2=(u2.x||0)+(t3.x||0),o2=(u2.y||0)+(t3.y||0),"right"===g2?n2=1:"center"===g2&&(n2=2),n2&&(r2+=((u2.width||0)-(t3.width||0))/n2),h2[e3?"translateX":"x"]=Math.round(r2),"bottom"===f2?a2=1:"middle"===f2&&(a2=2),a2&&(o2+=((u2.height||0)-(t3.height||0))/a2),h2[e3?"translateY":"y"]=Math.round(o2),s2&&(this[this.placed?"animate":"attr"](h2),this.placed=true),this.alignAttr=h2,this}alignSetter(t3){let e3={left:"start",center:"middle",right:"end"};e3[t3]&&(this.alignValue=t3,this.element.setAttribute("text-anchor",e3[t3]))}animate(t3,e3,i3){let s2=o(A(e3,this.renderer.globalAnimation,true)),n2=s2.defer;return h.hidden&&(s2.duration=0),0!==s2.duration?(i3&&(s2.complete=i3),D((()=>{this.element&&r(this,t3,s2)}),n2)):(this.attr(t3,void 0,i3||s2.complete),T(t3,(function(t4,e4){s2.step&&s2.step.call(this,t4,{prop:e4,pos:1,elem:this})}),this)),this}applyTextOutline(t3){let e3=this.element;-1!==t3.indexOf("contrast")&&(t3=t3.replace(/contrast/g,this.renderer.getContrast(e3.style.fill)));let s2=t3.split(" "),r2=s2[s2.length-1],o2=s2[0];if(o2&&"none"!==o2&&i2.svg){this.fakeTS=true,o2=o2.replace(/(^[\d\.]+)(.*?)$/g,(function(t5,e4,i4){return 2*Number(e4)+i4})),this.removeTextOutline();let t4=h.createElementNS(d,"tspan");u(t4,{class:"highcharts-text-outline",fill:r2,stroke:r2,"stroke-width":o2,"stroke-linejoin":"round"});let i3=e3.querySelector("textPath")||e3;[].forEach.call(i3.childNodes,(e4=>{let i4=e4.cloneNode(true);i4.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((t5=>i4.removeAttribute(t5))),t4.appendChild(i4)}));let s3=0;[].forEach.call(i3.querySelectorAll("text tspan"),(t5=>{s3+=Number(t5.getAttribute("dy"))}));let n2=h.createElementNS(d,"tspan");n2.textContent="",u(n2,{x:Number(e3.getAttribute("x")),dy:-s3}),t4.appendChild(n2),i3.insertBefore(t4,i3.firstChild)}}attr(t3,e3,i3,s2){let{element:r2}=this,o2=I.symbolCustomAttribs,a2,h2,l2=this,d2;return"string"==typeof t3&&void 0!==e3&&(a2=t3,(t3={})[a2]=e3),"string"==typeof t3?l2=(this[t3+"Getter"]||this._defaultGetter).call(this,t3,r2):(T(t3,(function(e4,i4){d2=false,s2||n(this,i4),this.symbolName&&-1!==o2.indexOf(i4)&&(h2||(this.symbolAttr(t3),h2=true),d2=true),this.rotation&&("x"===i4||"y"===i4)&&(this.doTransform=true),d2||(this[i4+"Setter"]||this._defaultSetter).call(this,e4,i4,r2)}),this),this.afterSetters()),i3&&i3.call(this),l2}clip(t3){if(t3&&!t3.clipPath){let e3=E()+"-",i3=this.renderer.createElement("clipPath").attr({id:e3}).add(this.renderer.defs);b(t3,{clipPath:i3,id:e3,count:0}),t3.add(i3)}return this.attr("clip-path",t3?`url(${this.renderer.url}#${t3.id})`:"none")}crisp(t3,e3){e3=Math.round(e3||t3.strokeWidth||0);let i3=t3.x||this.x||0,s2=t3.y||this.y||0,r2=(t3.width||this.width||0)+i3,o2=(t3.height||this.height||0)+s2,n2=f(i3,e3),a2=f(s2,e3);return b(t3,{x:n2,y:a2,width:f(r2,e3)-n2,height:f(o2,e3)-a2}),x(t3.strokeWidth)&&(t3.strokeWidth=e3),t3}complexColor(t3,i3,s2){let r2=this.renderer,o2,n2,a2,h2,l2,d2,c2,p2,u2,g2,f2=[],m2;v(this.renderer,"complexColor",{args:arguments},(function(){if(t3.radialGradient?n2="radialGradient":t3.linearGradient&&(n2="linearGradient"),n2){if(a2=t3[n2],l2=r2.gradients,d2=t3.stops,u2=s2.radialReference,S(a2)&&(t3[n2]=a2={x1:a2[0],y1:a2[1],x2:a2[2],y2:a2[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===n2&&u2&&!x(a2.gradientUnits)&&(h2=a2,a2=w2(a2,r2.getRadialAttr(u2,h2),{gradientUnits:"userSpaceOnUse"})),T(a2,(function(t4,e3){"id"!==e3&&f2.push(e3,t4)})),T(d2,(function(t4){f2.push(t4)})),l2[f2=f2.join(",")])g2=l2[f2].attr("id");else{a2.id=g2=E();let t4=l2[f2]=r2.createElement(n2).attr(a2).add(r2.defs);t4.radAttr=h2,t4.stops=[],d2.forEach((function(i4){0===i4[1].indexOf("rgba")?(c2=(o2=e2.parse(i4[1])).get("rgb"),p2=o2.get("a")):(c2=i4[1],p2=1);let s3=r2.createElement("stop").attr({offset:i4[0],"stop-color":c2,"stop-opacity":p2}).add(t4);t4.stops.push(s3)}))}m2="url("+r2.url+"#"+g2+")",s2.setAttribute(i3,m2),s2.gradient=f2,t3.toString=function(){return m2}}}))}css(t3){let e3=this.styles,i3={},s2=this.element,r2,o2=!e3;if(e3&&T(t3,(function(t4,s3){e3&&e3[s3]!==t4&&(i3[s3]=t4,o2=true)})),o2){e3&&(t3=b(e3,i3)),null===t3.width||"auto"===t3.width?delete this.textWidth:"text"===s2.nodeName.toLowerCase()&&t3.width&&(r2=this.textWidth=P(t3.width)),b(this.styles,t3),r2&&!l&&this.renderer.forExport&&delete t3.width;let o3=w2(t3);s2.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach((t4=>o3&&delete o3[t4])),o3.color&&(o3.fill=o3.color)),m(s2,o3)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t3.textOutline&&this.applyTextOutline(t3.textOutline)),this}dashstyleSetter(t3){let e3,i3=this["stroke-width"];if("inherit"===i3&&(i3=1),t3=t3&&t3.toLowerCase()){let s2=t3.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e3=s2.length;e3--;)s2[e3]=""+P(s2[e3])*A(i3,NaN);t3=s2.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t3)}}destroy(){var _a;let t3=this,e3=t3.element||{},i3=t3.renderer,s2=e3.ownerSVGElement,r2="SPAN"===e3.nodeName&&t3.parentGroup||void 0,o2,a2;if(e3.onclick=e3.onmouseout=e3.onmouseover=e3.onmousemove=e3.point=null,n(t3),t3.clipPath&&s2){let e4=t3.clipPath;[].forEach.call(s2.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(t4){t4.getAttribute("clip-path").indexOf(e4.element.id)>-1&&t4.removeAttribute("clip-path")})),t3.clipPath=e4.destroy()}if(t3.connector=(_a=t3.connector)==null?void 0:_a.destroy(),t3.stops){for(a2=0;a2<t3.stops.length;a2++)t3.stops[a2].destroy();t3.stops.length=0,t3.stops=void 0}for(t3.safeRemoveChild(e3);r2&&r2.div&&0===r2.div.childNodes.length;)o2=r2.parentGroup,t3.safeRemoveChild(r2.div),delete r2.div,r2=o2;t3.alignOptions&&y(i3.alignedObjects,t3),T(t3,(function(e4,i4){t3[i4]&&t3[i4].parentGroup===t3&&t3[i4].destroy&&t3[i4].destroy(),delete t3[i4]}))}dSetter(t3,e3,i3){S(t3)&&("string"==typeof t3[0]&&(t3=this.renderer.pathToSegments(t3)),this.pathArray=t3,t3=t3.reduce(((t4,e4,i4)=>e4&&e4.join?(i4?t4+" ":"")+e4.join(" "):(e4||"").toString()),"")),/(NaN| {2}|^$)/.test(t3)&&(t3="M 0 0"),this[e3]!==t3&&(i3.setAttribute(e3,t3),this[e3]=t3)}fillSetter(t3,e3,i3){"string"==typeof t3?i3.setAttribute(e3,t3):t3&&this.complexColor(t3,e3,i3)}hrefSetter(t3,e3,i3){i3.setAttributeNS("http://www.w3.org/1999/xlink",e3,t3)}getBBox(t3,e3){let i3,s2,r2,o2;let{alignValue:n2,element:a2,renderer:h2,styles:l2,textStr:d2}=this,{cache:c2,cacheKeys:p2}=h2,u2=a2.namespaceURI===this.SVG_NS,g2=A(e3,this.rotation,0),f2=h2.styledMode?a2&&I.prototype.getStyle.call(a2,"font-size"):l2.fontSize;if(x(d2)&&(-1===(o2=d2.toString()).indexOf("<")&&(o2=o2.replace(/\d/g,"0")),o2+=["",h2.rootFontSize,f2,g2,this.textWidth,n2,l2.textOverflow,l2.fontWeight].join(",")),o2&&!t3&&(i3=c2[o2]),!i3||i3.polygon){if(u2||h2.forExport){try{r2=this.fakeTS&&function(t5){let e4=a2.querySelector(".highcharts-text-outline");e4&&m(e4,{display:t5})},C(r2)&&r2("none"),i3=a2.getBBox?b({},a2.getBBox()):{width:a2.offsetWidth,height:a2.offsetHeight,x:0,y:0},C(r2)&&r2("")}catch(t5){}(!i3||i3.width<0)&&(i3={x:0,y:0,width:0,height:0})}else i3=this.htmlGetBBox();s2=i3.height,u2&&(i3.height=s2={"11px,17":14,"13px,20":16}[`${f2||""},${Math.round(s2)}`]||s2),g2&&(i3=this.getRotatedBox(i3,g2));let t4={bBox:i3};v(this,"afterGetBBox",t4),i3=t4.bBox}if(o2&&(""===d2||i3.height>0)){for(;p2.length>250;)delete c2[p2.shift()];c2[o2]||p2.push(o2),c2[o2]=i3}return i3}getRotatedBox(t3,e3){let{x:i3,y:s2,width:r2,height:o2}=t3,{alignValue:n2,translateY:h2,rotationOriginX:l2=0,rotationOriginY:d2=0}=this,c2={right:1,center:.5}[n2||0]||0,p2=Number(this.element.getAttribute("y")||0)-(h2?0:s2),u2=e3*a,g2=(e3-90)*a,f2=Math.cos(u2),m2=Math.sin(u2),x2=r2*f2,y2=r2*m2,b2=Math.cos(g2),v2=Math.sin(g2),[[S2,C2],[k2,M2]]=[l2,d2].map((t4=>[t4-t4*f2,t4*m2])),w3=i3+c2*(r2-x2)+S2+M2+p2*b2,T2=w3+x2,A2=T2-o2*b2,P2=A2-x2,L2=s2+p2-c2*y2-C2+k2+p2*v2,O2=L2+y2,D2=O2-o2*v2,E2=D2-y2,I2=Math.min(w3,T2,A2,P2),j=Math.min(L2,O2,D2,E2),B=Math.max(w3,T2,A2,P2)-I2,R=Math.max(L2,O2,D2,E2)-j;return{x:I2,y:j,width:B,height:R,polygon:[[w3,L2],[T2,O2],[A2,D2],[P2,E2]]}}getStyle(t3){return c.getComputedStyle(this.element||this,"").getPropertyValue(t3)}hasClass(t3){return-1!==(""+this.attr("class")).split(" ").indexOf(t3)}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(t3,e3){this.onEvents={},this.opacity=1,this.SVG_NS=d,this.element="span"===e3||"body"===e3?g(e3):h.createElementNS(this.SVG_NS,e3),this.renderer=t3,this.styles={},v(this,"afterInit")}on(t3,e3){let{onEvents:i3}=this;return i3[t3]&&i3[t3](),i3[t3]=p(this.element,t3,e3),this}opacitySetter(t3,e3,i3){let s2=Number(Number(t3).toFixed(3));this.opacity=s2,i3.setAttribute(e3,s2)}reAlign(){var _a;((_a=this.alignOptions)==null?void 0:_a.width)&&"left"!==this.alignOptions.align&&(this.alignOptions.width=this.getBBox().width,this.placed=false,this.align())}removeClass(t3){return this.attr("class",(""+this.attr("class")).replace(M(t3)?RegExp(`(^| )${t3}( |$)`):t3," ").replace(/ +/g," ").trim())}removeTextOutline(){let t3=this.element.querySelector("tspan.highcharts-text-outline");t3&&this.safeRemoveChild(t3)}safeRemoveChild(t3){let e3=t3.parentNode;e3&&e3.removeChild(t3)}setRadialReference(t3){let e3=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t3,e3&&e3.radAttr&&e3.animate(this.renderer.getRadialAttr(t3,e3.radAttr)),this}shadow(t3){var _a;let{renderer:e3}=this,i3=w2(((_a=this.parentGroup)==null?void 0:_a.rotation)===90?{offsetX:-1,offsetY:-1}:{},k(t3)?t3:{}),s2=e3.shadowDefinition(i3);return this.attr({filter:t3?`url(${e3.url}#${s2})`:"none"})}show(t3=true){return this.attr({visibility:t3?"inherit":"visible"})}"stroke-widthSetter"(t3,e3,i3){this[e3]=t3,i3.setAttribute(e3,t3)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let t3=this.getStyle("stroke-width"),e3=0,i3;return/px$/.test(t3)?e3=P(t3):""!==t3&&(u(i3=h.createElementNS(d,"rect"),{width:t3,"stroke-width":0}),this.element.parentNode.appendChild(i3),e3=i3.getBBox().width,i3.parentNode.removeChild(i3)),e3}symbolAttr(t3){let e3=this;I.symbolCustomAttribs.forEach((function(i3){e3[i3]=A(t3[i3],e3[i3])})),e3.attr({d:e3.renderer.symbols[e3.symbolName](e3.x,e3.y,e3.width,e3.height,e3)})}textSetter(t3){t3!==this.textStr&&(delete this.textPxLength,this.textStr=t3,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(t3){let e3=this.element,i3=e3.getElementsByTagName("title")[0]||h.createElementNS(this.SVG_NS,"title");e3.insertBefore?e3.insertBefore(i3,e3.firstChild):e3.appendChild(i3),i3.textContent=O(A(t3,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let t3=this.element;return t3.parentNode.appendChild(t3),this}translate(t3,e3){return this.attr({translateX:t3,translateY:e3})}updateTransform(t3="transform"){var _a;let{element:e3,matrix:i3,rotation:s2=0,rotationOriginX:r2,rotationOriginY:o2,scaleX:n2,scaleY:a2,translateX:h2=0,translateY:l2=0}=this,d2=["translate("+h2+","+l2+")"];x(i3)&&d2.push("matrix("+i3.join(",")+")"),s2&&(d2.push("rotate("+s2+" "+A(r2,e3.getAttribute("x"),0)+" "+A(o2,e3.getAttribute("y")||0)+")"),((_a=this.text)==null?void 0:_a.element.tagName)==="SPAN"&&this.text.attr({rotation:s2,rotationOriginX:(r2||0)-this.padding,rotationOriginY:(o2||0)-this.padding})),(x(n2)||x(a2))&&d2.push("scale("+A(n2,1)+" "+A(a2,1)+")"),d2.length&&!(this.text||this).textPath&&e3.setAttribute(t3,d2.join(" "))}visibilitySetter(t3,e3,i3){"inherit"===t3?i3.removeAttribute(e3):this[e3]!==t3&&i3.setAttribute(e3,t3),this[e3]=t3}xGetter(t3){return"circle"===this.element.nodeName&&("x"===t3?t3="cx":"y"===t3&&(t3="cy")),this._defaultGetter(t3)}zIndexSetter(t3,e3){let i3=this.renderer,s2=this.parentGroup,r2=(s2||i3).element||i3.box,o2=this.element,n2=r2===i3.box,a2,h2,l2,d2=false,c2,p2=this.added,u2;if(x(t3)?(o2.setAttribute("data-z-index",t3),t3=+t3,this[e3]===t3&&(p2=false)):x(this[e3])&&o2.removeAttribute("data-z-index"),this[e3]=t3,p2){for((t3=this.zIndex)&&s2&&(s2.handleZ=true),u2=(a2=r2.childNodes).length-1;u2>=0&&!d2;u2--)c2=!x(l2=(h2=a2[u2]).getAttribute("data-z-index")),h2!==o2&&(t3<0&&c2&&!n2&&!u2?(r2.insertBefore(o2,a2[u2]),d2=true):(P(l2)<=t3||c2&&(!x(t3)||t3>=0))&&(r2.insertBefore(o2,a2[u2+1]),d2=true));d2||(r2.insertBefore(o2,a2[n2?3:0]),d2=true)}return d2}}return I.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],I.prototype.strokeSetter=I.prototype.fillSetter,I.prototype.yGetter=I.prototype.xGetter,I.prototype.matrixSetter=I.prototype.rotationOriginXSetter=I.prototype.rotationOriginYSetter=I.prototype.rotationSetter=I.prototype.scaleXSetter=I.prototype.scaleYSetter=I.prototype.translateXSetter=I.prototype.translateYSetter=I.prototype.verticalAlignSetter=function(t3,e3){this[e3]=t3,this.doTransform=true},I})),i(e,"Core/Renderer/SVG/SVGLabel.js",[e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t2,e2){let{defined:i2,extend:s,isNumber:r,merge:o,pick:n,removeEvent:a}=e2;class h extends t2{constructor(t3,e3,i3,s2,r2,o2,n2,a2,l,d){let c;super(t3,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=false,this.textStr=e3,this.x=i3,this.y=s2,this.anchorX=o2,this.anchorY=n2,this.baseline=l,this.className=d,this.addClass("button"===d?"highcharts-no-tooltip":"highcharts-label"),d&&this.addClass("highcharts-"+d),this.text=t3.text(void 0,0,0,a2).attr({zIndex:1}),"string"==typeof r2&&((c=/^url\((.*?)\)$/.test(r2))||this.renderer.symbols[r2])&&(this.symbolKey=r2),this.bBox=h.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=t3.styledMode||c,this.deferredAttr={},this.alignFactor=0}alignSetter(t3){let e3={left:0,center:.5,right:1}[t3];e3!==this.alignFactor&&(this.alignFactor=e3,this.bBox&&r(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(t3,e3){this.anchorX=t3,this.boxAttr(e3,Math.round(t3)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(t3,e3){this.anchorY=t3,this.boxAttr(e3,t3-this.ySetting)}boxAttr(t3,e3){this.box?this.box.attr(t3,e3):this.deferredAttr[t3]=e3}css(e3){if(e3){let t3={};e3=o(e3),h.textProps.forEach((i3=>{void 0!==e3[i3]&&(t3[i3]=e3[i3],delete e3[i3])})),this.text.css(t3),"fontSize"in t3||"fontWeight"in t3?this.updateTextPadding():("width"in t3||"textOverflow"in t3)&&this.updateBoxSize()}return t2.prototype.css.call(this,e3)}destroy(){a(this.element,"mouseenter"),a(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t2.prototype.destroy.call(this)}fillSetter(t3,e3){t3&&(this.needsBox=true),this.fill=t3,this.boxAttr(e3,t3)}getBBox(t3,e3){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();let{padding:i3,height:s2=0,translateX:r2=0,translateY:o2=0,width:a2=0}=this,h2=n(this.paddingLeft,i3),l=e3??(this.rotation||0),d={width:a2,height:s2,x:r2+this.bBox.x-h2,y:o2+this.bBox.y-i3+this.baselineOffset};return l&&(d=this.getRotatedBox(d,l)),d}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(t3){this.heightSetting=t3,this.doUpdate=true}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=false)}onAdd(){this.text.add(this),this.attr({text:n(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&i2(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(t3,e3){r(t3)?t3!==this[e3]&&(this[e3]=t3,this.updateTextPadding()):this[e3]=void 0}rSetter(t3,e3){this.boxAttr(e3,t3)}strokeSetter(t3,e3){this.stroke=t3,this.boxAttr(e3,t3)}"stroke-widthSetter"(t3,e3){t3&&(this.needsBox=true),this["stroke-width"]=t3,this.boxAttr(e3,t3)}"text-alignSetter"(t3){this.textAlign=t3}textSetter(t3){void 0!==t3&&this.text.attr({text:t3}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let t3;let e3=this.text,o2={},n2=this.padding,a2=this.bBox=(!r(this.widthSetting)||!r(this.heightSetting)||this.textAlign)&&i2(e3.textStr)?e3.getBBox(void 0,0):h.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||a2.height||0)+2*n2;let l=this.renderer.fontMetrics(e3);if(this.baselineOffset=n2+Math.min((this.text.firstLineMetrics||l).b,a2.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-l.h)/2),this.needsBox&&!e3.textPath){if(!this.box){let t4=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();t4.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),t4.add(this)}t3=this.getCrispAdjust(),o2.x=t3,o2.y=(this.baseline?-this.baselineOffset:0)+t3,o2.width=Math.round(this.width),o2.height=Math.round(this.height),this.box.attr(s(o2,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let t3=this.text;if(!t3.textPath){this.updateBoxSize();let e3=this.baseline?0:this.baselineOffset,s2=n(this.paddingLeft,this.padding);i2(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(s2+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(s2!==t3.x||e3!==t3.y)&&(t3.attr("x",s2),t3.hasBoxWidthChanged&&(this.bBox=t3.getBBox(true)),void 0!==e3&&t3.attr("y",e3)),t3.x=s2,t3.y=e3}}widthSetter(t3){this.widthSetting=r(t3)?t3:void 0,this.doUpdate=true}getPaddedWidth(){let t3=this.padding,e3=n(this.paddingLeft,t3),i3=n(this.paddingRight,t3);return(this.widthSetting||this.bBox.width||0)+e3+i3}xSetter(t3){this.x=t3,this.alignFactor&&(t3-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=true),this.xSetting=Math.round(t3),this.attr("translateX",this.xSetting)}ySetter(t3){this.ySetting=this.y=Math.round(t3),this.attr("translateY",this.ySetting)}}return h.emptyBBox={width:0,height:0,x:0,y:0},h.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],h})),i(e,"Core/Renderer/SVG/Symbols.js",[e["Core/Utilities.js"]],(function(t2){let{defined:e2,isNumber:i2,pick:s}=t2;function r(t3,i3,r2,o2,n2){let a=[];if(n2){let h=n2.start||0,l=s(n2.r,r2),d=s(n2.r,o2||r2),c=2e-4/(n2.borderRadius?1:Math.max(l,1)),p=Math.abs((n2.end||0)-h-2*Math.PI)<c,u=(n2.end||0)-(p?c:0),g=n2.innerR,f=s(n2.open,p),m=Math.cos(h),x=Math.sin(h),y=Math.cos(u),b=Math.sin(u),v=s(n2.longArc,u-h-Math.PI<c?0:1),S=["A",l,d,0,v,s(n2.clockwise,1),t3+l*y,i3+d*b];S.params={start:h,end:u,cx:t3,cy:i3},a.push(["M",t3+l*m,i3+d*x],S),e2(g)&&((S=["A",g,g,0,v,e2(n2.clockwise)?1-n2.clockwise:0,t3+g*m,i3+g*x]).params={start:u,end:h,cx:t3,cy:i3},a.push(f?["M",t3+g*y,i3+g*b]:["L",t3+g*y,i3+g*b],S)),f||a.push(["Z"])}return a}function o(t3,e3,i3,s2,r2){return r2&&r2.r?n(t3,e3,i3,s2,r2):[["M",t3,e3],["L",t3+i3,e3],["L",t3+i3,e3+s2],["L",t3,e3+s2],["Z"]]}function n(t3,e3,i3,s2,r2){let o2=(r2==null?void 0:r2.r)||0;return[["M",t3+o2,e3],["L",t3+i3-o2,e3],["A",o2,o2,0,0,1,t3+i3,e3+o2],["L",t3+i3,e3+s2-o2],["A",o2,o2,0,0,1,t3+i3-o2,e3+s2],["L",t3+o2,e3+s2],["A",o2,o2,0,0,1,t3,e3+s2-o2],["L",t3,e3+o2],["A",o2,o2,0,0,1,t3+o2,e3],["Z"]]}return{arc:r,callout:function(t3,e3,s2,r2,o2){let a=Math.min(o2&&o2.r||0,s2,r2),h=a+6,l=o2&&o2.anchorX,d=o2&&o2.anchorY||0,c=n(t3,e3,s2,r2,{r:a});if(!i2(l)||l<s2&&l>0&&d<r2&&d>0)return c;if(t3+l>s2-h){if(d>e3+h&&d<e3+r2-h)c.splice(3,1,["L",t3+s2,d-6],["L",t3+s2+6,d],["L",t3+s2,d+6],["L",t3+s2,e3+r2-a]);else if(l<s2){let i3=d<e3+h,o3=i3?e3:e3+r2;c.splice(i3?2:5,0,["L",l,d],["L",t3+s2-a,o3])}else c.splice(3,1,["L",t3+s2,r2/2],["L",l,d],["L",t3+s2,r2/2],["L",t3+s2,e3+r2-a])}else if(t3+l<h){if(d>e3+h&&d<e3+r2-h)c.splice(7,1,["L",t3,d+6],["L",t3-6,d],["L",t3,d-6],["L",t3,e3+a]);else if(l>0){let i3=d<e3+h,s3=i3?e3:e3+r2;c.splice(i3?1:6,0,["L",l,d],["L",t3+a,s3])}else c.splice(7,1,["L",t3,r2/2],["L",l,d],["L",t3,r2/2],["L",t3,e3+a])}else d>r2&&l<s2-h?c.splice(5,1,["L",l+6,e3+r2],["L",l,e3+r2+6],["L",l-6,e3+r2],["L",t3+a,e3+r2]):d<0&&l>h&&c.splice(1,1,["L",l-6,e3],["L",l,e3-6],["L",l+6,e3],["L",s2-a,e3]);return c},circle:function(t3,e3,i3,s2){return r(t3+i3/2,e3+s2/2,i3/2,s2/2,{start:.5*Math.PI,end:2.5*Math.PI,open:false})},diamond:function(t3,e3,i3,s2){return[["M",t3+i3/2,e3],["L",t3+i3,e3+s2/2],["L",t3+i3/2,e3+s2],["L",t3,e3+s2/2],["Z"]]},rect:o,roundedRect:n,square:o,triangle:function(t3,e3,i3,s2){return[["M",t3+i3/2,e3],["L",t3+i3,e3+s2],["L",t3,e3+s2],["Z"]]},"triangle-down":function(t3,e3,i3,s2){return[["M",t3,e3],["L",t3+i3,e3],["L",t3+i3/2,e3+s2],["Z"]]}}})),i(e,"Core/Renderer/SVG/TextBuilder.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{doc:s,SVG_NS:r,win:o}=e2,{attr:n,extend:a,fireEvent:h,isString:l,objectEach:d,pick:c}=i2;return class{constructor(t3){let e3=t3.styles;this.renderer=t3.renderer,this.svgElement=t3,this.width=t3.textWidth,this.textLineHeight=e3&&e3.lineHeight,this.textOutline=e3&&e3.textOutline,this.ellipsis=!!(e3&&"ellipsis"===e3.textOverflow),this.noWrap=!!(e3&&"nowrap"===e3.whiteSpace)}buildSVG(){let e3=this.svgElement,i3=e3.element,r2=e3.renderer,o2=c(e3.textStr,"").toString(),n2=-1!==o2.indexOf("<"),a2=i3.childNodes,h2=!e3.added&&r2.box,d2=[o2,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,e3.getStyle("font-size"),this.width].join(",");if(d2!==e3.textCache){e3.textCache=d2,delete e3.actualWidth;for(let t3=a2.length;t3--;)i3.removeChild(a2[t3]);if(n2||this.ellipsis||this.width||e3.textPath||-1!==o2.indexOf(" ")&&(!this.noWrap||/<br.*?>/g.test(o2))){if(""!==o2){h2&&h2.appendChild(i3);let s2=new t2(o2);this.modifyTree(s2.nodes),s2.addToDOM(i3),this.modifyDOM(),this.ellipsis&&-1!==(i3.textContent||"").indexOf("…")&&e3.attr("title",this.unescapeEntities(e3.textStr||"",["<",">"])),h2&&h2.removeChild(i3)}}else i3.appendChild(s.createTextNode(this.unescapeEntities(o2)));l(this.textOutline)&&e3.applyTextOutline&&e3.applyTextOutline(this.textOutline)}}modifyDOM(){let t3;let e3=this.svgElement,i3=n(e3.element,"x");for(e3.firstLineMetrics=void 0;t3=e3.element.firstChild;)if(/^[\s\u200B]*$/.test(t3.textContent||" "))e3.element.removeChild(t3);else break;[].forEach.call(e3.element.querySelectorAll("tspan.highcharts-br"),((t4,s2)=>{t4.nextSibling&&t4.previousSibling&&(0===s2&&1===t4.previousSibling.nodeType&&(e3.firstLineMetrics=e3.renderer.fontMetrics(t4.previousSibling)),n(t4,{dy:this.getLineHeight(t4.nextSibling),x:i3}))}));let a2=this.width||0;if(!a2)return;let h2=(t4,o2)=>{let h3=t4.textContent||"",l3=h3.replace(/([^\^])-/g,"$1- ").split(" "),d2=!this.noWrap&&(l3.length>1||e3.element.childNodes.length>1),c2=this.getLineHeight(o2),p=0,u=e3.actualWidth;if(this.ellipsis)h3&&this.truncate(t4,h3,void 0,0,Math.max(0,a2-.8*c2),((t5,e4)=>t5.substring(0,e4)+"…"));else if(d2){let h4=[],d3=[];for(;o2.firstChild&&o2.firstChild!==t4;)d3.push(o2.firstChild),o2.removeChild(o2.firstChild);for(;l3.length;)l3.length&&!this.noWrap&&p>0&&(h4.push(t4.textContent||""),t4.textContent=l3.join(" ").replace(/- /g,"-")),this.truncate(t4,void 0,l3,0===p&&u||0,a2,((t5,e4)=>l3.slice(0,e4).join(" ").replace(/- /g,"-"))),u=e3.actualWidth,p++;d3.forEach((e4=>{o2.insertBefore(e4,t4)})),h4.forEach((e4=>{o2.insertBefore(s.createTextNode(e4),t4);let a3=s.createElementNS(r,"tspan");a3.textContent="",n(a3,{dy:c2,x:i3}),o2.insertBefore(a3,t4)}))}},l2=t4=>{[].slice.call(t4.childNodes).forEach((i4=>{i4.nodeType===o.Node.TEXT_NODE?h2(i4,t4):(-1!==i4.className.baseVal.indexOf("highcharts-br")&&(e3.actualWidth=0),l2(i4))}))};l2(e3.element)}getLineHeight(t3){let e3=t3.nodeType===o.Node.TEXT_NODE?t3.parentElement:t3;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e3||this.svgElement.element).h}modifyTree(t3){let e3=(i3,s2)=>{let{attributes:r2={},children:o2,style:n2={},tagName:h2}=i3,l2=this.renderer.styledMode;if("b"===h2||"strong"===h2?l2?r2.class="highcharts-strong":n2.fontWeight="bold":("i"===h2||"em"===h2)&&(l2?r2.class="highcharts-emphasized":n2.fontStyle="italic"),n2&&n2.color&&(n2.fill=n2.color),"br"===h2){r2.class="highcharts-br",i3.textContent="";let e4=t3[s2+1];e4&&e4.textContent&&(e4.textContent=e4.textContent.replace(/^ +/gm,""))}else"a"===h2&&o2&&o2.some((t4=>"#text"===t4.tagName))&&(i3.children=[{children:o2,tagName:"tspan"}]);"#text"!==h2&&"a"!==h2&&(i3.tagName="tspan"),a(i3,{attributes:r2,style:n2}),o2&&o2.filter((t4=>"#text"!==t4.tagName)).forEach(e3)};t3.forEach(e3),h(this.svgElement,"afterModifyTree",{nodes:t3})}truncate(t3,e3,i3,s2,r2,o2){let n2,a2;let h2=this.svgElement,{rotation:l2}=h2,d2=[],c2=i3?1:0,p=(e3||i3||"").length,u=p,g=function(e4,r3){let o3=r3||e4,n3=t3.parentNode;if(n3&&void 0===d2[o3]&&n3.getSubStringLength)try{d2[o3]=s2+n3.getSubStringLength(0,i3?o3+1:o3)}catch(t4){}return d2[o3]};if(h2.rotation=0,s2+(a2=g(t3.textContent.length))>r2){for(;c2<=p;)u=Math.ceil((c2+p)/2),i3&&(n2=o2(i3,u)),a2=g(u,n2&&n2.length-1),c2===p?c2=p+1:a2>r2?p=u-1:c2=u;0===p?t3.textContent="":e3&&p===e3.length-1||(t3.textContent=n2||o2(e3||i3,u))}i3&&i3.splice(0,u),h2.actualWidth=a2,h2.rotation=l2}unescapeEntities(t3,e3){return d(this.renderer.escapes,(function(i3,s2){e3&&-1!==e3.indexOf(i3)||(t3=t3.toString().replace(RegExp(i3,"g"),s2))})),t3}}})),i(e,"Core/Renderer/SVG/SVGRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Defaults.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Renderer/SVG/TextBuilder.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n,a,h,l){let d;let{defaultOptions:c}=e2,{charts:p,deg2rad:u,doc:g,isFirefox:f,isMS:m,isWebKit:x,noop:y,SVG_NS:b,symbolSizes:v,win:S}=s,{addEvent:C,attr:k,createElement:M,crisp:w2,css:T,defined:A,destroyObjectProperties:P,extend:L,isArray:O,isNumber:D,isObject:E,isString:I,merge:j,pick:B,pInt:R,replaceNested:z,uniqueKey:N}=l;class W{constructor(t3,e3,i3,s2,r2,o2,n2){let a2,h2;let l2=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),d2=l2.element;n2||l2.css(this.getStyle(s2||{})),t3.appendChild(d2),k(t3,"dir","ltr"),-1===t3.innerHTML.indexOf("xmlns")&&k(d2,"xmlns",this.SVG_NS),this.box=d2,this.boxWrapper=l2,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highcharts 11.4.8")),this.defs=this.createElement("defs").add(),this.allowHTML=o2,this.forExport=r2,this.styledMode=n2,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=l2.getStyle("font-size"),this.setSize(e3,i3,false),f&&t3.getBoundingClientRect&&((a2=function(){T(t3,{left:0,top:0}),h2=t3.getBoundingClientRect(),T(t3,{left:Math.ceil(h2.left)-h2.left+"px",top:Math.ceil(h2.top)-h2.top+"px"})})(),this.unSubPixelFix=C(S,"resize",a2))}definition(e3){return new t2([e3]).addToDOM(this.defs.element)}getReferenceURL(){if((f||x)&&g.getElementsByTagName("base").length){if(!A(d)){let e3=N(),i3=new t2([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:e3},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${e3})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(g.body);T(i3,{position:"fixed",top:0,left:0,zIndex:9e5});let s2=g.elementFromPoint(6,6);d="hitme"===(s2&&s2.id),g.body.removeChild(i3)}if(d)return z(S.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(t3){return this.style=L({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},t3),this.style}setStyle(t3){this.boxWrapper.css(this.getStyle(t3))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let t3=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),P(this.gradients||{}),this.gradients=null,this.defs=t3.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(t3){return new this.Element(this,t3)}getRadialAttr(t3,e3){return{cx:t3[0]-t3[2]/2+(e3.cx||0)*t3[2],cy:t3[1]-t3[2]/2+(e3.cy||0)*t3[2],r:(e3.r||0)*t3[2]}}shadowDefinition(t3){let e3=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(t3).map((e4=>`${e4}-${t3[e4]}`))].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),i3=j({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t3);return this.defs.element.querySelector(`#${e3}`)||this.definition({tagName:"filter",attributes:{id:e3,filterUnits:i3.filterUnits},children:this.getShadowFilterContent(i3)}),e3}getShadowFilterContent(t3){return[{tagName:"feDropShadow",attributes:{dx:t3.offsetX,dy:t3.offsetY,"flood-color":t3.color,"flood-opacity":Math.min(5*t3.opacity,1),stdDeviation:t3.width/2}}]}buildText(t3){new h(t3).buildSVG()}getContrast(t3){let e3=i2.parse(t3).rgba.map((t4=>{let e4=t4/255;return e4<=.03928?e4/12.92:Math.pow((e4+.055)/1.055,2.4)})),s2=.2126*e3[0]+.7152*e3[1]+.0722*e3[2];return 1.05/(s2+.05)>(s2+.05)/.05?"#FFFFFF":"#000000"}button(e3,i3,s2,r2,o2={},n2,a2,h2,l2,d2){let p2=this.label(e3,i3,s2,l2,void 0,void 0,d2,void 0,"button"),u2=this.styledMode,g2=arguments,f2=0;o2=j(c.global.buttonTheme,o2),u2&&(delete o2.fill,delete o2.stroke,delete o2["stroke-width"]);let x2=o2.states||{},y2=o2.style||{};delete o2.states,delete o2.style;let b2=[t2.filterUserAttributes(o2)],v2=[y2];return u2||["hover","select","disabled"].forEach(((e4,i4)=>{b2.push(j(b2[0],t2.filterUserAttributes(g2[i4+5]||x2[e4]||{}))),v2.push(b2[i4+1].style),delete b2[i4+1].style})),C(p2.element,m?"mouseover":"mouseenter",(function(){3!==f2&&p2.setState(1)})),C(p2.element,m?"mouseout":"mouseleave",(function(){3!==f2&&p2.setState(f2)})),p2.setState=(t3=0)=>{if(1!==t3&&(p2.state=f2=t3),p2.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t3]),!u2){p2.attr(b2[t3]);let e4=v2[t3];E(e4)&&p2.css(e4)}},p2.attr(b2[0]),!u2&&(p2.css(L({cursor:"default"},y2)),d2&&p2.text.css({pointerEvents:"none"})),p2.on("touchstart",(t3=>t3.stopPropagation())).on("click",(function(t3){3!==f2&&r2.call(p2,t3)}))}crispLine(t3,e3){let[i3,s2]=t3;return A(i3[1])&&i3[1]===s2[1]&&(i3[1]=s2[1]=w2(i3[1],e3)),A(i3[2])&&i3[2]===s2[2]&&(i3[2]=s2[2]=w2(i3[2],e3)),t3}path(t3){let e3=this.styledMode?{}:{fill:"none"};return O(t3)?e3.d=t3:E(t3)&&L(e3,t3),this.createElement("path").attr(e3)}circle(t3,e3,i3){let s2=E(t3)?t3:void 0===t3?{}:{x:t3,y:e3,r:i3},r2=this.createElement("circle");return r2.xSetter=r2.ySetter=function(t4,e4,i4){i4.setAttribute("c"+e4,t4)},r2.attr(s2)}arc(t3,e3,i3,s2,r2,o2){let n2;E(t3)?(e3=(n2=t3).y,i3=n2.r,s2=n2.innerR,r2=n2.start,o2=n2.end,t3=n2.x):n2={innerR:s2,start:r2,end:o2};let a2=this.symbol("arc",t3,e3,i3,i3,n2);return a2.r=i3,a2}rect(t3,e3,i3,s2,r2,o2){let n2=E(t3)?t3:void 0===t3?{}:{x:t3,y:e3,r:r2,width:Math.max(i3||0,0),height:Math.max(s2||0,0)},a2=this.createElement("rect");return this.styledMode||(void 0!==o2&&(n2["stroke-width"]=o2,L(n2,a2.crisp(n2))),n2.fill="none"),a2.rSetter=function(t4,e4,i4){a2.r=t4,k(i4,{rx:t4,ry:t4})},a2.rGetter=function(){return a2.r||0},a2.attr(n2)}roundedRect(t3){return this.symbol("roundedRect").attr(t3)}setSize(t3,e3,i3){this.width=t3,this.height=e3,this.boxWrapper.animate({width:t3,height:e3},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:B(i3,true)?void 0:0}),this.alignElements()}g(t3){let e3=this.createElement("g");return t3?e3.attr({class:"highcharts-"+t3}):e3}image(t3,e3,i3,s2,r2,o2){let n2={preserveAspectRatio:"none"};D(e3)&&(n2.x=e3),D(i3)&&(n2.y=i3),D(s2)&&(n2.width=s2),D(r2)&&(n2.height=r2);let a2=this.createElement("image").attr(n2),h2=function(e4){a2.attr({href:t3}),o2.call(a2,e4)};if(o2){a2.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let e4=new S.Image;C(e4,"load",h2),e4.src=t3,e4.complete&&h2({})}else a2.attr({href:t3});return a2}symbol(t3,e3,i3,s2,r2,o2){let n2,a2,h2,l2;let d2=this,c2=/^url\((.*?)\)$/,u2=c2.test(t3),f2=!u2&&(this.symbols[t3]?t3:"circle"),m2=f2&&this.symbols[f2];if(m2)"number"==typeof e3&&(a2=m2.call(this.symbols,e3||0,i3||0,s2||0,r2||0,o2)),n2=this.path(a2),d2.styledMode||n2.attr("fill","none"),L(n2,{symbolName:f2||void 0,x:e3,y:i3,width:s2,height:r2}),o2&&L(n2,o2);else if(u2){h2=t3.match(c2)[1];let s3=n2=this.image(h2);s3.imgwidth=B(o2&&o2.width,v[h2]&&v[h2].width),s3.imgheight=B(o2&&o2.height,v[h2]&&v[h2].height),l2=t4=>t4.attr({width:t4.width,height:t4.height}),["width","height"].forEach((t4=>{s3[`${t4}Setter`]=function(t5,e4){this[e4]=t5;let{alignByTranslate:i4,element:s4,width:r3,height:n3,imgwidth:a3,imgheight:h3}=this,l3="width"===e4?a3:h3,d3=1;o2&&"within"===o2.backgroundSize&&r3&&n3&&a3&&h3?(d3=Math.min(r3/a3,n3/h3),k(s4,{width:Math.round(a3*d3),height:Math.round(h3*d3)})):s4&&l3&&s4.setAttribute(e4,l3),!i4&&a3&&h3&&this.translate(((r3||0)-a3*d3)/2,((n3||0)-h3*d3)/2)}})),A(e3)&&s3.attr({x:e3,y:i3}),s3.isImg=true,s3.symbolUrl=t3,A(s3.imgwidth)&&A(s3.imgheight)?l2(s3):(s3.attr({width:0,height:0}),M("img",{onload:function(){let t4=p[d2.chartIndex];0===this.width&&(T(this,{position:"absolute",top:"-999em"}),g.body.appendChild(this)),v[h2]={width:this.width,height:this.height},s3.imgwidth=this.width,s3.imgheight=this.height,s3.element&&l2(s3),this.parentNode&&this.parentNode.removeChild(this),d2.imgCount--,d2.imgCount||!t4||t4.hasLoaded||t4.onload()},src:h2}),this.imgCount++)}return n2}clipRect(t3,e3,i3,s2){return this.rect(t3,e3,i3,s2,0)}text(t3,e3,i3,s2){let r2={};if(s2&&(this.allowHTML||!this.forExport))return this.html(t3,e3,i3);r2.x=Math.round(e3||0),i3&&(r2.y=Math.round(i3)),A(t3)&&(r2.text=t3);let o2=this.createElement("text").attr(r2);return s2&&(!this.forExport||this.allowHTML)||(o2.xSetter=function(t4,e4,i4){let s3=i4.getElementsByTagName("tspan"),r3=i4.getAttribute(e4);for(let i5=0,o3;i5<s3.length;i5++)(o3=s3[i5]).getAttribute(e4)===r3&&o3.setAttribute(e4,t4);i4.setAttribute(e4,t4)}),o2}fontMetrics(t3){let e3=R(o.prototype.getStyle.call(t3,"font-size")||0),i3=e3<24?e3+3:Math.round(1.2*e3),s2=Math.round(.8*i3);return{h:i3,b:s2,f:e3}}rotCorr(t3,e3,i3){let s2=t3;return e3&&i3&&(s2=Math.max(s2*Math.cos(e3*u),4)),{x:-t3/3*Math.sin(e3*u),y:s2}}pathToSegments(t3){let e3=[],i3=[],s2={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let r2=0;r2<t3.length;r2++)I(i3[0])&&D(t3[r2])&&i3.length===s2[i3[0].toUpperCase()]&&t3.splice(r2,0,i3[0].replace("M","L").replace("m","l")),"string"==typeof t3[r2]&&(i3.length&&e3.push(i3.slice(0)),i3.length=0),i3.push(t3[r2]);return e3.push(i3.slice(0)),e3}label(t3,e3,i3,s2,r2,o2,a2,h2,l2){return new n(this,t3,e3,i3,s2,r2,o2,a2,h2,l2)}alignElements(){this.alignedObjects.forEach((t3=>t3.align()))}}return L(W.prototype,{Element:o,SVG_NS:b,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:a,draw:y}),r.registerRendererType("svg",W,true),W})),i(e,"Core/Renderer/HTML/HTMLElement.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{composed:r}=e2,{attr:o,css:n,createElement:a,defined:h,extend:l,pInt:d,pushUnique:c}=s;function p(t3,e3,s2){var _a;let r2=((_a=this.div)==null?void 0:_a.style)||s2.style;i2.prototype[`${e3}Setter`].call(this,t3,e3,s2),r2&&(r2[e3]=t3)}let u=(t3,e3)=>{var _a;if(!t3.div){let s2=o(t3.element,"class"),r2=t3.css,n2=a("div",s2?{className:s2}:void 0,{position:"absolute",left:`${t3.translateX||0}px`,top:`${t3.translateY||0}px`,...t3.styles,display:t3.display,opacity:t3.opacity,visibility:t3.visibility},((_a=t3.parentGroup)==null?void 0:_a.div)||e3);t3.classSetter=(t4,e4,i3)=>{i3.setAttribute("class",t4),n2.className=t4},t3.translateXSetter=t3.translateYSetter=(e4,i3)=>{t3[i3]=e4,n2.style["translateX"===i3?"left":"top"]=`${e4}px`,t3.doTransform=true},t3.opacitySetter=t3.visibilitySetter=p,t3.css=e4=>(r2.call(t3,e4),e4.cursor&&(n2.style.cursor=e4.cursor),e4.pointerEvents&&(n2.style.pointerEvents=e4.pointerEvents),t3),t3.on=function(){return i2.prototype.on.apply({element:n2,onEvents:t3.onEvents},arguments),t3},t3.div=n2}return t3.div};class g extends i2{static compose(t3){c(r,this.compose)&&(t3.prototype.html=function(t4,e3,i3){return new g(this,"span").attr({text:t4,x:Math.round(e3),y:Math.round(i3)})})}constructor(t3,e3){super(t3,e3),this.css({position:"absolute",...t3.styledMode?{}:{fontFamily:t3.style.fontFamily,fontSize:t3.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(t3,e3,i3){this.xCorr=-t3*i3,this.yCorr=-e3}css(t3){let e3;let{element:i3}=this,s2="SPAN"===i3.tagName&&t3&&"width"in t3,r2=s2&&t3.width;return s2&&(delete t3.width,this.textWidth=d(r2)||void 0,e3=true),(t3==null?void 0:t3.textOverflow)==="ellipsis"&&(t3.whiteSpace="nowrap",t3.overflow="hidden"),l(this.styles,t3),n(i3,t3),e3&&this.updateTransform(),this}htmlGetBBox(){let{element:t3}=this;return{x:t3.offsetLeft,y:t3.offsetTop,width:t3.offsetWidth,height:t3.offsetHeight}}updateTransform(){var _a;if(!this.added){this.alignOnAdd=true;return}let{element:t3,renderer:e3,rotation:i3,rotationOriginX:s2,rotationOriginY:r2,styles:o2,textAlign:a2="left",textWidth:l2,translateX:d2=0,translateY:c2=0,x:p2=0,y:u2=0}=this,g2={left:0,center:.5,right:1}[a2],f2=o2.whiteSpace;if(n(t3,{marginLeft:`${d2}px`,marginTop:`${c2}px`}),"SPAN"===t3.tagName){let o3=[i3,a2,t3.innerHTML,l2,this.textAlign].join(","),d3=-(((_a=this.parentGroup)==null?void 0:_a.padding)*1)||0,c3,m=false;if(l2!==this.oldTextWidth){let e4=this.textPxLength?this.textPxLength:(n(t3,{width:"",whiteSpace:f2||"nowrap"}),t3.offsetWidth),s3=l2||0;(s3>this.oldTextWidth||e4>s3)&&(/[ \-]/.test(t3.textContent||t3.innerText)||"ellipsis"===t3.style.textOverflow)&&(n(t3,{width:e4>s3||i3?l2+"px":"auto",display:"block",whiteSpace:f2||"normal"}),this.oldTextWidth=l2,m=true)}this.hasBoxWidthChanged=m,o3!==this.cTT&&(c3=e3.fontMetrics(t3).b,h(i3)&&(i3!==(this.oldRotation||0)||a2!==this.oldAlign)&&this.setSpanRotation(i3,d3,d3),this.getSpanCorrection(!h(i3)&&this.textPxLength||t3.offsetWidth,c3,g2));let{xCorr:x=0,yCorr:y=0}=this,b=(s2??p2)-x-p2-d3,v=(r2??u2)-y-u2-d3;n(t3,{left:`${p2+x}px`,top:`${u2+y}px`,transformOrigin:`${b}px ${v}px`}),this.cTT=o3,this.oldRotation=i3,this.oldAlign=a2}}setSpanRotation(t3,e3,i3){n(this.element,{transform:`rotate(${t3}deg)`,transformOrigin:`${e3}% ${i3}px`})}add(t3){let e3;let i3=this.renderer.box.parentNode,s2=[];if(this.parentGroup=t3,t3&&!(e3=t3.div)){let r2=t3;for(;r2;)s2.push(r2),r2=r2.parentGroup;for(let t4 of s2.reverse())e3=u(t4,i3)}return(e3||i3).appendChild(this.element),this.added=true,this.alignOnAdd&&this.updateTransform(),this}textSetter(e3){e3!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t2.setElementHTML(this.element,e3??""),this.textStr=e3,this.doTransform=true)}alignSetter(t3){this.alignValue=this.textAlign=t3,this.doTransform=true}xSetter(t3,e3){this[e3]=t3,this.doTransform=true}}let f=g.prototype;return f.visibilitySetter=f.opacitySetter=p,f.ySetter=f.rotationSetter=f.rotationOriginXSetter=f.rotationOriginYSetter=f.xSetter,g})),i(e,"Core/Axis/AxisDefaults.js",[],(function(){var t2,e2;return(e2=t2||(t2={})).xAxis={alignTicks:true,allowDecimals:void 0,panningEnabled:true,zIndex:2,zoomEnabled:true,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:false},second:{main:"%H:%M:%S",range:false},minute:{main:"%H:%M",range:false},hour:{main:"%H:%M",range:false},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:false,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:true,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:false,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:false,showEmpty:true,showFirstLabel:true,showLastLabel:true,startOfWeek:1,startOnTick:false,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:false,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:true,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},e2.yAxis={reversedStacks:true,endOnTick:true,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:true,labels:{x:void 0},startOnTick:true,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:false,enabled:false,crop:true,overflow:"justify",formatter:function(){let{numberFormatter:t3}=this.axis.chart;return t3(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},t2})),i(e,"Core/Foundation.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{addEvent:i2,isFunction:s,objectEach:r,removeEvent:o}=t2;return(e2||(e2={})).registerEventOptions=function(t3,e3){t3.eventOptions=t3.eventOptions||{},r(e3.events,(function(e4,r2){t3.eventOptions[r2]!==e4&&(t3.eventOptions[r2]&&(o(t3,r2,t3.eventOptions[r2]),delete t3.eventOptions[r2]),s(e4)&&(t3.eventOptions[r2]=e4,i2(t3,r2,e4,{order:0})))}))},e2})),i(e,"Core/Axis/Tick.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{deg2rad:s}=e2,{clamp:r,correctFloat:o,defined:n,destroyObjectProperties:a,extend:h,fireEvent:l,isNumber:d,merge:c,objectEach:p,pick:u}=i2;return class{constructor(t3,e3,i3,s2,r2){this.isNew=true,this.isNewLabel=true,this.axis=t3,this.pos=e3,this.type=i3||"",this.parameters=r2||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,l(this,"init"),i3||s2||this.addLabel()}addLabel(){let e3=this,i3=e3.axis,s2=i3.options,r2=i3.chart,a2=i3.categories,c2=i3.logarithmic,p2=i3.names,g=e3.pos,f=u(e3.options&&e3.options.labels,s2.labels),m=i3.tickPositions,x=g===m[0],y=g===m[m.length-1],b=(!f.step||1===f.step)&&1===i3.tickInterval,v=m.info,S=e3.label,C,k,M,w2=this.parameters.category||(a2?u(a2[g],p2[g],g):g);c2&&d(w2)&&(w2=o(c2.lin2log(w2))),i3.dateTime&&(v?C=(k=r2.time.resolveDTLFormat(s2.dateTimeLabelFormats[!s2.grid&&v.higherRanks[g]||v.unitName])).main:d(w2)&&(C=i3.dateTime.getXDateFormat(w2,s2.dateTimeLabelFormats||{}))),e3.isFirst=x,e3.isLast=y;let T={axis:i3,chart:r2,dateTimeLabelFormat:C,isFirst:x,isLast:y,pos:g,tick:e3,tickPositionInfo:v,value:w2};l(this,"labelFormat",T);let A=e4=>f.formatter?f.formatter.call(e4,e4):f.format?(e4.text=i3.defaultLabelFormatter.call(e4),t2.format(f.format,e4,r2)):i3.defaultLabelFormatter.call(e4),P=A.call(T,T),L=k&&k.list;L?e3.shortenLabel=function(){for(M=0;M<L.length;M++)if(h(T,{dateTimeLabelFormat:L[M]}),S.attr({text:A.call(T,T)}),S.getBBox().width<i3.getSlotWidth(e3)-2*(f.padding||0))return;S.attr({text:""})}:e3.shortenLabel=void 0,b&&i3._addedPlotLB&&e3.moveLabel(P,f),n(S)||e3.movedLabel?S&&S.textStr!==P&&!b&&(!S.textWidth||f.style.width||S.styles.width||S.css({width:null}),S.attr({text:P}),S.textPxLength=S.getBBox().width):(e3.label=S=e3.createLabel(P,f),e3.rotation=0)}createLabel(t3,e3,i3){let s2=this.axis,r2=s2.chart,o2=n(t3)&&e3.enabled?r2.renderer.text(t3,i3==null?void 0:i3.x,i3==null?void 0:i3.y,e3.useHTML).add(s2.labelGroup):void 0;return o2&&(r2.styledMode||o2.css(c(e3.style)),o2.textPxLength=o2.getBBox().width),o2}destroy(){a(this,this.axis)}getPosition(t3,e3,i3,s2){let n2=this.axis,a2=n2.chart,h2=s2&&a2.oldChartHeight||a2.chartHeight,d2={x:t3?o(n2.translate(e3+i3,void 0,void 0,s2)+n2.transB):n2.left+n2.offset+(n2.opposite?(s2&&a2.oldChartWidth||a2.chartWidth)-n2.right-n2.left:0),y:t3?h2-n2.bottom+n2.offset-(n2.opposite?n2.height:0):o(h2-n2.translate(e3+i3,void 0,void 0,s2)-n2.transB)};return d2.y=r(d2.y,-1e9,1e9),l(this,"afterGetPosition",{pos:d2}),d2}getLabelPosition(t3,e3,i3,r2,o2,a2,h2,d2){let c2,p2;let g=this.axis,f=g.transA,m=g.isLinked&&g.linkedParent?g.linkedParent.reversed:g.reversed,x=g.staggerLines,y=g.tickRotCorr||{x:0,y:0},b=r2||g.reserveSpaceDefault?0:-g.labelOffset*("center"===g.labelAlign?.5:1),v=o2.distance,S={};return c2=0===g.side?i3.rotation?-v:-i3.getBBox().height:2===g.side?y.y+v:Math.cos(i3.rotation*s)*(y.y-i3.getBBox(false,0).height/2),n(o2.y)&&(c2=0===g.side&&g.horiz?o2.y+c2:o2.y),t3=t3+u(o2.x,[0,1,0,-1][g.side]*v)+b+y.x-(a2&&r2?a2*f*(m?-1:1):0),e3=e3+c2-(a2&&!r2?a2*f*(m?1:-1):0),x&&(p2=h2/(d2||1)%x,g.opposite&&(p2=x-p2-1),e3+=p2*(g.labelOffset/x)),S.x=t3,S.y=Math.round(e3),l(this,"afterGetLabelPosition",{pos:S,tickmarkOffset:a2,index:h2}),S}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(t3,e3,i3,s2,r2=false,o2){return o2.crispLine([["M",t3,e3],["L",t3+(r2?0:-i3),e3+(r2?i3:0)]],s2)}handleOverflow(t3){let e3=this.axis,i3=e3.options.labels,r2=t3.x,o2=e3.chart.chartWidth,n2=e3.chart.spacing,a2=u(e3.labelLeft,Math.min(e3.pos,n2[3])),h2=u(e3.labelRight,Math.max(e3.isRadial?0:e3.pos+e3.len,o2-n2[1])),l2=this.label,d2=this.rotation,c2={left:0,center:.5,right:1}[e3.labelAlign||l2.attr("align")],p2=l2.getBBox().width,g=e3.getSlotWidth(this),f={},m=g,x=1,y,b,v;d2||"justify"!==i3.overflow?d2<0&&r2-c2*p2<a2?v=Math.round(r2/Math.cos(d2*s)-a2):d2>0&&r2+c2*p2>h2&&(v=Math.round((o2-r2)/Math.cos(d2*s))):(y=r2-c2*p2,b=r2+(1-c2)*p2,y<a2?m=t3.x+m*(1-c2)-a2:b>h2&&(m=h2-t3.x+m*c2,x=-1),(m=Math.min(g,m))<g&&"center"===e3.labelAlign&&(t3.x+=x*(g-m-c2*(g-Math.min(p2,m)))),(p2>m||e3.autoRotation&&(l2.styles||{}).width)&&(v=m)),v&&(this.shortenLabel?this.shortenLabel():(f.width=Math.floor(v)+"px",(i3.style||{}).textOverflow||(f.textOverflow="ellipsis"),l2.css(f)))}moveLabel(t3,e3){let i3=this,s2=i3.label,r2=i3.axis,o2=false,n2;s2&&s2.textStr===t3?(i3.movedLabel=s2,o2=true,delete i3.label):p(r2.ticks,(function(e4){o2||e4.isNew||e4===i3||!e4.label||e4.label.textStr!==t3||(i3.movedLabel=e4.label,o2=true,e4.labelPos=i3.movedLabel.xy,delete e4.label)})),!o2&&(i3.labelPos||s2)&&(n2=i3.labelPos||s2.xy,i3.movedLabel=i3.createLabel(t3,e3,n2),i3.movedLabel&&i3.movedLabel.attr({opacity:0}))}render(t3,e3,i3){let s2=this.axis,r2=s2.horiz,n2=this.pos,a2=u(this.tickmarkOffset,s2.tickmarkOffset),h2=this.getPosition(r2,n2,a2,e3),d2=h2.x,c2=h2.y,p2=s2.pos,g=p2+s2.len,f=r2?d2:c2;!s2.chart.polar&&this.isNew&&(o(f)<p2||f>g)&&(i3=0);let m=u(i3,this.label&&this.label.newOpacity,1);i3=u(i3,1),this.isActive=true,this.renderGridLine(e3,i3),this.renderMark(h2,i3),this.renderLabel(h2,e3,m,t3),this.isNew=false,l(this,"afterRender")}renderGridLine(t3,e3){let i3=this.axis,s2=i3.options,r2={},o2=this.pos,n2=this.type,a2=u(this.tickmarkOffset,i3.tickmarkOffset),h2=i3.chart.renderer,l2=this.gridLine,d2,c2=s2.gridLineWidth,p2=s2.gridLineColor,g=s2.gridLineDashStyle;"minor"===this.type&&(c2=s2.minorGridLineWidth,p2=s2.minorGridLineColor,g=s2.minorGridLineDashStyle),l2||(i3.chart.styledMode||(r2.stroke=p2,r2["stroke-width"]=c2||0,r2.dashstyle=g),n2||(r2.zIndex=1),t3&&(e3=0),this.gridLine=l2=h2.path().attr(r2).addClass("highcharts-"+(n2?n2+"-":"")+"grid-line").add(i3.gridGroup)),l2&&(d2=i3.getPlotLinePath({value:o2+a2,lineWidth:l2.strokeWidth(),force:"pass",old:t3,acrossPanes:false}))&&l2[t3||this.isNew?"attr":"animate"]({d:d2,opacity:e3})}renderMark(t3,e3){let i3=this.axis,s2=i3.options,r2=i3.chart.renderer,o2=this.type,n2=i3.tickSize(o2?o2+"Tick":"tick"),a2=t3.x,h2=t3.y,l2=u(s2["minor"!==o2?"tickWidth":"minorTickWidth"],!o2&&i3.isXAxis?1:0),d2=s2["minor"!==o2?"tickColor":"minorTickColor"],c2=this.mark,p2=!c2;n2&&(i3.opposite&&(n2[0]=-n2[0]),c2||(this.mark=c2=r2.path().addClass("highcharts-"+(o2?o2+"-":"")+"tick").add(i3.axisGroup),i3.chart.styledMode||c2.attr({stroke:d2,"stroke-width":l2})),c2[p2?"attr":"animate"]({d:this.getMarkPath(a2,h2,n2[0],c2.strokeWidth(),i3.horiz,r2),opacity:e3}))}renderLabel(t3,e3,i3,s2){let r2=this.axis,o2=r2.horiz,n2=r2.options,a2=this.label,h2=n2.labels,l2=h2.step,c2=u(this.tickmarkOffset,r2.tickmarkOffset),p2=t3.x,g=t3.y,f=true;a2&&d(p2)&&(a2.xy=t3=this.getLabelPosition(p2,g,a2,o2,h2,c2,s2,l2),(!this.isFirst||this.isLast||n2.showFirstLabel)&&(!this.isLast||this.isFirst||n2.showLastLabel)?!o2||h2.step||h2.rotation||e3||0===i3||this.handleOverflow(t3):f=false,l2&&s2%l2&&(f=false),f&&d(t3.y)?(t3.opacity=i3,a2[this.isNewLabel?"attr":"animate"](t3).show(true),this.isNewLabel=false):(a2.hide(),this.isNewLabel=true))}replaceMovedLabel(){let t3=this.label,e3=this.axis;t3&&!this.isNew&&(t3.animate({opacity:0},void 0,t3.destroy),delete this.label),e3.isDirty=true,this.label=this.movedLabel,delete this.movedLabel}}})),i(e,"Core/Axis/Axis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/AxisDefaults.js"],e["Core/Color/Color.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n,a){let{animObject:h}=t2,{xAxis:l,yAxis:d}=e2,{defaultOptions:c}=s,{registerEventOptions:p}=r,{deg2rad:u}=o,{arrayMax:g,arrayMin:f,clamp:m,correctFloat:x,defined:y,destroyObjectProperties:b,erase:v,error:S,extend:C,fireEvent:k,getClosestDistance:M,insertItem:w2,isArray:T,isNumber:A,isString:P,merge:L,normalizeTickInterval:O,objectEach:D,pick:E,relativeLength:I,removeEvent:j,splat:B,syncTimeout:R}=a,z=(t3,e3)=>O(e3,void 0,void 0,E(t3.options.allowDecimals,e3<.5||void 0!==t3.tickAmount),!!t3.tickAmount);C(c,{xAxis:l,yAxis:L(l,d)});class N{constructor(t3,e3,i3){this.init(t3,e3,i3)}init(t3,e3,i3=this.coll){let s2="xAxis"===i3,r2=this.isZAxis||(t3.inverted?!s2:s2);this.chart=t3,this.horiz=r2,this.isXAxis=s2,this.coll=i3,k(this,"init",{userOptions:e3}),this.opposite=E(e3.opposite,this.opposite),this.side=E(e3.side,this.side,r2?this.opposite?0:2:this.opposite?1:3),this.setOptions(e3);let o2=this.options,n2=o2.labels;this.type??(this.type=o2.type||"linear"),this.uniqueNames??(this.uniqueNames=o2.uniqueNames??true),k(this,"afterSetType"),this.userOptions=e3,this.minPixelPadding=0,this.reversed=E(o2.reversed,this.reversed),this.visible=o2.visible,this.zoomEnabled=o2.zoomEnabled,this.hasNames="category"===this.type||true===o2.categories,this.categories=T(o2.categories)&&o2.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=y(o2.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=o2.minRange||o2.maxZoom,this.range=o2.range,this.offset=o2.offset||0,this.max=void 0,this.min=void 0;let a2=E(o2.crosshair,B(t3.options.tooltip.crosshairs)[s2?0:1]);this.crosshair=true===a2?{}:a2,-1===t3.axes.indexOf(this)&&(s2?t3.axes.splice(t3.xAxis.length,0,this):t3.axes.push(this),w2(this,t3[this.coll])),t3.orderItems(this.coll),this.series=this.series||[],t3.inverted&&!this.isZAxis&&s2&&!y(this.reversed)&&(this.reversed=true),this.labelRotation=A(n2.rotation)?n2.rotation:void 0,p(this,o2),k(this,"afterInit")}setOptions(t3){let e3=this.horiz?{labels:{autoRotation:[-45],padding:4},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=L(e3,c[this.coll],t3),k(this,"afterSetOptions",{userOptions:t3})}defaultLabelFormatter(){let t3=this.axis,{numberFormatter:e3}=this.chart,i3=A(this.value)?this.value:NaN,s2=t3.chart.time,r2=t3.categories,o2=this.dateTimeLabelFormat,n2=c.lang,a2=n2.numericSymbols,h2=n2.numericSymbolMagnitude||1e3,l2=t3.logarithmic?Math.abs(i3):t3.tickInterval,d2=a2&&a2.length,p2,u2;if(r2)u2=`${this.value}`;else if(o2)u2=s2.dateFormat(o2,i3);else if(d2&&a2&&l2>=1e3)for(;d2--&&void 0===u2;)l2>=(p2=Math.pow(h2,d2+1))&&10*i3%p2==0&&null!==a2[d2]&&0!==i3&&(u2=e3(i3/p2,-1)+a2[d2]);return void 0===u2&&(u2=Math.abs(i3)>=1e4?e3(i3,-1):e3(i3,-1,void 0,"")),u2}getSeriesExtremes(){let t3;let e3=this;k(this,"getSeriesExtremes",null,(function(){e3.hasVisibleSeries=false,e3.dataMin=e3.dataMax=e3.threshold=void 0,e3.softThreshold=!e3.isXAxis,e3.series.forEach((i3=>{if(i3.reserveSpace()){let s2=i3.options,r2,o2=s2.threshold,n2,a2;if(e3.hasVisibleSeries=true,e3.positiveValuesOnly&&0>=(o2||0)&&(o2=void 0),e3.isXAxis)(r2=i3.xData)&&r2.length&&(r2=e3.logarithmic?r2.filter((t4=>t4>0)):r2,n2=(t3=i3.getXExtremes(r2)).min,a2=t3.max,A(n2)||n2 instanceof Date||(r2=r2.filter(A),n2=(t3=i3.getXExtremes(r2)).min,a2=t3.max),r2.length&&(e3.dataMin=Math.min(E(e3.dataMin,n2),n2),e3.dataMax=Math.max(E(e3.dataMax,a2),a2)));else{let t4=i3.applyExtremes();A(t4.dataMin)&&(n2=t4.dataMin,e3.dataMin=Math.min(E(e3.dataMin,n2),n2)),A(t4.dataMax)&&(a2=t4.dataMax,e3.dataMax=Math.max(E(e3.dataMax,a2),a2)),y(o2)&&(e3.threshold=o2),(!s2.softThreshold||e3.positiveValuesOnly)&&(e3.softThreshold=false)}}}))})),k(this,"afterGetSeriesExtremes")}translate(t3,e3,i3,s2,r2,o2){var _a;let n2=this.linkedParent||this,a2=s2&&n2.old?n2.old.min:n2.min;if(!A(a2))return NaN;let h2=n2.minPixelPadding,l2=(n2.isOrdinal||((_a=n2.brokenAxis)==null?void 0:_a.hasBreaks)||n2.logarithmic&&r2)&&n2.lin2val,d2=1,c2=0,p2=s2&&n2.old?n2.old.transA:n2.transA,u2=0;return p2||(p2=n2.transA),i3&&(d2*=-1,c2=n2.len),n2.reversed&&(d2*=-1,c2-=d2*(n2.sector||n2.len)),e3?(u2=(t3=t3*d2+c2-h2)/p2+a2,l2&&(u2=n2.lin2val(u2))):(l2&&(t3=n2.val2lin(t3)),u2=d2*(t3-a2)*p2+c2+d2*h2+(A(o2)?p2*o2:0),n2.isRadial||(u2=x(u2))),u2}toPixels(t3,e3){return this.translate(t3,false,!this.horiz,void 0,true)+(e3?0:this.pos)}toValue(t3,e3){return this.translate(t3-(e3?0:this.pos),true,!this.horiz,void 0,true)}getPlotLinePath(t3){let e3=this,i3=e3.chart,s2=e3.left,r2=e3.top,o2=t3.old,n2=t3.value,a2=t3.lineWidth,h2=o2&&i3.oldChartHeight||i3.chartHeight,l2=o2&&i3.oldChartWidth||i3.chartWidth,d2=e3.transB,c2=t3.translatedValue,p2=t3.force,u2,g2,f2,x2,y2;function b2(t4,e4,i4){return"pass"!==p2&&(t4<e4||t4>i4)&&(p2?t4=m(t4,e4,i4):y2=true),t4}let v2={value:n2,lineWidth:a2,old:o2,force:p2,acrossPanes:t3.acrossPanes,translatedValue:c2};return k(this,"getPlotLinePath",v2,(function(t4){u2=f2=(c2=m(c2=E(c2,e3.translate(n2,void 0,void 0,o2)),-1e9,1e9))+d2,g2=x2=h2-c2-d2,A(c2)?e3.horiz?(g2=r2,x2=h2-e3.bottom+(e3.options.isInternal?0:i3.scrollablePixelsY||0),u2=f2=b2(u2,s2,s2+e3.width)):(u2=s2,f2=l2-e3.right+(i3.scrollablePixelsX||0),g2=x2=b2(g2,r2,r2+e3.height)):(y2=true,p2=false),t4.path=y2&&!p2?void 0:i3.renderer.crispLine([["M",u2,g2],["L",f2,x2]],a2||1)})),v2.path}getLinearTickPositions(t3,e3,i3){let s2,r2,o2;let n2=x(Math.floor(e3/t3)*t3),a2=x(Math.ceil(i3/t3)*t3),h2=[];if(x(n2+t3)===n2&&(o2=20),this.single)return[e3];for(s2=n2;s2<=a2&&(h2.push(s2),(s2=x(s2+t3,o2))!==r2);)r2=s2;return h2}getMinorTickInterval(){let{minorTicks:t3,minorTickInterval:e3}=this.options;return true===t3?E(e3,"auto"):false!==t3?e3:void 0}getMinorTickPositions(){let t3=this.options,e3=this.tickPositions,i3=this.minorTickInterval,s2=this.pointRangePadding||0,r2=(this.min||0)-s2,o2=(this.max||0)+s2,n2=o2-r2,a2=[],h2;if(n2&&n2/i3<this.len/3){let s3=this.logarithmic;if(s3)this.paddedTicks.forEach((function(t4,e4,r3){e4&&a2.push.apply(a2,s3.getLogTickPositions(i3,r3[e4-1],r3[e4],true))}));else if(this.dateTime&&"auto"===this.getMinorTickInterval())a2=a2.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(i3),r2,o2,t3.startOfWeek));else for(h2=r2+(e3[0]-r2)%i3;h2<=o2&&h2!==a2[0];h2+=i3)a2.push(h2)}return 0!==a2.length&&this.trimTicks(a2),a2}adjustForMinRange(){let t3=this.options,e3=this.logarithmic,{max:i3,min:s2,minRange:r2}=this,o2,n2,a2,h2;this.isXAxis&&void 0===r2&&!e3&&(r2=y(t3.min)||y(t3.max)||y(t3.floor)||y(t3.ceiling)?null:Math.min(5*(M(this.series.map((t4=>{var _a;return(t4.xIncrement?(_a=t4.xData)==null?void 0:_a.slice(0,2):t4.xData)||[]})))||0),this.dataMax-this.dataMin)),A(i3)&&A(s2)&&A(r2)&&i3-s2<r2&&(n2=this.dataMax-this.dataMin>=r2,o2=(r2-i3+s2)/2,a2=[s2-o2,E(t3.min,s2-o2)],n2&&(a2[2]=e3?e3.log2lin(this.dataMin):this.dataMin),h2=[(s2=g(a2))+r2,E(t3.max,s2+r2)],n2&&(h2[2]=e3?e3.log2lin(this.dataMax):this.dataMax),(i3=f(h2))-s2<r2&&(a2[0]=i3-r2,a2[1]=E(t3.min,i3-r2),s2=g(a2))),this.minRange=r2,this.min=s2,this.max=i3}getClosest(){let t3,e3;if(this.categories)e3=1;else{let i3=[];this.series.forEach((function(t4){var _a;let s2=t4.closestPointRange;((_a=t4.xData)==null?void 0:_a.length)===1?i3.push(t4.xData[0]):!t4.noSharedTooltip&&y(s2)&&t4.reserveSpace()&&(e3=y(e3)?Math.min(e3,s2):s2)})),i3.length&&(i3.sort(((t4,e4)=>t4-e4)),t3=M([i3]))}return t3&&e3?Math.min(t3,e3):t3||e3}nameToX(t3){let e3=T(this.options.categories),i3=e3?this.categories:this.names,s2=t3.options.x,r2;return t3.series.requireSorting=false,y(s2)||(s2=this.uniqueNames&&i3?e3?i3.indexOf(t3.name):E(i3.keys[t3.name],-1):t3.series.autoIncrement()),-1===s2?!e3&&i3&&(r2=i3.length):r2=s2,void 0!==r2?(this.names[r2]=t3.name,this.names.keys[t3.name]=r2):t3.x&&(r2=t3.x),r2}updateNames(){let t3=this,e3=this.names;e3.length>0&&(Object.keys(e3.keys).forEach((function(t4){delete e3.keys[t4]})),e3.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach((e4=>{e4.xIncrement=null,(!e4.points||e4.isDirtyData)&&(t3.max=Math.max(t3.max,e4.xData.length-1),e4.processData(),e4.generatePoints()),e4.data.forEach((function(i3,s2){let r2;(i3==null?void 0:i3.options)&&void 0!==i3.name&&void 0!==(r2=t3.nameToX(i3))&&r2!==i3.x&&(i3.x=r2,e4.xData[s2]=r2)}))})))}setAxisTranslation(){let t3=this,e3=t3.max-t3.min,i3=t3.linkedParent,s2=!!t3.categories,r2=t3.isXAxis,o2=t3.axisPointRange||0,n2,a2=0,h2=0,l2,d2=t3.transA;(r2||s2||o2)&&(n2=t3.getClosest(),i3?(a2=i3.minPointOffset,h2=i3.pointRangePadding):t3.series.forEach((function(e4){let i4=s2?1:r2?E(e4.options.pointRange,n2,0):t3.axisPointRange||0,l3=e4.options.pointPlacement;if(o2=Math.max(o2,i4),!t3.single||s2){let t4=e4.is("xrange")?!r2:r2;a2=Math.max(a2,t4&&P(l3)?0:i4/2),h2=Math.max(h2,t4&&"on"===l3?0:i4)}})),l2=t3.ordinal&&t3.ordinal.slope&&n2?t3.ordinal.slope/n2:1,t3.minPointOffset=a2*=l2,t3.pointRangePadding=h2*=l2,t3.pointRange=Math.min(o2,t3.single&&s2?1:e3),r2&&n2&&(t3.closestPointRange=n2)),t3.translationSlope=t3.transA=d2=t3.staticScale||t3.len/(e3+h2||1),t3.transB=t3.horiz?t3.left:t3.bottom,t3.minPixelPadding=d2*a2,k(this,"afterSetAxisTranslation")}minFromRange(){let{max:t3,min:e3}=this;return A(t3)&&A(e3)&&t3-e3||void 0}setTickInterval(t3){var _a,_b,_c,_d;let{categories:e3,chart:i3,dataMax:s2,dataMin:r2,dateTime:o2,isXAxis:n2,logarithmic:a2,options:h2,softThreshold:l2}=this,d2=A(this.threshold)?this.threshold:void 0,c2=this.minRange||0,{ceiling:p2,floor:u2,linkedTo:g2,softMax:f2,softMin:m2}=h2,b2=A(g2)&&((_a=i3[this.coll])==null?void 0:_a[g2]),v2=h2.tickPixelInterval,C2=h2.maxPadding,M2=h2.minPadding,w3=0,T2,P2=A(h2.tickInterval)&&h2.tickInterval>=0?h2.tickInterval:void 0,L2,O2,D2,I2;if(o2||e3||b2||this.getTickAmount(),D2=E(this.userMin,h2.min),I2=E(this.userMax,h2.max),b2?(this.linkedParent=b2,T2=b2.getExtremes(),this.min=E(T2.min,T2.dataMin),this.max=E(T2.max,T2.dataMax),this.type!==b2.type&&S(11,true,i3)):(l2&&y(d2)&&A(s2)&&A(r2)&&(r2>=d2?(L2=d2,M2=0):s2<=d2&&(O2=d2,C2=0)),this.min=E(D2,L2,r2),this.max=E(I2,O2,s2)),A(this.max)&&A(this.min)&&(a2&&(this.positiveValuesOnly&&!t3&&0>=Math.min(this.min,E(r2,this.min))&&S(10,true,i3),this.min=x(a2.log2lin(this.min),16),this.max=x(a2.log2lin(this.max),16)),this.range&&A(r2)&&(this.userMin=this.min=D2=Math.max(r2,this.minFromRange()||0),this.userMax=I2=this.max,this.range=void 0)),k(this,"foundExtremes"),this.adjustForMinRange(),A(this.min)&&A(this.max)){if(!A(this.userMin)&&A(m2)&&m2<this.min&&(this.min=D2=m2),!A(this.userMax)&&A(f2)&&f2>this.max&&(this.max=I2=f2),e3||this.axisPointRange||((_b=this.stacking)==null?void 0:_b.usePercentage)||b2||!(w3=this.max-this.min)||(!y(D2)&&M2&&(this.min-=w3*M2),y(I2)||!C2||(this.max+=w3*C2)),!A(this.userMin)&&A(u2)&&(this.min=Math.max(this.min,u2)),!A(this.userMax)&&A(p2)&&(this.max=Math.min(this.max,p2)),l2&&A(r2)&&A(s2)){let t4=d2||0;!y(D2)&&this.min<t4&&r2>=t4?this.min=h2.minRange?Math.min(t4,this.max-c2):t4:!y(I2)&&this.max>t4&&s2<=t4&&(this.max=h2.minRange?Math.max(t4,this.min+c2):t4)}!i3.polar&&this.min>this.max&&(y(h2.min)?this.max=this.min:y(h2.max)&&(this.min=this.max)),w3=this.max-this.min}if(this.min!==this.max&&A(this.min)&&A(this.max)?b2&&!P2&&v2===b2.options.tickPixelInterval?this.tickInterval=P2=b2.tickInterval:this.tickInterval=E(P2,this.tickAmount?w3/Math.max(this.tickAmount-1,1):void 0,e3?1:w3*v2/Math.max(this.len,v2)):this.tickInterval=1,n2&&!t3){let t4=this.min!==((_c=this.old)==null?void 0:_c.min)||this.max!==((_d=this.old)==null?void 0:_d.max);this.series.forEach((function(e4){var _a2;e4.forceCrop=(_a2=e4.forceCropping)==null?void 0:_a2.call(e4),e4.processData(t4)})),k(this,"postProcessData",{hasExtremesChanged:t4})}this.setAxisTranslation(),k(this,"initialAxisTranslation"),this.pointRange&&!P2&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let j2=E(h2.minTickInterval,o2&&!this.series.some((t4=>t4.noSharedTooltip))?this.closestPointRange:0);!P2&&this.tickInterval<j2&&(this.tickInterval=j2),o2||a2||P2||(this.tickInterval=z(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){var _a,_b;let t3=this.options,e3=t3.tickPositions,i3=t3.tickPositioner,s2=this.getMinorTickInterval(),r2=!this.isPanning,o2=r2&&t3.startOnTick,n2=r2&&t3.endOnTick,a2=[],h2;if(this.tickmarkOffset=this.categories&&"between"===t3.tickmarkPlacement&&1===this.tickInterval?.5:0,this.single=this.min===this.max&&y(this.min)&&!this.tickAmount&&(this.min%1==0||false!==t3.allowDecimals),e3)a2=e3.slice();else if(A(this.min)&&A(this.max)){if(!((_a=this.ordinal)==null?void 0:_a.positions)&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))a2=[this.min,this.max],S(19,false,this.chart);else if(this.dateTime)a2=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,t3.units),this.min,this.max,t3.startOfWeek,(_b=this.ordinal)==null?void 0:_b.positions,this.closestPointRange,true);else if(this.logarithmic)a2=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let t4=this.tickInterval,e4=t4;for(;e4<=2*t4;)if(a2=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&a2.length>this.tickAmount)this.tickInterval=z(this,e4*=1.1);else break}a2.length>this.len&&(a2=[a2[0],a2[a2.length-1]])[0]===a2[1]&&(a2.length=1),i3&&(this.tickPositions=a2,(h2=i3.apply(this,[this.min,this.max]))&&(a2=h2))}this.tickPositions=a2,this.minorTickInterval="auto"===s2&&this.tickInterval?this.tickInterval/t3.minorTicksPerMajor:s2,this.paddedTicks=a2.slice(0),this.trimTicks(a2,o2,n2),!this.isLinked&&A(this.min)&&A(this.max)&&(this.single&&a2.length<2&&!this.categories&&!this.series.some((t4=>t4.is("heatmap")&&"between"===t4.options.pointPlacement))&&(this.min-=.5,this.max+=.5),e3||h2||this.adjustTickAmount()),k(this,"afterSetTickPositions")}trimTicks(t3,e3,i3){let s2=t3[0],r2=t3[t3.length-1],o2=!this.isOrdinal&&this.minPointOffset||0;if(k(this,"trimTicks"),!this.isLinked){if(e3&&s2!==-1/0)this.min=s2;else for(;this.min-o2>t3[0];)t3.shift();if(i3)this.max=r2;else for(;this.max+o2<t3[t3.length-1];)t3.pop();0===t3.length&&y(s2)&&!this.options.tickPositions&&t3.push((r2+s2)/2)}}alignToOthers(){let t3;let e3=this,i3=e3.chart,s2=[this],r2=e3.options,o2=i3.options.chart,n2="yAxis"===this.coll&&o2.alignThresholds,a2=[];if(e3.thresholdAlignment=void 0,(false!==o2.alignTicks&&r2.alignTicks||n2)&&false!==r2.startOnTick&&false!==r2.endOnTick&&!e3.logarithmic){let r3=t4=>{let{horiz:e4,options:i4}=t4;return[e4?i4.left:i4.top,i4.width,i4.height,i4.pane].join(",")},o3=r3(this);i3[this.coll].forEach((function(i4){let{series:n3}=i4;n3.length&&n3.some((t4=>t4.visible))&&i4!==e3&&r3(i4)===o3&&(t3=true,s2.push(i4))}))}if(t3&&n2){s2.forEach((t5=>{let i4=t5.getThresholdAlignment(e3);A(i4)&&a2.push(i4)}));let t4=a2.length>1?a2.reduce(((t5,e4)=>t5+=e4),0)/a2.length:void 0;s2.forEach((e4=>{e4.thresholdAlignment=t4}))}return t3}getThresholdAlignment(t3){if((!A(this.dataMin)||this!==t3&&this.series.some((t4=>t4.isDirty||t4.isDirtyData)))&&this.getSeriesExtremes(),A(this.threshold)){let t4=m((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(t4=1-t4),t4}}getTickAmount(){let t3=this.options,e3=t3.tickPixelInterval,i3=t3.tickAmount;y(t3.tickInterval)||i3||!(this.len<e3)||this.isRadial||this.logarithmic||!t3.startOnTick||!t3.endOnTick||(i3=2),!i3&&this.alignToOthers()&&(i3=Math.ceil(this.len/e3)+1),i3<4&&(this.finalTickAmt=i3,i3=5),this.tickAmount=i3}adjustTickAmount(){let t3=this,{finalTickAmt:e3,max:i3,min:s2,options:r2,tickPositions:o2,tickAmount:n2,thresholdAlignment:a2}=t3,h2=o2==null?void 0:o2.length,l2=E(t3.threshold,t3.softThreshold?0:null),d2,c2,p2=t3.tickInterval,u2,g2=()=>o2.push(x(o2[o2.length-1]+p2)),f2=()=>o2.unshift(x(o2[0]-p2));if(A(a2)&&(u2=a2<.5?Math.ceil(a2*(n2-1)):Math.floor(a2*(n2-1)),r2.reversed&&(u2=n2-1-u2)),t3.hasData()&&A(s2)&&A(i3)){let a3=()=>{t3.transA*=(h2-1)/(n2-1),t3.min=r2.startOnTick?o2[0]:Math.min(s2,o2[0]),t3.max=r2.endOnTick?o2[o2.length-1]:Math.max(i3,o2[o2.length-1])};if(A(u2)&&A(t3.threshold)){for(;o2[u2]!==l2||o2.length!==n2||o2[0]>s2||o2[o2.length-1]<i3;){for(o2.length=0,o2.push(t3.threshold);o2.length<n2;)void 0===o2[u2]||o2[u2]>t3.threshold?f2():g2();if(p2>8*t3.tickInterval)break;p2*=2}a3()}else if(h2<n2){for(;o2.length<n2;)o2.length%2||s2===l2?g2():f2();a3()}if(y(e3)){for(c2=d2=o2.length;c2--;)(3===e3&&c2%2==1||e3<=2&&c2>0&&c2<d2-1)&&o2.splice(c2,1);t3.finalTickAmt=void 0}}}setScale(){var _a,_b;let{coll:t3,stacking:e3}=this,i3=false,s2=false;this.series.forEach((t4=>{i3=i3||t4.isDirtyData||t4.isDirty,s2=s2||t4.xAxis&&t4.xAxis.isDirty||false})),this.setAxisSize();let r2=this.len!==(this.old&&this.old.len);r2||i3||s2||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(e3&&"yAxis"===t3&&e3.buildStacks(),this.forceRedraw=false,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),e3&&"xAxis"===t3&&e3.buildStacks(),this.isDirty||(this.isDirty=r2||this.min!==((_a=this.old)==null?void 0:_a.min)||this.max!==((_b=this.old)==null?void 0:_b.max))):e3&&e3.cleanStacks(),i3&&delete this.allExtremes,k(this,"afterSetScale")}setExtremes(t3,e3,i3=true,s2,r2){this.series.forEach((t4=>{delete t4.kdTree})),k(this,"setExtremes",r2=C(r2,{min:t3,max:e3}),(t4=>{this.userMin=t4.min,this.userMax=t4.max,this.eventArgs=t4,i3&&this.chart.redraw(s2)}))}setAxisSize(){let t3=this.chart,e3=this.options,i3=e3.offsets||[0,0,0,0],s2=this.horiz,r2=this.width=Math.round(I(E(e3.width,t3.plotWidth-i3[3]+i3[1]),t3.plotWidth)),o2=this.height=Math.round(I(E(e3.height,t3.plotHeight-i3[0]+i3[2]),t3.plotHeight)),n2=this.top=Math.round(I(E(e3.top,t3.plotTop+i3[0]),t3.plotHeight,t3.plotTop)),a2=this.left=Math.round(I(E(e3.left,t3.plotLeft+i3[3]),t3.plotWidth,t3.plotLeft));this.bottom=t3.chartHeight-o2-n2,this.right=t3.chartWidth-r2-a2,this.len=Math.max(s2?r2:o2,0),this.pos=s2?a2:n2}getExtremes(){let t3=this.logarithmic;return{min:t3?x(t3.lin2log(this.min)):this.min,max:t3?x(t3.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(t3){let e3=this.logarithmic,i3=e3?e3.lin2log(this.min):this.min,s2=e3?e3.lin2log(this.max):this.max;return null===t3||t3===-1/0?t3=i3:t3===1/0?t3=s2:i3>t3?t3=i3:s2<t3&&(t3=s2),this.translate(t3,0,1,0,1)}autoLabelAlign(t3){let e3=(E(t3,0)-90*this.side+720)%360,i3={align:"center"};return k(this,"autoLabelAlign",i3,(function(t4){e3>15&&e3<165?t4.align="right":e3>195&&e3<345&&(t4.align="left")})),i3.align}tickSize(t3){let e3=this.options,i3=E(e3["tick"===t3?"tickWidth":"minorTickWidth"],"tick"===t3&&this.isXAxis&&!this.categories?1:0),s2=e3["tick"===t3?"tickLength":"minorTickLength"],r2;i3&&s2&&("inside"===e3[t3+"Position"]&&(s2=-s2),r2=[s2,i3]);let o2={tickSize:r2};return k(this,"afterTickSize",o2),o2.tickSize}labelMetrics(){let t3=this.chart.renderer,e3=this.ticks,i3=e3[Object.keys(e3)[0]]||{};return this.chart.renderer.fontMetrics(i3.label||i3.movedLabel||t3.box)}unsquish(){let t3=this.options.labels,e3=t3.padding||0,i3=this.horiz,s2=this.tickInterval,r2=this.len/(((this.categories?1:0)+this.max-this.min)/s2),o2=t3.rotation,n2=x(.8*this.labelMetrics().h),a2=Math.max(this.max-this.min,0),h2=function(t4){let i4=(t4+2*e3)/(r2||1);return(i4=i4>1?Math.ceil(i4):1)*s2>a2&&t4!==1/0&&r2!==1/0&&a2&&(i4=Math.ceil(a2/s2)),x(i4*s2)},l2=s2,d2,c2=Number.MAX_VALUE,p2;if(i3){if(!t3.staggerLines&&(A(o2)?p2=[o2]:r2<t3.autoRotationLimit&&(p2=t3.autoRotation)),p2){let t4,e4;for(let i4 of p2)(i4===o2||i4&&i4>=-90&&i4<=90)&&(e4=(t4=h2(Math.abs(n2/Math.sin(u*i4))))+Math.abs(i4/360))<c2&&(c2=e4,d2=i4,l2=t4)}}else l2=h2(.75*n2);return this.autoRotation=p2,this.labelRotation=E(d2,A(o2)?o2:0),t3.step?s2:l2}getSlotWidth(t3){let e3=this.chart,i3=this.horiz,s2=this.options.labels,r2=Math.max(this.tickPositions.length-(this.categories?0:1),1),o2=e3.margin[3];if(t3&&A(t3.slotWidth))return t3.slotWidth;if(i3&&s2.step<2)return s2.rotation?0:(this.staggerLines||1)*this.len/r2;if(!i3){let t4=s2.style.width;if(void 0!==t4)return parseInt(String(t4),10);if(o2)return o2-e3.spacing[3]}return.33*e3.chartWidth}renderUnsquish(){let t3=this.chart,e3=t3.renderer,i3=this.tickPositions,s2=this.ticks,r2=this.options.labels,o2=r2.style,n2=this.horiz,a2=this.getSlotWidth(),h2=Math.max(1,Math.round(a2-(n2?2*(r2.padding||0):r2.distance||0))),l2={},d2=this.labelMetrics(),c2=o2.textOverflow,p2,u2,g2=0,f2,m2;if(P(r2.rotation)||(l2.rotation=r2.rotation||0),i3.forEach((function(t4){let e4=s2[t4];e4.movedLabel&&e4.replaceMovedLabel(),e4&&e4.label&&e4.label.textPxLength>g2&&(g2=e4.label.textPxLength)})),this.maxLabelLength=g2,this.autoRotation)g2>h2&&g2>d2.h?l2.rotation=this.labelRotation:this.labelRotation=0;else if(a2&&(p2=h2,!c2))for(u2="clip",m2=i3.length;!n2&&m2--;)(f2=s2[i3[m2]].label)&&("ellipsis"===f2.styles.textOverflow?f2.css({textOverflow:"clip"}):f2.textPxLength>a2&&f2.css({width:a2+"px"}),f2.getBBox().height>this.len/i3.length-(d2.h-d2.f)&&(f2.specificTextOverflow="ellipsis"));l2.rotation&&(p2=g2>.5*t3.chartHeight?.33*t3.chartHeight:g2,c2||(u2="ellipsis")),this.labelAlign=r2.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(l2.align=this.labelAlign),i3.forEach((function(t4){let e4=s2[t4],i4=e4&&e4.label,r3=o2.width,n3={};i4&&(i4.attr(l2),e4.shortenLabel?e4.shortenLabel():p2&&!r3&&"nowrap"!==o2.whiteSpace&&(p2<i4.textPxLength||"SPAN"===i4.element.tagName)?(n3.width=p2+"px",c2||(n3.textOverflow=i4.specificTextOverflow||u2),i4.css(n3)):!i4.styles.width||n3.width||r3||i4.css({width:null}),delete i4.specificTextOverflow,e4.rotation=l2.rotation)}),this),this.tickRotCorr=e3.rotCorr(d2.b,this.labelRotation||0,0!==this.side)}hasData(){return this.series.some((function(t3){return t3.hasData()}))||this.options.showEmpty&&y(this.min)&&y(this.max)}addTitle(t3){let e3;let i3=this.chart.renderer,s2=this.horiz,r2=this.opposite,o2=this.options.title,n2=this.chart.styledMode;this.axisTitle||((e3=o2.textAlign)||(e3=(s2?{low:"left",middle:"center",high:"right"}:{low:r2?"right":"left",middle:"center",high:r2?"left":"right"})[o2.align]),this.axisTitle=i3.text(o2.text||"",0,0,o2.useHTML).attr({zIndex:7,rotation:o2.rotation||0,align:e3}).addClass("highcharts-axis-title"),n2||this.axisTitle.css(L(o2.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=true),n2||o2.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[t3?"show":"hide"](t3)}generateTick(t3){let e3=this.ticks;e3[t3]?e3[t3].addLabel():e3[t3]=new n(this,t3)}createGroups(){let{axisParent:t3,chart:e3,coll:i3,options:s2}=this,r2=e3.renderer,o2=(e4,o3,n2)=>r2.g(e4).attr({zIndex:n2}).addClass(`highcharts-${i3.toLowerCase()}${o3} `+(this.isRadial?`highcharts-radial-axis${o3} `:"")+(s2.className||"")).add(t3);this.axisGroup||(this.gridGroup=o2("grid","-grid",s2.gridZIndex),this.axisGroup=o2("axis","",s2.zIndex),this.labelGroup=o2("axis-labels","-labels",s2.labels.zIndex))}getOffset(){let t3=this,{chart:e3,horiz:i3,options:s2,side:r2,ticks:o2,tickPositions:n2,coll:a2}=t3,h2=e3.inverted&&!t3.isZAxis?[1,0,3,2][r2]:r2,l2=t3.hasData(),d2=s2.title,c2=s2.labels,p2=A(s2.crossing),u2=e3.axisOffset,g2=e3.clipOffset,f2=[-1,1,1,-1][r2],m2,x2=0,b2,v2=0,S2=0,C2,M2;if(t3.showAxis=m2=l2||s2.showEmpty,t3.staggerLines=t3.horiz&&c2.staggerLines||void 0,t3.createGroups(),l2||t3.isLinked?(n2.forEach((function(e4){t3.generateTick(e4)})),t3.renderUnsquish(),t3.reserveSpaceDefault=0===r2||2===r2||{1:"left",3:"right"}[r2]===t3.labelAlign,E(c2.reserveSpace,!p2&&null,"center"===t3.labelAlign||null,t3.reserveSpaceDefault)&&n2.forEach((function(t4){S2=Math.max(o2[t4].getLabelSize(),S2)})),t3.staggerLines&&(S2*=t3.staggerLines),t3.labelOffset=S2*(t3.opposite?-1:1)):D(o2,(function(t4,e4){t4.destroy(),delete o2[e4]})),(d2==null?void 0:d2.text)&&false!==d2.enabled&&(t3.addTitle(m2),m2&&!p2&&false!==d2.reserveSpace&&(t3.titleOffset=x2=t3.axisTitle.getBBox()[i3?"height":"width"],v2=y(b2=d2.offset)?0:E(d2.margin,i3?5:10))),t3.renderLine(),t3.offset=f2*E(s2.offset,u2[r2]?u2[r2]+(s2.margin||0):0),t3.tickRotCorr=t3.tickRotCorr||{x:0,y:0},M2=0===r2?-t3.labelMetrics().h:2===r2?t3.tickRotCorr.y:0,C2=Math.abs(S2)+v2,S2&&(C2-=M2,C2+=f2*(i3?E(c2.y,t3.tickRotCorr.y+f2*c2.distance):E(c2.x,f2*c2.distance))),t3.axisTitleMargin=E(b2,C2),t3.getMaxLabelDimensions&&(t3.maxLabelDimensions=t3.getMaxLabelDimensions(o2,n2)),"colorAxis"!==a2&&g2){let e4=this.tickSize("tick");u2[r2]=Math.max(u2[r2],(t3.axisTitleMargin||0)+x2+f2*t3.offset,C2,n2&&n2.length&&e4?e4[0]+f2*t3.offset:0);let i4=!t3.axisLine||s2.offset?0:t3.axisLine.strokeWidth()/2;g2[h2]=Math.max(g2[h2],i4)}k(this,"afterGetOffset")}getLinePath(t3){let e3=this.chart,i3=this.opposite,s2=this.offset,r2=this.horiz,o2=this.left+(i3?this.width:0)+s2,n2=e3.chartHeight-this.bottom-(i3?this.height:0)+s2;return i3&&(t3*=-1),e3.renderer.crispLine([["M",r2?this.left:o2,r2?n2:this.top],["L",r2?e3.chartWidth-this.right:o2,r2?n2:e3.chartHeight-this.bottom]],t3)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(t3){let e3=this.horiz,i3=this.left,s2=this.top,r2=this.len,o2=this.options.title,n2=e3?i3:s2,a2=this.opposite,h2=this.offset,l2=o2.x,d2=o2.y,c2=this.chart.renderer.fontMetrics(t3),p2=t3?Math.max(t3.getBBox(false,0).height-c2.h-1,0):0,u2={low:n2+(e3?0:r2),middle:n2+r2/2,high:n2+(e3?r2:0)}[o2.align],g2=(e3?s2+this.height:i3)+(e3?1:-1)*(a2?-1:1)*(this.axisTitleMargin||0)+[-p2,p2,c2.f,-p2][this.side],f2={x:e3?u2+l2:g2+(a2?this.width:0)+h2+l2,y:e3?g2+d2-(a2?this.height:0)+h2:u2+d2};return k(this,"afterGetTitlePosition",{titlePosition:f2}),f2}renderMinorTick(t3,e3){let i3=this.minorTicks;i3[t3]||(i3[t3]=new n(this,t3,"minor")),e3&&i3[t3].isNew&&i3[t3].render(null,true),i3[t3].render(null,false,1)}renderTick(t3,e3,i3){let s2=this.isLinked,r2=this.ticks;(!s2||t3>=this.min&&t3<=this.max||this.grid&&this.grid.isColumn)&&(r2[t3]||(r2[t3]=new n(this,t3)),i3&&r2[t3].isNew&&r2[t3].render(e3,true,-1),r2[t3].render(e3))}render(){let t3,e3;let i3=this,s2=i3.chart,r2=i3.logarithmic,a2=s2.renderer,l2=i3.options,d2=i3.isLinked,c2=i3.tickPositions,p2=i3.axisTitle,u2=i3.ticks,g2=i3.minorTicks,f2=i3.alternateBands,m2=l2.stackLabels,x2=l2.alternateGridColor,y2=l2.crossing,b2=i3.tickmarkOffset,v2=i3.axisLine,S2=i3.showAxis,C2=h(a2.globalAnimation);if(i3.labelEdge.length=0,i3.overlap=false,[u2,g2,f2].forEach((function(t4){D(t4,(function(t5){t5.isActive=false}))})),A(y2)){let t4=this.isXAxis?s2.yAxis[0]:s2.xAxis[0],e4=[1,-1,-1,1][this.side];if(t4){let s3=t4.toPixels(y2,true);i3.horiz&&(s3=t4.len-s3),i3.offset=e4*s3}}if(i3.hasData()||d2){let a3=i3.chart.hasRendered&&i3.old&&A(i3.old.min);i3.minorTickInterval&&!i3.categories&&i3.getMinorTickPositions().forEach((function(t4){i3.renderMinorTick(t4,a3)})),c2.length&&(c2.forEach((function(t4,e4){i3.renderTick(t4,e4,a3)})),b2&&(0===i3.min||i3.single)&&(u2[-1]||(u2[-1]=new n(i3,-1,null,true)),u2[-1].render(-1))),x2&&c2.forEach((function(n2,a4){e3=void 0!==c2[a4+1]?c2[a4+1]+b2:i3.max-b2,a4%2==0&&n2<i3.max&&e3<=i3.max+(s2.polar?-b2:b2)&&(f2[n2]||(f2[n2]=new o.PlotLineOrBand(i3,{})),t3=n2+b2,f2[n2].options={from:r2?r2.lin2log(t3):t3,to:r2?r2.lin2log(e3):e3,color:x2,className:"highcharts-alternate-grid"},f2[n2].render(),f2[n2].isActive=true)})),i3._addedPlotLB||(i3._addedPlotLB=true,(l2.plotLines||[]).concat(l2.plotBands||[]).forEach((function(t4){i3.addPlotBandOrLine(t4)})))}[u2,g2,f2].forEach((function(t4){let e4=[],i4=C2.duration;D(t4,(function(t5,i5){t5.isActive||(t5.render(i5,false,0),t5.isActive=false,e4.push(i5))})),R((function(){let i5=e4.length;for(;i5--;)t4[e4[i5]]&&!t4[e4[i5]].isActive&&(t4[e4[i5]].destroy(),delete t4[e4[i5]])}),t4!==f2&&s2.hasRendered&&i4?i4:0)})),v2&&(v2[v2.isPlaced?"animate":"attr"]({d:this.getLinePath(v2.strokeWidth())}),v2.isPlaced=true,v2[S2?"show":"hide"](S2)),p2&&S2&&(p2[p2.isNew?"attr":"animate"](i3.getTitlePosition(p2)),p2.isNew=false),m2&&m2.enabled&&i3.stacking&&i3.stacking.renderStackTotals(),i3.old={len:i3.len,max:i3.max,min:i3.min,transA:i3.transA,userMax:i3.userMax,userMin:i3.userMin},i3.isDirty=false,k(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach((function(t3){t3.render()}))),this.series.forEach((function(t3){t3.isDirty=true}))}getKeepProps(){return this.keepProps||N.keepProps}destroy(t3){let e3=this,i3=e3.plotLinesAndBands,s2=this.eventOptions;if(k(this,"destroy",{keepEvents:t3}),t3||j(e3),[e3.ticks,e3.minorTicks,e3.alternateBands].forEach((function(t4){b(t4)})),i3){let t4=i3.length;for(;t4--;)i3[t4].destroy()}for(let t4 in["axisLine","axisTitle","axisGroup","gridGroup","labelGroup","cross","scrollbar"].forEach((function(t5){e3[t5]&&(e3[t5]=e3[t5].destroy())})),e3.plotLinesAndBandsGroups)e3.plotLinesAndBandsGroups[t4]=e3.plotLinesAndBandsGroups[t4].destroy();D(e3,(function(t4,i4){-1===e3.getKeepProps().indexOf(i4)&&delete e3[i4]})),this.eventOptions=s2}drawCrosshair(t3,e3){let s2=this.crosshair,r2=E(s2&&s2.snap,true),o2=this.chart,n2,a2,h2,l2=this.cross,d2;if(k(this,"drawCrosshair",{e:t3,point:e3}),t3||(t3=this.cross&&this.cross.e),s2&&false!==(y(e3)||!r2)){if(r2?y(e3)&&(a2=E("colorAxis"!==this.coll?e3.crosshairPos:null,this.isXAxis?e3.plotX:this.len-e3.plotY)):a2=t3&&(this.horiz?t3.chartX-this.pos:this.len-t3.chartY+this.pos),y(a2)&&(d2={value:e3&&(this.isXAxis?e3.x:E(e3.stackY,e3.y)),translatedValue:a2},o2.polar&&C(d2,{isCrosshair:true,chartX:t3&&t3.chartX,chartY:t3&&t3.chartY,point:e3}),n2=this.getPlotLinePath(d2)||null),!y(n2)){this.hideCrosshair();return}h2=this.categories&&!this.isRadial,l2||(this.cross=l2=o2.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(h2?"category ":"thin ")+(s2.className||"")).attr({zIndex:E(s2.zIndex,2)}).add(),!o2.styledMode&&(l2.attr({stroke:s2.color||(h2?i2.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":E(s2.width,1)}).css({"pointer-events":"none"}),s2.dashStyle&&l2.attr({dashstyle:s2.dashStyle}))),l2.show().attr({d:n2}),h2&&!s2.width&&l2.attr({"stroke-width":this.transA}),this.cross.e=t3}else this.hideCrosshair();k(this,"afterDrawCrosshair",{e:t3,point:e3})}hideCrosshair(){this.cross&&this.cross.hide(),k(this,"afterHideCrosshair")}update(t3,e3){let i3=this.chart;t3=L(this.userOptions,t3),this.destroy(true),this.init(i3,t3),i3.isDirtyBox=true,E(e3,true)&&i3.redraw()}remove(t3){let e3=this.chart,i3=this.coll,s2=this.series,r2=s2.length;for(;r2--;)s2[r2]&&s2[r2].remove(false);v(e3.axes,this),v(e3[i3]||[],this),e3.orderItems(i3),this.destroy(),e3.isDirtyBox=true,E(t3,true)&&e3.redraw()}setTitle(t3,e3){this.update({title:t3},e3)}setCategories(t3,e3){this.update({categories:t3},e3)}}return N.keepProps=["coll","extKey","hcEvents","len","names","series","userMax","userMin"],N})),i(e,"Core/Axis/DateTimeAxis.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{addEvent:i2,getMagnitude:s,normalizeTickInterval:r,timeUnits:o}=t2;return function(t3){function e3(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function n(){if("datetime"!==this.type){this.dateTime=void 0;return}this.dateTime||(this.dateTime=new a(this))}t3.compose=function(t4){return t4.keepProps.includes("dateTime")||(t4.keepProps.push("dateTime"),t4.prototype.getTimeTicks=e3,i2(t4,"afterSetType",n)),t4};class a{constructor(t4){this.axis=t4}normalizeTimeTickInterval(t4,e4){let i3=e4||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],n2=i3[i3.length-1],a2=o[n2[0]],h=n2[1],l;for(l=0;l<i3.length&&(a2=o[(n2=i3[l])[0]],h=n2[1],!i3[l+1]||!(t4<=(a2*h[h.length-1]+o[i3[l+1][0]])/2));l++);a2===o.year&&t4<5*a2&&(h=[1,2,5]);let d=r(t4/a2,h,"year"===n2[0]?Math.max(s(t4/a2),1):1);return{unitRange:a2,count:d,unitName:n2[0]}}getXDateFormat(t4,e4){let{axis:i3}=this,s2=i3.chart.time;return i3.closestPointRange?s2.getDateFormat(i3.closestPointRange,t4,i3.options.startOfWeek,e4)||s2.resolveDTLFormat(e4.year).main:s2.resolveDTLFormat(e4.day).main}}t3.Additions=a}(e2||(e2={})),e2})),i(e,"Core/Axis/LogarithmicAxis.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{addEvent:i2,normalizeTickInterval:s,pick:r}=t2;return function(t3){function e3(){"logarithmic"!==this.type?this.logarithmic=void 0:this.logarithmic??(this.logarithmic=new n(this))}function o(){let t4=this.logarithmic;t4&&(this.lin2val=function(e4){return t4.lin2log(e4)},this.val2lin=function(e4){return t4.log2lin(e4)})}t3.compose=function(t4){return t4.keepProps.includes("logarithmic")||(t4.keepProps.push("logarithmic"),i2(t4,"afterSetType",e3),i2(t4,"afterInit",o)),t4};class n{constructor(t4){this.axis=t4}getLogTickPositions(t4,e4,i3,o2){let n2=this.axis,a=n2.len,h=n2.options,l=[];if(o2||(this.minorAutoInterval=void 0),t4>=.5)t4=Math.round(t4),l=n2.getLinearTickPositions(t4,e4,i3);else if(t4>=.08){let s2,r2,n3,a2,h2,d,c;let p=Math.floor(e4);for(s2=t4>.3?[1,2,4]:t4>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],r2=p;r2<i3+1&&!c;r2++)for(n3=0,a2=s2.length;n3<a2&&!c;n3++)(h2=this.log2lin(this.lin2log(r2)*s2[n3]))>e4&&(!o2||d<=i3)&&void 0!==d&&l.push(d),d>i3&&(c=true),d=h2}else{let d=this.lin2log(e4),c=this.lin2log(i3),p=o2?n2.getMinorTickInterval():h.tickInterval,u=h.tickPixelInterval/(o2?5:1),g=o2?a/n2.tickPositions.length:a;t4=s(t4=r("auto"===p?null:p,this.minorAutoInterval,(c-d)*u/(g||1))),l=n2.getLinearTickPositions(t4,d,c).map(this.log2lin),o2||(this.minorAutoInterval=t4/5)}return o2||(n2.tickInterval=t4),l}lin2log(t4){return Math.pow(10,t4)}log2lin(t4){return Math.log(t4)/Math.LN10}}t3.Additions=n}(e2||(e2={})),e2})),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{erase:i2,extend:s,isNumber:r}=t2;return function(t3){let e3;function o(t4){return this.addPlotBandOrLine(t4,"plotBands")}function n(t4,i3){let s2=this.userOptions,r2=new e3(this,t4);if(this.visible&&(r2=r2.render()),r2){if(this._addedPlotLB||(this._addedPlotLB=true,(s2.plotLines||[]).concat(s2.plotBands||[]).forEach((t5=>{this.addPlotBandOrLine(t5)}))),i3){let e4=s2[i3]||[];e4.push(t4),s2[i3]=e4}this.plotLinesAndBands.push(r2)}return r2}function a(t4){return this.addPlotBandOrLine(t4,"plotLines")}function h(t4,e4,i3){i3=i3||this.options;let s2=this.getPlotLinePath({value:e4,force:true,acrossPanes:i3.acrossPanes}),o2=[],n2=this.horiz,a2=!r(this.min)||!r(this.max)||t4<this.min&&e4<this.min||t4>this.max&&e4>this.max,h2=this.getPlotLinePath({value:t4,force:true,acrossPanes:i3.acrossPanes}),l2,d2=1,c2;if(h2&&s2)for(a2&&(c2=h2.toString()===s2.toString(),d2=0),l2=0;l2<h2.length;l2+=2){let t5=h2[l2],e5=h2[l2+1],i4=s2[l2],r2=s2[l2+1];("M"===t5[0]||"L"===t5[0])&&("M"===e5[0]||"L"===e5[0])&&("M"===i4[0]||"L"===i4[0])&&("M"===r2[0]||"L"===r2[0])&&(n2&&i4[1]===t5[1]?(i4[1]+=d2,r2[1]+=d2):n2||i4[2]!==t5[2]||(i4[2]+=d2,r2[2]+=d2),o2.push(["M",t5[1],t5[2]],["L",e5[1],e5[2]],["L",r2[1],r2[2]],["L",i4[1],i4[2]],["Z"])),o2.isFlat=c2}return o2}function l(t4){this.removePlotBandOrLine(t4)}function d(t4){let e4=this.plotLinesAndBands,s2=this.options,r2=this.userOptions;if(e4){let o2=e4.length;for(;o2--;)e4[o2].id===t4&&e4[o2].destroy();[s2.plotLines||[],r2.plotLines||[],s2.plotBands||[],r2.plotBands||[]].forEach((function(e5){for(o2=e5.length;o2--;)(e5[o2]||{}).id===t4&&i2(e5,e5[o2])}))}}function c(t4){this.removePlotBandOrLine(t4)}t3.compose=function(t4,i3){let r2=i3.prototype;return r2.addPlotBand||(e3=t4,s(r2,{addPlotBand:o,addPlotLine:a,addPlotBandOrLine:n,getPlotBandPath:h,removePlotBand:l,removePlotLine:c,removePlotBandOrLine:d})),i3}}(e2||(e2={})),e2})),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[e["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],e["Core/Utilities.js"]],(function(t2,e2){let{addEvent:i2,arrayMax:s,arrayMin:r,defined:o,destroyObjectProperties:n,erase:a,fireEvent:h,merge:l,objectEach:d,pick:c}=e2;class p{static compose(e3,s2){return i2(e3,"afterInit",(function(){this.labelCollectors.push((()=>{var _a;let t3=[];for(let e4 of this.axes)for(let{label:i3,options:s3}of e4.plotLinesAndBands)i3&&!((_a=s3==null?void 0:s3.label)==null?void 0:_a.allowOverlap)&&t3.push(i3);return t3}))})),t2.compose(p,s2)}constructor(t3,e3){this.axis=t3,this.options=e3,this.id=e3.id}render(){h(this,"render");let{axis:t3,options:e3}=this,{horiz:i3,logarithmic:s2}=t3,{color:r2,events:n2,zIndex:a2=0}=e3,p2={},u=t3.chart.renderer,g=e3.to,f=e3.from,m=e3.value,x=e3.borderWidth,y=e3.label,{label:b,svgElem:v}=this,S=[],C,k=o(f)&&o(g),M=o(m),w2=!v,T={class:"highcharts-plot-"+(k?"band ":"line ")+(e3.className||"")},A=k?"bands":"lines";if(!t3.chart.styledMode&&(M?(T.stroke=r2||"#999999",T["stroke-width"]=c(e3.width,1),e3.dashStyle&&(T.dashstyle=e3.dashStyle)):k&&(T.fill=r2||"#e6e9ff",x&&(T.stroke=e3.borderColor,T["stroke-width"]=x))),p2.zIndex=a2,A+="-"+a2,(C=t3.plotLinesAndBandsGroups[A])||(t3.plotLinesAndBandsGroups[A]=C=u.g("plot-"+A).attr(p2).add()),v||(this.svgElem=v=u.path().attr(T).add(C)),o(m))S=t3.getPlotLinePath({value:(s2==null?void 0:s2.log2lin(m))??m,lineWidth:v.strokeWidth(),acrossPanes:e3.acrossPanes});else{if(!(o(f)&&o(g)))return;S=t3.getPlotBandPath((s2==null?void 0:s2.log2lin(f))??f,(s2==null?void 0:s2.log2lin(g))??g,e3)}return!this.eventsAdded&&n2&&(d(n2,((t4,e4)=>{v==null?void 0:v.on(e4,(t5=>{n2[e4].apply(this,[t5])}))})),this.eventsAdded=true),(w2||!v.d)&&(S==null?void 0:S.length)?v.attr({d:S}):v&&(S?(v.show(),v.animate({d:S})):v.d&&(v.hide(),b&&(this.label=b=b.destroy()))),y&&(o(y.text)||o(y.formatter))&&(S==null?void 0:S.length)&&t3.width>0&&t3.height>0&&!S.isFlat?(y=l({align:i3&&k?"center":void 0,x:i3?!k&&4:10,verticalAlign:!i3&&k?"middle":void 0,y:i3?k?16:10:k?6:-4,rotation:i3&&!k?90:0,...k?{inside:true}:{}},y),this.renderLabel(y,S,k,a2)):b&&b.hide(),this}renderLabel(t3,e3,i3,n2){var _a;let a2=this.axis,h2=a2.chart.renderer,d2=t3.inside,c2=this.label;c2||(this.label=c2=h2.text(this.getLabelText(t3),0,0,t3.useHTML).attr({align:t3.textAlign||t3.align,rotation:t3.rotation,class:"highcharts-plot-"+(i3?"band":"line")+"-label "+(t3.className||""),zIndex:n2}),a2.chart.styledMode||c2.css(l({fontSize:"0.8em",textOverflow:i3&&!d2?"":"ellipsis"},t3.style)),c2.add());let p2=e3.xBounds||[e3[0][1],e3[1][1],i3?e3[2][1]:e3[0][1]],u=e3.yBounds||[e3[0][2],e3[1][2],i3?e3[2][2]:e3[0][2]],g=r(p2),f=r(u),m=s(p2)-g;c2.align(t3,false,{x:g,y:f,width:m,height:s(u)-f}),(!c2.alignValue||"left"===c2.alignValue||o(d2))&&c2.css({width:(((_a=t3.style)==null?void 0:_a.width)||(i3&&d2?m:90===c2.rotation?a2.height-(c2.alignAttr.y-a2.top):(t3.clip?a2.width:a2.chart.chartWidth)-(c2.alignAttr.x-a2.left)))+"px"}),c2.show(true)}getLabelText(t3){return o(t3.formatter)?t3.formatter.call(this):t3.text}destroy(){a(this.axis.plotLinesAndBands,this),delete this.axis,n(this)}}return p})),i(e,"Core/Tooltip.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o){var n;let{animObject:a}=t2,{format:h}=e2,{composed:l,doc:d,isSafari:c}=i2,{distribute:p}=s,{addEvent:u,clamp:g,css:f,discardElement:m,extend:x,fireEvent:y,isArray:b,isNumber:v,isString:S,merge:C,pick:k,pushUnique:M,splat:w2,syncTimeout:T}=o;class A{constructor(t3,e3,i3){this.allowShared=true,this.crosshairs=[],this.distance=0,this.isHidden=true,this.isSticky=false,this.options={},this.outside=false,this.chart=t3,this.init(t3,e3),this.pointer=i3}bodyFormatter(t3){return t3.map((function(t4){let e3=t4.series.tooltipOptions;return(e3[(t4.point.formatPrefix||"point")+"Formatter"]||t4.point.tooltipFormatter).call(t4.point,e3[(t4.point.formatPrefix||"point")+"Format"]||"")}))}cleanSplit(t3){this.chart.series.forEach((function(e3){let i3=e3&&e3.tt;i3&&(!i3.isActive||t3?e3.tt=i3.destroy():i3.isActive=false)}))}defaultFormatter(t3){let e3;let i3=this.points||w2(this);return(e3=(e3=[t3.tooltipFooterHeaderFormatter(i3[0])]).concat(t3.bodyFormatter(i3))).push(t3.tooltipFooterHeaderFormatter(i3[0],true)),e3}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(true),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),m(this.container)),o.clearTimeout(this.hideTimer)}getAnchor(t3,e3){let i3;let{chart:s2,pointer:r2}=this,o2=s2.inverted,n2=s2.plotTop,a2=s2.plotLeft;if((t3=w2(t3))[0].series&&t3[0].series.yAxis&&!t3[0].series.yAxis.options.reversedStacks&&(t3=t3.slice().reverse()),this.followPointer&&e3)void 0===e3.chartX&&(e3=r2.normalize(e3)),i3=[e3.chartX-a2,e3.chartY-n2];else if(t3[0].tooltipPos)i3=t3[0].tooltipPos;else{let s3=0,r3=0;t3.forEach((function(t4){let e4=t4.pos(true);e4&&(s3+=e4[0],r3+=e4[1])})),s3/=t3.length,r3/=t3.length,this.shared&&t3.length>1&&e3&&(o2?s3=e3.chartX:r3=e3.chartY),i3=[s3-a2,r3-n2]}return i3.map(Math.round)}getClassName(t3,e3,i3){let s2=this.options,r2=t3.series,o2=r2.options;return[s2.className,"highcharts-label",i3&&"highcharts-tooltip-header",e3?"highcharts-tooltip-box":"highcharts-tooltip",!i3&&"highcharts-color-"+k(t3.colorIndex,r2.colorIndex),o2&&o2.className].filter(S).join(" ")}getLabel({anchorX:t3,anchorY:e3}={anchorX:0,anchorY:0}){let s2=this,o2=this.chart.styledMode,n2=this.options,a2=this.split&&this.allowShared,h2=this.container,l2=this.chart.renderer;if(this.label){let t4=!this.label.hasClass("highcharts-label");(!a2&&t4||a2&&!t4)&&this.destroy()}if(!this.label){if(this.outside){let t4=this.chart.options.chart.style,e4=r.getRendererType();this.container=h2=i2.doc.createElement("div"),h2.className="highcharts-tooltip-container",f(h2,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(t4&&t4.zIndex||0)+3)}),this.renderer=l2=new e4(h2,0,0,t4,void 0,void 0,l2.styledMode)}if(a2?this.label=l2.g("tooltip"):(this.label=l2.label("",t3,e3,n2.shape,void 0,void 0,n2.useHTML,void 0,"tooltip").attr({padding:n2.padding,r:n2.borderRadius}),o2||this.label.attr({fill:n2.backgroundColor,"stroke-width":n2.borderWidth||0}).css(n2.style).css({pointerEvents:n2.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),s2.outside){let t4=this.label;[t4.xSetter,t4.ySetter].forEach(((e4,i3)=>{t4[i3?"ySetter":"xSetter"]=r2=>{e4.call(t4,s2.distance),t4[i3?"y":"x"]=r2,h2&&(h2.style[i3?"top":"left"]=`${r2}px`)}}))}this.label.attr({zIndex:8}).shadow(n2.shadow).add()}return h2&&!h2.parentElement&&i2.doc.body.appendChild(h2),this.label}getPlayingField(){let{body:t3,documentElement:e3}=d,{chart:i3,distance:s2,outside:r2}=this;return{width:r2?Math.max(t3.scrollWidth,e3.scrollWidth,t3.offsetWidth,e3.offsetWidth,e3.clientWidth)-2*s2:i3.chartWidth,height:r2?Math.max(t3.scrollHeight,e3.scrollHeight,t3.offsetHeight,e3.offsetHeight,e3.clientHeight):i3.chartHeight}}getPosition(t3,e3,i3){var _a,_b;let{distance:s2,chart:r2,outside:o2,pointer:n2}=this,{inverted:a2,plotLeft:h2,plotTop:l2,polar:d2}=r2,{plotX:c2=0,plotY:p2=0}=i3,u2={},g2=a2&&i3.h||0,{height:f2,width:m2}=this.getPlayingField(),x2=n2.getChartPosition(),y2=t4=>t4*x2.scaleX,b2=t4=>t4*x2.scaleY,v2=i4=>{let n3="x"===i4;return[i4,n3?m2:f2,n3?t3:e3].concat(o2?[n3?y2(t3):b2(e3),n3?x2.left-s2+y2(c2+h2):x2.top-s2+b2(p2+l2),0,n3?m2:f2]:[n3?t3:e3,n3?c2+h2:p2+l2,n3?h2:l2,n3?h2+r2.plotWidth:l2+r2.plotHeight])},S2=v2("y"),C2=v2("x"),M2,w3=!!i3.negative;!d2&&((_b=(_a=r2.hoverSeries)==null?void 0:_a.yAxis)==null?void 0:_b.reversed)&&(w3=!w3);let T2=!this.followPointer&&k(i3.ttBelow,!d2&&!a2===w3),A2=function(t4,e4,i4,r3,n3,a3,h3){let l3=o2?"y"===t4?b2(s2):y2(s2):s2,d3=(i4-r3)/2,c3=r3<n3-s2,p3=n3+s2+r3<e4,f3=n3-l3-i4+d3,m3=n3+l3-d3;if(T2&&p3)u2[t4]=m3;else if(!T2&&c3)u2[t4]=f3;else if(c3)u2[t4]=Math.min(h3-r3,f3-g2<0?f3:f3-g2);else{if(!p3)return false;u2[t4]=Math.max(a3,m3+g2+i4>e4?m3:m3+g2)}},P=function(t4,e4,i4,r3,o3){if(o3<s2||o3>e4-s2)return false;o3<i4/2?u2[t4]=1:o3>e4-r3/2?u2[t4]=e4-r3-2:u2[t4]=o3-i4/2},L=function(t4){[S2,C2]=[C2,S2],M2=t4},O=()=>{false!==A2.apply(0,S2)?false!==P.apply(0,C2)||M2||(L(true),O()):M2?u2.x=u2.y=0:(L(true),O())};return(a2&&!d2||this.len>1)&&L(),O(),u2}hide(t3){let e3=this;o.clearTimeout(this.hideTimer),t3=k(t3,this.options.hideDelay),this.isHidden||(this.hideTimer=T((function(){let i3=e3.getLabel();e3.getLabel().animate({opacity:0},{duration:t3?150:t3,complete:()=>{i3.hide(),e3.container&&e3.container.remove()}}),e3.isHidden=true}),t3))}init(t3,e3){this.chart=t3,this.options=e3,this.crosshairs=[],this.isHidden=true,this.split=e3.split&&!t3.inverted&&!t3.polar,this.shared=e3.shared||this.split,this.outside=k(e3.outside,!!(t3.scrollablePixelsX||t3.scrollablePixelsY))}shouldStickOnContact(t3){return!!(!this.followPointer&&this.options.stickOnContact&&(!t3||this.pointer.inClass(t3.target,"highcharts-tooltip")))}move(t3,e3,i3,s2){let r2=this,o2=a(!r2.isHidden&&r2.options.animation),n2=r2.followPointer||(r2.len||0)>1,h2={x:t3,y:e3};n2||(h2.anchorX=i3,h2.anchorY=s2),o2.step=()=>r2.drawTracker(),r2.getLabel().animate(h2,o2)}refresh(t3,e3){let{chart:i3,options:s2,pointer:r2,shared:n2}=this,a2=w2(t3),l2=a2[0],d2=[],c2=s2.format,p2=s2.formatter||this.defaultFormatter,u2=i3.styledMode,f2={},m2=this.allowShared;if(!s2.enabled||!l2.series)return;o.clearTimeout(this.hideTimer),this.allowShared=!(!b(t3)&&t3.series&&t3.series.noSharedTooltip),m2=m2&&!this.allowShared,this.followPointer=!this.split&&l2.series.tooltipOptions.followPointer;let x2=this.getAnchor(t3,e3),v2=x2[0],C2=x2[1];n2&&this.allowShared?(r2.applyInactiveState(a2),a2.forEach((function(t4){t4.setState("hover"),d2.push(t4.getLabelConfig())})),(f2=l2.getLabelConfig()).points=d2):f2=l2.getLabelConfig(),this.len=d2.length;let M2=S(c2)?h(c2,f2,i3):p2.call(f2,this),T2=l2.series;if(this.distance=k(T2.tooltipOptions.distance,16),false===M2)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(M2,a2);else{let t4=v2,o2=C2;if(e3&&r2.isDirectTouch&&(t4=e3.chartX-i3.plotLeft,o2=e3.chartY-i3.plotTop),i3.polar||false===T2.options.clip||a2.some((e4=>r2.isDirectTouch||e4.series.shouldShowTooltip(t4,o2)))){let t5=this.getLabel(m2&&this.tt||{});(!s2.style.width||u2)&&t5.css({width:(this.outside?this.getPlayingField():i3.spacingBox).width+"px"}),t5.attr({class:this.getClassName(l2),text:M2&&M2.join?M2.join(""):M2}),this.outside&&t5.attr({x:g(t5.x||0,0,this.getPlayingField().width-(t5.width||0))}),u2||t5.attr({stroke:s2.borderColor||l2.color||T2.color||"#666666"}),this.updatePosition({plotX:v2,plotY:C2,negative:l2.negative,ttBelow:l2.ttBelow,h:x2[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=false}y(this,"refresh")}renderSplit(t3,e3){var _a;let i3=this,{chart:s2,chart:{chartWidth:r2,chartHeight:o2,plotHeight:n2,plotLeft:a2,plotTop:h2,scrollablePixelsY:l2=0,scrollablePixelsX:u2,styledMode:f2},distance:m2,options:y2,options:{positioner:b2},pointer:v2}=i3,{scrollLeft:C2=0,scrollTop:M2=0}=((_a=s2.scrollablePlotArea)==null?void 0:_a.scrollingContainer)||{},w3=i3.outside&&"number"!=typeof u2?d.documentElement.getBoundingClientRect():{left:C2,right:C2+r2},T2=i3.getLabel(),A2=this.renderer||s2.renderer,P=!!(s2.xAxis[0]&&s2.xAxis[0].opposite),{left:L,top:O}=v2.getChartPosition(),D=h2+M2,E=0,I=n2-l2;function j(t4,e4,s3,r3,o3=true){let n3,a3;return s3?(n3=P?0:I,a3=g(t4-r3/2,w3.left,w3.right-r3-(i3.outside?L:0))):(n3=e4-D,a3=g(a3=o3?t4-r3-m2:t4+m2,o3?a3:w3.left,w3.right)),{x:a3,y:n3}}S(t3)&&(t3=[false,t3]);let B=t3.slice(0,e3.length+1).reduce((function(t4,s3,r3){if(false!==s3&&""!==s3){let o3=e3[r3-1]||{isHeader:true,plotX:e3[0].plotX,plotY:n2,series:{}},l3=o3.isHeader,d2=l3?i3:o3.series,c2=d2.tt=function(t5,e4,s4){let r4=t5,{isHeader:o4,series:n3}=e4;if(!r4){let t6={padding:y2.padding,r:y2.borderRadius};f2||(t6.fill=y2.backgroundColor,t6["stroke-width"]=y2.borderWidth??1),r4=A2.label("",0,0,y2[o4?"headerShape":"shape"],void 0,void 0,y2.useHTML).addClass(i3.getClassName(e4,true,o4)).attr(t6).add(T2)}return r4.isActive=true,r4.attr({text:s4}),f2||r4.css(y2.style).attr({stroke:y2.borderColor||e4.color||n3.color||"#333333"}),r4}(d2.tt,o3,s3.toString()),p2=c2.getBBox(),u3=p2.width+c2.strokeWidth();l3&&(E=p2.height,I+=E,P&&(D-=E));let{anchorX:x2,anchorY:v3}=function(t5){let e4,i4;let{isHeader:s4,plotX:r4=0,plotY:o4=0,series:l4}=t5;if(s4)e4=Math.max(a2+r4,a2),i4=h2+n2/2;else{let{xAxis:t6,yAxis:s5}=l4;e4=t6.pos+g(r4,-m2,t6.len+m2),l4.shouldShowTooltip(0,s5.pos-h2+o4,{ignoreX:true})&&(i4=s5.pos+o4)}return{anchorX:e4=g(e4,w3.left-m2,w3.right+m2),anchorY:i4}}(o3);if("number"==typeof v3){let e4=p2.height+1,s4=b2?b2.call(i3,u3,e4,o3):j(x2,v3,l3,u3);t4.push({align:b2?0:void 0,anchorX:x2,anchorY:v3,boxWidth:u3,point:o3,rank:k(s4.rank,l3?1:0),size:e4,target:s4.y,tt:c2,x:s4.x})}else c2.isActive=false}return t4}),[]);!b2&&B.some((t4=>{let{outside:e4}=i3,s3=(e4?L:0)+t4.anchorX;return s3<w3.left&&s3+t4.boxWidth<w3.right||s3<L-w3.left+t4.boxWidth&&w3.right-s3>s3}))&&(B=B.map((t4=>{let{x:e4,y:i4}=j(t4.anchorX,t4.anchorY,t4.point.isHeader,t4.boxWidth,false);return x(t4,{target:i4,x:e4})}))),i3.cleanSplit(),p(B,I);let R={left:L,right:L};B.forEach((function(t4){let{x:e4,boxWidth:s3,isHeader:r3}=t4;!r3&&(i3.outside&&L+e4<R.left&&(R.left=L+e4),!r3&&i3.outside&&R.left+s3>R.right&&(R.right=L+e4))})),B.forEach((function(t4){let{x:e4,anchorX:s3,anchorY:r3,pos:o3,point:{isHeader:n3}}=t4,a3={visibility:void 0===o3?"hidden":"inherit",x:e4,y:(o3||0)+D,anchorX:s3,anchorY:r3};if(i3.outside&&e4<s3){let t5=L-R.left;t5>0&&(n3||(a3.x=e4+t5,a3.anchorX=s3+t5),n3&&(a3.x=(R.right-R.left)/2,a3.anchorX=s3+t5))}t4.tt.attr(a3)}));let{container:z,outside:N,renderer:W}=i3;if(N&&z&&W){let{width:t4,height:e4,x:i4,y:s3}=T2.getBBox();W.setSize(t4+i4,e4+s3,false),z.style.left=R.left+"px",z.style.top=O+"px"}c&&T2.attr({opacity:1===T2.opacity?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let t3=this.chart,e3=this.label,i3=this.shared?t3.hoverPoints:t3.hoverPoint;if(!e3||!i3)return;let s2={x:0,y:0,width:0,height:0},r2=this.getAnchor(i3),o2=e3.getBBox();r2[0]+=t3.plotLeft-(e3.translateX||0),r2[1]+=t3.plotTop-(e3.translateY||0),s2.x=Math.min(0,r2[0]),s2.y=Math.min(0,r2[1]),s2.width=r2[0]<0?Math.max(Math.abs(r2[0]),o2.width-r2[0]):Math.max(Math.abs(r2[0]),o2.width),s2.height=r2[1]<0?Math.max(Math.abs(r2[1]),o2.height-Math.abs(r2[1])):Math.max(Math.abs(r2[1]),o2.height),this.tracker?this.tracker.attr(s2):(this.tracker=e3.renderer.rect(s2).addClass("highcharts-tracker").add(e3),t3.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(t3){return t3.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}tooltipFooterHeaderFormatter(t3,e3){let i3=t3.series,s2=i3.tooltipOptions,r2=i3.xAxis,o2=r2&&r2.dateTime,n2={isFooter:e3,labelConfig:t3},a2=s2.xDateFormat,l2=s2[e3?"footerFormat":"headerFormat"];return y(this,"headerFormatter",n2,(function(e4){o2&&!a2&&v(t3.key)&&(a2=o2.getXDateFormat(t3.key,s2.dateTimeLabelFormats)),o2&&a2&&(t3.point&&t3.point.tooltipDateKeys||["key"]).forEach((function(t4){l2=l2.replace("{point."+t4+"}","{point."+t4+":"+a2+"}")})),i3.chart.styledMode&&(l2=this.styledModeFormat(l2)),e4.text=h(l2,{point:t3,series:i3},this.chart)})),n2.text}update(t3){this.destroy(),this.init(this.chart,C(true,this.options,t3))}updatePosition(t3){let{chart:e3,container:i3,distance:s2,options:r2,pointer:o2,renderer:n2}=this,{height:a2=0,width:h2=0}=this.getLabel(),{left:l2,top:d2,scaleX:c2,scaleY:p2}=o2.getChartPosition(),u2=(r2.positioner||this.getPosition).call(this,h2,a2,t3),g2=(t3.plotX||0)+e3.plotLeft,m2=(t3.plotY||0)+e3.plotTop,x2;n2&&i3&&(r2.positioner&&(u2.x+=l2-s2,u2.y+=d2-s2),x2=(r2.borderWidth||0)+2*s2+2,n2.setSize(h2+x2,a2+x2,false),(1!==c2||1!==p2)&&(f(i3,{transform:`scale(${c2}, ${p2})`}),g2*=c2,m2*=p2),g2+=l2-u2.x,m2+=d2-u2.y),this.move(Math.round(u2.x),Math.round(u2.y||0),g2,m2)}}return(n=A||(A={})).compose=function(t3){M(l,"Core.Tooltip")&&u(t3,"afterInit",(function(){let t4=this.chart;t4.options.tooltip&&(t4.tooltip=new n(t4,t4.options.tooltip,this))}))},A})),i(e,"Core/Series/Point.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r){let{animObject:o}=e2,{defaultOptions:n}=i2,{format:a}=s,{addEvent:h,crisp:l,erase:d,extend:c,fireEvent:p,getNestedProperty:u,isArray:g,isFunction:f,isNumber:m,isObject:x,merge:y,pick:b,syncTimeout:v,removeEvent:S,uniqueKey:C}=r;class k{animateBeforeDestroy(){let t3=this,e3={x:t3.startXPos,opacity:0},i3=t3.getGraphicalProps();i3.singular.forEach((function(i4){t3[i4]=t3[i4].animate("dataLabel"===i4?{x:t3[i4].startXPos,y:t3[i4].startYPos,opacity:0}:e3)})),i3.plural.forEach((function(e4){t3[e4].forEach((function(e5){e5.element&&e5.animate(c({x:t3.startXPos},e5.startYPos?{x:e5.startXPos,y:e5.startYPos}:{}))}))}))}applyOptions(t3,e3){let i3=this.series,s2=i3.options.pointValKey||i3.pointValKey;return c(this,t3=k.prototype.optionsToObject.call(this,t3)),this.options=this.options?c(this.options,t3):t3,t3.group&&delete this.group,t3.dataLabels&&delete this.dataLabels,s2&&(this.y=k.prototype.getNestedProperty.call(this,s2)),this.selected&&(this.state="select"),"name"in this&&void 0===e3&&i3.xAxis&&i3.xAxis.hasNames&&(this.x=i3.xAxis.nameToX(this)),void 0===this.x&&i3?this.x=e3??i3.autoIncrement():m(t3.x)&&i3.options.relativeXValue&&(this.x=i3.autoIncrement(t3.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let t3=this,e3=t3.series,i3=e3.chart,s2=e3.options.dataSorting,r2=i3.hoverPoints,n2=o(t3.series.chart.renderer.globalAnimation),a2=()=>{for(let e4 in(t3.graphic||t3.graphics||t3.dataLabel||t3.dataLabels)&&(S(t3),t3.destroyElements()),t3)delete t3[e4]};t3.legendItem&&i3.legend.destroyItem(t3),r2&&(t3.setState(),d(r2,t3),r2.length||(i3.hoverPoints=null)),t3===i3.hoverPoint&&t3.onMouseOut(),s2&&s2.enabled?(this.animateBeforeDestroy(),v(a2,n2.duration)):a2(),i3.pointCount--}this.destroyed=true}destroyElements(t3){let e3=this,i3=e3.getGraphicalProps(t3);i3.singular.forEach((function(t4){e3[t4]=e3[t4].destroy()})),i3.plural.forEach((function(t4){e3[t4].forEach((function(t5){t5&&t5.element&&t5.destroy()})),delete e3[t4]}))}firePointEvent(t3,e3,i3){let s2=this,r2=this.series.options;s2.manageEvent(t3),"click"===t3&&r2.allowPointSelect&&(i3=function(t4){!s2.destroyed&&s2.select&&s2.select(null,t4.ctrlKey||t4.metaKey||t4.shiftKey)}),p(s2,t3,e3,i3)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(t3){let e3,i3;let s2=this,r2=[],o2={singular:[],plural:[]};for((t3=t3||{graphic:1,dataLabel:1}).graphic&&r2.push("graphic","connector"),t3.dataLabel&&r2.push("dataLabel","dataLabelPath","dataLabelUpper"),i3=r2.length;i3--;)s2[e3=r2[i3]]&&o2.singular.push(e3);return["graphic","dataLabel"].forEach((function(e4){let i4=e4+"s";t3[e4]&&s2[i4]&&o2.plural.push(i4)})),o2}getLabelConfig(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}}getNestedProperty(t3){return t3?0===t3.indexOf("custom.")?u(t3,this.options):this[t3]:void 0}getZone(){let t3=this.series,e3=t3.zones,i3=t3.zoneAxis||"y",s2,r2=0;for(s2=e3[0];this[i3]>=s2.value;)s2=e3[++r2];return this.nonZonedColor||(this.nonZonedColor=this.color),s2&&s2.color&&!this.options.color?this.color=s2.color:this.color=this.nonZonedColor,s2}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(t3,e3,i3){this.formatPrefix="point",this.visible=true,this.series=t3,this.applyOptions(e3,i3),this.id??(this.id=C()),this.resolveColor(),t3.chart.pointCount++,p(this,"afterInit")}isValid(){return(m(this.x)||this.x instanceof Date)&&m(this.y)}optionsToObject(t3){let e3=this.series,i3=e3.options.keys,s2=i3||e3.pointArrayMap||["y"],r2=s2.length,o2={},n2,a2=0,h2=0;if(m(t3)||null===t3)o2[s2[0]]=t3;else if(g(t3))for(!i3&&t3.length>r2&&("string"==(n2=typeof t3[0])?o2.name=t3[0]:"number"===n2&&(o2.x=t3[0]),a2++);h2<r2;)i3&&void 0===t3[a2]||(s2[h2].indexOf(".")>0?k.prototype.setNestedProperty(o2,t3[a2],s2[h2]):o2[s2[h2]]=t3[a2]),a2++,h2++;else"object"==typeof t3&&(o2=t3,t3.dataLabels&&(e3.hasDataLabels=()=>true),t3.marker&&(e3._hasPointMarkers=true));return o2}pos(t3,e3=this.plotY){if(!this.destroyed){let{plotX:i3,series:s2}=this,{chart:r2,xAxis:o2,yAxis:n2}=s2,a2=0,h2=0;if(m(i3)&&m(e3))return t3&&(a2=o2?o2.pos:r2.plotLeft,h2=n2?n2.pos:r2.plotTop),r2.inverted&&o2&&n2?[n2.len-e3+h2,o2.len-i3+a2]:[i3+a2,e3+h2]}}resolveColor(){let t3=this.series,e3=t3.chart.options.chart,i3=t3.chart.styledMode,s2,r2,o2=e3.colorCount,n2;delete this.nonZonedColor,t3.options.colorByPoint?(i3||(s2=(r2=t3.options.colors||t3.chart.options.colors)[t3.colorCounter],o2=r2.length),n2=t3.colorCounter,t3.colorCounter++,t3.colorCounter===o2&&(t3.colorCounter=0)):(i3||(s2=t3.color),n2=t3.colorIndex),this.colorIndex=b(this.options.colorIndex,n2),this.color=b(this.options.color,s2)}setNestedProperty(t3,e3,i3){return i3.split(".").reduce((function(t4,i4,s2,r2){let o2=r2.length-1===s2;return t4[i4]=o2?e3:x(t4[i4],true)?t4[i4]:{},t4[i4]}),t3),t3}shouldDraw(){return!this.isNull}tooltipFormatter(t3){let e3=this.series,i3=e3.tooltipOptions,s2=b(i3.valueDecimals,""),r2=i3.valuePrefix||"",o2=i3.valueSuffix||"";return e3.chart.styledMode&&(t3=e3.chart.tooltip.styledModeFormat(t3)),(e3.pointArrayMap||["y"]).forEach((function(e4){e4="{point."+e4,(r2||o2)&&(t3=t3.replace(RegExp(e4+"}","g"),r2+e4+"}"+o2)),t3=t3.replace(RegExp(e4+"}","g"),e4+":,."+s2+"f}")})),a(t3,{point:this,series:this.series},e3.chart)}update(t3,e3,i3,s2){let r2;let o2=this,n2=o2.series,a2=o2.graphic,h2=n2.chart,l2=n2.options;function d2(){o2.applyOptions(t3);let s3=a2&&o2.hasMockGraphic,d3=null===o2.y?!s3:s3;a2&&d3&&(o2.graphic=a2.destroy(),delete o2.hasMockGraphic),x(t3,true)&&(a2&&a2.element&&t3&&t3.marker&&void 0!==t3.marker.symbol&&(o2.graphic=a2.destroy()),(t3==null?void 0:t3.dataLabels)&&o2.dataLabel&&(o2.dataLabel=o2.dataLabel.destroy())),r2=o2.index,n2.updateParallelArrays(o2,r2),l2.data[r2]=x(l2.data[r2],true)||x(t3,true)?o2.options:b(t3,l2.data[r2]),n2.isDirty=n2.isDirtyData=true,!n2.fixedBox&&n2.hasCartesianSeries&&(h2.isDirtyBox=true),"point"===l2.legendType&&(h2.isDirtyLegend=true),e3&&h2.redraw(i3)}e3=b(e3,true),false===s2?d2():o2.firePointEvent("update",{options:t3},d2)}remove(t3,e3){this.series.removePoint(this.series.data.indexOf(this),t3,e3)}select(t3,e3){let i3=this,s2=i3.series,r2=s2.chart;t3=b(t3,!i3.selected),this.selectedStaging=t3,i3.firePointEvent(t3?"select":"unselect",{accumulate:e3},(function(){i3.selected=i3.options.selected=t3,s2.options.data[s2.data.indexOf(i3)]=i3.options,i3.setState(t3&&"select"),e3||r2.getSelectedPoints().forEach((function(t4){let e4=t4.series;t4.selected&&t4!==i3&&(t4.selected=t4.options.selected=false,e4.options.data[e4.data.indexOf(t4)]=t4.options,t4.setState(r2.hoverPoints&&e4.options.inactiveOtherPoints?"inactive":""),t4.firePointEvent("unselect"))}))})),delete this.selectedStaging}onMouseOver(t3){let{inverted:e3,pointer:i3}=this.series.chart;i3&&(t3=t3?i3.normalize(t3):i3.getChartCoordinatesFromPoint(this,e3),i3.runPointActions(t3,this))}onMouseOut(){let t3=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t3.hoverPoints||[]).forEach((function(t4){t4.setState()})),t3.hoverPoints=t3.hoverPoint=null}manageEvent(t3){var _a,_b,_c,_d,_e,_f;let e3=y(this.series.options.point,this.options),i3=(_a=e3.events)==null?void 0:_a[t3];f(i3)&&(!((_b=this.hcEvents)==null?void 0:_b[t3])||((_d=(_c=this.hcEvents)==null?void 0:_c[t3])==null?void 0:_d.map((t4=>t4.fn)).indexOf(i3))===-1)?((_e=this.importedUserEvent)==null?void 0:_e.call(this),this.importedUserEvent=h(this,t3,i3)):this.importedUserEvent&&!i3&&((_f=this.hcEvents)==null?void 0:_f[t3])&&(S(this,t3),delete this.hcEvents[t3],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(e3,i3){var _a;let s2=this.series,r2=this.state,o2=s2.options.states[e3||"normal"]||{},a2=n.plotOptions[s2.type].marker&&s2.options.marker,h2=a2&&false===a2.enabled,l2=a2&&a2.states&&a2.states[e3||"normal"]||{},d2=false===l2.enabled,u2=this.marker||{},g2=s2.chart,f2=a2&&s2.markerAttribs,x2=s2.halo,y2,v2,S2,C2=s2.stateMarkerGraphic,k2;if((e3=e3||"")===this.state&&!i3||this.selected&&"select"!==e3||false===o2.enabled||e3&&(d2||h2&&false===l2.enabled)||e3&&u2.states&&u2.states[e3]&&false===u2.states[e3].enabled)return;if(this.state=e3,f2&&(y2=s2.markerAttribs(this,e3)),this.graphic&&!this.hasMockGraphic){if(r2&&this.graphic.removeClass("highcharts-point-"+r2),e3&&this.graphic.addClass("highcharts-point-"+e3),!g2.styledMode){v2=s2.pointAttribs(this,e3),S2=b(g2.options.chart.animation,o2.animation);let t3=v2.opacity;s2.options.inactiveOtherPoints&&m(t3)&&(this.dataLabels||[]).forEach((function(e4){e4&&!e4.hasClass("highcharts-data-label-hidden")&&(e4.animate({opacity:t3},S2),e4.connector&&e4.connector.animate({opacity:t3},S2))})),this.graphic.animate(v2,S2)}y2&&this.graphic.animate(y2,b(g2.options.chart.animation,l2.animation,a2.animation)),C2&&C2.hide()}else e3&&l2&&(k2=u2.symbol||s2.symbol,C2&&C2.currentSymbol!==k2&&(C2=C2.destroy()),y2&&(C2?C2[i3?"animate":"attr"]({x:y2.x,y:y2.y}):k2&&(s2.stateMarkerGraphic=C2=g2.renderer.symbol(k2,y2.x,y2.y,y2.width,y2.height).add(s2.markerGroup),C2.currentSymbol=k2)),!g2.styledMode&&C2&&"inactive"!==this.state&&C2.attr(s2.pointAttribs(this,e3))),C2&&(C2[e3&&this.isInside?"show":"hide"](),C2.element.point=this,C2.addClass(this.getClassName(),true));let M=o2.halo,w2=this.graphic||C2,T=w2&&w2.visibility||"inherit";M&&M.size&&w2&&"hidden"!==T&&!this.isCluster?(x2||(s2.halo=x2=g2.renderer.path().add(w2.parentGroup)),x2.show()[i3?"animate":"attr"]({d:this.haloPath(M.size)}),x2.attr({class:"highcharts-halo highcharts-color-"+b(this.colorIndex,s2.colorIndex)+(this.className?" "+this.className:""),visibility:T,zIndex:-1}),x2.point=this,g2.styledMode||x2.attr(c({fill:this.color||s2.color,"fill-opacity":M.opacity},t2.filterUserAttributes(M.attributes||{})))):((_a=x2==null?void 0:x2.point)==null?void 0:_a.haloPath)&&!x2.point.destroyed&&x2.animate({d:x2.point.haloPath(0)},null,x2.hide),p(this,"afterSetState",{state:e3})}haloPath(t3){let e3=this.pos();return e3?this.series.chart.renderer.symbols.circle(l(e3[0],1)-t3,e3[1]-t3,2*t3,2*t3):[]}}return k})),i(e,"Core/Pointer.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){var s;let{parse:r}=t2,{charts:o,composed:n,isTouchDevice:a}=e2,{addEvent:h,attr:l,css:d,extend:c,find:p,fireEvent:u,isNumber:g,isObject:f,objectEach:m,offset:x,pick:y,pushUnique:b,splat:v}=i2;class S{applyInactiveState(t3){let e3=[],i3;(t3||[]).forEach((function(t4){i3=t4.series,e3.push(i3),i3.linkedParent&&e3.push(i3.linkedParent),i3.linkedSeries&&(e3=e3.concat(i3.linkedSeries)),i3.navigatorSeries&&e3.push(i3.navigatorSeries)})),this.chart.series.forEach((function(t4){-1===e3.indexOf(t4)?t4.setState("inactive",true):t4.options.inactiveOtherPoints&&t4.setAllPointsToState("inactive")}))}destroy(){let t3=this;this.eventsToUnbind.forEach((t4=>t4())),this.eventsToUnbind=[],!e2.chartCount&&(S.unbindDocumentMouseUp&&S.unbindDocumentMouseUp.forEach((t4=>t4())),S.unbindDocumentTouchEnd&&(S.unbindDocumentTouchEnd=S.unbindDocumentTouchEnd())),clearInterval(t3.tooltipTimeout),m(t3,(function(e3,i3){t3[i3]=void 0}))}getSelectionMarkerAttrs(t3,e3){let i3={args:{chartX:t3,chartY:e3},attrs:{},shapeType:"rect"};return u(this,"getSelectionMarkerAttrs",i3,(i4=>{let s2;let{chart:r2,zoomHor:o2,zoomVert:n2}=this,{mouseDownX:a2=0,mouseDownY:h2=0}=r2,l2=i4.attrs;l2.x=r2.plotLeft,l2.y=r2.plotTop,l2.width=o2?1:r2.plotWidth,l2.height=n2?1:r2.plotHeight,o2&&(s2=t3-a2,l2.width=Math.max(1,Math.abs(s2)),l2.x=(s2>0?0:s2)+a2),n2&&(s2=e3-h2,l2.height=Math.max(1,Math.abs(s2)),l2.y=(s2>0?0:s2)+h2)})),i3}drag(t3){let{chart:e3}=this,{mouseDownX:i3=0,mouseDownY:s2=0}=e3,{panning:o2,panKey:n2,selectionMarkerFill:a2}=e3.options.chart,h2=e3.plotLeft,l2=e3.plotTop,d2=e3.plotWidth,c2=e3.plotHeight,p2=f(o2)?o2.enabled:o2,u2=n2&&t3[`${n2}Key`],g2=t3.chartX,m2=t3.chartY,x2,y2=this.selectionMarker;if((!y2||!y2.touch)&&(g2<h2?g2=h2:g2>h2+d2&&(g2=h2+d2),m2<l2?m2=l2:m2>l2+c2&&(m2=l2+c2),this.hasDragged=Math.sqrt(Math.pow(i3-g2,2)+Math.pow(s2-m2,2)),this.hasDragged>10)){x2=e3.isInsidePlot(i3-h2,s2-l2,{visiblePlotOnly:true});let{shapeType:n3,attrs:d3}=this.getSelectionMarkerAttrs(g2,m2);(e3.hasCartesianSeries||e3.mapView)&&this.hasZoom&&x2&&!u2&&!y2&&(this.selectionMarker=y2=e3.renderer[n3](),y2.attr({class:"highcharts-selection-marker",zIndex:7}).add(),e3.styledMode||y2.attr({fill:a2||r("#334eff").setOpacity(.25).get()})),y2&&y2.attr(d3),x2&&!y2&&p2&&e3.pan(t3,o2)}}dragStart(t3){let e3=this.chart;e3.mouseIsDown=t3.type,e3.cancelClick=false,e3.mouseDownX=t3.chartX,e3.mouseDownY=t3.chartY}getSelectionBox(t3){let e3={args:{marker:t3},result:t3.getBBox()};return u(this,"getSelectionBox",e3),e3.result}drop(t3){let e3;let{chart:i3,selectionMarker:s2}=this;for(let t4 of i3.axes)t4.isPanning&&(t4.isPanning=false,(t4.options.startOnTick||t4.options.endOnTick||t4.series.some((t5=>t5.boosted)))&&(t4.forceRedraw=true,t4.setExtremes(t4.userMin,t4.userMax,false),e3=true));if(e3&&i3.redraw(),s2&&t3){if(this.hasDragged){let e4=this.getSelectionBox(s2);i3.transform({axes:i3.axes.filter((t4=>t4.zoomEnabled&&("xAxis"===t4.coll&&this.zoomX||"yAxis"===t4.coll&&this.zoomY))),selection:{originalEvent:t3,xAxis:[],yAxis:[],...e4},from:e4})}g(i3.index)&&(this.selectionMarker=s2.destroy())}i3&&g(i3.index)&&(d(i3.container,{cursor:i3._cursor}),i3.cancelClick=this.hasDragged>10,i3.mouseIsDown=false,this.hasDragged=0,this.pinchDown=[])}findNearestKDPoint(t3,e3,i3){let s2;return t3.forEach((function(t4){let r2=!(t4.noSharedTooltip&&e3)&&0>t4.options.findNearestPointBy.indexOf("y"),o2=t4.searchPoint(i3,r2);f(o2,true)&&o2.series&&(!f(s2,true)||function(t5,i4){var _a,_b;let s3=t5.distX-i4.distX,r3=t5.dist-i4.dist,o3=((_a=i4.series.group)==null?void 0:_a.zIndex)-((_b=t5.series.group)==null?void 0:_b.zIndex);return 0!==s3&&e3?s3:0!==r3?r3:0!==o3?o3:t5.series.index>i4.series.index?-1:1}(s2,o2)>0)&&(s2=o2)})),s2}getChartCoordinatesFromPoint(t3,e3){let{xAxis:i3,yAxis:s2}=t3.series,r2=t3.shapeArgs;if(i3&&s2){let o2=t3.clientX??t3.plotX??0,n2=t3.plotY||0;return t3.isNode&&r2&&g(r2.x)&&g(r2.y)&&(o2=r2.x,n2=r2.y),e3?{chartX:s2.len+s2.pos-n2,chartY:i3.len+i3.pos-o2}:{chartX:o2+i3.pos,chartY:n2+s2.pos}}if(r2&&r2.x&&r2.y)return{chartX:r2.x,chartY:r2.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:t3}=this.chart,e3=x(t3);this.chartPosition={left:e3.left,top:e3.top,scaleX:1,scaleY:1};let{offsetHeight:i3,offsetWidth:s2}=t3;return s2>2&&i3>2&&(this.chartPosition.scaleX=e3.width/s2,this.chartPosition.scaleY=e3.height/i3),this.chartPosition}getCoordinates(t3){let e3={xAxis:[],yAxis:[]};for(let i3 of this.chart.axes)e3[i3.isXAxis?"xAxis":"yAxis"].push({axis:i3,value:i3.toValue(t3[i3.horiz?"chartX":"chartY"])});return e3}getHoverData(t3,e3,i3,s2,r2,o2){let n2=[],a2=function(t4){return t4.visible&&!(!r2&&t4.directTouch)&&y(t4.options.enableMouseTracking,true)},h2=e3,l2,d2={chartX:o2?o2.chartX:void 0,chartY:o2?o2.chartY:void 0,shared:r2};u(this,"beforeGetHoverData",d2),l2=h2&&!h2.stickyTracking?[h2]:i3.filter((t4=>t4.stickyTracking&&(d2.filter||a2)(t4)));let c2=s2&&t3||!o2?t3:this.findNearestKDPoint(l2,r2,o2);return h2=c2&&c2.series,c2&&(r2&&!h2.noSharedTooltip?(l2=i3.filter((function(t4){return d2.filter?d2.filter(t4):a2(t4)&&!t4.noSharedTooltip}))).forEach((function(t4){let e4=p(t4.points,(function(t5){return t5.x===c2.x&&!t5.isNull}));f(e4)&&(t4.boosted&&t4.boost&&(e4=t4.boost.getPoint(e4)),n2.push(e4))})):n2.push(c2)),u(this,"afterGetHoverData",d2={hoverPoint:c2}),{hoverPoint:d2.hoverPoint,hoverSeries:h2,hoverPoints:n2}}getPointFromEvent(t3){let e3=t3.target,i3;for(;e3&&!i3;)i3=e3.point,e3=e3.parentNode;return i3}onTrackerMouseOut(t3){let e3=this.chart,i3=t3.relatedTarget,s2=e3.hoverSeries;this.isDirectTouch=false,!s2||!i3||s2.stickyTracking||this.inClass(i3,"highcharts-tooltip")||this.inClass(i3,"highcharts-series-"+s2.index)&&this.inClass(i3,"highcharts-tracker")||s2.onMouseOut()}inClass(t3,e3){let i3=t3,s2;for(;i3;){if(s2=l(i3,"class")){if(-1!==s2.indexOf(e3))return true;if(-1!==s2.indexOf("highcharts-container"))return false}i3=i3.parentElement}}constructor(t3,e3){var _a;this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=e3,this.chart=t3,this.runChartClick=!!((_a=e3.chart.events)==null?void 0:_a.click),this.pinchDown=[],this.setDOMEvents(),u(this,"afterInit")}normalize(t3,e3){let i3=t3.touches,s2=i3?i3.length?i3.item(0):y(i3.changedTouches,t3.changedTouches)[0]:t3;e3||(e3=this.getChartPosition());let r2=s2.pageX-e3.left,o2=s2.pageY-e3.top;return c(t3,{chartX:Math.round(r2/=e3.scaleX),chartY:Math.round(o2/=e3.scaleY)})}onContainerClick(t3){let e3=this.chart,i3=e3.hoverPoint,s2=this.normalize(t3),r2=e3.plotLeft,o2=e3.plotTop;!e3.cancelClick&&(i3&&this.inClass(s2.target,"highcharts-tracker")?(u(i3.series,"click",c(s2,{point:i3})),e3.hoverPoint&&i3.firePointEvent("click",s2)):(c(s2,this.getCoordinates(s2)),e3.isInsidePlot(s2.chartX-r2,s2.chartY-o2,{visiblePlotOnly:true})&&u(e3,"click",s2)))}onContainerMouseDown(t3){var _a;let i3=(1&(t3.buttons||t3.button))==1;t3=this.normalize(t3),e2.isFirefox&&0!==t3.button&&this.onContainerMouseMove(t3),(void 0===t3.button||i3)&&(this.zoomOption(t3),i3&&((_a=t3.preventDefault)==null?void 0:_a.call(t3)),this.dragStart(t3))}onContainerMouseLeave(t3){let{pointer:e3}=o[y(S.hoverChartIndex,-1)]||{};t3=this.normalize(t3),this.onContainerMouseMove(t3),e3&&!this.inClass(t3.relatedTarget,"highcharts-tooltip")&&(e3.reset(),e3.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(t3){let e3=this.chart,i3=e3.tooltip,s2=this.normalize(t3);this.setHoverChartIndex(t3),("mousedown"===e3.mouseIsDown||this.touchSelect(s2))&&this.drag(s2),!e3.openMenu&&(this.inClass(s2.target,"highcharts-tracker")||e3.isInsidePlot(s2.chartX-e3.plotLeft,s2.chartY-e3.plotTop,{visiblePlotOnly:true}))&&!(i3&&i3.shouldStickOnContact(s2))&&(this.inClass(s2.target,"highcharts-no-tooltip")?this.reset(false,0):this.runPointActions(s2))}onDocumentTouchEnd(t3){this.onDocumentMouseUp(t3)}onContainerTouchMove(t3){this.touchSelect(t3)?this.onContainerMouseMove(t3):this.touch(t3)}onContainerTouchStart(t3){this.touchSelect(t3)?this.onContainerMouseDown(t3):(this.zoomOption(t3),this.touch(t3,true))}onDocumentMouseMove(t3){let e3=this.chart,i3=e3.tooltip,s2=this.chartPosition,r2=this.normalize(t3,s2);!s2||e3.isInsidePlot(r2.chartX-e3.plotLeft,r2.chartY-e3.plotTop,{visiblePlotOnly:true})||i3&&i3.shouldStickOnContact(r2)||r2.target!==e3.container.ownerDocument&&this.inClass(r2.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(t3){var _a,_b;(_b=(_a=o[y(S.hoverChartIndex,-1)])==null?void 0:_a.pointer)==null?void 0:_b.drop(t3)}pinch(t3){let e3=this,{chart:i3,hasZoom:s2,lastTouches:r2}=e3,o2=[].map.call(t3.touches||[],(t4=>e3.normalize(t4))),n2=o2.length,a2=1===n2&&(e3.inClass(t3.target,"highcharts-tracker")&&i3.runTrackerClick||e3.runChartClick),h2=i3.tooltip,l2=1===n2&&y(h2==null?void 0:h2.options.followTouchMove,true);n2>1?e3.initiated=true:l2&&(e3.initiated=false),s2&&e3.initiated&&!a2&&false!==t3.cancelable&&t3.preventDefault(),"touchstart"===t3.type?(e3.pinchDown=o2,e3.res=true,i3.mouseDownX=t3.chartX):l2?this.runPointActions(e3.normalize(t3)):r2&&(u(i3,"touchpan",{originalEvent:t3,touches:o2},(()=>{let e4=t4=>{let e5=t4[0],i4=t4[1]||e5;return{x:e5.chartX,y:e5.chartY,width:i4.chartX-e5.chartX,height:i4.chartY-e5.chartY}};i3.transform({axes:i3.axes.filter((t4=>t4.zoomEnabled&&(this.zoomHor&&t4.horiz||this.zoomVert&&!t4.horiz))),to:e4(o2),from:e4(r2),trigger:t3.type})})),e3.res&&(e3.res=false,this.reset(false,0))),e3.lastTouches=o2}reset(t3,e3){let i3=this.chart,s2=i3.hoverSeries,r2=i3.hoverPoint,o2=i3.hoverPoints,n2=i3.tooltip,a2=n2&&n2.shared?o2:r2;t3&&a2&&v(a2).forEach((function(e4){e4.series.isCartesian&&void 0===e4.plotX&&(t3=false)})),t3?n2&&a2&&v(a2).length&&(n2.refresh(a2),n2.shared&&o2?o2.forEach((function(t4){t4.setState(t4.state,true),t4.series.isCartesian&&(t4.series.xAxis.crosshair&&t4.series.xAxis.drawCrosshair(null,t4),t4.series.yAxis.crosshair&&t4.series.yAxis.drawCrosshair(null,t4))})):r2&&(r2.setState(r2.state,true),i3.axes.forEach((function(t4){t4.crosshair&&r2.series[t4.coll]===t4&&t4.drawCrosshair(null,r2)})))):(r2&&r2.onMouseOut(),o2&&o2.forEach((function(t4){t4.setState()})),s2&&s2.onMouseOut(),n2&&n2.hide(e3),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i3.axes.forEach((function(t4){t4.hideCrosshair()})),i3.hoverPoints=i3.hoverPoint=void 0)}runPointActions(t3,e3,i3){let s2=this.chart,r2=s2.series,n2=s2.tooltip&&s2.tooltip.options.enabled?s2.tooltip:void 0,a2=!!n2&&n2.shared,l2=e3||s2.hoverPoint,d2=l2&&l2.series||s2.hoverSeries,c2=(!t3||"touchmove"!==t3.type)&&(!!e3||d2&&d2.directTouch&&this.isDirectTouch),u2=this.getHoverData(l2,d2,r2,c2,a2,t3);l2=u2.hoverPoint,d2=u2.hoverSeries;let g2=u2.hoverPoints,f2=d2&&d2.tooltipOptions.followPointer&&!d2.tooltipOptions.split,m2=a2&&d2&&!d2.noSharedTooltip;if(l2&&(i3||l2!==s2.hoverPoint||n2&&n2.isHidden)){if((s2.hoverPoints||[]).forEach((function(t4){-1===g2.indexOf(t4)&&t4.setState()})),s2.hoverSeries!==d2&&d2.onMouseOver(),this.applyInactiveState(g2),(g2||[]).forEach((function(t4){t4.setState("hover")})),s2.hoverPoint&&s2.hoverPoint.firePointEvent("mouseOut"),!l2.series)return;s2.hoverPoints=g2,s2.hoverPoint=l2,l2.firePointEvent("mouseOver",void 0,(()=>{n2&&l2&&n2.refresh(m2?g2:l2,t3)}))}else if(f2&&n2&&!n2.isHidden){let e4=n2.getAnchor([{}],t3);s2.isInsidePlot(e4[0],e4[1],{visiblePlotOnly:true})&&n2.updatePosition({plotX:e4[0],plotY:e4[1]})}this.unDocMouseMove||(this.unDocMouseMove=h(s2.container.ownerDocument,"mousemove",(t4=>{var _a,_b;return(_b=(_a=o[S.hoverChartIndex??-1])==null?void 0:_a.pointer)==null?void 0:_b.onDocumentMouseMove(t4)})),this.eventsToUnbind.push(this.unDocMouseMove)),s2.axes.forEach((function(e4){let i4;let r3=y((e4.crosshair||{}).snap,true);!r3||(i4=s2.hoverPoint)&&i4.series[e4.coll]===e4||(i4=p(g2,(t4=>t4.series&&t4.series[e4.coll]===e4))),i4||!r3?e4.drawCrosshair(t3,i4):e4.hideCrosshair()}))}setDOMEvents(){let t3=this.chart.container,e3=t3.ownerDocument;t3.onmousedown=this.onContainerMouseDown.bind(this),t3.onmousemove=this.onContainerMouseMove.bind(this),t3.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(h(t3,"mouseenter",this.onContainerMouseEnter.bind(this)),h(t3,"mouseleave",this.onContainerMouseLeave.bind(this))),S.unbindDocumentMouseUp||(S.unbindDocumentMouseUp=[]),S.unbindDocumentMouseUp.push(h(e3,"mouseup",this.onDocumentMouseUp.bind(this)));let i3=this.chart.renderTo.parentElement;for(;i3&&"BODY"!==i3.tagName;)this.eventsToUnbind.push(h(i3,"scroll",(()=>{delete this.chartPosition}))),i3=i3.parentElement;this.eventsToUnbind.push(h(t3,"touchstart",this.onContainerTouchStart.bind(this),{passive:false}),h(t3,"touchmove",this.onContainerTouchMove.bind(this),{passive:false})),S.unbindDocumentTouchEnd||(S.unbindDocumentTouchEnd=h(e3,"touchend",this.onDocumentTouchEnd.bind(this),{passive:false})),this.setPointerCapture(),h(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){var _a,_b;if(!a)return;let t3=this.pointerCaptureEventsToUnbind,e3=this.chart,i3=e3.container,s2=y((_a=e3.options.tooltip)==null?void 0:_a.followTouchMove,true)&&e3.series.some((t4=>t4.options.findNearestPointBy.indexOf("y")>-1));!this.hasPointerCapture&&s2?(t3.push(h(i3,"pointerdown",(t4=>{var _a2,_b2;((_a2=t4.target)==null?void 0:_a2.hasPointerCapture(t4.pointerId))&&((_b2=t4.target)==null?void 0:_b2.releasePointerCapture(t4.pointerId))})),h(i3,"pointermove",(t4=>{var _a2,_b2;(_b2=(_a2=e3.pointer)==null?void 0:_a2.getPointFromEvent(t4))==null?void 0:_b2.onMouseOver(t4)}))),e3.styledMode||d(i3,{"touch-action":"none"}),i3.className+=" highcharts-no-touch-action",this.hasPointerCapture=true):this.hasPointerCapture&&!s2&&(t3.forEach((t4=>t4())),t3.length=0,e3.styledMode||d(i3,{"touch-action":y((_b=e3.options.chart.style)==null?void 0:_b["touch-action"],"manipulation")}),i3.className=i3.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=false)}setHoverChartIndex(t3){var _a;let i3=this.chart,s2=e2.charts[y(S.hoverChartIndex,-1)];if(s2&&s2!==i3){let e3={relatedTarget:i3.container};t3&&!(t3==null?void 0:t3.relatedTarget)&&(t3={...e3,...t3}),(_a=s2.pointer)==null?void 0:_a.onContainerMouseLeave(t3||e3)}s2&&s2.mouseIsDown||(S.hoverChartIndex=i3.index)}touch(t3,e3){let i3;let{chart:s2,pinchDown:r2=[]}=this;this.setHoverChartIndex(),1===(t3=this.normalize(t3)).touches.length?s2.isInsidePlot(t3.chartX-s2.plotLeft,t3.chartY-s2.plotTop,{visiblePlotOnly:true})&&!s2.openMenu?(e3&&this.runPointActions(t3),"touchmove"===t3.type&&(i3=!!r2[0]&&Math.pow(r2[0].chartX-t3.chartX,2)+Math.pow(r2[0].chartY-t3.chartY,2)>=16),y(i3,true)&&this.pinch(t3)):e3&&this.reset():2===t3.touches.length&&this.pinch(t3)}touchSelect(t3){return!!(this.chart.zooming.singleTouch&&t3.touches&&1===t3.touches.length)}zoomOption(t3){let e3=this.chart,i3=e3.inverted,s2=e3.zooming.type||"",r2,o2;/touch/.test(t3.type)&&(s2=y(e3.zooming.pinchType,s2)),this.zoomX=r2=/x/.test(s2),this.zoomY=o2=/y/.test(s2),this.zoomHor=r2&&!i3||o2&&i3,this.zoomVert=o2&&!i3||r2&&i3,this.hasZoom=r2||o2}}return(s=S||(S={})).compose=function(t3){b(n,"Core.Pointer")&&h(t3,"beforeRender",(function(){this.pointer=new s(this,this.options)}))},S})),i(e,"Core/Legend/LegendSymbol.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{extend:i2,merge:s,pick:r}=t2;return function(t3){function e3(t4,e4,o){var _a,_b;let n=this.legendItem=this.legendItem||{},{chart:a,options:h}=this,{baseline:l=0,symbolWidth:d,symbolHeight:c}=t4,p=this.symbol||"circle",u=c/2,g=a.renderer,f=n.group,m=l-Math.round((((_a=t4.fontMetrics)==null?void 0:_a.b)||c)*(o?.4:.3)),x={},y,b=h.marker,v=0;if(a.styledMode||(x["stroke-width"]=Math.min(h.lineWidth||0,24),h.dashStyle?x.dashstyle=h.dashStyle:"square"===h.linecap||(x["stroke-linecap"]="round")),n.line=g.path().addClass("highcharts-graph").attr(x).add(f),o&&(n.area=g.path().addClass("highcharts-area").add(f)),x["stroke-linecap"]&&(v=Math.min(n.line.strokeWidth(),d)/2),d){let t5=[["M",v,m],["L",d-v,m]];n.line.attr({d:t5}),(_b=n.area)==null?void 0:_b.attr({d:[...t5,["L",d-v,l],["L",v,l]]})}if(b&&false!==b.enabled&&d){let t5=Math.min(r(b.radius,u),u);0===p.indexOf("url")&&(b=s(b,{width:c,height:c}),t5=0),n.symbol=y=g.symbol(p,d/2-t5,m-t5,2*t5,2*t5,i2({context:"legend"},b)).addClass("highcharts-point").add(f),y.isMarker=true}}t3.areaMarker=function(t4,i3){e3.call(this,t4,i3,true)},t3.lineMarker=e3,t3.rectangle=function(t4,e4){let i3=e4.legendItem||{},s2=t4.options,o=t4.symbolHeight,n=s2.squareSymbol,a=n?o:t4.symbolWidth;i3.symbol=this.chart.renderer.rect(n?(t4.symbolWidth-o)/2:0,t4.baseline-o+1,a,o,r(t4.options.symbolRadius,o/2)).addClass("highcharts-point").attr({zIndex:3}).add(i3.group)}}(e2||(e2={})),e2})),i(e,"Core/Series/SeriesDefaults.js",[],(function(){return{lineWidth:2,allowPointSelect:false,crisp:true,showCheckbox:false,animation:{duration:1e3},enableMouseTracking:true,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:true},hover:{animation:{duration:150},enabled:true,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:true,formatter:function(){let{numberFormatter:t2}=this.series.chart;return"number"!=typeof this.y?"":t2(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:true,states:{normal:{animation:true},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:true,turboThreshold:1e3,findNearestPointBy:"x"}})),i(e,"Core/Series/SeriesRegistry.js",[e["Core/Globals.js"],e["Core/Defaults.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){var r;let{defaultOptions:o}=e2,{extend:n,extendClass:a,merge:h}=s;return function(e3){function s2(t3,s3){let r2=o.plotOptions||{},n2=s3.defaultOptions,a2=s3.prototype;return a2.type=t3,a2.pointClass||(a2.pointClass=i2),!e3.seriesTypes[t3]&&(n2&&(r2[t3]=n2),e3.seriesTypes[t3]=s3,true)}e3.seriesTypes=t2.seriesTypes,e3.registerSeriesType=s2,e3.seriesType=function(t3,r2,l,d,c){let p=o.plotOptions||{};if(r2=r2||"",p[t3]=h(p[r2],l),delete e3.seriesTypes[t3],s2(t3,a(e3.seriesTypes[r2]||function(){},d)),e3.seriesTypes[t3].prototype.type=t3,c){class s3 extends i2{}n(s3.prototype,c),e3.seriesTypes[t3].prototype.pointClass=s3}return e3.seriesTypes[t3]}}(r||(r={})),r})),i(e,"Core/Series/Series.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/Point.js"],e["Core/Series/SeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n,a,h,l){let{animObject:d,setAnimation:c}=t2,{defaultOptions:p}=e2,{registerEventOptions:u}=i2,{svg:g,win:f}=s,{seriesTypes:m}=a,{arrayMax:x,arrayMin:y,clamp:b,correctFloat:v,crisp:S,defined:C,destroyObjectProperties:k,diffObjects:M,erase:w2,error:T,extend:A,find:P,fireEvent:L,getClosestDistance:O,getNestedProperty:D,insertItem:E,isArray:I,isNumber:j,isString:B,merge:R,objectEach:z,pick:N,removeEvent:W,splat:G,syncTimeout:H}=l;class X{constructor(){this.zoneAxis="y"}init(t3,e3){let i3;L(this,"init",{options:e3});let s2=this,r2=t3.series;this.eventsToUnbind=[],s2.chart=t3,s2.options=s2.setOptions(e3);let o2=s2.options,n2=false!==o2.visible;s2.linkedSeries=[],s2.bindAxes(),A(s2,{name:o2.name,state:"",visible:n2,selected:true===o2.selected}),u(this,o2);let a2=o2.events;(a2&&a2.click||o2.point&&o2.point.events&&o2.point.events.click||o2.allowPointSelect)&&(t3.runTrackerClick=true),s2.getColor(),s2.getSymbol(),s2.parallelArrays.forEach((function(t4){s2[t4+"Data"]||(s2[t4+"Data"]=[])})),s2.isCartesian&&(t3.hasCartesianSeries=true),r2.length&&(i3=r2[r2.length-1]),s2._i=N(i3&&i3._i,-1)+1,s2.opacity=s2.options.opacity,t3.orderItems("series",E(this,r2)),o2.dataSorting&&o2.dataSorting.enabled?s2.setDataSortingOptions():s2.points||s2.data||s2.setData(o2.data,false),L(this,"afterInit")}is(t3){return m[t3]&&this instanceof m[t3]}bindAxes(){let t3;let e3=this,i3=e3.options,s2=e3.chart;L(this,"bindAxes",null,(function(){(e3.axisTypes||[]).forEach((function(r2){(s2[r2]||[]).forEach((function(s3){t3=s3.options,(N(i3[r2],0)===s3.index||void 0!==i3[r2]&&i3[r2]===t3.id)&&(E(e3,s3.series),e3[r2]=s3,s3.isDirty=true)})),e3[r2]||e3.optionalAxis===r2||T(18,true,s2)}))})),L(this,"afterBindAxes")}updateParallelArrays(t3,e3,i3){let s2=t3.series,r2=j(e3)?function(i4){let r3="y"===i4&&s2.toYData?s2.toYData(t3):t3[i4];s2[i4+"Data"][e3]=r3}:function(t4){Array.prototype[e3].apply(s2[t4+"Data"],i3)};s2.parallelArrays.forEach(r2)}hasData(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&this.yData.length>0}hasMarkerChanged(t3,e3){let i3=t3.marker,s2=e3.marker||{};return i3&&(s2.enabled&&!i3.enabled||s2.symbol!==i3.symbol||s2.height!==i3.height||s2.width!==i3.width)}autoIncrement(t3){let e3=this.options,i3=e3.pointIntervalUnit,s2=e3.relativeXValue,r2=this.chart.time,o2=this.xIncrement,n2,a2;return(o2=N(o2,e3.pointStart,0),this.pointInterval=a2=N(this.pointInterval,e3.pointInterval,1),s2&&j(t3)&&(a2*=t3),i3&&(n2=new r2.Date(o2),"day"===i3?r2.set("Date",n2,r2.get("Date",n2)+a2):"month"===i3?r2.set("Month",n2,r2.get("Month",n2)+a2):"year"===i3&&r2.set("FullYear",n2,r2.get("FullYear",n2)+a2),a2=n2.getTime()-o2),s2&&j(t3))?o2+a2:(this.xIncrement=o2+a2,o2)}setDataSortingOptions(){let t3=this.options;A(this,{requireSorting:false,sorted:false,enabledDataSorting:true,allowDG:false}),C(t3.pointRange)||(t3.pointRange=1)}setOptions(t3){var _a,_b;let e3;let i3=this.chart,s2=i3.options.plotOptions,r2=i3.userOptions||{},o2=R(t3),n2=i3.styledMode,a2={plotOptions:s2,userOptions:o2};L(this,"setOptions",a2);let h2=a2.plotOptions[this.type],l2=r2.plotOptions||{},d2=l2.series||{},c2=p.plotOptions[this.type]||{},u2=l2[this.type]||{};this.userOptions=a2.userOptions;let g2=R(h2,s2.series,u2,o2);this.tooltipOptions=R(p.tooltip,(_a=p.plotOptions.series)==null?void 0:_a.tooltip,c2==null?void 0:c2.tooltip,i3.userOptions.tooltip,(_b=l2.series)==null?void 0:_b.tooltip,u2.tooltip,o2.tooltip),this.stickyTracking=N(o2.stickyTracking,u2.stickyTracking,d2.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||g2.stickyTracking),null===h2.marker&&delete g2.marker,this.zoneAxis=g2.zoneAxis||"y";let f2=this.zones=(g2.zones||[]).map((t4=>({...t4})));return(g2.negativeColor||g2.negativeFillColor)&&!g2.zones&&(e3={value:g2[this.zoneAxis+"Threshold"]||g2.threshold||0,className:"highcharts-negative"},n2||(e3.color=g2.negativeColor,e3.fillColor=g2.negativeFillColor),f2.push(e3)),f2.length&&C(f2[f2.length-1].value)&&f2.push(n2?{}:{color:this.color,fillColor:this.fillColor}),L(this,"afterSetOptions",{options:g2}),g2}getName(){return N(this.options.name,"Series "+(this.index+1))}getCyclic(t3,e3,i3){let s2,r2;let o2=this.chart,n2=`${t3}Index`,a2=`${t3}Counter`,h2=(i3==null?void 0:i3.length)||o2.options.chart.colorCount;!e3&&(C(r2=N("color"===t3?this.options.colorIndex:void 0,this[n2]))?s2=r2:(o2.series.length||(o2[a2]=0),s2=o2[a2]%h2,o2[a2]+=1),i3&&(e3=i3[s2])),void 0!==s2&&(this[n2]=s2),this[t3]=e3}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||p.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let t3=this.options.marker;this.getCyclic("symbol",t3.symbol,this.chart.options.symbols)}findPointIndex(t3,e3){let i3,s2,r2;let n2=t3.id,a2=t3.x,h2=this.points,l2=this.options.dataSorting;if(n2){let t4=this.chart.get(n2);t4 instanceof o&&(i3=t4)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let e4=e5=>!e5.touched&&e5.index===t3.index;if(l2&&l2.matchByName?e4=e5=>!e5.touched&&e5.name===t3.name:this.options.relativeXValue&&(e4=e5=>!e5.touched&&e5.options.x===t3.x),!(i3=P(h2,e4)))return}return i3&&void 0!==(r2=i3&&i3.index)&&(s2=true),void 0===r2&&j(a2)&&(r2=this.xData.indexOf(a2,e3)),-1!==r2&&void 0!==r2&&this.cropped&&(r2=r2>=this.cropStart?r2-this.cropStart:r2),!s2&&j(r2)&&h2[r2]&&h2[r2].touched&&(r2=void 0),r2}updateData(t3,e3){let i3=this.options,s2=i3.dataSorting,r2=this.points,o2=[],n2=this.requireSorting,a2=t3.length===r2.length,h2,l2,d2,c2,p2=true;if(this.xIncrement=null,t3.forEach((function(t4,e4){let l3;let d3=C(t4)&&this.pointClass.prototype.optionsToObject.call({series:this},t4)||{},p3=d3.x;d3.id||j(p3)?(-1===(l3=this.findPointIndex(d3,c2))||void 0===l3?o2.push(t4):r2[l3]&&t4!==i3.data[l3]?(r2[l3].update(t4,false,null,false),r2[l3].touched=true,n2&&(c2=l3+1)):r2[l3]&&(r2[l3].touched=true),(!a2||e4!==l3||s2&&s2.enabled||this.hasDerivedData)&&(h2=true)):o2.push(t4)}),this),h2)for(l2=r2.length;l2--;)(d2=r2[l2])&&!d2.touched&&d2.remove&&d2.remove(false,e3);else!a2||s2&&s2.enabled?p2=false:(t3.forEach((function(t4,e4){t4===r2[e4].y||r2[e4].destroyed||r2[e4].update(t4,false,null,false)})),o2.length=0);return r2.forEach((function(t4){t4&&(t4.touched=false)})),!!p2&&(o2.forEach((function(t4){this.addPoint(t4,false,null,null,false)}),this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=x(this.xData),this.autoIncrement()),true)}setData(t3,e3=true,i3,s2){var _a;let r2=this,o2=r2.points,n2=o2&&o2.length||0,a2=r2.options,h2=r2.chart,l2=a2.dataSorting,d2=r2.xAxis,c2=a2.turboThreshold,p2=this.xData,u2=this.yData,g2=r2.pointArrayMap,f2=g2&&g2.length,m2=a2.keys,x2,y2,b2,v2=0,S2=1,C2;h2.options.chart.allowMutatingData||(a2.data&&delete r2.options.data,r2.userOptions.data&&delete r2.userOptions.data,C2=R(true,t3));let k2=(t3=C2||t3||[]).length;if(l2&&l2.enabled&&(t3=this.sortData(t3)),h2.options.chart.allowMutatingData&&false!==s2&&k2&&n2&&!r2.cropped&&!r2.hasGroupedData&&r2.visible&&!r2.boosted&&(b2=this.updateData(t3,i3)),!b2){r2.xIncrement=null,r2.colorCounter=0,this.parallelArrays.forEach((function(t4){r2[t4+"Data"].length=0}));let e4=c2&&k2>c2;if(e4){let i4=r2.getFirstValidPoint(t3),s3=r2.getFirstValidPoint(t3,k2-1,-1),o3=t4=>!!(I(t4)&&(m2||j(t4[0])));if(j(i4)&&j(s3))for(x2=0;x2<k2;x2++)p2[x2]=this.autoIncrement(),u2[x2]=t3[x2];else if(o3(i4)&&o3(s3)){if(f2){if(i4.length===f2)for(x2=0;x2<k2;x2++)p2[x2]=this.autoIncrement(),u2[x2]=t3[x2];else for(x2=0;x2<k2;x2++)y2=t3[x2],p2[x2]=y2[0],u2[x2]=y2.slice(1,f2+1)}else if(m2&&(v2=m2.indexOf("x"),S2=m2.indexOf("y"),v2=v2>=0?v2:0,S2=S2>=0?S2:1),1===i4.length&&(S2=0),v2===S2)for(x2=0;x2<k2;x2++)p2[x2]=this.autoIncrement(),u2[x2]=t3[x2][S2];else for(x2=0;x2<k2;x2++)y2=t3[x2],p2[x2]=y2[v2],u2[x2]=y2[S2]}else e4=false}if(!e4)for(x2=0;x2<k2;x2++)y2={series:r2},r2.pointClass.prototype.applyOptions.apply(y2,[t3[x2]]),r2.updateParallelArrays(y2,x2);for(u2&&B(u2[0])&&T(14,true,h2),r2.data=[],r2.options.data=r2.userOptions.data=t3,x2=n2;x2--;)(_a=o2[x2])==null?void 0:_a.destroy();d2&&(d2.minRange=d2.userMinRange),r2.isDirty=h2.isDirtyBox=true,r2.isDirtyData=!!o2,i3=false}"point"===a2.legendType&&(this.processData(),this.generatePoints()),e3&&h2.redraw(i3)}sortData(t3){let e3=this,i3=e3.options.dataSorting.sortKey||"y",s2=function(t4,e4){return C(e4)&&t4.pointClass.prototype.optionsToObject.call({series:t4},e4)||{}};return t3.forEach((function(i4,r2){t3[r2]=s2(e3,i4),t3[r2].index=r2}),this),t3.concat().sort(((t4,e4)=>{let s3=D(i3,t4),r2=D(i3,e4);return r2<s3?-1:r2>s3?1:0})).forEach((function(t4,e4){t4.x=e4}),this),e3.linkedSeries&&e3.linkedSeries.forEach((function(e4){let i4=e4.options,r2=i4.data;i4.dataSorting&&i4.dataSorting.enabled||!r2||(r2.forEach((function(i5,o2){r2[o2]=s2(e4,i5),t3[o2]&&(r2[o2].x=t3[o2].x,r2[o2].index=o2)})),e4.setData(r2,false))})),t3}getProcessedData(t3){let e3=this,i3=e3.xAxis,s2=e3.options.cropThreshold,r2=i3==null?void 0:i3.logarithmic,o2=e3.isCartesian,n2,a2,h2=0,l2,d2,c2,p2=e3.xData,u2=e3.yData,g2=false,f2=p2.length;i3&&(d2=(l2=i3.getExtremes()).min,c2=l2.max,g2=!!(i3.categories&&!i3.names.length)),o2&&e3.sorted&&!t3&&(!s2||f2>s2||e3.forceCrop)&&(p2[f2-1]<d2||p2[0]>c2?(p2=[],u2=[]):e3.yData&&(p2[0]<d2||p2[f2-1]>c2)&&(p2=(n2=this.cropData(e3.xData,e3.yData,d2,c2)).xData,u2=n2.yData,h2=n2.start,a2=true));let m2=O([r2?p2.map(r2.log2lin):p2],(()=>e3.requireSorting&&!g2&&T(15,false,e3.chart)));return{xData:p2,yData:u2,cropped:a2,cropStart:h2,closestPointRange:m2}}processData(t3){let e3=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e3.isDirty&&!this.yAxis.isDirty&&!t3)return false;let i3=this.getProcessedData();this.cropped=i3.cropped,this.cropStart=i3.cropStart,this.processedXData=i3.xData,this.processedYData=i3.yData,this.closestPointRange=this.basePointRange=i3.closestPointRange,L(this,"afterProcessData")}cropData(t3,e3,i3,s2){let r2=t3.length,o2,n2,a2=0,h2=r2;for(o2=0;o2<r2;o2++)if(t3[o2]>=i3){a2=Math.max(0,o2-1);break}for(n2=o2;n2<r2;n2++)if(t3[n2]>s2){h2=n2+1;break}return{xData:t3.slice(a2,h2),yData:e3.slice(a2,h2),start:a2,end:h2}}generatePoints(){let t3=this.options,e3=this.processedData||t3.data,i3=this.processedXData,s2=this.processedYData,r2=this.pointClass,o2=i3.length,n2=this.cropStart||0,a2=this.hasGroupedData,h2=t3.keys,l2=[],d2=t3.dataGrouping&&t3.dataGrouping.groupAll?n2:0,c2,p2,u2,g2,f2=this.data;if(!f2&&!a2){let t4=[];t4.length=e3.length,f2=this.data=t4}for(h2&&a2&&(this.options.keys=false),g2=0;g2<o2;g2++)p2=n2+g2,a2?((u2=new r2(this,[i3[g2]].concat(G(s2[g2])))).dataGroup=this.groupMap[d2+g2],u2.dataGroup.options&&(u2.options=u2.dataGroup.options,A(u2,u2.dataGroup.options),delete u2.dataLabels)):(u2=f2[p2])||void 0===e3[p2]||(f2[p2]=u2=new r2(this,e3[p2],i3[g2])),u2&&(u2.index=a2?d2+g2:p2,l2[g2]=u2);if(this.options.keys=h2,f2&&(o2!==(c2=f2.length)||a2))for(g2=0;g2<c2;g2++)g2!==n2||a2||(g2+=o2),f2[g2]&&(f2[g2].destroyElements(),f2[g2].plotX=void 0);this.data=f2,this.points=l2,L(this,"afterGeneratePoints")}getXExtremes(t3){return{min:y(t3),max:x(t3)}}getExtremes(t3,e3){let i3=this.xAxis,s2=this.yAxis,r2=[],o2=this.requireSorting&&!this.is("column")?1:0,n2=!!s2&&s2.positiveValuesOnly,a2=e3||this.getExtremesFromAll||this.options.getExtremesFromAll,{processedXData:h2,processedYData:l2}=this,d2,c2,p2,u2,g2,f2,m2,b2=0,v2=0,S2=0;if(this.cropped&&a2){let t4=this.getProcessedData(true);h2=t4.xData,l2=t4.yData}let C2=(t3=t3||this.stackedYData||l2||[]).length,k2=h2||this.xData;for(i3&&(b2=(d2=i3.getExtremes()).min,v2=d2.max),f2=0;f2<C2;f2++)if(u2=k2[f2],c2=(j(g2=t3[f2])||I(g2))&&((j(g2)?g2>0:g2.length)||!n2),p2=e3||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!i3||(k2[f2+o2]||u2)>=b2&&(k2[f2-o2]||u2)<=v2,c2&&p2){if(m2=g2.length)for(;m2--;)j(g2[m2])&&(r2[S2++]=g2[m2]);else r2[S2++]=g2}let M2={activeYData:r2,dataMin:y(r2),dataMax:x(r2)};return L(this,"afterGetExtremes",{dataExtremes:M2}),M2}applyExtremes(){let t3=this.getExtremes();return this.dataMin=t3.dataMin,this.dataMax=t3.dataMax,t3}getFirstValidPoint(t3,e3=0,i3=1){let s2=t3.length,r2=e3;for(;r2>=0&&r2<s2;){if(C(t3[r2]))return t3[r2];r2+=i3}}translate(){var _a;this.processedXData||this.processData(),this.generatePoints();let t3=this.options,e3=t3.stacking,i3=this.xAxis,s2=i3.categories,r2=this.enabledDataSorting,o2=this.yAxis,n2=this.points,a2=n2.length,h2=this.pointPlacementToXValue(),l2=!!h2,d2=t3.threshold,c2=t3.startFromThreshold?d2:0,p2,u2,g2,f2,m2=Number.MAX_VALUE;function x2(t4){return b(t4,-1e9,1e9)}for(p2=0;p2<a2;p2++){let t4;let a3=n2[p2],y2=a3.x,b2,S2,k2=a3.y,M2=a3.low,w3=e3&&((_a=o2.stacking)==null?void 0:_a.stacks[(this.negStacks&&k2<(c2?0:d2)?"-":"")+this.stackKey]);u2=i3.translate(y2,false,false,false,true,h2),a3.plotX=j(u2)?v(x2(u2)):void 0,e3&&this.visible&&w3&&w3[y2]&&(f2=this.getStackIndicator(f2,y2,this.index),!a3.isNull&&f2.key&&(S2=(b2=w3[y2]).points[f2.key]),b2&&I(S2)&&(M2=S2[0],k2=S2[1],M2===c2&&f2.key===w3[y2].base&&(M2=N(j(d2)?d2:o2.min)),o2.positiveValuesOnly&&C(M2)&&M2<=0&&(M2=void 0),a3.total=a3.stackTotal=N(b2.total),a3.percentage=C(a3.y)&&b2.total?a3.y/b2.total*100:void 0,a3.stackY=k2,this.irregularWidths||b2.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),a3.yBottom=C(M2)?x2(o2.translate(M2,false,true,false,true)):void 0,this.dataModify&&(k2=this.dataModify.modifyValue(k2,p2)),j(k2)&&void 0!==a3.plotX&&(t4=j(t4=o2.translate(k2,false,true,false,true))?x2(t4):void 0),a3.plotY=t4,a3.isInside=this.isPointInside(a3),a3.clientX=l2?v(i3.translate(y2,false,false,false,true,h2)):u2,a3.negative=(a3.y||0)<(d2||0),a3.category=N(s2&&s2[a3.x],a3.x),a3.isNull||false===a3.visible||(void 0!==g2&&(m2=Math.min(m2,Math.abs(u2-g2))),g2=u2),a3.zone=this.zones.length?a3.getZone():void 0,!a3.graphic&&this.group&&r2&&(a3.isNew=true)}this.closestPointRangePx=m2,L(this,"afterTranslate")}getValidPoints(t3,e3,i3){let s2=this.chart;return(t3||this.points||[]).filter((function(t4){let{plotX:r2,plotY:o2}=t4;return!!((i3||!t4.isNull&&j(o2))&&(!e3||s2.isInsidePlot(r2,o2,{inverted:s2.inverted})))&&false!==t4.visible}))}getClipBox(){let{chart:t3,xAxis:e3,yAxis:i3}=this,{x:s2,y:r2,width:o2,height:n2}=R(t3.clipBox);return e3&&e3.len!==t3.plotSizeX&&(o2=e3.len),i3&&i3.len!==t3.plotSizeY&&(n2=i3.len),t3.inverted&&!this.invertible&&([o2,n2]=[n2,o2]),{x:s2,y:r2,width:o2,height:n2}}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0),this.sharedClipKey}setClip(){let{chart:t3,group:e3,markerGroup:i3}=this,s2=t3.sharedClips,r2=t3.renderer,o2=this.getClipBox(),n2=this.getSharedClipKey(),a2=s2[n2];a2?a2.animate(o2):s2[n2]=a2=r2.clipRect(o2),e3&&e3.clip(false===this.options.clip?void 0:a2),i3&&i3.clip()}animate(t3){let{chart:e3,group:i3,markerGroup:s2}=this,r2=e3.inverted,o2=d(this.options.animation),n2=[this.getSharedClipKey(),o2.duration,o2.easing,o2.defer].join(","),a2=e3.sharedClips[n2],h2=e3.sharedClips[n2+"m"];if(t3&&i3){let t4=this.getClipBox();if(a2)a2.attr("height",t4.height);else{t4.width=0,r2&&(t4.x=e3.plotHeight),a2=e3.renderer.clipRect(t4),e3.sharedClips[n2]=a2;let i4={x:-99,y:-99,width:r2?e3.plotWidth+199:99,height:r2?99:e3.plotHeight+199};h2=e3.renderer.clipRect(i4),e3.sharedClips[n2+"m"]=h2}i3.clip(a2),s2==null?void 0:s2.clip(h2)}else if(a2&&!a2.hasClass("highcharts-animating")){let t4=this.getClipBox(),i4=o2.step;((s2==null?void 0:s2.element.childNodes.length)||e3.series.length>1)&&(o2.step=function(t5,e4){i4&&i4.apply(e4,arguments),"width"===e4.prop&&(h2==null?void 0:h2.element)&&h2.attr(r2?"height":"width",t5+99)}),a2.addClass("highcharts-animating").animate(t4,o2)}}afterAnimate(){this.setClip(),z(this.chart.sharedClips,((t3,e3,i3)=>{t3&&!this.chart.container.querySelector(`[clip-path="url(#${t3.id})"]`)&&(t3.destroy(),delete i3[e3])})),this.finishedAnimating=true,L(this,"afterAnimate")}drawPoints(t3=this.points){let e3,i3,s2,r2,o2,n2,a2;let h2=this.chart,l2=h2.styledMode,{colorAxis:d2,options:c2}=this,p2=c2.marker,u2=this[this.specialGroup||"markerGroup"],g2=this.xAxis,f2=N(p2.enabled,!g2||!!g2.isRadial||null,this.closestPointRangePx>=p2.enabledThreshold*p2.radius);if(false!==p2.enabled||this._hasPointMarkers)for(e3=0;e3<t3.length;e3++)if(r2=(s2=(i3=t3[e3]).graphic)?"animate":"attr",o2=i3.marker||{},n2=!!i3.marker,(f2&&void 0===o2.enabled||o2.enabled)&&!i3.isNull&&false!==i3.visible){let t4=N(o2.symbol,this.symbol,"rect");a2=this.markerAttribs(i3,i3.selected&&"select"),this.enabledDataSorting&&(i3.startXPos=g2.reversed?-(a2.width||0):g2.width);let e4=false!==i3.isInside;if(!s2&&e4&&((a2.width||0)>0||i3.hasImage)&&(i3.graphic=s2=h2.renderer.symbol(t4,a2.x,a2.y,a2.width,a2.height,n2?o2:p2).add(u2),this.enabledDataSorting&&h2.hasRendered&&(s2.attr({x:i3.startXPos}),r2="animate")),s2&&"animate"===r2&&s2[e4?"show":"hide"](e4).animate(a2),s2){let t5=this.pointAttribs(i3,l2||!i3.selected?void 0:"select");l2?d2&&s2.css({fill:t5.fill}):s2[r2](t5)}s2&&s2.addClass(i3.getClassName(),true)}else s2&&(i3.graphic=s2.destroy())}markerAttribs(t3,e3){let i3=this.options,s2=i3.marker,r2=t3.marker||{},o2=r2.symbol||s2.symbol,n2={},a2,h2,l2=N(r2.radius,s2&&s2.radius);e3&&(a2=s2.states[e3],l2=N((h2=r2.states&&r2.states[e3])&&h2.radius,a2&&a2.radius,l2&&l2+(a2&&a2.radiusPlus||0))),t3.hasImage=o2&&0===o2.indexOf("url"),t3.hasImage&&(l2=0);let d2=t3.pos();return j(l2)&&d2&&(i3.crisp&&(d2[0]=S(d2[0],t3.hasImage?0:"rect"===o2?(s2==null?void 0:s2.lineWidth)||0:1)),n2.x=d2[0]-l2,n2.y=d2[1]-l2),l2&&(n2.width=n2.height=2*l2),n2}pointAttribs(t3,e3){let i3=this.options.marker,s2=t3&&t3.options,r2=s2&&s2.marker||{},o2=s2&&s2.color,n2=t3&&t3.color,a2=t3&&t3.zone&&t3.zone.color,h2,l2,d2=this.color,c2,p2,u2=N(r2.lineWidth,i3.lineWidth),g2=1;return d2=o2||a2||n2||d2,c2=r2.fillColor||i3.fillColor||d2,p2=r2.lineColor||i3.lineColor||d2,e3=e3||"normal",h2=i3.states[e3]||{},u2=N((l2=r2.states&&r2.states[e3]||{}).lineWidth,h2.lineWidth,u2+N(l2.lineWidthPlus,h2.lineWidthPlus,0)),c2=l2.fillColor||h2.fillColor||c2,{stroke:p2=l2.lineColor||h2.lineColor||p2,"stroke-width":u2,fill:c2,opacity:g2=N(l2.opacity,h2.opacity,g2)}}destroy(t3){let e3,i3,s2;let r2=this,o2=r2.chart,n2=/AppleWebKit\/533/.test(f.navigator.userAgent),a2=r2.data||[];for(L(r2,"destroy",{keepEventsForUpdate:t3}),this.removeEvents(t3),(r2.axisTypes||[]).forEach((function(t4){(s2=r2[t4])&&s2.series&&(w2(s2.series,r2),s2.isDirty=s2.forceRedraw=true)})),r2.legendItem&&r2.chart.legend.destroyItem(r2),e3=a2.length;e3--;)(i3=a2[e3])&&i3.destroy&&i3.destroy();for(let t4 of r2.zones)k(t4,void 0,true);l.clearTimeout(r2.animationTimeout),z(r2,(function(t4,e4){t4 instanceof h&&!t4.survive&&t4[n2&&"group"===e4?"hide":"destroy"]()})),o2.hoverSeries===r2&&(o2.hoverSeries=void 0),w2(o2.series,r2),o2.orderItems("series"),z(r2,(function(e4,i4){t3&&"hcEvents"===i4||delete r2[i4]}))}applyZones(){let{area:t3,chart:e3,graph:i3,zones:s2,points:r2,xAxis:o2,yAxis:n2,zoneAxis:a2}=this,{inverted:h2,renderer:l2}=e3,d2=this[`${a2}Axis`],{isXAxis:c2,len:p2=0}=d2||{},u2=((i3==null?void 0:i3.strokeWidth())||0)/2+1,g2=(t4,e4=0,i4=0)=>{h2&&(i4=p2-i4);let{translated:s3=0,lineClip:r3}=t4,o3=i4-s3;r3==null?void 0:r3.push(["L",e4,Math.abs(o3)<u2?i4-u2*(o3<=0?-1:1):s3])};if(s2.length&&(i3||t3)&&d2&&j(d2.min)){let e4=d2.getExtremes().max,u3=t4=>{t4.forEach(((e5,i4)=>{("M"===e5[0]||"L"===e5[0])&&(t4[i4]=[e5[0],c2?p2-e5[1]:e5[1],c2?e5[2]:p2-e5[2]])}))};if(s2.forEach((t4=>{t4.lineClip=[],t4.translated=b(d2.toPixels(N(t4.value,e4),true)||0,0,p2)})),i3&&!this.showLine&&i3.hide(),t3&&t3.hide(),"y"===a2&&r2.length<o2.len)for(let t4 of r2){let{plotX:e5,plotY:i4,zone:r3}=t4,o3=r3&&s2[s2.indexOf(r3)-1];r3&&g2(r3,e5,i4),o3&&g2(o3,e5,i4)}let f2=[],m2=d2.toPixels(d2.getExtremes().min,true);s2.forEach((e5=>{var _a,_b;let s3=e5.lineClip||[],r3=Math.round(e5.translated||0);o2.reversed&&s3.reverse();let{clip:a3,simpleClip:d3}=e5,p3=0,g3=0,x2=o2.len,y2=n2.len;c2?(p3=r3,x2=m2):(g3=r3,y2=m2);let b2=[["M",p3,g3],["L",x2,g3],["L",x2,y2],["L",p3,y2],["Z"]],v2=[b2[0],...s3,b2[1],b2[2],...f2,b2[3],b2[4]];f2=s3.reverse(),m2=r3,h2&&(u3(v2),t3&&u3(b2)),a3?(a3.animate({d:v2}),d3==null?void 0:d3.animate({d:b2})):(a3=e5.clip=l2.path(v2),t3&&(d3=e5.simpleClip=l2.path(b2))),i3&&((_a=e5.graph)==null?void 0:_a.clip(a3)),t3&&((_b=e5.area)==null?void 0:_b.clip(d3))}))}else this.visible&&(i3&&i3.show(),t3&&t3.show())}plotGroup(t3,e3,i3,s2,r2){let o2=this[t3],n2=!o2,a2={visibility:i3,zIndex:s2||.1};return C(this.opacity)&&!this.chart.styledMode&&"inactive"!==this.state&&(a2.opacity=this.opacity),o2||(this[t3]=o2=this.chart.renderer.g().add(r2)),o2.addClass("highcharts-"+e3+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(C(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o2.hasClass("highcharts-tracker")?" highcharts-tracker":""),true),o2.attr(a2)[n2?"attr":"animate"](this.getPlotBox(e3)),o2}getPlotBox(t3){let e3=this.xAxis,i3=this.yAxis,s2=this.chart,r2=s2.inverted&&!s2.polar&&e3&&this.invertible&&"series"===t3;return s2.inverted&&(e3=i3,i3=this.xAxis),{translateX:e3?e3.left:s2.plotLeft,translateY:i3?i3.top:s2.plotTop,rotation:r2?90:0,rotationOriginX:r2?(e3.len-i3.len)/2:0,rotationOriginY:r2?(e3.len+i3.len)/2:0,scaleX:r2?-1:1,scaleY:1}}removeEvents(t3){let{eventsToUnbind:e3}=this;t3||W(this),e3.length&&(e3.forEach((t4=>{t4()})),e3.length=0)}render(){var _a,_b,_c,_d,_e;let t3=this,{chart:e3,options:i3,hasRendered:s2}=t3,r2=d(i3.animation),o2=t3.visible?"inherit":"hidden",n2=i3.zIndex,a2=e3.seriesGroup,h2=t3.finishedAnimating?0:r2.duration;L(this,"render"),t3.plotGroup("group","series",o2,n2,a2),t3.markerGroup=t3.plotGroup("markerGroup","markers",o2,n2,a2),false!==i3.clip&&t3.setClip(),h2&&((_a=t3.animate)==null?void 0:_a.call(t3,true)),t3.drawGraph&&(t3.drawGraph(),t3.applyZones()),t3.visible&&t3.drawPoints(),(_b=t3.drawDataLabels)==null?void 0:_b.call(t3),(_c=t3.redrawPoints)==null?void 0:_c.call(t3),i3.enableMouseTracking&&((_d=t3.drawTracker)==null?void 0:_d.call(t3)),h2&&((_e=t3.animate)==null?void 0:_e.call(t3)),s2||(h2&&r2.defer&&(h2+=r2.defer),t3.animationTimeout=H((()=>{t3.afterAnimate()}),h2||0)),t3.isDirty=false,t3.hasRendered=true,L(t3,"afterRender")}redraw(){let t3=this.isDirty||this.isDirtyData;this.translate(),this.render(),t3&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(t3,e3){let{xAxis:i3,yAxis:s2}=this,r2=this.chart.inverted;return this.searchKDTree({clientX:r2?i3.len-t3.chartY+i3.pos:t3.chartX-i3.pos,plotY:r2?s2.len-t3.chartX+s2.pos:t3.chartY-s2.pos},e3,t3)}buildKDTree(t3){this.buildingKdTree=true;let e3=this,i3=e3.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e3.kdTree,H((function(){e3.kdTree=function t4(i4,s2,r2){let o2,n2;let a2=i4==null?void 0:i4.length;if(a2)return o2=e3.kdAxisArray[s2%r2],i4.sort(((t5,e4)=>(t5[o2]||0)-(e4[o2]||0))),{point:i4[n2=Math.floor(a2/2)],left:t4(i4.slice(0,n2),s2+1,r2),right:t4(i4.slice(n2+1),s2+1,r2)}}(e3.getValidPoints(void 0,!e3.directTouch),i3,i3),e3.buildingKdTree=false}),e3.options.kdNow||(t3==null?void 0:t3.type)==="touchstart"?0:1)}searchKDTree(t3,e3,i3){let s2=this,[r2,o2]=this.kdAxisArray,n2=e3?"distX":"dist",a2=(s2.options.findNearestPointBy||"").indexOf("y")>-1?2:1,h2=!!s2.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(i3),this.kdTree)return function t4(e4,i4,a3,l2){var _a;let d2=i4.point,c2=s2.kdAxisArray[a3%l2],p2,u2,g2=d2;!function(t5,e5){var _a2;let i5=t5[r2],s3=e5[r2],n3=C(i5)&&C(s3)?i5-s3:null,a4=t5[o2],l3=e5[o2],d3=C(a4)&&C(l3)?a4-l3:0,c3=h2&&((_a2=e5.marker)==null?void 0:_a2.radius)||0;e5.dist=Math.sqrt((n3&&n3*n3||0)+d3*d3)-c3,e5.distX=C(n3)?Math.abs(n3)-c3:Number.MAX_VALUE}(e4,d2);let f2=(e4[c2]||0)-(d2[c2]||0)+(h2&&((_a=d2.marker)==null?void 0:_a.radius)||0),m2=f2<0?"left":"right",x2=f2<0?"right":"left";return i4[m2]&&(g2=(p2=t4(e4,i4[m2],a3+1,l2))[n2]<g2[n2]?p2:d2),i4[x2]&&Math.sqrt(f2*f2)<g2[n2]&&(g2=(u2=t4(e4,i4[x2],a3+1,l2))[n2]<g2[n2]?u2:g2),g2}(t3,this.kdTree,a2,a2)}pointPlacementToXValue(){let{options:t3,xAxis:e3}=this,i3=t3.pointPlacement;return"between"===i3&&(i3=e3.reversed?-.5:.5),j(i3)?i3*(t3.pointRange||e3.pointRange):0}isPointInside(t3){let{chart:e3,xAxis:i3,yAxis:s2}=this,{plotX:r2=-1,plotY:o2=-1}=t3;return o2>=0&&o2<=(s2?s2.len:e3.plotHeight)&&r2>=0&&r2<=(i3?i3.len:e3.plotWidth)}drawTracker(){var _a;let t3=this,e3=t3.options,i3=e3.trackByArea,s2=[].concat((i3?t3.areaPath:t3.graphPath)||[]),r2=t3.chart,o2=r2.pointer,n2=r2.renderer,a2=((_a=r2.options.tooltip)==null?void 0:_a.snap)||0,h2=()=>{e3.enableMouseTracking&&r2.hoverSeries!==t3&&t3.onMouseOver()},l2="rgba(192,192,192,"+(g?1e-4:.002)+")",d2=t3.tracker;d2?d2.attr({d:s2}):t3.graph&&(t3.tracker=d2=n2.path(s2).attr({visibility:t3.visible?"inherit":"hidden",zIndex:2}).addClass(i3?"highcharts-tracker-area":"highcharts-tracker-line").add(t3.group),r2.styledMode||d2.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:l2,fill:i3?l2:"none","stroke-width":t3.graph.strokeWidth()+(i3?0:2*a2)}),[t3.tracker,t3.markerGroup,t3.dataLabelsGroup].forEach((t4=>{t4&&(t4.addClass("highcharts-tracker").on("mouseover",h2).on("mouseout",(t5=>{o2==null?void 0:o2.onTrackerMouseOut(t5)})),e3.cursor&&!r2.styledMode&&t4.css({cursor:e3.cursor}),t4.on("touchstart",h2))}))),L(this,"afterDrawTracker")}addPoint(t3,e3,i3,s2,r2){let o2,n2;let a2=this.options,h2=this.data,l2=this.chart,d2=this.xAxis,c2=d2&&d2.hasNames&&d2.names,p2=a2.data,u2=this.xData;e3=N(e3,true);let g2={series:this};this.pointClass.prototype.applyOptions.apply(g2,[t3]);let f2=g2.x;if(n2=u2.length,this.requireSorting&&f2<u2[n2-1])for(o2=true;n2&&u2[n2-1]>f2;)n2--;this.updateParallelArrays(g2,"splice",[n2,0,0]),this.updateParallelArrays(g2,n2),c2&&g2.name&&(c2[f2]=g2.name),p2.splice(n2,0,t3),(o2||this.processedData)&&(this.data.splice(n2,0,null),this.processData()),"point"===a2.legendType&&this.generatePoints(),i3&&(h2[0]&&h2[0].remove?h2[0].remove(false):(h2.shift(),this.updateParallelArrays(g2,"shift"),p2.shift())),false!==r2&&L(this,"addPoint",{point:g2}),this.isDirty=true,this.isDirtyData=true,e3&&l2.redraw(s2)}removePoint(t3,e3,i3){let s2=this,r2=s2.data,o2=r2[t3],n2=s2.points,a2=s2.chart,h2=function(){n2&&n2.length===r2.length&&n2.splice(t3,1),r2.splice(t3,1),s2.options.data.splice(t3,1),s2.updateParallelArrays(o2||{series:s2},"splice",[t3,1]),o2&&o2.destroy(),s2.isDirty=true,s2.isDirtyData=true,e3&&a2.redraw()};c(i3,a2),e3=N(e3,true),o2?o2.firePointEvent("remove",null,h2):h2()}remove(t3,e3,i3,s2){let r2=this,o2=r2.chart;function n2(){r2.destroy(s2),o2.isDirtyLegend=o2.isDirtyBox=true,o2.linkSeries(s2),N(t3,true)&&o2.redraw(e3)}false!==i3?L(r2,"remove",null,n2):n2()}update(t3,e3){var _a,_b,_c;L(this,"update",{options:t3=M(t3,this.userOptions)});let i3=this,s2=i3.chart,r2=i3.userOptions,o2=i3.initialType||i3.type,n2=s2.options.plotOptions,a2=m[o2].prototype,h2=i3.finishedAnimating&&{animation:false},l2={},d2,c2,p2=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],u2=t3.type||r2.type||s2.options.chart.type,g2=!(this.hasDerivedData||u2&&u2!==this.type||void 0!==t3.pointStart||void 0!==t3.pointInterval||void 0!==t3.relativeXValue||t3.joinBy||t3.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some((t4=>i3.hasOptionChanged(t4))));u2=u2||o2,g2&&(p2.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"),false!==t3.visible&&p2.push("area","graph"),i3.parallelArrays.forEach((function(t4){p2.push(t4+"Data")})),t3.data&&(t3.dataSorting&&A(i3.options.dataSorting,t3.dataSorting),this.setData(t3.data,false))),t3=R(r2,{index:void 0===r2.index?i3.index:r2.index,pointStart:((_a=n2==null?void 0:n2.series)==null?void 0:_a.pointStart)??r2.pointStart??((_b=i3.xData)==null?void 0:_b[0])},!g2&&{data:i3.options.data},t3,h2),g2&&t3.data&&(t3.data=i3.options.data),(p2=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(p2)).forEach((function(t4){p2[t4]=i3[t4],delete i3[t4]}));let f2=false;if(m[u2]){if(f2=u2!==i3.type,i3.remove(false,false,false,true),f2){if(s2.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(i3,m[u2].prototype);else{let t4=Object.hasOwnProperty.call(i3,"hcEvents")&&i3.hcEvents;for(c2 in a2)i3[c2]=void 0;A(i3,m[u2].prototype),t4?i3.hcEvents=t4:delete i3.hcEvents}}}else T(17,true,s2,{missingModuleFor:u2});if(p2.forEach((function(t4){i3[t4]=p2[t4]})),i3.init(s2,t3),g2&&this.points)for(let t4 of(false===(d2=i3.options).visible?(l2.graphic=1,l2.dataLabel=1):(this.hasMarkerChanged(d2,r2)&&(l2.graphic=1),((_c=i3.hasDataLabels)==null?void 0:_c.call(i3))||(l2.dataLabel=1)),this.points))t4&&t4.series&&(t4.resolveColor(),Object.keys(l2).length&&t4.destroyElements(l2),false===d2.showInLegend&&t4.legendItem&&s2.legend.destroyItem(t4));i3.initialType=o2,s2.linkSeries(),s2.setSortedData(),f2&&i3.linkedSeries.length&&(i3.isDirtyData=true),L(this,"afterUpdate"),N(e3,true)&&s2.redraw(!!g2&&void 0)}setName(t3){this.name=this.options.name=this.userOptions.name=t3,this.chart.isDirtyLegend=true}hasOptionChanged(t3){var _a,_b;let e3=this.chart,i3=this.options[t3],s2=e3.options.plotOptions,r2=this.userOptions[t3],o2=N((_a=s2==null?void 0:s2[this.type])==null?void 0:_a[t3],(_b=s2==null?void 0:s2.series)==null?void 0:_b[t3]);return r2&&!C(o2)?i3!==r2:i3!==N(o2,i3)}onMouseOver(){let t3=this.chart,e3=t3.hoverSeries,i3=t3.pointer;i3==null?void 0:i3.setHoverChartIndex(),e3&&e3!==this&&e3.onMouseOut(),this.options.events.mouseOver&&L(this,"mouseOver"),this.setState("hover"),t3.hoverSeries=this}onMouseOut(){let t3=this.options,e3=this.chart,i3=e3.tooltip,s2=e3.hoverPoint;e3.hoverSeries=null,s2&&s2.onMouseOut(),this&&t3.events.mouseOut&&L(this,"mouseOut"),i3&&!this.stickyTracking&&(!i3.shared||this.noSharedTooltip)&&i3.hide(),e3.series.forEach((function(t4){t4.setState("",true)}))}setState(t3,e3){let i3=this,s2=i3.options,r2=i3.graph,o2=s2.inactiveOtherPoints,n2=s2.states,a2=N(n2[t3||"normal"]&&n2[t3||"normal"].animation,i3.chart.options.chart.animation),h2=s2.lineWidth,l2=s2.opacity;if(t3=t3||"",i3.state!==t3&&([i3.group,i3.markerGroup,i3.dataLabelsGroup].forEach((function(e4){e4&&(i3.state&&e4.removeClass("highcharts-series-"+i3.state),t3&&e4.addClass("highcharts-series-"+t3))})),i3.state=t3,!i3.chart.styledMode)){if(n2[t3]&&false===n2[t3].enabled)return;if(t3&&(h2=n2[t3].lineWidth||h2+(n2[t3].lineWidthPlus||0),l2=N(n2[t3].opacity,l2)),r2&&!r2.dashstyle&&j(h2))for(let t4 of[r2,...this.zones.map((t5=>t5.graph))])t4==null?void 0:t4.animate({"stroke-width":h2},a2);o2||[i3.group,i3.markerGroup,i3.dataLabelsGroup,i3.labelBySeries].forEach((function(t4){t4&&t4.animate({opacity:l2},a2)}))}e3&&o2&&i3.points&&i3.setAllPointsToState(t3||void 0)}setAllPointsToState(t3){this.points.forEach((function(e3){e3.setState&&e3.setState(t3)}))}setVisible(t3,e3){var _a;let i3=this,s2=i3.chart,r2=s2.options.chart.ignoreHiddenSeries,o2=i3.visible;i3.visible=t3=i3.options.visible=i3.userOptions.visible=void 0===t3?!o2:t3;let n2=t3?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach((t4=>{var _a2;(_a2=i3[t4])==null?void 0:_a2[n2]()})),(s2.hoverSeries===i3||((_a=s2.hoverPoint)==null?void 0:_a.series)===i3)&&i3.onMouseOut(),i3.legendItem&&s2.legend.colorizeItem(i3,t3),i3.isDirty=true,i3.options.stacking&&s2.series.forEach((t4=>{t4.options.stacking&&t4.visible&&(t4.isDirty=true)})),i3.linkedSeries.forEach((e4=>{e4.setVisible(t3,false)})),r2&&(s2.isDirtyBox=true),L(i3,n2),false!==e3&&s2.redraw()}show(){this.setVisible(true)}hide(){this.setVisible(false)}select(t3){this.selected=t3=this.options.selected=void 0===t3?!this.selected:t3,this.checkbox&&(this.checkbox.checked=t3),L(this,t3?"select":"unselect")}shouldShowTooltip(t3,e3,i3={}){return i3.series=this,i3.visiblePlotOnly=true,this.chart.isInsidePlot(t3,e3,i3)}drawLegendSymbol(t3,e3){var _a;(_a=r[this.options.legendSymbol||"rectangle"])==null?void 0:_a.call(this,t3,e3)}}return X.defaultOptions=n,X.types=a.seriesTypes,X.registerType=a.registerSeriesType,A(X.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:false,invertible:true,isCartesian:true,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:o,requireSorting:true,sorted:true}),a.series=X,X})),i(e,"Core/Legend/Legend.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/Point.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n,a){var h;let{animObject:l,setAnimation:d}=t2,{registerEventOptions:c}=e2,{composed:p,marginNames:u}=i2,{distribute:g}=o,{format:f}=n,{addEvent:m,createElement:x,css:y,defined:b,discardElement:v,find:S,fireEvent:C,isNumber:k,merge:M,pick:w2,pushUnique:T,relativeLength:A,stableSort:P,syncTimeout:L}=a;class O{constructor(t3,e3){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=t3,this.setOptions(e3),e3.enabled&&(this.render(),c(this,e3),m(this.chart,"endResize",(function(){this.legend.positionCheckboxes()}))),m(this.chart,"render",(()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())}))}setOptions(t3){let e3=w2(t3.padding,8);this.options=t3,this.chart.styledMode||(this.itemStyle=t3.itemStyle,this.itemHiddenStyle=M(this.itemStyle,t3.itemHiddenStyle)),this.itemMarginTop=t3.itemMarginTop,this.itemMarginBottom=t3.itemMarginBottom,this.padding=e3,this.initialItemY=e3-5,this.symbolWidth=w2(t3.symbolWidth,16),this.pages=[],this.proximate="proximate"===t3.layout&&!this.chart.inverted,this.baseline=void 0}update(t3,e3){let i3=this.chart;this.setOptions(M(true,this.options,t3)),"events"in this.options&&c(this,this.options),this.destroy(),i3.isDirtyLegend=i3.isDirtyBox=true,w2(e3,true)&&i3.redraw(),C(this,"afterUpdate",{redraw:e3})}colorizeItem(t3,e3){let{area:i3,group:s2,label:r2,line:o2,symbol:n2}=t3.legendItem||{};if(s2==null?void 0:s2[e3?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:s3={}}=this,a2=s3.color,{fillColor:h2,fillOpacity:l2,lineColor:d2,marker:c2}=t3.options,p2=t4=>(!e3&&(t4.fill&&(t4.fill=a2),t4.stroke&&(t4.stroke=a2)),t4);r2==null?void 0:r2.css(M(e3?this.itemStyle:s3)),o2==null?void 0:o2.attr(p2({stroke:d2||t3.color})),n2&&n2.attr(p2(c2&&n2.isMarker?t3.pointAttribs():{fill:t3.color})),i3==null?void 0:i3.attr(p2({fill:h2||t3.color,"fill-opacity":h2?1:l2??.75}))}C(this,"afterColorizeItem",{item:t3,visible:e3})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(t3){let{group:e3,x:i3=0,y:s2=0}=t3.legendItem||{},r2=this.options,o2=r2.symbolPadding,n2=!r2.rtl,a2=t3.checkbox;if(e3&&e3.element){let r3={translateX:n2?i3:this.legendWidth-i3-2*o2-4,translateY:s2};e3[b(e3.translateY)?"animate":"attr"](r3,void 0,(()=>{C(this,"afterPositionItem",{item:t3})}))}a2&&(a2.x=i3,a2.y=s2)}destroyItem(t3){let e3=t3.checkbox,i3=t3.legendItem||{};for(let t4 of["group","label","line","symbol"])i3[t4]&&(i3[t4]=i3[t4].destroy());e3&&v(e3),t3.legendItem=void 0}destroy(){for(let t3 of this.getAllItems())this.destroyItem(t3);for(let t3 of["clipRect","up","down","pager","nav","box","title","group"])this[t3]&&(this[t3]=this[t3].destroy());this.display=null}positionCheckboxes(){let t3;let e3=this.group&&this.group.alignAttr,i3=this.clipHeight||this.legendHeight,s2=this.titleHeight;e3&&(t3=e3.translateY,this.allItems.forEach((function(r2){let o2;let n2=r2.checkbox;n2&&(o2=t3+s2+n2.y+(this.scrollOffset||0)+3,y(n2,{left:e3.translateX+r2.checkboxOffset+n2.x-20+"px",top:o2+"px",display:this.proximate||o2>t3-6&&o2<t3+i3-6?"":"none"}))}),this))}renderTitle(){let t3=this.options,e3=this.padding,i3=t3.title,s2,r2=0;i3.text&&(this.title||(this.title=this.chart.renderer.label(i3.text,e3-3,e3-4,void 0,void 0,void 0,t3.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i3.style),this.title.add(this.group)),i3.width||this.title.css({width:this.maxLegendWidth+"px"}),r2=(s2=this.title.getBBox()).height,this.offsetWidth=s2.width,this.contentGroup.attr({translateY:r2})),this.titleHeight=r2}setText(t3){let e3=this.options;t3.legendItem.label.attr({text:e3.labelFormat?f(e3.labelFormat,t3,this.chart):e3.labelFormatter.call(t3)})}renderItem(t3){let e3=t3.legendItem=t3.legendItem||{},i3=this.chart,s2=i3.renderer,r2=this.options,o2="horizontal"===r2.layout,n2=this.symbolWidth,a2=r2.symbolPadding||0,h2=this.itemStyle,l2=this.itemHiddenStyle,d2=o2?w2(r2.itemDistance,20):0,c2=!r2.rtl,p2=!t3.series,u2=!p2&&t3.series.drawLegendSymbol?t3.series:t3,g2=u2.options,f2=!!this.createCheckboxForItem&&g2&&g2.showCheckbox,m2=r2.useHTML,x2=t3.options.className,y2=e3.label,b2=n2+a2+d2+(f2?20:0);!y2&&(e3.group=s2.g("legend-item").addClass("highcharts-"+u2.type+"-series highcharts-color-"+t3.colorIndex+(x2?" "+x2:"")+(p2?" highcharts-series-"+t3.index:"")).attr({zIndex:1}).add(this.scrollGroup),e3.label=y2=s2.text("",c2?n2+a2:-a2,this.baseline||0,m2),i3.styledMode||y2.css(M(t3.visible?h2:l2)),y2.attr({align:c2?"left":"right",zIndex:2}).add(e3.group),!this.baseline&&(this.fontMetrics=s2.fontMetrics(y2),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,y2.attr("y",this.baseline),this.symbolHeight=w2(r2.symbolHeight,this.fontMetrics.f),r2.squareSymbol&&(this.symbolWidth=w2(r2.symbolWidth,Math.max(this.symbolHeight,16)),b2=this.symbolWidth+a2+d2+(f2?20:0),c2&&y2.attr("x",this.symbolWidth+a2))),u2.drawLegendSymbol(this,t3),this.setItemEvents&&this.setItemEvents(t3,y2,m2)),f2&&!t3.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(t3),this.colorizeItem(t3,t3.visible),(i3.styledMode||!h2.width)&&y2.css({width:(r2.itemWidth||this.widthOption||i3.spacingBox.width)-b2+"px"}),this.setText(t3);let v2=y2.getBBox(),S2=this.fontMetrics&&this.fontMetrics.h||0;t3.itemWidth=t3.checkboxOffset=r2.itemWidth||e3.labelWidth||v2.width+b2,this.maxItemWidth=Math.max(this.maxItemWidth,t3.itemWidth),this.totalItemWidth+=t3.itemWidth,this.itemHeight=t3.itemHeight=Math.round(e3.labelHeight||(v2.height>1.5*S2?v2.height:S2))}layoutItem(t3){let e3=this.options,i3=this.padding,s2="horizontal"===e3.layout,r2=t3.itemHeight,o2=this.itemMarginBottom,n2=this.itemMarginTop,a2=s2?w2(e3.itemDistance,20):0,h2=this.maxLegendWidth,l2=e3.alignColumns&&this.totalItemWidth>h2?this.maxItemWidth:t3.itemWidth,d2=t3.legendItem||{};s2&&this.itemX-i3+l2>h2&&(this.itemX=i3,this.lastLineHeight&&(this.itemY+=n2+this.lastLineHeight+o2),this.lastLineHeight=0),this.lastItemY=n2+this.itemY+o2,this.lastLineHeight=Math.max(r2,this.lastLineHeight),d2.x=this.itemX,d2.y=this.itemY,s2?this.itemX+=l2:(this.itemY+=n2+r2+o2,this.lastLineHeight=r2),this.offsetWidth=this.widthOption||Math.max((s2?this.itemX-i3-(t3.checkbox?0:a2):l2)+i3,this.offsetWidth)}getAllItems(){let t3=[];return this.chart.series.forEach((function(e3){let i3=e3&&e3.options;e3&&w2(i3.showInLegend,!b(i3.linkedTo)&&void 0,true)&&(t3=t3.concat((e3.legendItem||{}).labels||("point"===i3.legendType?e3.data:e3)))})),C(this,"afterGetAllItems",{allItems:t3}),t3}getAlignment(){let t3=this.options;return this.proximate?t3.align.charAt(0)+"tv":t3.floating?"":t3.align.charAt(0)+t3.verticalAlign.charAt(0)+t3.layout.charAt(0)}adjustMargins(t3,e3){let i3=this.chart,s2=this.options,r2=this.getAlignment();r2&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(o2,n2){o2.test(r2)&&!b(t3[n2])&&(i3[u[n2]]=Math.max(i3[u[n2]],i3.legend[(n2+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n2]*s2[n2%2?"x":"y"]+w2(s2.margin,12)+e3[n2]+(i3.titleOffset[n2]||0)))}))}proximatePositions(){let t3;let e3=this.chart,i3=[],s2="left"===this.options.align;for(let r2 of(this.allItems.forEach((function(t4){let r3,o2,n2=s2,a2,h2;t4.yAxis&&(t4.xAxis.options.reversed&&(n2=!n2),t4.points&&(r3=S(n2?t4.points:t4.points.slice(0).reverse(),(function(t5){return k(t5.plotY)}))),o2=this.itemMarginTop+t4.legendItem.label.getBBox().height+this.itemMarginBottom,h2=t4.yAxis.top-e3.plotTop,a2=t4.visible?(r3?r3.plotY:t4.yAxis.height)+(h2-.3*o2):h2+t4.yAxis.height,i3.push({target:a2,size:o2,item:t4}))}),this),g(i3,e3.plotHeight)))t3=r2.item.legendItem||{},k(r2.pos)&&(t3.y=e3.plotTop-e3.spacing[0]+r2.pos)}render(){let t3=this.chart,e3=t3.renderer,i3=this.options,s2=this.padding,r2=this.getAllItems(),o2,n2,a2,h2=this.group,l2,d2=this.box;this.itemX=s2,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=A(i3.width,t3.spacingBox.width-s2),l2=t3.spacingBox.width-2*s2-i3.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(l2/=2),this.maxLegendWidth=this.widthOption||l2,h2||(this.group=h2=e3.g("legend").addClass(i3.className||"").attr({zIndex:7}).add(),this.contentGroup=e3.g().attr({zIndex:1}).add(h2),this.scrollGroup=e3.g().add(this.contentGroup)),this.renderTitle(),P(r2,((t4,e4)=>(t4.options&&t4.options.legendIndex||0)-(e4.options&&e4.options.legendIndex||0))),i3.reversed&&r2.reverse(),this.allItems=r2,this.display=o2=!!r2.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,r2.forEach(this.renderItem,this),r2.forEach(this.layoutItem,this),n2=(this.widthOption||this.offsetWidth)+s2,a2=this.lastItemY+this.lastLineHeight+this.titleHeight,a2=this.handleOverflow(a2)+s2,d2||(this.box=d2=e3.rect().addClass("highcharts-legend-box").attr({r:i3.borderRadius}).add(h2)),t3.styledMode||d2.attr({stroke:i3.borderColor,"stroke-width":i3.borderWidth||0,fill:i3.backgroundColor||"none"}).shadow(i3.shadow),n2>0&&a2>0&&d2[d2.placed?"animate":"attr"](d2.crisp.call({},{x:0,y:0,width:n2,height:a2},d2.strokeWidth())),h2[o2?"show":"hide"](),t3.styledMode&&"none"===h2.getStyle("display")&&(n2=a2=0),this.legendWidth=n2,this.legendHeight=a2,o2&&this.align(),this.proximate||this.positionItems(),C(this,"afterRender")}align(t3=this.chart.spacingBox){let e3=this.chart,i3=this.options,s2=t3.y;/(lth|ct|rth)/.test(this.getAlignment())&&e3.titleOffset[0]>0?s2+=e3.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e3.titleOffset[2]>0&&(s2-=e3.titleOffset[2]),s2!==t3.y&&(t3=M(t3,{y:s2})),e3.hasRendered||(this.group.placed=false),this.group.align(M(i3,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i3.verticalAlign}),true,t3)}handleOverflow(t3){let e3=this,i3=this.chart,s2=i3.renderer,r2=this.options,o2=r2.y,n2="top"===r2.verticalAlign,a2=this.padding,h2=r2.maxHeight,l2=r2.navigation,d2=w2(l2.animation,true),c2=l2.arrowSize||12,p2=this.pages,u2=this.allItems,g2=function(t4){"number"==typeof t4?S2.attr({height:t4}):S2&&(e3.clipRect=S2.destroy(),e3.contentGroup.clip()),e3.contentGroup.div&&(e3.contentGroup.div.style.clip=t4?"rect("+a2+"px,9999px,"+(a2+t4)+"px,0)":"auto")},f2=function(t4){return e3[t4]=s2.circle(0,0,1.3*c2).translate(c2/2,c2/2).add(v2),i3.styledMode||e3[t4].attr("fill","rgba(0,0,0,0.0001)"),e3[t4]},m2,x2,y2,b2=i3.spacingBox.height+(n2?-o2:o2)-a2,v2=this.nav,S2=this.clipRect;return"horizontal"!==r2.layout||"middle"===r2.verticalAlign||r2.floating||(b2/=2),h2&&(b2=Math.min(b2,h2)),p2.length=0,t3&&b2>0&&t3>b2&&false!==l2.enabled?(this.clipHeight=m2=Math.max(b2-20-this.titleHeight-a2,0),this.currentPage=w2(this.currentPage,1),this.fullHeight=t3,u2.forEach(((t4,e4)=>{let i4=(y2=t4.legendItem||{}).y||0,s3=Math.round(y2.label.getBBox().height),r3=p2.length;(!r3||i4-p2[r3-1]>m2&&(x2||i4)!==p2[r3-1])&&(p2.push(x2||i4),r3++),y2.pageIx=r3-1,x2&&((u2[e4-1].legendItem||{}).pageIx=r3-1),e4===u2.length-1&&i4+s3-p2[r3-1]>m2&&i4>p2[r3-1]&&(p2.push(i4),y2.pageIx=r3),i4!==x2&&(x2=i4)})),S2||(S2=e3.clipRect=s2.clipRect(0,a2-2,9999,0),e3.contentGroup.clip(S2)),g2(m2),v2||(this.nav=v2=s2.g().attr({zIndex:1}).add(this.group),this.up=s2.symbol("triangle",0,0,c2,c2).add(v2),f2("upTracker").on("click",(function(){e3.scroll(-1,d2)})),this.pager=s2.text("",15,10).addClass("highcharts-legend-navigation"),!i3.styledMode&&l2.style&&this.pager.css(l2.style),this.pager.add(v2),this.down=s2.symbol("triangle-down",0,0,c2,c2).add(v2),f2("downTracker").on("click",(function(){e3.scroll(1,d2)}))),e3.scroll(0),t3=b2):v2&&(g2(),this.nav=v2.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t3}scroll(t3,e3){let i3=this.chart,s2=this.pages,r2=s2.length,o2=this.clipHeight,n2=this.options.navigation,a2=this.pager,h2=this.padding,c2=this.currentPage+t3;c2>r2&&(c2=r2),c2>0&&(void 0!==e3&&d(e3,i3),this.nav.attr({translateX:h2,translateY:o2+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach((function(t4){t4.attr({class:1===c2?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})})),a2.attr({text:c2+"/"+r2}),[this.down,this.downTracker].forEach((function(t4){t4.attr({x:18+this.pager.getBBox().width,class:c2===r2?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),this),i3.styledMode||(this.up.attr({fill:1===c2?n2.inactiveColor:n2.activeColor}),this.upTracker.css({cursor:1===c2?"default":"pointer"}),this.down.attr({fill:c2===r2?n2.inactiveColor:n2.activeColor}),this.downTracker.css({cursor:c2===r2?"default":"pointer"})),this.scrollOffset=-s2[c2-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=c2,this.positionCheckboxes(),L((()=>{C(this,"afterScroll",{currentPage:c2})}),l(w2(e3,i3.renderer.globalAnimation,true)).duration))}setItemEvents(t3,e3,i3){let o2=this,n2=t3.legendItem||{},a2=o2.chart.renderer.boxWrapper,h2=t3 instanceof r,l2=t3 instanceof s,d2="highcharts-legend-"+(h2?"point":"series")+"-active",c2=o2.chart.styledMode,p2=i3?[e3,n2.symbol]:[n2.group],u2=e4=>{o2.allItems.forEach((i4=>{t3!==i4&&[i4].concat(i4.linkedSeries||[]).forEach((t4=>{t4.setState(e4,!h2)}))}))};for(let i4 of p2)i4&&i4.on("mouseover",(function(){t3.visible&&u2("inactive"),t3.setState("hover"),t3.visible&&a2.addClass(d2),c2||e3.css(o2.options.itemHoverStyle)})).on("mouseout",(function(){o2.chart.styledMode||e3.css(M(t3.visible?o2.itemStyle:o2.itemHiddenStyle)),u2(""),a2.removeClass(d2),t3.setState()})).on("click",(function(e4){let i5=function(){t3.setVisible&&t3.setVisible(),u2(t3.visible?"inactive":"")};a2.removeClass(d2),C(o2,"itemClick",{browserEvent:e4,legendItem:t3},i5),h2?t3.firePointEvent("legendItemClick",{browserEvent:e4}):l2&&C(t3,"legendItemClick",{browserEvent:e4})}))}createCheckboxForItem(t3){t3.checkbox=x("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t3.selected,defaultChecked:t3.selected},this.options.itemCheckboxStyle,this.chart.container),m(t3.checkbox,"click",(function(e3){let i3=e3.target;C(t3.series||t3,"checkboxClick",{checked:i3.checked,item:t3},(function(){t3.select()}))}))}}return(h=O||(O={})).compose=function(t3){T(p,"Core.Legend")&&m(t3,"beforeMargins",(function(){this.legend=new h(this,this.options.legend)}))},O})),i(e,"Core/Chart/Chart.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Time.js"],e["Core/Utilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Axis/Tick.js"]],(function(t2,e2,i2,s,r,o,n,a,h,l,d,c,p,u){let{animate:g,animObject:f,setAnimation:m}=t2,{defaultOptions:x,defaultTime:y}=i2,{numberFormat:b}=s,{registerEventOptions:v}=r,{charts:S,doc:C,marginNames:k,svg:M,win:w2}=o,{seriesTypes:T}=h,{addEvent:A,attr:P,createElement:L,css:O,defined:D,diffObjects:E,discardElement:I,erase:j,error:B,extend:R,find:z,fireEvent:N,getStyle:W,isArray:G,isNumber:H,isObject:X,isString:F,merge:Y,objectEach:U,pick:V,pInt:$,relativeLength:Z,removeEvent:_,splat:q,syncTimeout:K,uniqueKey:J}=c;class Q{static chart(t3,e3,i3){return new Q(t3,e3,i3)}constructor(t3,e3,i3){this.sharedClips={};let s2=[...arguments];(F(t3)||t3.nodeName)&&(this.renderTo=s2.shift()),this.init(s2[0],s2[1])}setZoomOptions(){let t3=this.options.chart,e3=t3.zooming;this.zooming={...e3,type:V(t3.zoomType,e3.type),key:V(t3.zoomKey,e3.key),pinchType:V(t3.pinchType,e3.pinchType),singleTouch:V(t3.zoomBySingleTouch,e3.singleTouch,false),resetButton:Y(e3.resetButton,t3.resetZoomButton)}}init(t3,e3){N(this,"init",{args:arguments},(function(){let i3=Y(x,t3),s2=i3.chart;this.userOptions=R({},t3),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=e3,this.isResizing=0,this.options=i3,this.axes=[],this.series=[],this.time=t3.time&&Object.keys(t3.time).length?new d(t3.time):o.time,this.numberFormatter=s2.numberFormatter||b,this.styledMode=s2.styledMode,this.hasCartesianSeries=s2.showAxes,this.index=S.length,S.push(this),o.chartCount++,v(this,s2),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),N(this,"afterInit"),this.firstRender()}))}initSeries(t3){let e3=this.options.chart,i3=t3.type||e3.type,s2=T[i3];s2||B(17,true,this,{missingModuleFor:i3});let r2=new s2;return"function"==typeof r2.init&&r2.init(this,t3),r2}setSortedData(){this.getSeriesOrderByLinks().forEach((function(t3){t3.points||t3.data||!t3.enabledDataSorting||t3.setData(t3.options.data,false)}))}getSeriesOrderByLinks(){return this.series.concat().sort((function(t3,e3){return t3.linkedSeries.length||e3.linkedSeries.length?e3.linkedSeries.length-t3.linkedSeries.length:0}))}orderItems(t3,e3=0){let i3=this[t3],s2=this.options[t3]=q(this.options[t3]).slice(),r2=this.userOptions[t3]=this.userOptions[t3]?q(this.userOptions[t3]).slice():[];if(this.hasRendered&&(s2.splice(e3),r2.splice(e3)),i3)for(let t4=e3,o2=i3.length;t4<o2;++t4){let e4=i3[t4];e4&&(e4.index=t4,e4 instanceof a&&(e4.name=e4.getName()),e4.options.isInternal||(s2[t4]=e4.options,r2[t4]=e4.userOptions))}}isInsidePlot(t3,e3,i3={}){var _a;let{inverted:s2,plotBox:r2,plotLeft:o2,plotTop:n2,scrollablePlotBox:a2}=this,{scrollLeft:h2=0,scrollTop:l2=0}=i3.visiblePlotOnly&&((_a=this.scrollablePlotArea)==null?void 0:_a.scrollingContainer)||{},d2=i3.series,c2=i3.visiblePlotOnly&&a2||r2,p2=i3.inverted?e3:t3,u2=i3.inverted?t3:e3,g2={x:p2,y:u2,isInsidePlot:true,options:i3};if(!i3.ignoreX){let t4=d2&&(s2&&!this.polar?d2.yAxis:d2.xAxis)||{pos:o2,len:1/0},e4=i3.paneCoordinates?t4.pos+p2:o2+p2;e4>=Math.max(h2+o2,t4.pos)&&e4<=Math.min(h2+o2+c2.width,t4.pos+t4.len)||(g2.isInsidePlot=false)}if(!i3.ignoreY&&g2.isInsidePlot){let t4=!s2&&i3.axis&&!i3.axis.isXAxis&&i3.axis||d2&&(s2?d2.xAxis:d2.yAxis)||{pos:n2,len:1/0},e4=i3.paneCoordinates?t4.pos+u2:n2+u2;e4>=Math.max(l2+n2,t4.pos)&&e4<=Math.min(l2+n2+c2.height,t4.pos+t4.len)||(g2.isInsidePlot=false)}return N(this,"afterIsInsidePlot",g2),g2.isInsidePlot}redraw(t3){N(this,"beforeRedraw");let e3=this.hasCartesianSeries?this.axes:this.colorAxis||[],i3=this.series,s2=this.pointer,r2=this.legend,o2=this.userOptions.legend,n2=this.renderer,a2=n2.isHidden(),h2=[],l2,d2,c2,p2=this.isDirtyBox,u2=this.isDirtyLegend,g2;for(n2.rootFontSize=n2.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(false),m(!!this.hasRendered&&t3,this),a2&&this.temporaryDisplay(),this.layOutTitles(false),c2=i3.length;c2--;)if(((g2=i3[c2]).options.stacking||g2.options.centerInCategory)&&(d2=true,g2.isDirty)){l2=true;break}if(l2)for(c2=i3.length;c2--;)(g2=i3[c2]).options.stacking&&(g2.isDirty=true);i3.forEach((function(t4){t4.isDirty&&("point"===t4.options.legendType?("function"==typeof t4.updateTotals&&t4.updateTotals(),u2=true):o2&&(o2.labelFormatter||o2.labelFormat)&&(u2=true)),t4.isDirtyData&&N(t4,"updatedData")})),u2&&r2&&r2.options.enabled&&(r2.render(),this.isDirtyLegend=false),d2&&this.getStacks(),e3.forEach((function(t4){t4.updateNames(),t4.setScale()})),this.getMargins(),e3.forEach((function(t4){t4.isDirty&&(p2=true)})),e3.forEach((function(t4){let e4=t4.min+","+t4.max;t4.extKey!==e4&&(t4.extKey=e4,h2.push((function(){N(t4,"afterSetExtremes",R(t4.eventArgs,t4.getExtremes())),delete t4.eventArgs}))),(p2||d2)&&t4.redraw()})),p2&&this.drawChartBox(),N(this,"predraw"),i3.forEach((function(t4){(p2||t4.isDirty)&&t4.visible&&t4.redraw(),t4.isDirtyData=false})),s2&&s2.reset(true),n2.draw(),N(this,"redraw"),N(this,"render"),a2&&this.temporaryDisplay(true),h2.forEach((function(t4){t4.call()}))}get(t3){let e3=this.series;function i3(e4){return e4.id===t3||e4.options&&e4.options.id===t3}let s2=z(this.axes,i3)||z(this.series,i3);for(let t4=0;!s2&&t4<e3.length;t4++)s2=z(e3[t4].points||[],i3);return s2}getAxes(){let t3=this.userOptions;for(let i3 of(N(this,"getAxes"),["xAxis","yAxis"]))for(let s2 of t3[i3]=q(t3[i3]||{}))new e2(this,s2,i3);N(this,"afterGetAxes")}getSelectedPoints(){return this.series.reduce(((t3,e3)=>(e3.getPointsCollection().forEach((e4=>{V(e4.selectedStaging,e4.selected)&&t3.push(e4)})),t3)),[])}getSelectedSeries(){return this.series.filter((function(t3){return t3.selected}))}setTitle(t3,e3,i3){this.applyDescription("title",t3),this.applyDescription("subtitle",e3),this.applyDescription("caption",void 0),this.layOutTitles(i3)}applyDescription(t3,e3){let i3=this,s2=this.options[t3]=Y(this.options[t3],e3),r2=this[t3];r2&&e3&&(this[t3]=r2=r2.destroy()),s2&&!r2&&((r2=this.renderer.text(s2.text,0,0,s2.useHTML).attr({align:s2.align,class:"highcharts-"+t3,zIndex:s2.zIndex||4}).add()).update=function(e4,s3){i3.applyDescription(t3,e4),i3.layOutTitles(s3)},this.styledMode||r2.css(R("title"===t3?{fontSize:this.options.isStock?"1em":"1.2em"}:{},s2.style)),this[t3]=r2)}layOutTitles(t3=true){let e3=[0,0,0],i3=this.renderer,s2=this.spacingBox;["title","subtitle","caption"].forEach((function(t4){let r3=this[t4],o2=this.options[t4],n2=o2.verticalAlign||"top",a2="title"===t4?"top"===n2?-3:0:"top"===n2?e3[0]+2:0;if(r3){r3.css({width:(o2.width||s2.width+(o2.widthAdjust||0))+"px"});let t5=i3.fontMetrics(r3).b,h2=Math.round(r3.getBBox(o2.useHTML).height);r3.align(R({y:"bottom"===n2?t5:a2+t5,height:h2},o2),false,"spacingBox"),o2.floating||("top"===n2?e3[0]=Math.ceil(e3[0]+h2):"bottom"===n2&&(e3[2]=Math.ceil(e3[2]+h2)))}}),this),e3[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e3[0]+=this.options.title.margin),e3[2]&&"bottom"===this.options.caption.verticalAlign&&(e3[2]+=this.options.caption.margin);let r2=!this.titleOffset||this.titleOffset.join(",")!==e3.join(",");this.titleOffset=e3,N(this,"afterLayOutTitles"),!this.isDirtyBox&&r2&&(this.isDirtyBox=this.isDirtyLegend=r2,this.hasRendered&&t3&&this.isDirtyBox&&this.redraw())}getContainerBox(){let t3=[].map.call(this.renderTo.children,(t4=>{if(t4!==this.container){let e4=t4.style.display;return t4.style.display="none",[t4,e4]}})),e3={width:W(this.renderTo,"width",true)||0,height:W(this.renderTo,"height",true)||0};return t3.filter(Boolean).forEach((([t4,e4])=>{t4.style.display=e4})),e3}getChartSize(){var _a;let t3=this.options.chart,e3=t3.width,i3=t3.height,s2=this.getContainerBox(),r2=s2.height>1&&!(!((_a=this.renderTo.parentElement)==null?void 0:_a.style.height)&&"100%"===this.renderTo.style.height);this.chartWidth=Math.max(0,e3||s2.width||600),this.chartHeight=Math.max(0,Z(i3,this.chartWidth)||(r2?s2.height:400)),this.containerBox=s2}temporaryDisplay(t3){let e3=this.renderTo,i3;if(t3)for(;e3&&e3.style;)e3.hcOrigStyle&&(O(e3,e3.hcOrigStyle),delete e3.hcOrigStyle),e3.hcOrigDetached&&(C.body.removeChild(e3),e3.hcOrigDetached=false),e3=e3.parentNode;else for(;e3&&e3.style&&(C.body.contains(e3)||e3.parentNode||(e3.hcOrigDetached=true,C.body.appendChild(e3)),("none"===W(e3,"display",false)||e3.hcOricDetached)&&(e3.hcOrigStyle={display:e3.style.display,height:e3.style.height,overflow:e3.style.overflow},i3={display:"block",overflow:"hidden"},e3!==this.renderTo&&(i3.height=0),O(e3,i3),e3.offsetWidth||e3.style.setProperty("display","block","important")),(e3=e3.parentNode)!==C.body););}setClassName(t3){this.container.className="highcharts-container "+(t3||"")}getContainer(){var _a;let t3=this.options,e3=t3.chart,i3="data-highcharts-chart",s2=J(),r2,o2=this.renderTo;o2||(this.renderTo=o2=e3.renderTo),F(o2)&&(this.renderTo=o2=C.getElementById(o2)),o2||B(13,true,this);let a2=$(P(o2,i3));H(a2)&&S[a2]&&S[a2].hasRendered&&S[a2].destroy(),P(o2,i3,this.index),o2.innerHTML=p.emptyHTML,e3.skipClone||o2.offsetWidth||this.temporaryDisplay(),this.getChartSize();let h2=this.chartHeight,d2=this.chartWidth;O(o2,{overflow:"hidden"}),this.styledMode||(r2=R({position:"relative",overflow:"hidden",width:d2+"px",height:h2+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},e3.style||{}));let c2=L("div",{id:s2},r2,o2);this.container=c2,this.getChartSize(),d2===this.chartWidth||(d2=this.chartWidth,this.styledMode||O(c2,{width:V((_a=e3.style)==null?void 0:_a.width,d2+"px")})),this.containerBox=this.getContainerBox(),this._cursor=c2.style.cursor;let u2=e3.renderer||!M?n.getRendererType(e3.renderer):l;if(this.renderer=new u2(c2,d2,h2,void 0,e3.forExport,t3.exporting&&t3.exporting.allowHTML,this.styledMode),m(void 0,this),this.setClassName(e3.className),this.styledMode)for(let e4 in t3.defs)this.renderer.definition(t3.defs[e4]);else this.renderer.setStyle(e3.style);this.renderer.chartIndex=this.index,N(this,"afterGetContainer")}getMargins(t3){let{spacing:e3,margin:i3,titleOffset:s2}=this;this.resetMargins(),s2[0]&&!D(i3[0])&&(this.plotTop=Math.max(this.plotTop,s2[0]+e3[0])),s2[2]&&!D(i3[2])&&(this.marginBottom=Math.max(this.marginBottom,s2[2]+e3[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i3,e3),N(this,"getMargins"),t3||this.getAxisMargins()}getAxisMargins(){let t3=this,e3=t3.axisOffset=[0,0,0,0],i3=t3.colorAxis,s2=t3.margin,r2=function(t4){t4.forEach((function(t5){t5.visible&&t5.getOffset()}))};t3.hasCartesianSeries?r2(t3.axes):i3&&i3.length&&r2(i3),k.forEach((function(i4,r3){D(s2[r3])||(t3[i4]+=e3[r3])})),t3.setChartSize()}getOptions(){return E(this.userOptions,x)}reflow(t3){var _a;let e3=this,i3=e3.containerBox,s2=e3.getContainerBox();(_a=e3.pointer)==null?true:delete _a.chartPosition,!e3.isPrinting&&!e3.isResizing&&i3&&s2.width&&((s2.width!==i3.width||s2.height!==i3.height)&&(c.clearTimeout(e3.reflowTimeout),e3.reflowTimeout=K((function(){e3.container&&e3.setSize(void 0,void 0,false)}),t3?100:0)),e3.containerBox=s2)}setReflow(){let t3=this,e3=e4=>{var _a;((_a=t3.options)==null?void 0:_a.chart.reflow)&&t3.hasLoaded&&t3.reflow(e4)};if("function"==typeof ResizeObserver)new ResizeObserver(e3).observe(t3.renderTo);else{let t4=A(w2,"resize",e3);A(this,"destroy",t4)}}setSize(t3,e3,i3){let s2=this,r2=s2.renderer;s2.isResizing+=1,m(i3,s2);let o2=r2.globalAnimation;s2.oldChartHeight=s2.chartHeight,s2.oldChartWidth=s2.chartWidth,void 0!==t3&&(s2.options.chart.width=t3),void 0!==e3&&(s2.options.chart.height=e3),s2.getChartSize();let{chartWidth:n2,chartHeight:a2,scrollablePixelsX:h2=0,scrollablePixelsY:l2=0}=s2;(s2.isDirtyBox||n2!==s2.oldChartWidth||a2!==s2.oldChartHeight)&&(s2.styledMode||(o2?g:O)(s2.container,{width:`${n2+h2}px`,height:`${a2+l2}px`},o2),s2.setChartSize(true),r2.setSize(n2,a2,o2),s2.axes.forEach((function(t4){t4.isDirty=true,t4.setScale()})),s2.isDirtyLegend=true,s2.isDirtyBox=true,s2.layOutTitles(),s2.getMargins(),s2.redraw(o2),s2.oldChartHeight=void 0,N(s2,"resize"),setTimeout((()=>{s2&&N(s2,"endResize")}),f(o2).duration)),s2.isResizing-=1}setChartSize(t3){let e3,i3,s2,r2;let{chartHeight:o2,chartWidth:n2,inverted:a2,spacing:h2,renderer:l2}=this,d2=this.clipOffset,c2=Math[a2?"floor":"round"];this.plotLeft=e3=Math.round(this.plotLeft),this.plotTop=i3=Math.round(this.plotTop),this.plotWidth=s2=Math.max(0,Math.round(n2-e3-this.marginRight)),this.plotHeight=r2=Math.max(0,Math.round(o2-i3-this.marginBottom)),this.plotSizeX=a2?r2:s2,this.plotSizeY=a2?s2:r2,this.spacingBox=l2.spacingBox={x:h2[3],y:h2[0],width:n2-h2[3]-h2[1],height:o2-h2[0]-h2[2]},this.plotBox=l2.plotBox={x:e3,y:i3,width:s2,height:r2},d2&&(this.clipBox={x:c2(d2[3]),y:c2(d2[0]),width:c2(this.plotSizeX-d2[1]-d2[3]),height:c2(this.plotSizeY-d2[0]-d2[2])}),t3||(this.axes.forEach((function(t4){t4.setAxisSize(),t4.setAxisTranslation()})),l2.alignElements()),N(this,"afterSetChartSize",{skipAxes:t3})}resetMargins(){N(this,"resetMargins");let t3=this,e3=t3.options.chart,i3=e3.plotBorderWidth||0,s2=i3/2;["margin","spacing"].forEach((function(i4){let s3=e3[i4],r2=X(s3)?s3:[s3,s3,s3,s3];["Top","Right","Bottom","Left"].forEach((function(s4,o2){t3[i4][o2]=V(e3[i4+s4],r2[o2])}))})),k.forEach((function(e4,i4){t3[e4]=V(t3.margin[i4],t3.spacing[i4])})),t3.axisOffset=[0,0,0,0],t3.clipOffset=[s2,s2,s2,s2],t3.plotBorderWidth=i3}drawChartBox(){let t3=this.options.chart,e3=this.renderer,i3=this.chartWidth,s2=this.chartHeight,r2=this.styledMode,o2=this.plotBGImage,n2=t3.backgroundColor,a2=t3.plotBackgroundColor,h2=t3.plotBackgroundImage,l2=this.plotLeft,d2=this.plotTop,c2=this.plotWidth,p2=this.plotHeight,u2=this.plotBox,g2=this.clipRect,f2=this.clipBox,m2=this.chartBackground,x2=this.plotBackground,y2=this.plotBorder,b2,v2,S2,C2="animate";m2||(this.chartBackground=m2=e3.rect().addClass("highcharts-background").add(),C2="attr"),r2?b2=v2=m2.strokeWidth():(v2=(b2=t3.borderWidth||0)+(t3.shadow?8:0),S2={fill:n2||"none"},(b2||m2["stroke-width"])&&(S2.stroke=t3.borderColor,S2["stroke-width"]=b2),m2.attr(S2).shadow(t3.shadow)),m2[C2]({x:v2/2,y:v2/2,width:i3-v2-b2%2,height:s2-v2-b2%2,r:t3.borderRadius}),C2="animate",x2||(C2="attr",this.plotBackground=x2=e3.rect().addClass("highcharts-plot-background").add()),x2[C2](u2),!r2&&(x2.attr({fill:a2||"none"}).shadow(t3.plotShadow),h2&&(o2?(h2!==o2.attr("href")&&o2.attr("href",h2),o2.animate(u2)):this.plotBGImage=e3.image(h2,l2,d2,c2,p2).add())),g2?g2.animate({width:f2.width,height:f2.height}):this.clipRect=e3.clipRect(f2),C2="animate",y2||(C2="attr",this.plotBorder=y2=e3.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),r2||y2.attr({stroke:t3.plotBorderColor,"stroke-width":t3.plotBorderWidth||0,fill:"none"}),y2[C2](y2.crisp({x:l2,y:d2,width:c2,height:p2},-y2.strokeWidth())),this.isDirtyBox=false,N(this,"afterDrawChartBox")}propFromSeries(){let t3,e3,i3;let s2=this,r2=s2.options.chart,o2=s2.options.series;["inverted","angular","polar"].forEach((function(n2){for(e3=T[r2.type],i3=r2[n2]||e3&&e3.prototype[n2],t3=o2&&o2.length;!i3&&t3--;)(e3=T[o2[t3].type])&&e3.prototype[n2]&&(i3=true);s2[n2]=i3}))}linkSeries(t3){let e3=this,i3=e3.series;i3.forEach((function(t4){t4.linkedSeries.length=0})),i3.forEach((function(t4){let{linkedTo:i4}=t4.options;if(F(i4)){let s2;(s2=":previous"===i4?e3.series[t4.index-1]:e3.get(i4))&&s2.linkedParent!==t4&&(s2.linkedSeries.push(t4),t4.linkedParent=s2,s2.enabledDataSorting&&t4.setDataSortingOptions(),t4.visible=V(t4.options.visible,s2.options.visible,t4.visible))}})),N(this,"afterLinkSeries",{isUpdating:t3})}renderSeries(){this.series.forEach((function(t3){t3.translate(),t3.render()}))}render(){var _a;let t3=this.axes,e3=this.colorAxis,i3=this.renderer,s2=this.options.chart.axisLayoutRuns||2,r2=t4=>{t4.forEach((t5=>{t5.visible&&t5.render()}))},o2=0,n2=true,a2,h2=0;for(let e4 of(this.setTitle(),N(this,"beforeMargins"),(_a=this.getStacks)==null?void 0:_a.call(this),this.getMargins(true),this.setChartSize(),t3)){let{options:t4}=e4,{labels:i4}=t4;if(this.hasCartesianSeries&&e4.horiz&&e4.visible&&i4.enabled&&e4.series.length&&"colorAxis"!==e4.coll&&!this.polar){o2=t4.tickLength,e4.createGroups();let s3=new u(e4,0,"",true),r3=s3.createLabel("x",i4);if(s3.destroy(),r3&&V(i4.reserveSpace,!H(t4.crossing))&&(o2=r3.getBBox().height+i4.distance+Math.max(t4.offset||0,0)),o2){r3==null?void 0:r3.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-o2,0);(n2||a2||s2>1)&&h2<s2;){let e4=this.plotWidth,i4=this.plotHeight;for(let e5 of t3)0===h2?e5.setScale():(e5.horiz&&n2||!e5.horiz&&a2)&&e5.setTickInterval(true);0===h2?this.getAxisMargins():this.getMargins(),n2=e4/this.plotWidth>(h2?1:1.1),a2=i4/this.plotHeight>(h2?1:1.05),h2++}this.drawChartBox(),this.hasCartesianSeries?r2(t3):e3&&e3.length&&r2(e3),this.seriesGroup||(this.seriesGroup=i3.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=true}addCredits(t3){let e3=this,i3=Y(true,this.options.credits,t3);i3.enabled&&!this.credits&&(this.credits=this.renderer.text(i3.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",(function(){i3.href&&(w2.location.href=i3.href)})).attr({align:i3.position.align,zIndex:8}),e3.styledMode||this.credits.css(i3.style),this.credits.add().align(i3.position),this.credits.update=function(t4){e3.credits=e3.credits.destroy(),e3.addCredits(t4)})}destroy(){let t3;let e3=this,i3=e3.axes,s2=e3.series,r2=e3.container,n2=r2&&r2.parentNode;for(N(e3,"destroy"),e3.renderer.forExport?j(S,e3):S[e3.index]=void 0,o.chartCount--,e3.renderTo.removeAttribute("data-highcharts-chart"),_(e3),t3=i3.length;t3--;)i3[t3]=i3[t3].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t3=s2.length;t3--;)s2[t3]=s2[t3].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach((function(t4){let i4=e3[t4];i4&&i4.destroy&&(e3[t4]=i4.destroy())})),r2&&(r2.innerHTML=p.emptyHTML,_(r2),n2&&I(r2)),U(e3,(function(t4,i4){delete e3[i4]}))}firstRender(){var _a;let t3=this,e3=t3.options;t3.getContainer(),t3.resetMargins(),t3.setChartSize(),t3.propFromSeries(),t3.getAxes();let i3=G(e3.series)?e3.series:[];e3.series=[],i3.forEach((function(e4){t3.initSeries(e4)})),t3.linkSeries(),t3.setSortedData(),N(t3,"beforeRender"),t3.render(),(_a=t3.pointer)==null?void 0:_a.getChartPosition(),t3.renderer.imgCount||t3.hasLoaded||t3.onload(),t3.temporaryDisplay(true)}onload(){this.callbacks.concat([this.callback]).forEach((function(t3){t3&&void 0!==this.index&&t3.apply(this,[this])}),this),N(this,"load"),N(this,"render"),D(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=true}warnIfA11yModuleNotLoaded(){let{options:t3,title:e3}=this;!t3||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e3&&e3.element.textContent||"").replace(/</g,"<")}),t3.accessibility&&false===t3.accessibility.enabled||B('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',false,this))}addSeries(t3,e3,i3){let s2;let r2=this;return t3&&(e3=V(e3,true),N(r2,"addSeries",{options:t3},(function(){s2=r2.initSeries(t3),r2.isDirtyLegend=true,r2.linkSeries(),s2.enabledDataSorting&&s2.setData(t3.data,false),N(r2,"afterAddSeries",{series:s2}),e3&&r2.redraw(i3)}))),s2}addAxis(t3,e3,i3,s2){return this.createAxis(e3?"xAxis":"yAxis",{axis:t3,redraw:i3,animation:s2})}addColorAxis(t3,e3,i3){return this.createAxis("colorAxis",{axis:t3,redraw:e3,animation:i3})}createAxis(t3,i3){let s2=new e2(this,i3.axis,t3);return V(i3.redraw,true)&&this.redraw(i3.animation),s2}showLoading(t3){let e3=this,i3=e3.options,s2=i3.loading,r2=function(){o2&&O(o2,{left:e3.plotLeft+"px",top:e3.plotTop+"px",width:e3.plotWidth+"px",height:e3.plotHeight+"px"})},o2=e3.loadingDiv,n2=e3.loadingSpan;o2||(e3.loadingDiv=o2=L("div",{className:"highcharts-loading highcharts-loading-hidden"},null,e3.container)),n2||(e3.loadingSpan=n2=L("span",{className:"highcharts-loading-inner"},null,o2),A(e3,"redraw",r2)),o2.className="highcharts-loading",p.setElementHTML(n2,V(t3,i3.lang.loading,"")),e3.styledMode||(O(o2,R(s2.style,{zIndex:10})),O(n2,s2.labelStyle),e3.loadingShown||(O(o2,{opacity:0,display:""}),g(o2,{opacity:s2.style.opacity||.5},{duration:s2.showDuration||0}))),e3.loadingShown=true,r2()}hideLoading(){let t3=this.options,e3=this.loadingDiv;e3&&(e3.className="highcharts-loading highcharts-loading-hidden",this.styledMode||g(e3,{opacity:0},{duration:t3.loading.hideDuration||100,complete:function(){O(e3,{display:"none"})}})),this.loadingShown=false}update(t3,e3,i3,s2){let r2,o2,n2;let a2=this,h2={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},l2=t3.isResponsiveOptions,c2=[];N(a2,"update",{options:t3}),l2||a2.setResponsive(false,true),t3=E(t3,a2.options),a2.userOptions=Y(a2.userOptions,t3);let p2=t3.chart;p2&&(Y(true,a2.options.chart,p2),this.setZoomOptions(),"className"in p2&&a2.setClassName(p2.className),("inverted"in p2||"polar"in p2||"type"in p2)&&(a2.propFromSeries(),r2=true),"alignTicks"in p2&&(r2=true),"events"in p2&&v(this,p2),U(p2,(function(t4,e4){-1!==a2.propsRequireUpdateSeries.indexOf("chart."+e4)&&(o2=true),-1!==a2.propsRequireDirtyBox.indexOf(e4)&&(a2.isDirtyBox=true),-1===a2.propsRequireReflow.indexOf(e4)||(a2.isDirtyBox=true,l2||(n2=true))})),!a2.styledMode&&p2.style&&a2.renderer.setStyle(a2.options.chart.style||{})),!a2.styledMode&&t3.colors&&(this.options.colors=t3.colors),t3.time&&(this.time===y&&(this.time=new d(t3.time)),Y(true,a2.options.time,t3.time)),U(t3,(function(e4,i4){a2[i4]&&"function"==typeof a2[i4].update?a2[i4].update(e4,false):"function"==typeof a2[h2[i4]]?a2[h2[i4]](e4):"colors"!==i4&&-1===a2.collectionsWithUpdate.indexOf(i4)&&Y(true,a2.options[i4],t3[i4]),"chart"!==i4&&-1!==a2.propsRequireUpdateSeries.indexOf(i4)&&(o2=true)})),this.collectionsWithUpdate.forEach((function(e4){t3[e4]&&(q(t3[e4]).forEach((function(t4,s3){let r3;let o3=D(t4.id);o3&&(r3=a2.get(t4.id)),!r3&&a2[e4]&&(r3=a2[e4][V(t4.index,s3)])&&(o3&&D(r3.options.id)||r3.options.isInternal)&&(r3=void 0),r3&&r3.coll===e4&&(r3.update(t4,false),i3&&(r3.touched=true)),!r3&&i3&&a2.collectionsWithInit[e4]&&(a2.collectionsWithInit[e4][0].apply(a2,[t4].concat(a2.collectionsWithInit[e4][1]||[]).concat([false])).touched=true)})),i3&&a2[e4].forEach((function(t4){t4.touched||t4.options.isInternal?delete t4.touched:c2.push(t4)})))})),c2.forEach((function(t4){t4.chart&&t4.remove&&t4.remove(false)})),r2&&a2.axes.forEach((function(t4){t4.update({},false)})),o2&&a2.getSeriesOrderByLinks().forEach((function(t4){t4.chart&&t4.update({},false)}),this);let u2=p2&&p2.width,g2=p2&&(F(p2.height)?Z(p2.height,u2||a2.chartWidth):p2.height);n2||H(u2)&&u2!==a2.chartWidth||H(g2)&&g2!==a2.chartHeight?a2.setSize(u2,g2,s2):V(e3,true)&&a2.redraw(s2),N(a2,"afterUpdate",{options:t3,redraw:e3,animation:s2})}setSubtitle(t3,e3){this.applyDescription("subtitle",t3),this.layOutTitles(e3)}setCaption(t3,e3){this.applyDescription("caption",t3),this.layOutTitles(e3)}showResetZoom(){let t3=this,e3=x.lang,i3=t3.zooming.resetButton,s2=i3.theme,r2="chart"===i3.relativeTo||"spacingBox"===i3.relativeTo?null:"plotBox";function o2(){t3.zoomOut()}N(this,"beforeShowResetZoom",null,(function(){t3.resetZoomButton=t3.renderer.button(e3.resetZoom,null,null,o2,s2).attr({align:i3.position.align,title:e3.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(i3.position,false,r2)})),N(this,"afterShowResetZoom")}zoomOut(){N(this,"selection",{resetSelection:true},(()=>this.transform({reset:true,trigger:"zoom"})))}pan(t3,e3){let i3=this,s2="object"==typeof e3?e3:{enabled:e3,type:"x"},r2=s2.type,o2=r2&&i3[{x:"xAxis",xy:"axes",y:"yAxis"}[r2]].filter((t4=>t4.options.panningEnabled&&!t4.options.isInternal)),n2=i3.options.chart;(n2==null?void 0:n2.panning)&&(n2.panning=s2),N(this,"pan",{originalEvent:t3},(()=>{i3.transform({axes:o2,event:t3,to:{x:t3.chartX-(i3.mouseDownX||0),y:t3.chartY-(i3.mouseDownY||0)},trigger:"pan"}),O(i3.container,{cursor:"move"})}))}transform(t3){var _a;let{axes:e3=this.axes,event:i3,from:s2={},reset:r2,selection:o2,to:n2={},trigger:a2}=t3,{inverted:h2}=this,l2=false,d2,c2;for(let t4 of((_a=this.hoverPoints)==null?void 0:_a.forEach((t5=>t5.setState())),e3)){let{horiz:e4,len:p2,minPointOffset:u2=0,options:g2,reversed:f2}=t4,m2=e4?"width":"height",x2=e4?"x":"y",y2=V(n2[m2],t4.len),b2=V(s2[m2],t4.len),v2=10>Math.abs(y2)?1:y2/b2,S2=(s2[x2]||0)+b2/2-t4.pos,C2=S2-((n2[x2]??t4.pos)+y2/2-t4.pos)/v2,k2=f2&&!h2||!f2&&h2?-1:1;if(!r2&&(S2<0||S2>t4.len))continue;let M2=t4.toValue(C2,true)+(o2||t4.isOrdinal?0:u2*k2),w3=t4.toValue(C2+p2/v2,true)-(o2||t4.isOrdinal?0:u2*k2||0),T2=t4.allExtremes;if(M2>w3&&([M2,w3]=[w3,M2]),1===v2&&!r2&&"yAxis"===t4.coll&&!T2){for(let e5 of t4.series){let t5=e5.getExtremes(e5.getProcessedData(true).yData,true);T2??(T2={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),H(t5.dataMin)&&H(t5.dataMax)&&(T2.dataMin=Math.min(t5.dataMin,T2.dataMin),T2.dataMax=Math.max(t5.dataMax,T2.dataMax))}t4.allExtremes=T2}let{dataMin:A2,dataMax:P2,min:L2,max:O2}=R(t4.getExtremes(),T2||{}),E2=A2??g2.min,I2=P2??g2.max,j2=w3-M2,B2=t4.categories?0:Math.min(j2,I2-E2),z2=E2-B2*(D(g2.min)?0:g2.minPadding),N2=I2+B2*(D(g2.max)?0:g2.maxPadding),W2=t4.allowZoomOutside||1===v2||"zoom"!==a2&&v2>1,G2=Math.min(g2.min??z2,z2,W2?L2:z2),X2=Math.max(g2.max??N2,N2,W2?O2:N2);(!t4.isOrdinal||t4.options.overscroll||1!==v2||r2)&&(M2<G2&&(M2=G2,v2>=1&&(w3=M2+j2)),w3>X2&&(w3=X2,v2>=1&&(M2=w3-j2)),(r2||t4.series.length&&(M2!==L2||w3!==O2)&&M2>=G2&&w3<=X2)&&(o2?o2[t4.coll].push({axis:t4,min:M2,max:w3}):(t4.isPanning="zoom"!==a2,t4.isPanning&&(c2=true),t4.setExtremes(r2?void 0:M2,r2?void 0:w3,false,false,{move:C2,trigger:a2,scale:v2}),!r2&&(M2>G2||w3<X2)&&"mousewheel"!==a2&&(d2=true)),l2=true),i3&&(this[e4?"mouseDownX":"mouseDownY"]=i3[e4?"chartX":"chartY"]))}return l2&&(o2?N(this,"selection",o2,(()=>{delete t3.selection,t3.trigger="zoom",this.transform(t3)})):(!d2||c2||this.resetZoomButton?!d2&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw("zoom"===a2&&(this.options.chart.animation??this.pointCount<100)))),l2}}return R(Q.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Q.prototype.addAxis,[true]],yAxis:[Q.prototype.addAxis,[false]],series:[Q.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),Q})),i(e,"Extensions/ScrollablePlotArea.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{stop:r}=t2,{composed:o}=e2,{addEvent:n,createElement:a,css:h,defined:l,merge:d,pushUnique:c}=s;function p(){let t3=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!t3&&(this.scrollablePlotArea=t3=new g(this)),t3==null?void 0:t3.applyFixed()}function u(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=true)}class g{static compose(t3,e3,i3){c(o,this.compose)&&(n(t3,"afterInit",u),n(e3,"afterSetChartSize",(t4=>this.afterSetSize(t4.target,t4))),n(e3,"render",p),n(i3,"show",u))}static afterSetSize(t3,e3){let i3,s2,r2;let{minWidth:o2,minHeight:n2}=t3.options.chart.scrollablePlotArea||{},{clipBox:a2,plotBox:h2,inverted:c2,renderer:p2}=t3;if(!p2.forExport&&(o2?(t3.scrollablePixelsX=i3=Math.max(0,o2-t3.chartWidth),i3&&(t3.scrollablePlotBox=d(t3.plotBox),h2.width=t3.plotWidth+=i3,a2[c2?"height":"width"]+=i3,r2=true)):n2&&(t3.scrollablePixelsY=s2=Math.max(0,n2-t3.chartHeight),l(s2)&&(t3.scrollablePlotBox=d(t3.plotBox),h2.height=t3.plotHeight+=s2,a2[c2?"width":"height"]+=s2,r2=false)),l(r2)&&!e3.skipAxes))for(let e4 of t3.axes)e4.horiz===r2&&(e4.setAxisSize(),e4.setAxisTranslation())}constructor(t3){var _a;let e3;let s2=t3.options.chart,r2=i2.getRendererType(),o2=s2.scrollablePlotArea||{},l2=this.moveFixedElements.bind(this),d2={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};t3.scrollablePixelsX&&(d2.overflowX="auto"),t3.scrollablePixelsY&&(d2.overflowY="auto"),this.chart=t3;let c2=this.parentDiv=a("div",{className:"highcharts-scrolling-parent"},{position:"relative"},t3.renderTo),p2=this.scrollingContainer=a("div",{className:"highcharts-scrolling"},d2,c2),u2=this.innerContainer=a("div",{className:"highcharts-inner-container"},void 0,p2),g2=this.fixedDiv=a("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(((_a=s2.style)==null?void 0:_a.zIndex)||0)+2,top:0},void 0,true),f=this.fixedRenderer=new r2(g2,t3.chartWidth,t3.chartHeight,s2.style);this.mask=f.path().attr({fill:s2.backgroundColor||"#fff","fill-opacity":o2.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),p2.parentNode.insertBefore(g2,p2),h(t3.renderTo,{overflow:"visible"}),n(t3,"afterShowResetZoom",l2),n(t3,"afterApplyDrilldown",l2),n(t3,"afterLayOutTitles",l2),n(p2,"scroll",(()=>{let{pointer:i3,hoverPoint:s3}=t3;i3&&(delete i3.chartPosition,s3&&(e3=s3),i3.runPointActions(void 0,e3,true))})),u2.appendChild(t3.container)}applyFixed(){var _a;let{chart:t3,fixedRenderer:e3,isDirty:i3,scrollingContainer:s2}=this,{axisOffset:o2,chartWidth:n2,chartHeight:a2,container:d2,plotHeight:c2,plotLeft:p2,plotTop:u2,plotWidth:g2,scrollablePixelsX:f=0,scrollablePixelsY:m=0}=t3,{scrollPositionX:x=0,scrollPositionY:y=0}=t3.options.chart.scrollablePlotArea||{},b=n2+f,v=a2+m;e3.setSize(n2,a2),(i3??true)&&(this.isDirty=false,this.moveFixedElements()),r(t3.container),h(d2,{width:`${b}px`,height:`${v}px`}),t3.renderer.boxWrapper.attr({width:b,height:v,viewBox:[0,0,b,v].join(" ")}),(_a=t3.chartBackground)==null?void 0:_a.attr({width:b,height:v}),h(s2,{width:`${n2}px`,height:`${a2}px`}),l(i3)||(s2.scrollLeft=f*x,s2.scrollTop=m*y);let S=u2-o2[0]-1,C=p2-o2[3]-1,k=u2+c2+o2[2]+1,M=p2+g2+o2[1]+1,w2=p2+g2-f,T=u2+c2-m,A=[["M",0,0]];f?A=[["M",0,S],["L",p2-1,S],["L",p2-1,k],["L",0,k],["Z"],["M",w2,S],["L",n2,S],["L",n2,k],["L",w2,k],["Z"]]:m&&(A=[["M",C,0],["L",C,u2-1],["L",M,u2-1],["L",M,0],["Z"],["M",C,T],["L",C,a2],["L",M,a2],["L",M,T],["Z"]]),"adjustHeight"!==t3.redrawTrigger&&this.mask.attr({d:A})}moveFixedElements(){let t3;let{container:e3,inverted:i3,scrollablePixelsX:s2,scrollablePixelsY:r2}=this.chart,o2=this.fixedRenderer,n2=g.fixedSelectors;for(let a2 of(s2&&!i3?t3=".highcharts-yaxis":s2&&i3?t3=".highcharts-xaxis":r2&&!i3?t3=".highcharts-xaxis":r2&&i3&&(t3=".highcharts-yaxis"),t3&&n2.push(`${t3}:not(.highcharts-radial-axis)`,`${t3}-labels:not(.highcharts-radial-axis-labels)`),n2))[].forEach.call(e3.querySelectorAll(a2),(t4=>{(t4.namespaceURI===o2.SVG_NS?o2.box:o2.box.parentNode).appendChild(t4),t4.style.pointerEvents="auto"}))}}return g.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"],g})),i(e,"Core/Axis/Stacking/StackItem.js",[e["Core/Templating.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{format:s}=t2,{series:r}=e2,{destroyObjectProperties:o,fireEvent:n,isNumber:a,pick:h}=i2;return class{constructor(t3,e3,i3,s2,r2){let o2=t3.chart.inverted,n2=t3.reversed;this.axis=t3;let a2=this.isNegative=!!i3!=!!n2;this.options=e3=e3||{},this.x=s2,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=false,this.stack=r2,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e3.align||(o2?a2?"left":"right":"center"),verticalAlign:e3.verticalAlign||(o2?"middle":a2?"bottom":"top"),y:e3.y,x:e3.x},this.textAlign=e3.textAlign||(o2?a2?"right":"left":"center")}destroy(){o(this,this.axis)}render(t3){let e3=this.axis.chart,i3=this.options,r2=i3.format,o2=r2?s(r2,this,e3):i3.formatter.call(this);if(this.label)this.label.attr({text:o2,visibility:"hidden"});else{this.label=e3.renderer.label(o2,null,void 0,i3.shape,void 0,void 0,i3.useHTML,false,"stack-labels");let s2={r:i3.borderRadius||0,text:o2,padding:h(i3.padding,5),visibility:"hidden"};e3.styledMode||(s2.fill=i3.backgroundColor,s2.stroke=i3.borderColor,s2["stroke-width"]=i3.borderWidth,this.label.css(i3.style||{})),this.label.attr(s2),this.label.added||this.label.add(t3)}this.label.labelrank=e3.plotSizeY,n(this,"afterRender")}setOffset(t3,e3,i3,s2,o2,l){let{alignOptions:d,axis:c,label:p,options:u,textAlign:g}=this,f=c.chart,m=this.getStackBox({xOffset:t3,width:e3,boxBottom:i3,boxTop:s2,defaultX:o2,xAxis:l}),{verticalAlign:x}=d;if(p&&m){let t4=p.getBBox(void 0,0),e4=p.padding,i4="justify"===h(u.overflow,"justify"),s3;d.x=u.x||0,d.y=u.y||0;let{x:o3,y:n2}=this.adjustStackPosition({labelBox:t4,verticalAlign:x,textAlign:g});m.x-=o3,m.y-=n2,p.align(d,false,m),(s3=f.isInsidePlot(p.alignAttr.x+d.x+o3,p.alignAttr.y+d.y+n2))||(i4=false),i4&&r.prototype.justifyDataLabel.call(c,p,d,p.alignAttr,t4,m),p.attr({x:p.alignAttr.x,y:p.alignAttr.y,rotation:u.rotation,rotationOriginX:t4.width*{left:0,center:.5,right:1}[u.textAlign||"center"],rotationOriginY:t4.height/2}),h(!i4&&u.crop,true)&&(s3=a(p.x)&&a(p.y)&&f.isInsidePlot(p.x-e4+(p.width||0),p.y)&&f.isInsidePlot(p.x+e4,p.y)),p[s3?"show":"hide"]()}n(this,"afterSetOffset",{xOffset:t3,width:e3})}adjustStackPosition({labelBox:t3,verticalAlign:e3,textAlign:i3}){let s2={bottom:0,middle:1,top:2,right:1,center:0,left:-1},r2=s2[e3],o2=s2[i3];return{x:t3.width/2+t3.width/2*o2,y:t3.height/2*r2}}getStackBox(t3){let e3=this.axis,i3=e3.chart,{boxTop:s2,defaultX:r2,xOffset:o2,width:n2,boxBottom:l}=t3,d=e3.stacking.usePercentage?100:h(s2,this.total,0),c=e3.toPixels(d),p=t3.xAxis||i3.xAxis[0],u=h(r2,p.translate(this.x))+o2,g=Math.abs(c-e3.toPixels(l||a(e3.min)&&e3.logarithmic&&e3.logarithmic.lin2log(e3.min)||0)),f=i3.inverted,m=this.isNegative;return f?{x:(m?c:c-g)-i3.plotLeft,y:p.height-u-n2+p.top-i3.plotTop,width:g,height:n2}:{x:u+p.transB-i3.plotLeft,y:(m?c-g:c)-i3.plotTop,width:n2,height:g}}}})),i(e,"Core/Axis/Stacking/StackingAxis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r){var o;let{getDeferredAnimation:n}=t2,{series:{prototype:a}}=i2,{addEvent:h,correctFloat:l,defined:d,destroyObjectProperties:c,fireEvent:p,isArray:u,isNumber:g,objectEach:f,pick:m}=r;function x(){let t3=this.inverted;this.axes.forEach((t4=>{t4.stacking&&t4.stacking.stacks&&t4.hasVisibleSeries&&(t4.stacking.oldStacks=t4.stacking.stacks)})),this.series.forEach((e3=>{let i3=e3.xAxis&&e3.xAxis.options||{};e3.options.stacking&&e3.reserveSpace()&&(e3.stackKey=[e3.type,m(e3.options.stack,""),t3?i3.top:i3.left,t3?i3.height:i3.width].join(","))}))}function y(){var _a;let t3=this.stacking;if(t3){let e3=t3.stacks;f(e3,((t4,i3)=>{c(t4),delete e3[i3]})),(_a=t3.stackTotalGroup)==null?void 0:_a.destroy()}}function b(){this.stacking||(this.stacking=new w2(this))}function v(t3,e3,i3,s2){return!d(t3)||t3.x!==e3||s2&&t3.stackKey!==s2?t3={x:e3,index:0,key:s2,stackKey:s2}:t3.index++,t3.key=[i3,e3,t3.index].join(","),t3}function S(){let t3;let e3=this,i3=e3.yAxis,s2=e3.stackKey||"",r2=i3.stacking.stacks,o2=e3.processedXData,n2=e3.options.stacking,a2=e3[n2+"Stacker"];a2&&[s2,"-"+s2].forEach((i4=>{var _a;let s3=o2.length,n3,h2,l2;for(;s3--;)n3=o2[s3],t3=e3.getStackIndicator(t3,n3,e3.index,i4),h2=(_a=r2[i4])==null?void 0:_a[n3],(l2=h2==null?void 0:h2.points[t3.key||""])&&a2.call(e3,l2,h2,s3)}))}function C(t3,e3,i3){let s2=e3.total?100/e3.total:0;t3[0]=l(t3[0]*s2),t3[1]=l(t3[1]*s2),this.stackedYData[i3]=t3[1]}function k(t3){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&!this.options.stacking&&this.chart.series.length>1?a.setStackedPoints.call(this,t3,"group"):t3.stacking.resetStacks())}function M(t3,e3){var _a,_b;let i3,r2,o2,n2,a2,h2,c2,p2,g2;let f2=e3||this.options.stacking;if(!f2||!this.reserveSpace()||({group:"xAxis"}[f2]||"yAxis")!==t3.coll)return;let x2=this.processedXData,y2=this.processedYData,b2=[],v2=y2.length,S2=this.options,C2=S2.threshold||0,k2=S2.startFromThreshold?C2:0,M2=S2.stack,w3=e3?`${this.type},${f2}`:this.stackKey||"",T="-"+w3,A=this.negStacks,P=t3.stacking,L=P.stacks,O=P.oldStacks;for(P.stacksTouched+=1,c2=0;c2<v2;c2++){p2=x2[c2],g2=y2[c2],h2=(i3=this.getStackIndicator(i3,p2,this.index)).key||"",L[a2=(r2=A&&g2<(k2?0:C2))?T:w3]||(L[a2]={}),L[a2][p2]||(((_a=O[a2])==null?void 0:_a[p2])?(L[a2][p2]=O[a2][p2],L[a2][p2].total=null):L[a2][p2]=new s(t3,t3.options.stackLabels,!!r2,p2,M2)),o2=L[a2][p2],null!==g2?(o2.points[h2]=o2.points[this.index]=[m(o2.cumulative,k2)],d(o2.cumulative)||(o2.base=h2),o2.touched=P.stacksTouched,i3.index>0&&false===this.singleStacks&&(o2.points[h2][0]=o2.points[this.index+","+p2+",0"][0])):(delete o2.points[h2],delete o2.points[this.index]);let e4=o2.total||0;"percent"===f2?(n2=r2?w3:T,e4=A&&((_b=L[n2])==null?void 0:_b[p2])?(n2=L[n2][p2]).total=Math.max(n2.total||0,e4)+Math.abs(g2)||0:l(e4+(Math.abs(g2)||0))):"group"===f2?(u(g2)&&(g2=g2[0]),null!==g2&&e4++):e4=l(e4+(g2||0)),"group"===f2?o2.cumulative=(e4||1)-1:o2.cumulative=l(m(o2.cumulative,k2)+(g2||0)),o2.total=e4,null!==g2&&(o2.points[h2].push(o2.cumulative),b2[c2]=o2.cumulative,o2.hasValidPoints=true)}"percent"===f2&&(P.usePercentage=true),"group"!==f2&&(this.stackedYData=b2),P.oldStacks={}}class w2{constructor(t3){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t3}buildStacks(){let t3,e3;let i3=this.axis,s2=i3.series,r2="xAxis"===i3.coll,o2=i3.options.reversedStacks,n2=s2.length;for(this.resetStacks(),this.usePercentage=false,e3=n2;e3--;)t3=s2[o2?e3:n2-e3-1],r2&&t3.setGroupedPoints(i3),t3.setStackedPoints(i3);if(!r2)for(e3=0;e3<n2;e3++)s2[e3].modifyStacks();p(i3,"afterBuildStacks")}cleanStacks(){this.oldStacks&&(this.stacks=this.oldStacks,f(this.stacks,(t3=>{f(t3,(t4=>{t4.cumulative=t4.total}))})))}resetStacks(){f(this.stacks,(t3=>{f(t3,((e3,i3)=>{g(e3.touched)&&e3.touched<this.stacksTouched?(e3.destroy(),delete t3[i3]):(e3.total=null,e3.cumulative=null)}))}))}renderStackTotals(){var _a;let t3=this.axis,e3=t3.chart,i3=e3.renderer,s2=this.stacks,r2=n(e3,((_a=t3.options.stackLabels)==null?void 0:_a.animation)||false),o2=this.stackTotalGroup=this.stackTotalGroup||i3.g("stack-labels").attr({zIndex:6,opacity:0}).add();o2.translate(e3.plotLeft,e3.plotTop),f(s2,(t4=>{f(t4,(t5=>{t5.render(o2)}))})),o2.animate({opacity:1},r2)}}return(o||(o={})).compose=function(t3,e3,i3){let s2=e3.prototype,r2=i3.prototype;s2.getStacks||(h(t3,"init",b),h(t3,"destroy",y),s2.getStacks=x,r2.getStackIndicator=v,r2.modifyStacks=S,r2.percentStacker=C,r2.setGroupedPoints=k,r2.setStackedPoints=M)},o})),i(e,"Series/Line/LineSeries.js",[e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{defined:s,merge:r,isObject:o}=i2;class n extends t2{drawGraph(){let t3=this.options,e3=(this.gappedPath||this.getGraphPath).call(this),i3=this.chart.styledMode;[this,...this.zones].forEach(((s2,n2)=>{let a,h=s2.graph,l=h?"animate":"attr",d=s2.dashStyle||t3.dashStyle;h?(h.endX=this.preventGraphAnimation?null:e3.xMap,h.animate({d:e3})):e3.length&&(s2.graph=h=this.chart.renderer.path(e3).addClass("highcharts-graph"+(n2?` highcharts-zone-graph-${n2-1} `:" ")+(n2&&s2.className||"")).attr({zIndex:1}).add(this.group)),h&&!i3&&(a={stroke:!n2&&t3.lineColor||s2.color||this.color||"#cccccc","stroke-width":t3.lineWidth||0,fill:this.fillGraph&&this.color||"none"},d?a.dashstyle=d:"square"!==t3.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),h[l](a).shadow(n2<2&&t3.shadow&&r({filterUnits:"userSpaceOnUse"},o(t3.shadow)?t3.shadow:{}))),h&&(h.startX=e3.xMap,h.isArea=e3.isArea)}))}getGraphPath(t3,e3,i3){let r2=this,o2=r2.options,n2=[],a=[],h,l=o2.step,d=(t3=t3||r2.points).reversed;return d&&t3.reverse(),(l={right:1,center:2}[l]||l&&3)&&d&&(l=4-l),(t3=this.getValidPoints(t3,false,!(o2.connectNulls&&!e3&&!i3))).forEach((function(d2,c){let p;let u=d2.plotX,g=d2.plotY,f=t3[c-1],m=d2.isNull||"number"!=typeof g;(d2.leftCliff||f&&f.rightCliff)&&!i3&&(h=true),m&&!s(e3)&&c>0?h=!o2.connectNulls:m&&!e3?h=true:(0===c||h?p=[["M",d2.plotX,d2.plotY]]:r2.getPointSpline?p=[r2.getPointSpline(t3,d2,c)]:l?(p=1===l?[["L",f.plotX,g]]:2===l?[["L",(f.plotX+u)/2,f.plotY],["L",(f.plotX+u)/2,g]]:[["L",u,f.plotY]]).push(["L",u,g]):p=[["L",u,g]],a.push(d2.x),l&&(a.push(d2.x),2===l&&a.push(d2.x)),n2.push.apply(n2,p),h=false)})),n2.xMap=a,r2.graphPath=n2,n2}}return n.defaultOptions=r(t2.defaultOptions,{legendSymbol:"lineMarker"}),e2.registerSeriesType("line",n),n})),i(e,"Series/Area/AreaSeriesDefaults.js",[],(function(){return{threshold:0,legendSymbol:"areaMarker"}})),i(e,"Series/Area/AreaSeries.js",[e["Series/Area/AreaSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{seriesTypes:{line:s}}=e2,{extend:r,merge:o,objectEach:n,pick:a}=i2;class h extends s{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:t3,options:e3}=this;[this,...this.zones].forEach(((i3,s2)=>{let r2={},o2=i3.fillColor||e3.fillColor,n2=i3.area,a2=n2?"animate":"attr";n2?(n2.endX=this.preventGraphAnimation?null:t3.xMap,n2.animate({d:t3})):(r2.zIndex=0,(n2=i3.area=this.chart.renderer.path(t3).addClass("highcharts-area"+(s2?` highcharts-zone-area-${s2-1} `:" ")+(s2&&i3.className||"")).add(this.group)).isArea=true),this.chart.styledMode||(r2.fill=o2||i3.color||this.color,r2["fill-opacity"]=o2?1:e3.fillOpacity??.75,n2.css({pointerEvents:this.stickyTracking?"none":"auto"})),n2[a2](r2),n2.startX=t3.xMap,n2.shiftUnit=e3.step?2:1}))}getGraphPath(t3){let e3,i3,r2;let o2=s.prototype.getGraphPath,n2=this.options,h2=n2.stacking,l=this.yAxis,d=[],c=[],p=this.index,u=l.stacking.stacks[this.stackKey],g=n2.threshold,f=Math.round(l.getThreshold(n2.threshold)),m=a(n2.connectNulls,"percent"===h2),x=function(i4,s2,r3){let o3=t3[i4],n3=h2&&u[o3.x].points[p],a2=o3[r3+"Null"]||0,m2=o3[r3+"Cliff"]||0,x2,y2,b2=true;m2||a2?(x2=(a2?n3[0]:n3[1])+m2,y2=n3[0]+m2,b2=!!a2):!h2&&t3[s2]&&t3[s2].isNull&&(x2=y2=g),void 0!==x2&&(c.push({plotX:e3,plotY:null===x2?f:l.getThreshold(x2),isNull:b2,isCliff:true}),d.push({plotX:e3,plotY:null===y2?f:l.getThreshold(y2),doCurve:false}))};t3=t3||this.points,h2&&(t3=this.getStackPoints(t3));for(let s2=0,o3=t3.length;s2<o3;++s2)h2||(t3[s2].leftCliff=t3[s2].rightCliff=t3[s2].leftNull=t3[s2].rightNull=void 0),i3=t3[s2].isNull,e3=a(t3[s2].rectPlotX,t3[s2].plotX),r2=h2?a(t3[s2].yBottom,f):f,i3&&!m||(m||x(s2,s2-1,"left"),i3&&!h2&&m||(c.push(t3[s2]),d.push({x:s2,plotX:e3,plotY:r2})),m||x(s2,s2+1,"right"));let y=o2.call(this,c,true,true);d.reversed=true;let b=o2.call(this,d,true,true),v=b[0];v&&"M"===v[0]&&(b[0]=["L",v[1],v[2]]);let S=y.concat(b);S.length&&S.push(["Z"]);let C=o2.call(this,c,false,m);return this.chart.series.length>1&&h2&&c.some((t4=>t4.isCliff))&&(S.hasStackedCliffs=C.hasStackedCliffs=true),S.xMap=y.xMap,this.areaPath=S,C}getStackPoints(t3){let e3=this,i3=[],s2=[],r2=this.xAxis,o2=this.yAxis,h2=o2.stacking.stacks[this.stackKey],l={},d=o2.series,c=d.length,p=o2.options.reversedStacks?1:-1,u=d.indexOf(e3);if(t3=t3||this.points,this.options.stacking){for(let e4=0;e4<t3.length;e4++)t3[e4].leftNull=t3[e4].rightNull=void 0,l[t3[e4].x]=t3[e4];n(h2,(function(t4,e4){null!==t4.total&&s2.push(e4)})),s2.sort((function(t4,e4){return t4-e4}));let g=d.map((t4=>t4.visible));s2.forEach((function(t4,n2){let f=0,m,x;if(l[t4]&&!l[t4].isNull)i3.push(l[t4]),[-1,1].forEach((function(i4){let r3=1===i4?"rightNull":"leftNull",o3=h2[s2[n2+i4]],a2=0;if(o3){let i5=u;for(;i5>=0&&i5<c;){let s3=d[i5].index;!(m=o3.points[s3])&&(s3===e3.index?l[t4][r3]=true:g[i5]&&(x=h2[t4].points[s3])&&(a2-=x[1]-x[0])),i5+=p}}l[t4][1===i4?"rightCliff":"leftCliff"]=a2}));else{let e4=u;for(;e4>=0&&e4<c;){let i4=d[e4].index;if(m=h2[t4].points[i4]){f=m[1];break}e4+=p}f=a(f,0),f=o2.translate(f,0,1,0,1),i3.push({isNull:true,plotX:r2.translate(t4,0,0,0,1),x:t4,plotY:f,yBottom:f})}}))}return i3}}return h.defaultOptions=o(s.defaultOptions,t2),r(h.prototype,{singleStacks:false}),e2.registerSeriesType("area",h),h})),i(e,"Series/Spline/SplineSeries.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2){let{line:i2}=t2.seriesTypes,{merge:s,pick:r}=e2;class o extends i2{getPointSpline(t3,e3,i3){let s2,o2,n,a;let h=e3.plotX||0,l=e3.plotY||0,d=t3[i3-1],c=t3[i3+1];function p(t4){return t4&&!t4.isNull&&false!==t4.doCurve&&!e3.isCliff}if(p(d)&&p(c)){let t4=d.plotX||0,i4=d.plotY||0,r2=c.plotX||0,p2=c.plotY||0,u2=0;s2=(1.5*h+t4)/2.5,o2=(1.5*l+i4)/2.5,n=(1.5*h+r2)/2.5,a=(1.5*l+p2)/2.5,n!==s2&&(u2=(a-o2)*(n-h)/(n-s2)+l-a),o2+=u2,a+=u2,o2>i4&&o2>l?(o2=Math.max(i4,l),a=2*l-o2):o2<i4&&o2<l&&(o2=Math.min(i4,l),a=2*l-o2),a>p2&&a>l?(a=Math.max(p2,l),o2=2*l-a):a<p2&&a<l&&(a=Math.min(p2,l),o2=2*l-a),e3.rightContX=n,e3.rightContY=a,e3.controlPoints={low:[s2,o2],high:[n,a]}}let u=["C",r(d.rightContX,d.plotX,0),r(d.rightContY,d.plotY,0),r(s2,h,0),r(o2,l,0),h,l];return d.rightContX=d.rightContY=void 0,u}}return o.defaultOptions=s(i2.defaultOptions),t2.registerSeriesType("spline",o),o})),i(e,"Series/AreaSpline/AreaSplineSeries.js",[e["Series/Spline/SplineSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{area:s,area:{prototype:r}}=e2.seriesTypes,{extend:o,merge:n}=i2;class a extends t2{}return a.defaultOptions=n(t2.defaultOptions,s.defaultOptions),o(a.prototype,{getGraphPath:r.getGraphPath,getStackPoints:r.getStackPoints,drawGraph:r.drawGraph}),e2.registerSeriesType("areaspline",a),a})),i(e,"Series/Column/ColumnSeriesDefaults.js",[],(function(){return{borderRadius:3,centerInCategory:false,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:false,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:true,stickyTracking:false,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}})),i(e,"Series/Column/ColumnSeries.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Series/Column/ColumnSeriesDefaults.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n){let{animObject:a}=t2,{parse:h}=e2,{noop:l}=s,{clamp:d,crisp:c,defined:p,extend:u,fireEvent:g,isArray:f,isNumber:m,merge:x,pick:y,objectEach:b}=n;class v extends r{animate(t3){let e3,i3;let s2=this,r2=this.yAxis,o2=r2.pos,n2=r2.reversed,h2=s2.options,{clipOffset:l2,inverted:c2}=this.chart,p2={},g2=c2?"translateX":"translateY";t3&&l2?(p2.scaleY=.001,i3=d(r2.toPixels(h2.threshold),o2,o2+r2.len),c2?(i3+=n2?-Math.floor(l2[0]):Math.ceil(l2[2]),p2.translateX=i3-r2.len):(i3+=n2?Math.ceil(l2[0]):-Math.floor(l2[2]),p2.translateY=i3),s2.clipBox&&s2.setClip(),s2.group.attr(p2)):(e3=Number(s2.group.attr(g2)),s2.group.animate({scaleY:1},u(a(s2.options.animation),{step:function(t4,i4){s2.group&&(p2[g2]=e3+i4.pos*(o2-e3),s2.group.attr(p2))}})))}init(t3,e3){super.init.apply(this,arguments);let i3=this;(t3=i3.chart).hasRendered&&t3.series.forEach((function(t4){t4.type===i3.type&&(t4.isDirty=true)}))}getColumnMetrics(){var _a,_b;let t3=this,e3=t3.options,i3=t3.xAxis,s2=t3.yAxis,r2=i3.options.reversedStacks,o2=i3.reversed&&!r2||!i3.reversed&&r2,n2={},a2,h2=0;false===e3.grouping?h2=1:t3.chart.series.forEach((function(e4){let i4;let r3=e4.yAxis,o3=e4.options;e4.type===t3.type&&e4.reserveSpace()&&s2.len===r3.len&&s2.pos===r3.pos&&(o3.stacking&&"group"!==o3.stacking?(void 0===n2[a2=e4.stackKey]&&(n2[a2]=h2++),i4=n2[a2]):false!==o3.grouping&&(i4=h2++),e4.columnIndex=i4)}));let l2=Math.min(Math.abs(i3.transA)*(!((_a=i3.brokenAxis)==null?void 0:_a.hasBreaks)&&((_b=i3.ordinal)==null?void 0:_b.slope)||e3.pointRange||i3.closestPointRange||i3.tickInterval||1),i3.len),d2=l2*e3.groupPadding,c2=(l2-2*d2)/(h2||1),p2=Math.min(e3.maxPointWidth||i3.len,y(e3.pointWidth,c2*(1-2*e3.pointPadding))),u2=(t3.columnIndex||0)+(o2?1:0);return t3.columnMetrics={width:p2,offset:(c2-p2)/2+(d2+u2*c2-l2/2)*(o2?-1:1),paddedWidth:c2,columnCount:h2},t3.columnMetrics}crispCol(t3,e3,i3,s2){let r2=this.borderWidth,o2=this.chart.inverted;return s2=c(e3+s2,r2,o2)-(e3=c(e3,r2,o2)),this.options.crisp&&(i3=c(t3+i3,r2)-(t3=c(t3,r2))),{x:t3,y:e3,width:i3,height:s2}}adjustForMissingColumns(t3,e3,i3,s2){var _a;if(!i3.isNull&&s2.columnCount>1){let r2=this.xAxis.series.filter((t4=>t4.visible)).map((t4=>t4.index)),o2=0,n2=0;b((_a=this.xAxis.stacking)==null?void 0:_a.stacks,(t4=>{if("number"==typeof i3.x){let e4=t4[i3.x.toString()];if(e4&&f(e4.points[this.index])){let t5=Object.keys(e4.points).filter((t6=>!t6.match(",")&&e4.points[t6]&&e4.points[t6].length>1)).map(parseFloat).filter((t6=>-1!==r2.indexOf(t6))).sort(((t6,e5)=>e5-t6));o2=t5.indexOf(this.index),n2=t5.length}}})),o2=this.xAxis.reversed?n2-1-o2:o2;let a2=(n2-1)*s2.paddedWidth+e3;t3=(i3.plotX||0)+a2/2-e3-o2*s2.paddedWidth}return t3}translate(){let t3=this,e3=t3.chart,i3=t3.options,s2=t3.dense=t3.closestPointRange*t3.xAxis.transA<2,o2=t3.borderWidth=y(i3.borderWidth,s2?0:1),n2=t3.xAxis,a2=t3.yAxis,h2=i3.threshold,l2=y(i3.minPointLength,5),c2=t3.getColumnMetrics(),u2=c2.width,f2=t3.pointXOffset=c2.offset,x2=t3.dataMin,b2=t3.dataMax,v2=t3.translatedThreshold=a2.getThreshold(h2),S=t3.barW=Math.max(u2,1+2*o2);i3.pointPadding&&(S=Math.ceil(S)),r.prototype.translate.apply(t3),t3.points.forEach((function(s3){let r2=y(s3.yBottom,v2),o3=999+Math.abs(r2),g2=s3.plotX||0,C=d(s3.plotY,-o3,a2.len+o3),k,M=Math.min(C,r2),w2=Math.max(C,r2)-M,T=u2,A=g2+f2,P=S;l2&&Math.abs(w2)<l2&&(w2=l2,k=!a2.reversed&&!s3.negative||a2.reversed&&s3.negative,m(h2)&&m(b2)&&s3.y===h2&&b2<=h2&&(a2.min||0)<h2&&(x2!==b2||(a2.max||0)<=h2)&&(k=!k,s3.negative=!s3.negative),M=Math.abs(M-v2)>l2?r2-l2:v2-(k?l2:0)),p(s3.options.pointWidth)&&(A-=Math.round(((T=P=Math.ceil(s3.options.pointWidth))-u2)/2)),i3.centerInCategory&&!i3.stacking&&(A=t3.adjustForMissingColumns(A,T,s3,c2)),s3.barX=A,s3.pointWidth=T,s3.tooltipPos=e3.inverted?[d(a2.len+a2.pos-e3.plotLeft-C,a2.pos-e3.plotLeft,a2.len+a2.pos-e3.plotLeft),n2.len+n2.pos-e3.plotTop-A-P/2,w2]:[n2.left-e3.plotLeft+A+P/2,d(C+a2.pos-e3.plotTop,a2.pos-e3.plotTop,a2.len+a2.pos-e3.plotTop),w2],s3.shapeType=t3.pointClass.prototype.shapeType||"roundedRect",s3.shapeArgs=t3.crispCol(A,s3.isNull?v2:M,P,s3.isNull?0:w2)})),g(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(t3,e3){let i3=this.options,s2=this.pointAttrToOptions||{},r2=s2.stroke||"borderColor",o2=s2["stroke-width"]||"borderWidth",n2,a2,l2,d2=t3&&t3.color||this.color,c2=t3&&t3[r2]||i3[r2]||d2,p2=t3&&t3.options.dashStyle||i3.dashStyle,u2=t3&&t3[o2]||i3[o2]||this[o2]||0,g2=y(t3&&t3.opacity,i3.opacity,1);t3&&this.zones.length&&(a2=t3.getZone(),d2=t3.options.color||a2&&(a2.color||t3.nonZonedColor)||this.color,a2&&(c2=a2.borderColor||c2,p2=a2.dashStyle||p2,u2=a2.borderWidth||u2)),e3&&t3&&(l2=(n2=x(i3.states[e3],t3.options.states&&t3.options.states[e3]||{})).brightness,d2=n2.color||void 0!==l2&&h(d2).brighten(n2.brightness).get()||d2,c2=n2[r2]||c2,u2=n2[o2]||u2,p2=n2.dashStyle||p2,g2=y(n2.opacity,g2));let f2={fill:d2,stroke:c2,"stroke-width":u2,opacity:g2};return p2&&(f2.dashstyle=p2),f2}drawPoints(t3=this.points){let e3;let i3=this,s2=this.chart,r2=i3.options,o2=s2.renderer,n2=r2.animationLimit||250;t3.forEach((function(t4){let a2=t4.plotY,h2=t4.graphic,l2=!!h2,d2=h2&&s2.pointCount<n2?"animate":"attr";m(a2)&&null!==t4.y?(e3=t4.shapeArgs,h2&&t4.hasNewShapeType()&&(h2=h2.destroy()),i3.enabledDataSorting&&(t4.startXPos=i3.xAxis.reversed?-(e3&&e3.width||0):i3.xAxis.width),!h2&&(t4.graphic=h2=o2[t4.shapeType](e3).add(t4.group||i3.group),h2&&i3.enabledDataSorting&&s2.hasRendered&&s2.pointCount<n2&&(h2.attr({x:t4.startXPos}),l2=true,d2="animate")),h2&&l2&&h2[d2](x(e3)),s2.styledMode||h2[d2](i3.pointAttribs(t4,t4.selected&&"select")).shadow(false!==t4.allowShadow&&r2.shadow),h2&&(h2.addClass(t4.getClassName(),true),h2.attr({visibility:t4.visible?"inherit":"hidden"}))):h2&&(t4.graphic=h2.destroy())}))}drawTracker(t3=this.points){let e3;let i3=this,s2=i3.chart,r2=s2.pointer,o2=function(t4){let e4=r2==null?void 0:r2.getPointFromEvent(t4);r2&&e4&&i3.options.enableMouseTracking&&(r2.isDirectTouch=true,e4.onMouseOver(t4))};t3.forEach((function(t4){e3=f(t4.dataLabels)?t4.dataLabels:t4.dataLabel?[t4.dataLabel]:[],t4.graphic&&(t4.graphic.element.point=t4),e3.forEach((function(e4){(e4.div||e4.element).point=t4}))})),i3._hasTracking||(i3.trackerGroups.forEach((function(t4){i3[t4]&&(i3[t4].addClass("highcharts-tracker").on("mouseover",o2).on("mouseout",(function(t5){r2==null?void 0:r2.onTrackerMouseOut(t5)})).on("touchstart",o2),!s2.styledMode&&i3.options.cursor&&i3[t4].css({cursor:i3.options.cursor}))})),i3._hasTracking=true),g(this,"afterDrawTracker")}remove(){let t3=this,e3=t3.chart;e3.hasRendered&&e3.series.forEach((function(e4){e4.type===t3.type&&(e4.isDirty=true)})),r.prototype.remove.apply(t3,arguments)}}return v.defaultOptions=x(r.defaultOptions,i2),u(v.prototype,{directTouch:true,getSymbol:l,negStacks:true,trackerGroups:["group","dataLabelsGroup"]}),o.registerSeriesType("column",v),v})),i(e,"Core/Series/DataLabel.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){var s;let{getDeferredAnimation:r}=t2,{format:o}=e2,{defined:n,extend:a,fireEvent:h,isArray:l,isString:d,merge:c,objectEach:p,pick:u,pInt:g,splat:f}=i2;return function(t3){function e3(){return v(this).some((t4=>t4==null?void 0:t4.enabled))}function i3(t4,e4,i4,s3,r2){var _a;let{chart:o2,enabledDataSorting:h2}=this,l2=this.isCartesian&&o2.inverted,d2=t4.plotX,p2=t4.plotY,g2=i4.rotation||0,f2=n(d2)&&n(p2)&&o2.isInsidePlot(d2,Math.round(p2),{inverted:l2,paneCoordinates:true,series:this}),m2=0===g2&&"justify"===u(i4.overflow,h2?"none":"justify"),x2=this.visible&&false!==t4.visible&&n(d2)&&(t4.series.forceDL||h2&&!m2||f2||u(i4.inside,!!this.options.stacking)&&s3&&o2.isInsidePlot(d2,l2?s3.x+1:s3.y+s3.height-1,{inverted:l2,paneCoordinates:true,series:this})),y2=t4.pos();if(x2&&y2){var b2;let n2=e4.getBBox(),d3=e4.getBBox(void 0,0),p3={right:1,center:.5}[i4.align||0]||0,v2={bottom:1,middle:.5}[i4.verticalAlign||0]||0;if(s3=a({x:y2[0],y:Math.round(y2[1]),width:0,height:0},s3||{}),"plotEdges"===i4.alignTo&&this.isCartesian&&(s3[l2?"x":"y"]=0,s3[l2?"width":"height"]=((_a=this.yAxis)==null?void 0:_a.len)||0),a(i4,{width:n2.width,height:n2.height}),b2=s3,h2&&this.xAxis&&!m2&&this.setDataLabelStartPos(t4,e4,r2,f2,b2),e4.align(c(i4,{width:d3.width,height:d3.height}),false,s3,false),e4.alignAttr.x+=p3*(d3.width-n2.width),e4.alignAttr.y+=v2*(d3.height-n2.height),e4[e4.placed?"animate":"attr"]({x:e4.alignAttr.x+(n2.width-d3.width)/2,y:e4.alignAttr.y+(n2.height-d3.height)/2,rotationOriginX:(e4.width||0)/2,rotationOriginY:(e4.height||0)/2}),m2&&s3.height>=0)this.justifyDataLabel(e4,i4,e4.alignAttr,n2,s3,r2);else if(u(i4.crop,true)){let{x:t5,y:i5}=e4.alignAttr;x2=o2.isInsidePlot(t5,i5,{paneCoordinates:true,series:this})&&o2.isInsidePlot(t5+n2.width-1,i5+n2.height-1,{paneCoordinates:true,series:this})}i4.shape&&!g2&&e4[r2?"attr":"animate"]({anchorX:y2[0],anchorY:y2[1]})}r2&&h2&&(e4.placed=false),x2||h2&&!m2?(e4.show(),e4.placed=true):(e4.hide(),e4.placed=false)}function s2(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function m(t4){let e4=this.hasRendered||0,i4=this.initDataLabelsGroup().attr({opacity:+e4});return!e4&&i4&&(this.visible&&i4.show(),this.options.animation?i4.animate({opacity:1},t4):i4.attr({opacity:1})),i4}function x(t4){var _a;let e4;t4=t4||this.points;let i4=this,s3=i4.chart,a2=i4.options,l2=s3.renderer,{backgroundColor:c2,plotBackgroundColor:m2}=s3.options.chart,x2=l2.getContrast(d(m2)&&m2||d(c2)&&c2||"#000000"),y2=v(i4),{animation:S2,defer:C}=y2[0],k=C?r(s3,S2,i4):{defer:0,duration:0};h(this,"drawDataLabels"),((_a=i4.hasDataLabels)==null?void 0:_a.call(i4))&&(e4=this.initDataLabels(k),t4.forEach((t5=>{var _a2,_b;let r2=t5.dataLabels||[];f(b(y2,t5.dlOptions||((_a2=t5.options)==null?void 0:_a2.dataLabels))).forEach(((c4,f2)=>{let m3=c4.enabled&&(t5.visible||t5.dataLabelOnHidden)&&(!t5.isNull||t5.dataLabelOnNull)&&function(t6,e5){let i5=e5.filter;if(i5){let e6=i5.operator,s4=t6[i5.property],r3=i5.value;return">"===e6&&s4>r3||"<"===e6&&s4<r3||">="===e6&&s4>=r3||"<="===e6&&s4<=r3||"=="===e6&&s4==r3||"==="===e6&&s4===r3||"!="===e6&&s4!=r3||"!=="===e6&&s4!==r3}return true}(t5,c4),{backgroundColor:y3,borderColor:b2,distance:v2,style:S3={}}=c4,C2,k2,M,w2,T={},A=r2[f2],P=!A,L;m3&&(k2=u(c4[t5.formatPrefix+"Format"],c4.format),C2=t5.getLabelConfig(),M=n(k2)?o(k2,C2,s3):(c4[t5.formatPrefix+"Formatter"]||c4.formatter).call(C2,c4),w2=c4.rotation,!s3.styledMode&&(S3.color=u(c4.color,S3.color,d(i4.color)?i4.color:void 0,"#000000"),"contrast"===S3.color?("none"!==y3&&(L=y3),t5.contrastColor=l2.getContrast("auto"!==L&&L||t5.color||i4.color),S3.color=L||!n(v2)&&c4.inside||0>g(v2||0)||a2.stacking?t5.contrastColor:x2):delete t5.contrastColor,a2.cursor&&(S3.cursor=a2.cursor)),T={r:c4.borderRadius||0,rotation:w2,padding:c4.padding,zIndex:1},s3.styledMode||(T.fill="auto"===y3?t5.color:y3,T.stroke="auto"===b2?t5.color:b2,T["stroke-width"]=c4.borderWidth),p(T,((t6,e5)=>{void 0===t6&&delete T[e5]}))),!A||m3&&n(M)&&!!A.div==!!c4.useHTML&&(A.rotation&&c4.rotation||A.rotation===c4.rotation)||(A=void 0,P=true),m3&&n(M)&&(A?T.text=M:(A=l2.label(M,0,0,c4.shape,void 0,void 0,c4.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+t5.colorIndex+" "+(c4.className||"")+(c4.useHTML?" highcharts-tracker":"")),A&&(A.options=c4,A.attr(T),s3.styledMode?S3.width&&A.css({width:S3.width,textOverflow:S3.textOverflow}):A.css(S3).shadow(c4.shadow),h(A,"beforeAddingDataLabel",{labelOptions:c4,point:t5}),A.added||A.add(e4),i4.alignDataLabel(t5,A,c4,void 0,P),A.isActive=true,r2[f2]&&r2[f2]!==A&&r2[f2].destroy(),r2[f2]=A))}));let c3=r2.length;for(;c3--;)r2[c3]&&r2[c3].isActive?r2[c3].isActive=false:((_b=r2[c3])==null?void 0:_b.destroy(),r2.splice(c3,1));t5.dataLabel=r2[0],t5.dataLabels=r2}))),h(this,"afterDrawDataLabels")}function y(t4,e4,i4,s3,r2,o2){let n2=this.chart,a2=e4.align,h2=e4.verticalAlign,l2=t4.box?0:t4.padding||0,d2=n2.inverted?this.yAxis:this.xAxis,c2=d2?d2.left-n2.plotLeft:0,p2=n2.inverted?this.xAxis:this.yAxis,u2=p2?p2.top-n2.plotTop:0,{x:g2=0,y:f2=0}=e4,m2,x2;return(m2=(i4.x||0)+l2+c2)<0&&("right"===a2&&g2>=0?(e4.align="left",e4.inside=true):g2-=m2,x2=true),(m2=(i4.x||0)+s3.width-l2+c2)>n2.plotWidth&&("left"===a2&&g2<=0?(e4.align="right",e4.inside=true):g2+=n2.plotWidth-m2,x2=true),(m2=i4.y+l2+u2)<0&&("bottom"===h2&&f2>=0?(e4.verticalAlign="top",e4.inside=true):f2-=m2,x2=true),(m2=(i4.y||0)+s3.height-l2+u2)>n2.plotHeight&&("top"===h2&&f2<=0?(e4.verticalAlign="bottom",e4.inside=true):f2+=n2.plotHeight-m2,x2=true),x2&&(e4.x=g2,e4.y=f2,t4.placed=!o2,t4.align(e4,void 0,r2)),x2}function b(t4,e4){let i4=[],s3;if(l(t4)&&!l(e4))i4=t4.map((function(t5){return c(t5,e4)}));else if(l(e4)&&!l(t4))i4=e4.map((function(e5){return c(t4,e5)}));else if(l(t4)||l(e4)){if(l(t4)&&l(e4))for(s3=Math.max(t4.length,e4.length);s3--;)i4[s3]=c(t4[s3],e4[s3])}else i4=c(t4,e4);return i4}function v(t4){var _a,_b;let e4=t4.chart.options.plotOptions;return f(b(b((_a=e4==null?void 0:e4.series)==null?void 0:_a.dataLabels,(_b=e4==null?void 0:e4[t4.type])==null?void 0:_b.dataLabels),t4.options.dataLabels))}function S(t4,e4,i4,s3,r2){let o2=this.chart,n2=o2.inverted,a2=this.xAxis,h2=a2.reversed,l2=((n2?e4.height:e4.width)||0)/2,d2=t4.pointWidth,c2=d2?d2/2:0;e4.startXPos=n2?r2.x:h2?-l2-c2:a2.width-l2+c2,e4.startYPos=n2?h2?this.yAxis.height-l2+c2:-l2-c2:r2.y,s3?"hidden"===e4.visibility&&(e4.show(),e4.attr({opacity:0}).animate({opacity:1})):e4.attr({opacity:1}).animate({opacity:0},void 0,e4.hide),o2.hasRendered&&(i4&&e4.attr({x:e4.startXPos,y:e4.startYPos}),e4.placed=true)}t3.compose=function(t4){let r2=t4.prototype;r2.initDataLabels||(r2.initDataLabels=m,r2.initDataLabelsGroup=s2,r2.alignDataLabel=i3,r2.drawDataLabels=x,r2.justifyDataLabel=y,r2.setDataLabelStartPos=S,r2.hasDataLabels=e3)}}(s||(s={})),s})),i(e,"Series/Column/ColumnDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){var r;let{composed:o}=e2,{series:n}=i2,{merge:a,pick:h,pushUnique:l}=s;return function(e3){function i3(t3,e4,i4,s2,r2){let o2=this.chart.inverted,l2=t3.series,d=(l2.xAxis?l2.xAxis.len:this.chart.plotSizeX)||0,c=(l2.yAxis?l2.yAxis.len:this.chart.plotSizeY)||0,p=t3.dlBox||t3.shapeArgs,u=h(t3.below,t3.plotY>h(this.translatedThreshold,c)),g=h(i4.inside,!!this.options.stacking);if(p){if(s2=a(p),!("allow"===i4.overflow&&false===i4.crop)){s2.y<0&&(s2.height+=s2.y,s2.y=0);let t4=s2.y+s2.height-c;t4>0&&t4<s2.height-1&&(s2.height-=t4)}o2&&(s2={x:c-s2.y-s2.height,y:d-s2.x-s2.width,width:s2.height,height:s2.width}),g||(o2?(s2.x+=u?0:s2.width,s2.width=0):(s2.y+=u?s2.height:0,s2.height=0))}i4.align=h(i4.align,!o2||g?"center":u?"right":"left"),i4.verticalAlign=h(i4.verticalAlign,o2||g?"middle":u?"top":"bottom"),n.prototype.alignDataLabel.call(this,t3,e4,i4,s2,r2),i4.inside&&t3.contrastColor&&e4.css({color:t3.contrastColor})}e3.compose=function(e4){t2.compose(n),l(o,"ColumnDataLabel")&&(e4.prototype.alignDataLabel=i3)}}(r||(r={})),r})),i(e,"Series/Bar/BarSeries.js",[e["Series/Column/ColumnSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{extend:s,merge:r}=i2;class o extends t2{}return o.defaultOptions=r(t2.defaultOptions,{}),s(o.prototype,{inverted:true}),e2.registerSeriesType("bar",o),o})),i(e,"Series/Scatter/ScatterSeriesDefaults.js",[],(function(){return{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:true},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}})),i(e,"Series/Scatter/ScatterSeries.js",[e["Series/Scatter/ScatterSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{column:s,line:r}=e2.seriesTypes,{addEvent:o,extend:n,merge:a}=i2;class h extends r{applyJitter(){let t3=this,e3=this.options.jitter,i3=this.points.length;e3&&this.points.forEach((function(s2,r2){["x","y"].forEach((function(o2,n2){if(e3[o2]&&!s2.isNull){let a2=`plot${o2.toUpperCase()}`,h2=t3[`${o2}Axis`],l=e3[o2]*h2.transA;if(h2&&!h2.logarithmic){let t4=Math.max(0,(s2[a2]||0)-l),e4=Math.min(h2.len,(s2[a2]||0)+l);s2[a2]=t4+(e4-t4)*function(t5){let e5=1e4*Math.sin(t5);return e5-Math.floor(e5)}(r2+n2*i3),"x"===o2&&(s2.clientX=s2.plotX)}}}))}))}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}return h.defaultOptions=a(r.defaultOptions,t2),n(h.prototype,{drawTracker:s.prototype.drawTracker,sorted:false,requireSorting:false,noSharedTooltip:true,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),o(h,"afterTranslate",(function(){this.applyJitter()})),e2.registerSeriesType("scatter",h),h})),i(e,"Series/CenteredUtilities.js",[e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){var s,r;let{deg2rad:o}=t2,{fireEvent:n,isNumber:a,pick:h,relativeLength:l}=i2;return(r=s||(s={})).getCenter=function(){let t3=this.options,i3=this.chart,s2=2*(t3.slicedOffset||0),r2=i3.plotWidth-2*s2,o2=i3.plotHeight-2*s2,d=t3.center,c=Math.min(r2,o2),p=t3.thickness,u,g=t3.size,f=t3.innerSize||0,m,x;"string"==typeof g&&(g=parseFloat(g)),"string"==typeof f&&(f=parseFloat(f));let y=[h(d[0],"50%"),h(d[1],"50%"),h(g&&g<0?void 0:t3.size,"100%"),h(f&&f<0?void 0:t3.innerSize||0,"0%")];for(!i3.angular||this instanceof e2||(y[3]=0),m=0;m<4;++m)x=y[m],u=m<2||2===m&&/%$/.test(x),y[m]=l(x,[r2,o2,c,y[2]][m])+(u?s2:0);return y[3]>y[2]&&(y[3]=y[2]),a(p)&&2*p<y[2]&&p>0&&(y[3]=y[2]-2*p),n(this,"afterGetCenter",{positions:y}),y},r.getStartAndEndRadians=function(t3,e3){let i3=a(t3)?t3:0,s2=a(e3)&&e3>i3&&e3-i3<360?e3:i3+360;return{start:o*(i3+-90),end:o*(s2+-90)}},s})),i(e,"Series/Pie/PiePoint.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{setAnimation:s}=t2,{addEvent:r,defined:o,extend:n,isNumber:a,pick:h,relativeLength:l}=i2;class d extends e2{getConnectorPath(t3){let e3=t3.dataLabelPosition,i3=t3.options||{},s2=i3.connectorShape,r2=this.connectorShapes[s2]||s2;return e3&&r2.call(this,{...e3.computed,alignment:e3.alignment},e3.connectorPosition,i3)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(t3){let e3=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e3.x,e3.y,e3.r+t3,e3.r+t3,{innerR:e3.r-1,start:e3.start,end:e3.end,borderRadius:e3.borderRadius})}constructor(t3,e3,i3){super(t3,e3,i3),this.half=0,this.name??(this.name="Slice");let s2=t4=>{this.slice("select"===t4.type)};r(this,"select",s2),r(this,"unselect",s2)}isValid(){return a(this.y)&&this.y>=0}setVisible(t3,e3=true){t3!==this.visible&&this.update({visible:t3??!this.visible},e3,void 0,false)}slice(t3,e3,i3){let r2=this.series;s(i3,r2.chart),e3=h(e3,true),this.sliced=this.options.sliced=t3=o(t3)?t3:!this.sliced,r2.options.data[r2.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}return n(d.prototype,{connectorShapes:{fixedOffset:function(t3,e3,i3){let s2=e3.breakAt,r2=e3.touchingSliceAt,o2=i3.softConnector?["C",t3.x+("left"===t3.alignment?-5:5),t3.y,2*s2.x-r2.x,2*s2.y-r2.y,s2.x,s2.y]:["L",s2.x,s2.y];return[["M",t3.x,t3.y],o2,["L",r2.x,r2.y]]},straight:function(t3,e3){let i3=e3.touchingSliceAt;return[["M",t3.x,t3.y],["L",i3.x,i3.y]]},crookedLine:function(t3,e3,i3){let{breakAt:s2,touchingSliceAt:r2}=e3,{series:o2}=this,[n2,a2,h2]=o2.center,d2=h2/2,{plotLeft:c,plotWidth:p}=o2.chart,u="left"===t3.alignment,{x:g,y:f}=t3,m=s2.x;if(i3.crookDistance){let t4=l(i3.crookDistance,1);m=u?n2+d2+(p+c-n2-d2)*(1-t4):c+(n2-d2)*t4}else m=n2+(a2-f)*Math.tan((this.angle||0)-Math.PI/2);let x=[["M",g,f]];return(u?m<=g&&m>=s2.x:m>=g&&m<=s2.x)&&x.push(["L",m,f]),x.push(["L",s2.x,s2.y],["L",r2.x,r2.y]),x}}}),d})),i(e,"Series/Pie/PieSeriesDefaults.js",[],(function(){return{borderRadius:3,center:[null,null],clip:false,colorByPoint:true,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:true,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:true,x:0},fillColor:void 0,ignoreHiddenPoint:true,inactiveOtherPoints:true,legendType:"point",marker:null,size:null,showInLegend:false,slicedOffset:10,stickyTracking:false,tooltip:{followPointer:true},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}})),i(e,"Series/Pie/PieSeries.js",[e["Series/CenteredUtilities.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Series/Pie/PiePoint.js"],e["Series/Pie/PieSeriesDefaults.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r,o,n,a,h){let{getStartAndEndRadians:l}=t2,{noop:d}=i2,{clamp:c,extend:p,fireEvent:u,merge:g,pick:f}=h;class m extends o{animate(t3){let e3=this,i3=e3.points,s2=e3.startAngleRad;t3||i3.forEach((function(t4){let i4=t4.graphic,r2=t4.shapeArgs;i4&&r2&&(i4.attr({r:f(t4.startR,e3.center&&e3.center[3]/2),start:s2,end:s2}),i4.animate({r:r2.r,start:r2.start,end:r2.end},e3.options.animation))}))}drawEmpty(){let t3,e3;let i3=this.startAngleRad,s2=this.endAngleRad,r2=this.options;0===this.total&&this.center?(t3=this.center[0],e3=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t3,e3,this.center[1]/2,0,i3,s2).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(t3,e3,this.center[2]/2,0,{start:i3,end:s2,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":r2.borderWidth,fill:r2.fillColor||"none",stroke:r2.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let t3=this.chart.renderer;this.points.forEach((function(e3){e3.graphic&&e3.hasNewShapeType()&&(e3.graphic=e3.graphic.destroy()),e3.graphic||(e3.graphic=t3[e3.shapeType](e3.shapeArgs).add(e3.series.group),e3.delayedRendering=true)}))}generatePoints(){super.generatePoints(),this.updateTotals()}getX(t3,e3,i3,s2){let r2=this.center,o2=this.radii?this.radii[i3.index]||0:r2[2]/2,n2=s2.dataLabelPosition,a2=(n2==null?void 0:n2.distance)||0,h2=Math.asin(c((t3-r2[1])/(o2+a2),-1,1));return r2[0]+Math.cos(h2)*(o2+a2)*(e3?-1:1)+(a2>0?(e3?-1:1)*(s2.padding||0):0)}hasData(){return!!this.processedXData.length}redrawPoints(){let t3,e3,i3,s2;let r2=this,o2=r2.chart;this.drawEmpty(),r2.group&&!o2.styledMode&&r2.group.shadow(r2.options.shadow),r2.points.forEach((function(n2){let a2={};e3=n2.graphic,!n2.isNull&&e3?(s2=n2.shapeArgs,t3=n2.getTranslate(),o2.styledMode||(i3=r2.pointAttribs(n2,n2.selected&&"select")),n2.delayedRendering?(e3.setRadialReference(r2.center).attr(s2).attr(t3),o2.styledMode||e3.attr(i3).attr({"stroke-linejoin":"round"}),n2.delayedRendering=false):(e3.setRadialReference(r2.center),o2.styledMode||g(true,a2,i3),g(true,a2,s2,t3),e3.animate(a2)),e3.attr({visibility:n2.visible?"inherit":"hidden"}),e3.addClass(n2.getClassName(),true)):e3&&(n2.graphic=e3.destroy())}))}sortByAngle(t3,e3){t3.sort((function(t4,i3){return void 0!==t4.angle&&(i3.angle-t4.angle)*e3}))}translate(t3){u(this,"translate"),this.generatePoints();let e3=this.options,i3=e3.slicedOffset,s2=l(e3.startAngle,e3.endAngle),r2=this.startAngleRad=s2.start,o2=(this.endAngleRad=s2.end)-r2,n2=this.points,a2=e3.ignoreHiddenPoint,h2=n2.length,d2,c2,p2,g2,f2,m2,x,y=0;for(t3||(this.center=t3=this.getCenter()),m2=0;m2<h2;m2++){x=n2[m2],d2=r2+y*o2,x.isValid()&&(!a2||x.visible)&&(y+=x.percentage/100),c2=r2+y*o2;let e4={x:t3[0],y:t3[1],r:t3[2]/2,innerR:t3[3]/2,start:Math.round(1e3*d2)/1e3,end:Math.round(1e3*c2)/1e3};x.shapeType="arc",x.shapeArgs=e4,(p2=(c2+d2)/2)>1.5*Math.PI?p2-=2*Math.PI:p2<-Math.PI/2&&(p2+=2*Math.PI),x.slicedTranslation={translateX:Math.round(Math.cos(p2)*i3),translateY:Math.round(Math.sin(p2)*i3)},g2=Math.cos(p2)*t3[2]/2,f2=Math.sin(p2)*t3[2]/2,x.tooltipPos=[t3[0]+.7*g2,t3[1]+.7*f2],x.half=p2<-Math.PI/2||p2>Math.PI/2?1:0,x.angle=p2}u(this,"afterTranslate")}updateTotals(){let t3=this.points,e3=t3.length,i3=this.options.ignoreHiddenPoint,s2,r2,o2=0;for(s2=0;s2<e3;s2++)(r2=t3[s2]).isValid()&&(!i3||r2.visible)&&(o2+=r2.y);for(s2=0,this.total=o2;s2<e3;s2++)(r2=t3[s2]).percentage=o2>0&&(r2.visible||!i3)?r2.y/o2*100:0,r2.total=o2}}return m.defaultOptions=g(o.defaultOptions,r),p(m.prototype,{axisTypes:[],directTouch:true,drawGraph:void 0,drawTracker:e2.prototype.drawTracker,getCenter:t2.getCenter,getSymbol:d,invertible:false,isCartesian:false,noSharedTooltip:true,pointAttribs:e2.prototype.pointAttribs,pointClass:s,requireSorting:false,searchPoint:d,trackerGroups:["group","dataLabelsGroup"]}),n.registerSeriesType("pie",m),m})),i(e,"Series/Pie/PieDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,r){var o;let{composed:n,noop:a}=e2,{distribute:h}=i2,{series:l}=s,{arrayMax:d,clamp:c,defined:p,pick:u,pushUnique:g,relativeLength:f}=r;return function(e3){let i3={radialDistributionY:function(t3,e4){var _a;return(((_a=e4.dataLabelPosition)==null?void 0:_a.top)||0)+t3.distributeBox.pos},radialDistributionX:function(t3,e4,i4,s3,r3){let o3=r3.dataLabelPosition;return t3.getX(i4<((o3==null?void 0:o3.top)||0)+2||i4>((o3==null?void 0:o3.bottom)||0)-2?s3:i4,e4.half,e4,r3)},justify:function(t3,e4,i4,s3){var _a;return s3[0]+(t3.half?-1:1)*(i4+(((_a=e4.dataLabelPosition)==null?void 0:_a.distance)||0))},alignToPlotEdges:function(t3,e4,i4,s3){let r3=t3.getBBox().width;return e4?r3+s3:i4-r3-s3},alignToConnectors:function(t3,e4,i4,s3){let r3=0,o3;return t3.forEach((function(t4){(o3=t4.dataLabel.getBBox().width)>r3&&(r3=o3)})),e4?r3+s3:i4-r3-s3}};function s2(t3,e4){let{center:i4,options:s3}=this,r3=i4[2]/2,o3=t3.angle||0,n2=Math.cos(o3),a2=Math.sin(o3),h2=i4[0]+n2*r3,l2=i4[1]+a2*r3,d2=Math.min((s3.slicedOffset||0)+(s3.borderWidth||0),e4/5);return{natural:{x:h2+n2*e4,y:l2+a2*e4},computed:{},alignment:e4<0?"center":t3.half?"right":"left",connectorPosition:{breakAt:{x:h2+n2*d2,y:l2+a2*d2},touchingSliceAt:{x:h2,y:l2}},distance:e4}}function r2(){var _a;let t3=this,e4=t3.points,i4=t3.chart,s3=i4.plotWidth,r3=i4.plotHeight,o3=i4.plotLeft,n2=Math.round(i4.chartWidth/3),a2=t3.center,c2=a2[2]/2,g2=a2[1],m2=[[],[]],x=[0,0,0,0],y=t3.dataLabelPositioners,b,v,S,C=0;t3.visible&&((_a=t3.hasDataLabels)==null?void 0:_a.call(t3))&&(e4.forEach((t4=>{(t4.dataLabels||[]).forEach((t5=>{t5.shortened&&(t5.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t5.shortened=false)}))})),l.prototype.drawDataLabels.apply(t3),e4.forEach((t4=>{(t4.dataLabels||[]).forEach(((e5,i5)=>{var _a2;let s4=a2[2]/2,r4=e5.options,o4=f((r4==null?void 0:r4.distance)||0,s4);0===i5&&m2[t4.half].push(t4),!p((_a2=r4==null?void 0:r4.style)==null?void 0:_a2.width)&&e5.getBBox().width>n2&&(e5.css({width:Math.round(.7*n2)+"px"}),e5.shortened=true),e5.dataLabelPosition=this.getDataLabelPosition(t4,o4),C=Math.max(C,o4)}))})),m2.forEach(((e5,n3)=>{let l2=e5.length,d2=[],f2,m3,b2=0,k;l2&&(t3.sortByAngle(e5,n3-.5),C>0&&(f2=Math.max(0,g2-c2-C),m3=Math.min(g2+c2+C,i4.plotHeight),e5.forEach((t4=>{(t4.dataLabels||[]).forEach((e6=>{var _a2;let s4=e6.dataLabelPosition;s4&&s4.distance>0&&(s4.top=Math.max(0,g2-c2-s4.distance),s4.bottom=Math.min(g2+c2+s4.distance,i4.plotHeight),b2=e6.getBBox().height||21,e6.lineHeight=i4.renderer.fontMetrics(e6.text||e6).h+2*e6.padding,t4.distributeBox={target:(((_a2=e6.dataLabelPosition)==null?void 0:_a2.natural.y)||0)-s4.top+e6.lineHeight/2,size:b2,rank:t4.y},d2.push(t4.distributeBox))}))})),h(d2,k=m3+b2-f2,k/5)),e5.forEach((i5=>{(i5.dataLabels||[]).forEach((h2=>{let l3=h2.options||{},g3=i5.distributeBox,f3=h2.dataLabelPosition,m4=(f3==null?void 0:f3.natural.y)||0,b3=l3.connectorPadding||0,C2=h2.lineHeight||21,k2=(C2-h2.getBBox().height)/2,M=0,w2=m4,T="inherit";if(f3){if(d2&&p(g3)&&f3.distance>0&&(void 0===g3.pos?T="hidden":(S=g3.size,w2=y.radialDistributionY(i5,h2))),l3.justify)M=y.justify(i5,h2,c2,a2);else switch(l3.alignTo){case"connectors":M=y.alignToConnectors(e5,n3,s3,o3);break;case"plotEdges":M=y.alignToPlotEdges(h2,n3,s3,o3);break;default:M=y.radialDistributionX(t3,i5,w2-k2,m4,h2)}if(f3.attribs={visibility:T,align:f3.alignment},f3.posAttribs={x:M+(l3.x||0)+({left:b3,right:-b3}[f3.alignment]||0),y:w2+(l3.y||0)-C2/2},f3.computed.x=M,f3.computed.y=w2-k2,u(l3.crop,true)){let t4;M-(v=h2.getBBox().width)<b3&&1===n3?(t4=Math.round(v-M+b3),x[3]=Math.max(t4,x[3])):M+v>s3-b3&&0===n3&&(t4=Math.round(M+v-s3+b3),x[1]=Math.max(t4,x[1])),w2-S/2<0?x[0]=Math.max(Math.round(-w2+S/2),x[0]):w2+S/2>r3&&(x[2]=Math.max(Math.round(w2+S/2-r3),x[2])),f3.sideOverflow=t4}}}))})))})),(0===d(x)||this.verifyDataLabelOverflow(x))&&(this.placeDataLabels(),this.points.forEach((e5=>{(e5.dataLabels||[]).forEach((s4=>{var _a2;let{connectorColor:r4,connectorWidth:o4=1}=s4.options||{},n3=s4.dataLabelPosition;if(o4){let a3;b=s4.connector,n3&&n3.distance>0?(a3=!b,b||(s4.connector=b=i4.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+e5.colorIndex+(e5.className?" "+e5.className:"")).add(t3.dataLabelsGroup)),i4.styledMode||b.attr({"stroke-width":o4,stroke:r4||e5.color||"#666666"}),b[a3?"attr":"animate"]({d:e5.getConnectorPath(s4)}),b.attr({visibility:(_a2=n3.attribs)==null?void 0:_a2.visibility})):b&&(s4.connector=b.destroy())}}))}))))}function o2(){this.points.forEach((t3=>{(t3.dataLabels||[]).forEach((t4=>{var _a;let e4=t4.dataLabelPosition;e4?(e4.sideOverflow&&(t4.css({width:Math.max(t4.getBBox().width-e4.sideOverflow,0)+"px",textOverflow:(((_a=t4.options)==null?void 0:_a.style)||{}).textOverflow||"ellipsis"}),t4.shortened=true),t4.attr(e4.attribs),t4[t4.moved?"animate":"attr"](e4.posAttribs),t4.moved=true):t4&&t4.attr({y:-9999})})),delete t3.distributeBox}),this)}function m(t3){let e4=this.center,i4=this.options,s3=i4.center,r3=i4.minSize||80,o3=r3,n2=null!==i4.size;return!n2&&(null!==s3[0]?o3=Math.max(e4[2]-Math.max(t3[1],t3[3]),r3):(o3=Math.max(e4[2]-t3[1]-t3[3],r3),e4[0]+=(t3[3]-t3[1])/2),null!==s3[1]?o3=c(o3,r3,e4[2]-Math.max(t3[0],t3[2])):(o3=c(o3,r3,e4[2]-t3[0]-t3[2]),e4[1]+=(t3[0]-t3[2])/2),o3<e4[2]?(e4[2]=o3,e4[3]=Math.min(i4.thickness?Math.max(0,o3-2*i4.thickness):Math.max(0,f(i4.innerSize||0,o3)),o3),this.translate(e4),this.drawDataLabels&&this.drawDataLabels()):n2=true),n2}e3.compose=function(e4){if(t2.compose(l),g(n,"PieDataLabel")){let t3=e4.prototype;t3.dataLabelPositioners=i3,t3.alignDataLabel=a,t3.drawDataLabels=r2,t3.getDataLabelPosition=s2,t3.placeDataLabels=o2,t3.verifyDataLabelOverflow=m}}}(o||(o={})),o})),i(e,"Core/Geometry/GeometryUtilities.js",[],(function(){var t2,e2;return(e2=t2||(t2={})).getCenterOfPoints=function(t3){let e3=t3.reduce(((t4,e4)=>(t4.x+=e4.x,t4.y+=e4.y,t4)),{x:0,y:0});return{x:e3.x/t3.length,y:e3.y/t3.length}},e2.getDistanceBetweenPoints=function(t3,e3){return Math.sqrt(Math.pow(e3.x-t3.x,2)+Math.pow(e3.y-t3.y,2))},e2.getAngleBetweenPoints=function(t3,e3){return Math.atan2(e3.x-t3.x,e3.y-t3.y)},e2.pointInPolygon=function({x:t3,y:e3},i2){let s=i2.length,r,o,n=false;for(r=0,o=s-1;r<s;o=r++){let[s2,a]=i2[r],[h,l]=i2[o];a>e3!=l>e3&&t3<(h-s2)*(e3-a)/(l-a)+s2&&(n=!n)}return n},t2})),i(e,"Extensions/OverlappingDataLabels.js",[e["Core/Geometry/GeometryUtilities.js"],e["Core/Utilities.js"]],(function(t2,e2){let{pointInPolygon:i2}=t2,{addEvent:s,fireEvent:r,objectEach:o,pick:n}=e2;function a(t3){let e3=t3.length,s2=(t4,e4)=>!(e4.x>=t4.x+t4.width||e4.x+e4.width<=t4.x||e4.y>=t4.y+t4.height||e4.y+e4.height<=t4.y),o2=(t4,e4)=>{for(let s3 of t4)if(i2({x:s3[0],y:s3[1]},e4))return true;return false},n2,a2,l2,d,c,p=false;for(let i3=0;i3<e3;i3++)(n2=t3[i3])&&(n2.oldOpacity=n2.opacity,n2.newOpacity=1,n2.absoluteBox=function(t4){var _a,_b;if(t4&&(!t4.alignAttr||t4.placed)){let e4=t4.box?0:t4.padding||0,i4=t4.alignAttr||{x:t4.attr("x"),y:t4.attr("y")},s3=t4.getBBox();return t4.width=s3.width,t4.height=s3.height,{x:i4.x+(((_a=t4.parentGroup)==null?void 0:_a.translateX)||0)+e4,y:i4.y+(((_b=t4.parentGroup)==null?void 0:_b.translateY)||0)+e4,width:(t4.width||0)-2*e4,height:(t4.height||0)-2*e4,polygon:s3==null?void 0:s3.polygon}}}(n2));t3.sort(((t4,e4)=>(e4.labelrank||0)-(t4.labelrank||0)));for(let i3=0;i3<e3;++i3){d=(a2=t3[i3])&&a2.absoluteBox;let r2=d==null?void 0:d.polygon;for(let n3=i3+1;n3<e3;++n3){c=(l2=t3[n3])&&l2.absoluteBox;let e4=false;if(d&&c&&a2!==l2&&0!==a2.newOpacity&&0!==l2.newOpacity&&"hidden"!==a2.visibility&&"hidden"!==l2.visibility){let t4=c.polygon;if(r2&&t4&&r2!==t4?o2(r2,t4)&&(e4=true):s2(d,c)&&(e4=true),e4){let t5=a2.labelrank<l2.labelrank?a2:l2,e5=t5.text;t5.newOpacity=0,(e5==null?void 0:e5.element.querySelector("textPath"))&&e5.hide()}}}}for(let e4 of t3)h(e4,this)&&(p=true);p&&r(this,"afterHideAllOverlappingLabels")}function h(t3,e3){let i3,s2,o2=false;return t3&&(s2=t3.newOpacity,t3.oldOpacity!==s2&&(t3.hasClass("highcharts-data-label")?(t3[s2?"removeClass":"addClass"]("highcharts-data-label-hidden"),i3=function(){e3.styledMode||t3.css({pointerEvents:s2?"auto":"none"})},o2=true,t3[t3.isOld?"animate":"attr"]({opacity:s2},void 0,i3),r(e3,"afterHideOverlappingLabel")):t3.attr({opacity:s2})),t3.isOld=true),o2}function l(){var _a;let t3=this,e3=[];for(let i3 of t3.labelCollectors||[])e3=e3.concat(i3());for(let i3 of t3.yAxis||[])i3.stacking&&i3.options.stackLabels&&!i3.options.stackLabels.allowOverlap&&o(i3.stacking.stacks,(t4=>{o(t4,(t5=>{t5.label&&e3.push(t5.label)}))}));for(let i3 of t3.series||[])if(i3.visible&&((_a=i3.hasDataLabels)==null?void 0:_a.call(i3))){let s2=i4=>{for(let s3 of i4)s3.visible&&(s3.dataLabels||[]).forEach((i5=>{var _a2;let r2=i5.options||{};i5.labelrank=n(r2.labelrank,s3.labelrank,(_a2=s3.shapeArgs)==null?void 0:_a2.height),r2.allowOverlap??Number(r2.distance)>0?(i5.oldOpacity=i5.opacity,i5.newOpacity=1,h(i5,t3)):e3.push(i5)}))};s2(i3.nodes||[]),s2(i3.points)}this.hideOverlappingLabels(e3)}return{compose:function(t3){let e3=t3.prototype;e3.hideOverlappingLabels||(e3.hideOverlappingLabels=a,s(t3,"render",l))}}})),i(e,"Extensions/BorderRadius.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{defaultOptions:s}=t2,{noop:r}=e2,{addEvent:o,extend:n,isObject:a,merge:h,relativeLength:l}=i2,d={radius:0,scope:"stack",where:void 0},c=r,p=r;function u(t3,e3,i3,s2,r2={}){let o2=c(t3,e3,i3,s2,r2),{innerR:n2=0,r:a2=i3,start:h2=0,end:d2=0}=r2;if(r2.open||!r2.borderRadius)return o2;let p2=d2-h2,g2=Math.sin(p2/2),f2=Math.max(Math.min(l(r2.borderRadius||0,a2-n2),(a2-n2)/2,a2*g2/(1+g2)),0),m2=Math.min(f2,p2/Math.PI*2*n2),x2=o2.length-1;for(;x2--;)!function(t4,e4,i4){let s3,r3,o3;let n3=t4[e4],a3=t4[e4+1];if("Z"===a3[0]&&(a3=t4[0]),("M"===n3[0]||"L"===n3[0])&&"A"===a3[0]?(s3=n3,r3=a3,o3=true):"A"===n3[0]&&("M"===a3[0]||"L"===a3[0])&&(s3=a3,r3=n3),s3&&r3&&r3.params){let n4=r3[1],a4=r3[5],h3=r3.params,{start:l2,end:d3,cx:c2,cy:p3}=h3,u2=a4?n4-i4:n4+i4,g3=u2?Math.asin(i4/u2):0,f3=a4?g3:-g3,m3=Math.cos(g3)*u2;o3?(h3.start=l2+f3,s3[1]=c2+m3*Math.cos(l2),s3[2]=p3+m3*Math.sin(l2),t4.splice(e4+1,0,["A",i4,i4,0,0,1,c2+n4*Math.cos(h3.start),p3+n4*Math.sin(h3.start)])):(h3.end=d3-f3,r3[6]=c2+n4*Math.cos(h3.end),r3[7]=p3+n4*Math.sin(h3.end),t4.splice(e4+1,0,["A",i4,i4,0,0,1,c2+m3*Math.cos(d3),p3+m3*Math.sin(d3)])),r3[4]=Math.abs(h3.end-h3.start)<Math.PI?0:1}}(o2,x2,x2>1?m2:f2);return o2}function g(){var _a,_b;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:t3,yAxis:e3}=this,i3="percent"===t3.stacking,r2=(_b=(_a=s.plotOptions)==null?void 0:_a[this.type])==null?void 0:_b.borderRadius,o2=f(t3.borderRadius,a(r2)?r2:{}),h2=e3.options.reversed;for(let s2 of this.points){let{shapeArgs:r3}=s2;if("roundedRect"===s2.shapeType&&r3){let{width:a2=0,height:d2=0,y:c2=0}=r3,p2=c2,u2=d2;if("stack"===o2.scope&&s2.stackTotal){let r4=e3.translate(i3?100:s2.stackTotal,false,true,false,true),o3=e3.translate(t3.threshold||0,false,true,false,true),n2=this.crispCol(0,Math.min(r4,o3),0,Math.abs(r4-o3));p2=n2.y,u2=n2.height}let g2=(s2.negative?-1:1)*(h2?-1:1)==-1,f2=o2.where;!f2&&this.is("waterfall")&&Math.abs((s2.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(f2="all"),f2||(f2="end");let m2=Math.min(l(o2.radius,a2),a2/2,"all"===f2?d2/2:1/0)||0;"end"===f2&&(g2&&(p2-=m2),u2+=m2),n(r3,{brBoxHeight:u2,brBoxY:p2,r:m2})}}}}function f(t3,e3){return a(t3)||(t3={radius:t3||0}),h(d,e3,t3)}function m(){let t3=f(this.options.borderRadius);for(let e3 of this.points){let i3=e3.shapeArgs;i3&&(i3.borderRadius=l(t3.radius,(i3.r||0)-(i3.innerR||0)))}}function x(t3,e3,i3,s2,r2={}){let o2=p(t3,e3,i3,s2,r2),{r:n2=0,brBoxHeight:a2=s2,brBoxY:h2=e3}=r2,l2=e3-h2,d2=h2+a2-(e3+s2),c2=l2-n2>-.1?0:n2,u2=d2-n2>-.1?0:n2,g2=Math.max(c2&&l2,0),f2=Math.max(u2&&d2,0),m2=[t3+c2,e3],y=[t3+i3-c2,e3],b=[t3+i3,e3+c2],v=[t3+i3,e3+s2-u2],S=[t3+i3-u2,e3+s2],C=[t3+u2,e3+s2],k=[t3,e3+s2-u2],M=[t3,e3+c2],w2=(t4,e4)=>Math.sqrt(Math.pow(t4,2)-Math.pow(e4,2));if(g2){let t4=w2(c2,c2-g2);m2[0]-=t4,y[0]+=t4,b[1]=M[1]=e3+c2-g2}if(s2<c2-g2){let r3=w2(c2,c2-g2-s2);b[0]=v[0]=t3+i3-c2+r3,S[0]=Math.min(b[0],S[0]),C[0]=Math.max(v[0],C[0]),k[0]=M[0]=t3+c2-r3,b[1]=M[1]=e3+s2}if(f2){let t4=w2(u2,u2-f2);S[0]+=t4,C[0]-=t4,v[1]=k[1]=e3+s2-u2+f2}if(s2<u2-f2){let r3=w2(u2,u2-f2-s2);b[0]=v[0]=t3+i3-u2+r3,y[0]=Math.min(b[0],y[0]),m2[0]=Math.max(v[0],m2[0]),k[0]=M[0]=t3+u2-r3,v[1]=k[1]=e3}return o2.length=0,o2.push(["M",...m2],["L",...y],["A",c2,c2,0,0,1,...b],["L",...v],["A",u2,u2,0,0,1,...S],["L",...C],["A",u2,u2,0,0,1,...k],["L",...M],["A",c2,c2,0,0,1,...m2],["Z"]),o2}return{compose:function(t3,e3,i3){let s2=t3.types.pie;if(!e3.symbolCustomAttribs.includes("borderRadius")){let r2=i3.prototype.symbols;o(t3,"afterColumnTranslate",g,{order:9}),o(s2,"afterTranslate",m),e3.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY"),c=r2.arc,p=r2.roundedRect,r2.arc=u,r2.roundedRect=x}},optionsToObject:f}})),i(e,"Core/Responsive.js",[e["Core/Utilities.js"]],(function(t2){var e2;let{diffObjects:i2,extend:s,find:r,merge:o,pick:n,uniqueKey:a}=t2;return function(t3){function e3(t4,e4){let i3=t4.condition;(i3.callback||function(){return this.chartWidth<=n(i3.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=n(i3.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=n(i3.minWidth,0)&&this.chartHeight>=n(i3.minHeight,0)}).call(this)&&e4.push(t4._id)}function h(t4,e4){let s2=this.options.responsive,n2=this.currentResponsive,h2=[],l;!e4&&s2&&s2.rules&&s2.rules.forEach((t5=>{void 0===t5._id&&(t5._id=a()),this.matchResponsiveRule(t5,h2)}),this);let d=o(...h2.map((t5=>r((s2||{}).rules||[],(e5=>e5._id===t5)))).map((t5=>t5&&t5.chartOptions)));d.isResponsiveOptions=true,h2=h2.toString()||void 0;let c=n2&&n2.ruleIds;h2===c||(n2&&(this.currentResponsive=void 0,this.updatingResponsive=true,this.update(n2.undoOptions,t4,true),this.updatingResponsive=false),h2?((l=i2(d,this.options,true,this.collectionsWithUpdate)).isResponsiveOptions=true,this.currentResponsive={ruleIds:h2,mergedOptions:d,undoOptions:l},this.updatingResponsive||this.update(d,t4,true)):this.currentResponsive=void 0)}t3.compose=function(t4){let i3=t4.prototype;return i3.matchResponsiveRule||s(i3,{matchResponsiveRule:e3,setResponsive:h}),t4}}(e2||(e2={})),e2})),i(e,"masters/highcharts.src.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Core/Defaults.js"],e["Core/Animation/Fx.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Templating.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Renderer/HTML/HTMLElement.js"],e["Core/Axis/Axis.js"],e["Core/Axis/DateTimeAxis.js"],e["Core/Axis/LogarithmicAxis.js"],e["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],e["Core/Axis/Tick.js"],e["Core/Tooltip.js"],e["Core/Series/Point.js"],e["Core/Pointer.js"],e["Core/Legend/Legend.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Chart/Chart.js"],e["Extensions/ScrollablePlotArea.js"],e["Core/Axis/Stacking/StackingAxis.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Column/ColumnDataLabel.js"],e["Series/Pie/PieDataLabel.js"],e["Core/Series/DataLabel.js"],e["Extensions/OverlappingDataLabels.js"],e["Extensions/BorderRadius.js"],e["Core/Responsive.js"],e["Core/Color/Color.js"],e["Core/Time.js"]],(function(t2,e2,i2,s,r,o,n,a,h,l,d,c,p,u,g,f,m,x,y,b,v,S,C,k,M,w2,T,A,P,L,O,D,E,I,j,B){return t2.AST=o,t2.Axis=p,t2.Chart=C,t2.Color=j,t2.DataLabel=O,t2.Fx=s,t2.HTMLElement=c,t2.Legend=v,t2.LegendSymbol=S,t2.OverlappingDataLabels=t2.OverlappingDataLabels||D,t2.PlotLineOrBand=f,t2.Point=y,t2.Pointer=b,t2.RendererRegistry=a,t2.Series=T,t2.SeriesRegistry=A,t2.StackItem=w2,t2.SVGElement=l,t2.SVGRenderer=d,t2.Templating=n,t2.Tick=m,t2.Time=B,t2.Tooltip=x,t2.animate=r.animate,t2.animObject=r.animObject,t2.chart=C.chart,t2.color=j.parse,t2.dateFormat=n.dateFormat,t2.defaultOptions=i2.defaultOptions,t2.distribute=h.distribute,t2.format=n.format,t2.getDeferredAnimation=r.getDeferredAnimation,t2.getOptions=i2.getOptions,t2.numberFormat=n.numberFormat,t2.seriesType=A.seriesType,t2.setAnimation=r.setAnimation,t2.setOptions=i2.setOptions,t2.stop=r.stop,t2.time=i2.defaultTime,t2.timers=s.timers,E.compose(t2.Series,t2.SVGElement,t2.SVGRenderer),P.compose(t2.Series.types.column),O.compose(t2.Series),u.compose(t2.Axis),c.compose(t2.SVGRenderer),v.compose(t2.Chart),g.compose(t2.Axis),D.compose(t2.Chart),L.compose(t2.Series.types.pie),f.compose(t2.Chart,t2.Axis),b.compose(t2.Chart),I.compose(t2.Chart),k.compose(t2.Axis,t2.Chart,t2.Series),M.compose(t2.Axis,t2.Chart,t2.Series),x.compose(t2.Pointer),e2.extend(t2,e2),t2})),e["masters/highcharts.src.js"]._modules=e,e["masters/highcharts.src.js"]}))})(highcharts$1);return highcharts$1.exports}var highchartsExports=requireHighcharts();const Highcharts$1=getDefaultExportFromCjs$1(highchartsExports);const buttonClassName=props=>{const{disabled:disabled=false,fullWidth:fullWidth=false,highlight:highlight,icon:icon,loading:loading=false,type:type="inline",variant:variant="primary",size:size=null}=props;const classNames2=["pb_button_kit"];if(variant)classNames2.push(`pb_button_${variant}`);if(type)classNames2.push(`pb_button_${type}`);if(fullWidth)classNames2.push("pb_button_block");classNames2.push(disabled?"pb_button_disabled":"pb_button_enabled");if(loading)classNames2.push("pb_button_loading");if(size)classNames2.push(`pb_button_size_${size}`);if(variant==="reaction"&&icon&&!isValidEmoji(icon))classNames2.push("pb_button_reaction_default");if(variant==="reaction"&&highlight)classNames2.push("pb_button_active");return classNames2.join(" ")};const spinnerIcon=getAllIcons()["spinner"];const Button=props=>{const{aria:aria={},children:children,className:className,count:count2,data:data={},disabled:disabled,htmlOptions:htmlOptions={},icon:icon=null,iconRight:iconRight=false,id:id,loading:loading=false,onClick:onClick,tabIndex:tabIndex,link:link=null,newWindow:newWindow=false,target:target="",text:text,htmlType:htmlType="button",value:value,variant:variant,form:form=null}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css4=classnames(buttonClassName(props),globalProps(props),className);const loadingIcon=jsx$1("div",{className:"loading-icon",children:jsx$1(Icon,{className:"svg-inline--fa",customIcon:spinnerIcon.icon,fixedWidth:true,pulse:true})});const content=jsxs("span",{className:"pb_button_content",children:[icon&&!iconRight&&jsx$1(Icon,{className:"button_with_icon",icon:icon}),jsx$1("span",{children:text||children}),icon&&iconRight&&jsx$1(Icon,{className:"button_with_icon_right",icon:icon})]});const ifLoading=()=>{if(loading){return jsx$1(Fragment$1,{children:loadingIcon})}else{return content}};const getTargetAttribute=()=>{if(target&&link){return target}else if(newWindow){return"_blank"}return null};const displayButton=()=>{if(link){return jsx$1("a",{...ariaProps,...dataProps,...htmlProps,className:css4,href:link,id:id,rel:target!=="child"?"noreferrer":null,role:"link",tabIndex:tabIndex,target:getTargetAttribute(),children:ifLoading()})}else if(variant==="reaction"){return jsxs("button",{...ariaProps,...dataProps,...htmlProps,className:css4,disabled:disabled,form:form,id:id,onClick:onClick,role:"button",tabIndex:tabIndex,type:htmlType,value:value,children:[icon&&isValidEmoji(icon)&&jsxs(Flex,{align:"center",children:[jsx$1(Icon,{icon:icon}),count2&&jsx$1(Caption,{paddingLeft:"xxs",size:"xs",children:count2})]}),!isValidEmoji(icon)&&jsx$1(Icon,{icon:icon?icon:"face-smile-plus"})]})}else{return jsx$1("button",{...ariaProps,...dataProps,...htmlProps,className:css4,disabled:disabled,form:form,id:id,onClick:onClick,role:"button",tabIndex:tabIndex,type:htmlType,value:value,children:ifLoading()})}};return jsx$1(Fragment$1,{children:displayButton()})};var highchartsMore={exports:{}};var hasRequiredHighchartsMore;function requireHighchartsMore(){if(hasRequiredHighchartsMore)return highchartsMore.exports;hasRequiredHighchartsMore=1;(function(module){!function(t){module.exports?(t.default=t,module.exports=t):t("undefined"!=typeof Highcharts?Highcharts:void 0)}((function(t){var e=t?t._modules:{};function i(e2,i2,s,o){e2.hasOwnProperty(i2)||(e2[i2]=o.apply(null,s),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i2,module:e2[i2]}})))}i(e,"Extensions/Pane/PaneComposition.js",[e["Core/Utilities.js"]],(function(t2){let{addEvent:e2,correctFloat:i2,defined:s,pick:o}=t2;function a(t3){let e3;let i3=this;return t3&&i3.pane.forEach((s2=>{r(t3.chartX-i3.plotLeft,t3.chartY-i3.plotTop,s2.center)&&(e3=s2)})),e3}function r(t3,e3,o2,a2,r2){let n2=true,l2=o2[0],h2=o2[1],p=Math.sqrt(Math.pow(t3-l2,2)+Math.pow(e3-h2,2));if(s(a2)&&s(r2)){let s2=Math.atan2(i2(e3-h2,8),i2(t3-l2,8));r2!==a2&&(n2=a2>r2?s2>=a2&&s2<=Math.PI||s2<=r2&&s2>=-Math.PI:s2>=a2&&s2<=i2(r2,8))}return p<=Math.ceil(o2[2]/2)&&n2}function n(t3){this.polar&&(t3.options.inverted&&([t3.x,t3.y]=[t3.y,t3.x]),t3.isInsidePlot=this.pane.some((e3=>r(t3.x,t3.y,e3.center,e3.axis&&e3.axis.normalizedStartAngleRad,e3.axis&&e3.axis.normalizedEndAngleRad))))}function l(t3){let e3=this.chart;t3.hoverPoint&&t3.hoverPoint.plotX&&t3.hoverPoint.plotY&&e3.hoverPane&&!r(t3.hoverPoint.plotX,t3.hoverPoint.plotY,e3.hoverPane.center)&&(t3.hoverPoint=void 0)}function h(t3){let e3=this.chart;e3.polar?(e3.hoverPane=e3.getHoverPane(t3),t3.filter=function(i3){return i3.visible&&!(!t3.shared&&i3.directTouch)&&o(i3.options.enableMouseTracking,true)&&(!e3.hoverPane||i3.xAxis.pane===e3.hoverPane)}):e3.hoverPane=void 0}return{compose:function(t3,i3){let s2=t3.prototype;s2.getHoverPane||(s2.collectionsWithUpdate.push("pane"),s2.getHoverPane=a,e2(t3,"afterIsInsidePlot",n),e2(i3,"afterGetHoverData",l),e2(i3,"beforeGetHoverData",h))}}})),i(e,"Extensions/Pane/PaneDefaults.js",[],(function(){return{pane:{center:["50%","50%"],size:"85%",innerSize:"0%",startAngle:0},background:{shape:"circle",borderRadius:0,borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}}})),i(e,"Extensions/Pane/Pane.js",[e["Series/CenteredUtilities.js"],e["Extensions/Pane/PaneComposition.js"],e["Extensions/Pane/PaneDefaults.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{extend:o,merge:a,splat:r}=s;class n{constructor(t3,e3){this.coll="pane",this.init(t3,e3)}init(t3,e3){this.chart=e3,this.background=[],e3.pane.push(this),this.setOptions(t3)}setOptions(t3){this.options=t3=a(i2.pane,this.chart.angular?{background:{}}:void 0,t3)}render(){let t3=this.options,e3=this.chart.renderer;this.group||(this.group=e3.g("pane-group").attr({zIndex:t3.zIndex||0}).add()),this.updateCenter();let s2=this.options.background;if(s2){let t4=Math.max((s2=r(s2)).length,this.background.length||0);for(let e4=0;e4<t4;e4++)s2[e4]&&this.axis?this.renderBackground(a(i2.background,s2[e4]),e4):this.background[e4]&&(this.background[e4]=this.background[e4].destroy(),this.background.splice(e4,1))}}renderBackground(t3,e3){let i3={class:"highcharts-pane "+(t3.className||"")},s2="animate";this.chart.styledMode||o(i3,{fill:t3.backgroundColor,stroke:t3.borderColor,"stroke-width":t3.borderWidth}),this.background[e3]||(this.background[e3]=this.chart.renderer.path().add(this.group),s2="attr"),this.background[e3][s2]({d:this.axis.getPlotBandPath(t3.from,t3.to,t3)}).attr(i3)}updateCenter(e3){this.center=(e3||this.axis||{}).center=t2.getCenter.call(this)}update(t3,e3){a(true,this.options,t3),this.setOptions(this.options),this.render(),this.chart.axes.forEach((function(t4){t4.pane===this&&(t4.pane=null,t4.update({},e3))}),this)}}return n.compose=e2.compose,n})),i(e,"Series/AreaRange/AreaRangePoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2){let{area:{prototype:{pointClass:i2,pointClass:{prototype:s}}}}=t2.seriesTypes,{defined:o,isNumber:a}=e2;return class extends i2{setState(){let t3=this.state,e3=this.series,i3=e3.chart.polar;o(this.plotHigh)||(this.plotHigh=e3.yAxis.toPixels(this.high,true)),o(this.plotLow)||(this.plotLow=this.plotY=e3.yAxis.toPixels(this.low,true)),e3.lowerStateMarkerGraphic=e3.stateMarkerGraphic,e3.stateMarkerGraphic=e3.upperStateMarkerGraphic,this.graphic=this.graphics&&this.graphics[1],this.plotY=this.plotHigh,i3&&a(this.plotHighX)&&(this.plotX=this.plotHighX),s.setState.apply(this,arguments),this.state=t3,this.plotY=this.plotLow,this.graphic=this.graphics&&this.graphics[0],i3&&a(this.plotLowX)&&(this.plotX=this.plotLowX),e3.upperStateMarkerGraphic=e3.stateMarkerGraphic,e3.stateMarkerGraphic=e3.lowerStateMarkerGraphic,e3.lowerStateMarkerGraphic=void 0;let r=e3.modifyMarkerSettings();s.setState.apply(this,arguments),e3.restoreMarkerSettings(r)}haloPath(){let t3=this.series.chart.polar,e3=[];return this.plotY=this.plotLow,t3&&a(this.plotLowX)&&(this.plotX=this.plotLowX),this.isInside&&(e3=s.haloPath.apply(this,arguments)),this.plotY=this.plotHigh,t3&&a(this.plotHighX)&&(this.plotX=this.plotHighX),this.isTopInside&&(e3=e3.concat(s.haloPath.apply(this,arguments))),e3}isValid(){return a(this.low)&&a(this.high)}}})),i(e,"Series/AreaRange/AreaRangeSeries.js",[e["Series/AreaRange/AreaRangePoint.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{noop:o}=e2,{area:a,area:{prototype:r},column:{prototype:n}}=i2.seriesTypes,{addEvent:l,defined:h,extend:p,isArray:d,isNumber:c,pick:u,merge:g}=s;class f extends a{toYData(t3){return[t3.low,t3.high]}highToXY(t3){let e3=this.chart,i3=this.xAxis.postTranslate(t3.rectPlotX||0,this.yAxis.len-(t3.plotHigh||0));t3.plotHighX=i3.x-e3.plotLeft,t3.plotHigh=i3.y-e3.plotTop,t3.plotLowX=t3.plotX}getGraphPath(t3){let e3=[],i3=[],s2=r.getGraphPath,o2=this.options,a2=this.chart.polar,n2=a2&&false!==o2.connectEnds,l2=o2.connectNulls,h2,p2,d2,c2=o2.step;for(h2=(t3=t3||this.points).length;h2--;){p2=t3[h2];let s3=a2?{plotX:p2.rectPlotX,plotY:p2.yBottom,doCurve:false}:{plotX:p2.plotX,plotY:p2.plotY,doCurve:false};p2.isNull||n2||l2||t3[h2+1]&&!t3[h2+1].isNull||i3.push(s3),d2={polarPlotY:p2.polarPlotY,rectPlotX:p2.rectPlotX,yBottom:p2.yBottom,plotX:u(p2.plotHighX,p2.plotX),plotY:p2.plotHigh,isNull:p2.isNull},i3.push(d2),e3.push(d2),p2.isNull||n2||l2||t3[h2-1]&&!t3[h2-1].isNull||i3.push(s3)}let g2=s2.call(this,t3);c2&&(true===c2&&(c2="left"),o2.step={left:"right",center:"center",right:"left"}[c2]);let f2=s2.call(this,e3),b=s2.call(this,i3);o2.step=c2;let m=[].concat(g2,f2);return!this.chart.polar&&b[0]&&"M"===b[0][0]&&(b[0]=["L",b[0][1],b[0][2]]),this.graphPath=m,this.areaPath=g2.concat(b),m.isArea=true,m.xMap=g2.xMap,this.areaPath.xMap=g2.xMap,m}drawDataLabels(){var _a,_b;let t3,e3,i3,s2,o2;let a2=this.points,n2=a2.length,l2=[],h2=this.options.dataLabels,c2=this.chart.inverted;if(h2){if(d(h2)?(s2=h2[0]||{enabled:false},o2=h2[1]||{enabled:false}):((s2=p({},h2)).x=h2.xHigh,s2.y=h2.yHigh,(o2=p({},h2)).x=h2.xLow,o2.y=h2.yLow),s2.enabled||((_a=this.hasDataLabels)==null?void 0:_a.call(this))){for(t3=n2;t3--;)if(e3=a2[t3]){let{plotHigh:o3=0,plotLow:a3=0}=e3;i3=s2.inside?o3<a3:o3>a3,e3.y=e3.high,e3._plotY=e3.plotY,e3.plotY=o3,l2[t3]=e3.dataLabel,e3.dataLabel=e3.dataLabelUpper,e3.below=i3,c2?s2.align||(s2.align=i3?"right":"left"):s2.verticalAlign||(s2.verticalAlign=i3?"top":"bottom")}for(this.options.dataLabels=s2,r.drawDataLabels&&r.drawDataLabels.apply(this,arguments),t3=n2;t3--;)(e3=a2[t3])&&(e3.dataLabelUpper=e3.dataLabel,e3.dataLabel=l2[t3],delete e3.dataLabels,e3.y=e3.low,e3.plotY=e3._plotY)}if(o2.enabled||((_b=this.hasDataLabels)==null?void 0:_b.call(this))){for(t3=n2;t3--;)if(e3=a2[t3]){let{plotHigh:t4=0,plotLow:s3=0}=e3;i3=o2.inside?t4<s3:t4>s3,e3.below=!i3,c2?o2.align||(o2.align=i3?"left":"right"):o2.verticalAlign||(o2.verticalAlign=i3?"bottom":"top")}this.options.dataLabels=o2,r.drawDataLabels&&r.drawDataLabels.apply(this,arguments)}if(s2.enabled)for(t3=n2;t3--;)(e3=a2[t3])&&(e3.dataLabels=[e3.dataLabelUpper,e3.dataLabel].filter((function(t4){return!!t4})));this.options.dataLabels=h2}}alignDataLabel(){n.alignDataLabel.apply(this,arguments)}modifyMarkerSettings(){let t3={marker:this.options.marker,symbol:this.symbol};if(this.options.lowMarker){let{options:{marker:t4,lowMarker:e3}}=this;this.options.marker=g(t4,e3),e3.symbol&&(this.symbol=e3.symbol)}return t3}restoreMarkerSettings(t3){this.options.marker=t3.marker,this.symbol=t3.symbol}drawPoints(){let t3,e3;let i3=this.points.length,s2=this.modifyMarkerSettings();for(r.drawPoints.apply(this,arguments),this.restoreMarkerSettings(s2),t3=0;t3<i3;)(e3=this.points[t3]).graphics=e3.graphics||[],e3.origProps={plotY:e3.plotY,plotX:e3.plotX,isInside:e3.isInside,negative:e3.negative,zone:e3.zone,y:e3.y},(e3.graphic||e3.graphics[0])&&(e3.graphics[0]=e3.graphic),e3.graphic=e3.graphics[1],e3.plotY=e3.plotHigh,h(e3.plotHighX)&&(e3.plotX=e3.plotHighX),e3.y=u(e3.high,e3.origProps.y),e3.negative=e3.y<(this.options.threshold||0),this.zones.length&&(e3.zone=e3.getZone()),this.chart.polar||(e3.isInside=e3.isTopInside=void 0!==e3.plotY&&e3.plotY>=0&&e3.plotY<=this.yAxis.len&&e3.plotX>=0&&e3.plotX<=this.xAxis.len),t3++;for(r.drawPoints.apply(this,arguments),t3=0;t3<i3;)(e3=this.points[t3]).graphics=e3.graphics||[],(e3.graphic||e3.graphics[1])&&(e3.graphics[1]=e3.graphic),e3.graphic=e3.graphics[0],e3.origProps&&(p(e3,e3.origProps),delete e3.origProps),t3++}hasMarkerChanged(t3,e3){let i3=t3.lowMarker,s2=e3.lowMarker||{};return i3&&(false===i3.enabled||s2.symbol!==i3.symbol||s2.height!==i3.height||s2.width!==i3.width)||super.hasMarkerChanged(t3,e3)}}return f.defaultOptions=g(a.defaultOptions,{lineWidth:1,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:true,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}}),l(f,"afterTranslate",(function(){"low,high"===this.pointArrayMap.join(",")&&this.points.forEach((t3=>{let e3=t3.high,i3=t3.plotY;t3.isNull?t3.plotY=void 0:(t3.plotLow=i3,t3.plotHigh=c(e3)?this.yAxis.translate(this.dataModify?this.dataModify.modifyValue(e3):e3,false,true,void 0,true):void 0,this.dataModify&&(t3.yBottom=t3.plotHigh))}))}),{order:0}),l(f,"afterTranslate",(function(){this.points.forEach((t3=>{if(this.chart.polar)this.highToXY(t3),t3.plotLow=t3.plotY,t3.tooltipPos=[((t3.plotHighX||0)+(t3.plotLowX||0))/2,((t3.plotHigh||0)+(t3.plotLow||0))/2];else{let e3=t3.pos(false,t3.plotLow),i3=t3.pos(false,t3.plotHigh);e3&&i3&&(e3[0]=(e3[0]+i3[0])/2,e3[1]=(e3[1]+i3[1])/2),t3.tooltipPos=e3}}))}),{order:3}),p(f.prototype,{deferTranslatePolar:true,pointArrayMap:["low","high"],pointClass:t2,pointValKey:"low",setStackedPoints:o}),i2.registerSeriesType("arearange",f),f})),i(e,"Series/AreaSplineRange/AreaSplineRangeSeries.js",[e["Series/AreaRange/AreaRangeSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{spline:{prototype:s}}=e2.seriesTypes,{merge:o,extend:a}=i2;class r extends t2{}return r.defaultOptions=o(t2.defaultOptions),a(r.prototype,{getPointSpline:s.getPointSpline}),e2.registerSeriesType("areasplinerange",r),r})),i(e,"Series/BoxPlot/BoxPlotSeriesDefaults.js",[],(function(){return{threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b>{series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2}})),i(e,"Series/BoxPlot/BoxPlotSeries.js",[e["Series/BoxPlot/BoxPlotSeriesDefaults.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,o){let{noop:a}=i2,{crisp:r,extend:n,merge:l,pick:h}=o;class p extends e2{pointAttribs(){return{}}translate(){let t3=this.yAxis,e3=this.pointArrayMap;super.translate.apply(this),this.points.forEach((function(i3){e3.forEach((function(e4){null!==i3[e4]&&(i3[e4+"Plot"]=t3.translate(i3[e4],0,1,0,1))})),i3.plotHigh=i3.highPlot}))}drawPoints(){let t3,e3,i3,s2,o2,a2,n2,l2,p2,d,c,u,g;let f=this.points,b=this.options,m=this.chart,y=m.renderer,x=false!==this.doQuartiles,P=this.options.whiskerLength;for(let S of f){let f2=(l2=S.graphic)?"animate":"attr",M=S.shapeArgs,L={},C={},k={},v={},A=S.color||this.color;if(void 0!==S.plotY){let w2;p2=M.width,c=(d=M.x)+p2,u=p2/2,t3=x?S.q1Plot:S.lowPlot,e3=x?S.q3Plot:S.lowPlot,i3=S.highPlot,s2=S.lowPlot,l2||(S.graphic=l2=y.g("point").add(this.group),S.stem=y.path().addClass("highcharts-boxplot-stem").add(l2),P&&(S.whiskers=y.path().addClass("highcharts-boxplot-whisker").add(l2)),x&&(S.box=y.path(n2).addClass("highcharts-boxplot-box").add(l2)),S.medianShape=y.path(a2).addClass("highcharts-boxplot-median").add(l2)),m.styledMode||(C.stroke=S.stemColor||b.stemColor||A,C["stroke-width"]=h(S.stemWidth,b.stemWidth,b.lineWidth),C.dashstyle=S.stemDashStyle||b.stemDashStyle||b.dashStyle,S.stem.attr(C),P&&(k.stroke=S.whiskerColor||b.whiskerColor||A,k["stroke-width"]=h(S.whiskerWidth,b.whiskerWidth,b.lineWidth),k.dashstyle=S.whiskerDashStyle||b.whiskerDashStyle||b.dashStyle,S.whiskers.attr(k)),x&&(L.fill=S.fillColor||b.fillColor||A,L.stroke=b.lineColor||A,L["stroke-width"]=b.lineWidth||0,L.dashstyle=S.boxDashStyle||b.boxDashStyle||b.dashStyle,S.box.attr(L)),v.stroke=S.medianColor||b.medianColor||A,v["stroke-width"]=h(S.medianWidth,b.medianWidth,b.lineWidth),v.dashstyle=S.medianDashStyle||b.medianDashStyle||b.dashStyle,S.medianShape.attr(v));let T=r((S.plotX||0)+(this.pointXOffset||0)+(this.barW||0)/2,S.stem.strokeWidth());if(w2=[["M",T,e3],["L",T,i3],["M",T,t3],["L",T,s2]],S.stem[f2]({d:w2}),x){let i4=S.box.strokeWidth();t3=r(t3,i4),e3=r(e3,i4),w2=[["M",d=r(d,i4),e3],["L",d,t3],["L",c=r(c,i4),t3],["L",c,e3],["L",d,e3],["Z"]],S.box[f2]({d:w2})}if(P){let t4=S.whiskers.strokeWidth();i3=r(S.highPlot,t4),s2=r(S.lowPlot,t4),w2=[["M",r(T-(g="string"==typeof P&&/%$/.test(P)?u*parseFloat(P)/100:Number(P)/2)),i3],["L",r(T+g),i3],["M",r(T-g),s2],["L",r(T+g),s2]],S.whiskers[f2]({d:w2})}w2=[["M",d,o2=r(S.medianPlot,S.medianShape.strokeWidth())],["L",c,o2]],S.medianShape[f2]({d:w2})}}}toYData(t3){return[t3.low,t3.q1,t3.median,t3.q3,t3.high]}}return p.defaultOptions=l(e2.defaultOptions,t2),n(p.prototype,{pointArrayMap:["low","q1","median","q3","high"],pointValKey:"high",drawDataLabels:a,setStackedPoints:a}),s.registerSeriesType("boxplot",p),p})),i(e,"Series/Bubble/BubbleLegendDefaults.js",[],(function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:false,labels:{className:void 0,allowOverlap:false,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:false,zIndex:1,zThreshold:0}})),i(e,"Series/Bubble/BubbleLegendItem.js",[e["Core/Color/Color.js"],e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{parse:o}=t2,{noop:a}=i2,{arrayMax:r,arrayMin:n,isNumber:l,merge:h,pick:p,stableSort:d}=s;return class{constructor(t3,e3){this.setState=a,this.init(t3,e3)}init(t3,e3){this.options=t3,this.visible=true,this.chart=e3.chart,this.legend=e3}addToLegend(t3){t3.splice(this.options.legendIndex,0,this)}drawLegendSymbol(t3){let e3;let i3=p(t3.options.itemDistance,20),s2=this.legendItem||{},o2=this.options,a2=o2.ranges,r2=o2.connectorDistance;if(!a2||!a2.length||!l(a2[0].value)){t3.options.bubbleLegend.autoRanges=true;return}d(a2,(function(t4,e4){return e4.value-t4.value})),this.ranges=a2,this.setOptions(),this.render();let n2=this.getMaxLabelSize(),h2=this.ranges[0].radius,c=2*h2;e3=(e3=r2-h2+n2.width)>0?e3:0,this.maxLabel=n2,this.movementX="left"===o2.labels.align?e3:0,s2.labelWidth=c+e3+i3,s2.labelHeight=c+n2.height/2}setOptions(){let t3=this.ranges,e3=this.options,i3=this.chart.series[e3.seriesIndex],s2=this.legend.baseline,a2={zIndex:e3.zIndex,"stroke-width":e3.borderWidth},r2={zIndex:e3.zIndex,"stroke-width":e3.connectorWidth},n2={align:this.legend.options.rtl||"left"===e3.labels.align?"right":"left",zIndex:e3.zIndex},l2=i3.options.marker.fillOpacity,d2=this.chart.styledMode;t3.forEach((function(c,u){d2||(a2.stroke=p(c.borderColor,e3.borderColor,i3.color),a2.fill=p(c.color,e3.color,1!==l2?o(i3.color).setOpacity(l2).get("rgba"):i3.color),r2.stroke=p(c.connectorColor,e3.connectorColor,i3.color)),t3[u].radius=this.getRangeRadius(c.value),t3[u]=h(t3[u],{center:t3[0].radius-t3[u].radius+s2}),d2||h(true,t3[u],{bubbleAttribs:h(a2),connectorAttribs:h(r2),labelAttribs:n2})}),this)}getRangeRadius(t3){let e3=this.options,i3=this.options.seriesIndex,s2=this.chart.series[i3],o2=e3.ranges[0].value,a2=e3.ranges[e3.ranges.length-1].value,r2=e3.minSize,n2=e3.maxSize;return s2.getRadius.call(this,a2,o2,r2,n2,t3)}render(){let t3=this.legendItem||{},e3=this.chart.renderer,i3=this.options.zThreshold;for(let s2 of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),t3.symbol=e3.g("bubble-legend"),t3.label=e3.g("bubble-legend-item").css(this.legend.itemStyle||{}),t3.symbol.translateX=0,t3.symbol.translateY=0,t3.symbol.add(t3.label),t3.label.add(t3.group),this.ranges))s2.value>=i3&&this.renderRange(s2);this.hideOverlappingLabels()}renderRange(t3){let e3=this.ranges[0],i3=this.legend,s2=this.options,o2=s2.labels,a2=this.chart,r2=a2.series[s2.seriesIndex],n2=a2.renderer,l2=this.symbols,h2=l2.labels,p2=t3.center,d2=Math.abs(t3.radius),c=s2.connectorDistance||0,u=o2.align,g=i3.options.rtl,f=s2.borderWidth,b=s2.connectorWidth,m=e3.radius||0,y=p2-d2-f/2+b/2,x=(y%1?1:.5)-(b%2?0:.5),P=n2.styledMode,S=g||"left"===u?-c:c;"center"===u&&(S=0,s2.connectorDistance=0,t3.labelAttribs.align="center"),l2.bubbleItems.push(n2.circle(m,p2+x,d2).attr(P?{}:t3.bubbleAttribs).addClass((P?"highcharts-color-"+r2.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(s2.className||"")).add(this.legendItem.symbol)),l2.connectors.push(n2.path(n2.crispLine([["M",m,y],["L",m+S,y]],s2.connectorWidth)).attr(P?{}:t3.connectorAttribs).addClass((P?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(s2.connectorClassName||"")).add(this.legendItem.symbol));let M=n2.text(this.formatLabel(t3)).attr(P?{}:t3.labelAttribs).css(P?{}:o2.style).addClass("highcharts-bubble-legend-labels "+(s2.labels.className||"")).add(this.legendItem.symbol),L={x:m+S+s2.labels.x,y:y+s2.labels.y+.4*M.getBBox().height};M.attr(L),h2.push(M),M.placed=true,M.alignAttr=L}getMaxLabelSize(){let t3,e3;return this.symbols.labels.forEach((function(i3){e3=i3.getBBox(true),t3=t3?e3.width>t3.width?e3:t3:e3})),t3||{}}formatLabel(t3){let i3=this.options,s2=i3.labels.formatter,o2=i3.labels.format,{numberFormatter:a2}=this.chart;return o2?e2.format(o2,t3):s2?s2.call(t3):a2(t3.value,1)}hideOverlappingLabels(){let t3=this.chart,e3=this.options.labels.allowOverlap,i3=this.symbols;!e3&&i3&&(t3.hideOverlappingLabels(i3.labels),i3.labels.forEach((function(t4,e4){t4.newOpacity?t4.newOpacity!==t4.oldOpacity&&i3.connectors[e4].show():i3.connectors[e4].hide()})))}getRanges(){let t3=this.legend.bubbleLegend,e3=t3.chart.series,i3=t3.options.ranges,s2,o2,a2=Number.MAX_VALUE,d2=-Number.MAX_VALUE;return e3.forEach((function(t4){t4.isBubble&&!t4.ignoreSeries&&(o2=t4.zData.filter(l)).length&&(a2=p(t4.options.zMin,Math.min(a2,Math.max(n(o2),false===t4.options.displayNegative?t4.options.zThreshold:-Number.MAX_VALUE))),d2=p(t4.options.zMax,Math.max(d2,r(o2))))})),s2=a2===d2?[{value:d2}]:[{value:a2},{value:(a2+d2)/2},{value:d2,autoRanges:true}],i3.length&&i3[0].radius&&s2.reverse(),s2.forEach((function(t4,e4){i3&&i3[e4]&&(s2[e4]=h(i3[e4],t4))})),s2}predictBubbleSizes(){let t3=this.chart,e3=t3.legend.options,i3=e3.floating,s2="horizontal"===e3.layout,o2=s2?t3.legend.lastLineHeight:0,a2=t3.plotSizeX,r2=t3.plotSizeY,n2=t3.series[this.options.seriesIndex],l2=n2.getPxExtremes(),h2=Math.ceil(l2.minPxSize),p2=Math.ceil(l2.maxPxSize),d2=Math.min(r2,a2),c,u=n2.options.maxSize;return i3||!/%$/.test(u)?c=p2:(c=(d2+o2)*(u=parseFloat(u))/100/(u/100+1),(s2&&r2-c>=a2||!s2&&a2-c>=r2)&&(c=p2)),[h2,Math.ceil(c)]}updateRanges(t3,e3){let i3=this.legend.options.bubbleLegend;i3.minSize=t3,i3.maxSize=e3,i3.ranges=this.getRanges()}correctSizes(){let t3=this.legend,e3=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(e3.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,e3.maxPxSize),t3.render())}}})),i(e,"Series/Bubble/BubbleLegendComposition.js",[e["Series/Bubble/BubbleLegendDefaults.js"],e["Series/Bubble/BubbleLegendItem.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,o){let{setOptions:a}=i2,{composed:r}=s,{addEvent:n,objectEach:l,pushUnique:h,wrap:p}=o;function d(t3,e3,i3){let s2,o2,a2;let r2=this.legend,n2=c(this)>=0;r2&&r2.options.enabled&&r2.bubbleLegend&&r2.options.bubbleLegend.autoRanges&&n2?(s2=r2.bubbleLegend.options,o2=r2.bubbleLegend.predictBubbleSizes(),r2.bubbleLegend.updateRanges(o2[0],o2[1]),s2.placed||(r2.group.placed=false,r2.allItems.forEach((t4=>{(a2=t4.legendItem||{}).group&&(a2.group.translateY=void 0)}))),r2.render(),s2.placed||(this.getMargins(),this.axes.forEach((function(t4){t4.visible&&t4.render(),s2.placed||(t4.setScale(),t4.updateNames(),l(t4.ticks,(function(t5){t5.isNew=true,t5.isNewLabel=true})))})),this.getMargins()),s2.placed=true,t3.call(this,e3,i3),r2.bubbleLegend.correctSizes(),b(r2,u(r2))):(t3.call(this,e3,i3),r2&&r2.options.enabled&&r2.bubbleLegend&&(r2.render(),b(r2,u(r2))))}function c(t3){let e3=t3.series,i3=0;for(;i3<e3.length;){if(e3[i3]&&e3[i3].isBubble&&e3[i3].visible&&e3[i3].zData.length)return i3;i3++}return-1}function u(t3){let e3=t3.allItems,i3=[],s2=e3.length,o2,a2,r2,n2=0,l2=0;for(n2=0;n2<s2;n2++)if(a2=e3[n2].legendItem||{},r2=(e3[n2+1]||{}).legendItem||{},a2.labelHeight&&(e3[n2].itemHeight=a2.labelHeight),e3[n2]===e3[s2-1]||a2.y!==r2.y){for(i3.push({height:0}),o2=i3[i3.length-1];l2<=n2;l2++)e3[l2].itemHeight>o2.height&&(o2.height=e3[l2].itemHeight);o2.step=n2}return i3}function g(t3){let i3=this.bubbleLegend,s2=this.options,o2=s2.bubbleLegend,a2=c(this.chart);i3&&i3.ranges&&i3.ranges.length&&(o2.ranges.length&&(o2.autoRanges=!!o2.ranges[0].autoRanges),this.destroyItem(i3)),a2>=0&&s2.enabled&&o2.enabled&&(o2.seriesIndex=a2,this.bubbleLegend=new e2(o2,this),this.bubbleLegend.addToLegend(t3.allItems))}function f(t3){let e3;if(t3.defaultPrevented)return false;let i3=t3.legendItem,s2=this.chart,o2=i3.visible;this&&this.bubbleLegend&&(i3.visible=!o2,i3.ignoreSeries=o2,e3=c(s2)>=0,this.bubbleLegend.visible!==e3&&(this.update({bubbleLegend:{enabled:e3}}),this.bubbleLegend.visible=e3),i3.visible=o2)}function b(t3,e3){let i3=t3.allItems,s2=t3.options.rtl,o2,a2,r2,n2,l2=0;i3.forEach(((t4,i4)=>{(n2=t4.legendItem||{}).group&&(o2=n2.group.translateX||0,a2=n2.y||0,((r2=t4.movementX)||s2&&t4.ranges)&&(r2=s2?o2-t4.options.maxSize/2:o2+r2,n2.group.attr({translateX:r2})),i4>e3[l2].step&&l2++,n2.group.attr({translateY:Math.round(a2+e3[l2].height/2)}),n2.y=a2+e3[l2].height/2)}))}return{compose:function(e3,i3){h(r,"Series.BubbleLegend")&&(a({legend:{bubbleLegend:t2}}),p(e3.prototype,"drawChartBox",d),n(i3,"afterGetAllItems",g),n(i3,"itemClick",f))}}})),i(e,"Series/Bubble/BubblePoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{seriesTypes:{scatter:{prototype:{pointClass:s}}}}=e2,{extend:o}=i2;class a extends s{haloPath(e3){let i3=(e3&&this.marker&&this.marker.radius||0)+e3;if(this.series.chart.inverted){let t3=this.pos()||[0,0],{xAxis:e4,yAxis:s2,chart:o2}=this.series;return o2.renderer.symbols.circle(e4.len-t3[1]-i3,s2.len-t3[0]-i3,2*i3,2*i3)}return t2.prototype.haloPath.call(this,i3)}}return o(a.prototype,{ttBelow:false}),a})),i(e,"Series/Bubble/BubbleSeries.js",[e["Series/Bubble/BubbleLegendComposition.js"],e["Series/Bubble/BubblePoint.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,o,a){let{parse:r}=i2,{composed:n,noop:l}=s,{series:h,seriesTypes:{column:{prototype:p},scatter:d}}=o,{addEvent:c,arrayMax:u,arrayMin:g,clamp:f,extend:b,isNumber:m,merge:y,pick:x,pushUnique:P}=a;function S(){let t3=this.len,{coll:e3,isXAxis:i3,min:s2}=this,o2=i3?"xData":"yData",a2=(this.max||0)-(s2||0),r2=0,n2=t3,l2=t3/a2,h2;("xAxis"===e3||"yAxis"===e3)&&(this.series.forEach((t4=>{if(t4.bubblePadding&&t4.reserveSpace()){this.allowZoomOutside=true,h2=true;let e4=t4[o2];if(i3&&((t4.onPoint||t4).getRadii(0,0,t4),t4.onPoint&&(t4.radii=t4.onPoint.radii)),a2>0){let i4=e4.length;for(;i4--;)if(m(e4[i4])&&this.dataMin<=e4[i4]&&e4[i4]<=this.max){let o3=t4.radii&&t4.radii[i4]||0;r2=Math.min((e4[i4]-s2)*l2-o3,r2),n2=Math.max((e4[i4]-s2)*l2+o3,n2)}}}})),h2&&a2>0&&!this.logarithmic&&(n2-=t3,l2*=(t3+Math.max(0,r2)-Math.min(n2,t3))/t3,[["min","userMin",r2],["max","userMax",n2]].forEach((t4=>{void 0===x(this.options[t4[0]],this[t4[1]])&&(this[t4[0]]+=t4[2]/l2)}))))}class M extends d{static compose(e3,i3,s2){t2.compose(i3,s2),P(n,"Series.Bubble")&&c(e3,"foundExtremes",S)}animate(t3){!t3&&this.points.length<this.options.animationLimit&&this.points.forEach((function(t4){let{graphic:e3,plotX:i3=0,plotY:s2=0}=t4;e3&&e3.width&&(this.hasRendered||e3.attr({x:i3,y:s2,width:1,height:1}),e3.animate(this.markerAttribs(t4),this.options.animation))}),this)}getRadii(){let t3=this.zData,e3=this.yData,i3=[],s2,o2,a2,r2=this.chart.bubbleZExtremes,{minPxSize:n2,maxPxSize:l2}=this.getPxExtremes();if(!r2){let t4,e4=Number.MAX_VALUE,i4=-Number.MAX_VALUE;this.chart.series.forEach((s3=>{if(s3.bubblePadding&&s3.reserveSpace()){let o3=(s3.onPoint||s3).getZExtremes();o3&&(e4=Math.min(x(e4,o3.zMin),o3.zMin),i4=Math.max(x(i4,o3.zMax),o3.zMax),t4=true)}})),t4?(r2={zMin:e4,zMax:i4},this.chart.bubbleZExtremes=r2):r2={zMin:0,zMax:0}}for(o2=0,s2=t3.length;o2<s2;o2++)a2=t3[o2],i3.push(this.getRadius(r2.zMin,r2.zMax,n2,l2,a2,e3&&e3[o2]));this.radii=i3}getRadius(t3,e3,i3,s2,o2,a2){let r2=this.options,n2="width"!==r2.sizeBy,l2=r2.zThreshold,h2=e3-t3,p2=.5;if(null===a2||null===o2)return null;if(m(o2)){if(r2.sizeByAbsoluteValue&&(o2=Math.abs(o2-l2),e3=h2=Math.max(e3-l2,Math.abs(t3-l2)),t3=0),o2<t3)return i3/2-1;h2>0&&(p2=(o2-t3)/h2)}return n2&&p2>=0&&(p2=Math.sqrt(p2)),Math.ceil(i3+p2*(s2-i3))/2}hasData(){return!!this.processedXData.length}markerAttribs(t3,e3){let i3=super.markerAttribs(t3,e3),{height:s2=0,width:o2=0}=i3;return this.chart.inverted?b(i3,{x:(t3.plotX||0)-o2/2,y:(t3.plotY||0)-s2/2}):i3}pointAttribs(t3,e3){let i3=this.options.marker.fillOpacity,s2=h.prototype.pointAttribs.call(this,t3,e3);return 1!==i3&&(s2.fill=r(s2.fill).setOpacity(i3).get("rgba")),s2}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:t3,options:e3,radii:i3}=this,{minPxSize:s2}=this.getPxExtremes(),o2=t3.length;for(;o2--;){let a2=t3[o2],r2=i3?i3[o2]:0;"z"===this.zoneAxis&&(a2.negative=(a2.z||0)<(e3.zThreshold||0)),m(r2)&&r2>=s2/2?(a2.marker=b(a2.marker,{radius:r2,width:2*r2,height:2*r2}),a2.dlBox={x:a2.plotX-r2,y:a2.plotY-r2,width:2*r2,height:2*r2}):(a2.shapeArgs=a2.plotY=a2.dlBox=void 0,a2.isInside=false)}}getPxExtremes(){let t3=Math.min(this.chart.plotWidth,this.chart.plotHeight),e3=e4=>{let i4;return"string"==typeof e4&&(i4=/%$/.test(e4),e4=parseInt(e4,10)),i4?t3*e4/100:e4},i3=e3(x(this.options.minSize,8)),s2=Math.max(e3(x(this.options.maxSize,"20%")),i3);return{minPxSize:i3,maxPxSize:s2}}getZExtremes(){let t3=this.options,e3=(this.zData||[]).filter(m);if(e3.length){let i3=x(t3.zMin,f(g(e3),false===t3.displayNegative?t3.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),s2=x(t3.zMax,u(e3));if(m(i3)&&m(s2))return{zMin:i3,zMax:s2}}}}return M.defaultOptions=y(d.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:t3}=this.series.chart,{z:e3}=this.point;return m(e3)?t3(e3,-1):""},inside:true,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:false,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),b(M.prototype,{alignDataLabel:p.alignDataLabel,applyZones:l,bubblePadding:true,isBubble:true,pointArrayMap:["y","z"],pointClass:e2,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),c(M,"updatedData",(t3=>{delete t3.target.chart.bubbleZExtremes})),c(M,"remove",(t3=>{delete t3.target.chart.bubbleZExtremes})),o.registerSeriesType("bubble",M),M})),i(e,"Series/ColumnRange/ColumnRangePoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2){let{seriesTypes:{column:{prototype:{pointClass:{prototype:i2}}},arearange:{prototype:{pointClass:s}}}}=t2,{extend:o,isNumber:a}=e2;class r extends s{isValid(){return a(this.low)}}return o(r.prototype,{setState:i2.setState}),r})),i(e,"Series/ColumnRange/ColumnRangeSeries.js",[e["Series/ColumnRange/ColumnRangePoint.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{noop:o}=e2,{seriesTypes:{arearange:a,column:r,column:{prototype:n}}}=i2,{addEvent:l,clamp:h,extend:p,isNumber:d,merge:c,pick:u}=s;class g extends a{setOptions(){return c(true,arguments[0],{stacking:void 0}),a.prototype.setOptions.apply(this,arguments)}translate(){return n.translate.apply(this)}pointAttribs(){return n.pointAttribs.apply(this,arguments)}translate3dPoints(){return n.translate3dPoints.apply(this,arguments)}translate3dShapes(){return n.translate3dShapes.apply(this,arguments)}afterColumnTranslate(){let t3,e3,i3,s2;let o2=this.yAxis,a2=this.xAxis,r2=a2.startAngleRad,n2=this.chart,l2=this.xAxis.isRadial,p2=Math.max(n2.chartWidth,n2.chartHeight)+999;this.points.forEach((g2=>{let f=g2.shapeArgs||{},b=this.options.minPointLength,m=g2.plotY,y=o2.translate(g2.high,0,1,0,1);if(d(y)&&d(m)){if(g2.plotHigh=h(y,-p2,p2),g2.plotLow=h(m,-p2,p2),s2=g2.plotHigh,Math.abs(t3=u(g2.rectPlotY,g2.plotY)-g2.plotHigh)<b?(e3=b-t3,t3+=e3,s2-=e3/2):t3<0&&(t3*=-1,s2-=t3),l2&&this.polar)i3=g2.barX+r2,g2.shapeType="arc",g2.shapeArgs=this.polar.arc(s2+t3,s2,i3,i3+g2.pointWidth);else{f.height=t3,f.y=s2;let{x:e4=0,width:i4=0}=f;g2.shapeArgs=c(g2.shapeArgs,this.crispCol(e4,s2,i4,t3)),g2.tooltipPos=n2.inverted?[o2.len+o2.pos-n2.plotLeft-s2-t3/2,a2.len+a2.pos-n2.plotTop-e4-i4/2,t3]:[a2.left-n2.plotLeft+e4+i4/2,o2.pos-n2.plotTop+s2+t3/2,t3]}}}))}}return g.defaultOptions=c(r.defaultOptions,a.defaultOptions,{borderRadius:{where:"all"},pointRange:null,legendSymbol:"rectangle",marker:null,states:{hover:{halo:false}}}),l(g,"afterColumnTranslate",(function(){g.prototype.afterColumnTranslate.apply(this)}),{order:5}),p(g.prototype,{directTouch:true,pointClass:t2,trackerGroups:["group","dataLabelsGroup"],adjustForMissingColumns:n.adjustForMissingColumns,animate:n.animate,crispCol:n.crispCol,drawGraph:o,drawPoints:n.drawPoints,getSymbol:o,drawTracker:n.drawTracker,getColumnMetrics:n.getColumnMetrics}),i2.registerSeriesType("columnrange",g),g})),i(e,"Series/ColumnPyramid/ColumnPyramidSeriesDefaults.js",[],(function(){return{}})),i(e,"Series/ColumnPyramid/ColumnPyramidSeries.js",[e["Series/ColumnPyramid/ColumnPyramidSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{column:s}=e2.seriesTypes,{clamp:o,merge:a,pick:r}=i2;class n extends s{translate(){let t3=this.chart,e3=this.options,i3=this.dense=this.closestPointRange*this.xAxis.transA<2,s2=this.borderWidth=r(e3.borderWidth,i3?0:1),a2=this.yAxis,n2=e3.threshold,l=r(e3.minPointLength,5),h=this.getColumnMetrics(),p=h.width,d=this.pointXOffset=h.offset,c=this.translatedThreshold=a2.getThreshold(n2),u=this.barW=Math.max(p,1+2*s2);for(let i4 of(t3.inverted&&(c-=.5),e3.pointPadding&&(u=Math.ceil(u)),super.translate(),this.points)){let s3=r(i4.yBottom,c),g=999+Math.abs(s3),f=o(i4.plotY,-g,a2.len+g),b=u/2,m=Math.min(f,s3),y=Math.max(f,s3)-m,x=i4.plotX+d,P,S,M,L,C,k,v,A,w2,T,N;e3.centerInCategory&&(x=this.adjustForMissingColumns(x,p,i4,h)),i4.barX=x,i4.pointWidth=p,i4.tooltipPos=t3.inverted?[a2.len+a2.pos-t3.plotLeft-f,this.xAxis.len-x-b,y]:[x+b,f+a2.pos-t3.plotTop,y],P=n2+(i4.total||i4.y),"percent"===e3.stacking&&(P=n2+(i4.y<0)?-100:100);let X=a2.toPixels(P,true);M=(S=t3.plotHeight-X-(t3.plotHeight-c))?b*(m-X)/S:0,L=S?b*(m+y-X)/S:0,k=x-M+b,v=x+M+b,A=x+L+b,w2=x-L+b,T=m-l,N=m+y,i4.y<0&&(T=m,N=m+y+l),t3.inverted&&(C=a2.width-m,S=X-(a2.width-c),M=b*(X-C)/S,L=b*(X-(C-y))/S,v=(k=x+b+M)-2*M,A=x-L+b,w2=x+L+b,T=m,N=m+y-l,i4.y<0&&(N=m+y+l)),i4.shapeType="path",i4.shapeArgs={x:k,y:T,width:v-k,height:y,d:[["M",k,T],["L",v,T],["L",A,N],["L",w2,N],["Z"]]}}}}return n.defaultOptions=a(s.defaultOptions,t2),e2.registerSeriesType("columnpyramid",n),n})),i(e,"Series/ErrorBar/ErrorBarSeriesDefaults.js",[],(function(){return{color:"#000000",grouping:false,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},whiskerWidth:null}})),i(e,"Series/ErrorBar/ErrorBarSeries.js",[e["Series/BoxPlot/BoxPlotSeries.js"],e["Series/Column/ColumnSeries.js"],e["Series/ErrorBar/ErrorBarSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,o){let{arearange:a}=s.seriesTypes,{addEvent:r,merge:n,extend:l}=o;class h extends t2{getColumnMetrics(){return this.linkedParent&&this.linkedParent.columnMetrics||e2.prototype.getColumnMetrics.call(this)}drawDataLabels(){let t3=this.pointValKey;if(a)for(let e3 of(a.prototype.drawDataLabels.call(this),this.points))e3.y=e3[t3]}toYData(t3){return[t3.low,t3.high]}}return h.defaultOptions=n(t2.defaultOptions,i2),r(h,"afterTranslate",(function(){for(let t3 of this.points)t3.plotLow=t3.plotY}),{order:0}),l(h.prototype,{pointArrayMap:["low","high"],pointValKey:"high",doQuartiles:false}),s.registerSeriesType("errorbar",h),h})),i(e,"Series/Gauge/GaugePoint.js",[e["Core/Series/SeriesRegistry.js"]],(function(t2){let{series:{prototype:{pointClass:e2}}}=t2;return class extends e2{setState(t3){this.state=t3}}})),i(e,"Series/Gauge/GaugeSeries.js",[e["Series/Gauge/GaugePoint.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{noop:o}=e2,{series:a,seriesTypes:{column:r}}=i2,{clamp:n,isNumber:l,extend:h,merge:p,pick:d,pInt:c,defined:u}=s;class g extends a{translate(){let t3=this.yAxis,e3=this.options,i3=t3.center;this.generatePoints(),this.points.forEach((s2=>{let o2=p(e3.dial,s2.dial),a2=c(o2.radius)*i3[2]/200,r2=c(o2.baseLength)*a2/100,h2=c(o2.rearLength)*a2/100,d2=o2.baseWidth,g2=o2.topWidth,f=e3.overshoot,b=t3.startAngleRad+t3.translate(s2.y,void 0,void 0,void 0,true);(l(f)||false===e3.wrap)&&(f=l(f)?f/180*Math.PI:0,b=n(b,t3.startAngleRad-f,t3.endAngleRad+f)),b=180*b/Math.PI,s2.shapeType="path";let m=o2.path||[["M",-h2,-d2/2],["L",r2,-d2/2],["L",a2,-g2/2],["L",a2,g2/2],["L",r2,d2/2],["L",-h2,d2/2],["Z"]];s2.shapeArgs={d:m,translateX:i3[0],translateY:i3[1],rotation:b},s2.plotX=i3[0],s2.plotY=i3[1],u(s2.y)&&t3.max-t3.min&&(s2.percentage=(s2.y-t3.min)/(t3.max-t3.min)*100)}))}drawPoints(){let t3=this,e3=t3.chart,i3=t3.yAxis.center,s2=t3.pivot,o2=t3.options,a2=o2.pivot,r2=e3.renderer;t3.points.forEach((i4=>{let s3=i4.graphic,a3=i4.shapeArgs,n2=a3.d,l2=p(o2.dial,i4.dial);s3?(s3.animate(a3),a3.d=n2):i4.graphic=r2[i4.shapeType](a3).addClass("highcharts-dial").add(t3.group),e3.styledMode||i4.graphic[s3?"animate":"attr"]({stroke:l2.borderColor,"stroke-width":l2.borderWidth,fill:l2.backgroundColor})})),s2?s2.animate({translateX:i3[0],translateY:i3[1]}):a2&&(t3.pivot=r2.circle(0,0,a2.radius).attr({zIndex:2}).addClass("highcharts-pivot").translate(i3[0],i3[1]).add(t3.group),e3.styledMode||t3.pivot.attr({fill:a2.backgroundColor,stroke:a2.borderColor,"stroke-width":a2.borderWidth}))}animate(t3){let e3=this;t3||e3.points.forEach((t4=>{let i3=t4.graphic;i3&&(i3.attr({rotation:180*e3.yAxis.startAngleRad/Math.PI}),i3.animate({rotation:t4.shapeArgs.rotation},e3.options.animation))}))}render(){this.group=this.plotGroup("group","series",this.visible?"inherit":"hidden",this.options.zIndex,this.chart.seriesGroup),a.prototype.render.call(this),this.group.clip(this.chart.clipRect)}setData(t3,e3){a.prototype.setData.call(this,t3,false),this.processData(),this.generatePoints(),d(e3,true)&&this.chart.redraw()}hasData(){return!!this.points.length}}return g.defaultOptions=p(a.defaultOptions,{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:false,defer:false,enabled:true,verticalAlign:"top",y:15,zIndex:2},dial:{backgroundColor:"#000000",baseLength:"70%",baseWidth:3,borderColor:"#cccccc",borderWidth:0,radius:"80%",rearLength:"10%",topWidth:1},pivot:{radius:5,borderWidth:0,borderColor:"#cccccc",backgroundColor:"#000000"},tooltip:{headerFormat:""},showInLegend:false}),h(g.prototype,{angular:true,directTouch:true,drawGraph:o,drawTracker:r.prototype.drawTracker,fixedBox:true,forceDL:true,noSharedTooltip:true,pointClass:t2,trackerGroups:["group","dataLabelsGroup"]}),i2.registerSeriesType("gauge",g),g})),i(e,"Series/DragNodesComposition.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2){let{composed:i2}=t2,{addEvent:s,pushUnique:o}=e2;function a(){let t3,e3,i3;let o2=this;o2.container&&(t3=s(o2.container,"mousedown",(t4=>{let a2=o2.hoverPoint;a2&&a2.series&&a2.series.hasDraggableNodes&&a2.series.options.draggable&&(a2.series.onMouseDown(a2,t4),e3=s(o2.container,"mousemove",(t5=>a2&&a2.series&&a2.series.onMouseMove(a2,t5))),i3=s(o2.container.ownerDocument,"mouseup",(t5=>(e3(),i3(),a2&&a2.series&&a2.series.onMouseUp(a2,t5)))))}))),s(o2,"destroy",(function(){t3()}))}return{compose:function(t3){o(i2,"DragNodes")&&s(t3,"load",a)},onMouseDown:function(t3,e3){var _a;let i3=((_a=this.chart.pointer)==null?void 0:_a.normalize(e3))||e3;t3.fixedPosition={chartX:i3.chartX,chartY:i3.chartY,plotX:t3.plotX,plotY:t3.plotY},t3.inDragMode=true},onMouseMove:function(t3,e3){var _a;if(t3.fixedPosition&&t3.inDragMode){let i3,s2;let o2=this.chart,a2=((_a=o2.pointer)==null?void 0:_a.normalize(e3))||e3,r=t3.fixedPosition.chartX-a2.chartX,n=t3.fixedPosition.chartY-a2.chartY,l=o2.graphLayoutsLookup;(Math.abs(r)>5||Math.abs(n)>5)&&(i3=t3.fixedPosition.plotX-r,s2=t3.fixedPosition.plotY-n,o2.isInsidePlot(i3,s2)&&(t3.plotX=i3,t3.plotY=s2,t3.hasDragged=true,this.redrawHalo(t3),l.forEach((t4=>{t4.restartSimulation()}))))}},onMouseUp:function(t3){t3.fixedPosition&&(t3.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),t3.inDragMode=t3.hasDragged=false,this.options.fixedDraggable||delete t3.fixedPosition)},redrawHalo:function(t3){t3&&this.halo&&this.halo.attr({d:t3.haloPath(this.options.states.hover.halo.size)})}}})),i(e,"Series/GraphLayoutComposition.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{setAnimation:s}=t2,{composed:o}=e2,{addEvent:a,pushUnique:r}=i2;function n(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach((t3=>{t3.updateSimulation()})),this.redraw())}function l(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach((t3=>{t3.updateSimulation(false)})),this.redraw())}function h(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach((t3=>{t3.stop()}))}function p(){let t3,e3=false,i3=i4=>{i4.maxIterations--&&isFinite(i4.temperature)&&!i4.isStable()&&!i4.enableSimulation&&(i4.beforeStep&&i4.beforeStep(),i4.step(),t3=false,e3=true)};if(this.graphLayoutsLookup){for(s(false,this),this.graphLayoutsLookup.forEach((t4=>t4.start()));!t3;)t3=true,this.graphLayoutsLookup.forEach(i3);e3&&this.series.forEach((t4=>{t4&&t4.layout&&t4.render()}))}}return{compose:function(t3){r(o,"GraphLayout")&&(a(t3,"afterPrint",n),a(t3,"beforePrint",l),a(t3,"predraw",h),a(t3,"render",p))},integrations:{},layouts:{}}})),i(e,"Series/PackedBubble/PackedBubblePoint.js",[e["Core/Chart/Chart.js"],e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"]],(function(t2,e2,i2){let{seriesTypes:{bubble:{prototype:{pointClass:s}}}}=i2;return class extends s{destroy(){var _a;return((_a=this.series)==null?void 0:_a.layout)&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes),e2.prototype.destroy.apply(this,arguments)}firePointEvent(){let t3=this.series.options;if(this.isParentNode&&t3.parentNode){let i3=t3.allowPointSelect;t3.allowPointSelect=t3.parentNode.allowPointSelect,e2.prototype.firePointEvent.apply(this,arguments),t3.allowPointSelect=i3}else e2.prototype.firePointEvent.apply(this,arguments)}select(){let i3=this.series.chart;this.isParentNode?(i3.getSelectedPoints=i3.getSelectedParentNodes,e2.prototype.select.apply(this,arguments),i3.getSelectedPoints=t2.prototype.getSelectedPoints):e2.prototype.select.apply(this,arguments)}}})),i(e,"Series/PackedBubble/PackedBubbleSeriesDefaults.js",[e["Core/Utilities.js"]],(function(t2){let{isNumber:e2}=t2;return{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",crisp:false,tooltip:{pointFormat:"Value: {point.value}"},draggable:true,useSimulation:true,parentNode:{allowPointSelect:false},dataLabels:{formatter:function(){let{numberFormatter:t3}=this.series.chart,{value:i2}=this.point;return e2(i2)?t3(i2,-1):""},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:true},padding:0,style:{transition:"opacity 2000ms"}},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,bubblePadding:5,parentNodeLimit:false,seriesInteraction:true,dragBetweenSeries:false,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50,initialPositionRadius:100,seriesInteraction:true,marker:{fillColor:null,fillOpacity:1,lineWidth:null,lineColor:null,symbol:"circle"}},enableSimulation:true,type:"packedbubble",integration:"packedbubble",maxIterations:1e3,splitSeries:false,maxSpeed:5,gravitationalConstant:.01,friction:-.981}}})),i(e,"Series/Networkgraph/VerletIntegration.js",[],(function(){return{attractive:function(t2,e2,i2){let s=t2.getMass(),o=-i2.x*e2*this.diffTemperature,a=-i2.y*e2*this.diffTemperature;t2.fromNode.fixedPosition||(t2.fromNode.plotX-=o*s.fromNode/t2.fromNode.degree,t2.fromNode.plotY-=a*s.fromNode/t2.fromNode.degree),t2.toNode.fixedPosition||(t2.toNode.plotX+=o*s.toNode/t2.toNode.degree,t2.toNode.plotY+=a*s.toNode/t2.toNode.degree)},attractiveForceFunction:function(t2,e2){return(e2-t2)/t2},barycenter:function(){let t2=this.options.gravitationalConstant||0,e2=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*t2,i2=(this.barycenter.yFactor-(this.box.top+this.box.height)/2)*t2;this.nodes.forEach((function(t3){t3.fixedPosition||(t3.plotX-=e2/t3.mass/t3.degree,t3.plotY-=i2/t3.mass/t3.degree)}))},getK:function(t2){return Math.pow(t2.box.width*t2.box.height/t2.nodes.length,.5)},integrate:function(t2,e2){let i2=-t2.options.friction,s=t2.options.maxSpeed,o=e2.prevX,a=e2.prevY,r=(e2.plotX+e2.dispX-o)*i2,n=(e2.plotY+e2.dispY-a)*i2,l=Math.abs,h=l(r)/(r||1),p=l(n)/(n||1),d=h*Math.min(s,Math.abs(r)),c=p*Math.min(s,Math.abs(n));e2.prevX=e2.plotX+e2.dispX,e2.prevY=e2.plotY+e2.dispY,e2.plotX+=d,e2.plotY+=c,e2.temperature=t2.vectorLength({x:d,y:c})},repulsive:function(t2,e2,i2){let s=e2*this.diffTemperature/t2.mass/t2.degree;t2.fixedPosition||(t2.plotX+=i2.x*s,t2.plotY+=i2.y*s)},repulsiveForceFunction:function(t2,e2){return(e2-t2)/t2*(e2>t2?1:0)}}})),i(e,"Series/PackedBubble/PackedBubbleIntegration.js",[e["Core/Globals.js"],e["Series/Networkgraph/VerletIntegration.js"]],(function(t2,e2){let{noop:i2}=t2;return{barycenter:function(){let t3,e3;let i3=this.options.gravitationalConstant,s=this.box,o=this.nodes;for(let a of o)this.options.splitSeries&&!a.isParentNode?(t3=a.series.parentNode.plotX,e3=a.series.parentNode.plotY):(t3=s.width/2,e3=s.height/2),a.fixedPosition||(a.plotX-=(a.plotX-t3)*i3/(a.mass*Math.sqrt(o.length)),a.plotY-=(a.plotY-e3)*i3/(a.mass*Math.sqrt(o.length)))},getK:i2,integrate:e2.integrate,repulsive:function(t3,e3,i3,s){let o=e3*this.diffTemperature/t3.mass/t3.degree,a=i3.x*o,r=i3.y*o;t3.fixedPosition||(t3.plotX+=a,t3.plotY+=r),s.fixedPosition||(s.plotX-=a,s.plotY-=r)},repulsiveForceFunction:function(t3,e3,i3,s){return Math.min(t3,(i3.marker.radius+s.marker.radius)/2)}}})),i(e,"Series/Networkgraph/EulerIntegration.js",[],(function(){return{attractive:function(t2,e2,i2,s){let o=t2.getMass(),a=i2.x/s*e2,r=i2.y/s*e2;t2.fromNode.fixedPosition||(t2.fromNode.dispX-=a*o.fromNode/t2.fromNode.degree,t2.fromNode.dispY-=r*o.fromNode/t2.fromNode.degree),t2.toNode.fixedPosition||(t2.toNode.dispX+=a*o.toNode/t2.toNode.degree,t2.toNode.dispY+=r*o.toNode/t2.toNode.degree)},attractiveForceFunction:function(t2,e2){return t2*t2/e2},barycenter:function(){let t2=this.options.gravitationalConstant,e2=this.barycenter.xFactor,i2=this.barycenter.yFactor;this.nodes.forEach((function(s){if(!s.fixedPosition){let o=s.getDegree(),a=o*(1+o/2);s.dispX+=(e2-s.plotX)*t2*a/s.degree,s.dispY+=(i2-s.plotY)*t2*a/s.degree}}))},getK:function(t2){return Math.pow(t2.box.width*t2.box.height/t2.nodes.length,.3)},integrate:function(t2,e2){e2.dispX+=e2.dispX*t2.options.friction,e2.dispY+=e2.dispY*t2.options.friction;let i2=e2.temperature=t2.vectorLength({x:e2.dispX,y:e2.dispY});0!==i2&&(e2.plotX+=e2.dispX/i2*Math.min(Math.abs(e2.dispX),t2.temperature),e2.plotY+=e2.dispY/i2*Math.min(Math.abs(e2.dispY),t2.temperature))},repulsive:function(t2,e2,i2,s){t2.dispX+=i2.x/s*e2/t2.degree,t2.dispY+=i2.y/s*e2/t2.degree},repulsiveForceFunction:function(t2,e2){return e2*e2/t2}}})),i(e,"Series/Networkgraph/QuadTreeNode.js",[],(function(){class t2{constructor(t3){this.body=false,this.isEmpty=false,this.isInternal=false,this.nodes=[],this.box=t3,this.boxSize=Math.min(t3.width,t3.height)}divideBox(){let e2=this.box.width/2,i2=this.box.height/2;this.nodes[0]=new t2({left:this.box.left,top:this.box.top,width:e2,height:i2}),this.nodes[1]=new t2({left:this.box.left+e2,top:this.box.top,width:e2,height:i2}),this.nodes[2]=new t2({left:this.box.left+e2,top:this.box.top+i2,width:e2,height:i2}),this.nodes[3]=new t2({left:this.box.left,top:this.box.top+i2,width:e2,height:i2})}getBoxPosition(t3){let e2=t3.plotX<this.box.left+this.box.width/2,i2=t3.plotY<this.box.top+this.box.height/2;return e2?i2?0:3:i2?1:2}insert(e2,i2){let s;this.isInternal?this.nodes[this.getBoxPosition(e2)].insert(e2,i2-1):(this.isEmpty=false,this.body?i2?(this.isInternal=true,this.divideBox(),true!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,i2-1),this.body=true),this.nodes[this.getBoxPosition(e2)].insert(e2,i2-1)):((s=new t2({top:e2.plotX||NaN,left:e2.plotY||NaN,width:.1,height:.1})).body=e2,s.isInternal=false,this.nodes.push(s)):(this.isInternal=false,this.body=e2))}updateMassAndCenter(){let t3=0,e2=0,i2=0;if(this.isInternal){for(let s of this.nodes)s.isEmpty||(t3+=s.mass,e2+=s.plotX*s.mass,i2+=s.plotY*s.mass);e2/=t3,i2/=t3}else this.body&&(t3=this.body.mass,e2=this.body.plotX,i2=this.body.plotY);this.mass=t3,this.plotX=e2,this.plotY=i2}}return t2})),i(e,"Series/Networkgraph/QuadTree.js",[e["Series/Networkgraph/QuadTreeNode.js"]],(function(t2){return class{constructor(e2,i2,s,o){this.box={left:e2,top:i2,width:s,height:o},this.maxDepth=25,this.root=new t2(this.box),this.root.isInternal=true,this.root.isRoot=true,this.root.divideBox()}calculateMassAndCenter(){this.visitNodeRecursive(null,null,(function(t3){t3.updateMassAndCenter()}))}insertNodes(t3){for(let e2 of t3)this.root.insert(e2,this.maxDepth)}visitNodeRecursive(t3,e2,i2){let s;if(t3||(t3=this.root),t3===this.root&&e2&&(s=e2(t3)),false!==s){for(let o of t3.nodes){if(o.isInternal){if(e2&&(s=e2(o)),false===s)continue;this.visitNodeRecursive(o,e2,i2)}else o.body&&e2&&e2(o.body);i2&&i2(o)}t3===this.root&&i2&&i2(t3)}}}})),i(e,"Series/Networkgraph/ReingoldFruchtermanLayout.js",[e["Series/Networkgraph/EulerIntegration.js"],e["Core/Globals.js"],e["Series/GraphLayoutComposition.js"],e["Series/Networkgraph/QuadTree.js"],e["Core/Utilities.js"],e["Series/Networkgraph/VerletIntegration.js"]],(function(t2,e2,i2,s,o,a){let{win:r}=e2,{clamp:n,defined:l,isFunction:h,fireEvent:p,pick:d}=o;class c{constructor(){this.box={},this.currentStep=0,this.initialRendering=true,this.links=[],this.nodes=[],this.series=[],this.simulation=false}static compose(e3){i2.compose(e3),i2.integrations.euler=t2,i2.integrations.verlet=a,i2.layouts["reingold-fruchterman"]=c}init(t3){this.options=t3,this.nodes=[],this.links=[],this.series=[],this.box={x:0,y:0,width:0,height:0},this.setInitialRendering(true),this.integration=i2.integrations[t3.integration],this.enableSimulation=t3.enableSimulation,this.attractiveForce=d(t3.attractiveForce,this.integration.attractiveForceFunction),this.repulsiveForce=d(t3.repulsiveForce,this.integration.repulsiveForceFunction),this.approximation=t3.approximation}updateSimulation(t3){this.enableSimulation=d(t3,this.options.enableSimulation)}start(){let t3=this.series,e3=this.options;this.currentStep=0,this.forces=t3[0]&&t3[0].forces||[],this.chart=t3[0]&&t3[0].chart,this.initialRendering&&(this.initPositions(),t3.forEach((function(t4){t4.finishedAnimating=true,t4.render()}))),this.setK(),this.resetSimulation(e3),this.enableSimulation&&this.step()}step(){let t3=this.series;for(let t4 of(this.currentStep++,"barnes-hut"===this.approximation&&(this.createQuadTree(),this.quadTree.calculateMassAndCenter()),this.forces||[]))this[t4+"Forces"](this.temperature);if(this.applyLimits(),this.temperature=this.coolDown(this.startTemperature,this.diffTemperature,this.currentStep),this.prevSystemTemperature=this.systemTemperature,this.systemTemperature=this.getSystemTemperature(),this.enableSimulation){for(let e3 of t3)e3.chart&&e3.render();this.maxIterations--&&isFinite(this.temperature)&&!this.isStable()?(this.simulation&&r.cancelAnimationFrame(this.simulation),this.simulation=r.requestAnimationFrame((()=>this.step()))):(this.simulation=false,this.series.forEach((t4=>{p(t4,"afterSimulation")})))}}stop(){this.simulation&&r.cancelAnimationFrame(this.simulation)}setArea(t3,e3,i3,s2){this.box={left:t3,top:e3,width:i3,height:s2}}setK(){this.k=this.options.linkLength||this.integration.getK(this)}addElementsToCollection(t3,e3){for(let i3 of t3)-1===e3.indexOf(i3)&&e3.push(i3)}removeElementFromCollection(t3,e3){let i3=e3.indexOf(t3);-1!==i3&&e3.splice(i3,1)}clear(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()}resetSimulation(){this.forcedStop=false,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()}restartSimulation(){this.simulation?this.resetSimulation():(this.setInitialRendering(false),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(true))}setMaxIterations(t3){this.maxIterations=d(t3,this.options.maxIterations)}setTemperature(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)}setDiffTemperature(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)}setInitialRendering(t3){this.initialRendering=t3}createQuadTree(){this.quadTree=new s(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)}initPositions(){let t3=this.options.initialPositions;if(h(t3))for(let e3 of(t3.call(this),this.nodes))l(e3.prevX)||(e3.prevX=e3.plotX),l(e3.prevY)||(e3.prevY=e3.plotY),e3.dispX=0,e3.dispY=0;else"circle"===t3?this.setCircularPositions():this.setRandomPositions()}setCircularPositions(){let t3;let e3=this.box,i3=this.nodes,s2=2*Math.PI/(i3.length+1),o2=i3.filter((function(t4){return 0===t4.linksTo.length})),a2={},r2=this.options.initialPositionRadius,n2=t4=>{for(let e4 of t4.linksFrom||[])a2[e4.toNode.id]||(a2[e4.toNode.id]=true,l2.push(e4.toNode),n2(e4.toNode))},l2=[];for(let t4 of o2)l2.push(t4),n2(t4);if(l2.length)for(let t4 of i3)-1===l2.indexOf(t4)&&l2.push(t4);else l2=i3;for(let i4=0,o3=l2.length;i4<o3;++i4)(t3=l2[i4]).plotX=t3.prevX=d(t3.plotX,e3.width/2+r2*Math.cos(i4*s2)),t3.plotY=t3.prevY=d(t3.plotY,e3.height/2+r2*Math.sin(i4*s2)),t3.dispX=0,t3.dispY=0}setRandomPositions(){let t3;let e3=this.box,i3=this.nodes,s2=i3.length+1,o2=t4=>{let e4=t4*t4/Math.PI;return e4-Math.floor(e4)};for(let a2=0,r2=i3.length;a2<r2;++a2)(t3=i3[a2]).plotX=t3.prevX=d(t3.plotX,e3.width*o2(a2)),t3.plotY=t3.prevY=d(t3.plotY,e3.height*o2(s2+a2)),t3.dispX=0,t3.dispY=0}force(t3,...e3){this.integration[t3].apply(this,e3)}barycenterForces(){this.getBarycenter(),this.force("barycenter")}getBarycenter(){let t3=0,e3=0,i3=0;for(let s2 of this.nodes)e3+=s2.plotX*s2.mass,i3+=s2.plotY*s2.mass,t3+=s2.mass;return this.barycenter={x:e3,y:i3,xFactor:e3/t3,yFactor:i3/t3},this.barycenter}barnesHutApproximation(t3,e3){let i3,s2;let o2=this.getDistXY(t3,e3),a2=this.vectorLength(o2);return t3!==e3&&0!==a2&&(e3.isInternal?e3.boxSize/a2<this.options.theta&&0!==a2?(s2=this.repulsiveForce(a2,this.k),this.force("repulsive",t3,s2*e3.mass,o2,a2),i3=false):i3=true:(s2=this.repulsiveForce(a2,this.k),this.force("repulsive",t3,s2*e3.mass,o2,a2))),i3}repulsiveForces(){if("barnes-hut"===this.approximation)for(let t3 of this.nodes)this.quadTree.visitNodeRecursive(null,(e3=>this.barnesHutApproximation(t3,e3)));else{let t3,e3,i3;for(let s2 of this.nodes)for(let o2 of this.nodes)s2===o2||s2.fixedPosition||(i3=this.getDistXY(s2,o2),0!==(e3=this.vectorLength(i3))&&(t3=this.repulsiveForce(e3,this.k),this.force("repulsive",s2,t3*o2.mass,i3,e3)))}}attractiveForces(){let t3,e3,i3;for(let s2 of this.links)s2.fromNode&&s2.toNode&&(t3=this.getDistXY(s2.fromNode,s2.toNode),0!==(e3=this.vectorLength(t3))&&(i3=this.attractiveForce(e3,this.k),this.force("attractive",s2,i3,t3,e3)))}applyLimits(){for(let t3 of this.nodes)t3.fixedPosition||(this.integration.integrate(this,t3),this.applyLimitBox(t3,this.box),t3.dispX=0,t3.dispY=0)}applyLimitBox(t3,e3){let i3=t3.radius;t3.plotX=n(t3.plotX,e3.left+i3,e3.width-i3),t3.plotY=n(t3.plotY,e3.top+i3,e3.height-i3)}coolDown(t3,e3,i3){return t3-e3*i3}isStable(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0}getSystemTemperature(){let t3=0;for(let e3 of this.nodes)t3+=e3.temperature;return t3}vectorLength(t3){return Math.sqrt(t3.x*t3.x+t3.y*t3.y)}getDistR(t3,e3){let i3=this.getDistXY(t3,e3);return this.vectorLength(i3)}getDistXY(t3,e3){let i3=t3.plotX-e3.plotX,s2=t3.plotY-e3.plotY;return{x:i3,y:s2,absX:Math.abs(i3),absY:Math.abs(s2)}}}return c})),i(e,"Series/PackedBubble/PackedBubbleLayout.js",[e["Series/GraphLayoutComposition.js"],e["Series/PackedBubble/PackedBubbleIntegration.js"],e["Series/Networkgraph/ReingoldFruchtermanLayout.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{addEvent:o,pick:a}=s;function r(){let t3=this.series,e3=[];return t3.forEach((t4=>{t4.parentNode&&t4.parentNode.selected&&e3.push(t4.parentNode)})),e3}function n(){this.allDataPoints&&delete this.allDataPoints}class l extends i2{constructor(){super(...arguments),this.index=NaN,this.nodes=[],this.series=[]}static compose(s2){i2.compose(s2),t2.integrations.packedbubble=e2,t2.layouts.packedbubble=l;let a2=s2.prototype;a2.getSelectedParentNodes||(o(s2,"beforeRedraw",n),a2.getSelectedParentNodes=r)}beforeStep(){this.options.marker&&this.series.forEach((t3=>{t3&&t3.calculateParentRadius()}))}isStable(){let t3=Math.abs(this.prevSystemTemperature-this.systemTemperature);return 1>Math.abs(10*this.systemTemperature/Math.sqrt(this.nodes.length))&&t3<1e-5||this.temperature<=0}setCircularPositions(){let t3=this.box,e3=this.nodes,i3=2*Math.PI/(e3.length+1),s2=this.options.initialPositionRadius,o2,r2,n2=0;for(let l2 of e3)this.options.splitSeries&&!l2.isParentNode?(o2=l2.series.parentNode.plotX,r2=l2.series.parentNode.plotY):(o2=t3.width/2,r2=t3.height/2),l2.plotX=l2.prevX=a(l2.plotX,o2+s2*Math.cos(l2.index||n2*i3)),l2.plotY=l2.prevY=a(l2.plotY,r2+s2*Math.sin(l2.index||n2*i3)),l2.dispX=0,l2.dispY=0,n2++}repulsiveForces(){let t3,e3,i3;let s2=this,o2=s2.options.bubblePadding,a2=s2.nodes;a2.forEach((r2=>{r2.degree=r2.mass,r2.neighbours=0,a2.forEach((a3=>{t3=0,r2!==a3&&!r2.fixedPosition&&(s2.options.seriesInteraction||r2.series===a3.series)&&(i3=s2.getDistXY(r2,a3),(e3=s2.vectorLength(i3)-(r2.marker.radius+a3.marker.radius+o2))<0&&(r2.degree+=.01,r2.neighbours++,t3=s2.repulsiveForce(-e3/Math.sqrt(r2.neighbours),s2.k,r2,a3)),s2.force("repulsive",r2,t3*a3.mass,i3,a3,e3))}))}))}applyLimitBox(t3,e3){let i3,s2;this.options.splitSeries&&!t3.isParentNode&&this.options.parentNodeLimit&&(i3=this.getDistXY(t3,t3.series.parentNode),(s2=t3.series.parentNodeRadius-t3.marker.radius-this.vectorLength(i3))<0&&s2>-2*t3.marker.radius&&(t3.plotX-=.01*i3.x,t3.plotY-=.01*i3.y)),super.applyLimitBox(t3,e3)}}return t2.layouts.packedbubble=l,l})),i(e,"Series/SimulationSeriesUtilities.js",[e["Core/Utilities.js"],e["Core/Animation/AnimationUtilities.js"]],(function(t2,e2){let{merge:i2,syncTimeout:s}=t2,{animObject:o}=e2;return{initDataLabels:function(){let t3=this.options.dataLabels;if(!this.dataLabelsGroup){let e3=this.initDataLabelsGroup();return!this.chart.styledMode&&(t3==null?void 0:t3.style)&&e3.css(t3.style),e3.attr({opacity:0}),this.visible&&e3.show(),e3}return this.dataLabelsGroup.attr(i2({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){var _a;let t3=this.options.dataLabels;(t3==null?void 0:t3.defer)&&((_a=this.options.layoutAlgorithm)==null?void 0:_a.enableSimulation)?s((()=>{this.deferDataLabels=false}),t3?o(t3.animation).defer:0):this.deferDataLabels=false}}})),i(e,"Extensions/TextPath.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2){let{deg2rad:i2}=t2,{addEvent:s,merge:o,uniqueKey:a,defined:r,extend:n}=e2;function l(t3,e3){e3=o(true,{enabled:true,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e3);let i3=this.renderer.url,l2=this.text||this,h2=l2.textPath,{attributes:p2,enabled:d}=e3;if(t3=t3||h2&&h2.path,h2&&h2.undo(),t3&&d){let e4=s(l2,"afterModifyTree",(e5=>{if(t3&&d){let s2=t3.attr("id");s2||t3.attr("id",s2=a());let o2={x:0,y:0};r(p2.dx)&&(o2.dx=p2.dx,delete p2.dx),r(p2.dy)&&(o2.dy=p2.dy,delete p2.dy),l2.attr(o2),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let h3=e5.nodes.slice(0);e5.nodes.length=0,e5.nodes[0]={tagName:"textPath",attributes:n(p2,{"text-anchor":p2.textAnchor,href:`${i3}#${s2}`}),children:h3}}}));l2.textPath={path:t3,undo:e4}}else l2.attr({dx:0,dy:0}),delete l2.textPath;return this.added&&(l2.textCache="",this.renderer.buildText(l2)),this}function h(t3){var _a;let e3=t3.bBox,s2=(_a=this.element)==null?void 0:_a.querySelector("textPath");if(s2){let t4=[],{b:o2,h:a2}=this.renderer.fontMetrics(this.element),r2=a2-o2,n2=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),l2=s2.innerHTML.replace(n2,"").split(/<tspan class="highcharts-br"[^>]*>/),h2=l2.length,p2=(t5,e4)=>{let{x:a3,y:n3}=e4,l3=(s2.getRotationOfChar(t5)-90)*i2,h3=Math.cos(l3),p3=Math.sin(l3);return[[a3-r2*h3,n3-r2*p3],[a3+o2*h3,n3+o2*p3]]};for(let e4=0,i3=0;i3<h2;i3++){let o3=l2[i3].length;for(let a3=0;a3<o3;a3+=5)try{let o4=e4+a3+i3,[r3,n3]=p2(o4,s2.getStartPositionOfChar(o4));0===a3?(t4.push(n3),t4.push(r3)):(0===i3&&t4.unshift(n3),i3===h2-1&&t4.push(r3))}catch(t5){break}e4+=o3-1;try{let o4=e4+i3,a3=s2.getEndPositionOfChar(o4),[r3,n3]=p2(o4,a3);t4.unshift(n3),t4.unshift(r3)}catch(t5){break}}t4.length&&t4.push(t4[0].slice()),e3.polygon=t4}return e3}function p(t3){var _a;let e3=t3.labelOptions,i3=t3.point,s2=e3[i3.formatPrefix+"TextPath"]||e3.textPath;s2&&!e3.useHTML&&(this.setTextPath(((_a=i3.getDataLabelPath)==null?void 0:_a.call(i3,this))||i3.graphic,s2),i3.dataLabelPath&&!s2.enabled&&(i3.dataLabelPath=i3.dataLabelPath.destroy()))}return{compose:function(t3){s(t3,"afterGetBBox",h),s(t3,"beforeAddingDataLabel",p);let e3=t3.prototype;e3.setTextPath||(e3.setTextPath=l)}}})),i(e,"Series/PackedBubble/PackedBubbleSeries.js",[e["Core/Color/Color.js"],e["Series/DragNodesComposition.js"],e["Series/GraphLayoutComposition.js"],e["Core/Globals.js"],e["Series/PackedBubble/PackedBubblePoint.js"],e["Series/PackedBubble/PackedBubbleSeriesDefaults.js"],e["Series/PackedBubble/PackedBubbleLayout.js"],e["Core/Series/SeriesRegistry.js"],e["Series/SimulationSeriesUtilities.js"],e["Core/Utilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Extensions/TextPath.js"]],(function(t2,e2,i2,s,o,a,r,n,l,h,p,d){let{parse:c}=t2,{noop:u}=s,{series:{prototype:g},seriesTypes:{bubble:f}}=n,{initDataLabels:b,initDataLabelsDefer:m}=l,{addEvent:y,clamp:x,defined:P,extend:S,fireEvent:M,isArray:L,isNumber:C,merge:k,pick:v}=h;d.compose(p);class A extends f{constructor(){super(...arguments),this.parentNodeMass=0,this.deferDataLabels=true}static compose(t3,i3,s2){f.compose(t3,i3,s2),e2.compose(i3),r.compose(i3)}accumulateAllPoints(){let t3;let e3=this.chart,i3=[];for(let s2 of e3.series)if(s2.is("packedbubble")&&s2.reserveSpace()){t3=s2.yData||[];for(let e4=0;e4<t3.length;e4++)i3.push([null,null,t3[e4],s2.index,e4,{id:e4,marker:{radius:0}}])}return i3}addLayout(){let t3=this.options.layoutAlgorithm=this.options.layoutAlgorithm||{},e3=t3.type||"packedbubble",s2=this.chart.options.chart,o2=this.chart.graphLayoutsStorage,a2=this.chart.graphLayoutsLookup,r2;o2||(this.chart.graphLayoutsStorage=o2={},this.chart.graphLayoutsLookup=a2=[]),(r2=o2[e3])||(t3.enableSimulation=P(s2.forExport)?!s2.forExport:t3.enableSimulation,o2[e3]=r2=new i2.layouts[e3],r2.init(t3),a2.splice(r2.index,0,r2)),this.layout=r2,this.points.forEach((t4=>{t4.mass=2,t4.degree=1,t4.collisionNmb=1})),r2.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),r2.addElementsToCollection([this],r2.series),r2.addElementsToCollection(this.points,r2.nodes)}addSeriesLayout(){let t3=this.options.layoutAlgorithm=this.options.layoutAlgorithm||{},e3=t3.type||"packedbubble",s2=this.chart.graphLayoutsStorage,o2=this.chart.graphLayoutsLookup,a2=k(t3,t3.parentNodeOptions,{enableSimulation:this.layout.options.enableSimulation}),r2=s2[e3+"-series"];r2||(s2[e3+"-series"]=r2=new i2.layouts[e3],r2.init(a2),o2.splice(r2.index,0,r2)),this.parentNodeLayout=r2,this.createParentNodes()}calculateParentRadius(){let t3=this.seriesBox();this.parentNodeRadius=x(Math.sqrt(2*this.parentNodeMass/Math.PI)+20,20,t3?Math.max(Math.sqrt(Math.pow(t3.width,2)+Math.pow(t3.height,2))/2+20,20):Math.sqrt(2*this.parentNodeMass/Math.PI)+20),this.parentNode&&(this.parentNode.marker.radius=this.parentNode.radius=this.parentNodeRadius)}calculateZExtremes(){let t3=this.chart.series,e3=this.options.zMin,i3=this.options.zMax,s2=1/0,o2=-1/0;return e3&&i3?[e3,i3]:(t3.forEach((t4=>{t4.yData.forEach((t5=>{P(t5)&&(t5>o2&&(o2=t5),t5<s2&&(s2=t5))}))})),[e3=v(e3,s2),i3=v(i3,o2)])}checkOverlap(t3,e3){let i3=t3[0]-e3[0],s2=t3[1]-e3[1];return Math.sqrt(i3*i3+s2*s2)-Math.abs(t3[2]+e3[2])<-.001}createParentNodes(){let t3=this.pointClass,e3=this.chart,i3=this.parentNodeLayout,s2=this.layout.options,o2,a2=this.parentNode,r2={radius:this.parentNodeRadius,lineColor:this.color,fillColor:c(this.color).brighten(.4).get()};s2.parentNodeOptions&&(r2=k(s2.parentNodeOptions.marker||{},r2)),this.parentNodeMass=0,this.points.forEach((t4=>{this.parentNodeMass+=Math.PI*Math.pow(t4.marker.radius,2)})),this.calculateParentRadius(),i3.nodes.forEach((t4=>{t4.seriesIndex===this.index&&(o2=true)})),i3.setArea(0,0,e3.plotWidth,e3.plotHeight),o2||(a2||(a2=new t3(this,{mass:this.parentNodeRadius/2,marker:r2,dataLabels:{inside:false},states:{normal:{marker:r2},hover:{marker:r2}},dataLabelOnNull:true,degree:this.parentNodeRadius,isParentNode:true,seriesIndex:this.index})),this.parentNode&&(a2.plotX=this.parentNode.plotX,a2.plotY=this.parentNode.plotY),this.parentNode=a2,i3.addElementsToCollection([this],i3.series),i3.addElementsToCollection([a2],i3.nodes))}deferLayout(){let t3=this.options.layoutAlgorithm;this.visible&&(this.addLayout(),t3.splitSeries&&this.addSeriesLayout())}destroy(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach((t3=>{t3.removeElementFromCollection(this,t3.series)}),this),this.parentNode&&this.parentNodeLayout&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy())),g.destroy.apply(this,arguments)}drawDataLabels(){!this.deferDataLabels&&(g.drawDataLabels.call(this,this.points),this.parentNode&&(this.parentNode.formatPrefix="parentNode",g.drawDataLabels.call(this,[this.parentNode])))}drawGraph(){var _a;if(!this.layout||!this.layout.options.splitSeries)return;let t3=this.chart,e3=this.layout.options.parentNodeOptions.marker,i3={fill:e3.fillColor||c(this.color).brighten(.4).get(),opacity:e3.fillOpacity,stroke:e3.lineColor||this.color,"stroke-width":v(e3.lineWidth,this.options.lineWidth)},s2={};this.parentNodesGroup=this.plotGroup("parentNodesGroup","parentNode",this.visible?"inherit":"hidden",.1,t3.seriesGroup),(_a=this.group)==null?void 0:_a.attr({zIndex:2}),this.calculateParentRadius(),this.parentNode&&P(this.parentNode.plotX)&&P(this.parentNode.plotY)&&P(this.parentNodeRadius)&&(s2=k({x:this.parentNode.plotX-this.parentNodeRadius,y:this.parentNode.plotY-this.parentNodeRadius,width:2*this.parentNodeRadius,height:2*this.parentNodeRadius},i3),this.parentNode.graphic||(this.graph=this.parentNode.graphic=t3.renderer.symbol(i3.symbol).add(this.parentNodesGroup)),this.parentNode.graphic.attr(s2))}drawTracker(){let t3;let e3=this.parentNode;super.drawTracker(),e3&&(t3=L(e3.dataLabels)?e3.dataLabels:e3.dataLabel?[e3.dataLabel]:[],e3.graphic&&(e3.graphic.element.point=e3),t3.forEach((t4=>{(t4.div||t4.element).point=e3})))}getPointRadius(){let t3,e3,i3,s2;let o2=this.chart,a2=o2.plotWidth,r2=o2.plotHeight,n2=this.options,l2=n2.useSimulation,h2=Math.min(a2,r2),p2={},d2=[],c2=o2.allDataPoints||[],u2=c2.length;["minSize","maxSize"].forEach((t4=>{let e4=parseInt(n2[t4],10),i4=/%$/.test(n2[t4]);p2[t4]=i4?h2*e4/100:e4*Math.sqrt(u2)})),o2.minRadius=t3=p2.minSize/Math.sqrt(u2),o2.maxRadius=e3=p2.maxSize/Math.sqrt(u2);let g2=l2?this.calculateZExtremes():[t3,e3];c2.forEach(((o3,a3)=>{i3=l2?x(o3[2],g2[0],g2[1]):o3[2],0===(s2=this.getRadius(g2[0],g2[1],t3,e3,i3))&&(s2=null),c2[a3][2]=s2,d2.push(s2)})),this.radii=d2}init(){return g.init.apply(this,arguments),m.call(this),this.eventsToUnbind.push(y(this,"updatedData",(function(){this.chart.series.forEach((t3=>{t3.type===this.type&&(t3.isDirty=true)}),this)}))),this}onMouseUp(t3){if(t3.fixedPosition&&!t3.removed){let i3;let s2=this.layout,o2=this.parentNodeLayout;o2&&s2.options.dragBetweenSeries&&o2.nodes.forEach((e3=>{t3&&t3.marker&&e3!==t3.series.parentNode&&(i3=s2.getDistXY(t3,e3),s2.vectorLength(i3)-e3.marker.radius-t3.marker.radius<0&&(e3.series.addPoint(k(t3.options,{plotX:t3.plotX,plotY:t3.plotY}),false),s2.removeElementFromCollection(t3,s2.nodes),t3.remove()))})),e2.onMouseUp.apply(this,arguments)}}placeBubbles(t3){let e3=this.checkOverlap,i3=this.positionBubble,s2=[],o2=1,a2=0,r2=0,n2,l2=[],h2,p2=t3.sort(((t4,e4)=>e4[2]-t4[2]));if(p2.length){if(s2.push([[0,0,p2[0][2],p2[0][3],p2[0][4]]]),p2.length>1)for(s2.push([[0,0-p2[1][2]-p2[0][2],p2[1][2],p2[1][3],p2[1][4]]]),h2=2;h2<p2.length;h2++)p2[h2][2]=p2[h2][2]||1,e3(n2=i3(s2[o2][a2],s2[o2-1][r2],p2[h2]),s2[o2][0])?(s2.push([]),r2=0,s2[o2+1].push(i3(s2[o2][a2],s2[o2][0],p2[h2])),o2++,a2=0):o2>1&&s2[o2-1][r2+1]&&e3(n2,s2[o2-1][r2+1])?(r2++,s2[o2].push(i3(s2[o2][a2],s2[o2-1][r2],p2[h2])),a2++):(a2++,s2[o2].push(n2));this.chart.stages=s2,this.chart.rawPositions=[].concat.apply([],s2),this.resizeRadius(),l2=this.chart.rawPositions}return l2}pointAttribs(t3,e3){let i3=this.options,s2=t3&&t3.isParentNode,o2=i3.marker;s2&&i3.layoutAlgorithm&&i3.layoutAlgorithm.parentNodeOptions&&(o2=i3.layoutAlgorithm.parentNodeOptions.marker);let a2=o2.fillOpacity,r2=g.pointAttribs.call(this,t3,e3);return 1!==a2&&(r2["fill-opacity"]=a2),r2}positionBubble(t3,e3,i3){let s2=Math.asin,o2=Math.acos,a2=Math.pow,r2=Math.abs,n2=(0,Math.sqrt)(a2(t3[0]-e3[0],2)+a2(t3[1]-e3[1],2)),l2=o2((a2(n2,2)+a2(i3[2]+e3[2],2)-a2(i3[2]+t3[2],2))/(2*(i3[2]+e3[2])*n2)),h2=s2(r2(t3[0]-e3[0])/n2),p2=(t3[1]-e3[1]<0?0:Math.PI)+l2+h2*((t3[0]-e3[0])*(t3[1]-e3[1])<0?1:-1),d2=Math.cos(p2),c2=Math.sin(p2);return[e3[0]+(e3[2]+i3[2])*c2,e3[1]-(e3[2]+i3[2])*d2,i3[2],i3[3],i3[4]]}render(){let t3=[];g.render.apply(this,arguments),!this.options.dataLabels.allowOverlap&&(this.data.forEach((e3=>{L(e3.dataLabels)&&e3.dataLabels.forEach((e4=>{t3.push(e4)}))})),this.options.useSimulation&&this.chart.hideOverlappingLabels(t3))}resizeRadius(){let t3,e3,i3,s2,o2;let a2=this.chart,r2=a2.rawPositions,n2=Math.min,l2=Math.max,h2=a2.plotLeft,p2=a2.plotTop,d2=a2.plotHeight,c2=a2.plotWidth;for(let a3 of(t3=i3=Number.POSITIVE_INFINITY,e3=s2=Number.NEGATIVE_INFINITY,r2))o2=a3[2],t3=n2(t3,a3[0]-o2),e3=l2(e3,a3[0]+o2),i3=n2(i3,a3[1]-o2),s2=l2(s2,a3[1]+o2);let u2=[e3-t3,s2-i3],g2=[(c2-h2)/u2[0],(d2-p2)/u2[1]],f2=n2.apply([],g2);if(Math.abs(f2-1)>1e-10){for(let t4 of r2)t4[2]*=f2;this.placeBubbles(r2)}else a2.diffY=d2/2+p2-i3-(s2-i3)/2,a2.diffX=c2/2+h2-t3-(e3-t3)/2}seriesBox(){let t3;let e3=this.chart,i3=this.data,s2=Math.max,o2=Math.min,a2=[e3.plotLeft,e3.plotLeft+e3.plotWidth,e3.plotTop,e3.plotTop+e3.plotHeight];return i3.forEach((e4=>{P(e4.plotX)&&P(e4.plotY)&&e4.marker.radius&&(t3=e4.marker.radius,a2[0]=o2(a2[0],e4.plotX-t3),a2[1]=s2(a2[1],e4.plotX+t3),a2[2]=o2(a2[2],e4.plotY-t3),a2[3]=s2(a2[3],e4.plotY+t3))})),C(a2.width/a2.height)?a2:null}setVisible(){let t3=this;g.setVisible.apply(t3,arguments),t3.parentNodeLayout&&t3.graph?t3.visible?(t3.graph.show(),t3.parentNode.dataLabel&&t3.parentNode.dataLabel.show()):(t3.graph.hide(),t3.parentNodeLayout.removeElementFromCollection(t3.parentNode,t3.parentNodeLayout.nodes),t3.parentNode.dataLabel&&t3.parentNode.dataLabel.hide()):t3.layout&&(t3.visible?t3.layout.addElementsToCollection(t3.points,t3.layout.nodes):t3.points.forEach((e3=>{t3.layout.removeElementFromCollection(e3,t3.layout.nodes)})))}translate(){let t3,e3,i3;let s2=this.chart,o2=this.data,a2=this.index,r2=this.options.useSimulation;for(let n2 of(this.processedXData=this.xData,this.generatePoints(),P(s2.allDataPoints)||(s2.allDataPoints=this.accumulateAllPoints(),this.getPointRadius()),r2?i3=s2.allDataPoints:(i3=this.placeBubbles(s2.allDataPoints),this.options.draggable=false),i3))n2[3]===a2&&(t3=o2[n2[4]],e3=v(n2[2],void 0),r2||(t3.plotX=n2[0]-s2.plotLeft+s2.diffX,t3.plotY=n2[1]-s2.plotTop+s2.diffY),C(e3)&&(t3.marker=S(t3.marker,{radius:e3,width:2*e3,height:2*e3}),t3.radius=e3));r2&&this.deferLayout(),M(this,"afterTranslate")}}return A.defaultOptions=k(f.defaultOptions,a),S(A.prototype,{pointClass:o,axisTypes:[],directTouch:true,forces:["barycenter","repulsive"],hasDraggableNodes:true,invertible:false,isCartesian:false,noSharedTooltip:true,pointArrayMap:["value"],pointValKey:"value",requireSorting:false,trackerGroups:["group","dataLabelsGroup","parentNodesGroup"],initDataLabels:b,alignDataLabel:g.alignDataLabel,indexateNodes:u,onMouseDown:e2.onMouseDown,onMouseMove:e2.onMouseMove,redrawHalo:e2.redrawHalo,searchPoint:u}),n.registerSeriesType("packedbubble",A),A})),i(e,"Series/Polygon/PolygonSeriesDefaults.js",[],(function(){return{marker:{enabled:false,states:{hover:{enabled:false}}},stickyTracking:false,tooltip:{followPointer:true,pointFormat:""},trackByArea:true,legendSymbol:"rectangle"}})),i(e,"Series/Polygon/PolygonSeries.js",[e["Core/Globals.js"],e["Series/Polygon/PolygonSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){let{noop:o}=t2,{area:a,line:r,scatter:n}=i2.seriesTypes,{extend:l,merge:h}=s;class p extends n{getGraphPath(){let t3=r.prototype.getGraphPath.call(this),e3=t3.length+1;for(;e3--;)(e3===t3.length||"M"===t3[e3][0])&&e3>0&&t3.splice(e3,0,["Z"]);return this.areaPath=t3,t3}drawGraph(){this.options.fillColor=this.color,a.prototype.drawGraph.call(this)}}return p.defaultOptions=h(n.defaultOptions,e2),l(p.prototype,{type:"polygon",drawTracker:r.prototype.drawTracker,setStackedPoints:o}),i2.registerSeriesType("polygon",p),p})),i(e,"Core/Axis/RadialAxisDefaults.js",[],(function(){return{circular:{gridLineWidth:1,labels:{align:void 0,x:0,y:void 0,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:false,tickLength:0},radial:{gridLineInterpolation:"circle",gridLineWidth:1,labels:{align:"right",padding:5,x:-3,y:-2},showLastLabel:false,title:{x:4,text:null,rotation:90}},radialGauge:{endOnTick:false,gridLineWidth:0,labels:{align:"center",distance:-25,x:0,y:void 0},lineWidth:1,minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,startOnTick:false,tickLength:10,tickPixelInterval:100,tickPosition:"inside",tickWidth:2,title:{rotation:0,text:""},zIndex:2}}})),i(e,"Core/Axis/RadialAxis.js",[e["Core/Axis/RadialAxisDefaults.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s){var o;let{defaultOptions:a}=e2,{composed:r,noop:n}=i2,{addEvent:l,correctFloat:h,defined:p,extend:d,fireEvent:c,isObject:u,merge:g,pick:f,pushUnique:b,relativeLength:m,wrap:y}=s;return function(e3){function s2(){this.autoConnect=this.isCircular&&void 0===f(this.userMax,this.options.max)&&h(this.endAngleRad-this.startAngleRad)===h(2*Math.PI),!this.isCircular&&this.chart.inverted&&this.max++,this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)}function o2(){return()=>{if(this.isRadial&&this.tickPositions&&this.options.labels&&true!==this.options.labels.allowOverlap)return this.tickPositions.map((t3=>this.ticks[t3]&&this.ticks[t3].label)).filter((t3=>!!t3))}}function x(){return n}function P(t3,e4,i3){let s3=this.pane.center,o3=t3.value,a2,r2,n2;return this.isCircular?(p(o3)?t3.point&&(t3.point.shapeArgs||{}).start&&(o3=this.chart.inverted?this.translate(t3.point.rectPlotY,true):t3.point.x):(r2=t3.chartX||0,n2=t3.chartY||0,o3=this.translate(Math.atan2(n2-i3,r2-e4)-this.startAngleRad,true)),r2=(a2=this.getPosition(o3)).x,n2=a2.y):(p(o3)||(r2=t3.chartX,n2=t3.chartY),p(r2)&&p(n2)&&(i3=s3[1]+this.chart.plotTop,o3=this.translate(Math.min(Math.sqrt(Math.pow(r2-e4,2)+Math.pow(n2-i3,2)),s3[2]/2)-s3[3]/2,true))),[o3,r2||0,n2||0]}function S(t3,e4,i3){let s3=this.pane.center,o3=this.chart,a2=this.left||0,r2=this.top||0,n2,l2=f(e4,s3[2]/2-this.offset),h2;return void 0===i3&&(i3=this.horiz?0:this.center&&-this.center[3]/2),i3&&(l2+=i3),this.isCircular||void 0!==e4?((h2=this.chart.renderer.symbols.arc(a2+s3[0],r2+s3[1],l2,l2,{start:this.startAngleRad,end:this.endAngleRad,open:true,innerR:0})).xBounds=[a2+s3[0]],h2.yBounds=[r2+s3[1]-l2]):(n2=this.postTranslate(this.angleRad,l2),h2=[["M",this.center[0]+o3.plotLeft,this.center[1]+o3.plotTop],["L",n2.x,n2.y]]),h2}function M(){this.constructor.prototype.getOffset.call(this),this.chart.axisOffset[this.side]=0}function L(t3,e4,i3){let s3=this.chart,o3=t4=>{if("string"==typeof t4){let e5=parseInt(t4,10);return d2.test(t4)&&(e5=e5*n2/100),e5}return t4},a2=this.center,r2=this.startAngleRad,n2=a2[2]/2,l2=Math.min(this.offset,0),h2=this.left||0,p2=this.top||0,d2=/%$/,c2=this.isCircular,u2,g2,b2,m2,y2,x2,P2=f(o3(i3.outerRadius),n2),S2=o3(i3.innerRadius),M2=f(o3(i3.thickness),10);if("polygon"===this.options.gridLineInterpolation)x2=this.getPlotLinePath({value:t3}).concat(this.getPlotLinePath({value:e4,reverse:true}));else{t3=Math.max(t3,this.min),e4=Math.min(e4,this.max);let o4=this.translate(t3),n3=this.translate(e4);c2||(P2=o4||0,S2=n3||0),"circle"!==i3.shape&&c2?(u2=r2+(o4||0),g2=r2+(n3||0)):(u2=-Math.PI/2,g2=1.5*Math.PI,y2=true),P2-=l2,M2-=l2,x2=s3.renderer.symbols.arc(h2+a2[0],p2+a2[1],P2,P2,{start:Math.min(u2,g2),end:Math.max(u2,g2),innerR:f(S2,P2-M2),open:y2,borderRadius:i3.borderRadius}),c2&&(b2=(g2+u2)/2,m2=h2+a2[0]+a2[2]/2*Math.cos(b2),x2.xBounds=b2>-Math.PI/2&&b2<Math.PI/2?[m2,s3.plotWidth]:[0,m2],x2.yBounds=[p2+a2[1]+a2[2]/2*Math.sin(b2)],x2.yBounds[0]+=b2>-Math.PI&&b2<0||b2>Math.PI?-10:10)}return x2}function C(t3){let e4=this.pane.center,i3=this.chart,s3=i3.inverted,o3=t3.reverse,a2=this.pane.options.background?this.pane.options.background[0]||this.pane.options.background:{},r2=a2.innerRadius||"0%",n2=a2.outerRadius||"100%",l2=e4[0]+i3.plotLeft,h2=e4[1]+i3.plotTop,p2=this.height,d2=t3.isCrosshair,c2=e4[3]/2,u2=t3.value,g2,f2,b2,y2,x2,P2,S2,M2,L2,C2=this.getPosition(u2),k2=C2.x,v2=C2.y;if(d2&&(u2=(M2=this.getCrosshairPosition(t3,l2,h2))[0],k2=M2[1],v2=M2[2]),this.isCircular)f2=Math.sqrt(Math.pow(k2-l2,2)+Math.pow(v2-h2,2)),b2="string"==typeof r2?m(r2,1):r2/f2,y2="string"==typeof n2?m(n2,1):n2/f2,e4&&c2&&(b2<(g2=c2/f2)&&(b2=g2),y2<g2&&(y2=g2)),L2=[["M",l2+b2*(k2-l2),h2-b2*(h2-v2)],["L",k2-(1-y2)*(k2-l2),v2+(1-y2)*(h2-v2)]];else if((u2=this.translate(u2))&&(u2<0||u2>p2)&&(u2=0),"circle"===this.options.gridLineInterpolation)L2=this.getLinePath(0,u2,c2);else if(L2=[],i3[s3?"yAxis":"xAxis"].forEach((t4=>{t4.pane===this.pane&&(x2=t4)})),x2){S2=x2.tickPositions,x2.autoConnect&&(S2=S2.concat([S2[0]])),o3&&(S2=S2.slice().reverse()),u2&&(u2+=c2);for(let t4=0;t4<S2.length;t4++)P2=x2.getPosition(S2[t4],u2),L2.push(t4?["L",P2.x,P2.y]:["M",P2.x,P2.y])}return L2}function k(t3,e4){let i3=this.translate(t3);return this.postTranslate(this.isCircular?i3:this.angleRad,f(this.isCircular?e4:i3<0?0:i3,this.center[2]/2)-this.offset)}function v(){let t3=this.center,e4=this.chart,i3=this.options.title;return{x:e4.plotLeft+t3[0]+(i3.x||0),y:e4.plotTop+t3[1]-{high:.5,middle:.25,low:0}[i3.align]*t3[2]+(i3.y||0)}}function A(t3){t3.beforeSetTickPositions=s2,t3.createLabelCollector=o2,t3.getCrosshairPosition=P,t3.getLinePath=S,t3.getOffset=M,t3.getPlotBandPath=L,t3.getPlotLinePath=C,t3.getPosition=k,t3.getTitlePosition=v,t3.postTranslate=D,t3.setAxisSize=B,t3.setAxisTranslation=z,t3.setOptions=O}function w2(){let t3=this.chart,e4=this.options,i3=t3.angular&&this.isXAxis,s3=this.pane,o3=s3&&s3.options;if(!i3&&s3&&(t3.angular||t3.polar)){let t4=2*Math.PI,i4=(f(o3.startAngle,0)-90)*Math.PI/180,s4=(f(o3.endAngle,f(o3.startAngle,0)+360)-90)*Math.PI/180;this.angleRad=(e4.angle||0)*Math.PI/180,this.startAngleRad=i4,this.endAngleRad=s4,this.offset=e4.offset||0;let a2=(i4%t4+t4)%t4,r2=(s4%t4+t4)%t4;a2>Math.PI&&(a2-=t4),r2>Math.PI&&(r2-=t4),this.normalizedStartAngleRad=a2,this.normalizedEndAngleRad=r2}}function T(t3){this.isRadial&&(t3.align=void 0,t3.preventDefault())}function N(){if(this.chart&&this.chart.labelCollectors){let t3=this.labelCollector?this.chart.labelCollectors.indexOf(this.labelCollector):-1;t3>=0&&this.chart.labelCollectors.splice(t3,1)}}function X(t3){let e4;let i3=this.chart,s3=i3.angular,o3=i3.polar,a2=this.isXAxis,r2=this.coll,l2=t3.userOptions.pane||0,h2=this.pane=i3.pane&&i3.pane[l2];if("colorAxis"===r2){this.isRadial=false;return}s3?(s3&&a2?(this.isHidden=true,this.createLabelCollector=x,this.getOffset=n,this.redraw=E,this.render=E,this.setScale=n,this.setCategories=n,this.setTitle=n):A(this),e4=!a2):o3&&(A(this),e4=this.horiz),s3||o3?(this.isRadial=true,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&i3.labelCollectors.push(this.labelCollector)):this.isRadial=false,h2&&e4&&(h2.axis=this),this.isCircular=e4}function R(){this.isRadial&&this.beforeSetTickPositions()}function Y(t3){let e4=this.label;if(!e4)return;let i3=this.axis,s3=e4.getBBox(),o3=i3.options.labels,a2=(i3.translate(this.pos)+i3.startAngleRad+Math.PI/2)/Math.PI*180%360,r2=Math.round(a2),n2=p(o3.y)?0:-(.3*s3.height),l2=o3.y,h2,d2=20,c2=o3.align,u2="end",g2=r2<0?r2+360:r2,b2=g2,y2=0,x2=0;i3.isRadial&&(h2=i3.getPosition(this.pos,i3.center[2]/2+m(f(o3.distance,-25),i3.center[2]/2,-i3.center[2]/2)),"auto"===o3.rotation?e4.attr({rotation:a2}):p(l2)||(l2=i3.chart.renderer.fontMetrics(e4).b-s3.height/2),p(c2)||(i3.isCircular?(s3.width>i3.len*i3.tickInterval/(i3.max-i3.min)&&(d2=0),c2=a2>d2&&a2<180-d2?"left":a2>180+d2&&a2<360-d2?"right":"center"):c2="center",e4.attr({align:c2})),"auto"===c2&&2===i3.tickPositions.length&&i3.isCircular&&(g2>90&&g2<180?g2=180-g2:g2>270&&g2<=360&&(g2=540-g2),b2>180&&b2<=360&&(b2=360-b2),(i3.pane.options.startAngle===r2||i3.pane.options.startAngle===r2+360||i3.pane.options.startAngle===r2-360)&&(u2="start"),c2=r2>=-90&&r2<=90||r2>=-360&&r2<=-270||r2>=270&&r2<=360?"start"===u2?"right":"left":"start"===u2?"left":"right",b2>70&&b2<110&&(c2="center"),g2<15||g2>=180&&g2<195?y2=.3*s3.height:g2>=15&&g2<=35?y2="start"===u2?0:.75*s3.height:g2>=195&&g2<=215?y2="start"===u2?.75*s3.height:0:g2>35&&g2<=90?y2="start"===u2?-(.25*s3.height):s3.height:g2>215&&g2<=270&&(y2="start"===u2?s3.height:-(.25*s3.height)),b2<15?x2="start"===u2?-(.15*s3.height):.15*s3.height:b2>165&&b2<=180&&(x2="start"===u2?.15*s3.height:-(.15*s3.height)),e4.attr({align:c2}),e4.translate(x2,y2+n2)),t3.pos.x=h2.x+(o3.x||0),t3.pos.y=h2.y+(l2||0))}function j(t3){this.axis.getPosition&&d(t3.pos,this.axis.getPosition(this.pos))}function I({options:t3}){t3.xAxis&&g(true,e3.radialDefaultOptions.circular,t3.xAxis),t3.yAxis&&g(true,e3.radialDefaultOptions.radialGauge,t3.yAxis)}function D(t3,e4){let i3=this.chart,s3=this.center;return t3=this.startAngleRad+t3,{x:i3.plotLeft+s3[0]+Math.cos(t3)*e4,y:i3.plotTop+s3[1]+Math.sin(t3)*e4}}function E(){this.isDirty=false}function B(){let t3,e4;this.constructor.prototype.setAxisSize.call(this),this.isRadial&&(this.pane.updateCenter(this),t3=this.center=this.pane.center.slice(),this.isCircular?this.sector=this.endAngleRad-this.startAngleRad:(e4=this.postTranslate(this.angleRad,t3[3]/2),t3[0]=e4.x-this.chart.plotLeft,t3[1]=e4.y-this.chart.plotTop),this.len=this.width=this.height=(t3[2]-t3[3])*f(this.sector,1)/2)}function z(){this.constructor.prototype.setAxisTranslation.call(this),this.center&&(this.isCircular?this.transA=(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.transA=(this.center[2]-this.center[3])/2/(this.max-this.min||1),this.isXAxis?this.minPixelPadding=this.transA*this.minPointOffset:this.minPixelPadding=0)}function O(t3){let{coll:i3}=this,{angular:s3,inverted:o3,polar:r2}=this.chart,n2={};s3?this.isXAxis||(n2=g(a.yAxis,e3.radialDefaultOptions.radialGauge)):r2&&(n2=this.horiz?g(a.xAxis,e3.radialDefaultOptions.circular):g("xAxis"===i3?a.xAxis:a.yAxis,e3.radialDefaultOptions.radial)),o3&&"yAxis"===i3&&(n2.stackLabels=u(a.yAxis,true)?a.yAxis.stackLabels:{},n2.reversedStacks=true);let l2=this.options=g(n2,t3);l2.plotBands||(l2.plotBands=[]),c(this,"afterSetOptions")}function W(t3,e4,i3,s3,o3,a2,r2){let n2;let l2=this.axis;return l2.isRadial?["M",e4,i3,"L",(n2=l2.getPosition(this.pos,l2.center[2]/2+s3)).x,n2.y]:t3.call(this,e4,i3,s3,o3,a2,r2)}e3.radialDefaultOptions=g(t2),e3.compose=function(t3,e4){return b(r,"Axis.Radial")&&(l(t3,"afterInit",w2),l(t3,"autoLabelAlign",T),l(t3,"destroy",N),l(t3,"init",X),l(t3,"initialAxisTranslation",R),l(e4,"afterGetLabelPosition",Y),l(e4,"afterGetPosition",j),l(i2,"setOptions",I),y(e4.prototype,"getMarkPath",W)),t3}}(o||(o={})),o})),i(e,"Series/PolarComposition.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Extensions/Pane/Pane.js"],e["Core/Axis/RadialAxis.js"],e["Core/Utilities.js"]],(function(t2,e2,i2,s,o,a){let{animObject:r}=t2,{composed:n}=e2,{addEvent:l,defined:h,find:p,isNumber:d,merge:c,pick:u,pushUnique:g,relativeLength:f,splat:b,uniqueKey:m,wrap:y}=a;function x(){(this.pane||[]).forEach((t3=>{t3.render()}))}function P(t3){let e3=t3.args[0].xAxis,i3=t3.args[0].yAxis,s2=t3.args[0].chart;e3&&i3&&("polygon"===i3.gridLineInterpolation?(e3.startOnTick=true,e3.endOnTick=true):"polygon"===e3.gridLineInterpolation&&s2.inverted&&(i3.startOnTick=true,i3.endOnTick=true))}function S(){this.pane||(this.pane=[]),this.options.pane=b(this.options.pane),this.options.pane.forEach((t3=>{new s(t3,this)}),this)}function M(t3){let e3=t3.args.marker,i3=this.chart.xAxis[0],s2=this.chart.yAxis[0],o2=this.chart.inverted,a2=o2?s2:i3,r2=o2?i3:s2;if(this.chart.polar){t3.preventDefault();let i4=(e3.attr?e3.attr("start"):e3.start)-a2.startAngleRad,s3=e3.attr?e3.attr("r"):e3.r,o3=(e3.attr?e3.attr("end"):e3.end)-a2.startAngleRad,n2=e3.attr?e3.attr("innerR"):e3.innerR;t3.result.x=i4+a2.pos,t3.result.width=o3-i4,t3.result.y=r2.len+r2.pos-s3,t3.result.height=s3-n2}}function L(t3){let e3=this.chart;if(e3.polar&&e3.hoverPane&&e3.hoverPane.axis){t3.preventDefault();let i3=e3.hoverPane.center,s2=e3.mouseDownX||0,o2=e3.mouseDownY||0,a2=t3.args.chartY,r2=t3.args.chartX,n2=2*Math.PI,l2=e3.hoverPane.axis.startAngleRad,h2=e3.hoverPane.axis.endAngleRad,p2=e3.inverted?e3.xAxis[0]:e3.yAxis[0],d2={},c2="arc";if(d2.x=i3[0]+e3.plotLeft,d2.y=i3[1]+e3.plotTop,this.zoomHor){let t4=l2>0?h2-l2:Math.abs(l2)+Math.abs(h2),u2=Math.atan2(o2-e3.plotTop-i3[1],s2-e3.plotLeft-i3[0])-l2,g2=Math.atan2(a2-e3.plotTop-i3[1],r2-e3.plotLeft-i3[0])-l2;d2.r=i3[2]/2,d2.innerR=i3[3]/2,u2<=0&&(u2+=n2),g2<=0&&(g2+=n2),g2<u2&&(g2=[u2,u2=g2][0]),t4<n2&&l2+g2>h2+(n2-t4)/2&&(g2=u2,u2=l2<=0?l2:0);let f2=d2.start=Math.max(u2+l2,l2),b2=d2.end=Math.min(g2+l2,h2);if("polygon"===p2.options.gridLineInterpolation){let t5=e3.hoverPane.axis,s3=f2-t5.startAngleRad+t5.pos,o3=p2.getPlotLinePath({value:p2.max}),a3=t5.toValue(s3),r3=t5.toValue(s3+(b2-f2));if(a3<t5.getExtremes().min){let{min:e4,max:i4}=t5.getExtremes();a3=i4-(e4-a3)}if(r3<t5.getExtremes().min){let{min:e4,max:i4}=t5.getExtremes();r3=i4-(e4-r3)}r3<a3&&(r3=[a3,a3=r3][0]),(o3=A(o3,a3,r3,t5)).push(["L",i3[0]+e3.plotLeft,e3.plotTop+i3[1]]),d2.d=o3,c2="path"}}if(this.zoomVert){let t4=e3.inverted?e3.xAxis[0]:e3.yAxis[0],n3=Math.sqrt(Math.pow(s2-e3.plotLeft-i3[0],2)+Math.pow(o2-e3.plotTop-i3[1],2)),p3=Math.sqrt(Math.pow(r2-e3.plotLeft-i3[0],2)+Math.pow(a2-e3.plotTop-i3[1],2));if(p3<n3&&(n3=[p3,p3=n3][0]),p3>i3[2]/2&&(p3=i3[2]/2),n3<i3[3]/2&&(n3=i3[3]/2),this.zoomHor||(d2.start=l2,d2.end=h2),d2.r=p3,d2.innerR=n3,"polygon"===t4.options.gridLineInterpolation){let e4=t4.toValue(t4.len+t4.pos-n3),i4=t4.toValue(t4.len+t4.pos-p3),s3=t4.getPlotLinePath({value:i4}).concat(t4.getPlotLinePath({value:e4,reverse:true}));d2.d=s3,c2="path"}}if(this.zoomHor&&this.zoomVert&&"polygon"===p2.options.gridLineInterpolation){let t4=e3.hoverPane.axis,i4=d2.start||0,s3=d2.end||0,o3=i4-t4.startAngleRad+t4.pos,a3=t4.toValue(o3),r3=t4.toValue(o3+(s3-i4));if(d2.d instanceof Array){let t5=d2.d.slice(0,d2.d.length/2),i5=d2.d.slice(d2.d.length/2,d2.d.length);i5=[...i5].reverse();let s4=e3.hoverPane.axis;t5=A(t5,a3,r3,s4),(i5=A(i5,a3,r3,s4))&&(i5[0][0]="L"),i5=[...i5].reverse(),d2.d=t5.concat(i5),c2="path"}}t3.attrs=d2,t3.shapeType=c2}}function C(){let t3=this.chart;t3.polar&&(this.polar=new E(this),t3.inverted&&(this.isRadialSeries=true,this.is("column")&&(this.isRadialBar=true)))}function k(){if(this.chart.polar&&this.xAxis){let{xAxis:t3,yAxis:i3}=this,s2=this.chart;this.kdByAngle=s2.tooltip&&s2.tooltip.shared,this.kdByAngle||s2.inverted?this.searchPoint=v:this.options.findNearestPointBy="xy";let o2=this.points,a2=o2.length;for(;a2--;)this.is("column")||this.is("columnrange")||this.polar.toXY(o2[a2]),s2.hasParallelCoordinates||this.yAxis.reversed||(u(o2[a2].y,Number.MIN_VALUE)<i3.min||o2[a2].x<t3.min||o2[a2].x>t3.max?(o2[a2].isNull=true,o2[a2].plotY=NaN):o2[a2].isNull=o2[a2].isValid&&!o2[a2].isValid());this.hasClipCircleSetter||(this.hasClipCircleSetter=!!this.eventsToUnbind.push(l(this,"afterRender",(function(){let t4;s2.polar&&false!==this.options.clip&&(t4=this.yAxis.pane.center,this.clipCircle?this.clipCircle.animate({x:t4[0],y:t4[1],r:t4[2]/2,innerR:t4[3]/2}):this.clipCircle=function(t5,e3,i4,s3,o3){let a3=m(),r2=t5.createElement("clipPath").attr({id:a3}).add(t5.defs),n2=o3?t5.arc(e3,i4,s3,o3,0,2*Math.PI).add(r2):t5.circle(e3,i4,s3).add(r2);return n2.id=a3,n2.clipPath=r2,n2}(s2.renderer,t4[0],t4[1],t4[2]/2,t4[3]/2),this.group.clip(this.clipCircle),this.setClip=e2.noop)}))))}}function v(t3){let e3=this.chart,i3=this.xAxis,s2=this.yAxis,o2=i3.pane&&i3.pane.center,a2=t3.chartX-(o2&&o2[0]||0)-e3.plotLeft,r2=t3.chartY-(o2&&o2[1]||0)-e3.plotTop,n2=e3.inverted?{clientX:t3.chartX-s2.pos,plotY:t3.chartY-i3.pos}:{clientX:180+-180/Math.PI*Math.atan2(a2,r2)};return this.searchKDTree(n2)}function A(t3,e3,i3,s2){let o2=s2.tickInterval,a2=s2.tickPositions,r2=p(a2,(t4=>t4>=i3)),n2=p([...a2].reverse(),(t4=>t4<=e3));return h(r2)||(r2=a2[a2.length-1]),h(n2)||(n2=a2[0],r2+=o2,t3[0][0]="L",t3.unshift(t3[t3.length-3])),(t3=t3.slice(a2.indexOf(n2),a2.indexOf(r2)+1))[0][0]="M",t3}function w2(t3,e3){return p(this.pane||[],(t4=>t4.options.id===e3))||t3.call(this,e3)}function T(t3,e3,s2,o2,a2,r2){let n2,l2,h2;let p2=this.chart,d2=u(o2.inside,!!this.options.stacking);if(p2.polar){if(n2=e3.rectPlotX/Math.PI*180,p2.inverted)this.forceDL=p2.isInsidePlot(e3.plotX,e3.plotY),d2&&e3.shapeArgs?(l2=e3.shapeArgs,a2=c(a2,{x:(h2=this.yAxis.postTranslate(((l2.start||0)+(l2.end||0))/2-this.xAxis.startAngleRad,e3.barX+e3.pointWidth/2)).x-p2.plotLeft,y:h2.y-p2.plotTop})):e3.tooltipPos&&(a2=c(a2,{x:e3.tooltipPos[0],y:e3.tooltipPos[1]})),o2.align=u(o2.align,"center"),o2.verticalAlign=u(o2.verticalAlign,"middle");else{var g2;let t4,e4;null===(g2=o2).align&&(t4=n2>20&&n2<160?"left":n2>200&&n2<340?"right":"center",g2.align=t4),null===g2.verticalAlign&&(e4=n2<45||n2>315?"bottom":n2>135&&n2<225?"top":"middle",g2.verticalAlign=e4),o2=g2}i2.prototype.alignDataLabel.call(this,e3,s2,o2,a2,r2),this.isRadialBar&&e3.shapeArgs&&e3.shapeArgs.start===e3.shapeArgs.end?s2.hide():s2.show()}else t3.call(this,e3,s2,o2,a2,r2)}function N(){let t3=this.options,e3=t3.stacking,i3=this.chart,s2=this.xAxis,o2=this.yAxis,r2=o2.reversed,n2=o2.center,l2=s2.startAngleRad,p2=s2.endAngleRad-l2,c2=t3.threshold,u2=0,g2,b2,m2,y2,x2,P2=0,S2=0,M2,L2,C2,k2,v2,A2,w3,T2;if(s2.isRadial)for(m2=(g2=this.points).length,y2=o2.translate(o2.min),x2=o2.translate(o2.max),c2=t3.threshold||0,i3.inverted&&d(c2)&&h(u2=o2.translate(c2))&&(u2<0?u2=0:u2>p2&&(u2=p2),this.translatedThreshold=u2+l2);m2--;){if(A2=(b2=g2[m2]).barX,L2=b2.x,C2=b2.y,b2.shapeType="arc",i3.inverted){b2.plotY=o2.translate(C2),e3&&o2.stacking?(v2=o2.stacking.stacks[(C2<0?"-":"")+this.stackKey],this.visible&&v2&&v2[L2]&&!b2.isNull&&(k2=v2[L2].points[this.getStackIndicator(void 0,L2,this.index).key],P2=o2.translate(k2[0]),S2=o2.translate(k2[1]),h(P2)&&(P2=a.clamp(P2,0,p2)))):(P2=u2,S2=b2.plotY),P2>S2&&(S2=[P2,P2=S2][0]),r2?S2>y2?S2=y2:P2<x2?P2=x2:(P2>y2||S2<x2)&&(P2=S2=p2):P2<y2?P2=y2:S2>x2?S2=x2:(S2<y2||P2>x2)&&(P2=S2=0),o2.min>o2.max&&(P2=S2=r2?p2:0),P2+=l2,S2+=l2,n2&&(b2.barX=A2+=n2[3]/2),w3=Math.max(A2,0),T2=Math.max(A2+b2.pointWidth,0);let i4=t3.borderRadius,s3=f(("object"==typeof i4?i4.radius:i4)||0,T2-w3);b2.shapeArgs={x:n2[0],y:n2[1],r:T2,innerR:w3,start:P2,end:S2,borderRadius:s3},b2.opacity=P2===S2?0:void 0,b2.plotY=(h(this.translatedThreshold)&&(P2<this.translatedThreshold?P2:S2))-l2}else P2=A2+l2,b2.shapeArgs=this.polar.arc(b2.yBottom,b2.plotY,P2,P2+b2.pointWidth),b2.shapeArgs.borderRadius=0;this.polar.toXY(b2),i3.inverted?(M2=o2.postTranslate(b2.rectPlotY,A2+b2.pointWidth/2),b2.tooltipPos=[M2.x-i3.plotLeft,M2.y-i3.plotTop]):b2.tooltipPos=[b2.plotX,b2.plotY],n2&&(b2.ttBelow=b2.plotY>n2[1])}}function X(t3,e3){let i3,s2;let o2=this;if(this.chart.polar){e3=e3||this.points;for(let t4=0;t4<e3.length;t4++)if(!e3[t4].isNull){i3=t4;break}false!==this.options.connectEnds&&void 0!==i3&&(this.connectEnds=true,e3.splice(e3.length,0,e3[i3]),s2=true),e3.forEach((t4=>{void 0===t4.polarPlotY&&o2.polar.toXY(t4)}))}let a2=t3.apply(this,[].slice.call(arguments,1));return s2&&e3.pop(),a2}function R(t3,e3){let i3=this.chart,s2={xAxis:[],yAxis:[]};return i3.polar?i3.axes.forEach((t4=>{if("colorAxis"===t4.coll)return;let o2=t4.isXAxis,a2=t4.center,r2=e3.chartX-a2[0]-i3.plotLeft,n2=e3.chartY-a2[1]-i3.plotTop;s2[o2?"xAxis":"yAxis"].push({axis:t4,value:t4.translate(o2?Math.PI-Math.atan2(r2,n2):Math.sqrt(Math.pow(r2,2)+Math.pow(n2,2)),true)})})):s2=t3.call(this,e3),s2}function Y(t3,e3){this.chart.polar||t3.call(this,e3)}function j(t3,i3){let s2=this,o2=this.chart,a2=this.group,n2=this.markerGroup,l2=this.xAxis&&this.xAxis.center,h2=o2.plotLeft,p2=o2.plotTop,d2=this.options.animation,c2,g2,f2,b2,m2,y2;o2.polar?s2.isRadialBar?i3||(s2.startAngleRad=u(s2.translatedThreshold,s2.xAxis.startAngleRad),e2.seriesTypes.pie.prototype.animate.call(s2,i3)):(d2=r(d2),s2.is("column")?i3||(g2=l2[3]/2,s2.points.forEach((t4=>{f2=t4.graphic,m2=(b2=t4.shapeArgs)&&b2.r,y2=b2&&b2.innerR,f2&&b2&&(f2.attr({r:g2,innerR:g2}),f2.animate({r:m2,innerR:y2},s2.options.animation))}))):i3?(c2={translateX:l2[0]+h2,translateY:l2[1]+p2,scaleX:.001,scaleY:.001},a2.attr(c2),n2&&n2.attr(c2)):(c2={translateX:h2,translateY:p2,scaleX:1,scaleY:1},a2.animate(c2,d2),n2&&n2.animate(c2,d2))):t3.call(this,i3)}function I(t3,e3,i3,s2){let o2,a2;if(this.chart.polar){if(s2){let t4=(a2=function t5(e4,i5,s3,o3){let a3,r2,n2,l2,h2,p2;let d2=o3?1:0,c2=(a3=i5>=0&&i5<=e4.length-1?i5:i5<0?e4.length-1+i5:0)-1<0?e4.length-(1+d2):a3-1,u2=a3+1>e4.length-1?d2:a3+1,g2=e4[c2],f2=e4[u2],b2=g2.plotX,m2=g2.plotY,y2=f2.plotX,x2=f2.plotY,P2=e4[a3].plotX,S2=e4[a3].plotY;r2=(1.5*P2+b2)/2.5,n2=(1.5*S2+m2)/2.5,l2=(1.5*P2+y2)/2.5,h2=(1.5*S2+x2)/2.5;let M2=Math.sqrt(Math.pow(r2-P2,2)+Math.pow(n2-S2,2)),L2=Math.sqrt(Math.pow(l2-P2,2)+Math.pow(h2-S2,2)),C2=Math.atan2(n2-S2,r2-P2);p2=Math.PI/2+(C2+Math.atan2(h2-S2,l2-P2))/2,Math.abs(C2-p2)>Math.PI/2&&(p2-=Math.PI),r2=P2+Math.cos(p2)*M2,n2=S2+Math.sin(p2)*M2;let k2={rightContX:l2=P2+Math.cos(Math.PI+p2)*L2,rightContY:h2=S2+Math.sin(Math.PI+p2)*L2,leftContX:r2,leftContY:n2,plotX:P2,plotY:S2};return s3&&(k2.prevPointCont=t5(e4,c2,false,o3)),k2}(e3,s2,true,this.connectEnds)).prevPointCont&&a2.prevPointCont.rightContX,i4=a2.prevPointCont&&a2.prevPointCont.rightContY;o2=["C",d(t4)?t4:a2.plotX,d(i4)?i4:a2.plotY,d(a2.leftContX)?a2.leftContX:a2.plotX,d(a2.leftContY)?a2.leftContY:a2.plotY,a2.plotX,a2.plotY]}else o2=["M",i3.plotX,i3.plotY]}else o2=t3.call(this,e3,i3,s2);return o2}function D(t3,e3,i3=this.plotY){if(!this.destroyed){let{plotX:s2,series:o2}=this,{chart:a2}=o2;return a2.polar&&d(s2)&&d(i3)?[s2+(e3?a2.plotLeft:0),i3+(e3?a2.plotTop:0)]:t3.call(this,e3,i3)}}class E{static compose(t3,e3,i3,a2,r2,h2,p2,d2,c2,u2){if(s.compose(e3,i3),o.compose(t3,r2),g(n,"Polar")){let t4=e3.prototype,s2=h2.prototype,o2=i3.prototype,r3=a2.prototype;if(l(e3,"afterDrawChartBox",x),l(e3,"getAxes",S),l(e3,"init",P),y(t4,"get",w2),y(o2,"getCoordinates",R),y(o2,"pinch",Y),l(i3,"getSelectionMarkerAttrs",L),l(i3,"getSelectionBox",M),l(a2,"afterInit",C),l(a2,"afterTranslate",k,{order:2}),l(a2,"afterColumnTranslate",N,{order:4}),y(r3,"animate",j),y(s2,"pos",D),d2){let t5=d2.prototype;y(t5,"alignDataLabel",T),y(t5,"animate",j)}if(c2&&y(c2.prototype,"getGraphPath",X),u2){let t5=u2.prototype;y(t5,"getPointSpline",I),p2&&(p2.prototype.getPointSpline=t5.getPointSpline)}}}constructor(t3){this.series=t3}arc(t3,e3,i3,s2){let o2=this.series,a2=o2.xAxis.center,r2=o2.yAxis.len,n2=a2[3]/2,l2=r2-e3+n2,h2=r2-u(t3,r2)+n2;return o2.yAxis.reversed&&(l2<0&&(l2=n2),h2<0&&(h2=n2)),{x:a2[0],y:a2[1],r:l2,innerR:h2,start:i3,end:s2}}toXY(t3){let e3=this.series,i3=e3.chart,s2=e3.xAxis,o2=e3.yAxis,a2=t3.plotX,r2=i3.inverted,n2=t3.y,l2=t3.plotY,h2=r2?a2:o2.len-l2,p2;if(r2&&e3&&!e3.isRadialBar&&(t3.plotY=l2=d(n2)?o2.translate(n2):0),t3.rectPlotX=a2,t3.rectPlotY=l2,o2.center&&(h2+=o2.center[3]/2),d(l2)){let e4=r2?o2.postTranslate(l2,h2):s2.postTranslate(a2,h2);t3.plotX=t3.polarPlotX=e4.x-i3.plotLeft,t3.plotY=t3.polarPlotY=e4.y-i3.plotTop}e3.kdByAngle?((p2=(a2/Math.PI*180+s2.pane.options.startAngle)%360)<0&&(p2+=360),t3.clientX=p2):t3.clientX=t3.plotX}}return E})),i(e,"Core/Axis/WaterfallAxis.js",[e["Core/Globals.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){var s;let{composed:o}=t2,{addEvent:a,objectEach:r,pushUnique:n}=i2;return function(t3){function i3(){let t4=this.waterfall.stacks;t4&&(t4.changed=false,delete t4.alreadyChanged)}function s2(){let t4=this.options.stackLabels;t4&&t4.enabled&&this.waterfall.stacks&&this.waterfall.renderStackTotals()}function l(){this.waterfall||(this.waterfall=new p(this))}function h(){let t4=this.axes;for(let e3 of this.series)if(e3.options.stacking){for(let e4 of t4)e4.isXAxis||(e4.waterfall.stacks.changed=true);break}}t3.compose=function(t4,e3){n(o,"Axis.Waterfall")&&(a(t4,"init",l),a(t4,"afterBuildStacks",i3),a(t4,"afterRender",s2),a(e3,"beforeRedraw",h))};class p{constructor(t4){this.axis=t4,this.stacks={changed:false}}renderStackTotals(){let t4=this.axis,i4=t4.waterfall.stacks,s3=t4.stacking&&t4.stacking.stackTotalGroup,o2=new e2(t4,t4.options.stackLabels||{},false,0,void 0);this.dummyStackItem=o2,s3&&r(i4,(t5=>{r(t5,((t6,i5)=>{o2.total=t6.stackTotal,o2.x=+i5,t6.label&&(o2.label=t6.label),e2.prototype.render.call(o2,s3),t6.label=o2.label,delete o2.label}))})),o2.total=null}}t3.Composition=p}(s||(s={})),s})),i(e,"Series/Waterfall/WaterfallPoint.js",[e["Series/Column/ColumnSeries.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],(function(t2,e2,i2){let{isNumber:s}=i2;class o extends t2.prototype.pointClass{getClassName(){let t3=e2.prototype.getClassName.call(this);return this.isSum?t3+=" highcharts-sum":this.isIntermediateSum&&(t3+=" highcharts-intermediate-sum"),t3}isValid(){return s(this.y)||this.isSum||!!this.isIntermediateSum}}return o})),i(e,"Series/Waterfall/WaterfallSeriesDefaults.js",[],(function(){return{dataLabels:{inside:true},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}}})),i(e,"Series/Waterfall/WaterfallSeries.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Core/Axis/WaterfallAxis.js"],e["Series/Waterfall/WaterfallPoint.js"],e["Series/Waterfall/WaterfallSeriesDefaults.js"]],(function(t2,e2,i2,s,o){let{column:a,line:r}=t2.seriesTypes,{addEvent:n,arrayMax:l,arrayMin:h,correctFloat:p,crisp:d,extend:c,isNumber:u,merge:g,objectEach:f,pick:b}=e2;function m(t3,e3){return Object.hasOwnProperty.call(t3,e3)}class y extends a{generatePoints(){a.prototype.generatePoints.apply(this);for(let t3=0,e3=this.points.length;t3<e3;t3++){let e4=this.points[t3],i3=this.processedYData[t3];u(i3)&&(e4.isIntermediateSum||e4.isSum)&&(e4.y=p(i3))}}processData(t3){let e3,i3,s2,o2,a2,r2;let n2=this.options,l2=this.yData,h2=n2.data,d2=l2.length,c2=n2.threshold||0;s2=i3=o2=a2=0;for(let t4=0;t4<d2;t4++)r2=l2[t4],e3=h2&&h2[t4]?h2[t4]:{},"sum"===r2||e3.isSum?l2[t4]=p(s2):"intermediateSum"===r2||e3.isIntermediateSum?(l2[t4]=p(i3),i3=0):(s2+=r2,i3+=r2),o2=Math.min(s2,o2),a2=Math.max(s2,a2);super.processData.call(this,t3),n2.stacking||(this.dataMin=o2+c2,this.dataMax=a2)}toYData(t3){return t3.isSum?"sum":t3.isIntermediateSum?"intermediateSum":t3.y}updateParallelArrays(t3,e3){super.updateParallelArrays.call(this,t3,e3),("sum"===this.yData[0]||"intermediateSum"===this.yData[0])&&(this.yData[0]=null)}pointAttribs(t3,e3){let i3=this.options.upColor;i3&&!t3.options.color&&u(t3.y)&&(t3.color=t3.y>0?i3:void 0);let s2=a.prototype.pointAttribs.call(this,t3,e3);return delete s2.dashstyle,s2}getGraphPath(){return[["M",0,0]]}getCrispPath(){var _a;let t3=this.data.filter((t4=>u(t4.y))),e3=this.yAxis,i3=t3.length,s2=((_a=this.graph)==null?void 0:_a.strokeWidth())||0,o2=this.xAxis.reversed,a2=this.yAxis.reversed,r2=this.options.stacking,n2=[];for(let l2=1;l2<i3;l2++){if(!(this.options.connectNulls||u(this.data[t3[l2].index-1].y)))continue;let i4=t3[l2].box,h2=t3[l2-1],p2=h2.y||0,c2=t3[l2-1].box;if(!i4||!c2)continue;let g2=e3.waterfall.stacks[this.stackKey],f2=p2>0?-c2.height:0;if(g2&&c2&&i4){let t4;let p3=g2[l2-1];if(r2){let i5=p3.connectorThreshold;t4=d(e3.translate(i5,false,true,false,true)+(a2?f2:0),s2)}else t4=d(c2.y+(h2.minPointLengthOffset||0),s2);n2.push(["M",(c2.x||0)+(o2?0:c2.width||0),t4],["L",(i4.x||0)+(o2&&i4.width||0),t4])}if(c2&&n2.length&&(!r2&&p2<0&&!a2||p2>0&&a2)){let t4=n2[n2.length-2];t4&&"number"==typeof t4[2]&&(t4[2]+=c2.height||0);let e4=n2[n2.length-1];e4&&"number"==typeof e4[2]&&(e4[2]+=c2.height||0)}}return n2}drawGraph(){r.prototype.drawGraph.call(this),this.graph&&this.graph.attr({d:this.getCrispPath()})}setStackedPoints(t3){var _a;let e3=this.options,i3=(_a=t3.waterfall)==null?void 0:_a.stacks,s2=e3.threshold||0,o2=this.stackKey,a2=this.xData,r2=a2.length,n2=s2,l2=n2,h2,p2=0,d2=0,c2=0,u2,g2,f2,b2,m2,y2,x,P,S=(t4,e4,i4,s3)=>{if(h2){if(u2)for(;i4<u2;i4++)h2.stackState[i4]+=s3;else h2.stackState[0]=t4,u2=h2.stackState.length;h2.stackState.push(h2.stackState[u2-1]+e4)}};if(t3.stacking&&i3&&this.reserveSpace()){P=i3.changed,(x=i3.alreadyChanged)&&0>x.indexOf(o2)&&(P=true),i3[o2]||(i3[o2]={});let t4=i3[o2];if(t4)for(let i4=0;i4<r2;i4++)(!t4[y2=a2[i4]]||P)&&(t4[y2]={negTotal:0,posTotal:0,stackTotal:0,threshold:0,stateIndex:0,stackState:[],label:P&&t4[y2]?t4[y2].label:void 0}),h2=t4[y2],(m2=this.yData[i4])>=0?h2.posTotal+=m2:h2.negTotal+=m2,b2=e3.data[i4],g2=h2.absolutePos=h2.posTotal,f2=h2.absoluteNeg=h2.negTotal,h2.stackTotal=g2+f2,u2=h2.stackState.length,b2&&b2.isIntermediateSum?(S(c2,d2,0,c2),c2=d2,d2=s2,n2^=l2,l2^=n2,n2^=l2):b2&&b2.isSum?(S(s2,p2,u2,0),n2=s2):(S(n2,m2,0,p2),b2&&(p2+=m2,d2+=m2)),h2.stateIndex++,h2.threshold=n2,n2+=h2.stackTotal;i3.changed=false,i3.alreadyChanged||(i3.alreadyChanged=[]),i3.alreadyChanged.push(o2)}}getExtremes(){let t3,e3,i3;let s2=this.options.stacking;return s2?(t3=this.yAxis.waterfall.stacks,e3=this.stackedYNeg=[],i3=this.stackedYPos=[],"overlap"===s2?f(t3[this.stackKey],(function(t4){e3.push(h(t4.stackState)),i3.push(l(t4.stackState))})):f(t3[this.stackKey],(function(t4){e3.push(t4.negTotal+t4.threshold),i3.push(t4.posTotal+t4.threshold)})),{dataMin:h(e3),dataMax:l(i3)}):{dataMin:this.dataMin,dataMax:this.dataMax}}}return y.defaultOptions=g(a.defaultOptions,o),y.compose=i2.compose,c(y.prototype,{pointValKey:"y",showLine:true,pointClass:s}),n(y,"afterColumnTranslate",(function(){let{options:t3,points:e3,yAxis:i3}=this,s2=b(t3.minPointLength,5),o2=s2/2,a2=t3.threshold||0,r2=t3.stacking,n2=i3.waterfall.stacks[this.stackKey],l2=a2,h2=a2,p2,f2,y2,x;for(let t4=0;t4<e3.length;t4++){let b2=e3[t4],P=this.processedYData[t4],S=c({x:0,y:0,width:0,height:0},b2.shapeArgs||{});b2.box=S;let M=[0,P],L=b2.y||0;if(r2){if(n2){let e4=n2[t4];"overlap"===r2?(f2=e4.stackState[e4.stateIndex--],p2=L>=0?f2:f2-L,m(e4,"absolutePos")&&delete e4.absolutePos,m(e4,"absoluteNeg")&&delete e4.absoluteNeg):(L>=0?(f2=e4.threshold+e4.posTotal,e4.posTotal-=L,p2=f2):(f2=e4.threshold+e4.negTotal,e4.negTotal-=L,p2=f2-L),!e4.posTotal&&u(e4.absolutePos)&&m(e4,"absolutePos")&&(e4.posTotal=e4.absolutePos,delete e4.absolutePos),!e4.negTotal&&u(e4.absoluteNeg)&&m(e4,"absoluteNeg")&&(e4.negTotal=e4.absoluteNeg,delete e4.absoluteNeg)),b2.isSum||(e4.connectorThreshold=e4.threshold+e4.stackTotal),i3.reversed?(y2=L>=0?p2-L:p2+L,x=p2):(y2=p2,x=p2-L),b2.below=y2<=a2,S.y=i3.translate(y2,false,true,false,true),S.height=Math.abs(S.y-i3.translate(x,false,true,false,true));let s3=i3.waterfall.dummyStackItem;s3&&(s3.x=t4,s3.label=n2[t4].label,s3.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[t4],this.stackedYPos[t4],void 0,this.xAxis))}}else p2=Math.max(h2,h2+L)+M[0],S.y=i3.translate(p2,false,true,false,true),b2.isSum?(S.y=i3.translate(M[1],false,true,false,true),S.height=Math.min(i3.translate(M[0],false,true,false,true),i3.len)-S.y,b2.below=M[1]<=a2):b2.isIntermediateSum?(L>=0?(y2=M[1]+l2,x=l2):(y2=l2,x=M[1]+l2),i3.reversed&&(y2^=x,x^=y2,y2^=x),S.y=i3.translate(y2,false,true,false,true),S.height=Math.abs(S.y-Math.min(i3.translate(x,false,true,false,true),i3.len)),l2+=M[1],b2.below=y2<=a2):(S.height=P>0?i3.translate(h2,false,true,false,true)-S.y:i3.translate(h2,false,true,false,true)-i3.translate(h2-P,false,true,false,true),h2+=P,b2.below=h2<a2),S.height<0&&(S.y+=S.height,S.height*=-1);b2.plotY=S.y,b2.yBottom=S.y+S.height,S.height<=s2&&!b2.isNull?(S.height=s2,S.y-=o2,b2.yBottom=S.y+S.height,b2.plotY=S.y,L<0?b2.minPointLengthOffset=-o2:b2.minPointLengthOffset=o2):(b2.isNull&&(S.width=0),b2.minPointLengthOffset=0);let C=b2.plotY+(b2.negative?S.height:0);b2.below&&(b2.plotY+=S.height),b2.tooltipPos&&(this.chart.inverted?b2.tooltipPos[0]=i3.len-C:b2.tooltipPos[1]=C),b2.isInside=this.isPointInside(b2);let k=d(b2.yBottom,this.borderWidth);S.y=d(S.y,this.borderWidth),S.height=k-S.y,g(true,b2.shapeArgs,S)}}),{order:2}),t2.registerSeriesType("waterfall",y),y})),i(e,"masters/highcharts-more.src.js",[e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Extensions/Pane/Pane.js"],e["Series/Bubble/BubbleSeries.js"],e["Series/PackedBubble/PackedBubbleSeries.js"],e["Series/PolarComposition.js"],e["Core/Axis/RadialAxis.js"],e["Series/Waterfall/WaterfallSeries.js"]],(function(t2,e2,i2,s,o,a,r,n){return t2.RadialAxis=r,s.compose(t2.Axis,t2.Chart,t2.Legend),o.compose(t2.Axis,t2.Chart,t2.Legend),i2.compose(t2.Chart,t2.Pointer),a.compose(t2.Axis,t2.Chart,t2.Pointer,t2.Series,t2.Tick,t2.Point,e2.seriesTypes.areasplinerange,e2.seriesTypes.column,e2.seriesTypes.line,e2.seriesTypes.spline),n.compose(t2.Axis,t2.Chart),t2}))}))})(highchartsMore);return highchartsMore.exports}var highchartsMoreExports=requireHighchartsMore();const HighchartsMore=getDefaultExportFromCjs$1(highchartsMoreExports);const CircleIconButton=props=>{const{aria:aria={},className:className,dark:dark,data:data={},disabled:disabled,htmlOptions:htmlOptions={},icon:icon,id:id,loading:loading=false,onClick:onClick=noop$2,type:type,target:target,link:link,newWindow:newWindow,variant:variant,size:size="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const sizeClass=size==="sm"?"size_small":"";const classes=classnames(buildCss("pb_circle_icon_button_kit"),sizeClass,globalProps(props),className);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx$1(Button,{aria:aria,dark:dark,disabled:disabled,htmlType:type,link:link,loading:loading,newWindow:newWindow,onClick:onClick,target:target,text:null,variant:variant,children:jsx$1(Icon,{fixedWidth:true,htmlOptions:{"aria-hidden":true},icon:icon})})})};const Title=props=>{if(props.variant);const{aria:aria={},children:children,className:className,color:color,data:data={},htmlOptions:htmlOptions={},id:id,size:size=3,displaySize:displaySize=null,bold:bold=true,tag:tag="h3",text:text,variant:variant=null}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isSizeNumberOrString=typeof size==="number"||typeof size==="string";const buildResponsiveSizeCss=()=>{const classes2=[];if(!isSizeNumberOrString){Object.entries(size).forEach((sizeObj=>{classes2.push(`pb_title_${sizeObj[0]}_${sizeObj[1]}`)}))}return classes2};const buildDisplaySize=()=>{if(displaySize){return[`pb_title_dynamic_${displaySize}`]}return[]};const titleClasses=["pb_title_kit"];if(isSizeNumberOrString){titleClasses.push(`pb_title_${size}`)}if(variant)titleClasses.push(`pb_title_${variant}`);if(color)titleClasses.push(`pb_title_${color}`);if(!bold)titleClasses.push("pb_title_thin");titleClasses.push(...buildDisplaySize());titleClasses.push(...buildResponsiveSizeCss());const classes=classnames(titleClasses.join(" "),globalProps(props),className);const Tag=`${tag}`;return jsx$1(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text||children})};const normalizeCharacters=widths=>widths.map((width=>parseInt(width.toString().replace(/[^0-9.]/gi,""))));const barValues=(normalizedValues,colors2)=>{const arrSum=value=>value.reduce(((a,b)=>a+b),0);const widthSum=arrSum(normalizedValues);return normalizedValues.map(((value,i)=>jsx$1("div",{className:classnames("pb_distribution_width",colors2[i]?`color_${colors2[i]}`:""),style:{width:`${value*100/widthSum}%`}},i)))};const DistributionBar=props=>{const{htmlOptions:htmlOptions={},size:size="lg",widths:widths=[1],colors:colors2=[]}=props;const normalizedValues=normalizeCharacters(widths);const htmlProps=buildHtmlProps(htmlOptions);return jsx$1("div",{className:classnames(`pb_distribution_bar_${size}`,globalProps(props)),...htmlProps,children:barValues(normalizedValues,colors2)})};const formatCurrencyDefaultValue=value=>{const numericValue=value.replace(/[^0-9.]/g,"");if(!numericValue)return"";const dollars=parseFloat(numericValue);if(isNaN(dollars))return"";return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:2}).format(dollars)};const formatCurrency=value=>{const numericValue=value.replace(/[^0-9]/g,"").slice(0,15);if(!numericValue||numericValue==="00")return"";const dollars=parseFloat((parseInt(numericValue)/100).toFixed(2));return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:2}).format(dollars)};const formatBasicPostal=value=>value.replace(/\D/g,"").slice(0,5);const formatExtendedPostal=value=>{const cleaned=value.replace(/\D/g,"").slice(0,9);return cleaned.replace(/(\d{5})(?=\d)/,"$1-")};const formatSSN=value=>{const cleaned=value.replace(/\D/g,"").slice(0,9);return cleaned.replace(/(\d{5})(?=\d)/,"$1-").replace(/(\d{3})(?=\d)/,"$1-")};const formatCreditCard=value=>{const cleaned=value.replace(/\D/g,"").slice(0,16);return cleaned.replace(/(\d{4})(?=\d)/g,"$1 ")};const formatCVV=value=>value.replace(/\D/g,"").slice(0,4);const INPUTMASKS={currency:{format:formatCurrency,formatDefaultValue:formatCurrencyDefaultValue,pattern:"^\\$\\d{1,3}(?:,\\d{3})*(?:\\.\\d{2})?$",placeholder:"$0.00",sanitize:value=>value.replace(/[$,]/g,"")},zipCode:{format:formatBasicPostal,formatDefaultValue:formatBasicPostal,pattern:"\\d{5}",placeholder:"12345",sanitize:value=>value},postalCode:{format:formatExtendedPostal,formatDefaultValue:formatExtendedPostal,pattern:"\\d{5}-\\d{4}",placeholder:"12345-6789",sanitize:value=>value.replace(/-/g,"")},ssn:{format:formatSSN,formatDefaultValue:formatSSN,pattern:"\\d{3}-\\d{2}-\\d{4}",placeholder:"123-45-6789",sanitize:value=>value.replace(/-/g,"")},creditCard:{format:formatCreditCard,formatDefaultValue:formatCreditCard,pattern:"\\d{4} \\d{4} \\d{4} \\d{4}",placeholder:"1234 5678 9012 3456",sanitize:value=>value.replace(/\s/g,"")},cvv:{format:formatCVV,formatDefaultValue:formatCVV,pattern:"\\d{3,4}",placeholder:"123",sanitize:value=>value}};const TextInput=(props,ref)=>{var _a,_b;const{addOn:addOn={icon:null,alignment:"right",border:true},aria:aria={},className:className,dark:dark=false,data:data={},disabled:disabled,error:error,htmlOptions:htmlOptions={},id:id,inline:inline=false,mask:mask=null,name:name,label:label,onChange:onChange2=()=>{},placeholder:placeholder,required:required,type:type="text",value:value="",children:children=null,autoComplete:autoComplete=true}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const filteredProps={...props};if(filteredProps.marginBottom===void 0){filteredProps.marginBottom="sm"}const{alignment:alignment,border:border,icon:icon}=addOn;const addOnAlignment=alignment==="left"?"left":"right";const borderToChange=addOnAlignment==="left"?"right":"left";const borderToggle=border===false?"off":"on";const borderCss=`border_${borderToChange}_${borderToggle}`;const shouldShowAddOn=icon!==null;const addOnCss=shouldShowAddOn?"text_input_wrapper_add_on":"";const addOnDarkModeCardCss=shouldShowAddOn&&dark?"add-on-card-dark":"";const css4=classnames(["pb_text_input_kit",inline?"inline":"",error?"error":"",globalProps(filteredProps),className]);const addOnIcon=jsx$1(Icon,{className:"add-on-icon",dark:dark,fixedWidth:false,icon:icon});const isMaskedInput=mask&&mask in INPUTMASKS;const handleChange=e=>{if(isMaskedInput){const inputValue=e.target.value;let cursorPosition=e.target.selectionStart;const isAtEnd=cursorPosition===inputValue.length;const formattedValue2=INPUTMASKS[mask].format(inputValue);let sanitizedValue=formattedValue2;if(INPUTMASKS[mask].sanitize){sanitizedValue=INPUTMASKS[mask].sanitize(formattedValue2)}e.target.value=formattedValue2;if(!isAtEnd){if(formattedValue2.length-inputValue.length===1){cursorPosition=cursorPosition+1}else if(mask==="currency"&&formattedValue2.length-inputValue.length===-1){cursorPosition=cursorPosition-1}e.target.selectionStart=e.target.selectionEnd=cursorPosition}onChange2(e,sanitizedValue)}else{onChange2(e)}};const childInput=children?children.type==="input":void 0;let formattedValue;if(isMaskedInput&&value){formattedValue=INPUTMASKS[mask].formatDefaultValue(value.toString())}else{formattedValue=value}const errorId=error?`${id}-error`:void 0;const textInput=childInput?React__default.cloneElement(children,{className:"text_input"}):createElement("input",{...domSafeProps(props),"aria-describedby":errorId,"aria-invalid":!!error,autoComplete:typeof autoComplete==="string"?autoComplete:autoComplete?void 0:"off",className:"text_input",disabled:disabled,id:id,key:id,name:name,onChange:isMaskedInput?handleChange:onChange2,pattern:isMaskedInput?(_a=INPUTMASKS[mask])==null?void 0:_a.pattern:void 0,placeholder:placeholder||(isMaskedInput?(_b=INPUTMASKS[mask])==null?void 0:_b.placeholder:void 0),ref:ref,required:required,type:type,value:formattedValue});const addOnInput=jsx$1(React__default.Fragment,{children:jsxs(Flex,{className:`add-on-${addOnAlignment} ${borderCss}`,vertical:"center",children:[addOnAlignment=="left"&&jsxs(Fragment$1,{children:[jsx$1(Card,{className:`${addOnDarkModeCardCss} add-on-card card-left-aligned`,dark:dark,children:addOnIcon}),textInput]}),addOnAlignment!="left"&&jsxs(Fragment$1,{children:[textInput,jsx$1(Card,{className:`${addOnDarkModeCardCss} add-on-card card-right-aligned`,dark:dark,children:addOnIcon})]})]})});const render=(()=>{if(children&&!childInput)return children;if(shouldShowAddOn)return addOnInput;return textInput})();return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:css4,children:[label&&jsx$1("label",{htmlFor:id,children:jsx$1(Caption,{className:"pb_text_input_kit_label",text:label})}),jsxs("div",{className:`${addOnCss} text_input_wrapper`,children:[render,error&&jsx$1(Body$1,{aria:{atomic:"true",live:"polite"},htmlOptions:{role:"alert"},id:errorId,status:"negative",text:error,variant:null})]})]})};const TextInput$1=forwardRef(TextInput);const FormPill=props=>{const{className:className,htmlOptions:htmlOptions={},id:id,text:text,name:name,onClick:onClick=()=>void 0,avatarUrl:avatarUrl,closeProps:closeProps={},wrapped:wrapped,size:size="",textTransform:textTransform="none",color:color="primary",data:data={},tabIndex:tabIndex,icon:icon=""}=props;const closeIconSize=size==="small"?"xs":"sm";const filteredProps={...props};delete filteredProps.truncate;const css4=classnames(icon?"pb_form_pill_kit_icon":"pb_form_pill_kit",wrapped?"pb_form_pill_wrapped":null,size==="small"?"pb_form_pill_small":null,`pb_form_pill_${color}`,`pb_form_pill_${textTransform}`,globalProps(filteredProps),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const renderTitle=(content,className2)=>{const titleComponent=jsx$1(Title,{className:className2,size:4,text:content,truncate:props.truncate});if(props.truncate){return jsx$1(Tooltip,{interaction:true,placement:"top",position:"fixed",text:content,children:titleComponent})}return titleComponent};return jsxs("div",{className:css4,id:id,tabIndex:tabIndex,...dataProps,...htmlProps,children:[(name&&!icon&&!text||name&&!icon&&text)&&jsxs(Fragment$1,{children:[jsx$1(Avatar,{imageUrl:avatarUrl,name:name,size:"xxs",status:null}),renderTitle(name,"pb_form_pill_text")]}),(name&&icon&&!text||name&&icon&&text)&&jsxs(Fragment$1,{children:[jsx$1(Avatar,{imageUrl:avatarUrl,name:name,size:"xxs",status:null}),renderTitle(name,"pb_form_pill_text"),jsx$1(Icon,{className:"pb_form_pill_icon",color:color,icon:icon})]}),!name&&icon&&text&&jsxs(Fragment$1,{children:[jsx$1(Icon,{className:"pb_form_pill_icon",color:color,icon:icon}),renderTitle(text,"pb_form_pill_tag")]}),!name&&!icon&&text&&renderTitle(text,"pb_form_pill_tag"),jsx$1("div",{className:"pb_form_pill_close",onClick:onClick,...closeProps,children:jsx$1(Icon,{fixedWidth:true,icon:"times",size:closeIconSize})})]})};var solidGauge={exports:{}};var hasRequiredSolidGauge;function requireSolidGauge(){if(hasRequiredSolidGauge)return solidGauge.exports;hasRequiredSolidGauge=1;(function(module){!function(t){module.exports?(t.default=t,module.exports=t):t("undefined"!=typeof Highcharts?Highcharts:void 0)}((function(t){var e=t?t._modules:{};function o(e2,o2,s,i){e2.hasOwnProperty(o2)||(e2[o2]=i.apply(null,s),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o2,module:e2[o2]}})))}o(e,"Core/Axis/Color/ColorAxisLike.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],(function(t2,e2){var o2,s;let{parse:i}=t2,{merge:r}=e2;return(s=o2||(o2={})).initDataClasses=function(t3){let e3=this.chart,o3=this.legendItem=this.legendItem||{},s2=this.options,a=t3.dataClasses||[],l,n,d=e3.options.chart.colorCount,h=0,u;this.dataClasses=n=[],o3.labels=[];for(let t4=0,o4=a.length;t4<o4;++t4)l=r(l=a[t4]),n.push(l),(e3.styledMode||!l.color)&&("category"===s2.dataClassColor?(e3.styledMode||(d=(u=e3.options.colors||[]).length,l.color=u[h]),l.colorIndex=h,++h===d&&(h=0)):l.color=i(s2.minColor).tweenTo(i(s2.maxColor),o4<2?.5:t4/(o4-1)))},s.initStops=function(){let t3=this.options,e3=this.stops=t3.stops||[[0,t3.minColor||""],[1,t3.maxColor||""]];for(let t4=0,o3=e3.length;t4<o3;++t4)e3[t4].color=i(e3[t4][1])},s.normalizedValue=function(t3){let e3=this.max||0,o3=this.min||0;return this.logarithmic&&(t3=this.logarithmic.log2lin(t3)),1-(e3-t3)/(e3-o3||1)},s.toColor=function(t3,e3){let o3,s2,i2,r2,a,l;let n=this.dataClasses,d=this.stops;if(n){for(l=n.length;l--;)if(s2=(a=n[l]).from,i2=a.to,(void 0===s2||t3>=s2)&&(void 0===i2||t3<=i2)){r2=a.color,e3&&(e3.dataClass=l,e3.colorIndex=a.colorIndex);break}}else{for(o3=this.normalizedValue(t3),l=d.length;l--&&!(o3>d[l][0]););s2=d[l]||d[l+1],o3=1-((i2=d[l+1]||s2)[0]-o3)/(i2[0]-s2[0]||1),r2=s2.color.tweenTo(i2.color,o3)}return r2},o2})),o(e,"Core/Axis/SolidGaugeAxis.js",[e["Core/Axis/Color/ColorAxisLike.js"],e["Core/Utilities.js"]],(function(t2,e2){let{extend:o2}=e2;return{init:function(e3){o2(e3,t2)}}})),o(e,"Series/SolidGauge/SolidGaugeSeriesDefaults.js",[],(function(){return{colorByPoint:true,dataLabels:{y:0}}})),o(e,"Series/SolidGauge/SolidGaugeSeries.js",[e["Extensions/BorderRadius.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/SolidGaugeAxis.js"],e["Series/SolidGauge/SolidGaugeSeriesDefaults.js"],e["Core/Utilities.js"]],(function(t2,e2,o2,s,i){let{gauge:r,pie:a}=e2.seriesTypes,{clamp:l,extend:n,isNumber:d,merge:h,pick:u,pInt:c}=i;class g extends r{translate(){let t3=this.yAxis;o2.init(t3),!t3.dataClasses&&t3.options.dataClasses&&t3.initDataClasses(t3.options),t3.initStops(),r.prototype.translate.call(this)}drawPoints(){let e3;let o3=this.yAxis,s2=o3.center,i2=this.options,r2=this.chart.renderer,a2=i2.overshoot,h2=i2.rounded&&void 0===i2.borderRadius,g2=d(a2)?a2/180*Math.PI:0;for(let a3 of(d(i2.threshold)&&(e3=o3.startAngleRad+o3.translate(i2.threshold,void 0,void 0,void 0,true)),this.thresholdAngleRad=u(e3,o3.startAngleRad),this.points))if(!a3.isNull){let e4=c(u(a3.options.radius,i2.radius,100))*s2[2]/200,d2=c(u(a3.options.innerRadius,i2.innerRadius,60))*s2[2]/200,p=Math.min(o3.startAngleRad,o3.endAngleRad),f=Math.max(o3.startAngleRad,o3.endAngleRad),C=a3.graphic,m=o3.startAngleRad+o3.translate(a3.y,void 0,void 0,void 0,true),x,A,y=o3.toColor(a3.y,a3);"none"===y&&(y=a3.color||this.color||"none"),"none"!==y&&(a3.color=y),m=l(m,p-g2,f+g2),false===i2.wrap&&(m=l(m,p,f));let R=h2?(e4-d2)/2/e4:0,S=Math.min(m,this.thresholdAngleRad)-R,j=Math.max(m,this.thresholdAngleRad)+R;j-S>2*Math.PI&&(j=S+2*Math.PI);let v=h2?"50%":0;i2.borderRadius&&(v=t2.optionsToObject(i2.borderRadius).radius),a3.shapeArgs=x={x:s2[0],y:s2[1],r:e4,innerR:d2,start:S,end:j,borderRadius:v},a3.startR=e4,C?(A=x.d,C.animate(n({fill:y},x)),A&&(x.d=A)):a3.graphic=C=r2.arc(x).attr({fill:y,"sweep-flag":0}).add(this.group),this.chart.styledMode||("square"!==i2.linecap&&C.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),C.attr({stroke:i2.borderColor||"none","stroke-width":i2.borderWidth||0})),C&&C.addClass(a3.getClassName(),true)}}animate(t3){t3||(this.startAngleRad=this.thresholdAngleRad,a.prototype.animate.call(this,t3))}}return g.defaultOptions=h(r.defaultOptions,s),e2.registerSeriesType("solidgauge",g),g})),o(e,"masters/modules/solid-gauge.src.js",[e["Core/Globals.js"]],(function(t2){return t2}))}))})(solidGauge);return solidGauge.exports}var solidGaugeExports=requireSolidGauge();const SolidGauge=getDefaultExportFromCjs$1(solidGaugeExports);const Legend=props=>{const{aria:aria={},className:className,color:color="data_1",dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,prefixText:prefixText,text:text}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const customColor=color.charAt(0)==="#"&&color;const customColorStyle={background:customColor};const bodyCss=classnames(buildCss("pb_legend_kit",customColor?"":color),globalProps(props),className);return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:bodyCss,id:id,children:jsxs(Body$1,{color:dark?"lighter":"light",children:[jsx$1("span",{className:`${customColor?"pb_legend_indicator_circle_custom":"pb_legend_indicator_circle"}`,style:customColorStyle}),prefixText&&jsx$1(Title,{dark:dark,size:4,tag:"span",text:` ${prefixText} `}),` ${text} `]})})};const MultiLevelSelectContext=createContext({});const Radio=forwardRef((({aria:aria={},alignment:alignment,children:children,className:className,customChildren:customChildren=false,dark:dark=false,disabled:disabled=false,error:error=false,data:data={},htmlOptions:htmlOptions={},id:id,label:label,name:name="radio_name",text:text="Radio Text",value:value="radio_text",checked:checked,onChange:onChange2=()=>{},...props},ref)=>{const internalRef=useRef(null);const setRefs=el=>{internalRef.current=el;if(typeof ref==="function"){ref(el)}else if(ref){ref.current=el}};const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_radio_kit",`${alignment==="vertical"?"vertical":""}`),dark?"dark":null,error?"error":null,globalProps(props),className);const classesCustom=classnames(dark?"dark":null,error?"error":null,globalProps(props),className);const checkedProps=checked!==void 0?{checked:checked}:{};const displayRadio=inputProps=>{if(children&&customChildren===false)return children;else return jsx$1("input",{...checkedProps,disabled:disabled,id:id,name:name,onChange:onChange2,ref:setRefs,type:"radio",value:value,...inputProps})};const handleContainerClick=event2=>{var _a;if(event2){const target=event2.target;if(target.id==="pb-radio-children-wrapper"||target.closest("#pb-radio-children-wrapper")){(_a=internalRef.current)==null?void 0:_a.click()}}};return customChildren?jsxs(Flex,{...ariaProps,...dataProps,...htmlProps,align:"center",className:classesCustom,cursor:"pointer",htmlFor:id,htmlOptions:{onClick:event2=>{handleContainerClick(event2)}},id:"radio-container",children:[jsxs("label",{className:buildCss("pb_radio_kit",alignment),children:[jsx$1("input",{...checkedProps,disabled:disabled,id:id,name:name,onChange:onChange2,ref:setRefs,type:"radio",value:value,...props}),jsx$1("span",{className:"pb_radio_button"})]}),jsxs("div",{id:"pb-radio-children-wrapper",children:[" ",children," "]})]}):jsxs("label",{...ariaProps,...dataProps,...htmlProps,className:classes,htmlFor:id,children:[displayRadio(props),jsx$1("span",{className:"pb_radio_button"}),jsx$1(Body$1,{dark:dark,status:error?"negative":null,text:label,variant:null})]})}));Radio.displayName="Radio";const MultiLevelSelectOptions=({children:children,items:items,...props})=>{const{variant:variant,inputName:inputName,renderNestedOptions:renderNestedOptions,isTreeRowExpanded:isTreeRowExpanded,handleToggleClick:handleToggleClick,handleRadioButtonClick:handleRadioButtonClick,handledropdownItemClick:handledropdownItemClick,filterItem:filterItem}=useContext(MultiLevelSelectContext);const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multi_level_select_options"),globalProps(props),className);return jsx$1("ul",{...ariaProps,...dataProps,...htmlProps,className:classes,children:Array.isArray(items)&&items.map((item=>jsx$1("div",{children:jsxs("li",{className:"dropdown_item","data-name":item.id,children:[jsxs("div",{className:"dropdown_item_checkbox_row",children:[!item.parent_id&&!item.children?null:jsx$1("div",{children:jsx$1(CircleIconButton,{className:item.children&&item.children.length>0?"":"toggle_icon",icon:isTreeRowExpanded(item)?"chevron-down":"chevron-right",onClick:event2=>handleToggleClick(item.id,event2),variant:"link"})},isTreeRowExpanded(item)?"chevron-down":"chevron-right"),variant==="single"?item.hideRadio?jsx$1(Body$1,{children:item.label}):jsx$1(Radio,{checked:item.checked,id:`${item.id}-${item.label}`,label:item.label,name:inputName,onChange:e=>handleRadioButtonClick(e),padding:item.children?"none":"xs",type:"radio",value:item.label}):jsx$1(Checkbox,{id:item.id,text:item.label,children:jsx$1("input",{checked:item.checked,disabled:item.disabled,name:item.label,onChange:e=>{handledropdownItemClick(e,!item.checked)},type:"checkbox",value:item.label})}),children&&(typeof children==="function"?children(item):children)]}),isTreeRowExpanded(item)&&item.children&&item.children.length>0&&(variant==="single"||!filterItem)&&jsx$1("div",{children:renderNestedOptions(item.children)})]})},item.id)))})};const filterFormattedDataById=(formattedData,id)=>{const matched=[];const recursiveSearch=(data,term)=>{for(const item of data){if(item.id.toLowerCase()===term.toLowerCase()){matched.push(item);return}if(item.children&&item.children.length>0){recursiveSearch(item.children,term)}}};recursiveSearch(formattedData,id);return matched};const findByFilter=(formattedData,searchTerm)=>{const matchedItems=[];const recursiveSearch=(data,term)=>{for(const item of data){if(item.label.toLowerCase().includes(term.toLowerCase())){matchedItems.push(item)}if(item.children){recursiveSearch(item.children,term)}}};recursiveSearch(formattedData,searchTerm);return matchedItems};const getAncestorsOfUnchecked=(data,item)=>{if(item.parent_id){const ancestor=filterFormattedDataById(data,item.parent_id);ancestor[0].checked=false;ancestor[0].parent_id&&getAncestorsOfUnchecked(data,ancestor[0])}return data};const getCheckedItems=data=>{const checkedItems=[];if(!Array.isArray(data)){return}data.forEach((item=>{if(item.checked){checkedItems.push(item)}if(item.children&&item.children.length>0){const childCheckedItems=getCheckedItems(item.children);checkedItems.push(...childCheckedItems)}}));return checkedItems};const getDefaultCheckedItems=treeData=>{const checkedDefault=[];const traverseTree=items=>{if(!Array.isArray(items)){return}items.forEach((item=>{if(item.checked){if(item.children&&item.children.length>0){const selectableChildren=item.children.filter((child=>!child.disabled));const uncheckedChildren=selectableChildren.filter((child=>!child.checked));if(uncheckedChildren.length===0){checkedDefault.push(item);return}}else{const parent=items.find((parentItem=>parentItem.id===item.parentId));if(!parent||!parent.checked){checkedDefault.push(item)}}}if(item.children&&item.children.length>0){traverseTree(item.children)}}))};traverseTree(treeData);return checkedDefault};const recursiveCheckParent=(item,data)=>{if(item.parent_id!==null){const parent=filterFormattedDataById(data,item.parent_id);const allChildrenChecked=parent[0].children.every((child=>child.checked));if(allChildrenChecked){parent[0].checked=true;const parentHasParent=parent[0].parent_id!==null;if(parentHasParent){recursiveCheckParent(parent[0],data)}}}return data};const getExpandedItems=(treeData,selectedIds,showCheckedChildren=true)=>{const expandedItems=[];const traverse=(items,ancestors=[])=>{for(let i=0;i<items.length;i++){const item=items[i];const itemAncestors=[...ancestors,item];if(item.expanded){expandedItems.push(item.id)}if(showCheckedChildren){if(selectedIds&&selectedIds.length&&selectedIds.includes(item.id)){expandedItems.push(...itemAncestors.map((ancestor=>ancestor.id)))}if(Array.isArray(item.children)){const hasCheckedChildren=item.children.some((child=>child.checked));if(hasCheckedChildren){expandedItems.push(...itemAncestors.map((ancestor=>ancestor.id)))}}}if(Array.isArray(item.children)){traverse(item.children,itemAncestors)}}};traverse(treeData);return expandedItems};const MultiLevelSelect=forwardRef((props=>{const{aria:aria={},className:className,data:data={},disabled:disabled=false,error:error,htmlOptions:htmlOptions={},id:id,inputDisplay:inputDisplay="pills",inputName:inputName,name:name,label:label,required:required=false,returnAllSelected:returnAllSelected=false,showCheckedChildren:showCheckedChildren=true,treeData:treeData,onChange:onChange2=()=>null,onSelect:onSelect=()=>null,selectedIds:selectedIds,variant:variant="multi",children:children,wrapped:wrapped,pillColor:pillColor="primary"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multi_level_select"),error&&"error",globalProps(props),className);const dropdownRef=useRef(null);const[isDropdownClosed,setIsDropdownClosed]=useState(true);const[filterItem,setFilterItem]=useState("");const[formattedData,setFormattedData]=useState([]);const[returnedArray,setReturnedArray]=useState([]);const[defaultReturn,setDefaultReturn]=useState([]);const initialExpandedItems=getExpandedItems(treeData,selectedIds,showCheckedChildren);const[expanded,setExpanded]=useState(initialExpandedItems);const[singleSelectedItem,setSingleSelectedItem]=useState({id:[],value:"",item:[]});const arrowDownElementId=`arrow_down_${id}`;const arrowUpElementId=`arrow_up_${id}`;const modifyRecursive=(tree,check)=>{if(!Array.isArray(tree)){return}return tree.map((item=>{if(!item.disabled){item.checked=check}item.children=modifyRecursive(item.children,check);return item}))};const addCheckedAndParentProperty=(treeData2,selectedIds2,parent_id=null,depth=0,parentDisabled=false)=>{if(!Array.isArray(treeData2)){return}return treeData2.map((item=>{const isDisabled=item.disabled||parentDisabled&&!returnAllSelected;const newItem={...item,checked:Boolean(selectedIds2&&selectedIds2.length&&selectedIds2.includes(item.id)),parent_id:parent_id,depth:depth,disabled:isDisabled};if(newItem.children&&newItem.children.length>0){const children2=item.checked&&!returnAllSelected?modifyRecursive(item.children,true):item.children;newItem.children=addCheckedAndParentProperty(children2,selectedIds2,newItem.id,depth+1,isDisabled)}return newItem}))};useEffect((()=>{const formattedData2=addCheckedAndParentProperty(treeData,variant==="single"?[selectedIds==null?void 0:selectedIds[0]]:selectedIds);setFormattedData(formattedData2);if(variant==="single"){if((selectedIds==null?void 0:selectedIds.length)===0||!(selectedIds==null?void 0:selectedIds.length)){setSingleSelectedItem({id:[],value:"",item:[]})}else{if((selectedIds==null?void 0:selectedIds.length)!==0&&!singleSelectedItem.value){const selectedItem=filterFormattedDataById(formattedData2,selectedIds[0]);if(!selectedItem.length){setSingleSelectedItem({id:[],value:"",item:[]})}else{const{id:id2,label:label2}=selectedItem[0];setSingleSelectedItem({id:[id2],value:label2,item:selectedItem})}}}}}),[treeData,selectedIds]);useEffect((()=>{if(returnAllSelected){setReturnedArray(getCheckedItems(formattedData))}else if(variant==="single"){setDefaultReturn(singleSelectedItem.item)}else{setDefaultReturn(getDefaultCheckedItems(formattedData))}}),[formattedData]);useEffect((()=>{const handleClickOutside=event2=>{if(dropdownRef.current&&!dropdownRef.current.contains(event2.target)&&event2.target.id!==arrowDownElementId&&event2.target.id!==arrowUpElementId){setIsDropdownClosed(true)}};window.addEventListener("click",handleClickOutside);return()=>{window.removeEventListener("click",handleClickOutside)}}),[]);useEffect((()=>{if(id){window[`clearMultiLevelSelect_${id}`]=()=>{const resetData=modifyRecursive(formattedData,false);setFormattedData(resetData);setReturnedArray([]);setDefaultReturn([]);setSingleSelectedItem({id:[],value:"",item:[]});onSelect([])};return()=>{delete window[`clearMultiLevelSelect_${id}`]}}}),[formattedData,id,onSelect]);const modifyValue=(id2,tree,check)=>{if(!Array.isArray(tree)){return}return tree.map((item=>{if(item.id!=id2)item.children=modifyValue(id2,item.children,check);else{if(!item.disabled){item.checked=check}if(variant==="single"){item.children=modifyRecursive(item.children,!check)}else{item.children=modifyRecursive(item.children,check)}}return item}))};const checkItem=item=>{const tree=cloneDeep(formattedData);if(returnAllSelected){return modifyValue(item.id,tree,true)}else{const checkedTree=modifyValue(item.id,tree,true);return recursiveCheckParent(item,checkedTree)}};const unCheckItem=item=>{const tree=cloneDeep(formattedData);if(returnAllSelected){return modifyValue(item.id,tree,false)}else{const uncheckedTree=modifyValue(item.id,tree,false);return getAncestorsOfUnchecked(uncheckedTree,item)}};const changeItem=(item,check)=>{const tree=check?checkItem(item):unCheckItem(item);setFormattedData(tree);return tree};const handlePillClose=(event2,clickedItem)=>{event2.stopPropagation();const updatedTree=changeItem(clickedItem,false);if(returnAllSelected){onSelect(getCheckedItems(updatedTree));onChange2({target:{name:name,value:getCheckedItems(updatedTree)}})}else{onSelect(getDefaultCheckedItems(updatedTree));onChange2({target:{name:name,value:getDefaultCheckedItems(updatedTree)}})}};const handleInputWrapperClick=e=>{if(e.target.id==="multiselect_input"||e.target.classList.contains("pb_form_pill_tag")||disabled){return}setIsDropdownClosed(!isDropdownClosed)};const handledropdownItemClick=(e,check)=>{const clickedItem=e.target.parentNode.id;setFilterItem("");const filtered=filterFormattedDataById(formattedData,clickedItem);const updatedTree=changeItem(filtered[0],check);if(returnAllSelected){onSelect(getCheckedItems(updatedTree));onChange2({target:{name:name,value:getCheckedItems(updatedTree)}})}else{onSelect(getDefaultCheckedItems(updatedTree));onChange2({target:{name:name,value:getDefaultCheckedItems(updatedTree)}})}};const handleRadioButtonClick=e=>{const{id:id2,value:inputText}=e.target;const selectedItemID=id2.match(/^[^-]*/)[0];const treeWithNoSelections=modifyRecursive(formattedData,false);const treeWithSelectedItem=modifyValue(selectedItemID,treeWithNoSelections,true);const selectedItem=filterFormattedDataById(treeWithSelectedItem,selectedItemID);setFormattedData(treeWithSelectedItem);setSingleSelectedItem({id:[selectedItemID],value:inputText,item:selectedItem});setFilterItem("");setIsDropdownClosed(true);onSelect(selectedItem);onChange2({target:{name:name,value:selectedItem}})};const handleRadioInputChange=inputText=>{modifyRecursive(formattedData,false);setDefaultReturn([]);setSingleSelectedItem({id:[],value:inputText,item:[]});setFilterItem(inputText)};const isTreeRowExpanded=item=>expanded.indexOf(item.id)>-1;const handleToggleClick=(id2,event2)=>{event2.stopPropagation();const clickedItem=filterFormattedDataById(formattedData,id2);if(clickedItem){let expandedArray=[...expanded];const itemExpanded=isTreeRowExpanded(clickedItem[0]);if(itemExpanded)expandedArray=expandedArray.filter((i=>i!=clickedItem[0].id));else expandedArray.push(clickedItem[0].id);setExpanded(expandedArray)}};const itemsSelectedLength=()=>{let items;if(returnAllSelected&&returnedArray&&returnedArray.length){items=returnedArray.length}else if(!returnAllSelected&&defaultReturn&&defaultReturn.length){items=defaultReturn.length}return items};const renderNestedOptions=items=>{const hasOptionsChild=React__default.Children.toArray(props.children).some((child=>React__default.isValidElement(child)&&child.type===MultiLevelSelect.Options));if(hasOptionsChild){return React__default.Children.map(props.children,(child=>{if(React__default.isValidElement(child)&&child.type===MultiLevelSelect.Options){return React__default.cloneElement(child,{items:items})}return null}))}else{return jsx$1(MultiLevelSelectOptions,{items:items})}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[label&&jsx$1(Caption,{marginBottom:"xs",text:label}),jsx$1(MultiLevelSelectContext.Provider,{value:{variant:variant,inputName:inputName,renderNestedOptions:renderNestedOptions,isTreeRowExpanded:isTreeRowExpanded,handleToggleClick:handleToggleClick,handleRadioButtonClick:handleRadioButtonClick,handledropdownItemClick:handledropdownItemClick,filterItem:filterItem},children:jsxs("div",{className:"wrapper",ref:dropdownRef,children:[jsxs("div",{className:"input_wrapper",onClick:handleInputWrapperClick,children:[jsxs("div",{className:"input_inner_container",children:[variant==="single"&&defaultReturn.length!==0?defaultReturn.map((selectedItem=>jsx$1("input",{disabled:disabled,name:`${name}[]`,required:required,type:"hidden",value:selectedItem.id},selectedItem.id))):null,variant!=="single"&&jsxs(Fragment$1,{children:[returnAllSelected&&returnedArray.length!==0?returnedArray.map((item=>jsx$1("input",{disabled:disabled,name:`${name}[]`,required:required,type:"hidden",value:item.id},item.id))):null,!returnAllSelected?defaultReturn.map((item=>jsx$1("input",{disabled:disabled,name:`${name}[]`,required:required,type:"hidden",value:item.id},item.id))):null,returnAllSelected&&returnedArray.length!==0&&inputDisplay==="pills"?returnedArray.map(((item,index2)=>jsx$1(FormPill,{color:pillColor,onClick:event2=>handlePillClose(event2,item),text:item.label,wrapped:wrapped},index2))):null,!returnAllSelected&&defaultReturn.length!==0&&inputDisplay==="pills"?defaultReturn.map(((item,index2)=>jsx$1(FormPill,{color:pillColor,onClick:event2=>handlePillClose(event2,item),text:item.label,wrapped:wrapped},index2))):null,returnAllSelected&&returnedArray.length!==0&&inputDisplay==="pills"&&jsx$1("br",{}),!returnAllSelected&&defaultReturn.length!==0&&inputDisplay==="pills"&&jsx$1("br",{})]}),jsx$1("input",{disabled:disabled,id:"multiselect_input",onChange:e=>{variant==="single"?handleRadioInputChange(e.target.value):setFilterItem(e.target.value)},onClick:()=>setIsDropdownClosed(false),placeholder:inputDisplay==="none"&&itemsSelectedLength()?`${itemsSelectedLength()} ${itemsSelectedLength()===1?"item":"items"} selected`:"Start typing...",required:required,value:singleSelectedItem.value||filterItem})]}),isDropdownClosed?jsx$1("div",{id:arrowDownElementId,children:jsx$1(Icon,{icon:"chevron-down",id:arrowDownElementId,size:"xs"})},"chevron-down"):jsx$1("div",{id:arrowUpElementId,children:jsx$1(Icon,{icon:"chevron-up",id:arrowUpElementId,size:"xs"})},"chevron-up")]}),jsx$1("div",{className:`dropdown_menu ${isDropdownClosed?"close":"open"}`,children:renderNestedOptions(filterItem?findByFilter(formattedData,filterItem):formattedData)})]})}),error&&jsx$1(Body$1,{dark:props.dark,status:"negative",text:error})]})}));MultiLevelSelect.displayName="MultiLevelSelect";MultiLevelSelect.Options=MultiLevelSelectOptions;const Nav=props=>{const{aria:aria={},borderless:borderless=false,children:children,className:className,data:data={},dark:dark=false,extendedUnderline:extendedUnderline=false,highlight:highlight=true,htmlOptions:htmlOptions={},id:id,link:link="#",onClick:onClick,orientation:orientation="vertical",title:title="",variant:variant="normal",itemSpacing:itemSpacing}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const cardCss=classnames(buildCss("pb_nav_list",variant,orientation,{highlight:highlight,borderless:borderless}),variant==="normal"&&orientation==="horizontal"&&extendedUnderline&&"pb_nav_extended_underline",globalProps(props),className);const childrenWithProps=React__default.Children.map(children,(child=>{if(React__default.isValidElement(child)){const childProps={orientation:orientation,variant:variant,itemSpacing:itemSpacing};return React__default.cloneElement(child,childProps)}return child}));return jsxs("nav",{...ariaProps,...dataProps,...htmlProps,className:cardCss,id:id,children:[title&&jsx$1("div",{className:"pb_nav_list_title",children:jsx$1("a",{className:"pb_nav_list_item_link_text",href:link,onClick:onClick,children:jsx$1(Caption,{dark:dark,size:"md",text:`${title}`})})}),jsx$1("div",{className:"pb_nav_wrapper",children:childrenWithProps})]})};const NavItem=props=>{const fontWeightDefault=(orientation2,variant2)=>orientation2==="horizontal"&&variant2==="subtle"?"regular":orientation2==="horizontal"&&variant2==="normal"?"bold":"regular";const{active:active=false,highlighted_border:highlighted_border=true,aria:aria={},orientation:orientation,variant:variant,fontWeight:fontWeight=fontWeightDefault(orientation,variant),children:children,className:className,collapsible:collapsible,data:data={},dark:dark=false,fontSize:fontSize="normal",htmlOptions:htmlOptions={},iconLeft:iconLeft,iconRight:iconRight,onIconRightClick:onIconRightClick,onIconLeftClick:onIconLeftClick,id:id,imageUrl:imageUrl,link:link,onClick:onClick,target:target="_self",text:text="",collapsibleTrail:collapsibleTrail,collapsed:collapsed,itemSpacing:itemSpacing,margin:margin,marginBottom:marginBottom,marginTop:marginTop,marginRight:marginRight,marginLeft:marginLeft,marginX:marginX,marginY:marginY}=props;const spacingMarginProps={margin:margin,marginBottom:marginBottom,marginTop:marginTop,marginRight:marginRight,marginLeft:marginLeft,marginX:marginX,marginY:marginY};const filterItemSpacing=obj=>{const filteredPadding2={};const filteredMargin2={};for(const key in obj){if(key.startsWith("padding")){filteredPadding2[key]=obj[key]}else if(key.startsWith("margin")){filteredMargin2[key]=obj[key]}}return{filteredPadding:filteredPadding2,filteredMargin:filteredMargin2}};const{filteredPadding:filteredPadding,filteredMargin:filteredMargin}=filterItemSpacing(itemSpacing);const finalItemSpacing={...filteredMargin||{},...Object.entries(spacingMarginProps).reduce(((acc,[prop,value])=>{if(value){acc[prop]=value}return acc}),{})};const filteredProps={...props};filteredProps==null?true:delete filteredProps.margin;filteredProps==null?true:delete filteredProps.marginX;filteredProps==null?true:delete filteredProps.marginY;filteredProps==null?true:delete filteredProps.marginBottom;filteredProps==null?true:delete filteredProps.marginTop;filteredProps==null?true:delete filteredProps.marginRight;filteredProps==null?true:delete filteredProps.marginLeft;const isLink=!!link;const Tag=isLink?"a":"div";const activeClass=active===true?"active":"";const highlightedBorderClass=active===true&&highlighted_border===false?"highlighted_border_none":"";const collapsibleTrailClass=collapsible&&collapsibleTrail?"collapsible_trail":"";const fontSizeMapping={small:"font_size_small",normal:"font_size_normal"};const fontWeightMapping={bold:"font_bold",bolder:"font_bolder",regular:"font_regular"};const fontSizeClass=fontSizeMapping[fontSize];const fontWeightClass=fontWeightMapping[fontWeight];const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const tagClasses=classnames(collapsible?"pb_nav_list_item_link_collapsible":"pb_nav_list_item_link");const classes=classnames(buildCss("pb_nav_list_kit_item",activeClass,highlightedBorderClass),collapsible?buildCss("pb_collapsible_nav_item",activeClass,highlightedBorderClass):"",fontSizeClass,fontWeightClass,tagClasses,collapsible?globalProps(filteredProps,{...filteredPadding}):globalProps(props,{...itemSpacing}),className);const handleIconClick=e=>{if(onIconLeftClick){e.stopPropagation();onIconLeftClick()}};const childrenWithProps=React__default.Children.map(children,(child=>{if(React__default.isValidElement(child)){const childProps={itemSpacing:itemSpacing};return React__default.cloneElement(child,childProps)}return child}));const collapsibleClasses=buildCss("collapsible_nav_wrapper",activeClass,highlightedBorderClass,collapsibleTrailClass);const handleKeyDown2=e=>{if(!isLink&&(e.key==="Enter"||e.key===" ")){e.preventDefault();onClick==null?void 0:onClick()}};return jsx$1(Fragment$1,{children:collapsible?jsx$1(Fragment$1,{children:jsxs(Collapsible,{className:collapsibleClasses,collapsed:collapsed,icon:iconRight&&iconRight,iconSize:"xs",id:id,onClick:onClick,onIconClick:onIconRightClick,children:[jsx$1(Collapsible.Main,{className:globalProps({...finalItemSpacing}),dark:dark,children:jsxs(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,href:isLink?link:void 0,id:id,role:!isLink?"button":void 0,tabIndex:!isLink?0:void 0,target:isLink?target:void 0,children:[imageUrl&&jsx$1("div",{className:"pb_nav_list_item_icon_section_collapsible",onClick:e=>handleIconClick(e),onKeyDown:!isLink?handleKeyDown2:void 0,children:jsx$1(Image,{className:"pb_nav_img_wrapper",url:imageUrl})},imageUrl),iconLeft&&jsx$1("div",{className:"pb_nav_list_item_icon_section_collapsible",onClick:e=>handleIconClick(e),children:jsx$1(Icon,{className:"pb_nav_list_item_icon_left_collapsible",fixedWidth:true,icon:iconLeft})},iconLeft),jsx$1("span",{className:"pb_nav_list_item_text_collapsible",children:text})]})}),jsx$1(Collapsible.Content,{children:childrenWithProps})]})}):jsxs(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,href:isLink?link:void 0,id:id,onClick:onClick,onKeyDown:!isLink?handleKeyDown2:void 0,role:!isLink?"button":void 0,tabIndex:!isLink?0:void 0,target:isLink?target:void 0,children:[imageUrl&&jsx$1("div",{className:"pb_nav_list_item_icon_section",children:jsx$1(Image,{className:"pb_nav_img_wrapper",url:imageUrl})},imageUrl),iconLeft&&jsx$1("div",{className:"pb_nav_list_item_icon_section",children:jsx$1(Icon,{className:"pb_nav_list_item_icon_left",fixedWidth:true,icon:iconLeft})},iconLeft),jsx$1("span",{className:"pb_nav_list_item_text",children:text||children}),iconRight&&jsx$1("div",{className:"pb_nav_list_item_icon_section",children:jsx$1(Icon,{className:"pb_nav_list_item_icon_right",fixedWidth:true,icon:iconRight})},iconRight)]})})};const Passphrase=props=>{const{aria:aria={},className:className,confirmation:confirmation=false,data:data={},dark:dark=false,htmlOptions:htmlOptions={},id:id,inputProps:inputProps={},label:label=(confirmation?"Confirm Passphrase":"Passphrase"),onChange:onChange2=()=>void 0,showTipsBelow:showTipsBelow="always",tips:tips=[],uncontrolled:uncontrolled=false,value:value=""}=props;const[uncontrolledValue,setUncontrolledValue]=useState("");const[showPopover,setShowPopover]=useState(false);const[showPassphrase,setShowPassphrase]=useState(false);const handleChange=useCallback((e=>uncontrolled?setUncontrolledValue(e.target.value):onChange2(e)),[uncontrolled,onChange2]);const displayValue=useMemo((()=>uncontrolled?uncontrolledValue:value),[value,uncontrolledValue,uncontrolled]);const toggleShowPopover=()=>setShowPopover(!showPopover);const handleShouldClosePopover=shouldClosePopover=>{setShowPopover(!shouldClosePopover)};const toggleShowPassphrase=e=>{e.preventDefault();setShowPassphrase(!showPassphrase)};const tipClass=classnames("passphrase-popover",showTipsBelow==="always"?null:`show-below-${showTipsBelow}`);const ariaProps=buildAriaProps(aria);const classes=classnames(buildCss("pb_passphrase"),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const popoverReference=jsx$1(CircleIconButton,{className:tipClass,dark:dark,icon:"info-circle",onClick:toggleShowPopover,variant:"link"});const shieldIcon=getAllIcons()["shieldCheck"];const eyeIcon=getAllIcons()["eye"];return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("label",{children:[jsxs(Flex,{align:"baseline",children:[jsx$1(Caption,{className:"passphrase-label",text:label}),tips.length>0&&!confirmation&&jsx$1(PbReactPopover,{className:"passphrase-tips",closeOnClick:"outside",placement:"right",reference:popoverReference,shouldClosePopover:handleShouldClosePopover,show:showPopover,children:jsxs(Flex,{align:"center",orientation:"column",children:[jsx$1(Caption,{marginBottom:"xs",text:"Tips for a good passphrase"}),jsx$1("div",{children:tips.map(((tip,i)=>jsxs(Caption,{marginBottom:"xs",size:"xs",children:[jsx$1(Icon,{className:"svg-inline--fa",customIcon:shieldIcon.icon,marginRight:"xs"}),tip]},i)))})]})})]}),jsxs("div",{className:"passphrase-text-input-wrapper",children:[jsx$1(TextInput$1,{className:"passphrase-text-input",dark:dark,marginBottom:"xs",onChange:handleChange,placeholder:"Enter a passphrase...",type:showPassphrase?"text":"password",value:displayValue,...inputProps}),jsxs("span",{className:"show-passphrase-icon",onClick:toggleShowPassphrase,children:[jsx$1(Body$1,{className:showPassphrase?"hide-icon":"",color:"light",dark:dark,children:jsx$1(Icon,{icon:"eye-slash"})}),jsx$1(Body$1,{className:showPassphrase?"":"hide-icon",color:"light",dark:dark,children:jsx$1(Icon,{className:"svg-inline--fa",customIcon:eyeIcon.icon})})]})]})]})})};const barGraphTheme={title:{text:"",style:{color:colors$1.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"column"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors$1.bg_dark],[1,colors$1.bg_dark]]},style:{fontFamily:typography.font_family_base,color:colors$1.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},colors:[colors$1.data_1,colors$1.data_2,colors$1.data_3,colors$1.data_4,colors$1.data_5,colors$1.data_6,colors$1.data_7],credits:{enabled:false},legend:{enabled:false,itemStyle:{color:colors$1.text_lt_light,fill:colors$1.text_lt_light,fontSize:typography.text_smaller}},xAxis:{gridLineWidth:0,lineColor:colors$1.border_light,tickColor:colors$1.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors$1.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors$1.border_light,minorGridLineColor:colors$1.border_light,lineWidth:0,tickWidth:0,labels:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbBarGraph=props=>{const{aria:aria={},data:data={},id:id,htmlOptions:htmlOptions={},options:options2,className:className}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_bar_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options2||typeof options2!=="object"){console.error("❌ Invalid options passed to <PbBarGraph />",options2);return{}}return Highcharts$1.merge({},barGraphTheme,options2)}),[options2]);return jsx$1("div",{children:jsx$1(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts$1,options:mergedOptions})})};const pbCircleChartTheme={title:{text:"",style:{color:colors$1.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},chart:{type:"pie"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors$1.bg_dark],[1,colors$1.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors$1.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{pie:{dataLabels:{enabled:false,connectorShape:"straight",connectorWidth:3,format:"<div>{point.name}</div>",style:{fontFamily:typography.font_family_base,fontSize:typography.text_smaller,color:colors$1.text_lt_light,fontWeight:typography.regular,textOutline:"2px $white"}},innerSize:"50%",borderColor:"",borderWidth:null,colors:[colors$1.data_1,colors$1.data_2,colors$1.data_3,colors$1.data_4,colors$1.data_5,colors$1.data_6,colors$1.data_7]}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemStyle:{fontFamily:typography.font_family_base,color:colors$1.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors$1.text_lt_default},itemHiddenStyle:{color:colors$1.text_lt_lighter}},credits:{enabled:false}};const PbCircleChart=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_circle_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options2||typeof options2!=="object"){console.error("❌ Invalid options passed to <PbCircleChart />",options2);return{}}return Highcharts$1.merge({},pbCircleChartTheme,options2)}),[options2]);return jsx$1("div",{children:jsx$1(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts$1,options:mergedOptions})})};const pbGaugeGraphTheme={title:{text:"",style:{fontFamily:typography.font_family_base,fontSize:typography.text_larger}},chart:{type:"solidgauge",events:{render(){this.container;const arc=this.container.querySelector("path.gauge-pane");if(arc)arc.setAttribute("stroke-linejoin","round")}}},pane:{size:"90%",startAngle:-100,endAngle:100,background:[{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane",borderColor:colors$1.border_light,borderRadius:"50%"}]},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors$1.bg_dark],[1,colors$1.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors$1.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},yAxis:{min:0,max:100,lineWidth:0,tickPositions:[]},plotOptions:{solidgauge:{borderColor:colors$1.data_1,borderWidth:20,color:colors$1.data_1,radius:90,innerRadius:"90%",y:-26,dataLabels:{borderWidth:0,color:colors$1.text_lt_default,enabled:true,format:'<span class="fix">{y:,f}</span>',style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}},credits:{enabled:false}};const PbGaugeChart=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,ref:ref,options:options2={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_gauge_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options2||typeof options2!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options2);return{}}return Highcharts$1.merge({},pbGaugeGraphTheme,options2)}),[options2]);HighchartsMore(Highcharts$1);SolidGauge(Highcharts$1);return jsx$1("div",{children:jsx$1(HighchartsReact,{containerProps:{className:classnames(classes),id:id,ref:ref,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts$1,options:mergedOptions})})};const pbLineGraphTheme={title:{text:"",style:{color:colors$1.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"line"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors$1.bg_dark],[1,colors$1.bg_dark]]},followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors$1.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{line:{dataLabels:{enabled:false}}},credits:{enabled:false},legend:{enabled:false,itemStyle:{fontFamily:typography.font_family_base,color:colors$1.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors$1.text_lt_default},itemHiddenStyle:{color:colors$1.text_lt_lighter}},colors:[colors$1.data_1,colors$1.data_2,colors$1.data_3,colors$1.data_4,colors$1.data_5,colors$1.data_6,colors$1.data_7],xAxis:{gridLineWidth:0,lineColor:colors$1.border_light,tickColor:colors$1.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors$1.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors$1.border_light,minorGridLineColor:colors$1.border_light,lineWidth:0,tickWidth:0,tickPixelInterval:50,labels:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors$1.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbLineGraph=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_line_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options2||typeof options2!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options2);return{}}return Highcharts$1.merge({},pbLineGraphTheme,options2)}),[options2]);return jsx$1("div",{children:jsx$1(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts$1,options:mergedOptions})})};var intlTelInputWithUtils={exports:{}};var hasRequiredIntlTelInputWithUtils;function requireIntlTelInputWithUtils(){if(hasRequiredIntlTelInputWithUtils)return intlTelInputWithUtils.exports;hasRequiredIntlTelInputWithUtils=1;(function(module){(function(factory){if(module.exports){module.exports=factory()}else{window.intlTelInput=factory()}})((()=>{var factoryOutput=(()=>{var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from3,except,desc)=>{if(from3&&typeof from3==="object"||typeof from3==="function"){for(let key of __getOwnPropNames(from3))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from3[key],enumerable:!(desc=__getOwnPropDesc(from3,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var intlTelInputWithUtils_exports={};__export(intlTelInputWithUtils_exports,{default:()=>intlTelInputWithUtils_default});var rawCountryData=[["af","93"],["ax","358",1,["18"]],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"]];var allCountries=[];for(let i=0;i<rawCountryData.length;i++){const c=rawCountryData[i];allCountries[i]={name:"",iso2:c[0],dialCode:c[1],priority:c[2]||0,areaCodes:c[3]||null,nodeById:{}}}var data_default=allCountries;var countryTranslations={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"Åland Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barthélemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"Côte d’Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Curaçao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"Réunion",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"São Tomé & Príncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"};var countries_default=countryTranslations;var interfaceTranslations={selectedCountryAriaLabel:"Selected country",noCountrySelected:"No country selected",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"};var interface_default=interfaceTranslations;var allTranslations={...countries_default,...interface_default};var en_default=allTranslations;for(let i=0;i<data_default.length;i++){data_default[i].name=en_default[data_default[i].iso2]}var id=0;var defaults2={allowDropdown:true,autoPlaceholder:"polite",containerClass:"",countryOrder:null,countrySearch:true,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:true,formatAsYouType:true,formatOnDisplay:true,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtilsOnInit:"",nationalMode:true,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:true,separateDialCode:false,strictMode:false,useFullscreenPopup:typeof navigator!=="undefined"&&typeof window!=="undefined"?/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500:false,utilsScript:"",validationNumberType:"MOBILE"};var regionlessNanpNumbers=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];var getNumeric=s=>s.replace(/\D/g,"");var normaliseString=(s="")=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var isRegionlessNanp=number=>{const numeric2=getNumeric(number);if(numeric2.charAt(0)==="1"){const areaCode=numeric2.substr(1,3);return regionlessNanpNumbers.indexOf(areaCode)!==-1}return false};var translateCursorPosition=(relevantChars,formattedValue,prevCaretPos,isDeleteForwards)=>{if(prevCaretPos===0&&!isDeleteForwards){return 0}let count2=0;for(let i=0;i<formattedValue.length;i++){if(/[+0-9]/.test(formattedValue[i])){count2++}if(count2===relevantChars&&!isDeleteForwards){return i+1}if(isDeleteForwards&&count2===relevantChars+1){return i}}return formattedValue.length};var createEl=(name,attrs,container)=>{const el=document.createElement(name);if(attrs){Object.entries(attrs).forEach((([key,value])=>el.setAttribute(key,value)))}if(container){container.appendChild(el)}return el};var forEachInstance=(method,...args)=>{const{instances:instances}=intlTelInput2;Object.values(instances).forEach((instance=>instance[method](...args)))};var Iti=class{constructor(input,customOptions={}){this.id=id++;this.telInput=input;this.highlightedItem=null;this.options=Object.assign({},defaults2,customOptions);this.hadInitialPlaceholder=Boolean(input.getAttribute("placeholder"))}_init(){if(this.options.useFullscreenPopup){this.options.fixDropdownWidth=false}if(this.options.onlyCountries.length===1){this.options.initialCountry=this.options.onlyCountries[0]}if(this.options.separateDialCode){this.options.nationalMode=false}if(this.options.allowDropdown&&!this.options.showFlags&&!this.options.separateDialCode){this.options.nationalMode=false}if(this.options.useFullscreenPopup&&!this.options.dropdownContainer){this.options.dropdownContainer=document.body}this.isAndroid=typeof navigator!=="undefined"?/Android/i.test(navigator.userAgent):false;this.isRTL=!!this.telInput.closest("[dir=rtl]");const showOnDefaultSide=this.options.allowDropdown||this.options.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!showOnDefaultSide:showOnDefaultSide;if(this.options.separateDialCode){if(this.isRTL){this.originalPaddingRight=this.telInput.style.paddingRight}else{this.originalPaddingLeft=this.telInput.style.paddingLeft}}this.options.i18n={...en_default,...this.options.i18n};const autoCountryPromise=new Promise(((resolve,reject)=>{this.resolveAutoCountryPromise=resolve;this.rejectAutoCountryPromise=reject}));const utilsScriptPromise=new Promise(((resolve,reject)=>{this.resolveUtilsScriptPromise=resolve;this.rejectUtilsScriptPromise=reject}));this.promise=Promise.all([autoCountryPromise,utilsScriptPromise]);this.selectedCountryData={};this._processCountryData();this._generateMarkup();this._setInitialState();this._initListeners();this._initRequests()}_processCountryData(){this._processAllCountries();this._processDialCodes();this._translateCountryNames();this._sortCountries()}_sortCountries(){if(this.options.countryOrder){this.options.countryOrder=this.options.countryOrder.map((country=>country.toLowerCase()))}this.countries.sort(((a,b)=>{const{countryOrder:countryOrder}=this.options;if(countryOrder){const aIndex=countryOrder.indexOf(a.iso2);const bIndex=countryOrder.indexOf(b.iso2);const aIndexExists=aIndex>-1;const bIndexExists=bIndex>-1;if(aIndexExists||bIndexExists){if(aIndexExists&&bIndexExists){return aIndex-bIndex}return aIndexExists?-1:1}}return a.name.localeCompare(b.name)}))}_addToDialCodeMap(iso2,dialCode,priority){if(dialCode.length>this.dialCodeMaxLen){this.dialCodeMaxLen=dialCode.length}if(!this.dialCodeToIso2Map.hasOwnProperty(dialCode)){this.dialCodeToIso2Map[dialCode]=[]}for(let i=0;i<this.dialCodeToIso2Map[dialCode].length;i++){if(this.dialCodeToIso2Map[dialCode][i]===iso2){return}}const index2=priority!==void 0?priority:this.dialCodeToIso2Map[dialCode].length;this.dialCodeToIso2Map[dialCode][index2]=iso2}_processAllCountries(){const{onlyCountries:onlyCountries,excludeCountries:excludeCountries}=this.options;if(onlyCountries.length){const lowerCaseOnlyCountries=onlyCountries.map((country=>country.toLowerCase()));this.countries=data_default.filter((country=>lowerCaseOnlyCountries.indexOf(country.iso2)>-1))}else if(excludeCountries.length){const lowerCaseExcludeCountries=excludeCountries.map((country=>country.toLowerCase()));this.countries=data_default.filter((country=>lowerCaseExcludeCountries.indexOf(country.iso2)===-1))}else{this.countries=data_default}}_translateCountryNames(){for(let i=0;i<this.countries.length;i++){const iso2=this.countries[i].iso2.toLowerCase();if(this.options.i18n.hasOwnProperty(iso2)){this.countries[i].name=this.options.i18n[iso2]}}}_processDialCodes(){this.dialCodes={};this.dialCodeMaxLen=0;this.dialCodeToIso2Map={};for(let i=0;i<this.countries.length;i++){const c=this.countries[i];if(!this.dialCodes[c.dialCode]){this.dialCodes[c.dialCode]=true}this._addToDialCodeMap(c.iso2,c.dialCode,c.priority)}for(let i=0;i<this.countries.length;i++){const c=this.countries[i];if(c.areaCodes){const rootIso2Code=this.dialCodeToIso2Map[c.dialCode][0];for(let j=0;j<c.areaCodes.length;j++){const areaCode=c.areaCodes[j];for(let k=1;k<areaCode.length;k++){const partialDialCode=c.dialCode+areaCode.substr(0,k);this._addToDialCodeMap(rootIso2Code,partialDialCode);this._addToDialCodeMap(c.iso2,partialDialCode)}this._addToDialCodeMap(c.iso2,c.dialCode+areaCode)}}}}_generateMarkup(){var _a;this.telInput.classList.add("iti__tel-input");if(!this.telInput.hasAttribute("autocomplete")&&!(this.telInput.form&&this.telInput.form.hasAttribute("autocomplete"))){this.telInput.setAttribute("autocomplete","off")}const{allowDropdown:allowDropdown,separateDialCode:separateDialCode,showFlags:showFlags,containerClass:containerClass,hiddenInput:hiddenInput,dropdownContainer:dropdownContainer,fixDropdownWidth:fixDropdownWidth,useFullscreenPopup:useFullscreenPopup,countrySearch:countrySearch,i18n:i18n}=this.options;let parentClass="iti";if(allowDropdown){parentClass+=" iti--allow-dropdown"}if(showFlags){parentClass+=" iti--show-flags"}if(containerClass){parentClass+=` ${containerClass}`}if(!useFullscreenPopup){parentClass+=" iti--inline-dropdown"}const wrapper=createEl("div",{class:parentClass});(_a=this.telInput.parentNode)==null?void 0:_a.insertBefore(wrapper,this.telInput);if(allowDropdown||showFlags||separateDialCode){this.countryContainer=createEl("div",{class:"iti__country-container"},wrapper);if(this.showSelectedCountryOnLeft){this.countryContainer.style.left="0px"}else{this.countryContainer.style.right="0px"}if(allowDropdown){this.selectedCountry=createEl("button",{type:"button",class:"iti__selected-country","aria-expanded":"false","aria-label":this.options.i18n.selectedCountryAriaLabel,"aria-haspopup":"true","aria-controls":`iti-${this.id}__dropdown-content`,role:"combobox"},this.countryContainer);if(this.telInput.disabled){this.selectedCountry.setAttribute("disabled","true")}}else{this.selectedCountry=createEl("div",{class:"iti__selected-country"},this.countryContainer)}const selectedCountryPrimary=createEl("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=createEl("div",{class:"iti__flag"},selectedCountryPrimary);this.selectedCountryA11yText=createEl("span",{class:"iti__a11y-text"},this.selectedCountryInner);if(allowDropdown){this.dropdownArrow=createEl("div",{class:"iti__arrow","aria-hidden":"true"},selectedCountryPrimary)}if(separateDialCode){this.selectedDialCode=createEl("div",{class:"iti__selected-dial-code"},this.selectedCountry)}if(allowDropdown){const extraClasses=fixDropdownWidth?"":"iti--flexible-dropdown-width";this.dropdownContent=createEl("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${extraClasses}`});if(countrySearch){this.searchInput=createEl("input",{type:"text",class:"iti__search-input",placeholder:i18n.searchPlaceholder,role:"combobox","aria-expanded":"true","aria-label":i18n.searchPlaceholder,"aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},this.dropdownContent);this.searchResultsA11yText=createEl("span",{class:"iti__a11y-text"},this.dropdownContent)}this.countryList=createEl("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":i18n.countryListAriaLabel},this.dropdownContent);this._appendListItems();if(countrySearch){this._updateSearchResultsText()}if(dropdownContainer){let dropdownClasses="iti iti--container";if(useFullscreenPopup){dropdownClasses+=" iti--fullscreen-popup"}else{dropdownClasses+=" iti--inline-dropdown"}this.dropdown=createEl("div",{class:dropdownClasses});this.dropdown.appendChild(this.dropdownContent)}else{this.countryContainer.appendChild(this.dropdownContent)}}}wrapper.appendChild(this.telInput);this._updateInputPadding();if(hiddenInput){const telInputName=this.telInput.getAttribute("name")||"";const names=hiddenInput(telInputName);if(names.phone){this.hiddenInput=createEl("input",{type:"hidden",name:names.phone});wrapper.appendChild(this.hiddenInput)}if(names.country){this.hiddenInputCountry=createEl("input",{type:"hidden",name:names.country});wrapper.appendChild(this.hiddenInputCountry)}}}_appendListItems(){for(let i=0;i<this.countries.length;i++){const c=this.countries[i];const extraClass=i===0?"iti__highlight":"";const listItem=createEl("li",{id:`iti-${this.id}__item-${c.iso2}`,class:`iti__country ${extraClass}`,tabindex:"-1",role:"option","data-dial-code":c.dialCode,"data-country-code":c.iso2,"aria-selected":"false"},this.countryList);c.nodeById[this.id]=listItem;let content="";if(this.options.showFlags){content+=`<div class='iti__flag iti__${c.iso2}'></div>`}content+=`<span class='iti__country-name'>${c.name}</span>`;content+=`<span class='iti__dial-code'>+${c.dialCode}</span>`;listItem.insertAdjacentHTML("beforeend",content)}}_setInitialState(overrideAutoCountry=false){const attributeValue=this.telInput.getAttribute("value");const inputValue=this.telInput.value;const useAttribute=attributeValue&&attributeValue.charAt(0)==="+"&&(!inputValue||inputValue.charAt(0)!=="+");const val=useAttribute?attributeValue:inputValue;const dialCode=this._getDialCode(val);const isRegionlessNanpNumber=isRegionlessNanp(val);const{initialCountry:initialCountry,geoIpLookup:geoIpLookup}=this.options;const isAutoCountry=initialCountry==="auto"&&geoIpLookup;if(dialCode&&!isRegionlessNanpNumber){this._updateCountryFromNumber(val)}else if(!isAutoCountry||overrideAutoCountry){const lowerInitialCountry=initialCountry?initialCountry.toLowerCase():"";const isValidInitialCountry=lowerInitialCountry&&this._getCountryData(lowerInitialCountry,true);if(isValidInitialCountry){this._setCountry(lowerInitialCountry)}else{if(dialCode&&isRegionlessNanpNumber){this._setCountry("us")}else{this._setCountry()}}}if(val){this._updateValFromNumber(val)}}_initListeners(){this._initTelInputListeners();if(this.options.allowDropdown){this._initDropdownListeners()}if((this.hiddenInput||this.hiddenInputCountry)&&this.telInput.form){this._initHiddenInputListener()}}_initHiddenInputListener(){var _a;this._handleHiddenInputSubmit=()=>{if(this.hiddenInput){this.hiddenInput.value=this.getNumber()}if(this.hiddenInputCountry){this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||""}};(_a=this.telInput.form)==null?void 0:_a.addEventListener("submit",this._handleHiddenInputSubmit)}_initDropdownListeners(){this._handleLabelClick=e=>{if(this.dropdownContent.classList.contains("iti__hide")){this.telInput.focus()}else{e.preventDefault()}};const label=this.telInput.closest("label");if(label){label.addEventListener("click",this._handleLabelClick)}this._handleClickSelectedCountry=()=>{if(this.dropdownContent.classList.contains("iti__hide")&&!this.telInput.disabled&&!this.telInput.readOnly){this._openDropdown()}};this.selectedCountry.addEventListener("click",this._handleClickSelectedCountry);this._handleCountryContainerKeydown=e=>{const isDropdownHidden=this.dropdownContent.classList.contains("iti__hide");if(isDropdownHidden&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)){e.preventDefault();e.stopPropagation();this._openDropdown()}if(e.key==="Tab"){this._closeDropdown()}};this.countryContainer.addEventListener("keydown",this._handleCountryContainerKeydown)}_initRequests(){let{loadUtilsOnInit:loadUtilsOnInit,utilsScript:utilsScript,initialCountry:initialCountry,geoIpLookup:geoIpLookup}=this.options;if(!loadUtilsOnInit&&utilsScript){console.warn("intl-tel-input: The `utilsScript` option is deprecated and will be removed in a future release! Please use the `loadUtilsOnInit` option instead.");loadUtilsOnInit=utilsScript}if(loadUtilsOnInit&&!intlTelInput2.utils){this._handlePageLoad=()=>{var _a;window.removeEventListener("load",this._handlePageLoad);(_a=intlTelInput2.loadUtils(loadUtilsOnInit))==null?void 0:_a.catch((()=>{}))};if(intlTelInput2.documentReady()){this._handlePageLoad()}else{window.addEventListener("load",this._handlePageLoad)}}else{this.resolveUtilsScriptPromise()}const isAutoCountry=initialCountry==="auto"&&geoIpLookup;if(isAutoCountry&&!this.selectedCountryData.iso2){this._loadAutoCountry()}else{this.resolveAutoCountryPromise()}}_loadAutoCountry(){if(intlTelInput2.autoCountry){this.handleAutoCountry()}else if(!intlTelInput2.startedLoadingAutoCountry){intlTelInput2.startedLoadingAutoCountry=true;if(typeof this.options.geoIpLookup==="function"){this.options.geoIpLookup(((iso2="")=>{const iso2Lower=iso2.toLowerCase();const isValidIso2=iso2Lower&&this._getCountryData(iso2Lower,true);if(isValidIso2){intlTelInput2.autoCountry=iso2Lower;setTimeout((()=>forEachInstance("handleAutoCountry")))}else{this._setInitialState(true);forEachInstance("rejectAutoCountryPromise")}}),(()=>{this._setInitialState(true);forEachInstance("rejectAutoCountryPromise")}))}}}_openDropdownWithPlus(){this._openDropdown();this.searchInput.value="+";this._filterCountries("",true)}_initTelInputListeners(){const{strictMode:strictMode,formatAsYouType:formatAsYouType,separateDialCode:separateDialCode,formatOnDisplay:formatOnDisplay,allowDropdown:allowDropdown,countrySearch:countrySearch}=this.options;let userOverrideFormatting=false;if(new RegExp("\\p{L}","u").test(this.telInput.value)){userOverrideFormatting=true}this._handleInputEvent=e=>{if(this.isAndroid&&(e==null?void 0:e.data)==="+"&&separateDialCode&&allowDropdown&&countrySearch){const currentCaretPos=this.telInput.selectionStart||0;const valueBeforeCaret=this.telInput.value.substring(0,currentCaretPos-1);const valueAfterCaret=this.telInput.value.substring(currentCaretPos);this.telInput.value=valueBeforeCaret+valueAfterCaret;this._openDropdownWithPlus();return}if(this._updateCountryFromNumber(this.telInput.value)){this._triggerCountryChange()}const isFormattingChar=(e==null?void 0:e.data)&&/[^+0-9]/.test(e.data);const isPaste=(e==null?void 0:e.inputType)==="insertFromPaste"&&this.telInput.value;if(isFormattingChar||isPaste&&!strictMode){userOverrideFormatting=true}else if(!/[^+0-9]/.test(this.telInput.value)){userOverrideFormatting=false}const disableFormatOnSetNumber=(e==null?void 0:e.detail)&&e.detail["isSetNumber"]&&!formatOnDisplay;if(formatAsYouType&&!userOverrideFormatting&&!disableFormatOnSetNumber){const currentCaretPos=this.telInput.selectionStart||0;const valueBeforeCaret=this.telInput.value.substring(0,currentCaretPos);const relevantCharsBeforeCaret=valueBeforeCaret.replace(/[^+0-9]/g,"").length;const isDeleteForwards=(e==null?void 0:e.inputType)==="deleteContentForward";const formattedValue=this._formatNumberAsYouType();const newCaretPos=translateCursorPosition(relevantCharsBeforeCaret,formattedValue,currentCaretPos,isDeleteForwards);this.telInput.value=formattedValue;this.telInput.setSelectionRange(newCaretPos,newCaretPos)}};this.telInput.addEventListener("input",this._handleInputEvent);if(strictMode||separateDialCode){this._handleKeydownEvent=e=>{if(e.key&&e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey){if(separateDialCode&&allowDropdown&&countrySearch&&e.key==="+"){e.preventDefault();this._openDropdownWithPlus();return}if(strictMode){const value=this.telInput.value;const alreadyHasPlus=value.charAt(0)==="+";const isInitialPlus=!alreadyHasPlus&&this.telInput.selectionStart===0&&e.key==="+";const isNumeric=/^[0-9]$/.test(e.key);const isAllowedChar=separateDialCode?isNumeric:isInitialPlus||isNumeric;const newValue=value.slice(0,this.telInput.selectionStart)+e.key+value.slice(this.telInput.selectionEnd);const newFullNumber=this._getFullNumber(newValue);const coreNumber=intlTelInput2.utils.getCoreNumber(newFullNumber,this.selectedCountryData.iso2);const hasExceededMaxLength=this.maxCoreNumberLength&&coreNumber.length>this.maxCoreNumberLength;let isChangingDialCode=false;if(alreadyHasPlus){const currentCountry=this.selectedCountryData.iso2;const newCountry=this._getCountryFromNumber(newFullNumber);isChangingDialCode=newCountry!==currentCountry}if(!isAllowedChar||hasExceededMaxLength&&!isChangingDialCode&&!isInitialPlus){e.preventDefault()}}}};this.telInput.addEventListener("keydown",this._handleKeydownEvent)}}_cap(number){const max2=parseInt(this.telInput.getAttribute("maxlength")||"",10);return max2&&number.length>max2?number.substr(0,max2):number}_trigger(name,detailProps={}){const e=new CustomEvent(name,{bubbles:true,cancelable:true,detail:detailProps});this.telInput.dispatchEvent(e)}_openDropdown(){const{fixDropdownWidth:fixDropdownWidth,countrySearch:countrySearch}=this.options;if(fixDropdownWidth){this.dropdownContent.style.width=`${this.telInput.offsetWidth}px`}this.dropdownContent.classList.remove("iti__hide");this.selectedCountry.setAttribute("aria-expanded","true");this._setDropdownPosition();if(countrySearch){const firstCountryItem=this.countryList.firstElementChild;if(firstCountryItem){this._highlightListItem(firstCountryItem,false);this.countryList.scrollTop=0}this.searchInput.focus()}this._bindDropdownListeners();this.dropdownArrow.classList.add("iti__arrow--up");this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer){this.options.dropdownContainer.appendChild(this.dropdown)}if(!this.options.useFullscreenPopup){const inputPosRelativeToVP=this.telInput.getBoundingClientRect();const inputHeight=this.telInput.offsetHeight;if(this.options.dropdownContainer){this.dropdown.style.top=`${inputPosRelativeToVP.top+inputHeight}px`;this.dropdown.style.left=`${inputPosRelativeToVP.left}px`;this._handleWindowScroll=()=>this._closeDropdown();window.addEventListener("scroll",this._handleWindowScroll)}}}_bindDropdownListeners(){this._handleMouseoverCountryList=e=>{var _a;const listItem=(_a=e.target)==null?void 0:_a.closest(".iti__country");if(listItem){this._highlightListItem(listItem,false)}};this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList);this._handleClickCountryList=e=>{var _a;const listItem=(_a=e.target)==null?void 0:_a.closest(".iti__country");if(listItem){this._selectListItem(listItem)}};this.countryList.addEventListener("click",this._handleClickCountryList);let isOpening=true;this._handleClickOffToClose=()=>{if(!isOpening){this._closeDropdown()}isOpening=false};document.documentElement.addEventListener("click",this._handleClickOffToClose);let query="";let queryTimer=null;this._handleKeydownOnDropdown=e=>{if(["ArrowUp","ArrowDown","Enter","Escape"].includes(e.key)){e.preventDefault();e.stopPropagation();if(e.key==="ArrowUp"||e.key==="ArrowDown"){this._handleUpDownKey(e.key)}else if(e.key==="Enter"){this._handleEnterKey()}else if(e.key==="Escape"){this._closeDropdown()}}if(!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)){e.stopPropagation();if(queryTimer){clearTimeout(queryTimer)}query+=e.key.toLowerCase();this._searchForCountry(query);queryTimer=setTimeout((()=>{query=""}),1e3)}};document.addEventListener("keydown",this._handleKeydownOnDropdown);if(this.options.countrySearch){const doFilter=()=>{const inputQuery=this.searchInput.value.trim();if(inputQuery){this._filterCountries(inputQuery)}else{this._filterCountries("",true)}};let keyupTimer=null;this._handleSearchChange=()=>{if(keyupTimer){clearTimeout(keyupTimer)}keyupTimer=setTimeout((()=>{doFilter();keyupTimer=null}),100)};this.searchInput.addEventListener("input",this._handleSearchChange);this.searchInput.addEventListener("click",(e=>e.stopPropagation()))}}_searchForCountry(query){for(let i=0;i<this.countries.length;i++){const c=this.countries[i];const startsWith=c.name.substr(0,query.length).toLowerCase()===query;if(startsWith){const listItem=c.nodeById[this.id];this._highlightListItem(listItem,false);this._scrollTo(listItem);break}}}_filterCountries(query,isReset=false){let noCountriesAddedYet=true;this.countryList.innerHTML="";const normalisedQuery=normaliseString(query);for(let i=0;i<this.countries.length;i++){const c=this.countries[i];const normalisedCountryName=normaliseString(c.name);const countryInitials=c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((word=>word[0])).join("").toLowerCase();const fullDialCode=`+${c.dialCode}`;if(isReset||normalisedCountryName.includes(normalisedQuery)||fullDialCode.includes(normalisedQuery)||c.iso2.includes(normalisedQuery)||countryInitials.includes(normalisedQuery)){const listItem=c.nodeById[this.id];if(listItem){this.countryList.appendChild(listItem)}if(noCountriesAddedYet){this._highlightListItem(listItem,false);noCountriesAddedYet=false}}}if(noCountriesAddedYet){this._highlightListItem(null,false)}this.countryList.scrollTop=0;this._updateSearchResultsText()}_updateSearchResultsText(){const{i18n:i18n}=this.options;const count2=this.countryList.childElementCount;let searchText;if(count2===0){searchText=i18n.zeroSearchResults}else if(count2===1){searchText=i18n.oneSearchResult}else{searchText=i18n.multipleSearchResults.replace("${count}",count2.toString())}this.searchResultsA11yText.textContent=searchText}_handleUpDownKey(key){var _a,_b;let next2=key==="ArrowUp"?(_a=this.highlightedItem)==null?void 0:_a.previousElementSibling:(_b=this.highlightedItem)==null?void 0:_b.nextElementSibling;if(!next2&&this.countryList.childElementCount>1){next2=key==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild}if(next2){this._scrollTo(next2);this._highlightListItem(next2,false)}}_handleEnterKey(){if(this.highlightedItem){this._selectListItem(this.highlightedItem)}}_updateValFromNumber(fullNumber){let number=fullNumber;if(this.options.formatOnDisplay&&intlTelInput2.utils&&this.selectedCountryData){const useNational=this.options.nationalMode||number.charAt(0)!=="+"&&!this.options.separateDialCode;const{NATIONAL:NATIONAL,INTERNATIONAL:INTERNATIONAL}=intlTelInput2.utils.numberFormat;const format=useNational?NATIONAL:INTERNATIONAL;number=intlTelInput2.utils.formatNumber(number,this.selectedCountryData.iso2,format)}number=this._beforeSetNumber(number);this.telInput.value=number}_updateCountryFromNumber(fullNumber){const iso2=this._getCountryFromNumber(fullNumber);if(iso2!==null){return this._setCountry(iso2)}return false}_getCountryFromNumber(fullNumber){const plusIndex=fullNumber.indexOf("+");let number=plusIndex?fullNumber.substring(plusIndex):fullNumber;const selectedDialCode=this.selectedCountryData.dialCode;const isNanp=selectedDialCode==="1";if(number&&isNanp&&number.charAt(0)!=="+"){if(number.charAt(0)!=="1"){number=`1${number}`}number=`+${number}`}if(this.options.separateDialCode&&selectedDialCode&&number.charAt(0)!=="+"){number=`+${selectedDialCode}${number}`}const dialCode=this._getDialCode(number,true);const numeric2=getNumeric(number);if(dialCode){const iso2Codes=this.dialCodeToIso2Map[getNumeric(dialCode)];const alreadySelected=iso2Codes.indexOf(this.selectedCountryData.iso2)!==-1&&numeric2.length<=dialCode.length-1;const isRegionlessNanpNumber=selectedDialCode==="1"&&isRegionlessNanp(numeric2);if(!isRegionlessNanpNumber&&!alreadySelected){for(let j=0;j<iso2Codes.length;j++){if(iso2Codes[j]){return iso2Codes[j]}}}}else if(number.charAt(0)==="+"&&numeric2.length){return""}else if((!number||number==="+")&&!this.selectedCountryData.iso2){return this.defaultCountry}return null}_highlightListItem(listItem,shouldFocus){const prevItem=this.highlightedItem;if(prevItem){prevItem.classList.remove("iti__highlight");prevItem.setAttribute("aria-selected","false")}this.highlightedItem=listItem;if(this.highlightedItem){this.highlightedItem.classList.add("iti__highlight");this.highlightedItem.setAttribute("aria-selected","true");const activeDescendant=this.highlightedItem.getAttribute("id")||"";this.selectedCountry.setAttribute("aria-activedescendant",activeDescendant);if(this.options.countrySearch){this.searchInput.setAttribute("aria-activedescendant",activeDescendant)}}if(shouldFocus){this.highlightedItem.focus()}}_getCountryData(iso2,allowFail){for(let i=0;i<this.countries.length;i++){if(this.countries[i].iso2===iso2){return this.countries[i]}}if(allowFail){return null}throw new Error(`No country data for '${iso2}'`)}_setCountry(iso2){const{separateDialCode:separateDialCode,showFlags:showFlags,i18n:i18n}=this.options;const prevCountry=this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=iso2?this._getCountryData(iso2,false)||{}:{};if(this.selectedCountryData.iso2){this.defaultCountry=this.selectedCountryData.iso2}if(this.selectedCountryInner){let flagClass="";let a11yText="";if(iso2&&showFlags){flagClass=`iti__flag iti__${iso2}`;a11yText=`${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`}else{flagClass="iti__flag iti__globe";a11yText=i18n.noCountrySelected}this.selectedCountryInner.className=flagClass;this.selectedCountryA11yText.textContent=a11yText}this._setSelectedCountryTitleAttribute(iso2,separateDialCode);if(separateDialCode){const dialCode=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.selectedDialCode.innerHTML=dialCode;this._updateInputPadding()}this._updatePlaceholder();this._updateMaxLength();return prevCountry.iso2!==iso2}_updateInputPadding(){if(this.selectedCountry){const selectedCountryWidth=this.selectedCountry.offsetWidth||this._getHiddenSelectedCountryWidth();const inputPadding=selectedCountryWidth+6;if(this.showSelectedCountryOnLeft){this.telInput.style.paddingLeft=`${inputPadding}px`}else{this.telInput.style.paddingRight=`${inputPadding}px`}}}_updateMaxLength(){const{strictMode:strictMode,placeholderNumberType:placeholderNumberType,validationNumberType:validationNumberType}=this.options;const{iso2:iso2}=this.selectedCountryData;if(strictMode&&intlTelInput2.utils){if(iso2){const numberType=intlTelInput2.utils.numberType[placeholderNumberType];let exampleNumber=intlTelInput2.utils.getExampleNumber(iso2,false,numberType,true);let validNumber=exampleNumber;while(intlTelInput2.utils.isPossibleNumber(exampleNumber,iso2,validationNumberType)){validNumber=exampleNumber;exampleNumber+="0"}const coreNumber=intlTelInput2.utils.getCoreNumber(validNumber,iso2);this.maxCoreNumberLength=coreNumber.length;if(iso2==="by"){this.maxCoreNumberLength=coreNumber.length+1}}else{this.maxCoreNumberLength=null}}}_setSelectedCountryTitleAttribute(iso2=null,separateDialCode){if(!this.selectedCountry){return}let title;if(iso2&&!separateDialCode){title=`${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`}else if(iso2){title=this.selectedCountryData.name}else{title="Unknown"}this.selectedCountry.setAttribute("title",title)}_getHiddenSelectedCountryWidth(){if(this.telInput.parentNode){const containerClone=this.telInput.parentNode.cloneNode(false);containerClone.style.visibility="hidden";document.body.appendChild(containerClone);const countryContainerClone=this.countryContainer.cloneNode();containerClone.appendChild(countryContainerClone);const selectedCountryClone=this.selectedCountry.cloneNode(true);countryContainerClone.appendChild(selectedCountryClone);const width=selectedCountryClone.offsetWidth;document.body.removeChild(containerClone);return width}return 0}_updatePlaceholder(){const{autoPlaceholder:autoPlaceholder,placeholderNumberType:placeholderNumberType,nationalMode:nationalMode,customPlaceholder:customPlaceholder}=this.options;const shouldSetPlaceholder=autoPlaceholder==="aggressive"||!this.hadInitialPlaceholder&&autoPlaceholder==="polite";if(intlTelInput2.utils&&shouldSetPlaceholder){const numberType=intlTelInput2.utils.numberType[placeholderNumberType];let placeholder=this.selectedCountryData.iso2?intlTelInput2.utils.getExampleNumber(this.selectedCountryData.iso2,nationalMode,numberType):"";placeholder=this._beforeSetNumber(placeholder);if(typeof customPlaceholder==="function"){placeholder=customPlaceholder(placeholder,this.selectedCountryData)}this.telInput.setAttribute("placeholder",placeholder)}}_selectListItem(listItem){const countryChanged=this._setCountry(listItem.getAttribute("data-country-code"));this._closeDropdown();this._updateDialCode(listItem.getAttribute("data-dial-code"));this.telInput.focus();if(countryChanged){this._triggerCountryChange()}}_closeDropdown(){this.dropdownContent.classList.add("iti__hide");this.selectedCountry.setAttribute("aria-expanded","false");this.selectedCountry.removeAttribute("aria-activedescendant");if(this.highlightedItem){this.highlightedItem.setAttribute("aria-selected","false")}if(this.options.countrySearch){this.searchInput.removeAttribute("aria-activedescendant")}this.dropdownArrow.classList.remove("iti__arrow--up");document.removeEventListener("keydown",this._handleKeydownOnDropdown);if(this.options.countrySearch){this.searchInput.removeEventListener("input",this._handleSearchChange)}document.documentElement.removeEventListener("click",this._handleClickOffToClose);this.countryList.removeEventListener("mouseover",this._handleMouseoverCountryList);this.countryList.removeEventListener("click",this._handleClickCountryList);if(this.options.dropdownContainer){if(!this.options.useFullscreenPopup){window.removeEventListener("scroll",this._handleWindowScroll)}if(this.dropdown.parentNode){this.dropdown.parentNode.removeChild(this.dropdown)}}if(this._handlePageLoad){window.removeEventListener("load",this._handlePageLoad)}this._trigger("close:countrydropdown")}_scrollTo(element){const container=this.countryList;const scrollTop=document.documentElement.scrollTop;const containerHeight=container.offsetHeight;const containerTop=container.getBoundingClientRect().top+scrollTop;const containerBottom=containerTop+containerHeight;const elementHeight=element.offsetHeight;const elementTop=element.getBoundingClientRect().top+scrollTop;const elementBottom=elementTop+elementHeight;const newScrollTop=elementTop-containerTop+container.scrollTop;if(elementTop<containerTop){container.scrollTop=newScrollTop}else if(elementBottom>containerBottom){const heightDifference=containerHeight-elementHeight;container.scrollTop=newScrollTop-heightDifference}}_updateDialCode(newDialCodeBare){const inputVal=this.telInput.value;const newDialCode=`+${newDialCodeBare}`;let newNumber;if(inputVal.charAt(0)==="+"){const prevDialCode=this._getDialCode(inputVal);if(prevDialCode){newNumber=inputVal.replace(prevDialCode,newDialCode)}else{newNumber=newDialCode}this.telInput.value=newNumber}}_getDialCode(number,includeAreaCode){let dialCode="";if(number.charAt(0)==="+"){let numericChars="";for(let i=0;i<number.length;i++){const c=number.charAt(i);if(!isNaN(parseInt(c,10))){numericChars+=c;if(includeAreaCode){if(this.dialCodeToIso2Map[numericChars]){dialCode=number.substr(0,i+1)}}else{if(this.dialCodes[numericChars]){dialCode=number.substr(0,i+1);break}}if(numericChars.length===this.dialCodeMaxLen){break}}}}return dialCode}_getFullNumber(overrideVal){const val=overrideVal||this.telInput.value.trim();const{dialCode:dialCode}=this.selectedCountryData;let prefix2;const numericVal=getNumeric(val);if(this.options.separateDialCode&&val.charAt(0)!=="+"&&dialCode&&numericVal){prefix2=`+${dialCode}`}else{prefix2=""}return prefix2+val}_beforeSetNumber(fullNumber){let number=fullNumber;if(this.options.separateDialCode){let dialCode=this._getDialCode(number);if(dialCode){dialCode=`+${this.selectedCountryData.dialCode}`;const start=number[dialCode.length]===" "||number[dialCode.length]==="-"?dialCode.length+1:dialCode.length;number=number.substr(start)}}return this._cap(number)}_triggerCountryChange(){this._trigger("countrychange")}_formatNumberAsYouType(){const val=this._getFullNumber();const result=intlTelInput2.utils?intlTelInput2.utils.formatNumberAsYouType(val,this.selectedCountryData.iso2):val;const{dialCode:dialCode}=this.selectedCountryData;if(this.options.separateDialCode&&this.telInput.value.charAt(0)!=="+"&&result.includes(`+${dialCode}`)){const afterDialCode=result.split(`+${dialCode}`)[1]||"";return afterDialCode.trim()}return result}handleAutoCountry(){if(this.options.initialCountry==="auto"&&intlTelInput2.autoCountry){this.defaultCountry=intlTelInput2.autoCountry;const hasSelectedCountryOrGlobe=this.selectedCountryData.iso2||this.selectedCountryInner.classList.contains("iti__globe");if(!hasSelectedCountryOrGlobe){this.setCountry(this.defaultCountry)}this.resolveAutoCountryPromise()}}handleUtils(){if(intlTelInput2.utils){if(this.telInput.value){this._updateValFromNumber(this.telInput.value)}if(this.selectedCountryData.iso2){this._updatePlaceholder();this._updateMaxLength()}}this.resolveUtilsScriptPromise()}destroy(){var _a,_b;const{allowDropdown:allowDropdown,separateDialCode:separateDialCode}=this.options;if(allowDropdown){this._closeDropdown();this.selectedCountry.removeEventListener("click",this._handleClickSelectedCountry);this.countryContainer.removeEventListener("keydown",this._handleCountryContainerKeydown);const label=this.telInput.closest("label");if(label){label.removeEventListener("click",this._handleLabelClick)}}const{form:form}=this.telInput;if(this._handleHiddenInputSubmit&&form){form.removeEventListener("submit",this._handleHiddenInputSubmit)}this.telInput.removeEventListener("input",this._handleInputEvent);if(this._handleKeydownEvent){this.telInput.removeEventListener("keydown",this._handleKeydownEvent)}this.telInput.removeAttribute("data-intl-tel-input-id");if(separateDialCode){if(this.isRTL){this.telInput.style.paddingRight=this.originalPaddingRight}else{this.telInput.style.paddingLeft=this.originalPaddingLeft}}const wrapper=this.telInput.parentNode;(_a=wrapper==null?void 0:wrapper.parentNode)==null?void 0:_a.insertBefore(this.telInput,wrapper);(_b=wrapper==null?void 0:wrapper.parentNode)==null?void 0:_b.removeChild(wrapper);delete intlTelInput2.instances[this.id]}getExtension(){if(intlTelInput2.utils){return intlTelInput2.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2)}return""}getNumber(format){if(intlTelInput2.utils){const{iso2:iso2}=this.selectedCountryData;return intlTelInput2.utils.formatNumber(this._getFullNumber(),iso2,format)}return""}getNumberType(){if(intlTelInput2.utils){return intlTelInput2.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2)}return-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(intlTelInput2.utils){const{iso2:iso2}=this.selectedCountryData;return intlTelInput2.utils.getValidationError(this._getFullNumber(),iso2)}return-99}isValidNumber(){if(!this.selectedCountryData.iso2){return false}const val=this._getFullNumber();const alphaCharPosition=val.search(new RegExp("\\p{L}","u"));if(alphaCharPosition>-1){const beforeAlphaChar=val.substring(0,alphaCharPosition);const beforeAlphaIsValid=this._utilsIsPossibleNumber(beforeAlphaChar);const isValid=this._utilsIsPossibleNumber(val);return beforeAlphaIsValid&&isValid}return this._utilsIsPossibleNumber(val)}_utilsIsPossibleNumber(val){return intlTelInput2.utils?intlTelInput2.utils.isPossibleNumber(val,this.selectedCountryData.iso2,this.options.validationNumberType):null}isValidNumberPrecise(){if(!this.selectedCountryData.iso2){return false}const val=this._getFullNumber();const alphaCharPosition=val.search(new RegExp("\\p{L}","u"));if(alphaCharPosition>-1){const beforeAlphaChar=val.substring(0,alphaCharPosition);const beforeAlphaIsValid=this._utilsIsValidNumber(beforeAlphaChar);const isValid=this._utilsIsValidNumber(val);return beforeAlphaIsValid&&isValid}return this._utilsIsValidNumber(val)}_utilsIsValidNumber(val){return intlTelInput2.utils?intlTelInput2.utils.isValidNumber(val,this.selectedCountryData.iso2):null}setCountry(iso2){const iso2Lower=iso2==null?void 0:iso2.toLowerCase();const currentCountry=this.selectedCountryData.iso2;const isCountryChange=iso2&&iso2Lower!==currentCountry||!iso2&¤tCountry;if(isCountryChange){this._setCountry(iso2Lower);this._updateDialCode(this.selectedCountryData.dialCode);this._triggerCountryChange()}}setNumber(number){const countryChanged=this._updateCountryFromNumber(number);this._updateValFromNumber(number);if(countryChanged){this._triggerCountryChange()}this._trigger("input",{isSetNumber:true})}setPlaceholderNumberType(type){this.options.placeholderNumberType=type;this._updatePlaceholder()}setDisabled(disabled){this.telInput.disabled=disabled;if(disabled){this.selectedCountry.setAttribute("disabled","true")}else{this.selectedCountry.removeAttribute("disabled")}}};var loadUtils=source=>{if(!intlTelInput2.utils&&!intlTelInput2.startedLoadingUtilsScript){let loadCall;if(typeof source==="string"){loadCall=Promise.reject(new Error("INTENTIONALLY BROKEN: this build of intl-tel-input includes the utilities module inline, but it has incorrectly attempted to load the utilities separately. If you are seeing this message, something is broken!"))}else if(typeof source==="function"){try{loadCall=source();if(!(loadCall instanceof Promise)){throw new TypeError(`The function passed to loadUtils must return a promise for the utilities module, not ${typeof loadCall}`)}}catch(error){return Promise.reject(error)}}else{return Promise.reject(new TypeError(`The argument passed to loadUtils must be a URL string or a function that returns a promise for the utilities module, not ${typeof source}`))}intlTelInput2.startedLoadingUtilsScript=true;return loadCall.then((module2=>{const utils2=module2==null?void 0:module2.default;if(!utils2||typeof utils2!=="object"){if(typeof source==="string"){throw new TypeError(`The module loaded from ${source} did not set utils as its default export.`)}else{throw new TypeError("The loader function passed to loadUtils did not resolve to a module object with utils as its default export.")}}intlTelInput2.utils=utils2;forEachInstance("handleUtils");return true})).catch((error=>{forEachInstance("rejectUtilsScriptPromise",error);throw error}))}return null};var intlTelInput2=Object.assign(((input,options2)=>{const iti=new Iti(input,options2);iti._init();input.setAttribute("data-intl-tel-input-id",iti.id.toString());intlTelInput2.instances[iti.id]=iti;return iti}),{defaults:defaults2,documentReady:()=>document.readyState==="complete",getCountryData:()=>data_default,getInstance:input=>{const id2=input.getAttribute("data-intl-tel-input-id");return id2?intlTelInput2.instances[id2]:null},instances:{},loadUtils:loadUtils,startedLoadingUtilsScript:false,startedLoadingAutoCountry:false,version:"24.7.0"});var intl_tel_input_default=intlTelInput2;(function(){var k=this||self;function m(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function n(a,b){function c(){}c.prototype=b.prototype;a.ma=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.sa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}}function aa(a){const b=[];let c=0;for(const d in a)b[c++]=a[d];return b}var ca=class{constructor(a){if(ba!==ba)throw Error("SafeUrl is not meant to be built directly");this.g=a}toString(){return this.g.toString()}},ba={};new ca("about:invalid#zClosurez");new ca("about:blank");const ea={};class fa{constructor(){if(ea!==ea)throw Error("SafeStyle is not meant to be built directly")}toString(){return"".toString()}}new fa;const ha={};class ia{constructor(){if(ha!==ha)throw Error("SafeStyleSheet is not meant to be built directly")}toString(){return"".toString()}}new ia;const ja={};class ka{constructor(){var a=k.trustedTypes&&k.trustedTypes.emptyHTML||"";if(ja!==ja)throw Error("SafeHtml is not meant to be built directly");this.g=a}toString(){return this.g.toString()}}new ka;function la(a,b){this.g=a;this.l=!!b.aa;this.h=b.i;this.s=b.type;this.o=false;switch(this.h){case ma:case na:case oa:case pa:case qa:case ra:case sa:this.o=true}this.j=b.defaultValue}var sa=1,ra=2,ma=3,na=4,oa=6,pa=16,qa=18;function ta2(a,b){this.h=a;this.g={};for(a=0;a<b.length;a++){var c=b[a];this.g[c.g]=c}}function ua(a){a=aa(a.g);a.sort((function(b,c){return b.g-c.g}));return a}function p(){this.h={};this.j=this.m().g;this.g=this.l=null}p.prototype.has=function(a){return q(this,a.g)};p.prototype.get=function(a,b){return r(this,a.g,b)};p.prototype.set=function(a,b){t(this,a.g,b)};p.prototype.add=function(a,b){va(this,a.g,b)};function wa(a,b){for(var c=ua(a.m()),d=0;d<c.length;d++){var e=c[d],f=e.g;if(q(b,f)){a.g&&delete a.g[e.g];var g=11==e.h||10==e.h;if(e.l){e=u(b,f);for(var h=0;h<e.length;h++)va(a,f,g?e[h].clone():e[h])}else e=v(b,f),g?(g=v(a,f))?wa(g,e):t(a,f,e.clone()):t(a,f,e)}}}p.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.h={},a.g&&(a.g={}),wa(a,this));return a};function q(a,b){return null!=a.h[b]}function v(a,b){var c=a.h[b];if(null==c)return null;if(a.l){if(!(b in a.g)){var d=a.l,e=a.j[b];if(null!=c)if(e.l){for(var f=[],g=0;g<c.length;g++)f[g]=d.h(e,c[g]);c=f}else c=d.h(e,c);return a.g[b]=c}return a.g[b]}return c}function r(a,b,c){var d=v(a,b);return a.j[b].l?d[c||0]:d}function w2(a,b){if(q(a,b))a=r(a,b);else a:{a=a.j[b];if(void 0===a.j)if(b=a.s,b===Boolean)a.j=false;else if(b===Number)a.j=0;else if(b===String)a.j=a.o?"0":"";else{a=new b;break a}a=a.j}return a}function u(a,b){return v(a,b)||[]}function x(a,b){return a.j[b].l?q(a,b)?a.h[b].length:0:q(a,b)?1:0}function t(a,b,c){a.h[b]=c;a.g&&(a.g[b]=c)}function va(a,b,c){a.h[b]||(a.h[b]=[]);a.h[b].push(c);a.g&&delete a.g[b]}function y(a,b){var c=[],d;for(d in b)0!=d&&c.push(new la(d,b[d]));return new ta2(a,c)}function z(){}z.prototype.g=function(a){new a.h;throw Error("Unimplemented")};z.prototype.h=function(a,b){if(11==a.h||10==a.h)return b instanceof p?b:this.g(a.s.prototype.m(),b);if(14==a.h)return"string"===typeof b&&xa.test(b)&&(a=Number(b),0<a)?a:b;if(!a.o)return b;a=a.s;if(a===String){if("number"===typeof b)return String(b)}else if(a===Number&&"string"===typeof b&&("Infinity"===b||"-Infinity"===b||"NaN"===b||xa.test(b)))return Number(b);return b};var xa=/^-?[0-9]+$/;function ya(){}n(ya,z);ya.prototype.g=function(a,b){a=new a.h;a.l=this;a.h=b;a.g={};return a};function B(){}n(B,ya);B.prototype.h=function(a,b){return 8==a.h?!!b:z.prototype.h.apply(this,arguments)};B.prototype.g=function(a,b){return B.ma.g.call(this,a,b)};function C(a,b){null!=a&&this.g.apply(this,arguments)}C.prototype.h="";C.prototype.set=function(a){this.h=""+a};C.prototype.g=function(a,b,c){this.h+=String(a);if(null!=b)for(let d=1;d<arguments.length;d++)this.h+=arguments[d];return this};function D(a){a.h=""}C.prototype.toString=function(){return this.h};function E(){p.call(this)}n(E,p);var za=null;function F(){p.call(this)}n(F,p);var Aa=null;function G(){p.call(this)}n(G,p);var Ba=null;E.prototype.m=function(){var a=za;a||(za=a=y(E,{0:{name:"NumberFormat",ia:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:true,i:9,type:String},2:{name:"format",required:true,i:9,type:String},3:{name:"leading_digits_pattern",aa:true,i:9,type:String},4:{name:"national_prefix_formatting_rule",i:9,type:String},6:{name:"national_prefix_optional_when_formatting",i:8,defaultValue:false,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",i:9,type:String}}));return a};E.m=E.prototype.m;F.prototype.m=function(){var a=Aa;a||(Aa=a=y(F,{0:{name:"PhoneNumberDesc",ia:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",i:9,type:String},9:{name:"possible_length",aa:true,i:5,type:Number},10:{name:"possible_length_local_only",aa:true,i:5,type:Number},6:{name:"example_number",i:9,type:String}}));return a};F.m=F.prototype.m;G.prototype.m=function(){var a=Ba;a||(Ba=a=y(G,{0:{name:"PhoneMetadata",ia:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",i:11,type:F},2:{name:"fixed_line",i:11,type:F},3:{name:"mobile",i:11,type:F},4:{name:"toll_free",i:11,type:F},5:{name:"premium_rate",i:11,type:F},6:{name:"shared_cost",i:11,type:F},7:{name:"personal_number",i:11,type:F},8:{name:"voip",i:11,type:F},21:{name:"pager",i:11,type:F},25:{name:"uan",i:11,type:F},27:{name:"emergency",i:11,type:F},28:{name:"voicemail",i:11,type:F},29:{name:"short_code",i:11,type:F},30:{name:"standard_rate",i:11,type:F},31:{name:"carrier_specific",i:11,type:F},33:{name:"sms_services",i:11,type:F},24:{name:"no_international_dialling",i:11,type:F},9:{name:"id",required:true,i:9,type:String},10:{name:"country_code",i:5,type:Number},11:{name:"international_prefix",i:9,type:String},17:{name:"preferred_international_prefix",i:9,type:String},12:{name:"national_prefix",i:9,type:String},13:{name:"preferred_extn_prefix",i:9,type:String},15:{name:"national_prefix_for_parsing",i:9,type:String},16:{name:"national_prefix_transform_rule",i:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",i:8,defaultValue:false,type:Boolean},19:{name:"number_format",aa:true,i:11,type:E},20:{name:"intl_number_format",aa:true,i:11,type:E},22:{name:"main_country_for_code",i:8,defaultValue:false,type:Boolean},23:{name:"leading_digits",i:9,type:String}}));return a};G.m=G.prototype.m;function H(){p.call(this)}n(H,p);var Ca=null,Da={ra:0,qa:1,pa:5,oa:10,na:20};H.prototype.m=function(){var a=Ca;a||(Ca=a=y(H,{0:{name:"PhoneNumber",ia:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:true,i:5,type:Number},2:{name:"national_number",required:true,i:4,type:Number},3:{name:"extension",i:9,type:String},4:{name:"italian_leading_zero",i:8,type:Boolean},8:{name:"number_of_leading_zeros",i:5,defaultValue:1,type:Number},5:{name:"raw_input",i:9,type:String},6:{name:"country_code_source",i:14,defaultValue:0,type:Da},7:{name:"preferred_domestic_carrier_code",i:9,type:String}}));return a};H.ctor=H;H.ctor.m=H.prototype.m;var I={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},Ea={AC:[,[,,"(?:[01589]\\d|[46])\\d{4}",,,,,,,[5,6]],[,,"6[2-467]\\d{3}",,,,"62889",,,[5]],[,,"4\\d{4}",,,,"40123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:0[1-9]|[1589]\\d)\\d{4}",,,,"542011",,,[6]],,,[,,,,,,,,,[-1]]],AD:[,[,,"(?:1|6\\d)\\d{7}|[135-9]\\d{5}",,,,,,,[6,8,9]],[,,"[78]\\d{5}",,,,"712345",,,[6]],[,,"690\\d{6}|[356]\\d{5}",,,,"312345",,,[6,9]],[,,"180[02]\\d{4}",,,,"18001234",,,[8]],[,,"[19]\\d{5}",,,,"912345",,,[6]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],[,"(\\d{4})(\\d{4})","$1 $2",["1"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],,[,,,,,,,,,[-1]],,,[,,"1800\\d{4}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AE:[,[,,"(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"[2-4679][2-8]\\d{6}",,,,"22345678",,,[8],[7]],[,,"5[024-68]\\d{7}",,,,"501234567",,,[9]],[,,"400\\d{6}|800\\d{2,9}",,,,"800123456"],[,,"900[02]\\d{5}",,,,"900234567",,,[9]],[,,"700[05]\\d{5}",,,,"700012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AE",971,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],[,"(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"600[25]\\d{5}",,,,"600212345",,,[9]],,,[,,,,,,,,,[-1]]],AF:[,[,,"[2-7]\\d{8}",,,,,,,[9],[7]],[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",,,,"234567890",,,,[7]],[,,"7\\d{8}",,,,"701234567",,,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AF",93,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AG:[,[,,"(?:268|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}",,,,"2684601234",,,,[7]],[,,"268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}",,,,"2684641234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"26848[01]\\d{4}",,,,"2684801234",,,,[7]],"AG",1,"011","1",,,"([457]\\d{6})$|1","268$1",,,,,[,,"26840[69]\\d{4}",,,,"2684061234",,,,[7]],,"268",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AI:[,[,,"(?:264|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"264(?:292|4(?:6[12]|9[78]))\\d{4}",,,,"2644612345",,,,[7]],[,,"264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}",,,,"2642351234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"AI",1,"011","1",,,"([2457]\\d{6})$|1","264$1",,,,,[,,"264724\\d{4}",,,,"2647241234",,,,[7]],,"264",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AL:[,[,,"(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",,,,,,,[6,7,8,9],[5]],[,,"4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}",,,,"22345678",,,[8],[5,6,7]],[,,"6(?:[78][2-9]|9\\d)\\d{6}",,,,"672123456",,,[9]],[,,"800\\d{4}",,,,"8001234",,,[7]],[,,"900[1-9]\\d\\d",,,,"900123",,,[6]],[,,"808[1-9]\\d\\d",,,,"808123",,,[6]],[,,"700[2-9]\\d{4}",,,,"70021234",,,[8]],[,,,,,,,,,[-1]],"AL",355,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],[,"(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AM:[,[,,"(?:[1-489]\\d|55|60|77)\\d{6}",,,,,,,[8],[5,6]],[,,"(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}",,,,"10123456",,,,[5,6]],[,,"(?:33|4[1349]|55|77|88|9[13-9])\\d{6}",,,,"77123456"],[,,"800\\d{5}",,,,"80012345"],[,,"90[016]\\d{5}",,,,"90012345"],[,,"80[1-4]\\d{5}",,,,"80112345"],[,,,,,,,,,[-1]],[,,"60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}",,,,"60271234"],"AM",374,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],[,"(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],[,"(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],[,"(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AO:[,[,,"[29]\\d{8}",,,,,,,[9]],[,,"2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}",,,,"222123456"],[,,"9[1-79]\\d{7}",,,,"923123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AO",244,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AR:[,[,,"(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",,,,,,,[10,11],[6,7,8]],[,,"3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:7(?:55|77)|865))[2-8]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:284|3(?:02|23)|920)|3(?:4(?:46|8[27]|92)|541|878))[2-7]\\d{5}|(?:2(?:(?:26|62)2|320|477|9(?:42|83))|3(?:329|4(?:62|76|89)|564))[2-6]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|[17][2-6]|3[4-6]|5[3-6]|8[3-68])))\\d{6}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|35|5[17])))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,"1123456789",,,[10],[6,7,8]],[,,"93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:7(?:55|77)|865))[2-8]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:284|3(?:02|23)|920)|3(?:4(?:46|8[27]|92)|541|878))[2-7]\\d{5}|9(?:2(?:(?:26|62)2|320|477|9(?:42|83))|3(?:329|4(?:62|76|89)|564))[2-6]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|[17][2-6]|3[4-6]|5[3-6]|8[3-68]))))\\d{6}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|35|5[17])))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,"91123456789",,,,[6,7,8]],[,,"800\\d{7,8}",,,,"8001234567"],[,,"60[04579]\\d{7}",,,,"6001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AR",54,"00","0",,,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1",,,[[,"(\\d{3})","$1",["0|1(?:0[0-35-7]|1[02-5]|2[015]|3[47]|4[478])|911"]],[,"(\\d{2})(\\d{4})","$1-$2",["[1-9]"]],[,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"]],[,"(\\d{4})(\\d{4})","$1-$2",["[1-8]"]],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",,1],[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1"],[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1"]],[[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",,1],[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]],[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3-$4",["91"]],[,"(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3-$4",["9"]]],[,,,,,,,,,[-1]],,,[,,"810\\d{7}",,,,,,,[10]],[,,"810\\d{7}",,,,"8101234567",,,[10]],,,[,,,,,,,,,[-1]]],AS:[,[,,"(?:[58]\\d\\d|684|900)\\d{7}",,,,,,,[10],[7]],[,,"6846(?:22|33|44|55|77|88|9[19])\\d{4}",,,,"6846221234",,,,[7]],[,,"684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}",,,,"6847331234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"AS",1,"011","1",,,"([267]\\d{6})$|1","684$1",,,,,[,,,,,,,,,[-1]],,"684",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AT:[,[,,"1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",,,,,,,[4,5,6,7,8,9,10,11,12,13],[3]],[,,"1(?:11\\d|[2-9]\\d{3,11})|(?:316|463|(?:51|66|73)2)\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-8]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}",,,,"1234567890",,,,[3]],[,,"6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}",,,,"664123456",,,[7,8,9,10,11,12,13]],[,,"800\\d{6,10}",,,,"800123456",,,[9,10,11,12,13]],[,,"(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}",,,,"900123456",,,[9,10,11,12,13]],[,,"8(?:10|2[018])\\d{6,10}|828\\d{5}",,,,"810123456",,,[8,9,10,11,12,13]],[,,,,,,,,,[-1]],[,,"5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",,,,"780123456",,,[5,6,7,8,9,10,11,12,13]],"AT",43,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["14"]],[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],[,"(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],[,"(\\d{6})","$1",["[18]"]],[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],[[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],[,"(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AU:[,[,,"1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",,,,,,,[5,6,7,8,9,10,12]],[,,"(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",,,,"212345678",,,[9],[8]],[,,"4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]],[,,"13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",,,,"1300123456",,,[6,8,10,12]],[,,,,,,,,,[-1]],[,,"14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",,,,"147101234",,,[9]],"AU",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"(183[12])|0",,"0011",,[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["13"]],[,"(\\d{3})(\\d{3})","$1 $2",["19"]],[,"(\\d{3})(\\d{4})","$1 $2",["180","1802"]],[,"(\\d{4})(\\d{3,4})","$1 $2",["19"]],[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)","$CC ($1)"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]],[,"(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["130"]]],[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)","$CC ($1)"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],[,,"163\\d{2,6}",,,,"1631234",,,[5,6,7,8,9]],1,,[,,"1(?:3(?:00\\d{5}|45[0-4])|802)\\d{3}|1[38]00\\d{6}|13\\d{4}",,,,,,,[6,7,8,10,12]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AW:[,[,,"(?:[25-79]\\d\\d|800)\\d{4}",,,,,,,[7]],[,,"5(?:2\\d|8[1-9])\\d{4}",,,,"5212345"],[,,"(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}",,,,"5601234"],[,,"800\\d{4}",,,,"8001234"],[,,"900\\d{4}",,,,"9001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:28\\d|501)\\d{4}",,,,"5011234"],"AW",297,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AX:[,[,,"2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"18[1-8]\\d{3,6}",,,,"181234567",,,[6,7,8,9]],[,,"4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",,,,"412345678",,,[6,7,8,9,10]],[,,"800\\d{4,6}",,,,"800123456",,,[7,8,9]],[,,"[67]00\\d{5,6}",,,,"600123456",,,[8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AX",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,,,[,,,,,,,,,[-1]],,"18",[,,,,,,,,,[-1]],[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}",,,,"10112345"],,,[,,,,,,,,,[-1]]],AZ:[,[,,"365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",,,,,,,[9],[7]],[,,"(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}",,,,"123123456",,,,[7]],[,,"36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}",,,,"401234567"],[,,"88\\d{7}",,,,"881234567"],[,,"900200\\d{3}",,,,"900200123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AZ",994,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[1-9]"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BA:[,[,,"6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",,,,,,,[8,9],[6]],[,,"(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",,,,"30212345",,,[8],[6]],[,,"6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}",,,,"61123456"],[,,"8[08]\\d{6}",,,,"80123456",,,[8]],[,,"9[0246]\\d{6}",,,,"90123456",,,[8]],[,,"8[12]\\d{6}",,,,"82123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BA",387,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1-$2",["[2-9]"]],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}",,,,"70341234",,,[8]],,,[,,,,,,,,,[-1]]],BB:[,[,,"(?:246|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}",,,,"2464123456",,,,[7]],[,,"246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}",,,,"2462501234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"(?:246976|900[2-9]\\d\\d)\\d{4}",,,,"9002123456",,,,[7]],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"24631\\d{5}",,,,"2463101234",,,,[7]],"BB",1,"011","1",,,"([2-9]\\d{6})$|1","246$1",,,,,[,,,,,,,,,[-1]],,"246",[,,,,,,,,,[-1]],[,,"246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}",,,,"2464301234",,,,[7]],,,[,,,,,,,,,[-1]]],BD:[,[,,"[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",,,,,,,[6,7,8,9,10]],[,,"(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}",,,,"27111234"],[,,"(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",,,,"1812345678",,,[10]],[,,"80[03]\\d{7}",,,,"8001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"96(?:0[469]|1[0-47]|3[389]|43|6[69]|7[78])\\d{6}",,,,"9604123456",,,[10]],"BD",880,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],[,"(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],[,"(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],[,"(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BE:[,[,,"4\\d{8}|[1-9]\\d{7}",,,,,,,[8,9]],[,,"80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",,,,"12345678",,,[8]],[,,"4[5-9]\\d{7}",,,,"470123456",,,[9]],[,,"800[1-9]\\d{4}",,,,"80012345",,,[8]],[,,"(?:70(?:2[0-57]|3[04-7]|44|6[4-69]|7[0579])|90\\d\\d)\\d{4}",,,,"90012345",,,[8]],[,,"7879\\d{4}",,,,"78791234",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BE",32,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"78(?:0[57]|1[014-8]|2[25]|3[15-8]|48|[56]0|7[06-8]|9\\d)\\d{4}",,,,"78102345",,,[8]],,,[,,,,,,,,,[-1]]],BF:[,[,,"[025-7]\\d{7}",,,,,,,[8]],[,,"2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}",,,,"20491234"],[,,"(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}",,,,"70123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BF",226,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BG:[,[,,"00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",,,,,,,[6,7,8,9,12],[4,5]],[,,"2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",,,,"2123456",,,[6,7,8],[4,5]],[,,"(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}",,,,"43012345",,,[8,9]],[,,"(?:00800\\d\\d|800)\\d{5}",,,,"80012345",,,[8,12]],[,,"90\\d{6}",,,,"90123456",,,[8]],[,,"700\\d{5}",,,,"70012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BG",359,"00","0",,,"0",,,,[[,"(\\d{6})","$1",["1"]],[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],[[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BH:[,[,,"[136-9]\\d{7}",,,,,,,[8]],[,,"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}",,,,"17001234"],[,,"(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}",,,,"36001234"],[,,"8[02369]\\d{6}",,,,"80123456"],[,,"(?:87|9[0-8])\\d{6}",,,,"90123456"],[,,"84\\d{6}",,,,"84123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BH",973,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BI:[,[,,"(?:[267]\\d|31)\\d{6}",,,,,,,[8]],[,,"(?:22|31)\\d{6}",,,,"22201234"],[,,"(?:29|[67][125-9])\\d{6}",,,,"79561234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BI",257,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BJ:[,[,,"[24-689]\\d{7}",,,,,,,[8]],[,,"2090\\d{4}|2(?:02|1[037]|2[45]|3[68]|4\\d)\\d{5}",,,,"20211234"],[,,"(?:4[0-8]|[56]\\d|9[013-9])\\d{6}",,,,"90011234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"857[58]\\d{4}",,,,"85751234"],"BJ",229,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"81\\d{6}",,,,"81123456"],,,[,,,,,,,,,[-1]]],BL:[,[,,"590\\d{6}|(?:69|80|9\\d)\\d{7}",,,,,,,[9]],[,,"590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}",,,,"590271234"],[,,"69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}",,,,"690001234"],[,,"80[0-5]\\d{6}",,,,"800012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}",,,,"976012345"],"BL",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BM:[,[,,"(?:441|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}",,,,"4414123456",,,,[7]],[,,"441(?:[2378]\\d|5[0-39]|9[02])\\d{5}",,,,"4413701234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"BM",1,"011","1",,,"([2-9]\\d{6})$|1","441$1",,,,,[,,,,,,,,,[-1]],,"441",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BN:[,[,,"[2-578]\\d{6}",,,,,,,[7]],[,,"22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}",,,,"2345678"],[,,"(?:22[89]|[78]\\d\\d)\\d{4}",,,,"7123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5[34]\\d{5}",,,,"5345678"],"BN",673,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BO:[,[,,"8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",,,,,,,[8,9],[7]],[,,"(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",,,,"22123456",,,[8],[7]],[,,"[67]\\d{7}",,,,"71234567",,,[8]],[,,"8001[07]\\d{4}",,,,"800171234",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"50\\d{6}",,,,"50123456",,,[8],[7]],"BO",591,"00(?:1\\d)?","0",,,"0(1\\d)?",,,,[[,"(\\d)(\\d{7})","$1 $2",["[235]|4[46]"],,"0$CC $1"],[,"(\\d{8})","$1",["[67]"],,"0$CC $1"],[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"],,"0$CC $1"]],,[,,,,,,,,,[-1]],,,[,,"8001[07]\\d{4}",,,,,,,[9]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BQ:[,[,,"(?:[34]1|7\\d)\\d{5}",,,,,,,[7]],[,,"(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}",,,,"7151234"],[,,"(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}",,,,"3181234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BQ",599,"00",,,,,,,,,,[,,,,,,,,,[-1]],,"[347]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BR:[,[,,"(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",,,,,,,[8,9,10,11]],[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",,,,"1123456789",,,[10],[8]],[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",,,,"11961234567",,,[10,11],[8,9]],[,,"800\\d{6,7}",,,,"800123456",,,[9,10]],[,,"300\\d{6}|[59]00\\d{6,7}",,,,"300123456",,,[9,10]],[,,"(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370))\\d{4}|300\\d{5}",,,,"40041234",,,[8,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BR",55,"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","0",,,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",,,[[,"(\\d{3,6})","$1",["1(?:1[25-8]|2[357-9]|3[02-68]|4[12568]|5|6[0-8]|8[015]|9[0-47-9])|321|610"]],[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],[,"(\\d{4})(\\d{4})","$1-$2",["[2-57]","[2357]|4(?:[0-24-9]|3(?:[0-689]|7[1-9]))"]],[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],[,"(\\d{5})(\\d{4})","$1-$2",["9"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)","0 $CC ($1)"],[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)","0 $CC ($1)"]],[[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)","0 $CC ($1)"],[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)","0 $CC ($1)"]],[,,,,,,,,,[-1]],,,[,,"30(?:0\\d{5,7}|3\\d{7})|40(?:0\\d|20)\\d{4}|800\\d{6,7}",,,,,,,[8,9,10]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BS:[,[,,"(?:242|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}",,,,"2423456789",,,,[7]],[,,"242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}",,,,"2423591234",,,,[7]],[,,"242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456",,,,[7]],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"BS",1,"011","1",,,"([3-8]\\d{6})$|1","242$1",,,,,[,,,,,,,,,[-1]],,"242",[,,,,,,,,,[-1]],[,,"242225\\d{4}",,,,"2422250123"],,,[,,,,,,,,,[-1]]],BT:[,[,,"[17]\\d{7}|[2-8]\\d{6}",,,,,,,[7,8],[6]],[,,"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",,,,"2345678",,,[7],[6]],[,,"(?:1[67]|77)\\d{6}",,,,"17123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BT",975,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[2-7]"]],[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]],[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BW:[,[,,"(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",,,,,,,[7,8,10]],[,,"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}",,,,"2401234",,,[7]],[,,"(?:321|7[1-8]\\d)\\d{5}",,,,"71123456",,,[8]],[,,"(?:0800|800\\d)\\d{6}",,,,"0800012345",,,[10]],[,,"90\\d{5}",,,,"9012345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"79(?:1(?:[0-2]\\d|3[0-3])|2[0-7]\\d)\\d{3}",,,,"79101234",,,[8]],"BW",267,"00",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["90"]],[,"(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BY:[,[,,"(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",,,,,,,[6,7,8,9,10,11],[5]],[,,"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",,,,"152450911",,,[9],[5,6,7]],[,,"(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",,,,"294911911",,,[9]],[,,"800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}",,,,"8011234567"],[,,"(?:810|902)\\d{7}",,,,"9021234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"249\\d{6}",,,,"249123456",,,[9]],"BY",375,"810","8",,,"0|80?",,"8~10",,[[,"(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],[,"(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],[,"(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],,[,,,,,,,,,[-1]],,,[,,"800\\d{3,7}|(?:8(?:0[13]|10|20\\d)|902)\\d{7}"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BZ:[,[,,"(?:0800\\d|[2-8])\\d{6}",,,,,,,[7,11]],[,,"(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}",,,,"2221234",,,[7]],[,,"6[0-35-7]\\d{5}",,,,"6221234",,,[7]],[,,"0800\\d{7}",,,,"08001234123",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BZ",501,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],[,"(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CA:[,[,,"(?:[2-8]\\d|90)\\d{8}|3\\d{6}",,,,,,,[7,10]],[,,"(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",,,,"5062345678",,,[10],[7]],[,,"(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",,,,"5062345678",,,[10],[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456",,,[10]],[,,"900[2-9]\\d{6}",,,,"9002123456",,,[10]],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",,,,"5002345678",,,[10]],[,,"600[2-9]\\d{6}",,,,"6002012345",,,[10]],"CA",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"310\\d{4}",,,,"3101234",,,[7]],,,[,,,,,,,,,[-1]]],CC:[,[,,"1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",,,,,,,[6,7,8,9,10,12]],[,,"8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",,,,"891621234",,,[9],[8]],[,,"4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]],[,,"13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",,,,"1300123456",,,[6,8,10,12]],[,,,,,,,,,[-1]],[,,"14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",,,,"147101234",,,[9]],"CC",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"([59]\\d{7})$|0","8$1","0011",,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CD:[,[,,"(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",,,,,,,[7,8,9,10]],[,,"(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}",,,,"1234567"],[,,"88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}",,,,"991234567",,,[7,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],[,"(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CF:[,[,,"(?:[27]\\d{3}|8776)\\d{4}",,,,,,,[8]],[,,"2[12]\\d{6}",,,,"21612345"],[,,"7[024-7]\\d{6}",,,,"70012345"],[,,,,,,,,,[-1]],[,,"8776\\d{4}",,,,"87761234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CF",236,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CG:[,[,,"222\\d{6}|(?:0\\d|80)\\d{7}",,,,,,,[9]],[,,"222[1-589]\\d{5}",,,,"222123456"],[,,"026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}",,,,"061234567"],[,,,,,,,,,[-1]],[,,"80[0-2]\\d{6}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CG",242,"00",,,,,,,,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CH:[,[,,"8\\d{11}|[2-9]\\d{8}",,,,,,,[9,12]],[,,"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",,,,"212345678",,,[9]],[,,"(?:6[89]|7[235-9])\\d{7}",,,,"781234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"90[016]\\d{6}",,,,"900123456",,,[9]],[,,"84[0248]\\d{6}",,,,"840123456",,,[9]],[,,"878\\d{6}",,,,"878123456",,,[9]],[,,,,,,,,,[-1]],"CH",41,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],,[,,"74[0248]\\d{6}",,,,"740123456",,,[9]],,,[,,,,,,,,,[-1]],[,,"5[18]\\d{7}",,,,"581234567",,,[9]],,,[,,"860\\d{9}",,,,"860123456789",,,[12]]],CI:[,[,,"[02]\\d{9}",,,,,,,[10]],[,,"2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}",,,,"2123456789"],[,,"0[157]\\d{8}",,,,"0123456789"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CI",225,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CK:[,[,,"[2-578]\\d{4}",,,,,,,[5]],[,,"(?:2\\d|3[13-7]|4[1-5])\\d{3}",,,,"21234"],[,,"[578]\\d{4}",,,,"71234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CK",682,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CL:[,[,,"12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",,,,,,,[9,10,11]],[,,"2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-3])|600)|646[59])|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",,,,"221234567",,,[9]],[,,"2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-3])|600)|646[59])|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",,,,"221234567",,,[9]],[,,"(?:123|8)00\\d{6}",,,,"800123456",,,[9,11]],[,,,,,,,,,[-1]],[,,"600\\d{7,8}",,,,"6001234567",,,[10,11]],[,,,,,,,,,[-1]],[,,"44\\d{7}",,,,"441234567",,,[9]],"CL",56,"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0",,,,,,,1,[[,"(\\d{4})","$1",["1(?:[03-589]|21)|[29]0|78"]],[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]],[[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]],[,,,,,,,,,[-1]],,,[,,"600\\d{7,8}",,,,,,,[10,11]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CM:[,[,,"[26]\\d{8}|88\\d{6,7}",,,,,,,[8,9]],[,,"2(?:22|33)\\d{6}",,,,"222123456",,,[9]],[,,"(?:24[23]|6(?:[25-9]\\d|40))\\d{6}",,,,"671234567",,,[9]],[,,"88\\d{6,7}",,,,"88012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CM",237,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CN:[,[,,"(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",,,,,,,[7,8,9,10,11,12],[5,6]],[,,"(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",,,,"1012345678",,,[7,8,9,10,11],[5,6]],[,,"1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}",,,,"13123456789",,,[11]],[,,"(?:(?:10|21)8|8)00\\d{7}",,,,"8001234567",,,[10,12]],[,,"16[08]\\d{5}",,,,"16812345",,,[8]],[,,"10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",,,,"4001234567",,,[7,8,9,10,11],[5,6]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CN",86,"00|1(?:[12]\\d|79)\\d\\d00","0",,,"(1(?:[12]\\d|79)\\d\\d)|0",,"00",,[[,"(\\d{5,6})","$1",["1(?:00|2[13])|9[56]","1(?:00|2(?:1|39))|9[56]","1(?:00|2(?:1|395))|9[56]"]],[,"(\\d{5,6})","$1",["1(?:0|23)|781|[1-9]12","1(?:0|23)|7812|[1-9]123","1(?:0|23(?:[0-8]|9[0-46-9]))|78123|[1-9]123"]],[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1","$CC $1"],[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])","1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|[3-9]","1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|1[03]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9]|78|94)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-9]|1(?:[013-9]|2[0-24-9]))","1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|1[03]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:0(?:[0-689]|7[0-79])|1[01459]|2[0-489]|[46]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9]|78|94)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-9]|1(?:[013-9]|2[0-24-9]))"]],[,"(\\d{4})(\\d{4})","$1 $2",["16[08]"]],[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1","$CC $1"],[,"(\\d{4})(\\d{4})","$1 $2",["[1-9]","1(?:0(?:[02-8]|1[1-9]|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[0-8]|9[0-47-9])|6)|[3-9]","1(?:0(?:[02-8]|1[1-9]|9[0-47-9])|[1-9])|26|3(?:[0268]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23][0-8])|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:33|85[23]9)[0-46-9]|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[0-8]|9[0-47-9])","1(?:0[02-8]|[1-9])|2(?:[0-57-9][0-8]|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23](?:[02-8]|1[1-9]|9[0-46-9]))|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:10|2[0-57-9])9[0-47-9]|(?:101|58|85[23]10)[1-9]|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"],,"$CC $1"],[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",,1]],[[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1","$CC $1"],[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1","$CC $1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"],,"$CC $1"],[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",,1]],[,,,,,,,,,[-1]],,,[,,"(?:(?:10|21)8|[48])00\\d{7}|950\\d{7,8}",,,,,,,[10,11,12]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CO:[,[,,"(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",,,,,,,[8,10,11],[4,7]],[,,"601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[124-7][2-9]|8[1-9]))\\d{6}",,,,"6012345678",,,[8,10],[4,7]],[,,"333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:24[1-9]|3(?:00|3[0-24-9]))|9101)\\d{6}|3(?:0[0-5]|1\\d|2[0-3]|5[01]|70)\\d{7}",,,,"3211234567",,,[10]],[,,"1800\\d{7}",,,,"18001234567",,,[11]],[,,"(?:19(?:0[01]|4[78])|901)\\d{7}",,,,"19001234567",,,[10,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CO",57,"00(?:4(?:[14]4|56)|[579])","0",,,"0([3579]|4(?:[14]4|56))?",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["46"]],[,"(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)","0$CC $1"],[,"(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"],,"0$CC $1"],[,"(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1"]],[[,"(\\d{4})(\\d{4})","$1 $2",["46"]],[,"(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)","0$CC $1"],[,"(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"],,"0$CC $1"],[,"(\\d)(\\d{3})(\\d{7})","$1 $2 $3",["1"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CR:[,[,,"(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",,,,,,,[8,10]],[,,"210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",,,,"22123456",,,[8]],[,,"(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",,,,"83123456",,,[8]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"90[059]\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:210[0-6]|4\\d{3}|5100)\\d{4}",,,,"40001234",,,[8]],"CR",506,"00",,,,"(19(?:0[0-2468]|1[09]|20|66|77|99))",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CU:[,[,,"(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",,,,,,,[6,7,8,10],[4,5]],[,,"(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}",,,,"71234567",,,,[4,5]],[,,"(?:5\\d|6[2-4])\\d{6}",,,,"51234567",,,[8]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,,,,,,,,[-1]],[,,"807\\d{7}",,,,"8071234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CU",53,"119","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],[,"(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],[,"(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],[,"(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CV:[,[,,"(?:[2-59]\\d\\d|800)\\d{4}",,,,,,,[7]],[,,"2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}",,,,"2211234"],[,,"(?:36|5[1-389]|9\\d)\\d{5}",,,,"9911234"],[,,"800\\d{4}",,,,"8001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:3[3-5]|4[356])\\d{5}",,,,"3401234"],"CV",238,"0",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CW:[,[,,"(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",,,,,,,[7,8]],[,,"9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}",,,,"94351234"],[,,"953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}",,,,"95181234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"60[0-2]\\d{4}",,,,"6001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CW",599,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[3467]"]],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],,[,,"955\\d{5}",,,,"95581234",,,[8]],1,"[69]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CX:[,[,,"1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",,,,,,,[6,7,8,9,10,12]],[,,"8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",,,,"891641234",,,[9],[8]],[,,"4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]],[,,"13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",,,,"1300123456",,,[6,8,10,12]],[,,,,,,,,,[-1]],[,,"14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",,,,"147101234",,,[9]],"CX",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"([59]\\d{7})$|0","8$1","0011",,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CY:[,[,,"(?:[279]\\d|[58]0)\\d{6}",,,,,,,[8]],[,,"2[2-6]\\d{6}",,,,"22345678"],[,,"9(?:10|[4-79]\\d)\\d{5}",,,,"96123456"],[,,"800\\d{5}",,,,"80001234"],[,,"90[09]\\d{5}",,,,"90012345"],[,,"80[1-9]\\d{5}",,,,"80112345"],[,,"700\\d{5}",,,,"70012345"],[,,,,,,,,,[-1]],"CY",357,"00",,,,,,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:50|77)\\d{6}",,,,"77123456"],,,[,,,,,,,,,[-1]]],CZ:[,[,,"(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",,,,,,,[9,10,11,12]],[,,"(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",,,,"212345678",,,[9]],[,,"(?:60[1-8]\\d|7(?:0(?:[2-5]\\d|60)|19[01]|[2379]\\d\\d))\\d{5}",,,,"601123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"9(?:0[05689]|76)\\d{6}",,,,"900123456",,,[9]],[,,"8[134]\\d{7}",,,,"811234567",,,[9]],[,,"70[01]\\d{6}",,,,"700123456",,,[9]],[,,"9[17]0\\d{6}",,,,"910123456",,,[9]],"CZ",420,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],[,"(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"9(?:5\\d|7[2-4])\\d{6}",,,,"972123456",,,[9]],,,[,,"9(?:3\\d{9}|6\\d{7,10})",,,,"93123456789"]],DE:[,[,,"[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",,,,,,,[4,5,6,7,8,9,10,11,12,13,14,15],[2,3]],[,,"32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",,,,"30123456",,,[5,6,7,8,9,10,11,12,13,14,15],[2,3,4]],[,,"16[023]\\d{7,8}|1(?:5310|7[0-57-9]\\d)\\d{6}|1(?:5[0-25-9]|76)\\d{8}",,,,"15123456789",,,[10,11]],[,,"800\\d{7,12}",,,,"8001234567890",,,[10,11,12,13,14,15]],[,,"(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",,,,"9001234567",,,[10,11]],[,,"180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",,,,"18012345",,,[7,8,9,10,11,12,13,14]],[,,"700\\d{8}",,,,"70012345678",,,[11]],[,,,,,,,,,[-1]],"DE",49,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],[,"(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],[,"(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],[,"(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],[,"(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],[,"(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],[,"(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],[,"(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],[,"(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],[,"(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],[,"(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],[,"(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],[,"(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],[,"(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],,[,,"16(?:4\\d{1,10}|[89]\\d{1,11})",,,,"16412345",,,[4,5,6,7,8,9,10,11,12,13,14]],,,[,,,,,,,,,[-1]],[,,"18(?:1\\d{5,11}|[2-9]\\d{8})",,,,"18500123456",,,[8,9,10,11,12,13,14]],,,[,,"1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",,,,"177991234567",,,[12,13]]],DJ:[,[,,"(?:2\\d|77)\\d{6}",,,,,,,[8]],[,,"2(?:1[2-5]|7[45])\\d{5}",,,,"21360003"],[,,"77\\d{6}",,,,"77831001"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"DJ",253,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DK:[,[,,"[2-9]\\d{7}",,,,,,,[8]],[,,"(?:(?:2\\d|9[1-46-9])\\d|3(?:[0-37]\\d|4[013]|5[0-58]|6[01347-9]|8[0-8]|9[0-79])|4(?:[0-25]\\d|[34][02-9]|6[013-579]|7[013579]|8[0-47]|9[0-27])|5(?:[0-36]\\d|4[0146-9]|5[03-57-9]|7[0568]|8[0-358]|9[0-69])|6(?:[013578]\\d|2[0-68]|4[02-8]|6[01689]|9[015689])|7(?:[0-69]\\d|7[03-9]|8[0147])|8(?:[16-9]\\d|2[0-58]))\\d{5}",,,,"32123456"],[,,"(?:[2-7]\\d|8[126-9]|9[1-46-9])\\d{6}",,,,"34412345"],[,,"80\\d{6}",,,,"80123456"],[,,"90\\d{6}",,,,"90123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"DK",45,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DM:[,[,,"(?:[58]\\d\\d|767|900)\\d{7}",,,,,,,[10],[7]],[,,"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}",,,,"7674201234",,,,[7]],[,,"767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}",,,,"7672251234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"DM",1,"011","1",,,"([2-7]\\d{6})$|1","767$1",,,,,[,,,,,,,,,[-1]],,"767",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DO:[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}",,,,"8092345678",,,,[7]],[,,"8[024]9[2-9]\\d{6}",,,,"8092345678",,,,[7]],[,,"8(?:00(?:14|[2-9]\\d)|(?:33|44|55|66|77|88)[2-9]\\d)\\d{5}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"DO",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"8001|8[024]9",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DZ:[,[,,"(?:[1-4]|[5-79]\\d|80)\\d{7}",,,,,,,[8,9]],[,,"9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[013-689])\\d{6}",,,,"12345678"],[,,"(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",,,,"551234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"80[3-689]1\\d{5}",,,,"808123456",,,[9]],[,,"80[12]1\\d{5}",,,,"801123456",,,[9]],[,,,,,,,,,[-1]],[,,"98[23]\\d{6}",,,,"983123456",,,[9]],"DZ",213,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EC:[,[,,"1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",,,,,,,[8,9,10,11],[7]],[,,"[2-7][2-7]\\d{6}",,,,"22123456",,,[8],[7]],[,,"964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",,,,"991234567",,,[9]],[,,"1800\\d{7}|1[78]00\\d{6}",,,,"18001234567",,,[10,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"[2-7]890\\d{4}",,,,"28901234",,,[8]],"EC",593,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-7]"]],[,"(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],[[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-7]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EE:[,[,,"8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",,,,,,,[7,8,10]],[,,"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",,,,"3212345",,,[7]],[,,"(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",,,,"51234567",,,[7,8]],[,,"800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}",,,,"80012345"],[,,"(?:40\\d\\d|900)\\d{4}",,,,"9001234",,,[7,8]],[,,,,,,,,,[-1]],[,,"70[0-2]\\d{5}",,,,"70012345",,,[8]],[,,,,,,,,,[-1]],"EE",372,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],[,"(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,"800[2-9]\\d{3}",,,,,,,[7]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EG:[,[,,"[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",,,,,,,[8,9,10],[6,7]],[,,"13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",,,,"234567890",,,[8,9],[6,7]],[,,"1[0-25]\\d{8}",,,,"1001234567",,,[10]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"EG",20,"00","0",,,"0",,,,[[,"(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],[,"(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],[,"(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EH:[,[,,"[5-8]\\d{8}",,,,,,,[9]],[,,"528[89]\\d{5}",,,,"528812345"],[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}",,,,"650123456"],[,,"80[0-7]\\d{6}",,,,"801234567"],[,,"89\\d{7}",,,,"891234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}",,,,"592401234"],"EH",212,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,"528[89]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ER:[,[,,"[178]\\d{6}",,,,,,,[7],[6]],[,,"(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}",,,,"8370362",,,,[6]],[,,"(?:17[1-3]|7\\d\\d)\\d{4}",,,,"7123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ER",291,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ES:[,[,,"[5-9]\\d{8}",,,,,,,[9]],[,,"96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}",,,,"810123456"],[,,"(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}",,,,"612345678"],[,,"[89]00\\d{6}",,,,"800123456"],[,,"80[367]\\d{6}",,,,"803123456"],[,,"90[12]\\d{6}",,,,"901123456"],[,,"70\\d{7}",,,,"701234567"],[,,,,,,,,,[-1]],"ES",34,"00",,,,,,,,[[,"(\\d{4})","$1",["905"]],[,"(\\d{6})","$1",["[79]9"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]],[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"51\\d{7}",,,,"511234567"],,,[,,,,,,,,,[-1]]],ET:[,[,,"(?:11|[2-579]\\d)\\d{7}",,,,,,,[9],[7]],[,,"11667[01]\\d{3}|(?:11(?:1(?:1[124]|2[2-7]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8]|7\\d)|5(?:1[578]|44|5[0-4])|6(?:1[578]|2[69]|39|4[5-7]|5[0-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}",,,,"111112345",,,,[7]],[,,"700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}",,,,"911234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ET",251,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FI:[,[,,"[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"1[35-7][1-8]\\d{3,6}|(?:1[49][1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}",,,,"131234567",,,[5,6,7,8,9]],[,,"4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",,,,"412345678",,,[6,7,8,9,10]],[,,"800\\d{4,6}",,,,"800123456",,,[7,8,9]],[,,"[67]00\\d{5,6}",,,,"600123456",,,[8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FI",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,[[,"(\\d{5})","$1",["75[12]"],"0$1"],[,"(\\d{5})","$1",["20[2-59]"],"0$1"],[,"(\\d{6})","$1",["11"]],[,"(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],[,"(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],[,"(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],[,"(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],[[,"(\\d{5})","$1",["20[2-59]"],"0$1"],[,"(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],[,"(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],[,"(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],[,"(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],[,,,,,,,,,[-1]],1,"1[03-79]|[2-9]",[,,"20(?:2[023]|9[89])\\d{1,6}|(?:60[12]\\d|7099)\\d{4,5}|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:[1-3]00|7(?:0[1-5]\\d\\d|5[03-9]))\\d{3,7}"],[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}",,,,"10112345"],,,[,,,,,,,,,[-1]]],FJ:[,[,,"45\\d{5}|(?:0800\\d|[235-9])\\d{6}",,,,,,,[7,11]],[,,"603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}",,,,"3212345",,,[7]],[,,"(?:[279]\\d|45|5[01568]|8[034679])\\d{5}",,,,"7012345",,,[7]],[,,"0800\\d{7}",,,,"08001234567",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FJ",679,"0(?:0|52)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FK:[,[,,"[2-7]\\d{4}",,,,,,,[5]],[,,"[2-47]\\d{4}",,,,"31234"],[,,"[56]\\d{4}",,,,"51234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FK",500,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FM:[,[,,"(?:[39]\\d\\d|820)\\d{4}",,,,,,,[7]],[,,"31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}",,,,"3201234"],[,,"31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}",,,,"3501234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FM",691,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[389]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FO:[,[,,"[2-9]\\d{5}",,,,,,,[6]],[,,"(?:20|[34]\\d|8[19])\\d{4}",,,,"201234"],[,,"(?:[27][1-9]|5\\d|9[16])\\d{4}",,,,"211234"],[,,"80[257-9]\\d{3}",,,,"802123"],[,,"90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d",,,,"901123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:6[0-36]|88)\\d{4}",,,,"601234"],"FO",298,"00",,,,"(10(?:01|[12]0|88))",,,,[[,"(\\d{6})","$1",["[2-9]"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FR:[,[,,"[1-9]\\d{8}",,,,,,,[9]],[,,"(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}",,,,"123456789"],[,,"(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}",,,,"612345678"],[,,"80[0-5]\\d{6}",,,,"801234567"],[,,"836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}",,,,"891123456"],[,,"8(?:1[01]|2[0156]|4[024]|84)\\d{6}",,,,"884012345"],[,,,,,,,,,[-1]],[,,"9\\d{8}",,,,"912345678"],"FR",33,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["10"]],[,"(\\d{3})(\\d{3})","$1 $2",["1"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"80[6-9]\\d{6}",,,,"806123456"],,,[,,,,,,,,,[-1]]],GA:[,[,,"(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",,,,,,,[7,8]],[,,"[01]1\\d{6}",,,,"01441234",,,[8]],[,,"(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}",,,,"06031234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GA",241,"00",,,,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1",,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GB:[,[,,"[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",,,,,,,[7,9,10],[4,5,6,8]],[,,"(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",,,,"1212345678",,,[9,10],[4,5,6,7,8]],[,,"7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",,,,"7400123456",,,[10]],[,,"80[08]\\d{7}|800\\d{6}|8001111",,,,"8001234567"],[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",,,,"9012345678",,,[7,10]],[,,,,,,,,,[-1]],[,,"70\\d{8}",,,,"7012345678",,,[10]],[,,"56\\d{8}",,,,"5612345678",,,[10]],"GB",44,"00","0"," x",,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],[,"(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],[,"(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],[,"(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],[,"(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],,[,,"76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",,,,"7640123456",,,[10]],1,,[,,,,,,,,,[-1]],[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]],,,[,,,,,,,,,[-1]]],GD:[,[,,"(?:473|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[579]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}",,,,"4732691234",,,,[7]],[,,"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[68])|5(?:2[01]|3[3-8])|901)\\d{4}",,,,"4734031234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"GD",1,"011","1",,,"([2-9]\\d{6})$|1","473$1",,,,,[,,,,,,,,,[-1]],,"473",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GE:[,[,,"(?:[3-57]\\d\\d|800)\\d{6}",,,,,,,[9],[6,7]],[,,"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}",,,,"322123456",,,,[6,7]],[,,"5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|111|22[02]|77\\d)|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}",,,,"555123456"],[,,"800\\d{6}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"70[67]\\d{6}",,,,"706123456"],"GE",995,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"70[67]\\d{6}"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GF:[,[,,"[56]94\\d{6}|(?:80|9\\d)\\d{7}",,,,,,,[9]],[,,"594(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)\\d{4}",,,,"594101234"],[,,"694(?:[0-249]\\d|3[0-8])\\d{4}",,,,"694201234"],[,,"80[0-5]\\d{6}",,,,"800012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:(?:396|76\\d)\\d|476[0-5])\\d{4}",,,,"976012345"],"GF",594,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GG:[,[,,"(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",,,,,,,[7,9,10],[6]],[,,"1481[25-9]\\d{5}",,,,"1481256789",,,[10],[6]],[,,"7(?:(?:781|839)\\d|911[17])\\d{5}",,,,"7781123456",,,[10]],[,,"80[08]\\d{7}|800\\d{6}|8001111",,,,"8001234567"],[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",,,,"9012345678",,,[7,10]],[,,,,,,,,,[-1]],[,,"70\\d{8}",,,,"7012345678",,,[10]],[,,"56\\d{8}",,,,"5612345678",,,[10]],"GG",44,"00","0",,,"([25-9]\\d{5})$|0","1481$1",,,,,[,,"76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",,,,"7640123456",,,[10]],,,[,,,,,,,,,[-1]],[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]],,,[,,,,,,,,,[-1]]],GH:[,[,,"(?:[235]\\d{3}|800)\\d{5}",,,,,,,[8,9],[7]],[,,"3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}",,,,"302345678",,,[9],[7]],[,,"(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}",,,,"231234567",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GH",233,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[237]|8[0-2]"]],[,"(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],[[,"(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],[,,,,,,,,,[-1]],,,[,,"800\\d{5}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GI:[,[,,"(?:[25]\\d|60)\\d{6}",,,,,,,[8]],[,,"2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}",,,,"20012345"],[,,"5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}",,,,"57123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GI",350,"00",,,,,,,,[[,"(\\d{3})(\\d{5})","$1 $2",["2"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GL:[,[,,"(?:19|[2-689]\\d|70)\\d{4}",,,,,,,[6]],[,,"(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}",,,,"321000"],[,,"[245]\\d{5}",,,,"221234"],[,,"80\\d{4}",,,,"801234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3[89]\\d{4}",,,,"381234"],"GL",299,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GM:[,[,,"[2-9]\\d{6}",,,,,,,[7]],[,,"(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}",,,,"5661234"],[,,"(?:[23679]\\d|4[015]|5[0-489])\\d{5}",,,,"3012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GM",220,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GN:[,[,,"722\\d{6}|(?:3|6\\d)\\d{7}",,,,,,,[8,9]],[,,"3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}",,,,"30241234",,,[8]],[,,"6[0-356]\\d{7}",,,,"601123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"722\\d{6}",,,,"722123456",,,[9]],"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GP:[,[,,"590\\d{6}|(?:69|80|9\\d)\\d{7}",,,,,,,[9]],[,,"590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}",,,,"590201234"],[,,"69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}",,,,"690001234"],[,,"80[0-5]\\d{6}",,,,"800012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}",,,,"976012345"],"GP",590,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GQ:[,[,,"222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",,,,,,,[9]],[,,"33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}",,,,"333091234"],[,,"(?:222|55\\d)\\d{6}",,,,"222123456"],[,,"80\\d[1-9]\\d{5}",,,,"800123456"],[,,"90\\d[1-9]\\d{5}",,,,"900123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GQ",240,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],[,"(\\d{3})(\\d{6})","$1 $2",["[89]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GR:[,[,,"5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",,,,,,,[10,11,12]],[,,"2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",,,,"2123456789",,,[10]],[,,"68[57-9]\\d{7}|(?:69|94)\\d{8}",,,,"6912345678",,,[10]],[,,"800\\d{7,9}",,,,"8001234567"],[,,"90[19]\\d{7}",,,,"9091234567",,,[10]],[,,"8(?:0[16]|12|[27]5|50)\\d{7}",,,,"8011234567",,,[10]],[,,"70\\d{8}",,,,"7012345678",,,[10]],[,,,,,,,,,[-1]],"GR",30,"00",,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],[,"(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],[,"(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"5005000\\d{3}",,,,"5005000123",,,[10]],,,[,,,,,,,,,[-1]]],GT:[,[,,"80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",,,,,,,[8,11]],[,,"[267][2-9]\\d{6}",,,,"22456789",,,[8]],[,,"(?:[3-5]\\d\\d|80[0-4])\\d{5}",,,,"51234567",,,[8]],[,,"18[01]\\d{8}",,,,"18001112222",,,[11]],[,,"19\\d{9}",,,,"19001112222",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GT",502,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GU:[,[,,"(?:[58]\\d\\d|671|900)\\d{7}",,,,,,,[10],[7]],[,,"671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,"6713001234",,,,[7]],[,,"671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,"6713001234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"GU",1,"011","1",,,"([2-9]\\d{6})$|1","671$1",,1,,,[,,,,,,,,,[-1]],,"671",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GW:[,[,,"[49]\\d{8}|4\\d{6}",,,,,,,[7,9]],[,,"443\\d{6}",,,,"443201234",,,[9]],[,,"9(?:5\\d|6[569]|77)\\d{6}",,,,"955012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"40\\d{5}",,,,"4012345",,,[7]],"GW",245,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["40"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GY:[,[,,"(?:[2-8]\\d{3}|9008)\\d{3}",,,,,,,[7]],[,,"(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}",,,,"2201234"],[,,"510\\d{4}|(?:6\\d|7[0-5])\\d{5}",,,,"6091234"],[,,"(?:289|8(?:00|6[28]|88|99))\\d{4}",,,,"2891234"],[,,"9008\\d{3}",,,,"9008123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"515\\d{4}",,,,"5151234"],"GY",592,"001",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HK:[,[,,"8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",,,,,,,[5,6,7,8,9,11]],[,,"(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-2]))|58(?:0[1-9]|1[2-9]))\\d{4}",,,,"21234567",,,[8]],[,,"(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4])|74[0-2])|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[01]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[02357-9]|7[05])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-49]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",,,,"51234567",,,[8]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"900(?:[0-24-9]\\d{7}|3\\d{1,4})",,,,"90012345678",,,[5,6,7,8,11]],[,,,,,,,,,[-1]],[,,"8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",,,,"81123456",,,[8]],[,,,,,,,,,[-1]],"HK",852,"00(?:30|5[09]|[126-9]?)",,,,,,"00",,[[,"(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],,[,,"7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",,,,"71123456",,,[8]],,,[,,,,,,,,,[-1]],[,,"30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",,,,"30161234",,,[8]],,,[,,,,,,,,,[-1]]],HN:[,[,,"8\\d{10}|[237-9]\\d{7}",,,,,,,[8,11]],[,,"2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-6]|5[57]|6[245]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589])|5(?:0[2357-9]|1[1-356]|4[03-5]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",,,,"22123456",,,[8]],[,,"[37-9]\\d{7}",,,,"91234567",,,[8]],[,,"8002\\d{7}",,,,"80021234567",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"HN",504,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["8"]]],[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]],[,,,,,,,,,[-1]],,,[,,"8002\\d{7}",,,,,,,[11]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HR:[,[,,"(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",,,,,,,[6,7,8,9]],[,,"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",,,,"12345678",,,[8,9],[6,7]],[,,"9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-7])))\\d{4}|98\\d{6}",,,,"921234567",,,[8,9]],[,,"80\\d{5,7}",,,,"800123456",,,[7,8,9]],[,,"6[01459]\\d{6}|6[01]\\d{4,5}",,,,"611234",,,[6,7,8]],[,,,,,,,,,[-1]],[,,"7[45]\\d{6}",,,,"74123456",,,[8]],[,,,,,,,,,[-1]],"HR",385,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],[,"(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"62\\d{6,7}|72\\d{6}",,,,"62123456",,,[8,9]],,,[,,,,,,,,,[-1]]],HT:[,[,,"(?:[2-489]\\d|55)\\d{6}",,,,,,,[8]],[,,"2(?:2\\d|5[1-5]|81|9[149])\\d{5}",,,,"22453300"],[,,"(?:[34]\\d|55)\\d{6}",,,,"34101234"],[,,"8\\d{7}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}",,,,"98901234"],"HT",509,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HU:[,[,,"[235-7]\\d{8}|[1-9]\\d{7}",,,,,,,[8,9],[6,7]],[,,"(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}",,,,"12345678",,,[8],[6,7]],[,,"(?:[257]0|3[01])\\d{7}",,,,"201234567",,,[9]],[,,"(?:[48]0\\d|680[29])\\d{5}",,,,"80123456"],[,,"9[01]\\d{6}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"21\\d{7}",,,,"211234567",,,[9]],"HU",36,"00","06",,,"06",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],,[,,,,,,,,,[-1]],,,[,,"(?:[48]0\\d|680[29])\\d{5}"],[,,"38\\d{7}",,,,"381234567",,,[9]],,,[,,,,,,,,,[-1]]],ID:[,[,,"00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",,,,,,,[7,8,9,10,11,12,13,14,15,16,17],[5,6]],[,,"2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",,,,"218350123",,,[7,8,9,10,11],[5,6]],[,,"8[1-35-9]\\d{7,10}",,,,"812345678",,,[9,10,11,12]],[,,"00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}",,,,"8001234567",,,[8,9,10,11,12,13,14,15,16,17]],[,,"809\\d{7}",,,,"8091234567",,,[10]],[,,"804\\d{7}",,,,"8041234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ID",62,"00[89]","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],[,"(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],[,"(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3 $4",["001"]],[,"(\\d{2})(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],[,"(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],[,"(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],[,,,,,,,,,[-1]],,,[,,"001803\\d{5,11}|(?:007803\\d|8071)\\d{6}",,,,,,,[10,11,12,13,14,15,16,17]],[,,"(?:1500|8071\\d{3})\\d{3}",,,,"8071123456",,,[7,10]],,,[,,,,,,,,,[-1]]],IE:[,[,,"(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",,,,,,,[7,8,9,10],[5,6]],[,,"(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}",,,,"2212345",,,,[5,6]],[,,"8(?:22|[35-9]\\d)\\d{6}",,,,"850123456",,,[9]],[,,"1800\\d{6}",,,,"1800123456",,,[10]],[,,"15(?:1[2-8]|[2-8]0|9[089])\\d{6}",,,,"1520123456",,,[10]],[,,"18[59]0\\d{6}",,,,"1850123456",,,[10]],[,,"700\\d{6}",,,,"700123456",,,[9]],[,,"76\\d{7}",,,,"761234567",,,[9]],"IE",353,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],[,"(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],[,"(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"18[59]0\\d{6}",,,,,,,[10]],[,,"818\\d{6}",,,,"818123456",,,[9]],,,[,,"88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",,,,"8551234567",,,[10]]],IL:[,[,,"1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",,,,,,,[7,8,9,10,11,12]],[,,"153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",,,,"21234567",,,[8,11,12],[7]],[,,"55(?:410|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",,,,"502345678",,,[9]],[,,"1(?:255|80[019]\\d{3})\\d{3}",,,,"1800123456",,,[7,10]],[,,"1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}",,,,"1919123456",,,[8,10]],[,,"1700\\d{6}",,,,"1700123456",,,[10]],[,,,,,,,,,[-1]],[,,"7(?:38(?:0\\d|5[0-2569]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",,,,"771234567",,,[9]],"IL",972,"0(?:0|1[2-9])","0",,,"0",,,,[[,"(\\d{4})(\\d{3})","$1-$2",["125"]],[,"(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],[,"(\\d{4})(\\d{6})","$1-$2",["159"]],[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],[,"(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],,[,,,,,,,,,[-1]],,,[,,"1700\\d{6}",,,,,,,[10]],[,,"1599\\d{6}",,,,"1599123456",,,[10]],,,[,,"151\\d{8,9}",,,,"15112340000",,,[11,12]]],IM:[,[,,"1624\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10],[6]],[,,"1624(?:230|[5-8]\\d\\d)\\d{3}",,,,"1624756789",,,,[6]],[,,"76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}",,,,"7924123456"],[,,"808162\\d{4}",,,,"8081624567"],[,,"8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}",,,,"9016247890"],[,,,,,,,,,[-1]],[,,"70\\d{8}",,,,"7012345678"],[,,"56\\d{8}",,,,"5612345678"],"IM",44,"00","0",,,"([25-8]\\d{5})$|0","1624$1",,,,,[,,,,,,,,,[-1]],,"74576|(?:16|7[56])24",[,,,,,,,,,[-1]],[,,"3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}",,,,"5512345678"],,,[,,,,,,,,,[-1]]],IN:[,[,,"(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",,,,,,,[8,9,10,11,12,13],[6,7]],[,,"2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",,,,"7410410123",,,[10],[6,7,8]],[,,"(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}",,,,"8123456789",,,[10]],[,,"000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))",,,,"1800123456"],[,,"186[12]\\d{9}",,,,"1861123456789",,,[13]],[,,"1860\\d{7}",,,,"18603451234",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IN",91,"00","0",,,"0",,,,[[,"(\\d{7})","$1",["575"]],[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],,,1],[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],,,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],,,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",,1],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",,1],[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",,1],[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],,,1],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]],[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],,,1]],[[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],,,1],[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],,,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],,,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",,1],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",,1],[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",,1],[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],,,1],[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],,,1]],[,,,,,,,,,[-1]],,,[,,"1(?:600\\d{6}|800\\d{4,9})|(?:000800|18(?:03\\d\\d|6(?:0|[12]\\d\\d)))\\d{7}"],[,,"140\\d{7}",,,,"1409305260",,,[10]],,,[,,,,,,,,,[-1]]],IO:[,[,,"3\\d{6}",,,,,,,[7]],[,,"37\\d{5}",,,,"3709100"],[,,"38\\d{5}",,,,"3801234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IO",246,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["3"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],IQ:[,[,,"(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",,,,,,,[8,9,10],[6,7]],[,,"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",,,,"12345678",,,[8,9],[6,7]],[,,"7[3-9]\\d{8}",,,,"7912345678",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IQ",964,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],IR:[,[,,"[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",,,,,,,[4,5,6,7,10],[8]],[,,"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:121|[2689]0\\d)|4(?:111|40\\d))\\d{4}",,,,"2123456789",,,[6,7,10],[4,5,8]],[,,"9(?:(?:0(?:[0-35]\\d|4[4-6])|(?:[13]\\d|2[0-3])\\d)\\d|9(?:[0-46]\\d\\d|5[15]0|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}",,,,"9123456789",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IR",98,"00","0",,,"0",,,,[[,"(\\d{4,5})","$1",["96"],"0$1"],[,"(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"9(?:4440\\d{5}|6(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19]))",,,,,,,[4,5,10]],[,,"96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",,,,"9601",,,[4,5]],,,[,,,,,,,,,[-1]]],IS:[,[,,"(?:38\\d|[4-9])\\d{6}",,,,,,,[7,9]],[,,"(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",,,,"4101234",,,[7]],[,,"(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}",,,,"6111234"],[,,"80[0-8]\\d{4}",,,,"8001234",,,[7]],[,,"90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",,,,"9001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"49[0-24-79]\\d{4}",,,,"4921234",,,[7]],"IS",354,"00|1(?:0(?:01|[12]0)|100)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"809\\d{4}",,,,"8091234",,,[7]],,,[,,"(?:689|8(?:7[18]|80)|95[48])\\d{4}",,,,"6891234",,,[7]]],IT:[,[,,"0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",,,,,,,[6,7,8,9,10,11,12]],[,,"0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",,,,"0212345678",,,[6,7,8,9,10,11]],[,,"3[2-9]\\d{7,8}|(?:31|43)\\d{8}",,,,"3123456789",,,[9,10]],[,,"80(?:0\\d{3}|3)\\d{3}",,,,"800123456",,,[6,9]],[,,"(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",,,,"899123456",,,[6,8,9,10]],[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,"848123456",,,[6,9]],[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]],[,,"55\\d{8}",,,,"5512345678",,,[10]],"IT",39,"00",,,,,,,,[[,"(\\d{4,5})","$1",["1(?:0|9[246])","1(?:0|9(?:2[2-9]|[46]))"]],[,"(\\d{6})","$1",["1(?:1|92)"]],[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],[,"(\\d{4})(\\d{4})","$1 $2",["894"]],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],[[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],[,"(\\d{4})(\\d{4})","$1 $2",["894"]],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],[,,,,,,,,,[-1]],1,,[,,"848\\d{6}",,,,,,,[9]],[,,,,,,,,,[-1]],,,[,,"3[2-8]\\d{9,10}",,,,"33101234501",,,[11,12]]],JE:[,[,,"1534\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10],[6]],[,,"1534[0-24-8]\\d{5}",,,,"1534456789",,,,[6]],[,,"7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}",,,,"7797712345"],[,,"80(?:07(?:35|81)|8901)\\d{4}",,,,"8007354567"],[,,"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}",,,,"9018105678"],[,,,,,,,,,[-1]],[,,"701511\\d{4}",,,,"7015115678"],[,,"56\\d{8}",,,,"5612345678"],"JE",44,"00","0",,,"([0-24-8]\\d{5})$|0","1534$1",,,,,[,,"76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",,,,"7640123456"],,,[,,,,,,,,,[-1]],[,,"(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}",,,,"5512345678"],,,[,,,,,,,,,[-1]]],JM:[,[,,"(?:[58]\\d\\d|658|900)\\d{7}",,,,,,,[10],[7]],[,,"8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}",,,,"8765230123",,,,[7]],[,,"(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}",,,,"8762101234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"JM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"658|876",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],JO:[,[,,"(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",,,,,,,[8,9]],[,,"87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",,,,"62001234",,,[8]],[,,"7(?:[78][0-25-9]|9\\d)\\d{6}",,,,"790123456",,,[9]],[,,"80\\d{6}",,,,"80012345",,,[8]],[,,"9\\d{7}",,,,"90012345",,,[8]],[,,"85\\d{6}",,,,"85012345",,,[8]],[,,"70\\d{7}",,,,"700123456",,,[9]],[,,,,,,,,,[-1]],"JO",962,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],[,"(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],,[,,"74(?:66|77)\\d{5}",,,,"746612345",,,[9]],,,[,,,,,,,,,[-1]],[,,"8(?:10|8\\d)\\d{5}",,,,"88101234",,,[8]],,,[,,,,,,,,,[-1]]],JP:[,[,,"00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",,,,,,,[8,9,10,11,12,13,14,15,16,17]],[,,"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",,,,"312345678",,,[9]],[,,"[7-9]0[1-9]\\d{7}",,,,"9012345678",,,[10]],[,,"00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}",,,,"120123456"],[,,"990\\d{6}",,,,"990123456",,,[9]],[,,,,,,,,,[-1]],[,,"60\\d{7}",,,,"601234567",,,[9]],[,,"50[1-9]\\d{7}",,,,"5012345678",,,[10]],"JP",81,"010","0",,,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1",,,[[,"(\\d{4})(\\d{4})","$1-$2",["007","0077","00777","00777[01]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],[,"(\\d{4})(\\d{2})(\\d{3,4})","$1-$2-$3",["007","0077"]],[,"(\\d{4})(\\d{2})(\\d{4})","$1-$2-$3",["008"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3,4})","$1-$2-$3",["0"]],[,"(\\d{4})(\\d{4})(\\d{4,5})","$1-$2-$3",["0"]],[,"(\\d{4})(\\d{5})(\\d{5,6})","$1-$2-$3",["0"]],[,"(\\d{4})(\\d{6})(\\d{6,7})","$1-$2-$3",["0"]]],[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],[,,"20\\d{8}",,,,"2012345678",,,[10]],,,[,,"00(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d|00(?:37|66|78)\\d{6,13}"],[,,"570\\d{6}",,,,"570123456",,,[9]],,,[,,,,,,,,,[-1]]],KE:[,[,,"(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",,,,,,,[7,8,9,10]],[,,"(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",,,,"202012345",,,[7,8,9]],[,,"(?:1(?:0[0-8]|1[0-7]|2[014]|30)|7\\d\\d)\\d{6}",,,,"712123456",,,[9]],[,,"800[02-8]\\d{5,6}",,,,"800223456",,,[9,10]],[,,"900[02-9]\\d{5}",,,,"900223456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KE",254,"000","0",,,"0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],[,"(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KG:[,[,,"8\\d{9}|[235-9]\\d{8}",,,,,,,[9,10],[5,6]],[,,"312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",,,,"312123456",,,[9],[5,6]],[,,"312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}",,,,"700123456",,,[9]],[,,"800\\d{6,7}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KG",996,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],[,"(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KH:[,[,,"1\\d{9}|[1-9]\\d{7,8}",,,,,,,[8,9,10],[6,7]],[,,"23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",,,,"23756789",,,[8,9],[6,7]],[,,"(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",,,,"91234567",,,[8,9]],[,,"1800(?:1\\d|2[019])\\d{4}",,,,"1800123456",,,[10]],[,,"1900(?:1\\d|2[09])\\d{4}",,,,"1900123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KH",855,"00[14-9]","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KI:[,[,,"(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",,,,,,,[5,8]],[,,"(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}",,,,"31234"],[,,"(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}",,,,"72001234",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",,,,"30010000",,,[8]],"KI",686,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KM:[,[,,"[3478]\\d{6}",,,,,,,[7],[4]],[,,"7[4-7]\\d{5}",,,,"7712345",,,,[4]],[,,"[34]\\d{6}",,,,"3212345"],[,,,,,,,,,[-1]],[,,"8\\d{6}",,,,"8001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KM",269,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KN:[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}",,,,"8692361234",,,,[7]],[,,"869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}",,,,"8697652917",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"KN",1,"011","1",,,"([2-7]\\d{6})$|1","869$1",,,,,[,,,,,,,,,[-1]],,"869",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KP:[,[,,"85\\d{6}|(?:19\\d|[2-7])\\d{7}",,,,,,,[8,10],[6,7]],[,,"(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}",,,,"21234567",,,,[6,7]],[,,"19[1-3]\\d{7}",,,,"1921234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KP",850,"00|99","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"238[02-9]\\d{4}|2(?:[0-24-9]\\d|3[0-79])\\d{5}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KR:[,[,,"00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",,,,,,,[5,6,8,9,10,11,12,13,14],[3,4,7]],[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",,,,"22123456",,,[5,6,8,9,10],[3,4,7]],[,,"1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",,,,"1020000000",,,[9,10]],[,,"00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}",,,,"801234567",,,[9,11,12,13,14]],[,,"60[2-9]\\d{6}",,,,"602345678",,,[9]],[,,,,,,,,,[-1]],[,,"50\\d{8,9}",,,,"5012345678",,,[10,11]],[,,"70\\d{8}",,,,"7012345678",,,[10]],"KR",82,"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","0",,,"0(8(?:[1-46-8]|5\\d\\d))?",,,,[[,"(\\d{5})","$1",["1[016-9]1","1[016-9]11","1[016-9]114"],"0$1"],[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1","0$CC-$1"],[,"(\\d{4})(\\d{4})","$1-$2",["1"]],[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1","0$CC-$1"],[,"(\\d{5})(\\d{3})(\\d{3})","$1 $2 $3",["003","0030"]],[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1","0$CC-$1"],[,"(\\d{5})(\\d{3,4})(\\d{4})","$1 $2 $3",["0"]],[,"(\\d{5})(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],[[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1","0$CC-$1"],[,"(\\d{4})(\\d{4})","$1-$2",["1"]],[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1","0$CC-$1"]],[,,"15\\d{7,8}",,,,"1523456789",,,[9,10]],,,[,,"00(?:3(?:08\\d{6,7}|68\\d{7})|798\\d{7,9})",,,,,,,[11,12,13,14]],[,,"1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}",,,,"15441234",,,[8]],,,[,,,,,,,,,[-1]]],KW:[,[,,"18\\d{5}|(?:[2569]\\d|41)\\d{6}",,,,,,,[7,8]],[,,"2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",,,,"22345678",,,[8]],[,,"(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}",,,,"50012345",,,[8]],[,,"18\\d{5}",,,,"1801234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KW",965,"00",,,,,,,,[[,"(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],[,"(\\d{3})(\\d{5})","$1 $2",["[245]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KY:[,[,,"(?:345|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|[48]8)|9(?:14|4[035-9]))\\d{4}",,,,"3452221234",,,,[7]],[,,"345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}",,,,"3453231234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"(?:345976|900[2-9]\\d\\d)\\d{4}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"KY",1,"011","1",,,"([2-9]\\d{6})$|1","345$1",,,,,[,,"345849\\d{4}",,,,"3458491234"],,"345",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KZ:[,[,,"(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",,,,,,,[10,14],[5,6,7]],[,,"(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}",,,,"7123456789",,,[10],[5,6,7]],[,,"7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}",,,,"7710009998",,,[10]],[,,"8(?:00|108\\d{3})\\d{7}",,,,"8001234567"],[,,"809\\d{7}",,,,"8091234567",,,[10]],[,,,,,,,,,[-1]],[,,"808\\d{7}",,,,"8081234567",,,[10]],[,,"751\\d{7}",,,,"7511234567",,,[10]],"KZ",7,"810","8",,,"8",,"8~10",,,,[,,,,,,,,,[-1]],,"33|7",[,,"751\\d{7}",,,,,,,[10]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LA:[,[,,"[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",,,,,,,[8,9,10],[6]],[,,"(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",,,,"21212862",,,[8],[6]],[,,"208[78]\\d{6}|(?:20[23579]|30[24])\\d{7}",,,,"2023123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LA",856,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[0135-9]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"30[0135-9]\\d{6}",,,,"301234567",,,[9]],,,[,,,,,,,,,[-1]]],LB:[,[,,"[27-9]\\d{7}|[13-9]\\d{6}",,,,,,,[7,8]],[,,"7(?:62|8[0-7]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}",,,,"1123456"],[,,"793(?:[01]\\d|2[0-4])\\d{3}|(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[89]|9[12]))\\d{5}",,,,"71123456"],[,,,,,,,,,[-1]],[,,"9[01]\\d{6}",,,,"90123456",,,[8]],[,,"80\\d{6}",,,,"80123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LB",961,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LC:[,[,,"(?:[58]\\d\\d|758|900)\\d{7}",,,,,,,[10],[7]],[,,"758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}",,,,"7584305678",,,,[7]],[,,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}",,,,"7582845678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"LC",1,"011","1",,,"([2-8]\\d{6})$|1","758$1",,,,,[,,,,,,,,,[-1]],,"758",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LI:[,[,,"[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",,,,,,,[7,9]],[,,"(?:2(?:01|1[27]|2[02]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}",,,,"2345678",,,[7]],[,,"(?:6(?:(?:4[5-9]|5[0-469])\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}",,,,"660234567"],[,,"8002[28]\\d\\d|80(?:05\\d|9)\\d{4}",,,,"8002222"],[,,"90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",,,,"9002222",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LI",423,"00","0",,,"(1001)|0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"870(?:28|87)\\d\\d",,,,"8702812",,,[7]],,,[,,"697(?:42|56|[78]\\d)\\d{4}",,,,"697861234",,,[9]]],LK:[,[,,"[1-9]\\d{8}",,,,,,,[9],[7]],[,,"(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}",,,,"112345678",,,,[7]],[,,"7(?:[0-25-8]\\d|4[0-4])\\d{6}",,,,"712345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LK",94,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"1973\\d{5}",,,,"197312345"],,,[,,,,,,,,,[-1]]],LR:[,[,,"(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",,,,,,,[7,8,9]],[,,"2\\d{7}",,,,"21234567",,,[8]],[,,"(?:(?:(?:22|33)0|555|(?:77|88)\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}",,,,"770123456",,,[7,9]],[,,,,,,,,,[-1]],[,,"332(?:02|[34]\\d)\\d{4}",,,,"332021234",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LR",231,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LS:[,[,,"(?:[256]\\d\\d|800)\\d{5}",,,,,,,[8]],[,,"2\\d{7}",,,,"22123456"],[,,"[56]\\d{7}",,,,"50123456"],[,,"800[1256]\\d{4}",,,,"80021234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LS",266,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2568]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LT:[,[,,"(?:[3469]\\d|52|[78]0)\\d{6}",,,,,,,[8]],[,,"(?:3[1478]|4[124-6]|52)\\d{6}",,,,"31234567"],[,,"6\\d{7}",,,,"61234567"],[,,"80[02]\\d{5}",,,,"80012345"],[,,"9(?:0[0239]|10)\\d{5}",,,,"90012345"],[,,"808\\d{5}",,,,"80812345"],[,,"70[05]\\d{5}",,,,"70012345"],[,,"[89]01\\d{5}",,,,"80123456"],"LT",370,"00","0",,,"[08]",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",,1],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",,1],[,"(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",,1],[,"(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",,1]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"70[67]\\d{5}",,,,"70712345"],,,[,,,,,,,,,[-1]]],LU:[,[,,"35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",,,,,,,[4,5,6,7,8,9,10,11]],[,,"(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}",,,,"27123456"],[,,"6(?:[269][18]|5[1568]|7[189]|81)\\d{6}",,,,"628123456",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"90[015]\\d{5}",,,,"90012345",,,[8]],[,,"801\\d{5}",,,,"80112345",,,[8]],[,,,,,,,,,[-1]],[,,"20(?:1\\d{5}|[2-689]\\d{1,7})",,,,"20201234",,,[4,5,6,7,8,9,10]],"LU",352,"00",,,,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)",,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"],,"$CC $1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LV:[,[,,"(?:[268]\\d|90)\\d{6}",,,,,,,[8]],[,,"6\\d{7}",,,,"63123456"],[,,"23(?:23[0-57-9]|33[0238])\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[024-9]|3[0-24-9]))\\d{4}",,,,"21234567"],[,,"80\\d{6}",,,,"80123456"],[,,"90\\d{6}",,,,"90123456"],[,,"81\\d{6}",,,,"81123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LV",371,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LY:[,[,,"[2-9]\\d{8}",,,,,,,[9],[7]],[,,"(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}",,,,"212345678",,,,[7]],[,,"9[1-6]\\d{7}",,,,"912345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LY",218,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MA:[,[,,"[5-8]\\d{8}",,,,,,,[9]],[,,"5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}",,,,"520123456"],[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}",,,,"650123456"],[,,"80[0-7]\\d{6}",,,,"801234567"],[,,"89\\d{7}",,,,"891234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}",,,,"592401234"],"MA",212,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],[,"(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],[,"(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],[,"(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MC:[,[,,"(?:[3489]|6\\d)\\d{7}",,,,,,,[8,9]],[,,"(?:870|9[2-47-9]\\d)\\d{5}",,,,"99123456",,,[8]],[,,"4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}",,,,"612345678"],[,,"(?:800|90\\d)\\d{5}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MC",377,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["87"]],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],[,,,,,,,,,[-1]],,,[,,"8[07]0\\d{5}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MD:[,[,,"(?:[235-7]\\d|[89]0)\\d{6}",,,,,,,[8]],[,,"(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}",,,,"22212345"],[,,"562\\d{5}|(?:6\\d|7[16-9])\\d{6}",,,,"62112345"],[,,"800\\d{5}",,,,"80012345"],[,,"90[056]\\d{5}",,,,"90012345"],[,,"808\\d{5}",,,,"80812345"],[,,,,,,,,,[-1]],[,,"3[08]\\d{6}",,,,"30123456"],"MD",373,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"803\\d{5}",,,,"80312345"],,,[,,,,,,,,,[-1]]],ME:[,[,,"(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",,,,,,,[8,9],[6]],[,,"(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",,,,"30234567",,,[8],[6]],[,,"6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",,,,"67622901",,,[8]],[,,"80(?:[0-2578]|9\\d)\\d{5}",,,,"80080002"],[,,"9(?:4[1568]|5[178])\\d{5}",,,,"94515151",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"78[1-49]\\d{5}",,,,"78108780",,,[8]],"ME",382,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"77[1-9]\\d{5}",,,,"77273012",,,[8]],,,[,,,,,,,,,[-1]]],MF:[,[,,"590\\d{6}|(?:69|80|9\\d)\\d{7}",,,,,,,[9]],[,,"590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}",,,,"590271234"],[,,"69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}",,,,"690001234"],[,,"80[0-5]\\d{6}",,,,"800012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}",,,,"976012345"],"MF",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MG:[,[,,"[23]\\d{8}",,,,,,,[9],[7]],[,,"2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}",,,,"202123456",,,,[7]],[,,"3[2-47-9]\\d{7}",,,,"321234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"22\\d{7}",,,,"221234567"],"MG",261,"00","0",,,"([24-9]\\d{6})$|0","20$1",,,[[,"(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MH:[,[,,"329\\d{4}|(?:[256]\\d|45)\\d{5}",,,,,,,[7]],[,,"(?:247|528|625)\\d{4}",,,,"2471234"],[,,"(?:(?:23|54)5|329|45[35-8])\\d{4}",,,,"2351234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"635\\d{4}",,,,"6351234"],"MH",692,"011","1",,,"1",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MK:[,[,,"[2-578]\\d{7}",,,,,,,[8],[6,7]],[,,"(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}",,,,"22012345",,,,[6,7]],[,,"7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-48]\\d|6[01]|7[01578])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}",,,,"72345678"],[,,"800\\d{5}",,,,"80012345"],[,,"5\\d{7}",,,,"50012345"],[,,"8(?:0[1-9]|[1-9]\\d)\\d{5}",,,,"80123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MK",389,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ML:[,[,,"[24-9]\\d{7}",,,,,,,[8]],[,,"2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-39]))\\d{5}",,,,"20212345"],[,,"2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[01]|[679]\\d|8[2-49])\\d{6}",,,,"65012345"],[,,"80\\d{6}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ML",223,"00",,,,,,,,[[,"(\\d{4})","$1",["67[057-9]|74[045]","67(?:0[09]|[59]9|77|8[89])|74(?:0[02]|44|55)"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]],[,,,,,,,,,[-1]],,,[,,"80\\d{6}"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MM:[,[,,"1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",,,,,,,[6,7,8,9,10],[5]],[,,"(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|62|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|[26]2|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",,,,"1234567",,,[6,7,8,9],[5]],[,,"(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",,,,"92123456",,,[7,8,9,10]],[,,"80080(?:0[1-9]|2\\d)\\d{3}",,,,"8008001234",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"1333\\d{4}|[12]468\\d{4}",,,,"13331234",,,[8]],"MM",95,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],[,"(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],[,"(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MN:[,[,,"[12]\\d{7,9}|[5-9]\\d{7}",,,,,,,[8,9,10],[4,5,6]],[,,"[12]2[1-3]\\d{5,6}|(?:(?:[12](?:1|27)|5[368])\\d\\d|7(?:0(?:[0-5]\\d|7[078]|80)|128))\\d{4}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}",,,,"53123456",,,,[4,5,6]],[,,"(?:83[01]|92[039])\\d{5}|(?:5[05]|6[069]|8[015689]|9[013-9])\\d{6}",,,,"88123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"712[0-79]\\d{4}|7(?:1[013-9]|[25-9]\\d)\\d{5}",,,,"75123456",,,[8]],"MN",976,"001","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],[,"(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],[,"(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],[,"(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],[,"(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MO:[,[,,"0800\\d{3}|(?:28|[68]\\d)\\d{6}",,,,,,,[7,8]],[,,"(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}",,,,"28212345",,,[8]],[,,"6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}",,,,"66123456",,,[8]],[,,"0800\\d{3}",,,,"0800501",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MO",853,"00",,,,,,,,[[,"(\\d{4})(\\d{3})","$1 $2",["0"]],[,"(\\d{4})(\\d{4})","$1 $2",["[268]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MP:[,[,,"[58]\\d{9}|(?:67|90)0\\d{7}",,,,,,,[10],[7]],[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]],[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"MP",1,"011","1",,,"([2-9]\\d{6})$|1","670$1",,1,,,[,,,,,,,,,[-1]],,"670",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MQ:[,[,,"596\\d{6}|(?:69|[89]\\d)\\d{7}",,,,,,,[9]],[,,"(?:596(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}",,,,"596301234"],[,,"69[67]\\d{6}",,,,"696201234"],[,,"80[0-5]\\d{6}",,,,"800012345"],[,,"8[129]\\d{7}",,,,"810123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}",,,,"976612345"],"MQ",596,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]|8(?:0[6-9]|[36])"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MR:[,[,,"(?:[2-4]\\d\\d|800)\\d{5}",,,,,,,[8]],[,,"(?:25[08]|35\\d|45[1-7])\\d{5}",,,,"35123456"],[,,"[2-4][0-46-9]\\d{6}",,,,"22123456"],[,,"800\\d{5}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MR",222,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MS:[,[,,"(?:[58]\\d\\d|664|900)\\d{7}",,,,,,,[10],[7]],[,,"6644(?:1[0-3]|91)\\d{4}",,,,"6644912345",,,,[7]],[,,"664(?:3(?:49|9[1-6])|49[2-6])\\d{4}",,,,"6644923456",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"MS",1,"011","1",,,"([34]\\d{6})$|1","664$1",,,,,[,,,,,,,,,[-1]],,"664",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MT:[,[,,"3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",,,,,,,[8]],[,,"20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}",,,,"21001234"],[,,"(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}",,,,"96961234"],[,,"800(?:02|[3467]\\d)\\d{3}",,,,"80071234"],[,,"5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}",,,,"50037123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3550\\d{4}",,,,"35501234"],"MT",356,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]],,[,,"7117\\d{4}",,,,"71171234"],,,[,,,,,,,,,[-1]],[,,"501\\d{5}",,,,"50112345"],,,[,,,,,,,,,[-1]]],MU:[,[,,"(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",,,,,,,[7,8,10]],[,,"(?:2(?:[0346-8]\\d|1[0-7])|4(?:[013568]\\d|2[4-8]|71)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",,,,"54480123",,,[7,8]],[,,"5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-4]|3[013]))\\d{5}",,,,"52512345",,,[8]],[,,"802\\d{7}|80[0-2]\\d{4}",,,,"8001234",,,[7,10]],[,,"30\\d{5}",,,,"3012345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3(?:20|9\\d)\\d{4}",,,,"3201234",,,[7]],"MU",230,"0(?:0|[24-7]0|3[03])",,,,,,"020",,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],[,"(\\d{4})(\\d{4})","$1 $2",["[57]"]],[,"(\\d{5})(\\d{5})","$1 $2",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MV:[,[,,"(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",,,,,,,[7,10]],[,,"(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}",,,,"6701234",,,[7]],[,,"(?:46[46]|[79]\\d\\d)\\d{4}",,,,"7712345",,,[7]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MV",960,"0(?:0|19)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1-$2",["[34679]"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"4(?:0[01]|50)\\d{4}",,,,"4001234",,,[7]],,,[,,,,,,,,,[-1]]],MW:[,[,,"(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",,,,,,,[7,9]],[,,"(?:1[2-9]|2[12]\\d\\d)\\d{5}",,,,"1234567"],[,,"111\\d{6}|(?:31|77|[89][89])\\d{7}",,,,"991234567",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MW",265,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MX:[,[,,"[2-9]\\d{9}",,,,,,,[10],[7,8]],[,,"657[12]\\d{6}|(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}",,,,"2001234567",,,,[7,8]],[,,"657[12]\\d{6}|(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}",,,,"2221234567",,,,[7,8]],[,,"8(?:00|88)\\d{7}",,,,"8001234567"],[,,"900\\d{7}",,,,"9001234567"],[,,"300\\d{7}",,,,"3001234567"],[,,"500\\d{7}",,,,"5001234567"],[,,,,,,,,,[-1]],"MX",52,"0[09]",,,,,,"00",,[[,"(\\d{5})","$1",["53"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MY:[,[,,"1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",,,,,,,[8,9,10],[6,7]],[,,"4270\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",,,,"323856789",,,[8,9],[6,7]],[,,"1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}",,,,"123456789",,,[9,10]],[,,"1[378]00\\d{6}",,,,"1300123456",,,[10]],[,,"1600\\d{6}",,,,"1600123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",,,,"1546012345",,,[10]],"MY",60,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],[,"(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MZ:[,[,,"(?:2|8\\d)\\d{7}",,,,,,,[8,9]],[,,"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",,,,"21123456",,,[8]],[,,"8[2-79]\\d{7}",,,,"821234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MZ",258,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NA:[,[,,"[68]\\d{7,8}",,,,,,,[8,9]],[,,"64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}",,,,"61221234"],[,,"(?:60|8[1245])\\d{7}",,,,"811234567",,,[9]],[,,"80\\d{7}",,,,"800123456",,,[9]],[,,"8701\\d{5}",,,,"870123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"8(?:3\\d\\d|86)\\d{5}",,,,"88612345"],"NA",264,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NC:[,[,,"(?:050|[2-57-9]\\d\\d)\\d{3}",,,,,,,[6]],[,,"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}",,,,"201234"],[,,"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}",,,,"751234"],[,,"050\\d{3}",,,,"050012"],[,,"36\\d{4}",,,,"366711"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NC",687,"00",,,,,,,,[[,"(\\d{3})","$1",["5[6-8]"]],[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]],[[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NE:[,[,,"[027-9]\\d{7}",,,,,,,[8]],[,,"2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}",,,,"20201234"],[,,"(?:23|7[0467]|[89]\\d)\\d{6}",,,,"93123456"],[,,"08\\d{6}",,,,"08123456"],[,,"09\\d{6}",,,,"09123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NE",227,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NF:[,[,,"[13]\\d{5}",,,,,,,[6],[5]],[,,"(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}",,,,"106609",,,,[5]],[,,"(?:14|3[58])\\d{4}",,,,"381234",,,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NF",672,"00",,,,"([0-258]\\d{4})$","3$1",,,[[,"(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],[,"(\\d)(\\d{5})","$1 $2",["[13]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NG:[,[,,"38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}",,,,,,,[8,10,11,12,13,14],[6,7]],[,,"(?:20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])|38)\\d{6}",,,,"2033123456",,,[8,10],[6,7]],[,,"(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}",,,,"8021234567",,,[10]],[,,"800\\d{7,11}",,,,"80017591759",,,[10,11,12,13,14]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NG",234,"009","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["3"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],[,"(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"700\\d{7,11}",,,,"7001234567",,,[10,11,12,13,14]],,,[,,,,,,,,,[-1]]],NI:[,[,,"(?:1800|[25-8]\\d{3})\\d{4}",,,,,,,[8]],[,,"2\\d{7}",,,,"21234567"],[,,"(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}",,,,"81234567"],[,,"1800\\d{4}",,,,"18001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NI",505,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NL:[,[,,"(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",,,,,,,[5,6,7,8,9,10,11]],[,,"(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",,,,"101234567",,,[9]],[,,"(?:6[1-58]|970\\d)\\d{7}",,,,"612345678",,,[9,11]],[,,"800\\d{4,7}",,,,"8001234",,,[7,8,9,10]],[,,"90[069]\\d{4,7}",,,,"9061234",,,[7,8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:85|91)\\d{7}",,,,"851234567",,,[9]],"NL",31,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["1[238]|[34]"]],[,"(\\d{2})(\\d{3,4})","$1 $2",["14"]],[,"(\\d{6})","$1",["1"]],[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],[,"(\\d)(\\d{8})","$1 $2",["6"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],[[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],[,"(\\d)(\\d{8})","$1 $2",["6"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],[,,"66\\d{7}",,,,"662345678",,,[9]],,,[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)\\d",,,,,,,[5,6]],[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",,,,"14020",,,[5,6,9]],,,[,,,,,,,,,[-1]]],NO:[,[,,"(?:0|[2-9]\\d{3})\\d{4}",,,,,,,[5,8]],[,,"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",,,,"21234567",,,[8]],[,,"(?:4[015-8]|9\\d)\\d{6}",,,,"40612345",,,[8]],[,,"80[01]\\d{5}",,,,"80012345",,,[8]],[,,"82[09]\\d{5}",,,,"82012345",,,[8]],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]],[,,"880\\d{5}",,,,"88012345",,,[8]],[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]],"NO",47,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],,[,,,,,,,,,[-1]],1,"[02-689]|7[0-8]",[,,,,,,,,,[-1]],[,,"(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}",,,,"02000"],,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]]],NP:[,[,,"(?:1\\d|9)\\d{9}|[1-9]\\d{7}",,,,,,,[8,10,11],[6,7]],[,,"(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}",,,,"14567890",,,[8],[6,7]],[,,"9(?:00|6[0-3]|7[024-6]|8[0-24-68])\\d{7}",,,,"9841234567",,,[10]],[,,"1(?:66001|800\\d\\d)\\d{5}",,,,"16600101234",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NP",977,"00","0",,,"0",,,,[[,"(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],[,"(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],[,"(\\d{3})(\\d{7})","$1-$2",["9"]],[,"(\\d{4})(\\d{2})(\\d{5})","$1-$2-$3",["1"]]],[[,"(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],[,"(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],[,"(\\d{3})(\\d{7})","$1-$2",["9"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NR:[,[,,"(?:444|(?:55|8\\d)\\d|666)\\d{4}",,,,,,,[7]],[,,"444\\d{4}",,,,"4441234"],[,,"(?:55[3-9]|666|8\\d\\d)\\d{4}",,,,"5551234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NR",674,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NU:[,[,,"(?:[4-7]|888\\d)\\d{3}",,,,,,,[4,7]],[,,"[47]\\d{3}",,,,"7012",,,[4]],[,,"(?:[56]|888[1-9])\\d{3}",,,,"8884012"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NU",683,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NZ:[,[,,"[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",,,,,,,[5,6,7,8,9,10]],[,,"240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",,,,"32345678",,,[8],[7]],[,,"2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}",,,,"211234567",,,[8,9,10]],[,,"508\\d{6,7}|80\\d{6,8}",,,,"800123456",,,[8,9,10]],[,,"(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}",,,,"900123456",,,[7,8,9,10]],[,,,,,,,,,[-1]],[,,"70\\d{7}",,,,"701234567",,,[9]],[,,,,,,,,,[-1]],"NZ",64,"0(?:0|161)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}",,,,"83012378"],,,[,,,,,,,,,[-1]]],OM:[,[,,"(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",,,,,,,[7,8,9]],[,,"2[1-6]\\d{6}",,,,"23123456",,,[8]],[,,"(?:1505|90[1-9]\\d)\\d{4}|(?:7[126-9]|9[1-9])\\d{6}",,,,"92123456",,,[8]],[,,"8007\\d{4,5}|(?:500|800[05])\\d{4}",,,,"80071234"],[,,"900\\d{5}",,,,"90012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"OM",968,"00",,,,,,,,[[,"(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],[,"(\\d{2})(\\d{6})","$1 $2",["2"]],[,"(\\d{4})(\\d{4})","$1 $2",["[179]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PA:[,[,,"(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",,,,,,,[7,8,10,11]],[,,"(?:1(?:0\\d|1[479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[07-9]\\d|1[0-7]|2[0-5]|33|4[0-79]|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[5-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",,,,"2001234",,,[7]],[,,"(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}",,,,"61234567",,,[7,8]],[,,"800\\d{4,5}|(?:00800|800\\d)\\d{6}",,,,"8001234"],[,,"(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",,,,"8601234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PA",507,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],[,"(\\d{4})(\\d{4})","$1-$2",["[68]"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PE:[,[,,"(?:[14-8]|9\\d)\\d{7}",,,,,,,[8,9],[6,7]],[,,"(?:(?:(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",,,,"11234567",,,[8],[6,7]],[,,"9\\d{8}",,,,"912345678",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"805\\d{5}",,,,"80512345",,,[8]],[,,"801\\d{5}",,,,"80112345",,,[8]],[,,"80[24]\\d{5}",,,,"80212345",,,[8]],[,,,,,,,,,[-1]],"PE",51,"00|19(?:1[124]|77|90)00","0"," Anexo ",,"0",,"00",,[[,"(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],[,"(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],[,"(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PF:[,[,,"4\\d{5}(?:\\d{2})?|8\\d{7,8}",,,,,,,[6,8,9]],[,,"4(?:0[4-689]|9[4-68])\\d{5}",,,,"40412345",,,[8]],[,,"8[7-9]\\d{6}",,,,"87123456",,,[8]],[,,"80[0-5]\\d{6}",,,,"800012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"499\\d{5}",,,,"49901234",,,[8]],"PF",689,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],,[,,,,,,,,,[-1]],,,[,,"44\\d{4}",,,,,,,[6]],[,,"44\\d{4}",,,,"440123",,,[6]],,,[,,,,,,,,,[-1]]],PG:[,[,,"(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",,,,,,,[7,8]],[,,"(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}",,,,"3123456",,,[7]],[,,"(?:7\\d|8[1-38])\\d{6}",,,,"70123456",,,[8]],[,,"180\\d{4}",,,,"1801234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"2(?:0[0-57]|7[568])\\d{4}",,,,"2751234",,,[7]],"PG",675,"00|140[1-3]",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],[,"(\\d{4})(\\d{4})","$1 $2",["[78]"]]],,[,,"27[01]\\d{4}",,,,"2700123",,,[7]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PH:[,[,,"(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",,,,,,,[6,8,9,10,11,12,13],[4,5,7]],[,,"(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}",,,,"232345678",,,[6,8,9,10],[4,5,7]],[,,"(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}",,,,"9051234567",,,[10]],[,,"1800\\d{7,9}",,,,"180012345678",,,[11,12,13]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PH",63,"00","0",,,"0",,,,[[,"(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],[,"(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],[,"(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],[,"(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PK:[,[,,"122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",,,,,,,[8,9,10,11,12],[5,6,7]],[,,"(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}",,,,"2123456789",,,[9,10],[5,6,7,8]],[,,"3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}",,,,"3012345678",,,[10]],[,,"800\\d{5}(?:\\d{3})?",,,,"80012345",,,[8,11]],[,,"900\\d{5}",,,,"90012345",,,[8]],[,,,,,,,,,[-1]],[,,"122\\d{6}",,,,"122044444",,,[9]],[,,,,,,,,,[-1]],"PK",92,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],[,"(\\d{4})(\\d{5})","$1 $2",["1"]],[,"(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],[,"(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],[,"(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],[,"(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",,,,"21111825888",,,[11,12]],,,[,,,,,,,,,[-1]]],PL:[,[,,"(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",,,,,,,[6,7,8,9,10]],[,,"47\\d{7}|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",,,,"123456789",,,[7,9]],[,,"21(?:1[013-5]|2\\d)\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",,,,"512345678",,,[9]],[,,"800\\d{6,7}",,,,"800123456",,,[9,10]],[,,"70[01346-8]\\d{6}",,,,"701234567",,,[9]],[,,"801\\d{6}",,,,"801234567",,,[9]],[,,,,,,,,,[-1]],[,,"39\\d{7}",,,,"391234567",,,[9]],"PL",48,"00",,,,,,,,[[,"(\\d{5})","$1",["19"]],[,"(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]],,[,,"64\\d{4,7}",,,,"641234567",,,[6,7,8,9]],,,[,,,,,,,,,[-1]],[,,"804\\d{6}",,,,"804123456",,,[9]],,,[,,,,,,,,,[-1]]],PM:[,[,,"[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",,,,,,,[6,9]],[,,"(?:4[1-35-9]|5[0-47-9]|80[6-9]\\d\\d)\\d{4}",,,,"430123"],[,,"(?:4[02-489]|5[02-9]|708[45][0-5])\\d{4}",,,,"551234"],[,,"80[0-5]\\d{6}",,,,"800012345",,,[9]],[,,"8[129]\\d{7}",,,,"810123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PM",508,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PR:[,[,,"(?:[589]\\d\\d|787)\\d{7}",,,,,,,[10],[7]],[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]],[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"PR",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],,"787|939",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PS:[,[,,"[2489]2\\d{6}|(?:1\\d|5)\\d{8}",,,,,,,[8,9,10],[7]],[,,"(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",,,,"22234567",,,[8],[7]],[,,"5[69]\\d{7}",,,,"599123456",,,[9]],[,,"1800\\d{6}",,,,"1800123456",,,[10]],[,,,,,,,,,[-1]],[,,"1700\\d{6}",,,,"1700123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PS",970,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PT:[,[,,"1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",,,,,,,[9]],[,,"2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}",,,,"212345678"],[,,"6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}",,,,"912345678"],[,,"80[02]\\d{6}",,,,"800123456"],[,,"(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}",,,,"760123456"],[,,"80(?:8\\d|9[1579])\\d{5}",,,,"808123456"],[,,"884[0-4689]\\d{5}",,,,"884123456"],[,,"30\\d{7}",,,,"301234567"],"PT",351,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]],,[,,"6(?:222\\d|8988)\\d{4}",,,,"622212345"],,,[,,,,,,,,,[-1]],[,,"70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}",,,,"707123456"],,,[,,"600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}",,,,"600110000"]],PW:[,[,,"(?:[24-8]\\d\\d|345|900)\\d{4}",,,,,,,[7]],[,,"(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}",,,,"2771234"],[,,"(?:(?:46|83)[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}",,,,"6201234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PW",680,"01[12]",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PY:[,[,,"59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",,,,,,,[6,7,8,9,10,11],[5]],[,,"(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",,,,"212345678",,,[7,8,9],[5,6]],[,,"9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}",,,,"961456789",,,[9]],[,,"9800\\d{5,7}",,,,"98000123456",,,[9,10,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"8700[0-4]\\d{4}",,,,"870012345",,,[9]],"PY",595,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],[,"(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],[,"(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],[,"(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"[2-9]0\\d{4,7}",,,,"201234567",,,[6,7,8,9]],,,[,,,,,,,,,[-1]]],QA:[,[,,"800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",,,,,,,[7,8,9,11]],[,,"4(?:1111|2022)\\d{3}|4(?:[04]\\d\\d|14[0-6]|999)\\d{4}",,,,"44123456",,,[8]],[,,"[35-7]\\d{7}",,,,"33123456",,,[8]],[,,"800\\d{4}|(?:0080[01]|800)\\d{6}",,,,"8001234",,,[7,9,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"QA",974,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],[,"(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]],,[,,"2[16]\\d{5}",,,,"2123456",,,[7]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RE:[,[,,"(?:26|[689]\\d)\\d{7}",,,,,,,[9]],[,,"26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}",,,,"262161234"],[,,"69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}",,,,"692123456"],[,,"80\\d{7}",,,,"801234567"],[,,"89[1-37-9]\\d{6}",,,,"891123456"],[,,"8(?:1[019]|2[0156]|84|90)\\d{6}",,,,"810123456"],[,,,,,,,,,[-1]],[,,"9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}",,,,"939901234"],"RE",262,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RO:[,[,,"(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",,,,,,,[6,9]],[,,"[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d",,,,"211234567"],[,,"(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",,,,"712034567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"90[0136]\\d{6}",,,,"900123456",,,[9]],[,,"801\\d{6}",,,,"801123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RO",40,"00","0"," int ",,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],[,"(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:37\\d|80[578])\\d{6}",,,,"372123456",,,[9]],,,[,,,,,,,,,[-1]]],RS:[,[,,"38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",,,,,,,[6,7,8,9,10,11,12],[4,5]],[,,"(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",,,,"10234567",,,[7,8,9,10,11,12],[4,5,6]],[,,"6(?:[0-689]|7\\d)\\d{6,7}",,,,"601234567",,,[8,9,10]],[,,"800\\d{3,9}",,,,"80012345"],[,,"(?:78\\d|90[0169])\\d{3,7}",,,,"90012345",,,[6,7,8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RS",381,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],[,"(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"7[06]\\d{4,10}",,,,"700123456"],,,[,,,,,,,,,[-1]]],RU:[,[,,"8\\d{13}|[347-9]\\d{9}",,,,,,,[10,14],[7]],[,,"(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-79]|7[1-37-9]))\\d{7}",,,,"3011234567",,,[10],[7]],[,,"9\\d{9}",,,,"9123456789",,,[10]],[,,"8(?:0[04]|108\\d{3})\\d{7}",,,,"8001234567"],[,,"80[39]\\d{7}",,,,"8091234567",,,[10]],[,,,,,,,,,[-1]],[,,"808\\d{7}",,,,"8081234567",,,[10]],[,,,,,,,,,[-1]],"RU",7,"810","8",,,"8",,"8~10",,[[,"(\\d{3})(\\d{2})(\\d{2})","$1-$2-$3",["[0-79]"]],[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",,1],[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",,1],[,"(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],[[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",,1],[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",,1],[,"(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],[,,,,,,,,,[-1]],1,"3[04-689]|[489]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RW:[,[,,"(?:06|[27]\\d\\d|[89]00)\\d{6}",,,,,,,[8,9]],[,,"(?:06|2[23568]\\d)\\d{6}",,,,"250123456"],[,,"7[237-9]\\d{7}",,,,"720123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"900\\d{6}",,,,"900123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RW",250,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SA:[,[,,"92\\d{7}|(?:[15]|8\\d)\\d{8}",,,,,,,[9,10],[7]],[,,"1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",,,,"112345678",,,[9],[7]],[,,"579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}",,,,"512345678",,,[9]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"925\\d{6}",,,,"925012345",,,[9]],[,,"920\\d{6}",,,,"920012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SA",966,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["9"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"811\\d{7}",,,,"8110123456",,,[10]],,,[,,,,,,,,,[-1]]],SB:[,[,,"[6-9]\\d{6}|[1-6]\\d{4}",,,,,,,[5,7]],[,,"(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",,,,"40123",,,[5]],[,,"48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}",,,,"7421234"],[,,"1[38]\\d{3}",,,,"18123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5[12]\\d{3}",,,,"51123",,,[5]],"SB",677,"0[01]",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SC:[,[,,"(?:[2489]\\d|64)\\d{5}",,,,,,,[7]],[,,"4[2-46]\\d{5}",,,,"4217123"],[,,"2[125-8]\\d{5}",,,,"2510123"],[,,"800[08]\\d{3}",,,,"8000000"],[,,"85\\d{5}",,,,"8512345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"971\\d{4}|(?:64|95)\\d{5}",,,,"6412345"],"SC",248,"010|0[0-2]",,,,,,"00",,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SD:[,[,,"[19]\\d{8}",,,,,,,[9]],[,,"1(?:5\\d|8[35-7])\\d{6}",,,,"153123456"],[,,"(?:1[0-2]|9[0-3569])\\d{7}",,,,"911231234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SD",249,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SE:[,[,,"(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",,,,,,,[6,7,8,9,10,12]],[,,"(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",,,,"8123456",,,[7,8,9]],[,,"7[02369]\\d{7}",,,,"701234567",,,[9]],[,,"20\\d{4,7}",,,,"20123456",,,[6,7,8,9]],[,,"649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}",,,,"9001234567",,,[7,8,9,10]],[,,"77[0-7]\\d{6}",,,,"771234567",,,[9]],[,,"75[1-8]\\d{6}",,,,"751234567",,,[9]],[,,,,,,,,,[-1]],"SE",46,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1"],[,"(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1"],[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1"],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1"],[,"(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1"],[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1"]],[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1 $2 $3",["20"]],[,"(\\d{3})(\\d{4})","$1 $2",["9(?:00|39|44|9)"]],[,"(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"]],[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1 $2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]],[,"(\\d{3})(\\d{2,3})(\\d{3})","$1 $2 $3",["9(?:00|39|44)"]],[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"]],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["10|7"]],[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["8"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["9"]],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]]],[,,"74[02-9]\\d{6}",,,,"740123456",,,[9]],,,[,,,,,,,,,[-1]],[,,"10[1-8]\\d{6}",,,,"102345678",,,[9]],,,[,,"(?:25[245]|67[3-68])\\d{9}",,,,"254123456789",,,[12]]],SG:[,[,,"(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",,,,,,,[8,10,11]],[,,"662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",,,,"61234567",,,[8]],[,,"8(?:09[0-689]|96[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-5])|9[0-8]\\d)\\d{5}",,,,"81234567",,,[8]],[,,"(?:18|8)00\\d{7}",,,,"18001234567",,,[10,11]],[,,"1900\\d{7}",,,,"19001234567",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:3[12]\\d|666)\\d{5}",,,,"31234567",,,[8]],"SG",65,"0[0-3]\\d",,,,,,,,[[,"(\\d{4,5})","$1",["1[013-9]|77","1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]],[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],[[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"7000\\d{7}",,,,"70001234567",,,[11]],,,[,,,,,,,,,[-1]]],SH:[,[,,"(?:[256]\\d|8)\\d{3}",,,,,,,[4,5]],[,,"2(?:[0-57-9]\\d|6[4-9])\\d\\d",,,,"22158"],[,,"[56]\\d{4}",,,,"51234",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"262\\d\\d",,,,"26212",,,[5]],"SH",290,"00",,,,,,,,,,[,,,,,,,,,[-1]],1,"[256]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SI:[,[,,"[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",,,,,,,[5,6,7,8]],[,,"(?:[1-357][2-8]|4[24-8])\\d{6}",,,,"12345678",,,[8],[7]],[,,"65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",,,,"31234567",,,[8]],[,,"80\\d{4,6}",,,,"80123456",,,[6,7,8]],[,,"89[1-3]\\d{2,5}|90\\d{4,6}",,,,"90123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}",,,,"59012345",,,[8]],"SI",386,"00|10(?:22|66|88|99)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],[,"(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SJ:[,[,,"0\\d{4}|(?:[489]\\d|79)\\d{6}",,,,,,,[5,8]],[,,"79\\d{6}",,,,"79123456",,,[8]],[,,"(?:4[015-8]|9\\d)\\d{6}",,,,"41234567",,,[8]],[,,"80[01]\\d{5}",,,,"80012345",,,[8]],[,,"82[09]\\d{5}",,,,"82012345",,,[8]],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]],[,,"880\\d{5}",,,,"88012345",,,[8]],[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]],"SJ",47,"00",,,,,,,,,,[,,,,,,,,,[-1]],,"79",[,,,,,,,,,[-1]],[,,"(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}",,,,"02000"],,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]]],SK:[,[,,"[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",,,,,,,[6,7,9]],[,,"(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d",,,,"221234567"],[,,"909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",,,,"912123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"9(?:00|[78]\\d)\\d{6}",,,,"900123456",,,[9]],[,,"8[5-9]\\d{7}",,,,"850123456",,,[9]],[,,,,,,,,,[-1]],[,,"6(?:02|5[0-4]|9[0-6])\\d{6}",,,,"690123456",,,[9]],"SK",421,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],[,"(\\d{4})(\\d{3})","$1 $2",["909","9090"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],[,,"9090\\d{3}",,,,"9090123",,,[7]],,,[,,"9090\\d{3}|(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}",,,,,,,[7,9]],[,,"96\\d{7}",,,,"961234567",,,[9]],,,[,,,,,,,,,[-1]]],SL:[,[,,"(?:[237-9]\\d|66)\\d{6}",,,,,,,[8],[6]],[,,"22[2-4][2-9]\\d{4}",,,,"22221234",,,,[6]],[,,"(?:25|3[0-5]|66|7[2-9]|8[08]|9[09])\\d{6}",,,,"25123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SL",232,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SM:[,[,,"(?:0549|[5-7]\\d)\\d{6}",,,,,,,[8,10],[6]],[,,"0549(?:8[0157-9]|9\\d)\\d{4}",,,,"0549886377",,,[10],[6]],[,,"6[16]\\d{6}",,,,"66661212",,,[8]],[,,,,,,,,,[-1]],[,,"7[178]\\d{6}",,,,"71123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5[158]\\d{6}",,,,"58001110",,,[8]],"SM",378,"00",,,,"([89]\\d{5})$","0549$1",,,[[,"(\\d{6})","$1",["[89]"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],[,"(\\d{4})(\\d{6})","$1 $2",["0"]]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],[,"(\\d{4})(\\d{6})","$1 $2",["0"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SN:[,[,,"(?:[378]\\d|93)\\d{7}",,,,,,,[9]],[,,"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}",,,,"301012345"],[,,"7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}",,,,"701234567"],[,,"800\\d{6}",,,,"800123456"],[,,"88[4689]\\d{6}",,,,"884123456"],[,,"81[02468]\\d{6}",,,,"810123456"],[,,,,,,,,,[-1]],[,,"(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}",,,,"933301234"],"SN",221,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SO:[,[,,"[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",,,,,,,[6,7,8,9]],[,,"(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",,,,"4012345",,,[6,7]],[,,"(?:(?:15|(?:3[59]|4[89]|6\\d|7[79]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",,,,"71123456",,,[7,8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SO",252,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4})","$1 $2",["8[125]"]],[,"(\\d{6})","$1",["[134]"]],[,"(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],[,"(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],[,"(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SR:[,[,,"(?:[2-5]|68|[78]\\d)\\d{5}",,,,,,,[6,7]],[,,"(?:2[1-3]|3[0-7]|(?:4|68)\\d|5[2-58])\\d{4}",,,,"211234"],[,,"(?:7[124-7]|8[124-9])\\d{5}",,,,"7412345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"56\\d{4}",,,,"561234",,,[6]],"SR",597,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],[,"(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],[,"(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SS:[,[,,"[19]\\d{8}",,,,,,,[9]],[,,"1[89]\\d{7}",,,,"181234567"],[,,"(?:12|9[1257-9])\\d{7}",,,,"977123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SS",211,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ST:[,[,,"(?:22|9\\d)\\d{5}",,,,,,,[7]],[,,"22\\d{5}",,,,"2221234"],[,,"900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}",,,,"9812345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ST",239,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[29]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SV:[,[,,"[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",,,,,,,[7,8,11]],[,,"2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}",,,,"21234567",,,[8]],[,,"[67]\\d{7}",,,,"70123456",,,[8]],[,,"800\\d{8}|80[01]\\d{4}",,,,"8001234",,,[7,11]],[,,"900\\d{4}(?:\\d{4})?",,,,"9001234",,,[7,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SV",503,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[89]"]],[,"(\\d{4})(\\d{4})","$1 $2",["[267]"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SX:[,[,,"7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"7215(?:4[2-8]|8[239]|9[056])\\d{4}",,,,"7215425678",,,,[7]],[,,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}",,,,"7215205678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"SX",1,"011","1",,,"(5\\d{6})$|1","721$1",,,,,[,,,,,,,,,[-1]],,"721",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SY:[,[,,"[1-39]\\d{8}|[1-5]\\d{7}",,,,,,,[8,9],[6,7]],[,,"21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}",,,,"112345678",,,,[6,7]],[,,"9[1-689]\\d{7}",,,,"944567890",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SY",963,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",,1]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SZ:[,[,,"0800\\d{4}|(?:[237]\\d|900)\\d{6}",,,,,,,[8,9]],[,,"[23][2-5]\\d{6}",,,,"22171234",,,[8]],[,,"7[6-9]\\d{6}",,,,"76123456",,,[8]],[,,"0800\\d{4}",,,,"08001234",,,[8]],[,,"900\\d{6}",,,,"900012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"70\\d{6}",,,,"70012345",,,[8]],"SZ",268,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[0237]"]],[,"(\\d{5})(\\d{4})","$1 $2",["9"]]],,[,,,,,,,,,[-1]],,,[,,"0800\\d{4}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TA:[,[,,"8\\d{3}",,,,,,,[4]],[,,"8\\d{3}",,,,"8999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TA",290,"00",,,,,,,,,,[,,,,,,,,,[-1]],,"8",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TC:[,[,,"(?:[58]\\d\\d|649|900)\\d{7}",,,,,,,[10],[7]],[,,"649(?:266|712|9(?:4\\d|50))\\d{4}",,,,"6497121234",,,,[7]],[,,"649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}",,,,"6492311234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"649(?:71[01]|966)\\d{4}",,,,"6497101234",,,,[7]],"TC",1,"011","1",,,"([2-479]\\d{6})$|1","649$1",,,,,[,,,,,,,,,[-1]],,"649",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TD:[,[,,"(?:22|[689]\\d|77)\\d{6}",,,,,,,[8]],[,,"22(?:[37-9]0|5[0-5]|6[89])\\d{4}",,,,"22501234"],[,,"(?:[69]\\d|77|8[56])\\d{6}",,,,"63012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TD",235,"00|16",,,,,,"00",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TG:[,[,,"[279]\\d{7}",,,,,,,[8]],[,,"2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}",,,,"22212345"],[,,"(?:7[019]|9[0-36-9])\\d{6}",,,,"90112345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TG",228,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TH:[,[,,"(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",,,,,,,[8,9,10,13]],[,,"(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",,,,"21234567",,,[8]],[,,"67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}",,,,"812345678",,,[9]],[,,"(?:001800\\d|1800)\\d{6}",,,,"1800123456",,,[10,13]],[,,"1900\\d{6}",,,,"1900123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"6[08]\\d{7}",,,,"601234567",,,[9]],"TH",66,"00[1-9]","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TJ:[,[,,"[0-57-9]\\d{8}",,,,,,,[9],[3,5,6,7]],[,,"(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}",,,,"372123456",,,,[3,5,6,7]],[,,"(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0178]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}",,,,"917123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TJ",992,"810",,,,,,"8~10",,[[,"(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],[,"(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TK:[,[,,"[2-47]\\d{3,6}",,,,,,,[4,5,6,7]],[,,"(?:2[2-4]|[34]\\d)\\d{2,5}",,,,"3101"],[,,"7[2-4]\\d{2,5}",,,,"7290"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TK",690,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TL:[,[,,"7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",,,,,,,[7,8]],[,,"(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",,,,"2112345",,,[7]],[,,"7[2-8]\\d{6}",,,,"77212345",,,[8]],[,,"80\\d{5}",,,,"8012345",,,[7]],[,,"90\\d{5}",,,,"9012345",,,[7]],[,,,,,,,,,[-1]],[,,"70\\d{5}",,,,"7012345",,,[7]],[,,,,,,,,,[-1]],"TL",670,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],[,"(\\d{4})(\\d{4})","$1 $2",["7"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TM:[,[,,"(?:[1-6]\\d|71)\\d{6}",,,,,,,[8]],[,,"(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}",,,,"12345678"],[,,"(?:6\\d|71)\\d{6}",,,,"66123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TM",993,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],[,"(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TN:[,[,,"[2-57-9]\\d{7}",,,,,,,[8]],[,,"81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}",,,,"30010123"],[,,"3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}",,,,"20123456"],[,,"8010\\d{4}",,,,"80101234"],[,,"88\\d{6}",,,,"88123456"],[,,"8[12]10\\d{4}",,,,"81101234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TN",216,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TO:[,[,,"(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",,,,,,,[5,7]],[,,"(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",,,,"20123",,,[5]],[,,"(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}",,,,"7715123",,,[7]],[,,"0800\\d{3}",,,,"0800222",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"55[0-37-9]\\d{4}",,,,"5510123",,,[7]],"TO",676,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],[,"(\\d{4})(\\d{3})","$1 $2",["0"]],[,"(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TR:[,[,,"4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",,,,,,,[7,10,12,13]],[,,"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",,,,"2123456789",,,[10]],[,,"561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}",,,,"5012345678",,,[10]],[,,"8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})",,,,"8001234567",,,[10,12,13]],[,,"(?:8[89]8|900)\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,"592(?:21[12]|461)\\d{4}",,,,"5922121234",,,[10]],[,,"850\\d{7}",,,,"8500123456",,,[10]],"TR",90,"00","0",,,"0",,,,[[,"(\\d{3})(\\d)(\\d{3})","$1 $2 $3",["444"],,,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",,1],[,"(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",,1]],[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",,1],[,"(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",,1]],[,,"512\\d{7}",,,,"5123456789",,,[10]],,,[,,"(?:444|811\\d{3})\\d{4}",,,,,,,[7,10]],[,,"444\\d{4}",,,,"4441444",,,[7]],,,[,,,,,,,,,[-1]]],TT:[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}",,,,"8682211234",,,,[7]],[,,"868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}",,,,"8682911234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"TT",1,"011","1",,,"([2-46-8]\\d{6})$|1","868$1",,,,,[,,,,,,,,,[-1]],,"868",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"868619\\d{4}",,,,"8686191234",,,,[7]]],TV:[,[,,"(?:2|7\\d\\d|90)\\d{4}",,,,,,,[5,6,7]],[,,"2[02-9]\\d{3}",,,,"20123",,,[5]],[,,"(?:7[01]\\d|90)\\d{4}",,,,"901234",,,[6,7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TV",688,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2"]],[,"(\\d{2})(\\d{4})","$1 $2",["90"]],[,"(\\d{2})(\\d{5})","$1 $2",["7"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TW:[,[,,"[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",,,,,,,[7,8,9,10,11]],[,,"(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",,,,"221234567",,,[8,9]],[,,"(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",,,,"912345678",,,[9]],[,,"80[0-79]\\d{6}|800\\d{5}",,,,"800123456",,,[8,9]],[,,"20(?:[013-9]\\d\\d|2)\\d{4}",,,,"203123456",,,[7,9]],[,,,,,,,,,[-1]],[,,"99\\d{7}",,,,"990123456",,,[9]],[,,"7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",,,,"7012345678",,,[10,11]],"TW",886,"0(?:0[25-79]|19)","0","#",,"0",,,,[[,"(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"50[0-46-9]\\d{6}",,,,"500123456",,,[9]],,,[,,,,,,,,,[-1]]],TZ:[,[,,"(?:[25-8]\\d|41|90)\\d{7}",,,,,,,[9]],[,,"2[2-8]\\d{7}",,,,"222345678"],[,,"(?:6[125-9]|7[13-9])\\d{7}",,,,"621234567"],[,,"80[08]\\d{6}",,,,"800123456"],[,,"90\\d{7}",,,,"900123456"],[,,"8(?:40|6[01])\\d{6}",,,,"840123456"],[,,,,,,,,,[-1]],[,,"41\\d{7}",,,,"412345678"],"TZ",255,"00[056]","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["5"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"(?:8(?:[04]0|6[01])|90\\d)\\d{6}"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UA:[,[,,"[89]\\d{9}|[3-9]\\d{8}",,,,,,,[9,10],[5,6,7]],[,,"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",,,,"311234567",,,[9],[5,6,7]],[,,"790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}",,,,"501234567",,,[9]],[,,"800[1-8]\\d{5,6}",,,,"800123456"],[,,"900[239]\\d{5,6}",,,,"900212345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"89[1-579]\\d{6}",,,,"891234567",,,[9]],"UA",380,"00","0",,,"0",,"0~0",,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],[,"(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UG:[,[,,"800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",,,,,,,[9],[5,6,7]],[,,"20(?:(?:240|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}",,,,"312345678",,,,[5,6,7]],[,,"72[48]0\\d{5}|7(?:[015-8]\\d|2[067]|36|4[0-6]|9[89])\\d{6}",,,,"712345678"],[,,"800[1-3]\\d{5}",,,,"800123456"],[,,"90[1-3]\\d{6}",,,,"901123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],[,"(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],US:[,[,,"[2-9]\\d{9}|3\\d{6}",,,,,,,[10],[7]],[,,"(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,"2015550123",,,,[7]],[,,"(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,"2015550123",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"305209\\d{4}",,,,"3052090123",,,,[7]],"US",1,"011","1",,,"1",,,1,[[,"(\\d{3})(\\d{4})","$1-$2",["310"],,,1],[,"(\\d{3})(\\d{4})","$1-$2",["[24-9]|3(?:[02-9]|1[1-9])"]],[,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],,,1]],[[,"(\\d{3})(\\d{4})","$1-$2",["310"],,,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[2-9]"]]],[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UY:[,[,,"0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",,,,,,,[6,7,8,9,10,11,12,13]],[,,"(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",,,,"21231234",,,[8],[7]],[,,"9[1-9]\\d{6}",,,,"94231234",,,[8]],[,,"0004\\d{2,9}|(?:405|80[05])\\d{4}",,,,"8001234"],[,,"90[0-8]\\d{4}",,,,"9001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UY",598,"0(?:0|1[3-9]\\d)","0"," int. ",,"0",,"00",,[[,"(\\d{3})(\\d{3,4})","$1 $2",["0"]],[,"(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],[,"(\\d{4})(\\d{4})","$1 $2",["[124]"]],[,"(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UZ:[,[,,"(?:20|33|[5-79]\\d|88)\\d{7}",,,,,,,[9]],[,,"(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|(?:1[12]|[68]\\d)\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}",,,,"669050123"],[,,"(?:(?:[25]0|33|88|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}",,,,"912345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UZ",998,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VA:[,[,,"0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",,,,,,,[6,7,8,9,10,11,12]],[,,"06698\\d{1,6}",,,,"0669812345",,,[6,7,8,9,10,11]],[,,"3[1-9]\\d{8}|3[2-9]\\d{7}",,,,"3123456789",,,[9,10]],[,,"80(?:0\\d{3}|3)\\d{3}",,,,"800123456",,,[6,9]],[,,"(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",,,,"899123456",,,[6,8,9,10]],[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,"848123456",,,[6,9]],[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]],[,,"55\\d{8}",,,,"5512345678",,,[10]],"VA",39,"00",,,,,,,,,,[,,,,,,,,,[-1]],,"06698",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"3[2-8]\\d{9,10}",,,,"33101234501",,,[11,12]]],VC:[,[,,"(?:[58]\\d\\d|784|900)\\d{7}",,,,,,,[10],[7]],[,,"784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}",,,,"7842661234",,,,[7]],[,,"784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}",,,,"7844301234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"78451[0-2]\\d{4}",,,,"7845101234",,,,[7]],"VC",1,"011","1",,,"([2-7]\\d{6})$|1","784$1",,,,,[,,,,,,,,,[-1]],,"784",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VE:[,[,,"[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",,,,,,,[10],[7]],[,,"(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}",,,,"2121234567",,,,[7]],[,,"4(?:1[24-8]|2[46])\\d{7}",,,,"4121234567"],[,,"800\\d{7}",,,,"8001234567"],[,,"90[01]\\d{7}",,,,"9001234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"VE",58,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1","$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"501\\d{7}",,,,"5010123456",,,,[7]],,,[,,,,,,,,,[-1]]],VG:[,[,,"(?:284|[58]\\d\\d|900)\\d{7}",,,,,,,[10],[7]],[,,"284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}",,,,"2842291234",,,,[7]],[,,"284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}",,,,"2843001234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"VG",1,"011","1",,,"([2-578]\\d{6})$|1","284$1",,,,,[,,,,,,,,,[-1]],,"284",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VI:[,[,,"[58]\\d{9}|(?:34|90)0\\d{7}",,,,,,,[10],[7]],[,,"340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,"3406421234",,,,[7]],[,,"340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,"3406421234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"VI",1,"011","1",,,"([2-9]\\d{6})$|1","340$1",,1,,,[,,,,,,,,,[-1]],,"340",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VN:[,[,,"[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",,,,,,,[7,8,9,10]],[,,"2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}",,,,"2101234567",,,[10]],[,,"(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",,,,"912345678",,,[9]],[,,"1800\\d{4,6}|12(?:0[13]|28)\\d{4}",,,,"1800123456",,,[8,9,10]],[,,"1900\\d{4,6}",,,,"1900123456",,,[8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"672\\d{6}",,,,"672012345",,,[9]],"VN",84,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[17]99"],"0$1",,1],[,"(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",,1],[,"(\\d{3})(\\d{4,5})","$1 $2",["69"],"0$1",,1],[,"(\\d{4})(\\d{4,6})","$1 $2",["1"],,,1],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",,1],[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",,1]],[[,"(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",,1],[,"(\\d{4})(\\d{4,6})","$1 $2",["1"],,,1],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",,1],[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",,1]],[,,,,,,,,,[-1]],,,[,,"[17]99\\d{4}|69\\d{5,6}",,,,,,,[7,8]],[,,"(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",,,,"1992000",,,[7,8]],,,[,,,,,,,,,[-1]]],VU:[,[,,"[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",,,,,,,[5,7]],[,,"(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",,,,"22123",,,[5]],[,,"(?:[58]\\d|7[013-7])\\d{5}",,,,"5912345",,,[7]],[,,"81[18]\\d\\d",,,,"81123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:0[1-9]|1[01])\\d{4}",,,,"9010123",,,[7]],"VU",678,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:3[03]|900\\d)\\d{3}",,,,"30123"],,,[,,,,,,,,,[-1]]],WF:[,[,,"(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",,,,,,,[6,9]],[,,"72\\d{4}",,,,"721234",,,[6]],[,,"(?:72|8[23])\\d{4}",,,,"821234",,,[6]],[,,"80[0-5]\\d{6}",,,,"800012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9[23]\\d{4}",,,,"921234",,,[6]],"WF",681,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"[48]0\\d{4}",,,,"401234",,,[6]]],WS:[,[,,"(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",,,,,,,[5,6,7,10]],[,,"6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}",,,,"22123",,,[5,6]],[,,"(?:7[1-35-7]|8(?:[3-7]|9\\d{3}))\\d{5}",,,,"7212345",,,[7,10]],[,,"800\\d{3}",,,,"800123",,,[6]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"WS",685,"0",,,,,,,,[[,"(\\d{5})","$1",["[2-5]|6[1-9]"]],[,"(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],[,"(\\d{2})(\\d{5})","$1 $2",["7"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],XK:[,[,,"2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",,,,,,,[8,9,10,11,12]],[,,"38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})",,,,"28012345"],[,,"4[3-9]\\d{6}",,,,"43201234",,,[8]],[,,"800\\d{5}",,,,"80001234",,,[8]],[,,"900\\d{5}",,,,"90001234",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"XK",383,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],[,"(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],YE:[,[,,"(?:1|7\\d)\\d{7}|[1-7]\\d{6}",,,,,,,[7,8,9],[6]],[,,"78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",,,,"1234567",,,[7,8],[6]],[,,"7[01378]\\d{7}",,,,"712345678",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"YE",967,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],YT:[,[,,"(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",,,,,,,[9]],[,,"269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}",,,,"269601234"],[,,"639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}",,,,"639012345"],[,,"80\\d{7}",,,,"801234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"9(?:(?:39|47)8[01]|769\\d)\\d{4}",,,,"939801234"],"YT",262,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ZA:[,[,,"[1-79]\\d{8}|8\\d{4,9}",,,,,,,[5,6,7,8,9,10]],[,,"(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",,,,"101234567",,,[9]],[,,"(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}",,,,"711234567",,,[5,6,7,8,9]],[,,"80\\d{7}",,,,"801234567",,,[9]],[,,"(?:86[2-9]|9[0-2]\\d)\\d{6}",,,,"862345678",,,[9]],[,,"860\\d{6}",,,,"860123456",,,[9]],[,,,,,,,,,[-1]],[,,"87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",,,,"871234567",,,[9]],"ZA",27,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"861\\d{6,7}",,,,"861123456",,,[9,10]],,,[,,,,,,,,,[-1]]],ZM:[,[,,"800\\d{6}|(?:21|63|[79]\\d)\\d{7}",,,,,,,[9],[6]],[,,"21[1-8]\\d{6}",,,,"211234567",,,,[6]],[,,"(?:7[5-79]|9[5-8])\\d{7}",,,,"955123456"],[,,"800\\d{6}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"63\\d{7}",,,,"630123456"],"ZM",260,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[1-9]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ZW:[,[,,"2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",,,,,,,[5,6,7,8,9,10],[3,4]],[,,"(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}",,,,"1312345",,,,[3,4]],[,,"7(?:[1278]\\d|3[1-9])\\d{6}",,,,"712345678",,,[9]],[,,"80(?:[01]\\d|20|8[0-8])\\d{3}",,,,"8001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",,,,"8686123456",,,[10]],"ZW",263,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],[,"(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],[,"(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],[,"(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],[,"(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],800:[,[,,"(?:00|[1-9]\\d)\\d{6}",,,,,,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:00|[1-9]\\d)\\d{6}",,,,"12345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",800,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2",["\\d"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],808:[,[,,"[1-9]\\d{7}",,,,,,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"[1-9]\\d{7}",,,,"12345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",808,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],870:[,[,,"7\\d{11}|[35-7]\\d{8}",,,,,,,[9,12]],[,,,,,,,,,[-1]],[,,"(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}",,,,"301234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",870,,,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],878:[,[,,"10\\d{10}",,,,,,,[12]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"10\\d{10}",,,,"101234567890"],"001",878,,,,,,,,1,[[,"(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],881:[,[,,"6\\d{9}|[0-36-9]\\d{8}",,,,,,,[9,10]],[,,,,,,,,,[-1]],[,,"6\\d{9}|[0-36-9]\\d{8}",,,,"612345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",881,,,,,,,,,[[,"(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],[,"(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],882:[,[,,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",,,,,,,[7,8,9,10,11,12]],[,,,,,,,,,[-1]],[,,"342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",,,,"3421234",,,[7,8,9,10,12]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}",,,,"390123456789"],"001",882,,,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["16|342"]],[,"(\\d{2})(\\d{6})","$1 $2",["49"]],[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],[,"(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],[,"(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"348[57]\\d{7}",,,,"34851234567",,,[11]]],883:[,[,,"(?:[1-4]\\d|51)\\d{6,10}",,,,,,,[8,9,10,11,12]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}",,,,"510012345"],"001",883,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],[,"(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],888:[,[,,"\\d{11}",,,,,,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",888,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"\\d{11}",,,,"12345678901"],,,[,,,,,,,,,[-1]]],979:[,[,,"[1359]\\d{8}",,,,,,,[9],[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"[1359]\\d{8}",,,,"123456789",,,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",979,,,,,,,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]]};function J(){this.g={}}J.h=void 0;J.g=function(){return J.h?J.h:J.h=new J};var Fa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},Ga={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","+":"+","*":"*","#":"#"},Ha={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",A:"2",B:"2",C:"2",D:"3",E:"3",F:"3",G:"4",H:"4",I:"4",J:"5",K:"5",L:"5",M:"6",N:"6",O:"6",P:"7",Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},Ia=RegExp("[++]+"),K=RegExp("^[++]+"),Ja=RegExp("([0-90-9٠-٩۰-۹])"),Ka=RegExp("[++0-90-9٠-٩۰-۹]"),La=/[\\\/] *x/,Ma=RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"),Na=/(?:.*?[A-Za-z]){3}.*/,Oa=RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"),Pa=RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");function L(a){return"([0-90-9٠-٩۰-۹]{1,"+a+"})"}function Qa(){return";ext="+L("20")+"|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+(L("20")+"#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*")+(L("9")+"#?|[- ]+")+(L("6")+"#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*")+(L("15")+"#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*")+(L("9")+"#?")}var Ra=new RegExp("(?:"+Qa()+")$","i"),Sa=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:"+Qa()+")?$","i"),Ta=/(\$\d)/,Ua=/^\(?\$1\)?$/;function Va(a){return 2>a.length?false:M(Sa,a)}function Wa(a){return M(Na,a)?N(a,Ha):N(a,Fa)}function Xa(a){var b=Wa(a.toString());D(a);a.g(b)}function Ya(a){return null!=a&&(1!=x(a,9)||-1!=u(a,9)[0])}function N(a,b){for(var c=new C,d,e=a.length,f=0;f<e;++f)d=a.charAt(f),d=b[d.toUpperCase()],null!=d&&c.g(d);return c.toString()}function Za(a){return 0==a.length||Ua.test(a)}function O(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ea}J.prototype.format=function(a,b){if(0==r(a,2)&&q(a,5)){var c=w2(a,5);if(0<c.length)return c}c=w2(a,1);var d=P(a);if(0==b)return $a(c,0,d,"");if(!(c in I))return d;var e=Q(this,c,R(c));a=q(a,3)&&0!=r(a,3).length?3==b?";ext="+r(a,3):q(e,13)?r(e,13)+w2(a,3):" ext. "+w2(a,3):"";a:{e=0==u(e,20).length||2==b?u(e,19):u(e,20);for(var f,g=e.length,h=0;h<g;++h){f=e[h];var l=x(f,3);if(0==l||0==d.search(r(f,3,l-1))){if(l=new RegExp(r(f,1)),M(l,d)){e=f;break a}}}e=null}null!=e&&(g=e,e=w2(g,2),f=new RegExp(r(g,1)),w2(g,5),g=w2(g,4),d=2==b&&null!=g&&0<g.length?d.replace(f,e.replace(Ta,g)):d.replace(f,e),3==b&&(d=d.replace(RegExp("^[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~]+"),""),d=d.replace(RegExp("[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~]+","g"),"-")));return $a(c,b,d,a)};function Q(a,b,c){return"001"==c?S(a,""+b):S(a,c)}function P(a){if(!q(a,2))return"";var b=""+r(a,2);return q(a,4)&&r(a,4)&&0<w2(a,8)?Array(w2(a,8)+1).join("0")+b:b}function $a(a,b,c,d){switch(b){case 0:return"+"+a+c+d;case 1:return"+"+a+" "+c+d;case 3:return"tel:+"+a+"-"+c+d;default:return c+d}}function T(a,b){switch(b){case 4:return r(a,5);case 3:return r(a,4);case 1:return r(a,3);case 0:case 2:return r(a,2);case 5:return r(a,6);case 6:return r(a,8);case 7:return r(a,7);case 8:return r(a,21);case 9:return r(a,25);case 10:return r(a,28);default:return r(a,1)}}function ab(a,b){return U(a,r(b,1))?U(a,r(b,5))?4:U(a,r(b,4))?3:U(a,r(b,6))?5:U(a,r(b,8))?6:U(a,r(b,7))?7:U(a,r(b,21))?8:U(a,r(b,25))?9:U(a,r(b,28))?10:U(a,r(b,2))?r(b,18)||U(a,r(b,3))?2:0:!r(b,18)&&U(a,r(b,3))?1:-1:-1}function S(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.g[b];if(null==c){c=Ea[b];if(null==c)return null;c=(new B).g(G.m(),c);a.g[b]=c}return c}function U(a,b){var c=a.length;return 0<x(b,9)&&-1==u(b,9).indexOf(c)?false:M(w2(b,2),a)}function bb(a,b){if(null==b)return null;var c=w2(b,1);c=I[c];if(null==c)a=null;else if(1==c.length)a=c[0];else a:{b=P(b);for(var d,e=c.length,f=0;f<e;f++){d=c[f];var g=S(a,d);if(q(g,23)){if(0==b.search(r(g,23))){a=d;break a}}else if(-1!=ab(b,g)){a=d;break a}}a=null}return a}function R(a){a=I[a];return null==a?"ZZ":a[0]}function cb(a,b){a=S(a,b);if(null==a)throw Error("Invalid region code: "+b);return w2(a,10)}function V(a,b,c,d){var e=T(c,d),f=0==x(e,9)?u(r(c,1),9):u(e,9);e=u(e,10);if(2==d)if(Ya(T(c,0)))a=T(c,1),Ya(a)&&(f=f.concat(0==x(a,9)?u(r(c,1),9):u(a,9)),f.sort(),0==e.length?e=u(a,10):(e=e.concat(u(a,10)),e.sort()));else return V(a,b,c,1);if(-1==f[0])return 5;b=b.length;if(-1<e.indexOf(b))return 4;c=f[0];return c==b?0:c>b?2:f[f.length-1]<b?3:-1<f.indexOf(b,1)?0:5}function W(a,b,c){var d=P(b);b=w2(b,1);if(!(b in I))return 1;b=Q(a,b,R(b));return V(a,d,b,c)}function db(a,b){a=a.toString();if(0==a.length||"0"==a.charAt(0))return 0;for(var c,d=a.length,e=1;3>=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in I)return b.g(a.substring(e)),c;return 0}function eb(a,b,c,d,e,f){if(0==b.length)return 0;b=new C(b);var g;null!=c&&(g=r(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(K.test(h))h=h.replace(K,""),D(b),b.g(Wa(h)),g=1;else{h=new RegExp(g);Xa(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var l=g.substring(h).match(Ja);l&&null!=l[1]&&0<l[1].length&&"0"==N(l[1],Fa)?g=false:(D(b),b.g(g.substring(h)),g=true)}else g=false;g=g?5:20}e&&t(f,6,g);if(20!=g){if(2>=b.h.length)throw Error("Phone number too short after IDD");a=db(b,d);if(0!=a)return t(f,1,a),a;throw Error("Invalid country calling code")}if(null!=c&&(g=w2(c,10),h=""+g,l=b.toString(),0==l.lastIndexOf(h,0)&&(h=new C(l.substring(h.length)),l=r(c,1),l=new RegExp(w2(l,2)),fb(h,c,null),h=h.toString(),!M(l,b.toString())&&M(l,h)||3==V(a,b.toString(),c,-1))))return d.g(h),e&&t(f,6,10),t(f,1,g),g;t(f,1,0);return 0}function fb(a,b,c){var d=a.toString(),e=d.length,f=r(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(w2(r(b,1),2));var h=M(f,d),l=e.length-1;b=r(b,16);if(null==b||0==b.length||null==e[l]||0==e[l].length){if(!h||M(f,d.substring(e[0].length)))null!=c&&0<l&&null!=e[l]&&c.g(e[1]),a.set(d.substring(e[0].length))}else if(d=d.replace(g,b),!h||M(f,d))null!=c&&0<l&&c.g(e[1]),a.set(d)}}}function X(a,b,c){if(!O(c)&&0<b.length&&"+"!=b.charAt(0))throw Error("Invalid country calling code");return gb(a,b,c,true)}function gb(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var e=new C;var f=b.indexOf(";phone-context=");if(-1===f)f=null;else if(f+=15,f>=b.length)f="";else{var g=b.indexOf(";",f);f=-1!==g?b.substring(f,g):b.substring(f)}var h=f;null==h?g=true:0===h.length?g=false:(g=Oa.exec(h),h=Pa.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number");null!=f?("+"===f.charAt(0)&&e.g(f),f=b.indexOf("tel:"),e.g(b.substring(0<=f?f+4:0,b.indexOf(";phone-context=")))):(f=e.g,g=b??"",h=g.search(Ka),0<=h?(g=g.substring(h),g=g.replace(Ma,""),h=g.search(La),0<=h&&(g=g.substring(0,h))):g="",f.call(e,g));f=e.toString();g=f.indexOf(";isub=");0<g&&(D(e),e.g(f.substring(0,g)));if(!Va(e.toString()))throw Error("The string supplied did not seem to be a phone number");f=e.toString();if(!(O(c)||null!=f&&0<f.length&&K.test(f)))throw Error("Invalid country calling code");f=new H;d&&t(f,5,b);a:{b=e.toString();g=b.search(Ra);if(0<=g&&Va(b.substring(0,g))){h=b.match(Ra);for(var l=h.length,A=1;A<l;++A)if(null!=h[A]&&0<h[A].length){D(e);e.g(b.substring(0,g));b=h[A];break a}}b=""}0<b.length&&t(f,3,b);g=S(a,c);b=new C;h=0;l=e.toString();try{h=eb(a,l,g,b,d,f)}catch(da){if("Invalid country calling code"==da.message&&K.test(l)){if(l=l.replace(K,""),h=eb(a,l,g,b,d,f),0==h)throw da}else throw da}0!=h?(e=R(h),e!=c&&(g=Q(a,h,e))):(Xa(e),b.g(e.toString()),null!=c?(h=w2(g,10),t(f,1,h)):d&&(delete f.h[6],f.g&&delete f.g[6]));if(2>b.h.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new C,e=new C(b.toString()),fb(e,g,c),a=V(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&t(f,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");if(1<d.length&&"0"==d.charAt(0)){t(f,4,true);for(a=1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&t(f,8,a)}t(f,2,parseInt(d,10));return f}function M(a,b){return(a="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a))&&a[0].length==b.length?true:false}function hb(a){this.fa=RegExp(" ");this.ja="";this.v=new C;this.da="";this.s=new C;this.ba=new C;this.u=true;this.ea=this.ca=this.la=false;this.ga=J.g();this.$=0;this.h=new C;this.ha=false;this.o="";this.g=new C;this.j=[];this.ka=a;this.l=ib(this,this.ka)}var jb=new G;t(jb,11,"NA");var kb=RegExp("^[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/   ()()[].\\[\\]/~⁓∼~]*)*$"),lb=/[- ]/;function ib(a,b){var c=a.ga;b=O(b)?cb(c,b):0;a=S(a.ga,R(b));return null!=a?a:jb}function mb(a){for(var b=a.j.length,c=0;c<b;++c){var d=a.j[c],e=w2(d,1);if(a.da==e)return false;var f=a;var g=d,h=w2(g,1);D(f.v);var l=f;g=w2(g,2);var A="999999999999999".match(h)[0];A.length<l.g.h.length?l="":(l=A.replace(new RegExp(h,"g"),g),l=l.replace(RegExp("9","g")," "));0<l.length?(f.v.g(l),f=true):f=false;if(f)return a.da=e,a.ha=lb.test(r(d,4)),a.$=0,true}return a.u=false}function nb(a,b){for(var c=[],d=b.length-3,e=a.j.length,f=0;f<e;++f){var g=a.j[f];0==x(g,3)?c.push(a.j[f]):(g=r(g,3,Math.min(d,x(g,3)-1)),0==b.search(g)&&c.push(a.j[f]))}a.j=c}function ob(a,b){a.s.g(b);var c=b;Ja.test(c)||1==a.s.h.length&&Ia.test(c)?("+"==b?(c=b,a.ba.g(b)):(c=Fa[b],a.ba.g(c),a.g.g(c)),b=c):(a.u=false,a.la=true);if(!a.u){if(!a.la){if(pb(a)){if(qb(a))return rb(a)}else if(0<a.o.length&&(b=a.g.toString(),D(a.g),a.g.g(a.o),a.g.g(b),b=a.h.toString(),c=b.lastIndexOf(a.o),D(a.h),a.h.g(b.substring(0,c))),a.o!=sb(a))return a.h.g(" "),rb(a)}return a.s.toString()}switch(a.ba.h.length){case 0:case 1:case 2:return a.s.toString();case 3:if(pb(a))a.ea=true;else return a.o=sb(a),tb(a);default:if(a.ea)return qb(a)&&(a.ea=false),a.h.toString()+a.g.toString();if(0<a.j.length){b=ub(a,b);c=vb(a);if(0<c.length)return c;nb(a,a.g.toString());return mb(a)?wb(a):a.u?Y(a,b):a.s.toString()}return tb(a)}}function rb(a){a.u=true;a.ea=false;a.j=[];a.$=0;D(a.v);a.da="";return tb(a)}function vb(a){for(var b=a.g.toString(),c=a.j.length,d=0;d<c;++d){var e=a.j[d],f=w2(e,1);if(new RegExp("^(?:"+f+")$").test(b)&&(a.ha=lb.test(r(e,4)),e=b.replace(new RegExp(f,"g"),r(e,2)),e=Y(a,e),N(e,Ga)==a.ba))return e}return""}function Y(a,b){var c=a.h.h.length;return a.ha&&0<c&&" "!=a.h.toString().charAt(c-1)?a.h+" "+b:a.h+b}function tb(a){var b=a.g.toString();if(3<=b.length){for(var c=a.ca&&0==a.o.length&&0<x(a.l,20)?u(a.l,20):u(a.l,19),d=c.length,e=0;e<d;++e){var f=c[e];0<a.o.length&&Za(w2(f,4))&&!r(f,6)&&!q(f,5)||(0!=a.o.length||a.ca||Za(w2(f,4))||r(f,6))&&kb.test(w2(f,2))&&a.j.push(f)}nb(a,b);b=vb(a);return 0<b.length?b:mb(a)?wb(a):a.s.toString()}return Y(a,b)}function wb(a){var b=a.g.toString(),c=b.length;if(0<c){for(var d="",e=0;e<c;e++)d=ub(a,b.charAt(e));return a.u?Y(a,d):a.s.toString()}return a.h.toString()}function sb(a){var b=a.g.toString(),c=0;if(1!=r(a.l,10))var d=false;else d=a.g.toString(),d="1"==d.charAt(0)&&"0"!=d.charAt(1)&&"1"!=d.charAt(1);d?(c=1,a.h.g("1").g(" "),a.ca=true):q(a.l,15)&&(d=new RegExp("^(?:"+r(a.l,15)+")"),d=b.match(d),null!=d&&null!=d[0]&&0<d[0].length&&(a.ca=true,c=d[0].length,a.h.g(b.substring(0,c))));D(a.g);a.g.g(b.substring(c));return b.substring(0,c)}function pb(a){var b=a.ba.toString(),c=new RegExp("^(?:\\+|"+r(a.l,11)+")");c=b.match(c);return null!=c&&null!=c[0]&&0<c[0].length?(a.ca=true,c=c[0].length,D(a.g),a.g.g(b.substring(c)),D(a.h),a.h.g(b.substring(0,c)),"+"!=b.charAt(0)&&a.h.g(" "),true):false}function qb(a){if(0==a.g.h.length)return false;var b=new C,c=db(a.g,b);if(0==c)return false;D(a.g);a.g.g(b.toString());b=R(c);"001"==b?a.l=S(a.ga,""+c):b!=a.ka&&(a.l=ib(a,b));a.h.g(""+c).g(" ");a.o="";return true}function ub(a,b){var c=a.v.toString();if(0<=c.substring(a.$).search(a.fa)){var d=c.search(a.fa);b=c.replace(a.fa,b);D(a.v);a.v.g(b);a.$=d;return b.substring(0,a.$+1)}1==a.j.length&&(a.u=false);a.da="";return a.s.toString()}const Z={FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1};m("intlTelInputUtilsTemp",{});m("intlTelInputUtilsTemp.formatNumberAsYouType",((a,b)=>{try{const c=a.replace(/[^+0-9]/g,""),d=new hb(b);b="";for(let e=0;e<c.length;e++)d.ja=ob(d,c.charAt(e)),b=d.ja;return b}catch{return a}}));m("intlTelInputUtilsTemp.formatNumber",((a,b,c)=>{try{const e=J.g(),f=X(e,a,b);var d=W(e,f,-1);return 0==d||4==d?e.format(f,"undefined"===typeof c?0:c):a}catch{return a}}));m("intlTelInputUtilsTemp.getExampleNumber",((a,b,c,d)=>{try{const l=J.g();a:{var e=l;if(O(a)){var f=T(S(e,a),c);try{if(q(f,6)){var g=r(f,6);var h=gb(e,g,a,false);break a}}catch(A){}}h=null}return l.format(h,d?0:b?2:1)}catch{return""}}));m("intlTelInputUtilsTemp.getExtension",((a,b)=>{try{return r(X(J.g(),a,b),3)}catch{return""}}));m("intlTelInputUtilsTemp.getNumberType",((a,b)=>{try{const g=J.g(),h=X(g,a,b);var c=bb(g,h),d=Q(g,w2(h,1),c);if(null==d)var e=-1;else{var f=P(h);e=ab(f,d)}return e}catch{return-99}}));m("intlTelInputUtilsTemp.getValidationError",((a,b)=>{if(!b)return 1;try{const c=J.g(),d=X(c,a,b);return W(c,d,-1)}catch(c){return"Invalid country calling code"===c.message?1:3>=a.length||"Phone number too short after IDD"===c.message||"The string supplied is too short to be a phone number"===c.message?2:"The string supplied is too long to be a phone number"===c.message?3:-99}}));m("intlTelInputUtilsTemp.isValidNumber",((a,b)=>{try{const l=J.g();var c=X(l,a,b),d=bb(l,c);a=l;var e=w2(c,1),f=Q(a,e,d);if(null==f||"001"!=d&&e!=cb(a,d))var g=false;else{var h=P(c);g=-1!=ab(h,f)}return g}catch{return false}}));m("intlTelInputUtilsTemp.isPossibleNumber",((a,b,c)=>{try{const d=J.g(),e=X(d,a,b);if(c){const f=0===W(d,e,Z[c]);if("FIXED_LINE_OR_MOBILE"===c){const g=0===W(d,e,Z.MOBILE),h=0===W(d,e,Z.FIXED_LINE);return g||h||f}return f}return 0===W(d,e,-1)}catch{return false}}));m("intlTelInputUtilsTemp.getCoreNumber",((a,b)=>{try{return r(X(J.g(),a,b),2).toString()}catch{return""}}));m("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});m("intlTelInputUtilsTemp.numberType",Z);m("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})})();var utils=window.intlTelInputUtilsTemp;delete window.intlTelInputUtilsTemp;var utils_default=utils;intl_tel_input_default.utils=utils_default;var intlTelInputWithUtils_default=intl_tel_input_default;return __toCommonJS(intlTelInputWithUtils_exports)})();return factoryOutput.default}))})(intlTelInputWithUtils);return intlTelInputWithUtils.exports}var intlTelInputWithUtilsExports=requireIntlTelInputWithUtils();const intlTelInput=getDefaultExportFromCjs$1(intlTelInputWithUtilsExports);const formatToGlobalCountryName=countryName=>countryName.split("(")[0].trim();const formatAllCountries=()=>{const countryData=intlTelInput.getCountryData();for(let i=0;i<countryData.length;i++){const country=countryData[i];country.name=formatToGlobalCountryName(country.name)}};formatAllCountries();const containOnlyNumbers=value=>/^[()+\-\ .\d]*$/g.test(value);const PhoneNumberInput=(props,ref)=>{const{aria:aria={},className:className,dark:dark=false,data:data={},disabled:disabled=false,hiddenInputs:hiddenInputs=false,htmlOptions:htmlOptions={},id:id="",initialCountry:initialCountry="",isValid:isValid=()=>{},label:label="",name:name="",onChange:onChange2=()=>{},onValidate:onValidate=()=>null,onlyCountries:onlyCountries=[],excludeCountries:excludeCountries=[],required:required=false,preferredCountries:preferredCountries=[],value:value="",formatAsYouType:formatAsYouType=false,strictMode:strictMode=false,countrySearch:countrySearch=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_phone_number_input"),globalProps(props),className);const inputRef=useRef(null);const itiRef=useRef(null);const[inputValue,setInputValue]=useState(value);const[error,setError]=useState(props.error||"");const[dropDownIsOpen,setDropDownIsOpen]=useState(false);const[selectedData,setSelectedData]=useState();const[hasTyped,setHasTyped]=useState(false);useEffect((()=>{if((error??"").length>0){onValidate(false)}else{onValidate(true)}}),[error,onValidate]);const unformatNumber=formattedNumber=>formattedNumber.replace(/\D/g,"");const showFormattedError=(reason="")=>{const countryName=itiRef.current.getSelectedCountryData().name;const reasonText=reason.length>0?` (${reason})`:"";setError(`Invalid ${countryName} phone number${reasonText}`);return true};const validateTooLongNumber=itiInit=>{if(!itiInit)return;if(itiInit.getValidationError()===3){return showFormattedError("too long")}else{setError("")}};const validateTooShortNumber=itiInit=>{if(!itiInit)return;if(!inputValue||inputValue.trim()===""){setError("");return false}if(itiInit.getValidationError()===2){return showFormattedError("too short")}else{if(inputValue.length===1){return showFormattedError("too short")}else{setError("")}}};const validateOnlyNumbers=itiInit=>{if(!itiInit)return;if(inputValue&&!containOnlyNumbers(inputValue)){return showFormattedError("enter numbers only")}};const validateUnhandledError=itiInit=>{if(!itiInit)return;if(itiInit.getValidationError()===-99){if(inputValue.length===1){return showFormattedError("too short")}else if(inputValue.length===0){setError("Missing phone number");return true}else{return showFormattedError()}}};const validateMissingAreaCode=itiInit=>{if(!itiInit)return;if(itiInit.getValidationError()===4){showFormattedError("missing area code");return true}};const validateRepeatCountryCode=itiInit=>{if(!itiInit)return;const countryDialCode=itiRef.current.getSelectedCountryData().dialCode;if(unformatNumber(inputValue).startsWith(countryDialCode)){return showFormattedError("repeat country code")}};const validateRequiredField=()=>{if(!inputValue||inputValue.trim()===""){setError("Missing phone number");return true}return false};const validateErrors=()=>{if(!inputValue||inputValue.trim()===""){if(validateRequiredField())return;return}if(!hasTyped&&!error)return;if(itiRef.current)isValid(itiRef.current.isValidNumber());if(validateOnlyNumbers(itiRef.current))return;if(validateTooLongNumber(itiRef.current))return;if(validateTooShortNumber(itiRef.current))return;if(validateUnhandledError(itiRef.current))return;if(validateMissingAreaCode(itiRef.current))return;if(validateRepeatCountryCode(itiRef.current))return};useImperativeHandle(ref,(()=>({clearField(){setInputValue("");setError("");setHasTyped(false)},inputNode(){return inputRef.current},validate(){const isEmpty2=!inputValue||inputValue.trim()==="";if(isEmpty2){const errorMessage="Missing phone number";setError(errorMessage);setHasTyped(true);return required?errorMessage:true}if(!itiRef.current){return true}const countryDialCode=itiRef.current.getSelectedCountryData().dialCode;if(unformatNumber(inputValue).startsWith(countryDialCode)){const countryName=itiRef.current.getSelectedCountryData().name;const errorMessage=`Invalid ${countryName} phone number (repeat country code)`;setError(errorMessage);setHasTyped(true);return errorMessage}if(!containOnlyNumbers(inputValue)){const countryName=itiRef.current.getSelectedCountryData().name;const errorMessage=`Invalid ${countryName} phone number (enter numbers only)`;setError(errorMessage);setHasTyped(true);return errorMessage}if(!itiRef.current.isValidNumber()){const countryName=itiRef.current.getSelectedCountryData().name;const validationError=itiRef.current.getValidationError();let errorMessage="";if(validationError===2){errorMessage=`Invalid ${countryName} phone number (too short)`}else if(validationError===3){errorMessage=`Invalid ${countryName} phone number (too long)`}else if(validationError===4){errorMessage=`Invalid ${countryName} phone number (missing area code)`}else{errorMessage=`Invalid ${countryName} phone number`}setError(errorMessage);setHasTyped(true);return errorMessage}setError("");return true}})));const getCurrentSelectedData=(itiInit,inputValue2)=>({...itiInit.getSelectedCountryData(),number:inputValue2});const handleOnChange=evt=>{if(!hasTyped)setHasTyped(true);setInputValue(evt.target.value);let phoneNumberData;if(formatAsYouType){const formattedPhoneNumberData=getCurrentSelectedData(itiRef.current,evt.target.value);phoneNumberData={...formattedPhoneNumberData,number:unformatNumber(formattedPhoneNumberData.number)}}else{phoneNumberData=getCurrentSelectedData(itiRef.current,evt.target.value)}setSelectedData(phoneNumberData);onChange2(phoneNumberData);isValid(itiRef.current.isValidNumber())};useEffect(formatAllCountries,[]);const fallbackCountry=preferredCountries.length>0?preferredCountries[0]:onlyCountries.length>0?onlyCountries.sort()[0]:excludeCountries.length>0?excludeCountries.sort()[0]:"af";useEffect((()=>{const telInputInit=intlTelInput(inputRef.current,{separateDialCode:true,countryOrder:preferredCountries,allowDropdown:!disabled,autoInsertDialCode:false,initialCountry:initialCountry||fallbackCountry,onlyCountries:onlyCountries,excludeCountries:excludeCountries,countrySearch:countrySearch,fixDropdownWidth:false,formatAsYouType:formatAsYouType,strictMode:strictMode,hiddenInput:hiddenInputs?()=>({phone:`${name}_full`,country:`${name}_country_code`}):null});itiRef.current=telInputInit;if(inputRef.current){inputRef.current.addEventListener("countrychange",(evt=>{const phoneNumberData=getCurrentSelectedData(telInputInit,evt.target.value);setSelectedData(phoneNumberData);onChange2(phoneNumberData);validateErrors()}));inputRef.current.addEventListener("open:countrydropdown",(()=>setDropDownIsOpen(true)));inputRef.current.addEventListener("close:countrydropdown",(()=>setDropDownIsOpen(false)));if(formatAsYouType){inputRef.current.addEventListener("input",(evt=>{const target=evt.target;const formattedValue=target.value;setInputValue(formattedValue);setHasTyped(true);const formattedPhoneNumberData=getCurrentSelectedData(telInputInit,formattedValue);const phoneNumberData={...formattedPhoneNumberData,number:unformatNumber(formattedPhoneNumberData.number)};setSelectedData(phoneNumberData);onChange2(phoneNumberData);isValid(telInputInit.isValidNumber())}))}}}),[]);let textInputProps={className:dropDownIsOpen?"dropdown_open":"",dark:dark,"data-phone-number":JSON.stringify(selectedData),disabled:disabled,error:hasTyped?error:props.error,type:"tel",id:id,label:label,name:name,onBlur:validateErrors,onChange:formatAsYouType?void 0:handleOnChange,value:inputValue};let wrapperProps={className:classes};if(!isEmpty$1(aria))textInputProps={...textInputProps,...ariaProps};if(!isEmpty$1(data))wrapperProps={...wrapperProps,...dataProps};if(required)textInputProps.required=true;return jsx$1("div",{...wrapperProps,...htmlProps,children:jsx$1(TextInput$1,{ref:inputNode=>{if(ref){if(typeof ref==="function"){ref(inputNode)}else{ref.current=inputNode}}inputRef.current=inputNode},...textInputProps})})};const PhoneNumberInput$1=forwardRef(PhoneNumberInput);function OrderedMap(content){this.content=content}OrderedMap.prototype={constructor:OrderedMap,find:function(key){for(var i=0;i<this.content.length;i+=2)if(this.content[i]===key)return i;return-1},get:function(key){var found2=this.find(key);return found2==-1?void 0:this.content[found2+1]},update:function(key,value,newKey){var self2=newKey&&newKey!=key?this.remove(newKey):this;var found2=self2.find(key),content=self2.content.slice();if(found2==-1){content.push(newKey||key,value)}else{content[found2+1]=value;if(newKey)content[found2]=newKey}return new OrderedMap(content)},remove:function(key){var found2=this.find(key);if(found2==-1)return this;var content=this.content.slice();content.splice(found2,2);return new OrderedMap(content)},addToStart:function(key,value){return new OrderedMap([key,value].concat(this.remove(key).content))},addToEnd:function(key,value){var content=this.remove(key).content.slice();content.push(key,value);return new OrderedMap(content)},addBefore:function(place,key,value){var without=this.remove(key),content=without.content.slice();var found2=without.find(place);content.splice(found2==-1?content.length:found2,0,key,value);return new OrderedMap(content)},forEach:function(f){for(var i=0;i<this.content.length;i+=2)f(this.content[i],this.content[i+1])},prepend:function(map2){map2=OrderedMap.from(map2);if(!map2.size)return this;return new OrderedMap(map2.content.concat(this.subtract(map2).content))},append:function(map2){map2=OrderedMap.from(map2);if(!map2.size)return this;return new OrderedMap(this.subtract(map2).content.concat(map2.content))},subtract:function(map2){var result=this;map2=OrderedMap.from(map2);for(var i=0;i<map2.content.length;i+=2)result=result.remove(map2.content[i]);return result},toObject:function(){var result={};this.forEach((function(key,value){result[key]=value}));return result},get size(){return this.content.length>>1}};OrderedMap.from=function(value){if(value instanceof OrderedMap)return value;var content=[];if(value)for(var prop in value)content.push(prop,value[prop]);return new OrderedMap(content)};function findDiffStart(a,b,pos){for(let i=0;;i++){if(i==a.childCount||i==b.childCount)return a.childCount==b.childCount?null:pos;let childA=a.child(i),childB=b.child(i);if(childA==childB){pos+=childA.nodeSize;continue}if(!childA.sameMarkup(childB))return pos;if(childA.isText&&childA.text!=childB.text){for(let j=0;childA.text[j]==childB.text[j];j++)pos++;return pos}if(childA.content.size||childB.content.size){let inner=findDiffStart(childA.content,childB.content,pos+1);if(inner!=null)return inner}pos+=childA.nodeSize}}function findDiffEnd(a,b,posA,posB){for(let iA=a.childCount,iB=b.childCount;;){if(iA==0||iB==0)return iA==iB?null:{a:posA,b:posB};let childA=a.child(--iA),childB=b.child(--iB),size=childA.nodeSize;if(childA==childB){posA-=size;posB-=size;continue}if(!childA.sameMarkup(childB))return{a:posA,b:posB};if(childA.isText&&childA.text!=childB.text){let same=0,minSize=Math.min(childA.text.length,childB.text.length);while(same<minSize&&childA.text[childA.text.length-same-1]==childB.text[childB.text.length-same-1]){same++;posA--;posB--}return{a:posA,b:posB}}if(childA.content.size||childB.content.size){let inner=findDiffEnd(childA.content,childB.content,posA-1,posB-1);if(inner)return inner}posA-=size;posB-=size}}class Fragment{constructor(content,size){this.content=content;this.size=size||0;if(size==null)for(let i=0;i<content.length;i++)this.size+=content[i].nodeSize}nodesBetween(from3,to,f,nodeStart=0,parent){for(let i=0,pos=0;pos<to;i++){let child=this.content[i],end=pos+child.nodeSize;if(end>from3&&f(child,nodeStart+pos,parent||null,i)!==false&&child.content.size){let start=pos+1;child.nodesBetween(Math.max(0,from3-start),Math.min(child.content.size,to-start),f,nodeStart+start)}pos=end}}descendants(f){this.nodesBetween(0,this.size,f)}textBetween(from3,to,blockSeparator,leafText){let text="",first2=true;this.nodesBetween(from3,to,((node2,pos)=>{let nodeText=node2.isText?node2.text.slice(Math.max(from3,pos)-pos,to-pos):!node2.isLeaf?"":leafText?typeof leafText==="function"?leafText(node2):leafText:node2.type.spec.leafText?node2.type.spec.leafText(node2):"";if(node2.isBlock&&(node2.isLeaf&&nodeText||node2.isTextblock)&&blockSeparator){if(first2)first2=false;else text+=blockSeparator}text+=nodeText}),0);return text}append(other){if(!other.size)return this;if(!this.size)return other;let last=this.lastChild,first2=other.firstChild,content=this.content.slice(),i=0;if(last.isText&&last.sameMarkup(first2)){content[content.length-1]=last.withText(last.text+first2.text);i=1}for(;i<other.content.length;i++)content.push(other.content[i]);return new Fragment(content,this.size+other.size)}cut(from3,to=this.size){if(from3==0&&to==this.size)return this;let result=[],size=0;if(to>from3)for(let i=0,pos=0;pos<to;i++){let child=this.content[i],end=pos+child.nodeSize;if(end>from3){if(pos<from3||end>to){if(child.isText)child=child.cut(Math.max(0,from3-pos),Math.min(child.text.length,to-pos));else child=child.cut(Math.max(0,from3-pos-1),Math.min(child.content.size,to-pos-1))}result.push(child);size+=child.nodeSize}pos=end}return new Fragment(result,size)}cutByIndex(from3,to){if(from3==to)return Fragment.empty;if(from3==0&&to==this.content.length)return this;return new Fragment(this.content.slice(from3,to))}replaceChild(index2,node2){let current=this.content[index2];if(current==node2)return this;let copy2=this.content.slice();let size=this.size+node2.nodeSize-current.nodeSize;copy2[index2]=node2;return new Fragment(copy2,size)}addToStart(node2){return new Fragment([node2].concat(this.content),this.size+node2.nodeSize)}addToEnd(node2){return new Fragment(this.content.concat(node2),this.size+node2.nodeSize)}eq(other){if(this.content.length!=other.content.length)return false;for(let i=0;i<this.content.length;i++)if(!this.content[i].eq(other.content[i]))return false;return true}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(index2){let found2=this.content[index2];if(!found2)throw new RangeError("Index "+index2+" out of range for "+this);return found2}maybeChild(index2){return this.content[index2]||null}forEach(f){for(let i=0,p=0;i<this.content.length;i++){let child=this.content[i];f(child,p,i);p+=child.nodeSize}}findDiffStart(other,pos=0){return findDiffStart(this,other,pos)}findDiffEnd(other,pos=this.size,otherPos=other.size){return findDiffEnd(this,other,pos,otherPos)}findIndex(pos,round2=-1){if(pos==0)return retIndex(0,pos);if(pos==this.size)return retIndex(this.content.length,pos);if(pos>this.size||pos<0)throw new RangeError(`Position ${pos} outside of fragment (${this})`);for(let i=0,curPos=0;;i++){let cur=this.child(i),end=curPos+cur.nodeSize;if(end>=pos){if(end==pos||round2>0)return retIndex(i+1,end);return retIndex(i,curPos)}curPos=end}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((n=>n.toJSON())):null}static fromJSON(schema,value){if(!value)return Fragment.empty;if(!Array.isArray(value))throw new RangeError("Invalid input for Fragment.fromJSON");return new Fragment(value.map(schema.nodeFromJSON))}static fromArray(array){if(!array.length)return Fragment.empty;let joined,size=0;for(let i=0;i<array.length;i++){let node2=array[i];size+=node2.nodeSize;if(i&&node2.isText&&array[i-1].sameMarkup(node2)){if(!joined)joined=array.slice(0,i);joined[joined.length-1]=node2.withText(joined[joined.length-1].text+node2.text)}else if(joined){joined.push(node2)}}return new Fragment(joined||array,size)}static from(nodes){if(!nodes)return Fragment.empty;if(nodes instanceof Fragment)return nodes;if(Array.isArray(nodes))return this.fromArray(nodes);if(nodes.attrs)return new Fragment([nodes],nodes.nodeSize);throw new RangeError("Can not convert "+nodes+" to a Fragment"+(nodes.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Fragment.empty=new Fragment([],0);const found={index:0,offset:0};function retIndex(index2,offset2){found.index=index2;found.offset=offset2;return found}function compareDeep(a,b){if(a===b)return true;if(!(a&&typeof a=="object")||!(b&&typeof b=="object"))return false;let array=Array.isArray(a);if(Array.isArray(b)!=array)return false;if(array){if(a.length!=b.length)return false;for(let i=0;i<a.length;i++)if(!compareDeep(a[i],b[i]))return false}else{for(let p in a)if(!(p in b)||!compareDeep(a[p],b[p]))return false;for(let p in b)if(!(p in a))return false}return true}let Mark$1=class Mark{constructor(type,attrs){this.type=type;this.attrs=attrs}addToSet(set){let copy2,placed=false;for(let i=0;i<set.length;i++){let other=set[i];if(this.eq(other))return set;if(this.type.excludes(other.type)){if(!copy2)copy2=set.slice(0,i)}else if(other.type.excludes(this.type)){return set}else{if(!placed&&other.type.rank>this.type.rank){if(!copy2)copy2=set.slice(0,i);copy2.push(this);placed=true}if(copy2)copy2.push(other)}}if(!copy2)copy2=set.slice();if(!placed)copy2.push(this);return copy2}removeFromSet(set){for(let i=0;i<set.length;i++)if(this.eq(set[i]))return set.slice(0,i).concat(set.slice(i+1));return set}isInSet(set){for(let i=0;i<set.length;i++)if(this.eq(set[i]))return true;return false}eq(other){return this==other||this.type==other.type&&compareDeep(this.attrs,other.attrs)}toJSON(){let obj={type:this.type.name};for(let _ in this.attrs){obj.attrs=this.attrs;break}return obj}static fromJSON(schema,json){if(!json)throw new RangeError("Invalid input for Mark.fromJSON");let type=schema.marks[json.type];if(!type)throw new RangeError(`There is no mark type ${json.type} in this schema`);let mark=type.create(json.attrs);type.checkAttrs(mark.attrs);return mark}static sameSet(a,b){if(a==b)return true;if(a.length!=b.length)return false;for(let i=0;i<a.length;i++)if(!a[i].eq(b[i]))return false;return true}static setFrom(marks){if(!marks||Array.isArray(marks)&&marks.length==0)return Mark.none;if(marks instanceof Mark)return[marks];let copy2=marks.slice();copy2.sort(((a,b)=>a.type.rank-b.type.rank));return copy2}};Mark$1.none=[];class ReplaceError extends Error{}class Slice{constructor(content,openStart,openEnd){this.content=content;this.openStart=openStart;this.openEnd=openEnd}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(pos,fragment){let content=insertInto(this.content,pos+this.openStart,fragment);return content&&new Slice(content,this.openStart,this.openEnd)}removeBetween(from3,to){return new Slice(removeRange(this.content,from3+this.openStart,to+this.openStart),this.openStart,this.openEnd)}eq(other){return this.content.eq(other.content)&&this.openStart==other.openStart&&this.openEnd==other.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let json={content:this.content.toJSON()};if(this.openStart>0)json.openStart=this.openStart;if(this.openEnd>0)json.openEnd=this.openEnd;return json}static fromJSON(schema,json){if(!json)return Slice.empty;let openStart=json.openStart||0,openEnd=json.openEnd||0;if(typeof openStart!="number"||typeof openEnd!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Slice(Fragment.fromJSON(schema,json.content),openStart,openEnd)}static maxOpen(fragment,openIsolating=true){let openStart=0,openEnd=0;for(let n=fragment.firstChild;n&&!n.isLeaf&&(openIsolating||!n.type.spec.isolating);n=n.firstChild)openStart++;for(let n=fragment.lastChild;n&&!n.isLeaf&&(openIsolating||!n.type.spec.isolating);n=n.lastChild)openEnd++;return new Slice(fragment,openStart,openEnd)}}Slice.empty=new Slice(Fragment.empty,0,0);function removeRange(content,from3,to){let{index:index2,offset:offset2}=content.findIndex(from3),child=content.maybeChild(index2);let{index:indexTo,offset:offsetTo}=content.findIndex(to);if(offset2==from3||child.isText){if(offsetTo!=to&&!content.child(indexTo).isText)throw new RangeError("Removing non-flat range");return content.cut(0,from3).append(content.cut(to))}if(index2!=indexTo)throw new RangeError("Removing non-flat range");return content.replaceChild(index2,child.copy(removeRange(child.content,from3-offset2-1,to-offset2-1)))}function insertInto(content,dist,insert,parent){let{index:index2,offset:offset2}=content.findIndex(dist),child=content.maybeChild(index2);if(offset2==dist||child.isText){return content.cut(0,dist).append(insert).append(content.cut(dist))}let inner=insertInto(child.content,dist-offset2-1,insert);return inner&&content.replaceChild(index2,child.copy(inner))}function replace$1($from,$to,slice3){if(slice3.openStart>$from.depth)throw new ReplaceError("Inserted content deeper than insertion position");if($from.depth-slice3.openStart!=$to.depth-slice3.openEnd)throw new ReplaceError("Inconsistent open depths");return replaceOuter($from,$to,slice3,0)}function replaceOuter($from,$to,slice3,depth){let index2=$from.index(depth),node2=$from.node(depth);if(index2==$to.index(depth)&&depth<$from.depth-slice3.openStart){let inner=replaceOuter($from,$to,slice3,depth+1);return node2.copy(node2.content.replaceChild(index2,inner))}else if(!slice3.content.size){return close(node2,replaceTwoWay($from,$to,depth))}else if(!slice3.openStart&&!slice3.openEnd&&$from.depth==depth&&$to.depth==depth){let parent=$from.parent,content=parent.content;return close(parent,content.cut(0,$from.parentOffset).append(slice3.content).append(content.cut($to.parentOffset)))}else{let{start:start,end:end}=prepareSliceForReplace(slice3,$from);return close(node2,replaceThreeWay($from,start,end,$to,depth))}}function checkJoin(main2,sub){if(!sub.type.compatibleContent(main2.type))throw new ReplaceError("Cannot join "+sub.type.name+" onto "+main2.type.name)}function joinable$1($before,$after,depth){let node2=$before.node(depth);checkJoin(node2,$after.node(depth));return node2}function addNode(child,target){let last=target.length-1;if(last>=0&&child.isText&&child.sameMarkup(target[last]))target[last]=child.withText(target[last].text+child.text);else target.push(child)}function addRange($start,$end,depth,target){let node2=($end||$start).node(depth);let startIndex=0,endIndex=$end?$end.index(depth):node2.childCount;if($start){startIndex=$start.index(depth);if($start.depth>depth){startIndex++}else if($start.textOffset){addNode($start.nodeAfter,target);startIndex++}}for(let i=startIndex;i<endIndex;i++)addNode(node2.child(i),target);if($end&&$end.depth==depth&&$end.textOffset)addNode($end.nodeBefore,target)}function close(node2,content){node2.type.checkContent(content);return node2.copy(content)}function replaceThreeWay($from,$start,$end,$to,depth){let openStart=$from.depth>depth&&joinable$1($from,$start,depth+1);let openEnd=$to.depth>depth&&joinable$1($end,$to,depth+1);let content=[];addRange(null,$from,depth,content);if(openStart&&openEnd&&$start.index(depth)==$end.index(depth)){checkJoin(openStart,openEnd);addNode(close(openStart,replaceThreeWay($from,$start,$end,$to,depth+1)),content)}else{if(openStart)addNode(close(openStart,replaceTwoWay($from,$start,depth+1)),content);addRange($start,$end,depth,content);if(openEnd)addNode(close(openEnd,replaceTwoWay($end,$to,depth+1)),content)}addRange($to,null,depth,content);return new Fragment(content)}function replaceTwoWay($from,$to,depth){let content=[];addRange(null,$from,depth,content);if($from.depth>depth){let type=joinable$1($from,$to,depth+1);addNode(close(type,replaceTwoWay($from,$to,depth+1)),content)}addRange($to,null,depth,content);return new Fragment(content)}function prepareSliceForReplace(slice3,$along){let extra=$along.depth-slice3.openStart,parent=$along.node(extra);let node2=parent.copy(slice3.content);for(let i=extra-1;i>=0;i--)node2=$along.node(i).copy(Fragment.from(node2));return{start:node2.resolveNoCache(slice3.openStart+extra),end:node2.resolveNoCache(node2.content.size-slice3.openEnd-extra)}}class ResolvedPos{constructor(pos,path,parentOffset){this.pos=pos;this.path=path;this.parentOffset=parentOffset;this.depth=path.length/3-1}resolveDepth(val){if(val==null)return this.depth;if(val<0)return this.depth+val;return val}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(depth){return this.path[this.resolveDepth(depth)*3]}index(depth){return this.path[this.resolveDepth(depth)*3+1]}indexAfter(depth){depth=this.resolveDepth(depth);return this.index(depth)+(depth==this.depth&&!this.textOffset?0:1)}start(depth){depth=this.resolveDepth(depth);return depth==0?0:this.path[depth*3-1]+1}end(depth){depth=this.resolveDepth(depth);return this.start(depth)+this.node(depth).content.size}before(depth){depth=this.resolveDepth(depth);if(!depth)throw new RangeError("There is no position before the top-level node");return depth==this.depth+1?this.pos:this.path[depth*3-1]}after(depth){depth=this.resolveDepth(depth);if(!depth)throw new RangeError("There is no position after the top-level node");return depth==this.depth+1?this.pos:this.path[depth*3-1]+this.path[depth*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let parent=this.parent,index2=this.index(this.depth);if(index2==parent.childCount)return null;let dOff=this.pos-this.path[this.path.length-1],child=parent.child(index2);return dOff?parent.child(index2).cut(dOff):child}get nodeBefore(){let index2=this.index(this.depth);let dOff=this.pos-this.path[this.path.length-1];if(dOff)return this.parent.child(index2).cut(0,dOff);return index2==0?null:this.parent.child(index2-1)}posAtIndex(index2,depth){depth=this.resolveDepth(depth);let node2=this.path[depth*3],pos=depth==0?0:this.path[depth*3-1]+1;for(let i=0;i<index2;i++)pos+=node2.child(i).nodeSize;return pos}marks(){let parent=this.parent,index2=this.index();if(parent.content.size==0)return Mark$1.none;if(this.textOffset)return parent.child(index2).marks;let main2=parent.maybeChild(index2-1),other=parent.maybeChild(index2);if(!main2){let tmp=main2;main2=other;other=tmp}let marks=main2.marks;for(var i=0;i<marks.length;i++)if(marks[i].type.spec.inclusive===false&&(!other||!marks[i].isInSet(other.marks)))marks=marks[i--].removeFromSet(marks);return marks}marksAcross($end){let after=this.parent.maybeChild(this.index());if(!after||!after.isInline)return null;let marks=after.marks,next2=$end.parent.maybeChild($end.index());for(var i=0;i<marks.length;i++)if(marks[i].type.spec.inclusive===false&&(!next2||!marks[i].isInSet(next2.marks)))marks=marks[i--].removeFromSet(marks);return marks}sharedDepth(pos){for(let depth=this.depth;depth>0;depth--)if(this.start(depth)<=pos&&this.end(depth)>=pos)return depth;return 0}blockRange(other=this,pred){if(other.pos<this.pos)return other.blockRange(this);for(let d=this.depth-(this.parent.inlineContent||this.pos==other.pos?1:0);d>=0;d--)if(other.pos<=this.end(d)&&(!pred||pred(this.node(d))))return new NodeRange(this,other,d);return null}sameParent(other){return this.pos-this.parentOffset==other.pos-other.parentOffset}max(other){return other.pos>this.pos?other:this}min(other){return other.pos<this.pos?other:this}toString(){let str="";for(let i=1;i<=this.depth;i++)str+=(str?"/":"")+this.node(i).type.name+"_"+this.index(i-1);return str+":"+this.parentOffset}static resolve(doc2,pos){if(!(pos>=0&&pos<=doc2.content.size))throw new RangeError("Position "+pos+" out of range");let path=[];let start=0,parentOffset=pos;for(let node2=doc2;;){let{index:index2,offset:offset2}=node2.content.findIndex(parentOffset);let rem=parentOffset-offset2;path.push(node2,index2,start+offset2);if(!rem)break;node2=node2.child(index2);if(node2.isText)break;parentOffset=rem-1;start+=offset2+1}return new ResolvedPos(pos,path,parentOffset)}static resolveCached(doc2,pos){let cache=resolveCache.get(doc2);if(cache){for(let i=0;i<cache.elts.length;i++){let elt=cache.elts[i];if(elt.pos==pos)return elt}}else{resolveCache.set(doc2,cache=new ResolveCache)}let result=cache.elts[cache.i]=ResolvedPos.resolve(doc2,pos);cache.i=(cache.i+1)%resolveCacheSize;return result}}class ResolveCache{constructor(){this.elts=[];this.i=0}}const resolveCacheSize=12,resolveCache=new WeakMap;class NodeRange{constructor($from,$to,depth){this.$from=$from;this.$to=$to;this.depth=depth}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const emptyAttrs=Object.create(null);let Node$2=class Node2{constructor(type,attrs,content,marks=Mark$1.none){this.type=type;this.attrs=attrs;this.marks=marks;this.content=content||Fragment.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(index2){return this.content.child(index2)}maybeChild(index2){return this.content.maybeChild(index2)}forEach(f){this.content.forEach(f)}nodesBetween(from3,to,f,startPos=0){this.content.nodesBetween(from3,to,f,startPos,this)}descendants(f){this.nodesBetween(0,this.content.size,f)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(from3,to,blockSeparator,leafText){return this.content.textBetween(from3,to,blockSeparator,leafText)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(other){return this==other||this.sameMarkup(other)&&this.content.eq(other.content)}sameMarkup(other){return this.hasMarkup(other.type,other.attrs,other.marks)}hasMarkup(type,attrs,marks){return this.type==type&&compareDeep(this.attrs,attrs||type.defaultAttrs||emptyAttrs)&&Mark$1.sameSet(this.marks,marks||Mark$1.none)}copy(content=null){if(content==this.content)return this;return new Node2(this.type,this.attrs,content,this.marks)}mark(marks){return marks==this.marks?this:new Node2(this.type,this.attrs,this.content,marks)}cut(from3,to=this.content.size){if(from3==0&&to==this.content.size)return this;return this.copy(this.content.cut(from3,to))}slice(from3,to=this.content.size,includeParents=false){if(from3==to)return Slice.empty;let $from=this.resolve(from3),$to=this.resolve(to);let depth=includeParents?0:$from.sharedDepth(to);let start=$from.start(depth),node2=$from.node(depth);let content=node2.content.cut($from.pos-start,$to.pos-start);return new Slice(content,$from.depth-depth,$to.depth-depth)}replace(from3,to,slice3){return replace$1(this.resolve(from3),this.resolve(to),slice3)}nodeAt(pos){for(let node2=this;;){let{index:index2,offset:offset2}=node2.content.findIndex(pos);node2=node2.maybeChild(index2);if(!node2)return null;if(offset2==pos||node2.isText)return node2;pos-=offset2+1}}childAfter(pos){let{index:index2,offset:offset2}=this.content.findIndex(pos);return{node:this.content.maybeChild(index2),index:index2,offset:offset2}}childBefore(pos){if(pos==0)return{node:null,index:0,offset:0};let{index:index2,offset:offset2}=this.content.findIndex(pos);if(offset2<pos)return{node:this.content.child(index2),index:index2,offset:offset2};let node2=this.content.child(index2-1);return{node:node2,index:index2-1,offset:offset2-node2.nodeSize}}resolve(pos){return ResolvedPos.resolveCached(this,pos)}resolveNoCache(pos){return ResolvedPos.resolve(this,pos)}rangeHasMark(from3,to,type){let found2=false;if(to>from3)this.nodesBetween(from3,to,(node2=>{if(type.isInSet(node2.marks))found2=true;return!found2}));return found2}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let name=this.type.name;if(this.content.size)name+="("+this.content.toStringInner()+")";return wrapMarks(this.marks,name)}contentMatchAt(index2){let match2=this.type.contentMatch.matchFragment(this.content,0,index2);if(!match2)throw new Error("Called contentMatchAt on a node with invalid content");return match2}canReplace(from3,to,replacement=Fragment.empty,start=0,end=replacement.childCount){let one=this.contentMatchAt(from3).matchFragment(replacement,start,end);let two=one&&one.matchFragment(this.content,to);if(!two||!two.validEnd)return false;for(let i=start;i<end;i++)if(!this.type.allowsMarks(replacement.child(i).marks))return false;return true}canReplaceWith(from3,to,type,marks){if(marks&&!this.type.allowsMarks(marks))return false;let start=this.contentMatchAt(from3).matchType(type);let end=start&&start.matchFragment(this.content,to);return end?end.validEnd:false}canAppend(other){if(other.content.size)return this.canReplace(this.childCount,this.childCount,other.content);else return this.type.compatibleContent(other.type)}check(){this.type.checkContent(this.content);this.type.checkAttrs(this.attrs);let copy2=Mark$1.none;for(let i=0;i<this.marks.length;i++){let mark=this.marks[i];mark.type.checkAttrs(mark.attrs);copy2=mark.addToSet(copy2)}if(!Mark$1.sameSet(copy2,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((m=>m.type.name))}`);this.content.forEach((node2=>node2.check()))}toJSON(){let obj={type:this.type.name};for(let _ in this.attrs){obj.attrs=this.attrs;break}if(this.content.size)obj.content=this.content.toJSON();if(this.marks.length)obj.marks=this.marks.map((n=>n.toJSON()));return obj}static fromJSON(schema,json){if(!json)throw new RangeError("Invalid input for Node.fromJSON");let marks=void 0;if(json.marks){if(!Array.isArray(json.marks))throw new RangeError("Invalid mark data for Node.fromJSON");marks=json.marks.map(schema.markFromJSON)}if(json.type=="text"){if(typeof json.text!="string")throw new RangeError("Invalid text node in JSON");return schema.text(json.text,marks)}let content=Fragment.fromJSON(schema,json.content);let node2=schema.nodeType(json.type).create(json.attrs,content,marks);node2.type.checkAttrs(node2.attrs);return node2}};Node$2.prototype.text=void 0;class TextNode extends Node$2{constructor(type,attrs,content,marks){super(type,attrs,null,marks);if(!content)throw new RangeError("Empty text nodes are not allowed");this.text=content}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);return wrapMarks(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(from3,to){return this.text.slice(from3,to)}get nodeSize(){return this.text.length}mark(marks){return marks==this.marks?this:new TextNode(this.type,this.attrs,this.text,marks)}withText(text){if(text==this.text)return this;return new TextNode(this.type,this.attrs,text,this.marks)}cut(from3=0,to=this.text.length){if(from3==0&&to==this.text.length)return this;return this.withText(this.text.slice(from3,to))}eq(other){return this.sameMarkup(other)&&this.text==other.text}toJSON(){let base2=super.toJSON();base2.text=this.text;return base2}}function wrapMarks(marks,str){for(let i=marks.length-1;i>=0;i--)str=marks[i].type.name+"("+str+")";return str}class ContentMatch{constructor(validEnd){this.validEnd=validEnd;this.next=[];this.wrapCache=[]}static parse(string,nodeTypes){let stream=new TokenStream(string,nodeTypes);if(stream.next==null)return ContentMatch.empty;let expr=parseExpr(stream);if(stream.next)stream.err("Unexpected trailing text");let match2=dfa(nfa(expr));checkForDeadEnds(match2,stream);return match2}matchType(type){for(let i=0;i<this.next.length;i++)if(this.next[i].type==type)return this.next[i].next;return null}matchFragment(frag,start=0,end=frag.childCount){let cur=this;for(let i=start;cur&&i<end;i++)cur=cur.matchType(frag.child(i).type);return cur}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let i=0;i<this.next.length;i++){let{type:type}=this.next[i];if(!(type.isText||type.hasRequiredAttrs()))return type}return null}compatible(other){for(let i=0;i<this.next.length;i++)for(let j=0;j<other.next.length;j++)if(this.next[i].type==other.next[j].type)return true;return false}fillBefore(after,toEnd=false,startIndex=0){let seen=[this];function search(match2,types){let finished=match2.matchFragment(after,startIndex);if(finished&&(!toEnd||finished.validEnd))return Fragment.from(types.map((tp=>tp.createAndFill())));for(let i=0;i<match2.next.length;i++){let{type:type,next:next2}=match2.next[i];if(!(type.isText||type.hasRequiredAttrs())&&seen.indexOf(next2)==-1){seen.push(next2);let found2=search(next2,types.concat(type));if(found2)return found2}}return null}return search(this,[])}findWrapping(target){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==target)return this.wrapCache[i+1];let computed=this.computeWrapping(target);this.wrapCache.push(target,computed);return computed}computeWrapping(target){let seen=Object.create(null),active=[{match:this,type:null,via:null}];while(active.length){let current=active.shift(),match2=current.match;if(match2.matchType(target)){let result=[];for(let obj=current;obj.type;obj=obj.via)result.push(obj.type);return result.reverse()}for(let i=0;i<match2.next.length;i++){let{type:type,next:next2}=match2.next[i];if(!type.isLeaf&&!type.hasRequiredAttrs()&&!(type.name in seen)&&(!current.type||next2.validEnd)){active.push({match:type.contentMatch,type:type,via:current});seen[type.name]=true}}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let seen=[];function scan(m){seen.push(m);for(let i=0;i<m.next.length;i++)if(seen.indexOf(m.next[i].next)==-1)scan(m.next[i].next)}scan(this);return seen.map(((m,i)=>{let out=i+(m.validEnd?"*":" ")+" ";for(let i2=0;i2<m.next.length;i2++)out+=(i2?", ":"")+m.next[i2].type.name+"->"+seen.indexOf(m.next[i2].next);return out})).join("\n")}}ContentMatch.empty=new ContentMatch(true);class TokenStream{constructor(string,nodeTypes){this.string=string;this.nodeTypes=nodeTypes;this.inline=null;this.pos=0;this.tokens=string.split(/\s*(?=\b|\W|$)/);if(this.tokens[this.tokens.length-1]=="")this.tokens.pop();if(this.tokens[0]=="")this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(tok){return this.next==tok&&(this.pos++||true)}err(str){throw new SyntaxError(str+" (in content expression '"+this.string+"')")}}function parseExpr(stream){let exprs=[];do{exprs.push(parseExprSeq(stream))}while(stream.eat("|"));return exprs.length==1?exprs[0]:{type:"choice",exprs:exprs}}function parseExprSeq(stream){let exprs=[];do{exprs.push(parseExprSubscript(stream))}while(stream.next&&stream.next!=")"&&stream.next!="|");return exprs.length==1?exprs[0]:{type:"seq",exprs:exprs}}function parseExprSubscript(stream){let expr=parseExprAtom(stream);for(;;){if(stream.eat("+"))expr={type:"plus",expr:expr};else if(stream.eat("*"))expr={type:"star",expr:expr};else if(stream.eat("?"))expr={type:"opt",expr:expr};else if(stream.eat("{"))expr=parseExprRange(stream,expr);else break}return expr}function parseNum(stream){if(/\D/.test(stream.next))stream.err("Expected number, got '"+stream.next+"'");let result=Number(stream.next);stream.pos++;return result}function parseExprRange(stream,expr){let min2=parseNum(stream),max2=min2;if(stream.eat(",")){if(stream.next!="}")max2=parseNum(stream);else max2=-1}if(!stream.eat("}"))stream.err("Unclosed braced range");return{type:"range",min:min2,max:max2,expr:expr}}function resolveName(stream,name){let types=stream.nodeTypes,type=types[name];if(type)return[type];let result=[];for(let typeName in types){let type2=types[typeName];if(type2.isInGroup(name))result.push(type2)}if(result.length==0)stream.err("No node type or group '"+name+"' found");return result}function parseExprAtom(stream){if(stream.eat("(")){let expr=parseExpr(stream);if(!stream.eat(")"))stream.err("Missing closing paren");return expr}else if(!/\W/.test(stream.next)){let exprs=resolveName(stream,stream.next).map((type=>{if(stream.inline==null)stream.inline=type.isInline;else if(stream.inline!=type.isInline)stream.err("Mixing inline and block content");return{type:"name",value:type}}));stream.pos++;return exprs.length==1?exprs[0]:{type:"choice",exprs:exprs}}else{stream.err("Unexpected token '"+stream.next+"'")}}function nfa(expr){let nfa2=[[]];connect(compile2(expr,0),node2());return nfa2;function node2(){return nfa2.push([])-1}function edge(from3,to,term){let edge2={term:term,to:to};nfa2[from3].push(edge2);return edge2}function connect(edges,to){edges.forEach((edge2=>edge2.to=to))}function compile2(expr2,from3){if(expr2.type=="choice"){return expr2.exprs.reduce(((out,expr3)=>out.concat(compile2(expr3,from3))),[])}else if(expr2.type=="seq"){for(let i=0;;i++){let next2=compile2(expr2.exprs[i],from3);if(i==expr2.exprs.length-1)return next2;connect(next2,from3=node2())}}else if(expr2.type=="star"){let loop=node2();edge(from3,loop);connect(compile2(expr2.expr,loop),loop);return[edge(loop)]}else if(expr2.type=="plus"){let loop=node2();connect(compile2(expr2.expr,from3),loop);connect(compile2(expr2.expr,loop),loop);return[edge(loop)]}else if(expr2.type=="opt"){return[edge(from3)].concat(compile2(expr2.expr,from3))}else if(expr2.type=="range"){let cur=from3;for(let i=0;i<expr2.min;i++){let next2=node2();connect(compile2(expr2.expr,cur),next2);cur=next2}if(expr2.max==-1){connect(compile2(expr2.expr,cur),cur)}else{for(let i=expr2.min;i<expr2.max;i++){let next2=node2();edge(cur,next2);connect(compile2(expr2.expr,cur),next2);cur=next2}}return[edge(cur)]}else if(expr2.type=="name"){return[edge(from3,void 0,expr2.value)]}else{throw new Error("Unknown expr type")}}}function cmp(a,b){return b-a}function nullFrom(nfa2,node2){let result=[];scan(node2);return result.sort(cmp);function scan(node3){let edges=nfa2[node3];if(edges.length==1&&!edges[0].term)return scan(edges[0].to);result.push(node3);for(let i=0;i<edges.length;i++){let{term:term,to:to}=edges[i];if(!term&&result.indexOf(to)==-1)scan(to)}}}function dfa(nfa2){let labeled=Object.create(null);return explore(nullFrom(nfa2,0));function explore(states){let out=[];states.forEach((node2=>{nfa2[node2].forEach((({term:term,to:to})=>{if(!term)return;let set;for(let i=0;i<out.length;i++)if(out[i][0]==term)set=out[i][1];nullFrom(nfa2,to).forEach((node3=>{if(!set)out.push([term,set=[]]);if(set.indexOf(node3)==-1)set.push(node3)}))}))}));let state=labeled[states.join(",")]=new ContentMatch(states.indexOf(nfa2.length-1)>-1);for(let i=0;i<out.length;i++){let states2=out[i][1].sort(cmp);state.next.push({type:out[i][0],next:labeled[states2.join(",")]||explore(states2)})}return state}}function checkForDeadEnds(match2,stream){for(let i=0,work=[match2];i<work.length;i++){let state=work[i],dead=!state.validEnd,nodes=[];for(let j=0;j<state.next.length;j++){let{type:type,next:next2}=state.next[j];nodes.push(type.name);if(dead&&!(type.isText||type.hasRequiredAttrs()))dead=false;if(work.indexOf(next2)==-1)work.push(next2)}if(dead)stream.err("Only non-generatable nodes ("+nodes.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function defaultAttrs(attrs){let defaults2=Object.create(null);for(let attrName in attrs){let attr=attrs[attrName];if(!attr.hasDefault)return null;defaults2[attrName]=attr.default}return defaults2}function computeAttrs(attrs,value){let built=Object.create(null);for(let name in attrs){let given=value&&value[name];if(given===void 0){let attr=attrs[name];if(attr.hasDefault)given=attr.default;else throw new RangeError("No value supplied for attribute "+name)}built[name]=given}return built}function checkAttrs(attrs,values,type,name){for(let name2 in values)if(!(name2 in attrs))throw new RangeError(`Unsupported attribute ${name2} for ${type} of type ${name2}`);for(let name2 in attrs){let attr=attrs[name2];if(attr.validate)attr.validate(values[name2])}}function initAttrs(typeName,attrs){let result=Object.create(null);if(attrs)for(let name in attrs)result[name]=new Attribute(typeName,name,attrs[name]);return result}let NodeType$1=class NodeType{constructor(name,schema,spec){this.name=name;this.schema=schema;this.spec=spec;this.markSet=null;this.groups=spec.group?spec.group.split(" "):[];this.attrs=initAttrs(name,spec.attrs);this.defaultAttrs=defaultAttrs(this.attrs);this.contentMatch=null;this.inlineContent=null;this.isBlock=!(spec.inline||name=="text");this.isText=name=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ContentMatch.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(group){return this.groups.indexOf(group)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let n in this.attrs)if(this.attrs[n].isRequired)return true;return false}compatibleContent(other){return this==other||this.contentMatch.compatible(other.contentMatch)}computeAttrs(attrs){if(!attrs&&this.defaultAttrs)return this.defaultAttrs;else return computeAttrs(this.attrs,attrs)}create(attrs=null,content,marks){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Node$2(this,this.computeAttrs(attrs),Fragment.from(content),Mark$1.setFrom(marks))}createChecked(attrs=null,content,marks){content=Fragment.from(content);this.checkContent(content);return new Node$2(this,this.computeAttrs(attrs),content,Mark$1.setFrom(marks))}createAndFill(attrs=null,content,marks){attrs=this.computeAttrs(attrs);content=Fragment.from(content);if(content.size){let before=this.contentMatch.fillBefore(content);if(!before)return null;content=before.append(content)}let matched=this.contentMatch.matchFragment(content);let after=matched&&matched.fillBefore(Fragment.empty,true);if(!after)return null;return new Node$2(this,attrs,content.append(after),Mark$1.setFrom(marks))}validContent(content){let result=this.contentMatch.matchFragment(content);if(!result||!result.validEnd)return false;for(let i=0;i<content.childCount;i++)if(!this.allowsMarks(content.child(i).marks))return false;return true}checkContent(content){if(!this.validContent(content))throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0,50)}`)}checkAttrs(attrs){checkAttrs(this.attrs,attrs,"node",this.name)}allowsMarkType(markType){return this.markSet==null||this.markSet.indexOf(markType)>-1}allowsMarks(marks){if(this.markSet==null)return true;for(let i=0;i<marks.length;i++)if(!this.allowsMarkType(marks[i].type))return false;return true}allowedMarks(marks){if(this.markSet==null)return marks;let copy2;for(let i=0;i<marks.length;i++){if(!this.allowsMarkType(marks[i].type)){if(!copy2)copy2=marks.slice(0,i)}else if(copy2){copy2.push(marks[i])}}return!copy2?marks:copy2.length?copy2:Mark$1.none}static compile(nodes,schema){let result=Object.create(null);nodes.forEach(((name,spec)=>result[name]=new NodeType(name,schema,spec)));let topType=schema.spec.topNode||"doc";if(!result[topType])throw new RangeError("Schema is missing its top node type ('"+topType+"')");if(!result.text)throw new RangeError("Every schema needs a 'text' type");for(let _ in result.text.attrs)throw new RangeError("The text node type should not have attributes");return result}};function validateType(typeName,attrName,type){let types=type.split("|");return value=>{let name=value===null?"null":typeof value;if(types.indexOf(name)<0)throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`)}}class Attribute{constructor(typeName,attrName,options2){this.hasDefault=Object.prototype.hasOwnProperty.call(options2,"default");this.default=options2.default;this.validate=typeof options2.validate=="string"?validateType(typeName,attrName,options2.validate):options2.validate}get isRequired(){return!this.hasDefault}}class MarkType{constructor(name,rank,schema,spec){this.name=name;this.rank=rank;this.schema=schema;this.spec=spec;this.attrs=initAttrs(name,spec.attrs);this.excluded=null;let defaults2=defaultAttrs(this.attrs);this.instance=defaults2?new Mark$1(this,defaults2):null}create(attrs=null){if(!attrs&&this.instance)return this.instance;return new Mark$1(this,computeAttrs(this.attrs,attrs))}static compile(marks,schema){let result=Object.create(null),rank=0;marks.forEach(((name,spec)=>result[name]=new MarkType(name,rank++,schema,spec)));return result}removeFromSet(set){for(var i=0;i<set.length;i++)if(set[i].type==this){set=set.slice(0,i).concat(set.slice(i+1));i--}return set}isInSet(set){for(let i=0;i<set.length;i++)if(set[i].type==this)return set[i]}checkAttrs(attrs){checkAttrs(this.attrs,attrs,"mark",this.name)}excludes(other){return this.excluded.indexOf(other)>-1}}class Schema{constructor(spec){this.linebreakReplacement=null;this.cached=Object.create(null);let instanceSpec=this.spec={};for(let prop in spec)instanceSpec[prop]=spec[prop];instanceSpec.nodes=OrderedMap.from(spec.nodes),instanceSpec.marks=OrderedMap.from(spec.marks||{}),this.nodes=NodeType$1.compile(this.spec.nodes,this);this.marks=MarkType.compile(this.spec.marks,this);let contentExprCache=Object.create(null);for(let prop in this.nodes){if(prop in this.marks)throw new RangeError(prop+" can not be both a node and a mark");let type=this.nodes[prop],contentExpr=type.spec.content||"",markExpr=type.spec.marks;type.contentMatch=contentExprCache[contentExpr]||(contentExprCache[contentExpr]=ContentMatch.parse(contentExpr,this.nodes));type.inlineContent=type.contentMatch.inlineContent;if(type.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!type.isInline||!type.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=type}type.markSet=markExpr=="_"?null:markExpr?gatherMarks(this,markExpr.split(" ")):markExpr==""||!type.inlineContent?[]:null}for(let prop in this.marks){let type=this.marks[prop],excl=type.spec.excludes;type.excluded=excl==null?[type]:excl==""?[]:gatherMarks(this,excl.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this);this.markFromJSON=this.markFromJSON.bind(this);this.topNodeType=this.nodes[this.spec.topNode||"doc"];this.cached.wrappings=Object.create(null)}node(type,attrs=null,content,marks){if(typeof type=="string")type=this.nodeType(type);else if(!(type instanceof NodeType$1))throw new RangeError("Invalid node type: "+type);else if(type.schema!=this)throw new RangeError("Node type from different schema used ("+type.name+")");return type.createChecked(attrs,content,marks)}text(text,marks){let type=this.nodes.text;return new TextNode(type,type.defaultAttrs,text,Mark$1.setFrom(marks))}mark(type,attrs){if(typeof type=="string")type=this.marks[type];return type.create(attrs)}nodeFromJSON(json){return Node$2.fromJSON(this,json)}markFromJSON(json){return Mark$1.fromJSON(this,json)}nodeType(name){let found2=this.nodes[name];if(!found2)throw new RangeError("Unknown node type: "+name);return found2}}function gatherMarks(schema,marks){let found2=[];for(let i=0;i<marks.length;i++){let name=marks[i],mark=schema.marks[name],ok=mark;if(mark){found2.push(mark)}else{for(let prop in schema.marks){let mark2=schema.marks[prop];if(name=="_"||mark2.spec.group&&mark2.spec.group.split(" ").indexOf(name)>-1)found2.push(ok=mark2)}}if(!ok)throw new SyntaxError("Unknown mark type: '"+marks[i]+"'")}return found2}function isTagRule(rule){return rule.tag!=null}function isStyleRule(rule){return rule.style!=null}let DOMParser$1=class DOMParser2{constructor(schema,rules){this.schema=schema;this.rules=rules;this.tags=[];this.styles=[];let matchedStyles=this.matchedStyles=[];rules.forEach((rule=>{if(isTagRule(rule)){this.tags.push(rule)}else if(isStyleRule(rule)){let prop=/[^=]*/.exec(rule.style)[0];if(matchedStyles.indexOf(prop)<0)matchedStyles.push(prop);this.styles.push(rule)}}));this.normalizeLists=!this.tags.some((r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return false;let node2=schema.nodes[r.node];return node2.contentMatch.matchType(node2)}))}parse(dom,options2={}){let context=new ParseContext(this,options2,false);context.addAll(dom,Mark$1.none,options2.from,options2.to);return context.finish()}parseSlice(dom,options2={}){let context=new ParseContext(this,options2,true);context.addAll(dom,Mark$1.none,options2.from,options2.to);return Slice.maxOpen(context.finish())}matchTag(dom,context,after){for(let i=after?this.tags.indexOf(after)+1:0;i<this.tags.length;i++){let rule=this.tags[i];if(matches(dom,rule.tag)&&(rule.namespace===void 0||dom.namespaceURI==rule.namespace)&&(!rule.context||context.matchesContext(rule.context))){if(rule.getAttrs){let result=rule.getAttrs(dom);if(result===false)continue;rule.attrs=result||void 0}return rule}}}matchStyle(prop,value,context,after){for(let i=after?this.styles.indexOf(after)+1:0;i<this.styles.length;i++){let rule=this.styles[i],style2=rule.style;if(style2.indexOf(prop)!=0||rule.context&&!context.matchesContext(rule.context)||style2.length>prop.length&&(style2.charCodeAt(prop.length)!=61||style2.slice(prop.length+1)!=value))continue;if(rule.getAttrs){let result=rule.getAttrs(value);if(result===false)continue;rule.attrs=result||void 0}return rule}}static schemaRules(schema){let result=[];function insert(rule){let priority=rule.priority==null?50:rule.priority,i=0;for(;i<result.length;i++){let next2=result[i],nextPriority=next2.priority==null?50:next2.priority;if(nextPriority<priority)break}result.splice(i,0,rule)}for(let name in schema.marks){let rules=schema.marks[name].spec.parseDOM;if(rules)rules.forEach((rule=>{insert(rule=copy$1(rule));if(!(rule.mark||rule.ignore||rule.clearMark))rule.mark=name}))}for(let name in schema.nodes){let rules=schema.nodes[name].spec.parseDOM;if(rules)rules.forEach((rule=>{insert(rule=copy$1(rule));if(!(rule.node||rule.ignore||rule.mark))rule.node=name}))}return result}static fromSchema(schema){return schema.cached.domParser||(schema.cached.domParser=new DOMParser2(schema,DOMParser2.schemaRules(schema)))}};const blockTags={address:true,article:true,aside:true,blockquote:true,canvas:true,dd:true,div:true,dl:true,fieldset:true,figcaption:true,figure:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,li:true,noscript:true,ol:true,output:true,p:true,pre:true,section:true,table:true,tfoot:true,ul:true};const ignoreTags={head:true,noscript:true,object:true,script:true,style:true,title:true};const listTags={ol:true,ul:true};const OPT_PRESERVE_WS=1,OPT_PRESERVE_WS_FULL=2,OPT_OPEN_LEFT=4;function wsOptionsFor(type,preserveWhitespace,base2){if(preserveWhitespace!=null)return(preserveWhitespace?OPT_PRESERVE_WS:0)|(preserveWhitespace==="full"?OPT_PRESERVE_WS_FULL:0);return type&&type.whitespace=="pre"?OPT_PRESERVE_WS|OPT_PRESERVE_WS_FULL:base2&~OPT_OPEN_LEFT}class NodeContext{constructor(type,attrs,marks,solid,match2,options2){this.type=type;this.attrs=attrs;this.marks=marks;this.solid=solid;this.options=options2;this.content=[];this.activeMarks=Mark$1.none;this.match=match2||(options2&OPT_OPEN_LEFT?null:type.contentMatch)}findWrapping(node2){if(!this.match){if(!this.type)return[];let fill=this.type.contentMatch.fillBefore(Fragment.from(node2));if(fill){this.match=this.type.contentMatch.matchFragment(fill)}else{let start=this.type.contentMatch,wrap2;if(wrap2=start.findWrapping(node2.type)){this.match=start;return wrap2}else{return null}}}return this.match.findWrapping(node2.type)}finish(openEnd){if(!(this.options&OPT_PRESERVE_WS)){let last=this.content[this.content.length-1],m;if(last&&last.isText&&(m=/[ \t\r\n\u000c]+$/.exec(last.text))){let text=last;if(last.text.length==m[0].length)this.content.pop();else this.content[this.content.length-1]=text.withText(text.text.slice(0,text.text.length-m[0].length))}}let content=Fragment.from(this.content);if(!openEnd&&this.match)content=content.append(this.match.fillBefore(Fragment.empty,true));return this.type?this.type.create(this.attrs,content,this.marks):content}inlineContext(node2){if(this.type)return this.type.inlineContent;if(this.content.length)return this.content[0].isInline;return node2.parentNode&&!blockTags.hasOwnProperty(node2.parentNode.nodeName.toLowerCase())}}class ParseContext{constructor(parser,options2,isOpen){this.parser=parser;this.options=options2;this.isOpen=isOpen;this.open=0;this.localPreserveWS=false;let topNode=options2.topNode,topContext;let topOptions=wsOptionsFor(null,options2.preserveWhitespace,0)|(isOpen?OPT_OPEN_LEFT:0);if(topNode)topContext=new NodeContext(topNode.type,topNode.attrs,Mark$1.none,true,options2.topMatch||topNode.type.contentMatch,topOptions);else if(isOpen)topContext=new NodeContext(null,null,Mark$1.none,true,null,topOptions);else topContext=new NodeContext(parser.schema.topNodeType,null,Mark$1.none,true,null,topOptions);this.nodes=[topContext];this.find=options2.findPositions;this.needsBlock=false}get top(){return this.nodes[this.open]}addDOM(dom,marks){if(dom.nodeType==3)this.addTextNode(dom,marks);else if(dom.nodeType==1)this.addElement(dom,marks)}addTextNode(dom,marks){let value=dom.nodeValue;let top=this.top,preserveWS=top.options&OPT_PRESERVE_WS_FULL?"full":this.localPreserveWS||(top.options&OPT_PRESERVE_WS)>0;if(preserveWS==="full"||top.inlineContext(dom)||/[^ \t\r\n\u000c]/.test(value)){if(!preserveWS){value=value.replace(/[ \t\r\n\u000c]+/g," ");if(/^[ \t\r\n\u000c]/.test(value)&&this.open==this.nodes.length-1){let nodeBefore=top.content[top.content.length-1];let domNodeBefore=dom.previousSibling;if(!nodeBefore||domNodeBefore&&domNodeBefore.nodeName=="BR"||nodeBefore.isText&&/[ \t\r\n\u000c]$/.test(nodeBefore.text))value=value.slice(1)}}else if(preserveWS!=="full"){value=value.replace(/\r?\n|\r/g," ")}else{value=value.replace(/\r\n?/g,"\n")}if(value)this.insertNode(this.parser.schema.text(value),marks);this.findInText(dom)}else{this.findInside(dom)}}addElement(dom,marks,matchAfter){let outerWS=this.localPreserveWS,top=this.top;if(dom.tagName=="PRE"||/pre/.test(dom.style&&dom.style.whiteSpace))this.localPreserveWS=true;let name=dom.nodeName.toLowerCase(),ruleID;if(listTags.hasOwnProperty(name)&&this.parser.normalizeLists)normalizeList(dom);let rule=this.options.ruleFromNode&&this.options.ruleFromNode(dom)||(ruleID=this.parser.matchTag(dom,this,matchAfter));out:if(rule?rule.ignore:ignoreTags.hasOwnProperty(name)){this.findInside(dom);this.ignoreFallback(dom,marks)}else if(!rule||rule.skip||rule.closeParent){if(rule&&rule.closeParent)this.open=Math.max(0,this.open-1);else if(rule&&rule.skip.nodeType)dom=rule.skip;let sync,oldNeedsBlock=this.needsBlock;if(blockTags.hasOwnProperty(name)){if(top.content.length&&top.content[0].isInline&&this.open){this.open--;top=this.top}sync=true;if(!top.type)this.needsBlock=true}else if(!dom.firstChild){this.leafFallback(dom,marks);break out}let innerMarks=rule&&rule.skip?marks:this.readStyles(dom,marks);if(innerMarks)this.addAll(dom,innerMarks);if(sync)this.sync(top);this.needsBlock=oldNeedsBlock}else{let innerMarks=this.readStyles(dom,marks);if(innerMarks)this.addElementByRule(dom,rule,innerMarks,rule.consuming===false?ruleID:void 0)}this.localPreserveWS=outerWS}leafFallback(dom,marks){if(dom.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent)this.addTextNode(dom.ownerDocument.createTextNode("\n"),marks)}ignoreFallback(dom,marks){if(dom.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent))this.findPlace(this.parser.schema.text("-"),marks)}readStyles(dom,marks){let styles=dom.style;if(styles&&styles.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let name=this.parser.matchedStyles[i],value=styles.getPropertyValue(name);if(value)for(let after=void 0;;){let rule=this.parser.matchStyle(name,value,this,after);if(!rule)break;if(rule.ignore)return null;if(rule.clearMark)marks=marks.filter((m=>!rule.clearMark(m)));else marks=marks.concat(this.parser.schema.marks[rule.mark].create(rule.attrs));if(rule.consuming===false)after=rule;else break}}return marks}addElementByRule(dom,rule,marks,continueAfter){let sync,nodeType;if(rule.node){nodeType=this.parser.schema.nodes[rule.node];if(!nodeType.isLeaf){let inner=this.enter(nodeType,rule.attrs||null,marks,rule.preserveWhitespace);if(inner){sync=true;marks=inner}}else if(!this.insertNode(nodeType.create(rule.attrs),marks)){this.leafFallback(dom,marks)}}else{let markType=this.parser.schema.marks[rule.mark];marks=marks.concat(markType.create(rule.attrs))}let startIn=this.top;if(nodeType&&nodeType.isLeaf){this.findInside(dom)}else if(continueAfter){this.addElement(dom,marks,continueAfter)}else if(rule.getContent){this.findInside(dom);rule.getContent(dom,this.parser.schema).forEach((node2=>this.insertNode(node2,marks)))}else{let contentDOM=dom;if(typeof rule.contentElement=="string")contentDOM=dom.querySelector(rule.contentElement);else if(typeof rule.contentElement=="function")contentDOM=rule.contentElement(dom);else if(rule.contentElement)contentDOM=rule.contentElement;this.findAround(dom,contentDOM,true);this.addAll(contentDOM,marks);this.findAround(dom,contentDOM,false)}if(sync&&this.sync(startIn))this.open--}addAll(parent,marks,startIndex,endIndex){let index2=startIndex||0;for(let dom=startIndex?parent.childNodes[startIndex]:parent.firstChild,end=endIndex==null?null:parent.childNodes[endIndex];dom!=end;dom=dom.nextSibling,++index2){this.findAtPoint(parent,index2);this.addDOM(dom,marks)}this.findAtPoint(parent,index2)}findPlace(node2,marks){let route,sync;for(let depth=this.open;depth>=0;depth--){let cx=this.nodes[depth];let found2=cx.findWrapping(node2);if(found2&&(!route||route.length>found2.length)){route=found2;sync=cx;if(!found2.length)break}if(cx.solid)break}if(!route)return null;this.sync(sync);for(let i=0;i<route.length;i++)marks=this.enterInner(route[i],null,marks,false);return marks}insertNode(node2,marks){if(node2.isInline&&this.needsBlock&&!this.top.type){let block=this.textblockFromContext();if(block)marks=this.enterInner(block,null,marks)}let innerMarks=this.findPlace(node2,marks);if(innerMarks){this.closeExtra();let top=this.top;if(top.match)top.match=top.match.matchType(node2.type);let nodeMarks=Mark$1.none;for(let m of innerMarks.concat(node2.marks))if(top.type?top.type.allowsMarkType(m.type):markMayApply(m.type,node2.type))nodeMarks=m.addToSet(nodeMarks);top.content.push(node2.mark(nodeMarks));return true}return false}enter(type,attrs,marks,preserveWS){let innerMarks=this.findPlace(type.create(attrs),marks);if(innerMarks)innerMarks=this.enterInner(type,attrs,marks,true,preserveWS);return innerMarks}enterInner(type,attrs,marks,solid=false,preserveWS){this.closeExtra();let top=this.top;top.match=top.match&&top.match.matchType(type);let options2=wsOptionsFor(type,preserveWS,top.options);if(top.options&OPT_OPEN_LEFT&&top.content.length==0)options2|=OPT_OPEN_LEFT;let applyMarks=Mark$1.none;marks=marks.filter((m=>{if(top.type?top.type.allowsMarkType(m.type):markMayApply(m.type,type)){applyMarks=m.addToSet(applyMarks);return false}return true}));this.nodes.push(new NodeContext(type,attrs,applyMarks,solid,null,options2));this.open++;return marks}closeExtra(openEnd=false){let i=this.nodes.length-1;if(i>this.open){for(;i>this.open;i--)this.nodes[i-1].content.push(this.nodes[i].finish(openEnd));this.nodes.length=this.open+1}}finish(){this.open=0;this.closeExtra(this.isOpen);return this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(to){for(let i=this.open;i>=0;i--){if(this.nodes[i]==to){this.open=i;return true}else if(this.localPreserveWS){this.nodes[i].options|=OPT_PRESERVE_WS}}return false}get currentPos(){this.closeExtra();let pos=0;for(let i=this.open;i>=0;i--){let content=this.nodes[i].content;for(let j=content.length-1;j>=0;j--)pos+=content[j].nodeSize;if(i)pos++}return pos}findAtPoint(parent,offset2){if(this.find)for(let i=0;i<this.find.length;i++){if(this.find[i].node==parent&&this.find[i].offset==offset2)this.find[i].pos=this.currentPos}}findInside(parent){if(this.find)for(let i=0;i<this.find.length;i++){if(this.find[i].pos==null&&parent.nodeType==1&&parent.contains(this.find[i].node))this.find[i].pos=this.currentPos}}findAround(parent,content,before){if(parent!=content&&this.find)for(let i=0;i<this.find.length;i++){if(this.find[i].pos==null&&parent.nodeType==1&&parent.contains(this.find[i].node)){let pos=content.compareDocumentPosition(this.find[i].node);if(pos&(before?2:4))this.find[i].pos=this.currentPos}}}findInText(textNode){if(this.find)for(let i=0;i<this.find.length;i++){if(this.find[i].node==textNode)this.find[i].pos=this.currentPos-(textNode.nodeValue.length-this.find[i].offset)}}matchesContext(context){if(context.indexOf("|")>-1)return context.split(/\s*\|\s*/).some(this.matchesContext,this);let parts=context.split("/");let option=this.options.context;let useRoot=!this.isOpen&&(!option||option.parent.type==this.nodes[0].type);let minDepth=-(option?option.depth+1:0)+(useRoot?0:1);let match2=(i,depth)=>{for(;i>=0;i--){let part=parts[i];if(part==""){if(i==parts.length-1||i==0)continue;for(;depth>=minDepth;depth--)if(match2(i-1,depth))return true;return false}else{let next2=depth>0||depth==0&&useRoot?this.nodes[depth].type:option&&depth>=minDepth?option.node(depth-minDepth).type:null;if(!next2||next2.name!=part&&!next2.isInGroup(part))return false;depth--}}return true};return match2(parts.length-1,this.open)}textblockFromContext(){let $context=this.options.context;if($context)for(let d=$context.depth;d>=0;d--){let deflt=$context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;if(deflt&&deflt.isTextblock&&deflt.defaultAttrs)return deflt}for(let name in this.parser.schema.nodes){let type=this.parser.schema.nodes[name];if(type.isTextblock&&type.defaultAttrs)return type}}}function normalizeList(dom){for(let child=dom.firstChild,prevItem=null;child;child=child.nextSibling){let name=child.nodeType==1?child.nodeName.toLowerCase():null;if(name&&listTags.hasOwnProperty(name)&&prevItem){prevItem.appendChild(child);child=prevItem}else if(name=="li"){prevItem=child}else if(name){prevItem=null}}}function matches(dom,selector){return(dom.matches||dom.msMatchesSelector||dom.webkitMatchesSelector||dom.mozMatchesSelector).call(dom,selector)}function copy$1(obj){let copy2={};for(let prop in obj)copy2[prop]=obj[prop];return copy2}function markMayApply(markType,nodeType){let nodes=nodeType.schema.nodes;for(let name in nodes){let parent=nodes[name];if(!parent.allowsMarkType(markType))continue;let seen=[],scan=match2=>{seen.push(match2);for(let i=0;i<match2.edgeCount;i++){let{type:type,next:next2}=match2.edge(i);if(type==nodeType)return true;if(seen.indexOf(next2)<0&&scan(next2))return true}};if(scan(parent.contentMatch))return true}}class DOMSerializer{constructor(nodes,marks){this.nodes=nodes;this.marks=marks}serializeFragment(fragment,options2={},target){if(!target)target=doc$1(options2).createDocumentFragment();let top=target,active=[];fragment.forEach((node2=>{if(active.length||node2.marks.length){let keep=0,rendered=0;while(keep<active.length&&rendered<node2.marks.length){let next2=node2.marks[rendered];if(!this.marks[next2.type.name]){rendered++;continue}if(!next2.eq(active[keep][0])||next2.type.spec.spanning===false)break;keep++;rendered++}while(keep<active.length)top=active.pop()[1];while(rendered<node2.marks.length){let add=node2.marks[rendered++];let markDOM=this.serializeMark(add,node2.isInline,options2);if(markDOM){active.push([add,top]);top.appendChild(markDOM.dom);top=markDOM.contentDOM||markDOM.dom}}}top.appendChild(this.serializeNodeInner(node2,options2))}));return target}serializeNodeInner(node2,options2){let{dom:dom,contentDOM:contentDOM}=renderSpec(doc$1(options2),this.nodes[node2.type.name](node2),null,node2.attrs);if(contentDOM){if(node2.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(node2.content,options2,contentDOM)}return dom}serializeNode(node2,options2={}){let dom=this.serializeNodeInner(node2,options2);for(let i=node2.marks.length-1;i>=0;i--){let wrap2=this.serializeMark(node2.marks[i],node2.isInline,options2);if(wrap2){(wrap2.contentDOM||wrap2.dom).appendChild(dom);dom=wrap2.dom}}return dom}serializeMark(mark,inline,options2={}){let toDOM=this.marks[mark.type.name];return toDOM&&renderSpec(doc$1(options2),toDOM(mark,inline),null,mark.attrs)}static renderSpec(doc2,structure,xmlNS=null,blockArraysIn){return renderSpec(doc2,structure,xmlNS,blockArraysIn)}static fromSchema(schema){return schema.cached.domSerializer||(schema.cached.domSerializer=new DOMSerializer(this.nodesFromSchema(schema),this.marksFromSchema(schema)))}static nodesFromSchema(schema){let result=gatherToDOM(schema.nodes);if(!result.text)result.text=node2=>node2.text;return result}static marksFromSchema(schema){return gatherToDOM(schema.marks)}}function gatherToDOM(obj){let result={};for(let name in obj){let toDOM=obj[name].spec.toDOM;if(toDOM)result[name]=toDOM}return result}function doc$1(options2){return options2.document||window.document}const suspiciousAttributeCache=new WeakMap;function suspiciousAttributes(attrs){let value=suspiciousAttributeCache.get(attrs);if(value===void 0)suspiciousAttributeCache.set(attrs,value=suspiciousAttributesInner(attrs));return value}function suspiciousAttributesInner(attrs){let result=null;function scan(value){if(value&&typeof value=="object"){if(Array.isArray(value)){if(typeof value[0]=="string"){if(!result)result=[];result.push(value)}else{for(let i=0;i<value.length;i++)scan(value[i])}}else{for(let prop in value)scan(value[prop])}}}scan(attrs);return result}function renderSpec(doc2,structure,xmlNS,blockArraysIn){if(typeof structure=="string")return{dom:doc2.createTextNode(structure)};if(structure.nodeType!=null)return{dom:structure};if(structure.dom&&structure.dom.nodeType!=null)return structure;let tagName=structure[0],suspicious;if(typeof tagName!="string")throw new RangeError("Invalid array passed to renderSpec");if(blockArraysIn&&(suspicious=suspiciousAttributes(blockArraysIn))&&suspicious.indexOf(structure)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let space=tagName.indexOf(" ");if(space>0){xmlNS=tagName.slice(0,space);tagName=tagName.slice(space+1)}let contentDOM;let dom=xmlNS?doc2.createElementNS(xmlNS,tagName):doc2.createElement(tagName);let attrs=structure[1],start=1;if(attrs&&typeof attrs=="object"&&attrs.nodeType==null&&!Array.isArray(attrs)){start=2;for(let name in attrs)if(attrs[name]!=null){let space2=name.indexOf(" ");if(space2>0)dom.setAttributeNS(name.slice(0,space2),name.slice(space2+1),attrs[name]);else dom.setAttribute(name,attrs[name])}}for(let i=start;i<structure.length;i++){let child=structure[i];if(child===0){if(i<structure.length-1||i>start)throw new RangeError("Content hole must be the only child of its parent node");return{dom:dom,contentDOM:dom}}else{let{dom:inner,contentDOM:innerContent}=renderSpec(doc2,child,xmlNS,blockArraysIn);dom.appendChild(inner);if(innerContent){if(contentDOM)throw new RangeError("Multiple content holes");contentDOM=innerContent}}}return{dom:dom,contentDOM:contentDOM}}const lower16=65535;const factor16=Math.pow(2,16);function makeRecover(index2,offset2){return index2+offset2*factor16}function recoverIndex(value){return value&lower16}function recoverOffset(value){return(value-(value&lower16))/factor16}const DEL_BEFORE=1,DEL_AFTER=2,DEL_ACROSS=4,DEL_SIDE=8;class MapResult{constructor(pos,delInfo,recover){this.pos=pos;this.delInfo=delInfo;this.recover=recover}get deleted(){return(this.delInfo&DEL_SIDE)>0}get deletedBefore(){return(this.delInfo&(DEL_BEFORE|DEL_ACROSS))>0}get deletedAfter(){return(this.delInfo&(DEL_AFTER|DEL_ACROSS))>0}get deletedAcross(){return(this.delInfo&DEL_ACROSS)>0}}class StepMap{constructor(ranges,inverted=false){this.ranges=ranges;this.inverted=inverted;if(!ranges.length&&StepMap.empty)return StepMap.empty}recover(value){let diff=0,index2=recoverIndex(value);if(!this.inverted)for(let i=0;i<index2;i++)diff+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[index2*3]+diff+recoverOffset(value)}mapResult(pos,assoc=1){return this._map(pos,assoc,false)}map(pos,assoc=1){return this._map(pos,assoc,true)}_map(pos,assoc,simple){let diff=0,oldIndex=this.inverted?2:1,newIndex=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let start=this.ranges[i]-(this.inverted?diff:0);if(start>pos)break;let oldSize=this.ranges[i+oldIndex],newSize=this.ranges[i+newIndex],end=start+oldSize;if(pos<=end){let side=!oldSize?assoc:pos==start?-1:pos==end?1:assoc;let result=start+diff+(side<0?0:newSize);if(simple)return result;let recover=pos==(assoc<0?start:end)?null:makeRecover(i/3,pos-start);let del=pos==start?DEL_AFTER:pos==end?DEL_BEFORE:DEL_ACROSS;if(assoc<0?pos!=start:pos!=end)del|=DEL_SIDE;return new MapResult(result,del,recover)}diff+=newSize-oldSize}return simple?pos+diff:new MapResult(pos+diff,0,null)}touches(pos,recover){let diff=0,index2=recoverIndex(recover);let oldIndex=this.inverted?2:1,newIndex=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let start=this.ranges[i]-(this.inverted?diff:0);if(start>pos)break;let oldSize=this.ranges[i+oldIndex],end=start+oldSize;if(pos<=end&&i==index2*3)return true;diff+=this.ranges[i+newIndex]-oldSize}return false}forEach(f){let oldIndex=this.inverted?2:1,newIndex=this.inverted?1:2;for(let i=0,diff=0;i<this.ranges.length;i+=3){let start=this.ranges[i],oldStart=start-(this.inverted?diff:0),newStart=start+(this.inverted?0:diff);let oldSize=this.ranges[i+oldIndex],newSize=this.ranges[i+newIndex];f(oldStart,oldStart+oldSize,newStart,newStart+newSize);diff+=newSize-oldSize}}invert(){return new StepMap(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(n){return n==0?StepMap.empty:new StepMap(n<0?[0,-n,0]:[0,0,n])}}StepMap.empty=new StepMap([]);class Mapping{constructor(maps,mirror,from3=0,to=(maps?maps.length:0)){this.mirror=mirror;this.from=from3;this.to=to;this._maps=maps||[];this.ownData=!(maps||mirror)}get maps(){return this._maps}slice(from3=0,to=this.maps.length){return new Mapping(this._maps,this.mirror,from3,to)}appendMap(map2,mirrors){if(!this.ownData){this._maps=this._maps.slice();this.mirror=this.mirror&&this.mirror.slice();this.ownData=true}this.to=this._maps.push(map2);if(mirrors!=null)this.setMirror(this._maps.length-1,mirrors)}appendMapping(mapping){for(let i=0,startSize=this._maps.length;i<mapping._maps.length;i++){let mirr=mapping.getMirror(i);this.appendMap(mapping._maps[i],mirr!=null&&mirr<i?startSize+mirr:void 0)}}getMirror(n){if(this.mirror){for(let i=0;i<this.mirror.length;i++)if(this.mirror[i]==n)return this.mirror[i+(i%2?-1:1)]}}setMirror(n,m){if(!this.mirror)this.mirror=[];this.mirror.push(n,m)}appendMappingInverted(mapping){for(let i=mapping.maps.length-1,totalSize=this._maps.length+mapping._maps.length;i>=0;i--){let mirr=mapping.getMirror(i);this.appendMap(mapping._maps[i].invert(),mirr!=null&&mirr>i?totalSize-mirr-1:void 0)}}invert(){let inverse=new Mapping;inverse.appendMappingInverted(this);return inverse}map(pos,assoc=1){if(this.mirror)return this._map(pos,assoc,true);for(let i=this.from;i<this.to;i++)pos=this._maps[i].map(pos,assoc);return pos}mapResult(pos,assoc=1){return this._map(pos,assoc,false)}_map(pos,assoc,simple){let delInfo=0;for(let i=this.from;i<this.to;i++){let map2=this._maps[i],result=map2.mapResult(pos,assoc);if(result.recover!=null){let corr=this.getMirror(i);if(corr!=null&&corr>i&&corr<this.to){i=corr;pos=this._maps[corr].recover(result.recover);continue}}delInfo|=result.delInfo;pos=result.pos}return simple?pos:new MapResult(pos,delInfo,null)}}const stepsByID=Object.create(null);class Step{getMap(){return StepMap.empty}merge(other){return null}static fromJSON(schema,json){if(!json||!json.stepType)throw new RangeError("Invalid input for Step.fromJSON");let type=stepsByID[json.stepType];if(!type)throw new RangeError(`No step type ${json.stepType} defined`);return type.fromJSON(schema,json)}static jsonID(id,stepClass){if(id in stepsByID)throw new RangeError("Duplicate use of step JSON ID "+id);stepsByID[id]=stepClass;stepClass.prototype.jsonID=id;return stepClass}}class StepResult{constructor(doc2,failed){this.doc=doc2;this.failed=failed}static ok(doc2){return new StepResult(doc2,null)}static fail(message){return new StepResult(null,message)}static fromReplace(doc2,from3,to,slice3){try{return StepResult.ok(doc2.replace(from3,to,slice3))}catch(e){if(e instanceof ReplaceError)return StepResult.fail(e.message);throw e}}}function mapFragment(fragment,f,parent){let mapped=[];for(let i=0;i<fragment.childCount;i++){let child=fragment.child(i);if(child.content.size)child=child.copy(mapFragment(child.content,f,child));if(child.isInline)child=f(child,parent,i);mapped.push(child)}return Fragment.fromArray(mapped)}class AddMarkStep extends Step{constructor(from3,to,mark){super();this.from=from3;this.to=to;this.mark=mark}apply(doc2){let oldSlice=doc2.slice(this.from,this.to),$from=doc2.resolve(this.from);let parent=$from.node($from.sharedDepth(this.to));let slice3=new Slice(mapFragment(oldSlice.content,((node2,parent2)=>{if(!node2.isAtom||!parent2.type.allowsMarkType(this.mark.type))return node2;return node2.mark(this.mark.addToSet(node2.marks))}),parent),oldSlice.openStart,oldSlice.openEnd);return StepResult.fromReplace(doc2,this.from,this.to,slice3)}invert(){return new RemoveMarkStep(this.from,this.to,this.mark)}map(mapping){let from3=mapping.mapResult(this.from,1),to=mapping.mapResult(this.to,-1);if(from3.deleted&&to.deleted||from3.pos>=to.pos)return null;return new AddMarkStep(from3.pos,to.pos,this.mark)}merge(other){if(other instanceof AddMarkStep&&other.mark.eq(this.mark)&&this.from<=other.to&&this.to>=other.from)return new AddMarkStep(Math.min(this.from,other.from),Math.max(this.to,other.to),this.mark);return null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(schema,json){if(typeof json.from!="number"||typeof json.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new AddMarkStep(json.from,json.to,schema.markFromJSON(json.mark))}}Step.jsonID("addMark",AddMarkStep);class RemoveMarkStep extends Step{constructor(from3,to,mark){super();this.from=from3;this.to=to;this.mark=mark}apply(doc2){let oldSlice=doc2.slice(this.from,this.to);let slice3=new Slice(mapFragment(oldSlice.content,(node2=>node2.mark(this.mark.removeFromSet(node2.marks))),doc2),oldSlice.openStart,oldSlice.openEnd);return StepResult.fromReplace(doc2,this.from,this.to,slice3)}invert(){return new AddMarkStep(this.from,this.to,this.mark)}map(mapping){let from3=mapping.mapResult(this.from,1),to=mapping.mapResult(this.to,-1);if(from3.deleted&&to.deleted||from3.pos>=to.pos)return null;return new RemoveMarkStep(from3.pos,to.pos,this.mark)}merge(other){if(other instanceof RemoveMarkStep&&other.mark.eq(this.mark)&&this.from<=other.to&&this.to>=other.from)return new RemoveMarkStep(Math.min(this.from,other.from),Math.max(this.to,other.to),this.mark);return null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(schema,json){if(typeof json.from!="number"||typeof json.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new RemoveMarkStep(json.from,json.to,schema.markFromJSON(json.mark))}}Step.jsonID("removeMark",RemoveMarkStep);class AddNodeMarkStep extends Step{constructor(pos,mark){super();this.pos=pos;this.mark=mark}apply(doc2){let node2=doc2.nodeAt(this.pos);if(!node2)return StepResult.fail("No node at mark step's position");let updated=node2.type.create(node2.attrs,null,this.mark.addToSet(node2.marks));return StepResult.fromReplace(doc2,this.pos,this.pos+1,new Slice(Fragment.from(updated),0,node2.isLeaf?0:1))}invert(doc2){let node2=doc2.nodeAt(this.pos);if(node2){let newSet=this.mark.addToSet(node2.marks);if(newSet.length==node2.marks.length){for(let i=0;i<node2.marks.length;i++)if(!node2.marks[i].isInSet(newSet))return new AddNodeMarkStep(this.pos,node2.marks[i]);return new AddNodeMarkStep(this.pos,this.mark)}}return new RemoveNodeMarkStep(this.pos,this.mark)}map(mapping){let pos=mapping.mapResult(this.pos,1);return pos.deletedAfter?null:new AddNodeMarkStep(pos.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(schema,json){if(typeof json.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new AddNodeMarkStep(json.pos,schema.markFromJSON(json.mark))}}Step.jsonID("addNodeMark",AddNodeMarkStep);class RemoveNodeMarkStep extends Step{constructor(pos,mark){super();this.pos=pos;this.mark=mark}apply(doc2){let node2=doc2.nodeAt(this.pos);if(!node2)return StepResult.fail("No node at mark step's position");let updated=node2.type.create(node2.attrs,null,this.mark.removeFromSet(node2.marks));return StepResult.fromReplace(doc2,this.pos,this.pos+1,new Slice(Fragment.from(updated),0,node2.isLeaf?0:1))}invert(doc2){let node2=doc2.nodeAt(this.pos);if(!node2||!this.mark.isInSet(node2.marks))return this;return new AddNodeMarkStep(this.pos,this.mark)}map(mapping){let pos=mapping.mapResult(this.pos,1);return pos.deletedAfter?null:new RemoveNodeMarkStep(pos.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(schema,json){if(typeof json.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new RemoveNodeMarkStep(json.pos,schema.markFromJSON(json.mark))}}Step.jsonID("removeNodeMark",RemoveNodeMarkStep);class ReplaceStep extends Step{constructor(from3,to,slice3,structure=false){super();this.from=from3;this.to=to;this.slice=slice3;this.structure=structure}apply(doc2){if(this.structure&&contentBetween(doc2,this.from,this.to))return StepResult.fail("Structure replace would overwrite content");return StepResult.fromReplace(doc2,this.from,this.to,this.slice)}getMap(){return new StepMap([this.from,this.to-this.from,this.slice.size])}invert(doc2){return new ReplaceStep(this.from,this.from+this.slice.size,doc2.slice(this.from,this.to))}map(mapping){let from3=mapping.mapResult(this.from,1),to=mapping.mapResult(this.to,-1);if(from3.deletedAcross&&to.deletedAcross)return null;return new ReplaceStep(from3.pos,Math.max(from3.pos,to.pos),this.slice)}merge(other){if(!(other instanceof ReplaceStep)||other.structure||this.structure)return null;if(this.from+this.slice.size==other.from&&!this.slice.openEnd&&!other.slice.openStart){let slice3=this.slice.size+other.slice.size==0?Slice.empty:new Slice(this.slice.content.append(other.slice.content),this.slice.openStart,other.slice.openEnd);return new ReplaceStep(this.from,this.to+(other.to-other.from),slice3,this.structure)}else if(other.to==this.from&&!this.slice.openStart&&!other.slice.openEnd){let slice3=this.slice.size+other.slice.size==0?Slice.empty:new Slice(other.slice.content.append(this.slice.content),other.slice.openStart,this.slice.openEnd);return new ReplaceStep(other.from,this.to,slice3,this.structure)}else{return null}}toJSON(){let json={stepType:"replace",from:this.from,to:this.to};if(this.slice.size)json.slice=this.slice.toJSON();if(this.structure)json.structure=true;return json}static fromJSON(schema,json){if(typeof json.from!="number"||typeof json.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ReplaceStep(json.from,json.to,Slice.fromJSON(schema,json.slice),!!json.structure)}}Step.jsonID("replace",ReplaceStep);class ReplaceAroundStep extends Step{constructor(from3,to,gapFrom,gapTo,slice3,insert,structure=false){super();this.from=from3;this.to=to;this.gapFrom=gapFrom;this.gapTo=gapTo;this.slice=slice3;this.insert=insert;this.structure=structure}apply(doc2){if(this.structure&&(contentBetween(doc2,this.from,this.gapFrom)||contentBetween(doc2,this.gapTo,this.to)))return StepResult.fail("Structure gap-replace would overwrite content");let gap=doc2.slice(this.gapFrom,this.gapTo);if(gap.openStart||gap.openEnd)return StepResult.fail("Gap is not a flat range");let inserted=this.slice.insertAt(this.insert,gap.content);if(!inserted)return StepResult.fail("Content does not fit in gap");return StepResult.fromReplace(doc2,this.from,this.to,inserted)}getMap(){return new StepMap([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(doc2){let gap=this.gapTo-this.gapFrom;return new ReplaceAroundStep(this.from,this.from+this.slice.size+gap,this.from+this.insert,this.from+this.insert+gap,doc2.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(mapping){let from3=mapping.mapResult(this.from,1),to=mapping.mapResult(this.to,-1);let gapFrom=this.from==this.gapFrom?from3.pos:mapping.map(this.gapFrom,-1);let gapTo=this.to==this.gapTo?to.pos:mapping.map(this.gapTo,1);if(from3.deletedAcross&&to.deletedAcross||gapFrom<from3.pos||gapTo>to.pos)return null;return new ReplaceAroundStep(from3.pos,to.pos,gapFrom,gapTo,this.slice,this.insert,this.structure)}toJSON(){let json={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};if(this.slice.size)json.slice=this.slice.toJSON();if(this.structure)json.structure=true;return json}static fromJSON(schema,json){if(typeof json.from!="number"||typeof json.to!="number"||typeof json.gapFrom!="number"||typeof json.gapTo!="number"||typeof json.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ReplaceAroundStep(json.from,json.to,json.gapFrom,json.gapTo,Slice.fromJSON(schema,json.slice),json.insert,!!json.structure)}}Step.jsonID("replaceAround",ReplaceAroundStep);function contentBetween(doc2,from3,to){let $from=doc2.resolve(from3),dist=to-from3,depth=$from.depth;while(dist>0&&depth>0&&$from.indexAfter(depth)==$from.node(depth).childCount){depth--;dist--}if(dist>0){let next2=$from.node(depth).maybeChild($from.indexAfter(depth));while(dist>0){if(!next2||next2.isLeaf)return true;next2=next2.firstChild;dist--}}return false}function addMark(tr2,from3,to,mark){let removed=[],added=[];let removing,adding;tr2.doc.nodesBetween(from3,to,((node2,pos,parent)=>{if(!node2.isInline)return;let marks=node2.marks;if(!mark.isInSet(marks)&&parent.type.allowsMarkType(mark.type)){let start=Math.max(pos,from3),end=Math.min(pos+node2.nodeSize,to);let newSet=mark.addToSet(marks);for(let i=0;i<marks.length;i++){if(!marks[i].isInSet(newSet)){if(removing&&removing.to==start&&removing.mark.eq(marks[i]))removing.to=end;else removed.push(removing=new RemoveMarkStep(start,end,marks[i]))}}if(adding&&adding.to==start)adding.to=end;else added.push(adding=new AddMarkStep(start,end,mark))}}));removed.forEach((s=>tr2.step(s)));added.forEach((s=>tr2.step(s)))}function removeMark(tr2,from3,to,mark){let matched=[],step=0;tr2.doc.nodesBetween(from3,to,((node2,pos)=>{if(!node2.isInline)return;step++;let toRemove=null;if(mark instanceof MarkType){let set=node2.marks,found2;while(found2=mark.isInSet(set)){(toRemove||(toRemove=[])).push(found2);set=found2.removeFromSet(set)}}else if(mark){if(mark.isInSet(node2.marks))toRemove=[mark]}else{toRemove=node2.marks}if(toRemove&&toRemove.length){let end=Math.min(pos+node2.nodeSize,to);for(let i=0;i<toRemove.length;i++){let style2=toRemove[i],found2;for(let j=0;j<matched.length;j++){let m=matched[j];if(m.step==step-1&&style2.eq(matched[j].style))found2=m}if(found2){found2.to=end;found2.step=step}else{matched.push({style:style2,from:Math.max(pos,from3),to:end,step:step})}}}}));matched.forEach((m=>tr2.step(new RemoveMarkStep(m.from,m.to,m.style))))}function clearIncompatible(tr2,pos,parentType,match2=parentType.contentMatch,clearNewlines=true){let node2=tr2.doc.nodeAt(pos);let replSteps=[],cur=pos+1;for(let i=0;i<node2.childCount;i++){let child=node2.child(i),end=cur+child.nodeSize;let allowed=match2.matchType(child.type);if(!allowed){replSteps.push(new ReplaceStep(cur,end,Slice.empty))}else{match2=allowed;for(let j=0;j<child.marks.length;j++)if(!parentType.allowsMarkType(child.marks[j].type))tr2.step(new RemoveMarkStep(cur,end,child.marks[j]));if(clearNewlines&&child.isText&&parentType.whitespace!="pre"){let m,newline=/\r?\n|\r/g,slice3;while(m=newline.exec(child.text)){if(!slice3)slice3=new Slice(Fragment.from(parentType.schema.text(" ",parentType.allowedMarks(child.marks))),0,0);replSteps.push(new ReplaceStep(cur+m.index,cur+m.index+m[0].length,slice3))}}}cur=end}if(!match2.validEnd){let fill=match2.fillBefore(Fragment.empty,true);tr2.replace(cur,cur,new Slice(fill,0,0))}for(let i=replSteps.length-1;i>=0;i--)tr2.step(replSteps[i])}function canCut(node2,start,end){return(start==0||node2.canReplace(start,node2.childCount))&&(end==node2.childCount||node2.canReplace(0,end))}function liftTarget(range){let parent=range.parent;let content=parent.content.cutByIndex(range.startIndex,range.endIndex);for(let depth=range.depth;;--depth){let node2=range.$from.node(depth);let index2=range.$from.index(depth),endIndex=range.$to.indexAfter(depth);if(depth<range.depth&&node2.canReplace(index2,endIndex,content))return depth;if(depth==0||node2.type.spec.isolating||!canCut(node2,index2,endIndex))break}return null}function lift$2(tr2,range,target){let{$from:$from,$to:$to,depth:depth}=range;let gapStart=$from.before(depth+1),gapEnd=$to.after(depth+1);let start=gapStart,end=gapEnd;let before=Fragment.empty,openStart=0;for(let d=depth,splitting=false;d>target;d--)if(splitting||$from.index(d)>0){splitting=true;before=Fragment.from($from.node(d).copy(before));openStart++}else{start--}let after=Fragment.empty,openEnd=0;for(let d=depth,splitting=false;d>target;d--)if(splitting||$to.after(d+1)<$to.end(d)){splitting=true;after=Fragment.from($to.node(d).copy(after));openEnd++}else{end++}tr2.step(new ReplaceAroundStep(start,end,gapStart,gapEnd,new Slice(before.append(after),openStart,openEnd),before.size-openStart,true))}function findWrapping(range,nodeType,attrs=null,innerRange=range){let around=findWrappingOutside(range,nodeType);let inner=around&&findWrappingInside(innerRange,nodeType);if(!inner)return null;return around.map(withAttrs).concat({type:nodeType,attrs:attrs}).concat(inner.map(withAttrs))}function withAttrs(type){return{type:type,attrs:null}}function findWrappingOutside(range,type){let{parent:parent,startIndex:startIndex,endIndex:endIndex}=range;let around=parent.contentMatchAt(startIndex).findWrapping(type);if(!around)return null;let outer=around.length?around[0]:type;return parent.canReplaceWith(startIndex,endIndex,outer)?around:null}function findWrappingInside(range,type){let{parent:parent,startIndex:startIndex,endIndex:endIndex}=range;let inner=parent.child(startIndex);let inside=type.contentMatch.findWrapping(inner.type);if(!inside)return null;let lastType=inside.length?inside[inside.length-1]:type;let innerMatch=lastType.contentMatch;for(let i=startIndex;innerMatch&&i<endIndex;i++)innerMatch=innerMatch.matchType(parent.child(i).type);if(!innerMatch||!innerMatch.validEnd)return null;return inside}function wrap(tr2,range,wrappers){let content=Fragment.empty;for(let i=wrappers.length-1;i>=0;i--){if(content.size){let match2=wrappers[i].type.contentMatch.matchFragment(content);if(!match2||!match2.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}content=Fragment.from(wrappers[i].type.create(wrappers[i].attrs,content))}let start=range.start,end=range.end;tr2.step(new ReplaceAroundStep(start,end,start,end,new Slice(content,0,0),wrappers.length,true))}function setBlockType$1(tr2,from3,to,type,attrs){if(!type.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let mapFrom=tr2.steps.length;tr2.doc.nodesBetween(from3,to,((node2,pos)=>{let attrsHere=typeof attrs=="function"?attrs(node2):attrs;if(node2.isTextblock&&!node2.hasMarkup(type,attrsHere)&&canChangeType(tr2.doc,tr2.mapping.slice(mapFrom).map(pos),type)){let convertNewlines=null;if(type.schema.linebreakReplacement){let pre=type.whitespace=="pre",supportLinebreak=!!type.contentMatch.matchType(type.schema.linebreakReplacement);if(pre&&!supportLinebreak)convertNewlines=false;else if(!pre&&supportLinebreak)convertNewlines=true}if(convertNewlines===false)replaceLinebreaks(tr2,node2,pos,mapFrom);clearIncompatible(tr2,tr2.mapping.slice(mapFrom).map(pos,1),type,void 0,convertNewlines===null);let mapping=tr2.mapping.slice(mapFrom);let startM=mapping.map(pos,1),endM=mapping.map(pos+node2.nodeSize,1);tr2.step(new ReplaceAroundStep(startM,endM,startM+1,endM-1,new Slice(Fragment.from(type.create(attrsHere,null,node2.marks)),0,0),1,true));if(convertNewlines===true)replaceNewlines(tr2,node2,pos,mapFrom);return false}}))}function replaceNewlines(tr2,node2,pos,mapFrom){node2.forEach(((child,offset2)=>{if(child.isText){let m,newline=/\r?\n|\r/g;while(m=newline.exec(child.text)){let start=tr2.mapping.slice(mapFrom).map(pos+1+offset2+m.index);tr2.replaceWith(start,start+1,node2.type.schema.linebreakReplacement.create())}}}))}function replaceLinebreaks(tr2,node2,pos,mapFrom){node2.forEach(((child,offset2)=>{if(child.type==child.type.schema.linebreakReplacement){let start=tr2.mapping.slice(mapFrom).map(pos+1+offset2);tr2.replaceWith(start,start+1,node2.type.schema.text("\n"))}}))}function canChangeType(doc2,pos,type){let $pos=doc2.resolve(pos),index2=$pos.index();return $pos.parent.canReplaceWith(index2,index2+1,type)}function setNodeMarkup(tr2,pos,type,attrs,marks){let node2=tr2.doc.nodeAt(pos);if(!node2)throw new RangeError("No node at given position");if(!type)type=node2.type;let newNode=type.create(attrs,null,marks||node2.marks);if(node2.isLeaf)return tr2.replaceWith(pos,pos+node2.nodeSize,newNode);if(!type.validContent(node2.content))throw new RangeError("Invalid content for node type "+type.name);tr2.step(new ReplaceAroundStep(pos,pos+node2.nodeSize,pos+1,pos+node2.nodeSize-1,new Slice(Fragment.from(newNode),0,0),1,true))}function canSplit(doc2,pos,depth=1,typesAfter){let $pos=doc2.resolve(pos),base2=$pos.depth-depth;let innerType=typesAfter&&typesAfter[typesAfter.length-1]||$pos.parent;if(base2<0||$pos.parent.type.spec.isolating||!$pos.parent.canReplace($pos.index(),$pos.parent.childCount)||!innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(),$pos.parent.childCount)))return false;for(let d=$pos.depth-1,i=depth-2;d>base2;d--,i--){let node2=$pos.node(d),index3=$pos.index(d);if(node2.type.spec.isolating)return false;let rest=node2.content.cutByIndex(index3,node2.childCount);let overrideChild=typesAfter&&typesAfter[i+1];if(overrideChild)rest=rest.replaceChild(0,overrideChild.type.create(overrideChild.attrs));let after=typesAfter&&typesAfter[i]||node2;if(!node2.canReplace(index3+1,node2.childCount)||!after.type.validContent(rest))return false}let index2=$pos.indexAfter(base2);let baseType=typesAfter&&typesAfter[0];return $pos.node(base2).canReplaceWith(index2,index2,baseType?baseType.type:$pos.node(base2+1).type)}function split(tr2,pos,depth=1,typesAfter){let $pos=tr2.doc.resolve(pos),before=Fragment.empty,after=Fragment.empty;for(let d=$pos.depth,e=$pos.depth-depth,i=depth-1;d>e;d--,i--){before=Fragment.from($pos.node(d).copy(before));let typeAfter=typesAfter&&typesAfter[i];after=Fragment.from(typeAfter?typeAfter.type.create(typeAfter.attrs,after):$pos.node(d).copy(after))}tr2.step(new ReplaceStep(pos,pos,new Slice(before.append(after),depth,depth),true))}function canJoin(doc2,pos){let $pos=doc2.resolve(pos),index2=$pos.index();return joinable($pos.nodeBefore,$pos.nodeAfter)&&$pos.parent.canReplace(index2,index2+1)}function canAppendWithSubstitutedLinebreaks(a,b){if(!b.content.size)a.type.compatibleContent(b.type);let match2=a.contentMatchAt(a.childCount);let{linebreakReplacement:linebreakReplacement}=a.type.schema;for(let i=0;i<b.childCount;i++){let child=b.child(i);let type=child.type==linebreakReplacement?a.type.schema.nodes.text:child.type;match2=match2.matchType(type);if(!match2)return false;if(!a.type.allowsMarks(child.marks))return false}return match2.validEnd}function joinable(a,b){return!!(a&&b&&!a.isLeaf&&canAppendWithSubstitutedLinebreaks(a,b))}function joinPoint(doc2,pos,dir=-1){let $pos=doc2.resolve(pos);for(let d=$pos.depth;;d--){let before,after,index2=$pos.index(d);if(d==$pos.depth){before=$pos.nodeBefore;after=$pos.nodeAfter}else if(dir>0){before=$pos.node(d+1);index2++;after=$pos.node(d).maybeChild(index2)}else{before=$pos.node(d).maybeChild(index2-1);after=$pos.node(d+1)}if(before&&!before.isTextblock&&joinable(before,after)&&$pos.node(d).canReplace(index2,index2+1))return pos;if(d==0)break;pos=dir<0?$pos.before(d):$pos.after(d)}}function join(tr2,pos,depth){let convertNewlines=null;let{linebreakReplacement:linebreakReplacement}=tr2.doc.type.schema;let $before=tr2.doc.resolve(pos-depth),beforeType=$before.node().type;if(linebreakReplacement&&beforeType.inlineContent){let pre=beforeType.whitespace=="pre";let supportLinebreak=!!beforeType.contentMatch.matchType(linebreakReplacement);if(pre&&!supportLinebreak)convertNewlines=false;else if(!pre&&supportLinebreak)convertNewlines=true}let mapFrom=tr2.steps.length;if(convertNewlines===false){let $after=tr2.doc.resolve(pos+depth);replaceLinebreaks(tr2,$after.node(),$after.before(),mapFrom)}if(beforeType.inlineContent)clearIncompatible(tr2,pos+depth-1,beforeType,$before.node().contentMatchAt($before.index()),convertNewlines==null);let mapping=tr2.mapping.slice(mapFrom),start=mapping.map(pos-depth);tr2.step(new ReplaceStep(start,mapping.map(pos+depth,-1),Slice.empty,true));if(convertNewlines===true){let $full=tr2.doc.resolve(start);replaceNewlines(tr2,$full.node(),$full.before(),tr2.steps.length)}return tr2}function insertPoint(doc2,pos,nodeType){let $pos=doc2.resolve(pos);if($pos.parent.canReplaceWith($pos.index(),$pos.index(),nodeType))return pos;if($pos.parentOffset==0)for(let d=$pos.depth-1;d>=0;d--){let index2=$pos.index(d);if($pos.node(d).canReplaceWith(index2,index2,nodeType))return $pos.before(d+1);if(index2>0)return null}if($pos.parentOffset==$pos.parent.content.size)for(let d=$pos.depth-1;d>=0;d--){let index2=$pos.indexAfter(d);if($pos.node(d).canReplaceWith(index2,index2,nodeType))return $pos.after(d+1);if(index2<$pos.node(d).childCount)return null}return null}function dropPoint(doc2,pos,slice3){let $pos=doc2.resolve(pos);if(!slice3.content.size)return pos;let content=slice3.content;for(let i=0;i<slice3.openStart;i++)content=content.firstChild.content;for(let pass=1;pass<=(slice3.openStart==0&&slice3.size?2:1);pass++){for(let d=$pos.depth;d>=0;d--){let bias=d==$pos.depth?0:$pos.pos<=($pos.start(d+1)+$pos.end(d+1))/2?-1:1;let insertPos=$pos.index(d)+(bias>0?1:0);let parent=$pos.node(d),fits=false;if(pass==1){fits=parent.canReplace(insertPos,insertPos,content)}else{let wrapping=parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);fits=wrapping&&parent.canReplaceWith(insertPos,insertPos,wrapping[0])}if(fits)return bias==0?$pos.pos:bias<0?$pos.before(d+1):$pos.after(d+1)}}return null}function replaceStep(doc2,from3,to=from3,slice3=Slice.empty){if(from3==to&&!slice3.size)return null;let $from=doc2.resolve(from3),$to=doc2.resolve(to);if(fitsTrivially($from,$to,slice3))return new ReplaceStep(from3,to,slice3);return new Fitter($from,$to,slice3).fit()}function fitsTrivially($from,$to,slice3){return!slice3.openStart&&!slice3.openEnd&&$from.start()==$to.start()&&$from.parent.canReplace($from.index(),$to.index(),slice3.content)}class Fitter{constructor($from,$to,unplaced){this.$from=$from;this.$to=$to;this.unplaced=unplaced;this.frontier=[];this.placed=Fragment.empty;for(let i=0;i<=$from.depth;i++){let node2=$from.node(i);this.frontier.push({type:node2.type,match:node2.contentMatchAt($from.indexAfter(i))})}for(let i=$from.depth;i>0;i--)this.placed=Fragment.from($from.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){while(this.unplaced.size){let fit=this.findFittable();if(fit)this.placeNodes(fit);else this.openMore()||this.dropNode()}let moveInline=this.mustMoveInline(),placedSize=this.placed.size-this.depth-this.$from.depth;let $from=this.$from,$to=this.close(moveInline<0?this.$to:$from.doc.resolve(moveInline));if(!$to)return null;let content=this.placed,openStart=$from.depth,openEnd=$to.depth;while(openStart&&openEnd&&content.childCount==1){content=content.firstChild.content;openStart--;openEnd--}let slice3=new Slice(content,openStart,openEnd);if(moveInline>-1)return new ReplaceAroundStep($from.pos,moveInline,this.$to.pos,this.$to.end(),slice3,placedSize);if(slice3.size||$from.pos!=this.$to.pos)return new ReplaceStep($from.pos,$to.pos,slice3);return null}findFittable(){let startDepth=this.unplaced.openStart;for(let cur=this.unplaced.content,d=0,openEnd=this.unplaced.openEnd;d<startDepth;d++){let node2=cur.firstChild;if(cur.childCount>1)openEnd=0;if(node2.type.spec.isolating&&openEnd<=d){startDepth=d;break}cur=node2.content}for(let pass=1;pass<=2;pass++){for(let sliceDepth=pass==1?startDepth:this.unplaced.openStart;sliceDepth>=0;sliceDepth--){let fragment,parent=null;if(sliceDepth){parent=contentAt(this.unplaced.content,sliceDepth-1).firstChild;fragment=parent.content}else{fragment=this.unplaced.content}let first2=fragment.firstChild;for(let frontierDepth=this.depth;frontierDepth>=0;frontierDepth--){let{type:type,match:match2}=this.frontier[frontierDepth],wrap2,inject=null;if(pass==1&&(first2?match2.matchType(first2.type)||(inject=match2.fillBefore(Fragment.from(first2),false)):parent&&type.compatibleContent(parent.type)))return{sliceDepth:sliceDepth,frontierDepth:frontierDepth,parent:parent,inject:inject};else if(pass==2&&first2&&(wrap2=match2.findWrapping(first2.type)))return{sliceDepth:sliceDepth,frontierDepth:frontierDepth,parent:parent,wrap:wrap2};if(parent&&match2.matchType(parent.type))break}}}}openMore(){let{content:content,openStart:openStart,openEnd:openEnd}=this.unplaced;let inner=contentAt(content,openStart);if(!inner.childCount||inner.firstChild.isLeaf)return false;this.unplaced=new Slice(content,openStart+1,Math.max(openEnd,inner.size+openStart>=content.size-openEnd?openStart+1:0));return true}dropNode(){let{content:content,openStart:openStart,openEnd:openEnd}=this.unplaced;let inner=contentAt(content,openStart);if(inner.childCount<=1&&openStart>0){let openAtEnd=content.size-openStart<=openStart+inner.size;this.unplaced=new Slice(dropFromFragment(content,openStart-1,1),openStart-1,openAtEnd?openStart-1:openEnd)}else{this.unplaced=new Slice(dropFromFragment(content,openStart,1),openStart,openEnd)}}placeNodes({sliceDepth:sliceDepth,frontierDepth:frontierDepth,parent:parent,inject:inject,wrap:wrap2}){while(this.depth>frontierDepth)this.closeFrontierNode();if(wrap2)for(let i=0;i<wrap2.length;i++)this.openFrontierNode(wrap2[i]);let slice3=this.unplaced,fragment=parent?parent.content:slice3.content;let openStart=slice3.openStart-sliceDepth;let taken=0,add=[];let{match:match2,type:type}=this.frontier[frontierDepth];if(inject){for(let i=0;i<inject.childCount;i++)add.push(inject.child(i));match2=match2.matchFragment(inject)}let openEndCount=fragment.size+sliceDepth-(slice3.content.size-slice3.openEnd);while(taken<fragment.childCount){let next2=fragment.child(taken),matches2=match2.matchType(next2.type);if(!matches2)break;taken++;if(taken>1||openStart==0||next2.content.size){match2=matches2;add.push(closeNodeStart(next2.mark(type.allowedMarks(next2.marks)),taken==1?openStart:0,taken==fragment.childCount?openEndCount:-1))}}let toEnd=taken==fragment.childCount;if(!toEnd)openEndCount=-1;this.placed=addToFragment(this.placed,frontierDepth,Fragment.from(add));this.frontier[frontierDepth].match=match2;if(toEnd&&openEndCount<0&&parent&&parent.type==this.frontier[this.depth].type&&this.frontier.length>1)this.closeFrontierNode();for(let i=0,cur=fragment;i<openEndCount;i++){let node2=cur.lastChild;this.frontier.push({type:node2.type,match:node2.contentMatchAt(node2.childCount)});cur=node2.content}this.unplaced=!toEnd?new Slice(dropFromFragment(slice3.content,sliceDepth,taken),slice3.openStart,slice3.openEnd):sliceDepth==0?Slice.empty:new Slice(dropFromFragment(slice3.content,sliceDepth-1,1),sliceDepth-1,openEndCount<0?slice3.openEnd:sliceDepth-1)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let top=this.frontier[this.depth],level;if(!top.type.isTextblock||!contentAfterFits(this.$to,this.$to.depth,top.type,top.match,false)||this.$to.depth==this.depth&&(level=this.findCloseLevel(this.$to))&&level.depth==this.depth)return-1;let{depth:depth}=this.$to,after=this.$to.after(depth);while(depth>1&&after==this.$to.end(--depth))++after;return after}findCloseLevel($to){scan:for(let i=Math.min(this.depth,$to.depth);i>=0;i--){let{match:match2,type:type}=this.frontier[i];let dropInner=i<$to.depth&&$to.end(i+1)==$to.pos+($to.depth-(i+1));let fit=contentAfterFits($to,i,type,match2,dropInner);if(!fit)continue;for(let d=i-1;d>=0;d--){let{match:match3,type:type2}=this.frontier[d];let matches2=contentAfterFits($to,d,type2,match3,true);if(!matches2||matches2.childCount)continue scan}return{depth:i,fit:fit,move:dropInner?$to.doc.resolve($to.after(i+1)):$to}}}close($to){let close2=this.findCloseLevel($to);if(!close2)return null;while(this.depth>close2.depth)this.closeFrontierNode();if(close2.fit.childCount)this.placed=addToFragment(this.placed,close2.depth,close2.fit);$to=close2.move;for(let d=close2.depth+1;d<=$to.depth;d++){let node2=$to.node(d),add=node2.type.contentMatch.fillBefore(node2.content,true,$to.index(d));this.openFrontierNode(node2.type,node2.attrs,add)}return $to}openFrontierNode(type,attrs=null,content){let top=this.frontier[this.depth];top.match=top.match.matchType(type);this.placed=addToFragment(this.placed,this.depth,Fragment.from(type.create(attrs,content)));this.frontier.push({type:type,match:type.contentMatch})}closeFrontierNode(){let open=this.frontier.pop();let add=open.match.fillBefore(Fragment.empty,true);if(add.childCount)this.placed=addToFragment(this.placed,this.frontier.length,add)}}function dropFromFragment(fragment,depth,count2){if(depth==0)return fragment.cutByIndex(count2,fragment.childCount);return fragment.replaceChild(0,fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content,depth-1,count2)))}function addToFragment(fragment,depth,content){if(depth==0)return fragment.append(content);return fragment.replaceChild(fragment.childCount-1,fragment.lastChild.copy(addToFragment(fragment.lastChild.content,depth-1,content)))}function contentAt(fragment,depth){for(let i=0;i<depth;i++)fragment=fragment.firstChild.content;return fragment}function closeNodeStart(node2,openStart,openEnd){if(openStart<=0)return node2;let frag=node2.content;if(openStart>1)frag=frag.replaceChild(0,closeNodeStart(frag.firstChild,openStart-1,frag.childCount==1?openEnd-1:0));if(openStart>0){frag=node2.type.contentMatch.fillBefore(frag).append(frag);if(openEnd<=0)frag=frag.append(node2.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty,true))}return node2.copy(frag)}function contentAfterFits($to,depth,type,match2,open){let node2=$to.node(depth),index2=open?$to.indexAfter(depth):$to.index(depth);if(index2==node2.childCount&&!type.compatibleContent(node2.type))return null;let fit=match2.fillBefore(node2.content,true,index2);return fit&&!invalidMarks(type,node2.content,index2)?fit:null}function invalidMarks(type,fragment,start){for(let i=start;i<fragment.childCount;i++)if(!type.allowsMarks(fragment.child(i).marks))return true;return false}function definesContent(type){return type.spec.defining||type.spec.definingForContent}function replaceRange(tr2,from3,to,slice3){if(!slice3.size)return tr2.deleteRange(from3,to);let $from=tr2.doc.resolve(from3),$to=tr2.doc.resolve(to);if(fitsTrivially($from,$to,slice3))return tr2.step(new ReplaceStep(from3,to,slice3));let targetDepths=coveredDepths($from,tr2.doc.resolve(to));if(targetDepths[targetDepths.length-1]==0)targetDepths.pop();let preferredTarget=-($from.depth+1);targetDepths.unshift(preferredTarget);for(let d=$from.depth,pos=$from.pos-1;d>0;d--,pos--){let spec=$from.node(d).type.spec;if(spec.defining||spec.definingAsContext||spec.isolating)break;if(targetDepths.indexOf(d)>-1)preferredTarget=d;else if($from.before(d)==pos)targetDepths.splice(1,0,-d)}let preferredTargetIndex=targetDepths.indexOf(preferredTarget);let leftNodes=[],preferredDepth=slice3.openStart;for(let content=slice3.content,i=0;;i++){let node2=content.firstChild;leftNodes.push(node2);if(i==slice3.openStart)break;content=node2.content}for(let d=preferredDepth-1;d>=0;d--){let leftNode=leftNodes[d],def=definesContent(leftNode.type);if(def&&!leftNode.sameMarkup($from.node(Math.abs(preferredTarget)-1)))preferredDepth=d;else if(def||!leftNode.type.isTextblock)break}for(let j=slice3.openStart;j>=0;j--){let openDepth=(j+preferredDepth+1)%(slice3.openStart+1);let insert=leftNodes[openDepth];if(!insert)continue;for(let i=0;i<targetDepths.length;i++){let targetDepth=targetDepths[(i+preferredTargetIndex)%targetDepths.length],expand=true;if(targetDepth<0){expand=false;targetDepth=-targetDepth}let parent=$from.node(targetDepth-1),index2=$from.index(targetDepth-1);if(parent.canReplaceWith(index2,index2,insert.type,insert.marks))return tr2.replace($from.before(targetDepth),expand?$to.after(targetDepth):to,new Slice(closeFragment(slice3.content,0,slice3.openStart,openDepth),openDepth,slice3.openEnd))}}let startSteps=tr2.steps.length;for(let i=targetDepths.length-1;i>=0;i--){tr2.replace(from3,to,slice3);if(tr2.steps.length>startSteps)break;let depth=targetDepths[i];if(depth<0)continue;from3=$from.before(depth);to=$to.after(depth)}}function closeFragment(fragment,depth,oldOpen,newOpen,parent){if(depth<oldOpen){let first2=fragment.firstChild;fragment=fragment.replaceChild(0,first2.copy(closeFragment(first2.content,depth+1,oldOpen,newOpen,first2)))}if(depth>newOpen){let match2=parent.contentMatchAt(0);let start=match2.fillBefore(fragment).append(fragment);fragment=start.append(match2.matchFragment(start).fillBefore(Fragment.empty,true))}return fragment}function replaceRangeWith(tr2,from3,to,node2){if(!node2.isInline&&from3==to&&tr2.doc.resolve(from3).parent.content.size){let point=insertPoint(tr2.doc,from3,node2.type);if(point!=null)from3=to=point}tr2.replaceRange(from3,to,new Slice(Fragment.from(node2),0,0))}function deleteRange$1(tr2,from3,to){let $from=tr2.doc.resolve(from3),$to=tr2.doc.resolve(to);let covered=coveredDepths($from,$to);for(let i=0;i<covered.length;i++){let depth=covered[i],last=i==covered.length-1;if(last&&depth==0||$from.node(depth).type.contentMatch.validEnd)return tr2.delete($from.start(depth),$to.end(depth));if(depth>0&&(last||$from.node(depth-1).canReplace($from.index(depth-1),$to.indexAfter(depth-1))))return tr2.delete($from.before(depth),$to.after(depth))}for(let d=1;d<=$from.depth&&d<=$to.depth;d++){if(from3-$from.start(d)==$from.depth-d&&to>$from.end(d)&&$to.end(d)-to!=$to.depth-d&&$from.start(d-1)==$to.start(d-1)&&$from.node(d-1).canReplace($from.index(d-1),$to.index(d-1)))return tr2.delete($from.before(d),to)}tr2.delete(from3,to)}function coveredDepths($from,$to){let result=[],minDepth=Math.min($from.depth,$to.depth);for(let d=minDepth;d>=0;d--){let start=$from.start(d);if(start<$from.pos-($from.depth-d)||$to.end(d)>$to.pos+($to.depth-d)||$from.node(d).type.spec.isolating||$to.node(d).type.spec.isolating)break;if(start==$to.start(d)||d==$from.depth&&d==$to.depth&&$from.parent.inlineContent&&$to.parent.inlineContent&&d&&$to.start(d-1)==start-1)result.push(d)}return result}class AttrStep extends Step{constructor(pos,attr,value){super();this.pos=pos;this.attr=attr;this.value=value}apply(doc2){let node2=doc2.nodeAt(this.pos);if(!node2)return StepResult.fail("No node at attribute step's position");let attrs=Object.create(null);for(let name in node2.attrs)attrs[name]=node2.attrs[name];attrs[this.attr]=this.value;let updated=node2.type.create(attrs,null,node2.marks);return StepResult.fromReplace(doc2,this.pos,this.pos+1,new Slice(Fragment.from(updated),0,node2.isLeaf?0:1))}getMap(){return StepMap.empty}invert(doc2){return new AttrStep(this.pos,this.attr,doc2.nodeAt(this.pos).attrs[this.attr])}map(mapping){let pos=mapping.mapResult(this.pos,1);return pos.deletedAfter?null:new AttrStep(pos.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(schema,json){if(typeof json.pos!="number"||typeof json.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new AttrStep(json.pos,json.attr,json.value)}}Step.jsonID("attr",AttrStep);class DocAttrStep extends Step{constructor(attr,value){super();this.attr=attr;this.value=value}apply(doc2){let attrs=Object.create(null);for(let name in doc2.attrs)attrs[name]=doc2.attrs[name];attrs[this.attr]=this.value;let updated=doc2.type.create(attrs,doc2.content,doc2.marks);return StepResult.ok(updated)}getMap(){return StepMap.empty}invert(doc2){return new DocAttrStep(this.attr,doc2.attrs[this.attr])}map(mapping){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(schema,json){if(typeof json.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new DocAttrStep(json.attr,json.value)}}Step.jsonID("docAttr",DocAttrStep);let TransformError=class extends Error{};TransformError=function TransformError2(message){let err=Error.call(this,message);err.__proto__=TransformError2.prototype;return err};TransformError.prototype=Object.create(Error.prototype);TransformError.prototype.constructor=TransformError;TransformError.prototype.name="TransformError";class Transform{constructor(doc2){this.doc=doc2;this.steps=[];this.docs=[];this.mapping=new Mapping}get before(){return this.docs.length?this.docs[0]:this.doc}step(step){let result=this.maybeStep(step);if(result.failed)throw new TransformError(result.failed);return this}maybeStep(step){let result=step.apply(this.doc);if(!result.failed)this.addStep(step,result.doc);return result}get docChanged(){return this.steps.length>0}addStep(step,doc2){this.docs.push(this.doc);this.steps.push(step);this.mapping.appendMap(step.getMap());this.doc=doc2}replace(from3,to=from3,slice3=Slice.empty){let step=replaceStep(this.doc,from3,to,slice3);if(step)this.step(step);return this}replaceWith(from3,to,content){return this.replace(from3,to,new Slice(Fragment.from(content),0,0))}delete(from3,to){return this.replace(from3,to,Slice.empty)}insert(pos,content){return this.replaceWith(pos,pos,content)}replaceRange(from3,to,slice3){replaceRange(this,from3,to,slice3);return this}replaceRangeWith(from3,to,node2){replaceRangeWith(this,from3,to,node2);return this}deleteRange(from3,to){deleteRange$1(this,from3,to);return this}lift(range,target){lift$2(this,range,target);return this}join(pos,depth=1){join(this,pos,depth);return this}wrap(range,wrappers){wrap(this,range,wrappers);return this}setBlockType(from3,to=from3,type,attrs=null){setBlockType$1(this,from3,to,type,attrs);return this}setNodeMarkup(pos,type,attrs=null,marks){setNodeMarkup(this,pos,type,attrs,marks);return this}setNodeAttribute(pos,attr,value){this.step(new AttrStep(pos,attr,value));return this}setDocAttribute(attr,value){this.step(new DocAttrStep(attr,value));return this}addNodeMark(pos,mark){this.step(new AddNodeMarkStep(pos,mark));return this}removeNodeMark(pos,mark){if(!(mark instanceof Mark$1)){let node2=this.doc.nodeAt(pos);if(!node2)throw new RangeError("No node at position "+pos);mark=mark.isInSet(node2.marks);if(!mark)return this}this.step(new RemoveNodeMarkStep(pos,mark));return this}split(pos,depth=1,typesAfter){split(this,pos,depth,typesAfter);return this}addMark(from3,to,mark){addMark(this,from3,to,mark);return this}removeMark(from3,to,mark){removeMark(this,from3,to,mark);return this}clearIncompatible(pos,parentType,match2){clearIncompatible(this,pos,parentType,match2);return this}}const classesById=Object.create(null);class Selection{constructor($anchor,$head,ranges){this.$anchor=$anchor;this.$head=$head;this.ranges=ranges||[new SelectionRange($anchor.min($head),$anchor.max($head))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let ranges=this.ranges;for(let i=0;i<ranges.length;i++)if(ranges[i].$from.pos!=ranges[i].$to.pos)return false;return true}content(){return this.$from.doc.slice(this.from,this.to,true)}replace(tr2,content=Slice.empty){let lastNode=content.content.lastChild,lastParent=null;for(let i=0;i<content.openEnd;i++){lastParent=lastNode;lastNode=lastNode.lastChild}let mapFrom=tr2.steps.length,ranges=this.ranges;for(let i=0;i<ranges.length;i++){let{$from:$from,$to:$to}=ranges[i],mapping=tr2.mapping.slice(mapFrom);tr2.replaceRange(mapping.map($from.pos),mapping.map($to.pos),i?Slice.empty:content);if(i==0)selectionToInsertionEnd$1(tr2,mapFrom,(lastNode?lastNode.isInline:lastParent&&lastParent.isTextblock)?-1:1)}}replaceWith(tr2,node2){let mapFrom=tr2.steps.length,ranges=this.ranges;for(let i=0;i<ranges.length;i++){let{$from:$from,$to:$to}=ranges[i],mapping=tr2.mapping.slice(mapFrom);let from3=mapping.map($from.pos),to=mapping.map($to.pos);if(i){tr2.deleteRange(from3,to)}else{tr2.replaceRangeWith(from3,to,node2);selectionToInsertionEnd$1(tr2,mapFrom,node2.isInline?-1:1)}}}static findFrom($pos,dir,textOnly=false){let inner=$pos.parent.inlineContent?new TextSelection($pos):findSelectionIn($pos.node(0),$pos.parent,$pos.pos,$pos.index(),dir,textOnly);if(inner)return inner;for(let depth=$pos.depth-1;depth>=0;depth--){let found2=dir<0?findSelectionIn($pos.node(0),$pos.node(depth),$pos.before(depth+1),$pos.index(depth),dir,textOnly):findSelectionIn($pos.node(0),$pos.node(depth),$pos.after(depth+1),$pos.index(depth)+1,dir,textOnly);if(found2)return found2}return null}static near($pos,bias=1){return this.findFrom($pos,bias)||this.findFrom($pos,-bias)||new AllSelection($pos.node(0))}static atStart(doc2){return findSelectionIn(doc2,doc2,0,0,1)||new AllSelection(doc2)}static atEnd(doc2){return findSelectionIn(doc2,doc2,doc2.content.size,doc2.childCount,-1)||new AllSelection(doc2)}static fromJSON(doc2,json){if(!json||!json.type)throw new RangeError("Invalid input for Selection.fromJSON");let cls=classesById[json.type];if(!cls)throw new RangeError(`No selection type ${json.type} defined`);return cls.fromJSON(doc2,json)}static jsonID(id,selectionClass){if(id in classesById)throw new RangeError("Duplicate use of selection JSON ID "+id);classesById[id]=selectionClass;selectionClass.prototype.jsonID=id;return selectionClass}getBookmark(){return TextSelection.between(this.$anchor,this.$head).getBookmark()}}Selection.prototype.visible=true;class SelectionRange{constructor($from,$to){this.$from=$from;this.$to=$to}}let warnedAboutTextSelection=false;function checkTextSelection($pos){if(!warnedAboutTextSelection&&!$pos.parent.inlineContent){warnedAboutTextSelection=true;console["warn"]("TextSelection endpoint not pointing into a node with inline content ("+$pos.parent.type.name+")")}}class TextSelection extends Selection{constructor($anchor,$head=$anchor){checkTextSelection($anchor);checkTextSelection($head);super($anchor,$head)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(doc2,mapping){let $head=doc2.resolve(mapping.map(this.head));if(!$head.parent.inlineContent)return Selection.near($head);let $anchor=doc2.resolve(mapping.map(this.anchor));return new TextSelection($anchor.parent.inlineContent?$anchor:$head,$head)}replace(tr2,content=Slice.empty){super.replace(tr2,content);if(content==Slice.empty){let marks=this.$from.marksAcross(this.$to);if(marks)tr2.ensureMarks(marks)}}eq(other){return other instanceof TextSelection&&other.anchor==this.anchor&&other.head==this.head}getBookmark(){return new TextBookmark(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(doc2,json){if(typeof json.anchor!="number"||typeof json.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new TextSelection(doc2.resolve(json.anchor),doc2.resolve(json.head))}static create(doc2,anchor,head=anchor){let $anchor=doc2.resolve(anchor);return new this($anchor,head==anchor?$anchor:doc2.resolve(head))}static between($anchor,$head,bias){let dPos=$anchor.pos-$head.pos;if(!bias||dPos)bias=dPos>=0?1:-1;if(!$head.parent.inlineContent){let found2=Selection.findFrom($head,bias,true)||Selection.findFrom($head,-bias,true);if(found2)$head=found2.$head;else return Selection.near($head,bias)}if(!$anchor.parent.inlineContent){if(dPos==0){$anchor=$head}else{$anchor=(Selection.findFrom($anchor,-bias,true)||Selection.findFrom($anchor,bias,true)).$anchor;if($anchor.pos<$head.pos!=dPos<0)$anchor=$head}}return new TextSelection($anchor,$head)}}Selection.jsonID("text",TextSelection);class TextBookmark{constructor(anchor,head){this.anchor=anchor;this.head=head}map(mapping){return new TextBookmark(mapping.map(this.anchor),mapping.map(this.head))}resolve(doc2){return TextSelection.between(doc2.resolve(this.anchor),doc2.resolve(this.head))}}class NodeSelection extends Selection{constructor($pos){let node2=$pos.nodeAfter;let $end=$pos.node(0).resolve($pos.pos+node2.nodeSize);super($pos,$end);this.node=node2}map(doc2,mapping){let{deleted:deleted,pos:pos}=mapping.mapResult(this.anchor);let $pos=doc2.resolve(pos);if(deleted)return Selection.near($pos);return new NodeSelection($pos)}content(){return new Slice(Fragment.from(this.node),0,0)}eq(other){return other instanceof NodeSelection&&other.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new NodeBookmark(this.anchor)}static fromJSON(doc2,json){if(typeof json.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new NodeSelection(doc2.resolve(json.anchor))}static create(doc2,from3){return new NodeSelection(doc2.resolve(from3))}static isSelectable(node2){return!node2.isText&&node2.type.spec.selectable!==false}}NodeSelection.prototype.visible=false;Selection.jsonID("node",NodeSelection);class NodeBookmark{constructor(anchor){this.anchor=anchor}map(mapping){let{deleted:deleted,pos:pos}=mapping.mapResult(this.anchor);return deleted?new TextBookmark(pos,pos):new NodeBookmark(pos)}resolve(doc2){let $pos=doc2.resolve(this.anchor),node2=$pos.nodeAfter;if(node2&&NodeSelection.isSelectable(node2))return new NodeSelection($pos);return Selection.near($pos)}}class AllSelection extends Selection{constructor(doc2){super(doc2.resolve(0),doc2.resolve(doc2.content.size))}replace(tr2,content=Slice.empty){if(content==Slice.empty){tr2.delete(0,tr2.doc.content.size);let sel=Selection.atStart(tr2.doc);if(!sel.eq(tr2.selection))tr2.setSelection(sel)}else{super.replace(tr2,content)}}toJSON(){return{type:"all"}}static fromJSON(doc2){return new AllSelection(doc2)}map(doc2){return new AllSelection(doc2)}eq(other){return other instanceof AllSelection}getBookmark(){return AllBookmark}}Selection.jsonID("all",AllSelection);const AllBookmark={map(){return this},resolve(doc2){return new AllSelection(doc2)}};function findSelectionIn(doc2,node2,pos,index2,dir,text=false){if(node2.inlineContent)return TextSelection.create(doc2,pos);for(let i=index2-(dir>0?0:1);dir>0?i<node2.childCount:i>=0;i+=dir){let child=node2.child(i);if(!child.isAtom){let inner=findSelectionIn(doc2,child,pos+dir,dir<0?child.childCount:0,dir,text);if(inner)return inner}else if(!text&&NodeSelection.isSelectable(child)){return NodeSelection.create(doc2,pos-(dir<0?child.nodeSize:0))}pos+=child.nodeSize*dir}return null}function selectionToInsertionEnd$1(tr2,startLen,bias){let last=tr2.steps.length-1;if(last<startLen)return;let step=tr2.steps[last];if(!(step instanceof ReplaceStep||step instanceof ReplaceAroundStep))return;let map2=tr2.mapping.maps[last],end;map2.forEach(((_from,_to,_newFrom,newTo)=>{if(end==null)end=newTo}));tr2.setSelection(Selection.near(tr2.doc.resolve(end),bias))}const UPDATED_SEL=1,UPDATED_MARKS=2,UPDATED_SCROLL=4;class Transaction extends Transform{constructor(state){super(state.doc);this.curSelectionFor=0;this.updated=0;this.meta=Object.create(null);this.time=Date.now();this.curSelection=state.selection;this.storedMarks=state.storedMarks}get selection(){if(this.curSelectionFor<this.steps.length){this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor));this.curSelectionFor=this.steps.length}return this.curSelection}setSelection(selection){if(selection.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");this.curSelection=selection;this.curSelectionFor=this.steps.length;this.updated=(this.updated|UPDATED_SEL)&~UPDATED_MARKS;this.storedMarks=null;return this}get selectionSet(){return(this.updated&UPDATED_SEL)>0}setStoredMarks(marks){this.storedMarks=marks;this.updated|=UPDATED_MARKS;return this}ensureMarks(marks){if(!Mark$1.sameSet(this.storedMarks||this.selection.$from.marks(),marks))this.setStoredMarks(marks);return this}addStoredMark(mark){return this.ensureMarks(mark.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(mark){return this.ensureMarks(mark.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&UPDATED_MARKS)>0}addStep(step,doc2){super.addStep(step,doc2);this.updated=this.updated&~UPDATED_MARKS;this.storedMarks=null}setTime(time){this.time=time;return this}replaceSelection(slice3){this.selection.replace(this,slice3);return this}replaceSelectionWith(node2,inheritMarks=true){let selection=this.selection;if(inheritMarks)node2=node2.mark(this.storedMarks||(selection.empty?selection.$from.marks():selection.$from.marksAcross(selection.$to)||Mark$1.none));selection.replaceWith(this,node2);return this}deleteSelection(){this.selection.replace(this);return this}insertText(text,from3,to){let schema=this.doc.type.schema;if(from3==null){if(!text)return this.deleteSelection();return this.replaceSelectionWith(schema.text(text),true)}else{if(to==null)to=from3;to=to==null?from3:to;if(!text)return this.deleteRange(from3,to);let marks=this.storedMarks;if(!marks){let $from=this.doc.resolve(from3);marks=to==from3?$from.marks():$from.marksAcross(this.doc.resolve(to))}this.replaceRangeWith(from3,to,schema.text(text,marks));if(!this.selection.empty)this.setSelection(Selection.near(this.selection.$to));return this}}setMeta(key,value){this.meta[typeof key=="string"?key:key.key]=value;return this}getMeta(key){return this.meta[typeof key=="string"?key:key.key]}get isGeneric(){for(let _ in this.meta)return false;return true}scrollIntoView(){this.updated|=UPDATED_SCROLL;return this}get scrolledIntoView(){return(this.updated&UPDATED_SCROLL)>0}}function bind(f,self2){return!self2||!f?f:f.bind(self2)}class FieldDesc{constructor(name,desc,self2){this.name=name;this.init=bind(desc.init,self2);this.apply=bind(desc.apply,self2)}}const baseFields=[new FieldDesc("doc",{init(config){return config.doc||config.schema.topNodeType.createAndFill()},apply(tr2){return tr2.doc}}),new FieldDesc("selection",{init(config,instance){return config.selection||Selection.atStart(instance.doc)},apply(tr2){return tr2.selection}}),new FieldDesc("storedMarks",{init(config){return config.storedMarks||null},apply(tr2,_marks,_old,state){return state.selection.$cursor?tr2.storedMarks:null}}),new FieldDesc("scrollToSelection",{init(){return 0},apply(tr2,prev2){return tr2.scrolledIntoView?prev2+1:prev2}})];class Configuration{constructor(schema,plugins){this.schema=schema;this.plugins=[];this.pluginsByKey=Object.create(null);this.fields=baseFields.slice();if(plugins)plugins.forEach((plugin=>{if(this.pluginsByKey[plugin.key])throw new RangeError("Adding different instances of a keyed plugin ("+plugin.key+")");this.plugins.push(plugin);this.pluginsByKey[plugin.key]=plugin;if(plugin.spec.state)this.fields.push(new FieldDesc(plugin.key,plugin.spec.state,plugin))}))}}class EditorState{constructor(config){this.config=config}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(tr2){return this.applyTransaction(tr2).state}filterTransaction(tr2,ignore=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=ignore){let plugin=this.config.plugins[i];if(plugin.spec.filterTransaction&&!plugin.spec.filterTransaction.call(plugin,tr2,this))return false}return true}applyTransaction(rootTr){if(!this.filterTransaction(rootTr))return{state:this,transactions:[]};let trs=[rootTr],newState=this.applyInner(rootTr),seen=null;for(;;){let haveNew=false;for(let i=0;i<this.config.plugins.length;i++){let plugin=this.config.plugins[i];if(plugin.spec.appendTransaction){let n=seen?seen[i].n:0,oldState=seen?seen[i].state:this;let tr2=n<trs.length&&plugin.spec.appendTransaction.call(plugin,n?trs.slice(n):trs,oldState,newState);if(tr2&&newState.filterTransaction(tr2,i)){tr2.setMeta("appendedTransaction",rootTr);if(!seen){seen=[];for(let j=0;j<this.config.plugins.length;j++)seen.push(j<i?{state:newState,n:trs.length}:{state:this,n:0})}trs.push(tr2);newState=newState.applyInner(tr2);haveNew=true}if(seen)seen[i]={state:newState,n:trs.length}}}if(!haveNew)return{state:newState,transactions:trs}}}applyInner(tr2){if(!tr2.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let newInstance=new EditorState(this.config),fields=this.config.fields;for(let i=0;i<fields.length;i++){let field=fields[i];newInstance[field.name]=field.apply(tr2,this[field.name],this,newInstance)}return newInstance}get tr(){return new Transaction(this)}static create(config){let $config=new Configuration(config.doc?config.doc.type.schema:config.schema,config.plugins);let instance=new EditorState($config);for(let i=0;i<$config.fields.length;i++)instance[$config.fields[i].name]=$config.fields[i].init(config,instance);return instance}reconfigure(config){let $config=new Configuration(this.schema,config.plugins);let fields=$config.fields,instance=new EditorState($config);for(let i=0;i<fields.length;i++){let name=fields[i].name;instance[name]=this.hasOwnProperty(name)?this[name]:fields[i].init(config,instance)}return instance}toJSON(pluginFields){let result={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks)result.storedMarks=this.storedMarks.map((m=>m.toJSON()));if(pluginFields&&typeof pluginFields=="object")for(let prop in pluginFields){if(prop=="doc"||prop=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let plugin=pluginFields[prop],state=plugin.spec.state;if(state&&state.toJSON)result[prop]=state.toJSON.call(plugin,this[plugin.key])}return result}static fromJSON(config,json,pluginFields){if(!json)throw new RangeError("Invalid input for EditorState.fromJSON");if(!config.schema)throw new RangeError("Required config field 'schema' missing");let $config=new Configuration(config.schema,config.plugins);let instance=new EditorState($config);$config.fields.forEach((field=>{if(field.name=="doc"){instance.doc=Node$2.fromJSON(config.schema,json.doc)}else if(field.name=="selection"){instance.selection=Selection.fromJSON(instance.doc,json.selection)}else if(field.name=="storedMarks"){if(json.storedMarks)instance.storedMarks=json.storedMarks.map(config.schema.markFromJSON)}else{if(pluginFields)for(let prop in pluginFields){let plugin=pluginFields[prop],state=plugin.spec.state;if(plugin.key==field.name&&state&&state.fromJSON&&Object.prototype.hasOwnProperty.call(json,prop)){instance[field.name]=state.fromJSON.call(plugin,config,json[prop],instance);return}}instance[field.name]=field.init(config,instance)}}));return instance}}function bindProps(obj,self2,target){for(let prop in obj){let val=obj[prop];if(val instanceof Function)val=val.bind(self2);else if(prop=="handleDOMEvents")val=bindProps(val,self2,{});target[prop]=val}return target}class Plugin{constructor(spec){this.spec=spec;this.props={};if(spec.props)bindProps(spec.props,this,this.props);this.key=spec.key?spec.key.key:createKey("plugin")}getState(state){return state[this.key]}}const keys=Object.create(null);function createKey(name){if(name in keys)return name+"$"+ ++keys[name];keys[name]=0;return name+"$"}class PluginKey{constructor(name="key"){this.key=createKey(name)}get(state){return state.config.pluginsByKey[this.key]}getState(state){return state[this.key]}}const domIndex=function(node2){for(var index2=0;;index2++){node2=node2.previousSibling;if(!node2)return index2}};const parentNode=function(node2){let parent=node2.assignedSlot||node2.parentNode;return parent&&parent.nodeType==11?parent.host:parent};let reusedRange=null;const textRange=function(node2,from3,to){let range=reusedRange||(reusedRange=document.createRange());range.setEnd(node2,to==null?node2.nodeValue.length:to);range.setStart(node2,from3||0);return range};const clearReusedRange=function(){reusedRange=null};const isEquivalentPosition=function(node2,off,targetNode,targetOff){return targetNode&&(scanFor(node2,off,targetNode,targetOff,-1)||scanFor(node2,off,targetNode,targetOff,1))};const atomElements=/^(img|br|input|textarea|hr)$/i;function scanFor(node2,off,targetNode,targetOff,dir){for(;;){if(node2==targetNode&&off==targetOff)return true;if(off==(dir<0?0:nodeSize(node2))){let parent=node2.parentNode;if(!parent||parent.nodeType!=1||hasBlockDesc(node2)||atomElements.test(node2.nodeName)||node2.contentEditable=="false")return false;off=domIndex(node2)+(dir<0?0:1);node2=parent}else if(node2.nodeType==1){node2=node2.childNodes[off+(dir<0?-1:0)];if(node2.contentEditable=="false")return false;off=dir<0?nodeSize(node2):0}else{return false}}}function nodeSize(node2){return node2.nodeType==3?node2.nodeValue.length:node2.childNodes.length}function textNodeBefore$1(node2,offset2){for(;;){if(node2.nodeType==3&&offset2)return node2;if(node2.nodeType==1&&offset2>0){if(node2.contentEditable=="false")return null;node2=node2.childNodes[offset2-1];offset2=nodeSize(node2)}else if(node2.parentNode&&!hasBlockDesc(node2)){offset2=domIndex(node2);node2=node2.parentNode}else{return null}}}function textNodeAfter$1(node2,offset2){for(;;){if(node2.nodeType==3&&offset2<node2.nodeValue.length)return node2;if(node2.nodeType==1&&offset2<node2.childNodes.length){if(node2.contentEditable=="false")return null;node2=node2.childNodes[offset2];offset2=0}else if(node2.parentNode&&!hasBlockDesc(node2)){offset2=domIndex(node2)+1;node2=node2.parentNode}else{return null}}}function isOnEdge(node2,offset2,parent){for(let atStart=offset2==0,atEnd=offset2==nodeSize(node2);atStart||atEnd;){if(node2==parent)return true;let index2=domIndex(node2);node2=node2.parentNode;if(!node2)return false;atStart=atStart&&index2==0;atEnd=atEnd&&index2==nodeSize(node2)}}function hasBlockDesc(dom){let desc;for(let cur=dom;cur;cur=cur.parentNode)if(desc=cur.pmViewDesc)break;return desc&&desc.node&&desc.node.isBlock&&(desc.dom==dom||desc.contentDOM==dom)}const selectionCollapsed=function(domSel){return domSel.focusNode&&isEquivalentPosition(domSel.focusNode,domSel.focusOffset,domSel.anchorNode,domSel.anchorOffset)};function keyEvent(keyCode,key){let event2=document.createEvent("Event");event2.initEvent("keydown",true,true);event2.keyCode=keyCode;event2.key=event2.code=key;return event2}function deepActiveElement(doc2){let elt=doc2.activeElement;while(elt&&elt.shadowRoot)elt=elt.shadowRoot.activeElement;return elt}function caretFromPoint(doc2,x,y){if(doc2.caretPositionFromPoint){try{let pos=doc2.caretPositionFromPoint(x,y);if(pos)return{node:pos.offsetNode,offset:Math.min(nodeSize(pos.offsetNode),pos.offset)}}catch(_){}}if(doc2.caretRangeFromPoint){let range=doc2.caretRangeFromPoint(x,y);if(range)return{node:range.startContainer,offset:Math.min(nodeSize(range.startContainer),range.startOffset)}}}const nav=typeof navigator!="undefined"?navigator:null;const doc=typeof document!="undefined"?document:null;const agent=nav&&nav.userAgent||"";const ie_edge=/Edge\/(\d+)/.exec(agent);const ie_upto10=/MSIE \d/.exec(agent);const ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(agent);const ie$1=!!(ie_upto10||ie_11up||ie_edge);const ie_version=ie_upto10?document.documentMode:ie_11up?+ie_11up[1]:ie_edge?+ie_edge[1]:0;const gecko=!ie$1&&/gecko\/(\d+)/i.test(agent);gecko&&+(/Firefox\/(\d+)/.exec(agent)||[0,0])[1];const _chrome=!ie$1&&/Chrome\/(\d+)/.exec(agent);const chrome=!!_chrome;const chrome_version=_chrome?+_chrome[1]:0;const safari=!ie$1&&!!nav&&/Apple Computer/.test(nav.vendor);const ios=safari&&(/Mobile\/\w+/.test(agent)||!!nav&&nav.maxTouchPoints>2);const mac$2=ios||(nav?/Mac/.test(nav.platform):false);const windows=nav?/Win/.test(nav.platform):false;const android=/Android \d/.test(agent);const webkit=!!doc&&"webkitFontSmoothing"in doc.documentElement.style;const webkit_version=webkit?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function windowRect(doc2){let vp=doc2.defaultView&&doc2.defaultView.visualViewport;if(vp)return{left:0,right:vp.width,top:0,bottom:vp.height};return{left:0,right:doc2.documentElement.clientWidth,top:0,bottom:doc2.documentElement.clientHeight}}function getSide(value,side){return typeof value=="number"?value:value[side]}function clientRect(node2){let rect=node2.getBoundingClientRect();let scaleX=rect.width/node2.offsetWidth||1;let scaleY=rect.height/node2.offsetHeight||1;return{left:rect.left,right:rect.left+node2.clientWidth*scaleX,top:rect.top,bottom:rect.top+node2.clientHeight*scaleY}}function scrollRectIntoView(view,rect,startDOM){let scrollThreshold=view.someProp("scrollThreshold")||0,scrollMargin=view.someProp("scrollMargin")||5;let doc2=view.dom.ownerDocument;for(let parent=startDOM||view.dom;;){if(!parent)break;if(parent.nodeType!=1){parent=parentNode(parent);continue}let elt=parent;let atTop=elt==doc2.body;let bounding=atTop?windowRect(doc2):clientRect(elt);let moveX=0,moveY=0;if(rect.top<bounding.top+getSide(scrollThreshold,"top"))moveY=-(bounding.top-rect.top+getSide(scrollMargin,"top"));else if(rect.bottom>bounding.bottom-getSide(scrollThreshold,"bottom"))moveY=rect.bottom-rect.top>bounding.bottom-bounding.top?rect.top+getSide(scrollMargin,"top")-bounding.top:rect.bottom-bounding.bottom+getSide(scrollMargin,"bottom");if(rect.left<bounding.left+getSide(scrollThreshold,"left"))moveX=-(bounding.left-rect.left+getSide(scrollMargin,"left"));else if(rect.right>bounding.right-getSide(scrollThreshold,"right"))moveX=rect.right-bounding.right+getSide(scrollMargin,"right");if(moveX||moveY){if(atTop){doc2.defaultView.scrollBy(moveX,moveY)}else{let startX=elt.scrollLeft,startY=elt.scrollTop;if(moveY)elt.scrollTop+=moveY;if(moveX)elt.scrollLeft+=moveX;let dX=elt.scrollLeft-startX,dY=elt.scrollTop-startY;rect={left:rect.left-dX,top:rect.top-dY,right:rect.right-dX,bottom:rect.bottom-dY}}}let pos=atTop?"fixed":getComputedStyle(parent).position;if(/^(fixed|sticky)$/.test(pos))break;parent=pos=="absolute"?parent.offsetParent:parentNode(parent)}}function storeScrollPos(view){let rect=view.dom.getBoundingClientRect(),startY=Math.max(0,rect.top);let refDOM,refTop;for(let x=(rect.left+rect.right)/2,y=startY+1;y<Math.min(innerHeight,rect.bottom);y+=5){let dom=view.root.elementFromPoint(x,y);if(!dom||dom==view.dom||!view.dom.contains(dom))continue;let localRect=dom.getBoundingClientRect();if(localRect.top>=startY-20){refDOM=dom;refTop=localRect.top;break}}return{refDOM:refDOM,refTop:refTop,stack:scrollStack(view.dom)}}function scrollStack(dom){let stack=[],doc2=dom.ownerDocument;for(let cur=dom;cur;cur=parentNode(cur)){stack.push({dom:cur,top:cur.scrollTop,left:cur.scrollLeft});if(dom==doc2)break}return stack}function resetScrollPos({refDOM:refDOM,refTop:refTop,stack:stack}){let newRefTop=refDOM?refDOM.getBoundingClientRect().top:0;restoreScrollStack(stack,newRefTop==0?0:newRefTop-refTop)}function restoreScrollStack(stack,dTop){for(let i=0;i<stack.length;i++){let{dom:dom,top:top,left:left}=stack[i];if(dom.scrollTop!=top+dTop)dom.scrollTop=top+dTop;if(dom.scrollLeft!=left)dom.scrollLeft=left}}let preventScrollSupported=null;function focusPreventScroll(dom){if(dom.setActive)return dom.setActive();if(preventScrollSupported)return dom.focus(preventScrollSupported);let stored=scrollStack(dom);dom.focus(preventScrollSupported==null?{get preventScroll(){preventScrollSupported={preventScroll:true};return true}}:void 0);if(!preventScrollSupported){preventScrollSupported=false;restoreScrollStack(stored,0)}}function findOffsetInNode(node2,coords){let closest,dxClosest=2e8,coordsClosest,offset2=0;let rowBot=coords.top,rowTop=coords.top;let firstBelow,coordsBelow;for(let child=node2.firstChild,childIndex=0;child;child=child.nextSibling,childIndex++){let rects;if(child.nodeType==1)rects=child.getClientRects();else if(child.nodeType==3)rects=textRange(child).getClientRects();else continue;for(let i=0;i<rects.length;i++){let rect=rects[i];if(rect.top<=rowBot&&rect.bottom>=rowTop){rowBot=Math.max(rect.bottom,rowBot);rowTop=Math.min(rect.top,rowTop);let dx=rect.left>coords.left?rect.left-coords.left:rect.right<coords.left?coords.left-rect.right:0;if(dx<dxClosest){closest=child;dxClosest=dx;coordsClosest=dx&&closest.nodeType==3?{left:rect.right<coords.left?rect.right:rect.left,top:coords.top}:coords;if(child.nodeType==1&&dx)offset2=childIndex+(coords.left>=(rect.left+rect.right)/2?1:0);continue}}else if(rect.top>coords.top&&!firstBelow&&rect.left<=coords.left&&rect.right>=coords.left){firstBelow=child;coordsBelow={left:Math.max(rect.left,Math.min(rect.right,coords.left)),top:rect.top}}if(!closest&&(coords.left>=rect.right&&coords.top>=rect.top||coords.left>=rect.left&&coords.top>=rect.bottom))offset2=childIndex+1}}if(!closest&&firstBelow){closest=firstBelow;coordsClosest=coordsBelow;dxClosest=0}if(closest&&closest.nodeType==3)return findOffsetInText(closest,coordsClosest);if(!closest||dxClosest&&closest.nodeType==1)return{node:node2,offset:offset2};return findOffsetInNode(closest,coordsClosest)}function findOffsetInText(node2,coords){let len=node2.nodeValue.length;let range=document.createRange();for(let i=0;i<len;i++){range.setEnd(node2,i+1);range.setStart(node2,i);let rect=singleRect(range,1);if(rect.top==rect.bottom)continue;if(inRect(coords,rect))return{node:node2,offset:i+(coords.left>=(rect.left+rect.right)/2?1:0)}}return{node:node2,offset:0}}function inRect(coords,rect){return coords.left>=rect.left-1&&coords.left<=rect.right+1&&coords.top>=rect.top-1&&coords.top<=rect.bottom+1}function targetKludge(dom,coords){let parent=dom.parentNode;if(parent&&/^li$/i.test(parent.nodeName)&&coords.left<dom.getBoundingClientRect().left)return parent;return dom}function posFromElement(view,elt,coords){let{node:node2,offset:offset2}=findOffsetInNode(elt,coords),bias=-1;if(node2.nodeType==1&&!node2.firstChild){let rect=node2.getBoundingClientRect();bias=rect.left!=rect.right&&coords.left>(rect.left+rect.right)/2?1:-1}return view.docView.posFromDOM(node2,offset2,bias)}function posFromCaret(view,node2,offset2,coords){let outsideBlock=-1;for(let cur=node2,sawBlock=false;;){if(cur==view.dom)break;let desc=view.docView.nearestDesc(cur,true),rect;if(!desc)return null;if(desc.dom.nodeType==1&&(desc.node.isBlock&&desc.parent||!desc.contentDOM)&&((rect=desc.dom.getBoundingClientRect()).width||rect.height)){if(desc.node.isBlock&&desc.parent){if(!sawBlock&&rect.left>coords.left||rect.top>coords.top)outsideBlock=desc.posBefore;else if(!sawBlock&&rect.right<coords.left||rect.bottom<coords.top)outsideBlock=desc.posAfter;sawBlock=true}if(!desc.contentDOM&&outsideBlock<0&&!desc.node.isText){let before=desc.node.isBlock?coords.top<(rect.top+rect.bottom)/2:coords.left<(rect.left+rect.right)/2;return before?desc.posBefore:desc.posAfter}}cur=desc.dom.parentNode}return outsideBlock>-1?outsideBlock:view.docView.posFromDOM(node2,offset2,-1)}function elementFromPoint(element,coords,box){let len=element.childNodes.length;if(len&&box.top<box.bottom){for(let startI=Math.max(0,Math.min(len-1,Math.floor(len*(coords.top-box.top)/(box.bottom-box.top))-2)),i=startI;;){let child=element.childNodes[i];if(child.nodeType==1){let rects=child.getClientRects();for(let j=0;j<rects.length;j++){let rect=rects[j];if(inRect(coords,rect))return elementFromPoint(child,coords,rect)}}if((i=(i+1)%len)==startI)break}}return element}function posAtCoords(view,coords){let doc2=view.dom.ownerDocument,node2,offset2=0;let caret2=caretFromPoint(doc2,coords.left,coords.top);if(caret2)({node:node2,offset:offset2}=caret2);let elt=(view.root.elementFromPoint?view.root:doc2).elementFromPoint(coords.left,coords.top);let pos;if(!elt||!view.dom.contains(elt.nodeType!=1?elt.parentNode:elt)){let box=view.dom.getBoundingClientRect();if(!inRect(coords,box))return null;elt=elementFromPoint(view.dom,coords,box);if(!elt)return null}if(safari){for(let p=elt;node2&&p;p=parentNode(p))if(p.draggable)node2=void 0}elt=targetKludge(elt,coords);if(node2){if(gecko&&node2.nodeType==1){offset2=Math.min(offset2,node2.childNodes.length);if(offset2<node2.childNodes.length){let next2=node2.childNodes[offset2],box;if(next2.nodeName=="IMG"&&(box=next2.getBoundingClientRect()).right<=coords.left&&box.bottom>coords.top)offset2++}}let prev2;if(webkit&&offset2&&node2.nodeType==1&&(prev2=node2.childNodes[offset2-1]).nodeType==1&&prev2.contentEditable=="false"&&prev2.getBoundingClientRect().top>=coords.top)offset2--;if(node2==view.dom&&offset2==node2.childNodes.length-1&&node2.lastChild.nodeType==1&&coords.top>node2.lastChild.getBoundingClientRect().bottom)pos=view.state.doc.content.size;else if(offset2==0||node2.nodeType!=1||node2.childNodes[offset2-1].nodeName!="BR")pos=posFromCaret(view,node2,offset2,coords)}if(pos==null)pos=posFromElement(view,elt,coords);let desc=view.docView.nearestDesc(elt,true);return{pos:pos,inside:desc?desc.posAtStart-desc.border:-1}}function nonZero(rect){return rect.top<rect.bottom||rect.left<rect.right}function singleRect(target,bias){let rects=target.getClientRects();if(rects.length){let first2=rects[bias<0?0:rects.length-1];if(nonZero(first2))return first2}return Array.prototype.find.call(rects,nonZero)||target.getBoundingClientRect()}const BIDI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function coordsAtPos(view,pos,side){let{node:node2,offset:offset2,atom:atom}=view.docView.domFromPos(pos,side<0?-1:1);let supportEmptyRange=webkit||gecko;if(node2.nodeType==3){if(supportEmptyRange&&(BIDI.test(node2.nodeValue)||(side<0?!offset2:offset2==node2.nodeValue.length))){let rect=singleRect(textRange(node2,offset2,offset2),side);if(gecko&&offset2&&/\s/.test(node2.nodeValue[offset2-1])&&offset2<node2.nodeValue.length){let rectBefore=singleRect(textRange(node2,offset2-1,offset2-1),-1);if(rectBefore.top==rect.top){let rectAfter=singleRect(textRange(node2,offset2,offset2+1),-1);if(rectAfter.top!=rect.top)return flattenV(rectAfter,rectAfter.left<rectBefore.left)}}return rect}else{let from3=offset2,to=offset2,takeSide=side<0?1:-1;if(side<0&&!offset2){to++;takeSide=-1}else if(side>=0&&offset2==node2.nodeValue.length){from3--;takeSide=1}else if(side<0){from3--}else{to++}return flattenV(singleRect(textRange(node2,from3,to),takeSide),takeSide<0)}}let $dom=view.state.doc.resolve(pos-(atom||0));if(!$dom.parent.inlineContent){if(atom==null&&offset2&&(side<0||offset2==nodeSize(node2))){let before=node2.childNodes[offset2-1];if(before.nodeType==1)return flattenH(before.getBoundingClientRect(),false)}if(atom==null&&offset2<nodeSize(node2)){let after=node2.childNodes[offset2];if(after.nodeType==1)return flattenH(after.getBoundingClientRect(),true)}return flattenH(node2.getBoundingClientRect(),side>=0)}if(atom==null&&offset2&&(side<0||offset2==nodeSize(node2))){let before=node2.childNodes[offset2-1];let target=before.nodeType==3?textRange(before,nodeSize(before)-(supportEmptyRange?0:1)):before.nodeType==1&&(before.nodeName!="BR"||!before.nextSibling)?before:null;if(target)return flattenV(singleRect(target,1),false)}if(atom==null&&offset2<nodeSize(node2)){let after=node2.childNodes[offset2];while(after.pmViewDesc&&after.pmViewDesc.ignoreForCoords)after=after.nextSibling;let target=!after?null:after.nodeType==3?textRange(after,0,supportEmptyRange?0:1):after.nodeType==1?after:null;if(target)return flattenV(singleRect(target,-1),true)}return flattenV(singleRect(node2.nodeType==3?textRange(node2):node2,-side),side>=0)}function flattenV(rect,left){if(rect.width==0)return rect;let x=left?rect.left:rect.right;return{top:rect.top,bottom:rect.bottom,left:x,right:x}}function flattenH(rect,top){if(rect.height==0)return rect;let y=top?rect.top:rect.bottom;return{top:y,bottom:y,left:rect.left,right:rect.right}}function withFlushedState(view,state,f){let viewState=view.state,active=view.root.activeElement;if(viewState!=state)view.updateState(state);if(active!=view.dom)view.focus();try{return f()}finally{if(viewState!=state)view.updateState(viewState);if(active!=view.dom&&active)active.focus()}}function endOfTextblockVertical(view,state,dir){let sel=state.selection;let $pos=dir=="up"?sel.$from:sel.$to;return withFlushedState(view,state,(()=>{let{node:dom}=view.docView.domFromPos($pos.pos,dir=="up"?-1:1);for(;;){let nearest=view.docView.nearestDesc(dom,true);if(!nearest)break;if(nearest.node.isBlock){dom=nearest.contentDOM||nearest.dom;break}dom=nearest.dom.parentNode}let coords=coordsAtPos(view,$pos.pos,1);for(let child=dom.firstChild;child;child=child.nextSibling){let boxes;if(child.nodeType==1)boxes=child.getClientRects();else if(child.nodeType==3)boxes=textRange(child,0,child.nodeValue.length).getClientRects();else continue;for(let i=0;i<boxes.length;i++){let box=boxes[i];if(box.bottom>box.top+1&&(dir=="up"?coords.top-box.top>(box.bottom-coords.top)*2:box.bottom-coords.bottom>(coords.bottom-box.top)*2))return false}}return true}))}const maybeRTL=/[\u0590-\u08ac]/;function endOfTextblockHorizontal(view,state,dir){let{$head:$head}=state.selection;if(!$head.parent.isTextblock)return false;let offset2=$head.parentOffset,atStart=!offset2,atEnd=offset2==$head.parent.content.size;let sel=view.domSelection();if(!sel)return $head.pos==$head.start()||$head.pos==$head.end();if(!maybeRTL.test($head.parent.textContent)||!sel.modify)return dir=="left"||dir=="backward"?atStart:atEnd;return withFlushedState(view,state,(()=>{let{focusNode:oldNode,focusOffset:oldOff,anchorNode:anchorNode,anchorOffset:anchorOffset}=view.domSelectionRange();let oldBidiLevel=sel.caretBidiLevel;sel.modify("move",dir,"character");let parentDOM=$head.depth?view.docView.domAfterPos($head.before()):view.dom;let{focusNode:newNode,focusOffset:newOff}=view.domSelectionRange();let result=newNode&&!parentDOM.contains(newNode.nodeType==1?newNode:newNode.parentNode)||oldNode==newNode&&oldOff==newOff;try{sel.collapse(anchorNode,anchorOffset);if(oldNode&&(oldNode!=anchorNode||oldOff!=anchorOffset)&&sel.extend)sel.extend(oldNode,oldOff)}catch(_){}if(oldBidiLevel!=null)sel.caretBidiLevel=oldBidiLevel;return result}))}let cachedState=null;let cachedDir=null;let cachedResult=false;function endOfTextblock(view,state,dir){if(cachedState==state&&cachedDir==dir)return cachedResult;cachedState=state;cachedDir=dir;return cachedResult=dir=="up"||dir=="down"?endOfTextblockVertical(view,state,dir):endOfTextblockHorizontal(view,state,dir)}const NOT_DIRTY=0,CHILD_DIRTY=1,CONTENT_DIRTY=2,NODE_DIRTY=3;class ViewDesc{constructor(parent,children,dom,contentDOM){this.parent=parent;this.children=children;this.dom=dom;this.contentDOM=contentDOM;this.dirty=NOT_DIRTY;dom.pmViewDesc=this}matchesWidget(widget){return false}matchesMark(mark){return false}matchesNode(node2,outerDeco,innerDeco){return false}matchesHack(nodeName){return false}parseRule(){return null}stopEvent(event2){return false}get size(){let size=0;for(let i=0;i<this.children.length;i++)size+=this.children[i].size;return size}get border(){return 0}destroy(){this.parent=void 0;if(this.dom.pmViewDesc==this)this.dom.pmViewDesc=void 0;for(let i=0;i<this.children.length;i++)this.children[i].destroy()}posBeforeChild(child){for(let i=0,pos=this.posAtStart;;i++){let cur=this.children[i];if(cur==child)return pos;pos+=cur.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(dom,offset2,bias){if(this.contentDOM&&this.contentDOM.contains(dom.nodeType==1?dom:dom.parentNode)){if(bias<0){let domBefore,desc;if(dom==this.contentDOM){domBefore=dom.childNodes[offset2-1]}else{while(dom.parentNode!=this.contentDOM)dom=dom.parentNode;domBefore=dom.previousSibling}while(domBefore&&!((desc=domBefore.pmViewDesc)&&desc.parent==this))domBefore=domBefore.previousSibling;return domBefore?this.posBeforeChild(desc)+desc.size:this.posAtStart}else{let domAfter,desc;if(dom==this.contentDOM){domAfter=dom.childNodes[offset2]}else{while(dom.parentNode!=this.contentDOM)dom=dom.parentNode;domAfter=dom.nextSibling}while(domAfter&&!((desc=domAfter.pmViewDesc)&&desc.parent==this))domAfter=domAfter.nextSibling;return domAfter?this.posBeforeChild(desc):this.posAtEnd}}let atEnd;if(dom==this.dom&&this.contentDOM){atEnd=offset2>domIndex(this.contentDOM)}else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM)){atEnd=dom.compareDocumentPosition(this.contentDOM)&2}else if(this.dom.firstChild){if(offset2==0)for(let search=dom;;search=search.parentNode){if(search==this.dom){atEnd=false;break}if(search.previousSibling)break}if(atEnd==null&&offset2==dom.childNodes.length)for(let search=dom;;search=search.parentNode){if(search==this.dom){atEnd=true;break}if(search.nextSibling)break}}return(atEnd==null?bias>0:atEnd)?this.posAtEnd:this.posAtStart}nearestDesc(dom,onlyNodes=false){for(let first2=true,cur=dom;cur;cur=cur.parentNode){let desc=this.getDesc(cur),nodeDOM;if(desc&&(!onlyNodes||desc.node)){if(first2&&(nodeDOM=desc.nodeDOM)&&!(nodeDOM.nodeType==1?nodeDOM.contains(dom.nodeType==1?dom:dom.parentNode):nodeDOM==dom))first2=false;else return desc}}}getDesc(dom){let desc=dom.pmViewDesc;for(let cur=desc;cur;cur=cur.parent)if(cur==this)return desc}posFromDOM(dom,offset2,bias){for(let scan=dom;scan;scan=scan.parentNode){let desc=this.getDesc(scan);if(desc)return desc.localPosFromDOM(dom,offset2,bias)}return-1}descAt(pos){for(let i=0,offset2=0;i<this.children.length;i++){let child=this.children[i],end=offset2+child.size;if(offset2==pos&&end!=offset2){while(!child.border&&child.children.length){for(let i2=0;i2<child.children.length;i2++){let inner=child.children[i2];if(inner.size){child=inner;break}}}return child}if(pos<end)return child.descAt(pos-offset2-child.border);offset2=end}}domFromPos(pos,side){if(!this.contentDOM)return{node:this.dom,offset:0,atom:pos+1};let i=0,offset2=0;for(let curPos=0;i<this.children.length;i++){let child=this.children[i],end=curPos+child.size;if(end>pos||child instanceof TrailingHackViewDesc){offset2=pos-curPos;break}curPos=end}if(offset2)return this.children[i].domFromPos(offset2-this.children[i].border,side);for(let prev2;i&&!(prev2=this.children[i-1]).size&&prev2 instanceof WidgetViewDesc&&prev2.side>=0;i--){}if(side<=0){let prev2,enter2=true;for(;;i--,enter2=false){prev2=i?this.children[i-1]:null;if(!prev2||prev2.dom.parentNode==this.contentDOM)break}if(prev2&&side&&enter2&&!prev2.border&&!prev2.domAtom)return prev2.domFromPos(prev2.size,side);return{node:this.contentDOM,offset:prev2?domIndex(prev2.dom)+1:0}}else{let next2,enter2=true;for(;;i++,enter2=false){next2=i<this.children.length?this.children[i]:null;if(!next2||next2.dom.parentNode==this.contentDOM)break}if(next2&&enter2&&!next2.border&&!next2.domAtom)return next2.domFromPos(0,side);return{node:this.contentDOM,offset:next2?domIndex(next2.dom):this.contentDOM.childNodes.length}}}parseRange(from3,to,base2=0){if(this.children.length==0)return{node:this.contentDOM,from:from3,to:to,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let fromOffset=-1,toOffset=-1;for(let offset2=base2,i=0;;i++){let child=this.children[i],end=offset2+child.size;if(fromOffset==-1&&from3<=end){let childBase=offset2+child.border;if(from3>=childBase&&to<=end-child.border&&child.node&&child.contentDOM&&this.contentDOM.contains(child.contentDOM))return child.parseRange(from3,to,childBase);from3=offset2;for(let j=i;j>0;j--){let prev2=this.children[j-1];if(prev2.size&&prev2.dom.parentNode==this.contentDOM&&!prev2.emptyChildAt(1)){fromOffset=domIndex(prev2.dom)+1;break}from3-=prev2.size}if(fromOffset==-1)fromOffset=0}if(fromOffset>-1&&(end>to||i==this.children.length-1)){to=end;for(let j=i+1;j<this.children.length;j++){let next2=this.children[j];if(next2.size&&next2.dom.parentNode==this.contentDOM&&!next2.emptyChildAt(-1)){toOffset=domIndex(next2.dom);break}to+=next2.size}if(toOffset==-1)toOffset=this.contentDOM.childNodes.length;break}offset2=end}return{node:this.contentDOM,from:from3,to:to,fromOffset:fromOffset,toOffset:toOffset}}emptyChildAt(side){if(this.border||!this.contentDOM||!this.children.length)return false;let child=this.children[side<0?0:this.children.length-1];return child.size==0||child.emptyChildAt(side)}domAfterPos(pos){let{node:node2,offset:offset2}=this.domFromPos(pos,0);if(node2.nodeType!=1||offset2==node2.childNodes.length)throw new RangeError("No node after pos "+pos);return node2.childNodes[offset2]}setSelection(anchor,head,view,force=false){let from3=Math.min(anchor,head),to=Math.max(anchor,head);for(let i=0,offset2=0;i<this.children.length;i++){let child=this.children[i],end=offset2+child.size;if(from3>offset2&&to<end)return child.setSelection(anchor-offset2-child.border,head-offset2-child.border,view,force);offset2=end}let anchorDOM=this.domFromPos(anchor,anchor?-1:1);let headDOM=head==anchor?anchorDOM:this.domFromPos(head,head?-1:1);let domSel=view.root.getSelection();let selRange=view.domSelectionRange();let brKludge=false;if((gecko||safari)&&anchor==head){let{node:node2,offset:offset2}=anchorDOM;if(node2.nodeType==3){brKludge=!!(offset2&&node2.nodeValue[offset2-1]=="\n");if(brKludge&&offset2==node2.nodeValue.length){for(let scan=node2,after;scan;scan=scan.parentNode){if(after=scan.nextSibling){if(after.nodeName=="BR")anchorDOM=headDOM={node:after.parentNode,offset:domIndex(after)+1};break}let desc=scan.pmViewDesc;if(desc&&desc.node&&desc.node.isBlock)break}}}else{let prev2=node2.childNodes[offset2-1];brKludge=prev2&&(prev2.nodeName=="BR"||prev2.contentEditable=="false")}}if(gecko&&selRange.focusNode&&selRange.focusNode!=headDOM.node&&selRange.focusNode.nodeType==1){let after=selRange.focusNode.childNodes[selRange.focusOffset];if(after&&after.contentEditable=="false")force=true}if(!(force||brKludge&&safari)&&isEquivalentPosition(anchorDOM.node,anchorDOM.offset,selRange.anchorNode,selRange.anchorOffset)&&isEquivalentPosition(headDOM.node,headDOM.offset,selRange.focusNode,selRange.focusOffset))return;let domSelExtended=false;if((domSel.extend||anchor==head)&&!brKludge){domSel.collapse(anchorDOM.node,anchorDOM.offset);try{if(anchor!=head)domSel.extend(headDOM.node,headDOM.offset);domSelExtended=true}catch(_){}}if(!domSelExtended){if(anchor>head){let tmp=anchorDOM;anchorDOM=headDOM;headDOM=tmp}let range=document.createRange();range.setEnd(headDOM.node,headDOM.offset);range.setStart(anchorDOM.node,anchorDOM.offset);domSel.removeAllRanges();domSel.addRange(range)}}ignoreMutation(mutation){return!this.contentDOM&&mutation.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(from3,to){for(let offset2=0,i=0;i<this.children.length;i++){let child=this.children[i],end=offset2+child.size;if(offset2==end?from3<=end&&to>=offset2:from3<end&&to>offset2){let startInside=offset2+child.border,endInside=end-child.border;if(from3>=startInside&&to<=endInside){this.dirty=from3==offset2||to==end?CONTENT_DIRTY:CHILD_DIRTY;if(from3==startInside&&to==endInside&&(child.contentLost||child.dom.parentNode!=this.contentDOM))child.dirty=NODE_DIRTY;else child.markDirty(from3-startInside,to-startInside);return}else{child.dirty=child.dom==child.contentDOM&&child.dom.parentNode==this.contentDOM&&!child.children.length?CONTENT_DIRTY:NODE_DIRTY}}offset2=end}this.dirty=CONTENT_DIRTY}markParentsDirty(){let level=1;for(let node2=this.parent;node2;node2=node2.parent,level++){let dirty=level==1?CONTENT_DIRTY:CHILD_DIRTY;if(node2.dirty<dirty)node2.dirty=dirty}}get domAtom(){return false}get ignoreForCoords(){return false}isText(text){return false}}class WidgetViewDesc extends ViewDesc{constructor(parent,widget,view,pos){let self2,dom=widget.type.toDOM;if(typeof dom=="function")dom=dom(view,(()=>{if(!self2)return pos;if(self2.parent)return self2.parent.posBeforeChild(self2)}));if(!widget.type.spec.raw){if(dom.nodeType!=1){let wrap2=document.createElement("span");wrap2.appendChild(dom);dom=wrap2}dom.contentEditable="false";dom.classList.add("ProseMirror-widget")}super(parent,[],dom,null);this.widget=widget;this.widget=widget;self2=this}matchesWidget(widget){return this.dirty==NOT_DIRTY&&widget.type.eq(this.widget.type)}parseRule(){return{ignore:true}}stopEvent(event2){let stop=this.widget.spec.stopEvent;return stop?stop(event2):false}ignoreMutation(mutation){return mutation.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom);super.destroy()}get domAtom(){return true}get side(){return this.widget.type.side}}class CompositionViewDesc extends ViewDesc{constructor(parent,dom,textDOM,text){super(parent,[],dom,null);this.textDOM=textDOM;this.text=text}get size(){return this.text.length}localPosFromDOM(dom,offset2){if(dom!=this.textDOM)return this.posAtStart+(offset2?this.size:0);return this.posAtStart+offset2}domFromPos(pos){return{node:this.textDOM,offset:pos}}ignoreMutation(mut){return mut.type==="characterData"&&mut.target.nodeValue==mut.oldValue}}class MarkViewDesc extends ViewDesc{constructor(parent,mark,dom,contentDOM,spec){super(parent,[],dom,contentDOM);this.mark=mark;this.spec=spec}static create(parent,mark,inline,view){let custom=view.nodeViews[mark.type.name];let spec=custom&&custom(mark,view,inline);if(!spec||!spec.dom)spec=DOMSerializer.renderSpec(document,mark.type.spec.toDOM(mark,inline),null,mark.attrs);return new MarkViewDesc(parent,mark,spec.dom,spec.contentDOM||spec.dom,spec)}parseRule(){if(this.dirty&NODE_DIRTY||this.mark.type.spec.reparseInView)return null;return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(mark){return this.dirty!=NODE_DIRTY&&this.mark.eq(mark)}markDirty(from3,to){super.markDirty(from3,to);if(this.dirty!=NOT_DIRTY){let parent=this.parent;while(!parent.node)parent=parent.parent;if(parent.dirty<this.dirty)parent.dirty=this.dirty;this.dirty=NOT_DIRTY}}slice(from3,to,view){let copy2=MarkViewDesc.create(this.parent,this.mark,true,view);let nodes=this.children,size=this.size;if(to<size)nodes=replaceNodes(nodes,to,size,view);if(from3>0)nodes=replaceNodes(nodes,0,from3,view);for(let i=0;i<nodes.length;i++)nodes[i].parent=copy2;copy2.children=nodes;return copy2}ignoreMutation(mutation){return this.spec.ignoreMutation?this.spec.ignoreMutation(mutation):super.ignoreMutation(mutation)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}}class NodeViewDesc extends ViewDesc{constructor(parent,node2,outerDeco,innerDeco,dom,contentDOM,nodeDOM,view,pos){super(parent,[],dom,contentDOM);this.node=node2;this.outerDeco=outerDeco;this.innerDeco=innerDeco;this.nodeDOM=nodeDOM}static create(parent,node2,outerDeco,innerDeco,view,pos){let custom=view.nodeViews[node2.type.name],descObj;let spec=custom&&custom(node2,view,(()=>{if(!descObj)return pos;if(descObj.parent)return descObj.parent.posBeforeChild(descObj)}),outerDeco,innerDeco);let dom=spec&&spec.dom,contentDOM=spec&&spec.contentDOM;if(node2.isText){if(!dom)dom=document.createTextNode(node2.text);else if(dom.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else if(!dom){let spec2=DOMSerializer.renderSpec(document,node2.type.spec.toDOM(node2),null,node2.attrs);({dom:dom,contentDOM:contentDOM}=spec2)}if(!contentDOM&&!node2.isText&&dom.nodeName!="BR"){if(!dom.hasAttribute("contenteditable"))dom.contentEditable="false";if(node2.type.spec.draggable)dom.draggable=true}let nodeDOM=dom;dom=applyOuterDeco(dom,outerDeco,node2);if(spec)return descObj=new CustomNodeViewDesc(parent,node2,outerDeco,innerDeco,dom,contentDOM||null,nodeDOM,spec,view,pos+1);else if(node2.isText)return new TextViewDesc(parent,node2,outerDeco,innerDeco,dom,nodeDOM,view);else return new NodeViewDesc(parent,node2,outerDeco,innerDeco,dom,contentDOM||null,nodeDOM,view,pos+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let rule={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre")rule.preserveWhitespace="full";if(!this.contentDOM){rule.getContent=()=>this.node.content}else if(!this.contentLost){rule.contentElement=this.contentDOM}else{for(let i=this.children.length-1;i>=0;i--){let child=this.children[i];if(this.dom.contains(child.dom.parentNode)){rule.contentElement=child.dom.parentNode;break}}if(!rule.contentElement)rule.getContent=()=>Fragment.empty}return rule}matchesNode(node2,outerDeco,innerDeco){return this.dirty==NOT_DIRTY&&node2.eq(this.node)&&sameOuterDeco(outerDeco,this.outerDeco)&&innerDeco.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(view,pos){let inline=this.node.inlineContent,off=pos;let composition=view.composing?this.localCompositionInfo(view,pos):null;let localComposition=composition&&composition.pos>-1?composition:null;let compositionInChild=composition&&composition.pos<0;let updater=new ViewTreeUpdater(this,localComposition&&localComposition.node,view);iterDeco(this.node,this.innerDeco,((widget,i,insideNode)=>{if(widget.spec.marks)updater.syncToMarks(widget.spec.marks,inline,view);else if(widget.type.side>=0&&!insideNode)updater.syncToMarks(i==this.node.childCount?Mark$1.none:this.node.child(i).marks,inline,view);updater.placeWidget(widget,view,off)}),((child,outerDeco,innerDeco,i)=>{updater.syncToMarks(child.marks,inline,view);let compIndex;if(updater.findNodeMatch(child,outerDeco,innerDeco,i));else if(compositionInChild&&view.state.selection.from>off&&view.state.selection.to<off+child.nodeSize&&(compIndex=updater.findIndexWithChild(composition.node))>-1&&updater.updateNodeAt(child,outerDeco,innerDeco,compIndex,view));else if(updater.updateNextNode(child,outerDeco,innerDeco,view,i,off));else{updater.addNode(child,outerDeco,innerDeco,view,off)}off+=child.nodeSize}));updater.syncToMarks([],inline,view);if(this.node.isTextblock)updater.addTextblockHacks();updater.destroyRest();if(updater.changed||this.dirty==CONTENT_DIRTY){if(localComposition)this.protectLocalComposition(view,localComposition);renderDescs(this.contentDOM,this.children,view);if(ios)iosHacks(this.dom)}}localCompositionInfo(view,pos){let{from:from3,to:to}=view.state.selection;if(!(view.state.selection instanceof TextSelection)||from3<pos||to>pos+this.node.content.size)return null;let textNode=view.input.compositionNode;if(!textNode||!this.dom.contains(textNode.parentNode))return null;if(this.node.inlineContent){let text=textNode.nodeValue;let textPos=findTextInFragment(this.node.content,text,from3-pos,to-pos);return textPos<0?null:{node:textNode,pos:textPos,text:text}}else{return{node:textNode,pos:-1,text:""}}}protectLocalComposition(view,{node:node2,pos:pos,text:text}){if(this.getDesc(node2))return;let topNode=node2;for(;;topNode=topNode.parentNode){if(topNode.parentNode==this.contentDOM)break;while(topNode.previousSibling)topNode.parentNode.removeChild(topNode.previousSibling);while(topNode.nextSibling)topNode.parentNode.removeChild(topNode.nextSibling);if(topNode.pmViewDesc)topNode.pmViewDesc=void 0}let desc=new CompositionViewDesc(this,topNode,node2,text);view.input.compositionNodes.push(desc);this.children=replaceNodes(this.children,pos,pos+text.length,view,desc)}update(node2,outerDeco,innerDeco,view){if(this.dirty==NODE_DIRTY||!node2.sameMarkup(this.node))return false;this.updateInner(node2,outerDeco,innerDeco,view);return true}updateInner(node2,outerDeco,innerDeco,view){this.updateOuterDeco(outerDeco);this.node=node2;this.innerDeco=innerDeco;if(this.contentDOM)this.updateChildren(view,this.posAtStart);this.dirty=NOT_DIRTY}updateOuterDeco(outerDeco){if(sameOuterDeco(outerDeco,this.outerDeco))return;let needsWrap=this.nodeDOM.nodeType!=1;let oldDOM=this.dom;this.dom=patchOuterDeco(this.dom,this.nodeDOM,computeOuterDeco(this.outerDeco,this.node,needsWrap),computeOuterDeco(outerDeco,this.node,needsWrap));if(this.dom!=oldDOM){oldDOM.pmViewDesc=void 0;this.dom.pmViewDesc=this}this.outerDeco=outerDeco}selectNode(){if(this.nodeDOM.nodeType==1)this.nodeDOM.classList.add("ProseMirror-selectednode");if(this.contentDOM||!this.node.type.spec.draggable)this.dom.draggable=true}deselectNode(){if(this.nodeDOM.nodeType==1){this.nodeDOM.classList.remove("ProseMirror-selectednode");if(this.contentDOM||!this.node.type.spec.draggable)this.dom.removeAttribute("draggable")}}get domAtom(){return this.node.isAtom}}function docViewDesc(doc2,outerDeco,innerDeco,dom,view){applyOuterDeco(dom,outerDeco,doc2);let docView=new NodeViewDesc(void 0,doc2,outerDeco,innerDeco,dom,dom,dom,view,0);if(docView.contentDOM)docView.updateChildren(view,0);return docView}class TextViewDesc extends NodeViewDesc{constructor(parent,node2,outerDeco,innerDeco,dom,nodeDOM,view){super(parent,node2,outerDeco,innerDeco,dom,null,nodeDOM,view,0)}parseRule(){let skip=this.nodeDOM.parentNode;while(skip&&skip!=this.dom&&!skip.pmIsDeco)skip=skip.parentNode;return{skip:skip||true}}update(node2,outerDeco,innerDeco,view){if(this.dirty==NODE_DIRTY||this.dirty!=NOT_DIRTY&&!this.inParent()||!node2.sameMarkup(this.node))return false;this.updateOuterDeco(outerDeco);if((this.dirty!=NOT_DIRTY||node2.text!=this.node.text)&&node2.text!=this.nodeDOM.nodeValue){this.nodeDOM.nodeValue=node2.text;if(view.trackWrites==this.nodeDOM)view.trackWrites=null}this.node=node2;this.dirty=NOT_DIRTY;return true}inParent(){let parentDOM=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==parentDOM)return true;return false}domFromPos(pos){return{node:this.nodeDOM,offset:pos}}localPosFromDOM(dom,offset2,bias){if(dom==this.nodeDOM)return this.posAtStart+Math.min(offset2,this.node.text.length);return super.localPosFromDOM(dom,offset2,bias)}ignoreMutation(mutation){return mutation.type!="characterData"&&mutation.type!="selection"}slice(from3,to,view){let node2=this.node.cut(from3,to),dom=document.createTextNode(node2.text);return new TextViewDesc(this.parent,node2,this.outerDeco,this.innerDeco,dom,dom,view)}markDirty(from3,to){super.markDirty(from3,to);if(this.dom!=this.nodeDOM&&(from3==0||to==this.nodeDOM.nodeValue.length))this.dirty=NODE_DIRTY}get domAtom(){return false}isText(text){return this.node.text==text}}class TrailingHackViewDesc extends ViewDesc{parseRule(){return{ignore:true}}matchesHack(nodeName){return this.dirty==NOT_DIRTY&&this.dom.nodeName==nodeName}get domAtom(){return true}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class CustomNodeViewDesc extends NodeViewDesc{constructor(parent,node2,outerDeco,innerDeco,dom,contentDOM,nodeDOM,spec,view,pos){super(parent,node2,outerDeco,innerDeco,dom,contentDOM,nodeDOM,view,pos);this.spec=spec}update(node2,outerDeco,innerDeco,view){if(this.dirty==NODE_DIRTY)return false;if(this.spec.update&&(this.node.type==node2.type||this.spec.multiType)){let result=this.spec.update(node2,outerDeco,innerDeco);if(result)this.updateInner(node2,outerDeco,innerDeco,view);return result}else if(!this.contentDOM&&!node2.isLeaf){return false}else{return super.update(node2,outerDeco,innerDeco,view)}}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(anchor,head,view,force){this.spec.setSelection?this.spec.setSelection(anchor,head,view.root):super.setSelection(anchor,head,view,force)}destroy(){if(this.spec.destroy)this.spec.destroy();super.destroy()}stopEvent(event2){return this.spec.stopEvent?this.spec.stopEvent(event2):false}ignoreMutation(mutation){return this.spec.ignoreMutation?this.spec.ignoreMutation(mutation):super.ignoreMutation(mutation)}}function renderDescs(parentDOM,descs,view){let dom=parentDOM.firstChild,written=false;for(let i=0;i<descs.length;i++){let desc=descs[i],childDOM=desc.dom;if(childDOM.parentNode==parentDOM){while(childDOM!=dom){dom=rm(dom);written=true}dom=dom.nextSibling}else{written=true;parentDOM.insertBefore(childDOM,dom)}if(desc instanceof MarkViewDesc){let pos=dom?dom.previousSibling:parentDOM.lastChild;renderDescs(desc.contentDOM,desc.children,view);dom=pos?pos.nextSibling:parentDOM.firstChild}}while(dom){dom=rm(dom);written=true}if(written&&view.trackWrites==parentDOM)view.trackWrites=null}const OuterDecoLevel=function(nodeName){if(nodeName)this.nodeName=nodeName};OuterDecoLevel.prototype=Object.create(null);const noDeco=[new OuterDecoLevel];function computeOuterDeco(outerDeco,node2,needsWrap){if(outerDeco.length==0)return noDeco;let top=needsWrap?noDeco[0]:new OuterDecoLevel,result=[top];for(let i=0;i<outerDeco.length;i++){let attrs=outerDeco[i].type.attrs;if(!attrs)continue;if(attrs.nodeName)result.push(top=new OuterDecoLevel(attrs.nodeName));for(let name in attrs){let val=attrs[name];if(val==null)continue;if(needsWrap&&result.length==1)result.push(top=new OuterDecoLevel(node2.isInline?"span":"div"));if(name=="class")top.class=(top.class?top.class+" ":"")+val;else if(name=="style")top.style=(top.style?top.style+";":"")+val;else if(name!="nodeName")top[name]=val}}return result}function patchOuterDeco(outerDOM,nodeDOM,prevComputed,curComputed){if(prevComputed==noDeco&&curComputed==noDeco)return nodeDOM;let curDOM=nodeDOM;for(let i=0;i<curComputed.length;i++){let deco=curComputed[i],prev2=prevComputed[i];if(i){let parent;if(prev2&&prev2.nodeName==deco.nodeName&&curDOM!=outerDOM&&(parent=curDOM.parentNode)&&parent.nodeName.toLowerCase()==deco.nodeName){curDOM=parent}else{parent=document.createElement(deco.nodeName);parent.pmIsDeco=true;parent.appendChild(curDOM);prev2=noDeco[0];curDOM=parent}}patchAttributes(curDOM,prev2||noDeco[0],deco)}return curDOM}function patchAttributes(dom,prev2,cur){for(let name in prev2)if(name!="class"&&name!="style"&&name!="nodeName"&&!(name in cur))dom.removeAttribute(name);for(let name in cur)if(name!="class"&&name!="style"&&name!="nodeName"&&cur[name]!=prev2[name])dom.setAttribute(name,cur[name]);if(prev2.class!=cur.class){let prevList=prev2.class?prev2.class.split(" ").filter(Boolean):[];let curList=cur.class?cur.class.split(" ").filter(Boolean):[];for(let i=0;i<prevList.length;i++)if(curList.indexOf(prevList[i])==-1)dom.classList.remove(prevList[i]);for(let i=0;i<curList.length;i++)if(prevList.indexOf(curList[i])==-1)dom.classList.add(curList[i]);if(dom.classList.length==0)dom.removeAttribute("class")}if(prev2.style!=cur.style){if(prev2.style){let prop=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,m;while(m=prop.exec(prev2.style))dom.style.removeProperty(m[1])}if(cur.style)dom.style.cssText+=cur.style}}function applyOuterDeco(dom,deco,node2){return patchOuterDeco(dom,dom,noDeco,computeOuterDeco(deco,node2,dom.nodeType!=1))}function sameOuterDeco(a,b){if(a.length!=b.length)return false;for(let i=0;i<a.length;i++)if(!a[i].type.eq(b[i].type))return false;return true}function rm(dom){let next2=dom.nextSibling;dom.parentNode.removeChild(dom);return next2}class ViewTreeUpdater{constructor(top,lock,view){this.lock=lock;this.view=view;this.index=0;this.stack=[];this.changed=false;this.top=top;this.preMatch=preMatch(top.node.content,top)}destroyBetween(start,end){if(start==end)return;for(let i=start;i<end;i++)this.top.children[i].destroy();this.top.children.splice(start,end-start);this.changed=true}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(marks,inline,view){let keep=0,depth=this.stack.length>>1;let maxKeep=Math.min(depth,marks.length);while(keep<maxKeep&&(keep==depth-1?this.top:this.stack[keep+1<<1]).matchesMark(marks[keep])&&marks[keep].type.spec.spanning!==false)keep++;while(keep<depth){this.destroyRest();this.top.dirty=NOT_DIRTY;this.index=this.stack.pop();this.top=this.stack.pop();depth--}while(depth<marks.length){this.stack.push(this.top,this.index+1);let found2=-1;for(let i=this.index;i<Math.min(this.index+3,this.top.children.length);i++){let next2=this.top.children[i];if(next2.matchesMark(marks[depth])&&!this.isLocked(next2.dom)){found2=i;break}}if(found2>-1){if(found2>this.index){this.changed=true;this.destroyBetween(this.index,found2)}this.top=this.top.children[this.index]}else{let markDesc=MarkViewDesc.create(this.top,marks[depth],inline,view);this.top.children.splice(this.index,0,markDesc);this.top=markDesc;this.changed=true}this.index=0;depth++}}findNodeMatch(node2,outerDeco,innerDeco,index2){let found2=-1,targetDesc;if(index2>=this.preMatch.index&&(targetDesc=this.preMatch.matches[index2-this.preMatch.index]).parent==this.top&&targetDesc.matchesNode(node2,outerDeco,innerDeco)){found2=this.top.children.indexOf(targetDesc,this.index)}else{for(let i=this.index,e=Math.min(this.top.children.length,i+5);i<e;i++){let child=this.top.children[i];if(child.matchesNode(node2,outerDeco,innerDeco)&&!this.preMatch.matched.has(child)){found2=i;break}}}if(found2<0)return false;this.destroyBetween(this.index,found2);this.index++;return true}updateNodeAt(node2,outerDeco,innerDeco,index2,view){let child=this.top.children[index2];if(child.dirty==NODE_DIRTY&&child.dom==child.contentDOM)child.dirty=CONTENT_DIRTY;if(!child.update(node2,outerDeco,innerDeco,view))return false;this.destroyBetween(this.index,index2);this.index++;return true}findIndexWithChild(domNode){for(;;){let parent=domNode.parentNode;if(!parent)return-1;if(parent==this.top.contentDOM){let desc=domNode.pmViewDesc;if(desc)for(let i=this.index;i<this.top.children.length;i++){if(this.top.children[i]==desc)return i}return-1}domNode=parent}}updateNextNode(node2,outerDeco,innerDeco,view,index2,pos){for(let i=this.index;i<this.top.children.length;i++){let next2=this.top.children[i];if(next2 instanceof NodeViewDesc){let preMatch2=this.preMatch.matched.get(next2);if(preMatch2!=null&&preMatch2!=index2)return false;let nextDOM=next2.dom,updated;let locked=this.isLocked(nextDOM)&&!(node2.isText&&next2.node&&next2.node.isText&&next2.nodeDOM.nodeValue==node2.text&&next2.dirty!=NODE_DIRTY&&sameOuterDeco(outerDeco,next2.outerDeco));if(!locked&&next2.update(node2,outerDeco,innerDeco,view)){this.destroyBetween(this.index,i);if(next2.dom!=nextDOM)this.changed=true;this.index++;return true}else if(!locked&&(updated=this.recreateWrapper(next2,node2,outerDeco,innerDeco,view,pos))){this.destroyBetween(this.index,i);this.top.children[this.index]=updated;if(updated.contentDOM){updated.dirty=CONTENT_DIRTY;updated.updateChildren(view,pos+1);updated.dirty=NOT_DIRTY}this.changed=true;this.index++;return true}break}}return false}recreateWrapper(next2,node2,outerDeco,innerDeco,view,pos){if(next2.dirty||node2.isAtom||!next2.children.length||!next2.node.content.eq(node2.content)||!sameOuterDeco(outerDeco,next2.outerDeco)||!innerDeco.eq(next2.innerDeco))return null;let wrapper=NodeViewDesc.create(this.top,node2,outerDeco,innerDeco,view,pos);if(wrapper.contentDOM){wrapper.children=next2.children;next2.children=[];for(let ch of wrapper.children)ch.parent=wrapper}next2.destroy();return wrapper}addNode(node2,outerDeco,innerDeco,view,pos){let desc=NodeViewDesc.create(this.top,node2,outerDeco,innerDeco,view,pos);if(desc.contentDOM)desc.updateChildren(view,pos+1);this.top.children.splice(this.index++,0,desc);this.changed=true}placeWidget(widget,view,pos){let next2=this.index<this.top.children.length?this.top.children[this.index]:null;if(next2&&next2.matchesWidget(widget)&&(widget==next2.widget||!next2.widget.type.toDOM.parentNode)){this.index++}else{let desc=new WidgetViewDesc(this.top,widget,view,pos);this.top.children.splice(this.index++,0,desc);this.changed=true}}addTextblockHacks(){let lastChild=this.top.children[this.index-1],parent=this.top;while(lastChild instanceof MarkViewDesc){parent=lastChild;lastChild=parent.children[parent.children.length-1]}if(!lastChild||!(lastChild instanceof TextViewDesc)||/\n$/.test(lastChild.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(lastChild.node.text)){if((safari||chrome)&&lastChild&&lastChild.dom.contentEditable=="false")this.addHackNode("IMG",parent);this.addHackNode("BR",this.top)}}addHackNode(nodeName,parent){if(parent==this.top&&this.index<parent.children.length&&parent.children[this.index].matchesHack(nodeName)){this.index++}else{let dom=document.createElement(nodeName);if(nodeName=="IMG"){dom.className="ProseMirror-separator";dom.alt=""}if(nodeName=="BR")dom.className="ProseMirror-trailingBreak";let hack=new TrailingHackViewDesc(this.top,[],dom,null);if(parent!=this.top)parent.children.push(hack);else parent.children.splice(this.index++,0,hack);this.changed=true}}isLocked(node2){return this.lock&&(node2==this.lock||node2.nodeType==1&&node2.contains(this.lock.parentNode))}}function preMatch(frag,parentDesc){let curDesc=parentDesc,descI=curDesc.children.length;let fI=frag.childCount,matched=new Map,matches2=[];outer:while(fI>0){let desc;for(;;){if(descI){let next2=curDesc.children[descI-1];if(next2 instanceof MarkViewDesc){curDesc=next2;descI=next2.children.length}else{desc=next2;descI--;break}}else if(curDesc==parentDesc){break outer}else{descI=curDesc.parent.children.indexOf(curDesc);curDesc=curDesc.parent}}let node2=desc.node;if(!node2)continue;if(node2!=frag.child(fI-1))break;--fI;matched.set(desc,fI);matches2.push(desc)}return{index:fI,matched:matched,matches:matches2.reverse()}}function compareSide(a,b){return a.type.side-b.type.side}function iterDeco(parent,deco,onWidget,onNode){let locals=deco.locals(parent),offset2=0;if(locals.length==0){for(let i=0;i<parent.childCount;i++){let child=parent.child(i);onNode(child,locals,deco.forChild(offset2,child),i);offset2+=child.nodeSize}return}let decoIndex=0,active=[],restNode=null;for(let parentIndex=0;;){let widget,widgets;while(decoIndex<locals.length&&locals[decoIndex].to==offset2){let next2=locals[decoIndex++];if(next2.widget){if(!widget)widget=next2;else(widgets||(widgets=[widget])).push(next2)}}if(widget){if(widgets){widgets.sort(compareSide);for(let i=0;i<widgets.length;i++)onWidget(widgets[i],parentIndex,!!restNode)}else{onWidget(widget,parentIndex,!!restNode)}}let child,index2;if(restNode){index2=-1;child=restNode;restNode=null}else if(parentIndex<parent.childCount){index2=parentIndex;child=parent.child(parentIndex++)}else{break}for(let i=0;i<active.length;i++)if(active[i].to<=offset2)active.splice(i--,1);while(decoIndex<locals.length&&locals[decoIndex].from<=offset2&&locals[decoIndex].to>offset2)active.push(locals[decoIndex++]);let end=offset2+child.nodeSize;if(child.isText){let cutAt=end;if(decoIndex<locals.length&&locals[decoIndex].from<cutAt)cutAt=locals[decoIndex].from;for(let i=0;i<active.length;i++)if(active[i].to<cutAt)cutAt=active[i].to;if(cutAt<end){restNode=child.cut(cutAt-offset2);child=child.cut(0,cutAt-offset2);end=cutAt;index2=-1}}else{while(decoIndex<locals.length&&locals[decoIndex].to<end)decoIndex++}let outerDeco=child.isInline&&!child.isLeaf?active.filter((d=>!d.inline)):active.slice();onNode(child,outerDeco,deco.forChild(offset2,child),index2);offset2=end}}function iosHacks(dom){if(dom.nodeName=="UL"||dom.nodeName=="OL"){let oldCSS=dom.style.cssText;dom.style.cssText=oldCSS+"; list-style: square !important";window.getComputedStyle(dom).listStyle;dom.style.cssText=oldCSS}}function findTextInFragment(frag,text,from3,to){for(let i=0,pos=0;i<frag.childCount&&pos<=to;){let child=frag.child(i++),childStart=pos;pos+=child.nodeSize;if(!child.isText)continue;let str=child.text;while(i<frag.childCount){let next2=frag.child(i++);pos+=next2.nodeSize;if(!next2.isText)break;str+=next2.text}if(pos>=from3){if(pos>=to&&str.slice(to-text.length-childStart,to-childStart)==text)return to-text.length;let found2=childStart<to?str.lastIndexOf(text,to-childStart-1):-1;if(found2>=0&&found2+text.length+childStart>=from3)return childStart+found2;if(from3==to&&str.length>=to+text.length-childStart&&str.slice(to-childStart,to-childStart+text.length)==text)return to}}return-1}function replaceNodes(nodes,from3,to,view,replacement){let result=[];for(let i=0,off=0;i<nodes.length;i++){let child=nodes[i],start=off,end=off+=child.size;if(start>=to||end<=from3){result.push(child)}else{if(start<from3)result.push(child.slice(0,from3-start,view));if(replacement){result.push(replacement);replacement=void 0}if(end>to)result.push(child.slice(to-start,child.size,view))}}return result}function selectionFromDOM(view,origin=null){let domSel=view.domSelectionRange(),doc2=view.state.doc;if(!domSel.focusNode)return null;let nearestDesc=view.docView.nearestDesc(domSel.focusNode),inWidget=nearestDesc&&nearestDesc.size==0;let head=view.docView.posFromDOM(domSel.focusNode,domSel.focusOffset,1);if(head<0)return null;let $head=doc2.resolve(head),anchor,selection;if(selectionCollapsed(domSel)){anchor=head;while(nearestDesc&&!nearestDesc.node)nearestDesc=nearestDesc.parent;let nearestDescNode=nearestDesc.node;if(nearestDesc&&nearestDescNode.isAtom&&NodeSelection.isSelectable(nearestDescNode)&&nearestDesc.parent&&!(nearestDescNode.isInline&&isOnEdge(domSel.focusNode,domSel.focusOffset,nearestDesc.dom))){let pos=nearestDesc.posBefore;selection=new NodeSelection(head==pos?$head:doc2.resolve(pos))}}else{if(domSel instanceof view.dom.ownerDocument.defaultView.Selection&&domSel.rangeCount>1){let min2=head,max2=head;for(let i=0;i<domSel.rangeCount;i++){let range=domSel.getRangeAt(i);min2=Math.min(min2,view.docView.posFromDOM(range.startContainer,range.startOffset,1));max2=Math.max(max2,view.docView.posFromDOM(range.endContainer,range.endOffset,-1))}if(min2<0)return null;[anchor,head]=max2==view.state.selection.anchor?[max2,min2]:[min2,max2];$head=doc2.resolve(head)}else{anchor=view.docView.posFromDOM(domSel.anchorNode,domSel.anchorOffset,1)}if(anchor<0)return null}let $anchor=doc2.resolve(anchor);if(!selection){let bias=origin=="pointer"||view.state.selection.head<$head.pos&&!inWidget?1:-1;selection=selectionBetween(view,$anchor,$head,bias)}return selection}function editorOwnsSelection(view){return view.editable?view.hasFocus():hasSelection(view)&&document.activeElement&&document.activeElement.contains(view.dom)}function selectionToDOM(view,force=false){let sel=view.state.selection;syncNodeSelection(view,sel);if(!editorOwnsSelection(view))return;if(!force&&view.input.mouseDown&&view.input.mouseDown.allowDefault&&chrome){let domSel=view.domSelectionRange(),curSel=view.domObserver.currentSelection;if(domSel.anchorNode&&curSel.anchorNode&&isEquivalentPosition(domSel.anchorNode,domSel.anchorOffset,curSel.anchorNode,curSel.anchorOffset)){view.input.mouseDown.delayedSelectionSync=true;view.domObserver.setCurSelection();return}}view.domObserver.disconnectSelection();if(view.cursorWrapper){selectCursorWrapper(view)}else{let{anchor:anchor,head:head}=sel,resetEditableFrom,resetEditableTo;if(brokenSelectBetweenUneditable&&!(sel instanceof TextSelection)){if(!sel.$from.parent.inlineContent)resetEditableFrom=temporarilyEditableNear(view,sel.from);if(!sel.empty&&!sel.$from.parent.inlineContent)resetEditableTo=temporarilyEditableNear(view,sel.to)}view.docView.setSelection(anchor,head,view,force);if(brokenSelectBetweenUneditable){if(resetEditableFrom)resetEditable(resetEditableFrom);if(resetEditableTo)resetEditable(resetEditableTo)}if(sel.visible){view.dom.classList.remove("ProseMirror-hideselection")}else{view.dom.classList.add("ProseMirror-hideselection");if("onselectionchange"in document)removeClassOnSelectionChange(view)}}view.domObserver.setCurSelection();view.domObserver.connectSelection()}const brokenSelectBetweenUneditable=safari||chrome&&chrome_version<63;function temporarilyEditableNear(view,pos){let{node:node2,offset:offset2}=view.docView.domFromPos(pos,0);let after=offset2<node2.childNodes.length?node2.childNodes[offset2]:null;let before=offset2?node2.childNodes[offset2-1]:null;if(safari&&after&&after.contentEditable=="false")return setEditable(after);if((!after||after.contentEditable=="false")&&(!before||before.contentEditable=="false")){if(after)return setEditable(after);else if(before)return setEditable(before)}}function setEditable(element){element.contentEditable="true";if(safari&&element.draggable){element.draggable=false;element.wasDraggable=true}return element}function resetEditable(element){element.contentEditable="false";if(element.wasDraggable){element.draggable=true;element.wasDraggable=null}}function removeClassOnSelectionChange(view){let doc2=view.dom.ownerDocument;doc2.removeEventListener("selectionchange",view.input.hideSelectionGuard);let domSel=view.domSelectionRange();let node2=domSel.anchorNode,offset2=domSel.anchorOffset;doc2.addEventListener("selectionchange",view.input.hideSelectionGuard=()=>{if(domSel.anchorNode!=node2||domSel.anchorOffset!=offset2){doc2.removeEventListener("selectionchange",view.input.hideSelectionGuard);setTimeout((()=>{if(!editorOwnsSelection(view)||view.state.selection.visible)view.dom.classList.remove("ProseMirror-hideselection")}),20)}})}function selectCursorWrapper(view){let domSel=view.domSelection(),range=document.createRange();if(!domSel)return;let node2=view.cursorWrapper.dom,img=node2.nodeName=="IMG";if(img)range.setStart(node2.parentNode,domIndex(node2)+1);else range.setStart(node2,0);range.collapse(true);domSel.removeAllRanges();domSel.addRange(range);if(!img&&!view.state.selection.visible&&ie$1&&ie_version<=11){node2.disabled=true;node2.disabled=false}}function syncNodeSelection(view,sel){if(sel instanceof NodeSelection){let desc=view.docView.descAt(sel.from);if(desc!=view.lastSelectedViewDesc){clearNodeSelection(view);if(desc)desc.selectNode();view.lastSelectedViewDesc=desc}}else{clearNodeSelection(view)}}function clearNodeSelection(view){if(view.lastSelectedViewDesc){if(view.lastSelectedViewDesc.parent)view.lastSelectedViewDesc.deselectNode();view.lastSelectedViewDesc=void 0}}function selectionBetween(view,$anchor,$head,bias){return view.someProp("createSelectionBetween",(f=>f(view,$anchor,$head)))||TextSelection.between($anchor,$head,bias)}function hasFocusAndSelection(view){if(view.editable&&!view.hasFocus())return false;return hasSelection(view)}function hasSelection(view){let sel=view.domSelectionRange();if(!sel.anchorNode)return false;try{return view.dom.contains(sel.anchorNode.nodeType==3?sel.anchorNode.parentNode:sel.anchorNode)&&(view.editable||view.dom.contains(sel.focusNode.nodeType==3?sel.focusNode.parentNode:sel.focusNode))}catch(_){return false}}function anchorInRightPlace(view){let anchorDOM=view.docView.domFromPos(view.state.selection.anchor,0);let domSel=view.domSelectionRange();return isEquivalentPosition(anchorDOM.node,anchorDOM.offset,domSel.anchorNode,domSel.anchorOffset)}function moveSelectionBlock(state,dir){let{$anchor:$anchor,$head:$head}=state.selection;let $side=dir>0?$anchor.max($head):$anchor.min($head);let $start=!$side.parent.inlineContent?$side:$side.depth?state.doc.resolve(dir>0?$side.after():$side.before()):null;return $start&&Selection.findFrom($start,dir)}function apply(view,sel){view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());return true}function selectHorizontally(view,dir,mods){let sel=view.state.selection;if(sel instanceof TextSelection){if(mods.indexOf("s")>-1){let{$head:$head}=sel,node2=$head.textOffset?null:dir<0?$head.nodeBefore:$head.nodeAfter;if(!node2||node2.isText||!node2.isLeaf)return false;let $newHead=view.state.doc.resolve($head.pos+node2.nodeSize*(dir<0?-1:1));return apply(view,new TextSelection(sel.$anchor,$newHead))}else if(!sel.empty){return false}else if(view.endOfTextblock(dir>0?"forward":"backward")){let next2=moveSelectionBlock(view.state,dir);if(next2&&next2 instanceof NodeSelection)return apply(view,next2);return false}else if(!(mac$2&&mods.indexOf("m")>-1)){let $head=sel.$head,node2=$head.textOffset?null:dir<0?$head.nodeBefore:$head.nodeAfter,desc;if(!node2||node2.isText)return false;let nodePos=dir<0?$head.pos-node2.nodeSize:$head.pos;if(!(node2.isAtom||(desc=view.docView.descAt(nodePos))&&!desc.contentDOM))return false;if(NodeSelection.isSelectable(node2)){return apply(view,new NodeSelection(dir<0?view.state.doc.resolve($head.pos-node2.nodeSize):$head))}else if(webkit){return apply(view,new TextSelection(view.state.doc.resolve(dir<0?nodePos:nodePos+node2.nodeSize)))}else{return false}}}else if(sel instanceof NodeSelection&&sel.node.isInline){return apply(view,new TextSelection(dir>0?sel.$to:sel.$from))}else{let next2=moveSelectionBlock(view.state,dir);if(next2)return apply(view,next2);return false}}function nodeLen(node2){return node2.nodeType==3?node2.nodeValue.length:node2.childNodes.length}function isIgnorable(dom,dir){let desc=dom.pmViewDesc;return desc&&desc.size==0&&(dir<0||dom.nextSibling||dom.nodeName!="BR")}function skipIgnoredNodes(view,dir){return dir<0?skipIgnoredNodesBefore(view):skipIgnoredNodesAfter(view)}function skipIgnoredNodesBefore(view){let sel=view.domSelectionRange();let node2=sel.focusNode,offset2=sel.focusOffset;if(!node2)return;let moveNode,moveOffset,force=false;if(gecko&&node2.nodeType==1&&offset2<nodeLen(node2)&&isIgnorable(node2.childNodes[offset2],-1))force=true;for(;;){if(offset2>0){if(node2.nodeType!=1){break}else{let before=node2.childNodes[offset2-1];if(isIgnorable(before,-1)){moveNode=node2;moveOffset=--offset2}else if(before.nodeType==3){node2=before;offset2=node2.nodeValue.length}else break}}else if(isBlockNode(node2)){break}else{let prev2=node2.previousSibling;while(prev2&&isIgnorable(prev2,-1)){moveNode=node2.parentNode;moveOffset=domIndex(prev2);prev2=prev2.previousSibling}if(!prev2){node2=node2.parentNode;if(node2==view.dom)break;offset2=0}else{node2=prev2;offset2=nodeLen(node2)}}}if(force)setSelFocus(view,node2,offset2);else if(moveNode)setSelFocus(view,moveNode,moveOffset)}function skipIgnoredNodesAfter(view){let sel=view.domSelectionRange();let node2=sel.focusNode,offset2=sel.focusOffset;if(!node2)return;let len=nodeLen(node2);let moveNode,moveOffset;for(;;){if(offset2<len){if(node2.nodeType!=1)break;let after=node2.childNodes[offset2];if(isIgnorable(after,1)){moveNode=node2;moveOffset=++offset2}else break}else if(isBlockNode(node2)){break}else{let next2=node2.nextSibling;while(next2&&isIgnorable(next2,1)){moveNode=next2.parentNode;moveOffset=domIndex(next2)+1;next2=next2.nextSibling}if(!next2){node2=node2.parentNode;if(node2==view.dom)break;offset2=len=0}else{node2=next2;offset2=0;len=nodeLen(node2)}}}if(moveNode)setSelFocus(view,moveNode,moveOffset)}function isBlockNode(dom){let desc=dom.pmViewDesc;return desc&&desc.node&&desc.node.isBlock}function textNodeAfter(node2,offset2){while(node2&&offset2==node2.childNodes.length&&!hasBlockDesc(node2)){offset2=domIndex(node2)+1;node2=node2.parentNode}while(node2&&offset2<node2.childNodes.length){let next2=node2.childNodes[offset2];if(next2.nodeType==3)return next2;if(next2.nodeType==1&&next2.contentEditable=="false")break;node2=next2;offset2=0}}function textNodeBefore(node2,offset2){while(node2&&!offset2&&!hasBlockDesc(node2)){offset2=domIndex(node2);node2=node2.parentNode}while(node2&&offset2){let next2=node2.childNodes[offset2-1];if(next2.nodeType==3)return next2;if(next2.nodeType==1&&next2.contentEditable=="false")break;node2=next2;offset2=node2.childNodes.length}}function setSelFocus(view,node2,offset2){if(node2.nodeType!=3){let before,after;if(after=textNodeAfter(node2,offset2)){node2=after;offset2=0}else if(before=textNodeBefore(node2,offset2)){node2=before;offset2=before.nodeValue.length}}let sel=view.domSelection();if(!sel)return;if(selectionCollapsed(sel)){let range=document.createRange();range.setEnd(node2,offset2);range.setStart(node2,offset2);sel.removeAllRanges();sel.addRange(range)}else if(sel.extend){sel.extend(node2,offset2)}view.domObserver.setCurSelection();let{state:state}=view;setTimeout((()=>{if(view.state==state)selectionToDOM(view)}),50)}function findDirection(view,pos){let $pos=view.state.doc.resolve(pos);if(!(chrome||windows)&&$pos.parent.inlineContent){let coords=view.coordsAtPos(pos);if(pos>$pos.start()){let before=view.coordsAtPos(pos-1);let mid=(before.top+before.bottom)/2;if(mid>coords.top&&mid<coords.bottom&&Math.abs(before.left-coords.left)>1)return before.left<coords.left?"ltr":"rtl"}if(pos<$pos.end()){let after=view.coordsAtPos(pos+1);let mid=(after.top+after.bottom)/2;if(mid>coords.top&&mid<coords.bottom&&Math.abs(after.left-coords.left)>1)return after.left>coords.left?"ltr":"rtl"}}let computed=getComputedStyle(view.dom).direction;return computed=="rtl"?"rtl":"ltr"}function selectVertically(view,dir,mods){let sel=view.state.selection;if(sel instanceof TextSelection&&!sel.empty||mods.indexOf("s")>-1)return false;if(mac$2&&mods.indexOf("m")>-1)return false;let{$from:$from,$to:$to}=sel;if(!$from.parent.inlineContent||view.endOfTextblock(dir<0?"up":"down")){let next2=moveSelectionBlock(view.state,dir);if(next2&&next2 instanceof NodeSelection)return apply(view,next2)}if(!$from.parent.inlineContent){let side=dir<0?$from:$to;let beyond=sel instanceof AllSelection?Selection.near(side,dir):Selection.findFrom(side,dir);return beyond?apply(view,beyond):false}return false}function stopNativeHorizontalDelete(view,dir){if(!(view.state.selection instanceof TextSelection))return true;let{$head:$head,$anchor:$anchor,empty:empty2}=view.state.selection;if(!$head.sameParent($anchor))return true;if(!empty2)return false;if(view.endOfTextblock(dir>0?"forward":"backward"))return true;let nextNode=!$head.textOffset&&(dir<0?$head.nodeBefore:$head.nodeAfter);if(nextNode&&!nextNode.isText){let tr2=view.state.tr;if(dir<0)tr2.delete($head.pos-nextNode.nodeSize,$head.pos);else tr2.delete($head.pos,$head.pos+nextNode.nodeSize);view.dispatch(tr2);return true}return false}function switchEditable(view,node2,state){view.domObserver.stop();node2.contentEditable=state;view.domObserver.start()}function safariDownArrowBug(view){if(!safari||view.state.selection.$head.parentOffset>0)return false;let{focusNode:focusNode,focusOffset:focusOffset}=view.domSelectionRange();if(focusNode&&focusNode.nodeType==1&&focusOffset==0&&focusNode.firstChild&&focusNode.firstChild.contentEditable=="false"){let child=focusNode.firstChild;switchEditable(view,child,"true");setTimeout((()=>switchEditable(view,child,"false")),20)}return false}function getMods(event2){let result="";if(event2.ctrlKey)result+="c";if(event2.metaKey)result+="m";if(event2.altKey)result+="a";if(event2.shiftKey)result+="s";return result}function captureKeyDown(view,event2){let code=event2.keyCode,mods=getMods(event2);if(code==8||mac$2&&code==72&&mods=="c"){return stopNativeHorizontalDelete(view,-1)||skipIgnoredNodes(view,-1)}else if(code==46&&!event2.shiftKey||mac$2&&code==68&&mods=="c"){return stopNativeHorizontalDelete(view,1)||skipIgnoredNodes(view,1)}else if(code==13||code==27){return true}else if(code==37||mac$2&&code==66&&mods=="c"){let dir=code==37?findDirection(view,view.state.selection.from)=="ltr"?-1:1:-1;return selectHorizontally(view,dir,mods)||skipIgnoredNodes(view,dir)}else if(code==39||mac$2&&code==70&&mods=="c"){let dir=code==39?findDirection(view,view.state.selection.from)=="ltr"?1:-1:1;return selectHorizontally(view,dir,mods)||skipIgnoredNodes(view,dir)}else if(code==38||mac$2&&code==80&&mods=="c"){return selectVertically(view,-1,mods)||skipIgnoredNodes(view,-1)}else if(code==40||mac$2&&code==78&&mods=="c"){return safariDownArrowBug(view)||selectVertically(view,1,mods)||skipIgnoredNodes(view,1)}else if(mods==(mac$2?"m":"c")&&(code==66||code==73||code==89||code==90)){return true}return false}function serializeForClipboard(view,slice3){view.someProp("transformCopied",(f=>{slice3=f(slice3,view)}));let context=[],{content:content,openStart:openStart,openEnd:openEnd}=slice3;while(openStart>1&&openEnd>1&&content.childCount==1&&content.firstChild.childCount==1){openStart--;openEnd--;let node2=content.firstChild;context.push(node2.type.name,node2.attrs!=node2.type.defaultAttrs?node2.attrs:null);content=node2.content}let serializer=view.someProp("clipboardSerializer")||DOMSerializer.fromSchema(view.state.schema);let doc2=detachedDoc(),wrap2=doc2.createElement("div");wrap2.appendChild(serializer.serializeFragment(content,{document:doc2}));let firstChild=wrap2.firstChild,needsWrap,wrappers=0;while(firstChild&&firstChild.nodeType==1&&(needsWrap=wrapMap[firstChild.nodeName.toLowerCase()])){for(let i=needsWrap.length-1;i>=0;i--){let wrapper=doc2.createElement(needsWrap[i]);while(wrap2.firstChild)wrapper.appendChild(wrap2.firstChild);wrap2.appendChild(wrapper);wrappers++}firstChild=wrap2.firstChild}if(firstChild&&firstChild.nodeType==1)firstChild.setAttribute("data-pm-slice",`${openStart} ${openEnd}${wrappers?` -${wrappers}`:""} ${JSON.stringify(context)}`);let text=view.someProp("clipboardTextSerializer",(f=>f(slice3,view)))||slice3.content.textBetween(0,slice3.content.size,"\n\n");return{dom:wrap2,text:text,slice:slice3}}function parseFromClipboard(view,text,html,plainText,$context){let inCode=$context.parent.type.spec.code;let dom,slice3;if(!html&&!text)return null;let asText=text&&(plainText||inCode||!html);if(asText){view.someProp("transformPastedText",(f=>{text=f(text,inCode||plainText,view)}));if(inCode)return text?new Slice(Fragment.from(view.state.schema.text(text.replace(/\r\n?/g,"\n"))),0,0):Slice.empty;let parsed=view.someProp("clipboardTextParser",(f=>f(text,$context,plainText,view)));if(parsed){slice3=parsed}else{let marks=$context.marks();let{schema:schema}=view.state,serializer=DOMSerializer.fromSchema(schema);dom=document.createElement("div");text.split(/(?:\r\n?|\n)+/).forEach((block=>{let p=dom.appendChild(document.createElement("p"));if(block)p.appendChild(serializer.serializeNode(schema.text(block,marks)))}))}}else{view.someProp("transformPastedHTML",(f=>{html=f(html,view)}));dom=readHTML(html);if(webkit)restoreReplacedSpaces(dom)}let contextNode=dom&&dom.querySelector("[data-pm-slice]");let sliceData=contextNode&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(contextNode.getAttribute("data-pm-slice")||"");if(sliceData&&sliceData[3])for(let i=+sliceData[3];i>0;i--){let child=dom.firstChild;while(child&&child.nodeType!=1)child=child.nextSibling;if(!child)break;dom=child}if(!slice3){let parser=view.someProp("clipboardParser")||view.someProp("domParser")||DOMParser$1.fromSchema(view.state.schema);slice3=parser.parseSlice(dom,{preserveWhitespace:!!(asText||sliceData),context:$context,ruleFromNode(dom2){if(dom2.nodeName=="BR"&&!dom2.nextSibling&&dom2.parentNode&&!inlineParents.test(dom2.parentNode.nodeName))return{ignore:true};return null}})}if(sliceData){slice3=addContext(closeSlice(slice3,+sliceData[1],+sliceData[2]),sliceData[4])}else{slice3=Slice.maxOpen(normalizeSiblings(slice3.content,$context),true);if(slice3.openStart||slice3.openEnd){let openStart=0,openEnd=0;for(let node2=slice3.content.firstChild;openStart<slice3.openStart&&!node2.type.spec.isolating;openStart++,node2=node2.firstChild){}for(let node2=slice3.content.lastChild;openEnd<slice3.openEnd&&!node2.type.spec.isolating;openEnd++,node2=node2.lastChild){}slice3=closeSlice(slice3,openStart,openEnd)}}view.someProp("transformPasted",(f=>{slice3=f(slice3,view)}));return slice3}const inlineParents=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function normalizeSiblings(fragment,$context){if(fragment.childCount<2)return fragment;for(let d=$context.depth;d>=0;d--){let parent=$context.node(d);let match2=parent.contentMatchAt($context.index(d));let lastWrap,result=[];fragment.forEach((node2=>{if(!result)return;let wrap2=match2.findWrapping(node2.type),inLast;if(!wrap2)return result=null;if(inLast=result.length&&lastWrap.length&&addToSibling(wrap2,lastWrap,node2,result[result.length-1],0)){result[result.length-1]=inLast}else{if(result.length)result[result.length-1]=closeRight(result[result.length-1],lastWrap.length);let wrapped=withWrappers(node2,wrap2);result.push(wrapped);match2=match2.matchType(wrapped.type);lastWrap=wrap2}}));if(result)return Fragment.from(result)}return fragment}function withWrappers(node2,wrap2,from3=0){for(let i=wrap2.length-1;i>=from3;i--)node2=wrap2[i].create(null,Fragment.from(node2));return node2}function addToSibling(wrap2,lastWrap,node2,sibling,depth){if(depth<wrap2.length&&depth<lastWrap.length&&wrap2[depth]==lastWrap[depth]){let inner=addToSibling(wrap2,lastWrap,node2,sibling.lastChild,depth+1);if(inner)return sibling.copy(sibling.content.replaceChild(sibling.childCount-1,inner));let match2=sibling.contentMatchAt(sibling.childCount);if(match2.matchType(depth==wrap2.length-1?node2.type:wrap2[depth+1]))return sibling.copy(sibling.content.append(Fragment.from(withWrappers(node2,wrap2,depth+1))))}}function closeRight(node2,depth){if(depth==0)return node2;let fragment=node2.content.replaceChild(node2.childCount-1,closeRight(node2.lastChild,depth-1));let fill=node2.contentMatchAt(node2.childCount).fillBefore(Fragment.empty,true);return node2.copy(fragment.append(fill))}function closeRange(fragment,side,from3,to,depth,openEnd){let node2=side<0?fragment.firstChild:fragment.lastChild,inner=node2.content;if(fragment.childCount>1)openEnd=0;if(depth<to-1)inner=closeRange(inner,side,from3,to,depth+1,openEnd);if(depth>=from3)inner=side<0?node2.contentMatchAt(0).fillBefore(inner,openEnd<=depth).append(inner):inner.append(node2.contentMatchAt(node2.childCount).fillBefore(Fragment.empty,true));return fragment.replaceChild(side<0?0:fragment.childCount-1,node2.copy(inner))}function closeSlice(slice3,openStart,openEnd){if(openStart<slice3.openStart)slice3=new Slice(closeRange(slice3.content,-1,openStart,slice3.openStart,0,slice3.openEnd),openStart,slice3.openEnd);if(openEnd<slice3.openEnd)slice3=new Slice(closeRange(slice3.content,1,openEnd,slice3.openEnd,0,0),slice3.openStart,openEnd);return slice3}const wrapMap={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let _detachedDoc=null;function detachedDoc(){return _detachedDoc||(_detachedDoc=document.implementation.createHTMLDocument("title"))}let _policy=null;function maybeWrapTrusted(html){let trustedTypes=window.trustedTypes;if(!trustedTypes)return html;if(!_policy)_policy=trustedTypes.createPolicy("ProseMirrorClipboard",{createHTML:s=>s});return _policy.createHTML(html)}function readHTML(html){let metas=/^(\s*<meta [^>]*>)*/.exec(html);if(metas)html=html.slice(metas[0].length);let elt=detachedDoc().createElement("div");let firstTag=/<([a-z][^>\s]+)/i.exec(html),wrap2;if(wrap2=firstTag&&wrapMap[firstTag[1].toLowerCase()])html=wrap2.map((n=>"<"+n+">")).join("")+html+wrap2.map((n=>"</"+n+">")).reverse().join("");elt.innerHTML=maybeWrapTrusted(html);if(wrap2)for(let i=0;i<wrap2.length;i++)elt=elt.querySelector(wrap2[i])||elt;return elt}function restoreReplacedSpaces(dom){let nodes=dom.querySelectorAll(chrome?"span:not([class]):not([style])":"span.Apple-converted-space");for(let i=0;i<nodes.length;i++){let node2=nodes[i];if(node2.childNodes.length==1&&node2.textContent==" "&&node2.parentNode)node2.parentNode.replaceChild(dom.ownerDocument.createTextNode(" "),node2)}}function addContext(slice3,context){if(!slice3.size)return slice3;let schema=slice3.content.firstChild.type.schema,array;try{array=JSON.parse(context)}catch(e){return slice3}let{content:content,openStart:openStart,openEnd:openEnd}=slice3;for(let i=array.length-2;i>=0;i-=2){let type=schema.nodes[array[i]];if(!type||type.hasRequiredAttrs())break;content=Fragment.from(type.create(array[i+1],content));openStart++;openEnd++}return new Slice(content,openStart,openEnd)}const handlers={};const editHandlers={};const passiveHandlers={touchstart:true,touchmove:true};class InputState{constructor(){this.shiftKey=false;this.mouseDown=null;this.lastKeyCode=null;this.lastKeyCodeTime=0;this.lastClick={time:0,x:0,y:0,type:""};this.lastSelectionOrigin=null;this.lastSelectionTime=0;this.lastIOSEnter=0;this.lastIOSEnterFallbackTimeout=-1;this.lastFocus=0;this.lastTouch=0;this.lastChromeDelete=0;this.composing=false;this.compositionNode=null;this.composingTimeout=-1;this.compositionNodes=[];this.compositionEndedAt=-2e8;this.compositionID=1;this.compositionPendingChanges=0;this.domChangeCount=0;this.eventHandlers=Object.create(null);this.hideSelectionGuard=null}}function initInput(view){for(let event2 in handlers){let handler=handlers[event2];view.dom.addEventListener(event2,view.input.eventHandlers[event2]=event3=>{if(eventBelongsToView(view,event3)&&!runCustomHandler(view,event3)&&(view.editable||!(event3.type in editHandlers)))handler(view,event3)},passiveHandlers[event2]?{passive:true}:void 0)}if(safari)view.dom.addEventListener("input",(()=>null));ensureListeners(view)}function setSelectionOrigin(view,origin){view.input.lastSelectionOrigin=origin;view.input.lastSelectionTime=Date.now()}function destroyInput(view){view.domObserver.stop();for(let type in view.input.eventHandlers)view.dom.removeEventListener(type,view.input.eventHandlers[type]);clearTimeout(view.input.composingTimeout);clearTimeout(view.input.lastIOSEnterFallbackTimeout)}function ensureListeners(view){view.someProp("handleDOMEvents",(currentHandlers=>{for(let type in currentHandlers)if(!view.input.eventHandlers[type])view.dom.addEventListener(type,view.input.eventHandlers[type]=event2=>runCustomHandler(view,event2))}))}function runCustomHandler(view,event2){return view.someProp("handleDOMEvents",(handlers2=>{let handler=handlers2[event2.type];return handler?handler(view,event2)||event2.defaultPrevented:false}))}function eventBelongsToView(view,event2){if(!event2.bubbles)return true;if(event2.defaultPrevented)return false;for(let node2=event2.target;node2!=view.dom;node2=node2.parentNode)if(!node2||node2.nodeType==11||node2.pmViewDesc&&node2.pmViewDesc.stopEvent(event2))return false;return true}function dispatchEvent(view,event2){if(!runCustomHandler(view,event2)&&handlers[event2.type]&&(view.editable||!(event2.type in editHandlers)))handlers[event2.type](view,event2)}editHandlers.keydown=(view,_event)=>{let event2=_event;view.input.shiftKey=event2.keyCode==16||event2.shiftKey;if(inOrNearComposition(view,event2))return;view.input.lastKeyCode=event2.keyCode;view.input.lastKeyCodeTime=Date.now();if(android&&chrome&&event2.keyCode==13)return;if(event2.keyCode!=229)view.domObserver.forceFlush();if(ios&&event2.keyCode==13&&!event2.ctrlKey&&!event2.altKey&&!event2.metaKey){let now=Date.now();view.input.lastIOSEnter=now;view.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{if(view.input.lastIOSEnter==now){view.someProp("handleKeyDown",(f=>f(view,keyEvent(13,"Enter"))));view.input.lastIOSEnter=0}}),200)}else if(view.someProp("handleKeyDown",(f=>f(view,event2)))||captureKeyDown(view,event2)){event2.preventDefault()}else{setSelectionOrigin(view,"key")}};editHandlers.keyup=(view,event2)=>{if(event2.keyCode==16)view.input.shiftKey=false};editHandlers.keypress=(view,_event)=>{let event2=_event;if(inOrNearComposition(view,event2)||!event2.charCode||event2.ctrlKey&&!event2.altKey||mac$2&&event2.metaKey)return;if(view.someProp("handleKeyPress",(f=>f(view,event2)))){event2.preventDefault();return}let sel=view.state.selection;if(!(sel instanceof TextSelection)||!sel.$from.sameParent(sel.$to)){let text=String.fromCharCode(event2.charCode);if(!/[\r\n]/.test(text)&&!view.someProp("handleTextInput",(f=>f(view,sel.$from.pos,sel.$to.pos,text))))view.dispatch(view.state.tr.insertText(text).scrollIntoView());event2.preventDefault()}};function eventCoords(event2){return{left:event2.clientX,top:event2.clientY}}function isNear(event2,click){let dx=click.x-event2.clientX,dy=click.y-event2.clientY;return dx*dx+dy*dy<100}function runHandlerOnContext(view,propName,pos,inside,event2){if(inside==-1)return false;let $pos=view.state.doc.resolve(inside);for(let i=$pos.depth+1;i>0;i--){if(view.someProp(propName,(f=>i>$pos.depth?f(view,pos,$pos.nodeAfter,$pos.before(i),event2,true):f(view,pos,$pos.node(i),$pos.before(i),event2,false))))return true}return false}function updateSelection(view,selection,origin){if(!view.focused)view.focus();if(view.state.selection.eq(selection))return;let tr2=view.state.tr.setSelection(selection);tr2.setMeta("pointer",true);view.dispatch(tr2)}function selectClickedLeaf(view,inside){if(inside==-1)return false;let $pos=view.state.doc.resolve(inside),node2=$pos.nodeAfter;if(node2&&node2.isAtom&&NodeSelection.isSelectable(node2)){updateSelection(view,new NodeSelection($pos));return true}return false}function selectClickedNode(view,inside){if(inside==-1)return false;let sel=view.state.selection,selectedNode,selectAt;if(sel instanceof NodeSelection)selectedNode=sel.node;let $pos=view.state.doc.resolve(inside);for(let i=$pos.depth+1;i>0;i--){let node2=i>$pos.depth?$pos.nodeAfter:$pos.node(i);if(NodeSelection.isSelectable(node2)){if(selectedNode&&sel.$from.depth>0&&i>=sel.$from.depth&&$pos.before(sel.$from.depth+1)==sel.$from.pos)selectAt=$pos.before(sel.$from.depth);else selectAt=$pos.before(i);break}}if(selectAt!=null){updateSelection(view,NodeSelection.create(view.state.doc,selectAt));return true}else{return false}}function handleSingleClick(view,pos,inside,event2,selectNode){return runHandlerOnContext(view,"handleClickOn",pos,inside,event2)||view.someProp("handleClick",(f=>f(view,pos,event2)))||(selectNode?selectClickedNode(view,inside):selectClickedLeaf(view,inside))}function handleDoubleClick(view,pos,inside,event2){return runHandlerOnContext(view,"handleDoubleClickOn",pos,inside,event2)||view.someProp("handleDoubleClick",(f=>f(view,pos,event2)))}function handleTripleClick(view,pos,inside,event2){return runHandlerOnContext(view,"handleTripleClickOn",pos,inside,event2)||view.someProp("handleTripleClick",(f=>f(view,pos,event2)))||defaultTripleClick(view,inside,event2)}function defaultTripleClick(view,inside,event2){if(event2.button!=0)return false;let doc2=view.state.doc;if(inside==-1){if(doc2.inlineContent){updateSelection(view,TextSelection.create(doc2,0,doc2.content.size));return true}return false}let $pos=doc2.resolve(inside);for(let i=$pos.depth+1;i>0;i--){let node2=i>$pos.depth?$pos.nodeAfter:$pos.node(i);let nodePos=$pos.before(i);if(node2.inlineContent)updateSelection(view,TextSelection.create(doc2,nodePos+1,nodePos+1+node2.content.size));else if(NodeSelection.isSelectable(node2))updateSelection(view,NodeSelection.create(doc2,nodePos));else continue;return true}}function forceDOMFlush(view){return endComposition(view)}const selectNodeModifier=mac$2?"metaKey":"ctrlKey";handlers.mousedown=(view,_event)=>{let event2=_event;view.input.shiftKey=event2.shiftKey;let flushed=forceDOMFlush(view);let now=Date.now(),type="singleClick";if(now-view.input.lastClick.time<500&&isNear(event2,view.input.lastClick)&&!event2[selectNodeModifier]){if(view.input.lastClick.type=="singleClick")type="doubleClick";else if(view.input.lastClick.type=="doubleClick")type="tripleClick"}view.input.lastClick={time:now,x:event2.clientX,y:event2.clientY,type:type};let pos=view.posAtCoords(eventCoords(event2));if(!pos)return;if(type=="singleClick"){if(view.input.mouseDown)view.input.mouseDown.done();view.input.mouseDown=new MouseDown(view,pos,event2,!!flushed)}else if((type=="doubleClick"?handleDoubleClick:handleTripleClick)(view,pos.pos,pos.inside,event2)){event2.preventDefault()}else{setSelectionOrigin(view,"pointer")}};class MouseDown{constructor(view,pos,event2,flushed){this.view=view;this.pos=pos;this.event=event2;this.flushed=flushed;this.delayedSelectionSync=false;this.mightDrag=null;this.startDoc=view.state.doc;this.selectNode=!!event2[selectNodeModifier];this.allowDefault=event2.shiftKey;let targetNode,targetPos;if(pos.inside>-1){targetNode=view.state.doc.nodeAt(pos.inside);targetPos=pos.inside}else{let $pos=view.state.doc.resolve(pos.pos);targetNode=$pos.parent;targetPos=$pos.depth?$pos.before():0}const target=flushed?null:event2.target;const targetDesc=target?view.docView.nearestDesc(target,true):null;this.target=targetDesc&&targetDesc.dom.nodeType==1?targetDesc.dom:null;let{selection:selection}=view.state;if(event2.button==0&&targetNode.type.spec.draggable&&targetNode.type.spec.selectable!==false||selection instanceof NodeSelection&&selection.from<=targetPos&&selection.to>targetPos)this.mightDrag={node:targetNode,pos:targetPos,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gecko&&!this.target.hasAttribute("contentEditable"))};if(this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)){this.view.domObserver.stop();if(this.mightDrag.addAttr)this.target.draggable=true;if(this.mightDrag.setUneditable)setTimeout((()=>{if(this.view.input.mouseDown==this)this.target.setAttribute("contentEditable","false")}),20);this.view.domObserver.start()}view.root.addEventListener("mouseup",this.up=this.up.bind(this));view.root.addEventListener("mousemove",this.move=this.move.bind(this));setSelectionOrigin(view,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up);this.view.root.removeEventListener("mousemove",this.move);if(this.mightDrag&&this.target){this.view.domObserver.stop();if(this.mightDrag.addAttr)this.target.removeAttribute("draggable");if(this.mightDrag.setUneditable)this.target.removeAttribute("contentEditable");this.view.domObserver.start()}if(this.delayedSelectionSync)setTimeout((()=>selectionToDOM(this.view)));this.view.input.mouseDown=null}up(event2){this.done();if(!this.view.dom.contains(event2.target))return;let pos=this.pos;if(this.view.state.doc!=this.startDoc)pos=this.view.posAtCoords(eventCoords(event2));this.updateAllowDefault(event2);if(this.allowDefault||!pos){setSelectionOrigin(this.view,"pointer")}else if(handleSingleClick(this.view,pos.pos,pos.inside,event2,this.selectNode)){event2.preventDefault()}else if(event2.button==0&&(this.flushed||safari&&this.mightDrag&&!this.mightDrag.node.isAtom||chrome&&!this.view.state.selection.visible&&Math.min(Math.abs(pos.pos-this.view.state.selection.from),Math.abs(pos.pos-this.view.state.selection.to))<=2)){updateSelection(this.view,Selection.near(this.view.state.doc.resolve(pos.pos)));event2.preventDefault()}else{setSelectionOrigin(this.view,"pointer")}}move(event2){this.updateAllowDefault(event2);setSelectionOrigin(this.view,"pointer");if(event2.buttons==0)this.done()}updateAllowDefault(event2){if(!this.allowDefault&&(Math.abs(this.event.x-event2.clientX)>4||Math.abs(this.event.y-event2.clientY)>4))this.allowDefault=true}}handlers.touchstart=view=>{view.input.lastTouch=Date.now();forceDOMFlush(view);setSelectionOrigin(view,"pointer")};handlers.touchmove=view=>{view.input.lastTouch=Date.now();setSelectionOrigin(view,"pointer")};handlers.contextmenu=view=>forceDOMFlush(view);function inOrNearComposition(view,event2){if(view.composing)return true;if(safari&&Math.abs(event2.timeStamp-view.input.compositionEndedAt)<500){view.input.compositionEndedAt=-2e8;return true}return false}const timeoutComposition=android?5e3:-1;editHandlers.compositionstart=editHandlers.compositionupdate=view=>{if(!view.composing){view.domObserver.flush();let{state:state}=view,$pos=state.selection.$to;if(state.selection instanceof TextSelection&&(state.storedMarks||!$pos.textOffset&&$pos.parentOffset&&$pos.nodeBefore.marks.some((m=>m.type.spec.inclusive===false)))){view.markCursor=view.state.storedMarks||$pos.marks();endComposition(view,true);view.markCursor=null}else{endComposition(view,!state.selection.empty);if(gecko&&state.selection.empty&&$pos.parentOffset&&!$pos.textOffset&&$pos.nodeBefore.marks.length){let sel=view.domSelectionRange();for(let node2=sel.focusNode,offset2=sel.focusOffset;node2&&node2.nodeType==1&&offset2!=0;){let before=offset2<0?node2.lastChild:node2.childNodes[offset2-1];if(!before)break;if(before.nodeType==3){let sel2=view.domSelection();if(sel2)sel2.collapse(before,before.nodeValue.length);break}else{node2=before;offset2=-1}}}}view.input.composing=true}scheduleComposeEnd(view,timeoutComposition)};editHandlers.compositionend=(view,event2)=>{if(view.composing){view.input.composing=false;view.input.compositionEndedAt=event2.timeStamp;view.input.compositionPendingChanges=view.domObserver.pendingRecords().length?view.input.compositionID:0;view.input.compositionNode=null;if(view.input.compositionPendingChanges)Promise.resolve().then((()=>view.domObserver.flush()));view.input.compositionID++;scheduleComposeEnd(view,20)}};function scheduleComposeEnd(view,delay){clearTimeout(view.input.composingTimeout);if(delay>-1)view.input.composingTimeout=setTimeout((()=>endComposition(view)),delay)}function clearComposition(view){if(view.composing){view.input.composing=false;view.input.compositionEndedAt=timestampFromCustomEvent()}while(view.input.compositionNodes.length>0)view.input.compositionNodes.pop().markParentsDirty()}function findCompositionNode(view){let sel=view.domSelectionRange();if(!sel.focusNode)return null;let textBefore=textNodeBefore$1(sel.focusNode,sel.focusOffset);let textAfter=textNodeAfter$1(sel.focusNode,sel.focusOffset);if(textBefore&&textAfter&&textBefore!=textAfter){let descAfter=textAfter.pmViewDesc,lastChanged=view.domObserver.lastChangedTextNode;if(textBefore==lastChanged||textAfter==lastChanged)return lastChanged;if(!descAfter||!descAfter.isText(textAfter.nodeValue)){return textAfter}else if(view.input.compositionNode==textAfter){let descBefore=textBefore.pmViewDesc;if(!(!descBefore||!descBefore.isText(textBefore.nodeValue)))return textAfter}}return textBefore||textAfter}function timestampFromCustomEvent(){let event2=document.createEvent("Event");event2.initEvent("event",true,true);return event2.timeStamp}function endComposition(view,restarting=false){if(android&&view.domObserver.flushingSoon>=0)return;view.domObserver.forceFlush();clearComposition(view);if(restarting||view.docView&&view.docView.dirty){let sel=selectionFromDOM(view);if(sel&&!sel.eq(view.state.selection))view.dispatch(view.state.tr.setSelection(sel));else if((view.markCursor||restarting)&&!view.state.selection.empty)view.dispatch(view.state.tr.deleteSelection());else view.updateState(view.state);return true}return false}function captureCopy(view,dom){if(!view.dom.parentNode)return;let wrap2=view.dom.parentNode.appendChild(document.createElement("div"));wrap2.appendChild(dom);wrap2.style.cssText="position: fixed; left: -10000px; top: 10px";let sel=getSelection(),range=document.createRange();range.selectNodeContents(dom);view.dom.blur();sel.removeAllRanges();sel.addRange(range);setTimeout((()=>{if(wrap2.parentNode)wrap2.parentNode.removeChild(wrap2);view.focus()}),50)}const brokenClipboardAPI=ie$1&&ie_version<15||ios&&webkit_version<604;handlers.copy=editHandlers.cut=(view,_event)=>{let event2=_event;let sel=view.state.selection,cut2=event2.type=="cut";if(sel.empty)return;let data=brokenClipboardAPI?null:event2.clipboardData;let slice3=sel.content(),{dom:dom,text:text}=serializeForClipboard(view,slice3);if(data){event2.preventDefault();data.clearData();data.setData("text/html",dom.innerHTML);data.setData("text/plain",text)}else{captureCopy(view,dom)}if(cut2)view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function sliceSingleNode(slice3){return slice3.openStart==0&&slice3.openEnd==0&&slice3.content.childCount==1?slice3.content.firstChild:null}function capturePaste(view,event2){if(!view.dom.parentNode)return;let plainText=view.input.shiftKey||view.state.selection.$from.parent.type.spec.code;let target=view.dom.parentNode.appendChild(document.createElement(plainText?"textarea":"div"));if(!plainText)target.contentEditable="true";target.style.cssText="position: fixed; left: -10000px; top: 10px";target.focus();let plain=view.input.shiftKey&&view.input.lastKeyCode!=45;setTimeout((()=>{view.focus();if(target.parentNode)target.parentNode.removeChild(target);if(plainText)doPaste(view,target.value,null,plain,event2);else doPaste(view,target.textContent,target.innerHTML,plain,event2)}),50)}function doPaste(view,text,html,preferPlain,event2){let slice3=parseFromClipboard(view,text,html,preferPlain,view.state.selection.$from);if(view.someProp("handlePaste",(f=>f(view,event2,slice3||Slice.empty))))return true;if(!slice3)return false;let singleNode=sliceSingleNode(slice3);let tr2=singleNode?view.state.tr.replaceSelectionWith(singleNode,preferPlain):view.state.tr.replaceSelection(slice3);view.dispatch(tr2.scrollIntoView().setMeta("paste",true).setMeta("uiEvent","paste"));return true}function getText$1(clipboardData){let text=clipboardData.getData("text/plain")||clipboardData.getData("Text");if(text)return text;let uris=clipboardData.getData("text/uri-list");return uris?uris.replace(/\r?\n/g," "):""}editHandlers.paste=(view,_event)=>{let event2=_event;if(view.composing&&!android)return;let data=brokenClipboardAPI?null:event2.clipboardData;let plain=view.input.shiftKey&&view.input.lastKeyCode!=45;if(data&&doPaste(view,getText$1(data),data.getData("text/html"),plain,event2))event2.preventDefault();else capturePaste(view,event2)};class Dragging{constructor(slice3,move,node2){this.slice=slice3;this.move=move;this.node=node2}}const dragCopyModifier=mac$2?"altKey":"ctrlKey";function dragMoves(view,event2){let moves=view.someProp("dragCopies",(test=>!test(event2)));return moves!=null?moves:!event2[dragCopyModifier]}handlers.dragstart=(view,_event)=>{let event2=_event;let mouseDown=view.input.mouseDown;if(mouseDown)mouseDown.done();if(!event2.dataTransfer)return;let sel=view.state.selection;let pos=sel.empty?null:view.posAtCoords(eventCoords(event2));let node2;if(pos&&pos.pos>=sel.from&&pos.pos<=(sel instanceof NodeSelection?sel.to-1:sel.to));else if(mouseDown&&mouseDown.mightDrag){node2=NodeSelection.create(view.state.doc,mouseDown.mightDrag.pos)}else if(event2.target&&event2.target.nodeType==1){let desc=view.docView.nearestDesc(event2.target,true);if(desc&&desc.node.type.spec.draggable&&desc!=view.docView)node2=NodeSelection.create(view.state.doc,desc.posBefore)}let draggedSlice=(node2||view.state.selection).content();let{dom:dom,text:text,slice:slice3}=serializeForClipboard(view,draggedSlice);if(!event2.dataTransfer.files.length||!chrome||chrome_version>120)event2.dataTransfer.clearData();event2.dataTransfer.setData(brokenClipboardAPI?"Text":"text/html",dom.innerHTML);event2.dataTransfer.effectAllowed="copyMove";if(!brokenClipboardAPI)event2.dataTransfer.setData("text/plain",text);view.dragging=new Dragging(slice3,dragMoves(view,event2),node2)};handlers.dragend=view=>{let dragging=view.dragging;window.setTimeout((()=>{if(view.dragging==dragging)view.dragging=null}),50)};editHandlers.dragover=editHandlers.dragenter=(_,e)=>e.preventDefault();editHandlers.drop=(view,_event)=>{let event2=_event;let dragging=view.dragging;view.dragging=null;if(!event2.dataTransfer)return;let eventPos=view.posAtCoords(eventCoords(event2));if(!eventPos)return;let $mouse=view.state.doc.resolve(eventPos.pos);let slice3=dragging&&dragging.slice;if(slice3){view.someProp("transformPasted",(f=>{slice3=f(slice3,view)}))}else{slice3=parseFromClipboard(view,getText$1(event2.dataTransfer),brokenClipboardAPI?null:event2.dataTransfer.getData("text/html"),false,$mouse)}let move=!!(dragging&&dragMoves(view,event2));if(view.someProp("handleDrop",(f=>f(view,event2,slice3||Slice.empty,move)))){event2.preventDefault();return}if(!slice3)return;event2.preventDefault();let insertPos=slice3?dropPoint(view.state.doc,$mouse.pos,slice3):$mouse.pos;if(insertPos==null)insertPos=$mouse.pos;let tr2=view.state.tr;if(move){let{node:node2}=dragging;if(node2)node2.replace(tr2);else tr2.deleteSelection()}let pos=tr2.mapping.map(insertPos);let isNode2=slice3.openStart==0&&slice3.openEnd==0&&slice3.content.childCount==1;let beforeInsert=tr2.doc;if(isNode2)tr2.replaceRangeWith(pos,pos,slice3.content.firstChild);else tr2.replaceRange(pos,pos,slice3);if(tr2.doc.eq(beforeInsert))return;let $pos=tr2.doc.resolve(pos);if(isNode2&&NodeSelection.isSelectable(slice3.content.firstChild)&&$pos.nodeAfter&&$pos.nodeAfter.sameMarkup(slice3.content.firstChild)){tr2.setSelection(new NodeSelection($pos))}else{let end=tr2.mapping.map(insertPos);tr2.mapping.maps[tr2.mapping.maps.length-1].forEach(((_from,_to,_newFrom,newTo)=>end=newTo));tr2.setSelection(selectionBetween(view,$pos,tr2.doc.resolve(end)))}view.focus();view.dispatch(tr2.setMeta("uiEvent","drop"))};handlers.focus=view=>{view.input.lastFocus=Date.now();if(!view.focused){view.domObserver.stop();view.dom.classList.add("ProseMirror-focused");view.domObserver.start();view.focused=true;setTimeout((()=>{if(view.docView&&view.hasFocus()&&!view.domObserver.currentSelection.eq(view.domSelectionRange()))selectionToDOM(view)}),20)}};handlers.blur=(view,_event)=>{let event2=_event;if(view.focused){view.domObserver.stop();view.dom.classList.remove("ProseMirror-focused");view.domObserver.start();if(event2.relatedTarget&&view.dom.contains(event2.relatedTarget))view.domObserver.currentSelection.clear();view.focused=false}};handlers.beforeinput=(view,_event)=>{let event2=_event;if(chrome&&android&&event2.inputType=="deleteContentBackward"){view.domObserver.flushSoon();let{domChangeCount:domChangeCount}=view.input;setTimeout((()=>{if(view.input.domChangeCount!=domChangeCount)return;view.dom.blur();view.focus();if(view.someProp("handleKeyDown",(f=>f(view,keyEvent(8,"Backspace")))))return;let{$cursor:$cursor}=view.state.selection;if($cursor&&$cursor.pos>0)view.dispatch(view.state.tr.delete($cursor.pos-1,$cursor.pos).scrollIntoView())}),50)}};for(let prop in editHandlers)handlers[prop]=editHandlers[prop];function compareObjs(a,b){if(a==b)return true;for(let p in a)if(a[p]!==b[p])return false;for(let p in b)if(!(p in a))return false;return true}class WidgetType{constructor(toDOM,spec){this.toDOM=toDOM;this.spec=spec||noSpec;this.side=this.spec.side||0}map(mapping,span,offset2,oldOffset){let{pos:pos,deleted:deleted}=mapping.mapResult(span.from+oldOffset,this.side<0?-1:1);return deleted?null:new Decoration(pos-offset2,pos-offset2,this)}valid(){return true}eq(other){return this==other||other instanceof WidgetType&&(this.spec.key&&this.spec.key==other.spec.key||this.toDOM==other.toDOM&&compareObjs(this.spec,other.spec))}destroy(node2){if(this.spec.destroy)this.spec.destroy(node2)}}class InlineType{constructor(attrs,spec){this.attrs=attrs;this.spec=spec||noSpec}map(mapping,span,offset2,oldOffset){let from3=mapping.map(span.from+oldOffset,this.spec.inclusiveStart?-1:1)-offset2;let to=mapping.map(span.to+oldOffset,this.spec.inclusiveEnd?1:-1)-offset2;return from3>=to?null:new Decoration(from3,to,this)}valid(_,span){return span.from<span.to}eq(other){return this==other||other instanceof InlineType&&compareObjs(this.attrs,other.attrs)&&compareObjs(this.spec,other.spec)}static is(span){return span.type instanceof InlineType}destroy(){}}class NodeType2{constructor(attrs,spec){this.attrs=attrs;this.spec=spec||noSpec}map(mapping,span,offset2,oldOffset){let from3=mapping.mapResult(span.from+oldOffset,1);if(from3.deleted)return null;let to=mapping.mapResult(span.to+oldOffset,-1);if(to.deleted||to.pos<=from3.pos)return null;return new Decoration(from3.pos-offset2,to.pos-offset2,this)}valid(node2,span){let{index:index2,offset:offset2}=node2.content.findIndex(span.from),child;return offset2==span.from&&!(child=node2.child(index2)).isText&&offset2+child.nodeSize==span.to}eq(other){return this==other||other instanceof NodeType2&&compareObjs(this.attrs,other.attrs)&&compareObjs(this.spec,other.spec)}destroy(){}}class Decoration{constructor(from3,to,type){this.from=from3;this.to=to;this.type=type}copy(from3,to){return new Decoration(from3,to,this.type)}eq(other,offset2=0){return this.type.eq(other.type)&&this.from+offset2==other.from&&this.to+offset2==other.to}map(mapping,offset2,oldOffset){return this.type.map(mapping,this,offset2,oldOffset)}static widget(pos,toDOM,spec){return new Decoration(pos,pos,new WidgetType(toDOM,spec))}static inline(from3,to,attrs,spec){return new Decoration(from3,to,new InlineType(attrs,spec))}static node(from3,to,attrs,spec){return new Decoration(from3,to,new NodeType2(attrs,spec))}get spec(){return this.type.spec}get inline(){return this.type instanceof InlineType}get widget(){return this.type instanceof WidgetType}}const none=[],noSpec={};class DecorationSet{constructor(local,children){this.local=local.length?local:none;this.children=children.length?children:none}static create(doc2,decorations){return decorations.length?buildTree(decorations,doc2,0,noSpec):empty}find(start,end,predicate){let result=[];this.findInner(start==null?0:start,end==null?1e9:end,result,0,predicate);return result}findInner(start,end,result,offset2,predicate){for(let i=0;i<this.local.length;i++){let span=this.local[i];if(span.from<=end&&span.to>=start&&(!predicate||predicate(span.spec)))result.push(span.copy(span.from+offset2,span.to+offset2))}for(let i=0;i<this.children.length;i+=3){if(this.children[i]<end&&this.children[i+1]>start){let childOff=this.children[i]+1;this.children[i+2].findInner(start-childOff,end-childOff,result,offset2+childOff,predicate)}}}map(mapping,doc2,options2){if(this==empty||mapping.maps.length==0)return this;return this.mapInner(mapping,doc2,0,0,options2||noSpec)}mapInner(mapping,node2,offset2,oldOffset,options2){let newLocal;for(let i=0;i<this.local.length;i++){let mapped=this.local[i].map(mapping,offset2,oldOffset);if(mapped&&mapped.type.valid(node2,mapped))(newLocal||(newLocal=[])).push(mapped);else if(options2.onRemove)options2.onRemove(this.local[i].spec)}if(this.children.length)return mapChildren(this.children,newLocal||[],mapping,node2,offset2,oldOffset,options2);else return newLocal?new DecorationSet(newLocal.sort(byPos),none):empty}add(doc2,decorations){if(!decorations.length)return this;if(this==empty)return DecorationSet.create(doc2,decorations);return this.addInner(doc2,decorations,0)}addInner(doc2,decorations,offset2){let children,childIndex=0;doc2.forEach(((childNode,childOffset)=>{let baseOffset=childOffset+offset2,found2;if(!(found2=takeSpansForNode(decorations,childNode,baseOffset)))return;if(!children)children=this.children.slice();while(childIndex<children.length&&children[childIndex]<childOffset)childIndex+=3;if(children[childIndex]==childOffset)children[childIndex+2]=children[childIndex+2].addInner(childNode,found2,baseOffset+1);else children.splice(childIndex,0,childOffset,childOffset+childNode.nodeSize,buildTree(found2,childNode,baseOffset+1,noSpec));childIndex+=3}));let local=moveSpans(childIndex?withoutNulls(decorations):decorations,-offset2);for(let i=0;i<local.length;i++)if(!local[i].type.valid(doc2,local[i]))local.splice(i--,1);return new DecorationSet(local.length?this.local.concat(local).sort(byPos):this.local,children||this.children)}remove(decorations){if(decorations.length==0||this==empty)return this;return this.removeInner(decorations,0)}removeInner(decorations,offset2){let children=this.children,local=this.local;for(let i=0;i<children.length;i+=3){let found2;let from3=children[i]+offset2,to=children[i+1]+offset2;for(let j=0,span;j<decorations.length;j++)if(span=decorations[j]){if(span.from>from3&&span.to<to){decorations[j]=null;(found2||(found2=[])).push(span)}}if(!found2)continue;if(children==this.children)children=this.children.slice();let removed=children[i+2].removeInner(found2,from3+1);if(removed!=empty){children[i+2]=removed}else{children.splice(i,3);i-=3}}if(local.length){for(let i=0,span;i<decorations.length;i++)if(span=decorations[i]){for(let j=0;j<local.length;j++)if(local[j].eq(span,offset2)){if(local==this.local)local=this.local.slice();local.splice(j--,1)}}}if(children==this.children&&local==this.local)return this;return local.length||children.length?new DecorationSet(local,children):empty}forChild(offset2,node2){if(this==empty)return this;if(node2.isLeaf)return DecorationSet.empty;let child,local;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=offset2){if(this.children[i]==offset2)child=this.children[i+2];break}let start=offset2+1,end=start+node2.content.size;for(let i=0;i<this.local.length;i++){let dec=this.local[i];if(dec.from<end&&dec.to>start&&dec.type instanceof InlineType){let from3=Math.max(start,dec.from)-start,to=Math.min(end,dec.to)-start;if(from3<to)(local||(local=[])).push(dec.copy(from3,to))}}if(local){let localSet=new DecorationSet(local.sort(byPos),none);return child?new DecorationGroup([localSet,child]):localSet}return child||empty}eq(other){if(this==other)return true;if(!(other instanceof DecorationSet)||this.local.length!=other.local.length||this.children.length!=other.children.length)return false;for(let i=0;i<this.local.length;i++)if(!this.local[i].eq(other.local[i]))return false;for(let i=0;i<this.children.length;i+=3)if(this.children[i]!=other.children[i]||this.children[i+1]!=other.children[i+1]||!this.children[i+2].eq(other.children[i+2]))return false;return true}locals(node2){return removeOverlap(this.localsInner(node2))}localsInner(node2){if(this==empty)return none;if(node2.inlineContent||!this.local.some(InlineType.is))return this.local;let result=[];for(let i=0;i<this.local.length;i++){if(!(this.local[i].type instanceof InlineType))result.push(this.local[i])}return result}forEachSet(f){f(this)}}DecorationSet.empty=new DecorationSet([],[]);DecorationSet.removeOverlap=removeOverlap;const empty=DecorationSet.empty;class DecorationGroup{constructor(members){this.members=members}map(mapping,doc2){const mappedDecos=this.members.map((member=>member.map(mapping,doc2,noSpec)));return DecorationGroup.from(mappedDecos)}forChild(offset2,child){if(child.isLeaf)return DecorationSet.empty;let found2=[];for(let i=0;i<this.members.length;i++){let result=this.members[i].forChild(offset2,child);if(result==empty)continue;if(result instanceof DecorationGroup)found2=found2.concat(result.members);else found2.push(result)}return DecorationGroup.from(found2)}eq(other){if(!(other instanceof DecorationGroup)||other.members.length!=this.members.length)return false;for(let i=0;i<this.members.length;i++)if(!this.members[i].eq(other.members[i]))return false;return true}locals(node2){let result,sorted=true;for(let i=0;i<this.members.length;i++){let locals=this.members[i].localsInner(node2);if(!locals.length)continue;if(!result){result=locals}else{if(sorted){result=result.slice();sorted=false}for(let j=0;j<locals.length;j++)result.push(locals[j])}}return result?removeOverlap(sorted?result:result.sort(byPos)):none}static from(members){switch(members.length){case 0:return empty;case 1:return members[0];default:return new DecorationGroup(members.every((m=>m instanceof DecorationSet))?members:members.reduce(((r,m)=>r.concat(m instanceof DecorationSet?m:m.members)),[]))}}forEachSet(f){for(let i=0;i<this.members.length;i++)this.members[i].forEachSet(f)}}function mapChildren(oldChildren,newLocal,mapping,node2,offset2,oldOffset,options2){let children=oldChildren.slice();for(let i=0,baseOffset=oldOffset;i<mapping.maps.length;i++){let moved=0;mapping.maps[i].forEach(((oldStart,oldEnd,newStart,newEnd)=>{let dSize=newEnd-newStart-(oldEnd-oldStart);for(let i2=0;i2<children.length;i2+=3){let end=children[i2+1];if(end<0||oldStart>end+baseOffset-moved)continue;let start=children[i2]+baseOffset-moved;if(oldEnd>=start){children[i2+1]=oldStart<=start?-2:-1}else if(oldStart>=baseOffset&&dSize){children[i2]+=dSize;children[i2+1]+=dSize}}moved+=dSize}));baseOffset=mapping.maps[i].map(baseOffset,-1)}let mustRebuild=false;for(let i=0;i<children.length;i+=3)if(children[i+1]<0){if(children[i+1]==-2){mustRebuild=true;children[i+1]=-1;continue}let from3=mapping.map(oldChildren[i]+oldOffset),fromLocal=from3-offset2;if(fromLocal<0||fromLocal>=node2.content.size){mustRebuild=true;continue}let to=mapping.map(oldChildren[i+1]+oldOffset,-1),toLocal=to-offset2;let{index:index2,offset:childOffset}=node2.content.findIndex(fromLocal);let childNode=node2.maybeChild(index2);if(childNode&&childOffset==fromLocal&&childOffset+childNode.nodeSize==toLocal){let mapped=children[i+2].mapInner(mapping,childNode,from3+1,oldChildren[i]+oldOffset+1,options2);if(mapped!=empty){children[i]=fromLocal;children[i+1]=toLocal;children[i+2]=mapped}else{children[i+1]=-2;mustRebuild=true}}else{mustRebuild=true}}if(mustRebuild){let decorations=mapAndGatherRemainingDecorations(children,oldChildren,newLocal,mapping,offset2,oldOffset,options2);let built=buildTree(decorations,node2,0,options2);newLocal=built.local;for(let i=0;i<children.length;i+=3)if(children[i+1]<0){children.splice(i,3);i-=3}for(let i=0,j=0;i<built.children.length;i+=3){let from3=built.children[i];while(j<children.length&&children[j]<from3)j+=3;children.splice(j,0,built.children[i],built.children[i+1],built.children[i+2])}}return new DecorationSet(newLocal.sort(byPos),children)}function moveSpans(spans,offset2){if(!offset2||!spans.length)return spans;let result=[];for(let i=0;i<spans.length;i++){let span=spans[i];result.push(new Decoration(span.from+offset2,span.to+offset2,span.type))}return result}function mapAndGatherRemainingDecorations(children,oldChildren,decorations,mapping,offset2,oldOffset,options2){function gather(set,oldOffset2){for(let i=0;i<set.local.length;i++){let mapped=set.local[i].map(mapping,offset2,oldOffset2);if(mapped)decorations.push(mapped);else if(options2.onRemove)options2.onRemove(set.local[i].spec)}for(let i=0;i<set.children.length;i+=3)gather(set.children[i+2],set.children[i]+oldOffset2+1)}for(let i=0;i<children.length;i+=3)if(children[i+1]==-1)gather(children[i+2],oldChildren[i]+oldOffset+1);return decorations}function takeSpansForNode(spans,node2,offset2){if(node2.isLeaf)return null;let end=offset2+node2.nodeSize,found2=null;for(let i=0,span;i<spans.length;i++){if((span=spans[i])&&span.from>offset2&&span.to<end){(found2||(found2=[])).push(span);spans[i]=null}}return found2}function withoutNulls(array){let result=[];for(let i=0;i<array.length;i++)if(array[i]!=null)result.push(array[i]);return result}function buildTree(spans,node2,offset2,options2){let children=[],hasNulls=false;node2.forEach(((childNode,localStart)=>{let found2=takeSpansForNode(spans,childNode,localStart+offset2);if(found2){hasNulls=true;let subtree=buildTree(found2,childNode,offset2+localStart+1,options2);if(subtree!=empty)children.push(localStart,localStart+childNode.nodeSize,subtree)}}));let locals=moveSpans(hasNulls?withoutNulls(spans):spans,-offset2).sort(byPos);for(let i=0;i<locals.length;i++)if(!locals[i].type.valid(node2,locals[i])){if(options2.onRemove)options2.onRemove(locals[i].spec);locals.splice(i--,1)}return locals.length||children.length?new DecorationSet(locals,children):empty}function byPos(a,b){return a.from-b.from||a.to-b.to}function removeOverlap(spans){let working=spans;for(let i=0;i<working.length-1;i++){let span=working[i];if(span.from!=span.to)for(let j=i+1;j<working.length;j++){let next2=working[j];if(next2.from==span.from){if(next2.to!=span.to){if(working==spans)working=spans.slice();working[j]=next2.copy(next2.from,span.to);insertAhead(working,j+1,next2.copy(span.to,next2.to))}continue}else{if(next2.from<span.to){if(working==spans)working=spans.slice();working[i]=span.copy(span.from,next2.from);insertAhead(working,j,span.copy(next2.from,span.to))}break}}}return working}function insertAhead(array,i,deco){while(i<array.length&&byPos(deco,array[i])>0)i++;array.splice(i,0,deco)}function viewDecorations(view){let found2=[];view.someProp("decorations",(f=>{let result=f(view.state);if(result&&result!=empty)found2.push(result)}));if(view.cursorWrapper)found2.push(DecorationSet.create(view.state.doc,[view.cursorWrapper.deco]));return DecorationGroup.from(found2)}const observeOptions={childList:true,characterData:true,characterDataOldValue:true,attributes:true,attributeOldValue:true,subtree:true};const useCharData=ie$1&&ie_version<=11;class SelectionState{constructor(){this.anchorNode=null;this.anchorOffset=0;this.focusNode=null;this.focusOffset=0}set(sel){this.anchorNode=sel.anchorNode;this.anchorOffset=sel.anchorOffset;this.focusNode=sel.focusNode;this.focusOffset=sel.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(sel){return sel.anchorNode==this.anchorNode&&sel.anchorOffset==this.anchorOffset&&sel.focusNode==this.focusNode&&sel.focusOffset==this.focusOffset}}class DOMObserver{constructor(view,handleDOMChange){this.view=view;this.handleDOMChange=handleDOMChange;this.queue=[];this.flushingSoon=-1;this.observer=null;this.currentSelection=new SelectionState;this.onCharData=null;this.suppressingSelectionUpdates=false;this.lastChangedTextNode=null;this.observer=window.MutationObserver&&new window.MutationObserver((mutations=>{for(let i=0;i<mutations.length;i++)this.queue.push(mutations[i]);if(ie$1&&ie_version<=11&&mutations.some((m=>m.type=="childList"&&m.removedNodes.length||m.type=="characterData"&&m.oldValue.length>m.target.nodeValue.length)))this.flushSoon();else this.flush()}));if(useCharData){this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue});this.flushSoon()}}this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){if(this.flushingSoon<0)this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1;this.flush()}),20)}forceFlush(){if(this.flushingSoon>-1){window.clearTimeout(this.flushingSoon);this.flushingSoon=-1;this.flush()}}start(){if(this.observer){this.observer.takeRecords();this.observer.observe(this.view.dom,observeOptions)}if(this.onCharData)this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.connectSelection()}stop(){if(this.observer){let take=this.observer.takeRecords();if(take.length){for(let i=0;i<take.length;i++)this.queue.push(take[i]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}if(this.onCharData)this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData);this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=true;setTimeout((()=>this.suppressingSelectionUpdates=false),50)}onSelectionChange(){if(!hasFocusAndSelection(this.view))return;if(this.suppressingSelectionUpdates)return selectionToDOM(this.view);if(ie$1&&ie_version<=11&&!this.view.state.selection.empty){let sel=this.view.domSelectionRange();if(sel.focusNode&&isEquivalentPosition(sel.focusNode,sel.focusOffset,sel.anchorNode,sel.anchorOffset))return this.flushSoon()}this.flush()}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(sel){if(!sel.focusNode)return true;let ancestors=new Set,container;for(let scan=sel.focusNode;scan;scan=parentNode(scan))ancestors.add(scan);for(let scan=sel.anchorNode;scan;scan=parentNode(scan))if(ancestors.has(scan)){container=scan;break}let desc=container&&this.view.docView.nearestDesc(container);if(desc&&desc.ignoreMutation({type:"selection",target:container.nodeType==3?container.parentNode:container})){this.setCurSelection();return true}}pendingRecords(){if(this.observer)for(let mut of this.observer.takeRecords())this.queue.push(mut);return this.queue}flush(){let{view:view}=this;if(!view.docView||this.flushingSoon>-1)return;let mutations=this.pendingRecords();if(mutations.length)this.queue=[];let sel=view.domSelectionRange();let newSel=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(sel)&&hasFocusAndSelection(view)&&!this.ignoreSelectionChange(sel);let from3=-1,to=-1,typeOver=false,added=[];if(view.editable){for(let i=0;i<mutations.length;i++){let result=this.registerMutation(mutations[i],added);if(result){from3=from3<0?result.from:Math.min(result.from,from3);to=to<0?result.to:Math.max(result.to,to);if(result.typeOver)typeOver=true}}}if(gecko&&added.length){let brs=added.filter((n=>n.nodeName=="BR"));if(brs.length==2){let[a,b]=brs;if(a.parentNode&&a.parentNode.parentNode==b.parentNode)b.remove();else a.remove()}else{let{focusNode:focusNode}=this.currentSelection;for(let br of brs){let parent=br.parentNode;if(parent&&parent.nodeName=="LI"&&(!focusNode||blockParent(view,focusNode)!=parent))br.remove()}}}let readSel=null;if(from3<0&&newSel&&view.input.lastFocus>Date.now()-200&&Math.max(view.input.lastTouch,view.input.lastClick.time)<Date.now()-300&&selectionCollapsed(sel)&&(readSel=selectionFromDOM(view))&&readSel.eq(Selection.near(view.state.doc.resolve(0),1))){view.input.lastFocus=0;selectionToDOM(view);this.currentSelection.set(sel);view.scrollToSelection()}else if(from3>-1||newSel){if(from3>-1){view.docView.markDirty(from3,to);checkCSS(view)}this.handleDOMChange(from3,to,typeOver,added);if(view.docView&&view.docView.dirty)view.updateState(view.state);else if(!this.currentSelection.eq(sel))selectionToDOM(view);this.currentSelection.set(sel)}}registerMutation(mut,added){if(added.indexOf(mut.target)>-1)return null;let desc=this.view.docView.nearestDesc(mut.target);if(mut.type=="attributes"&&(desc==this.view.docView||mut.attributeName=="contenteditable"||mut.attributeName=="style"&&!mut.oldValue&&!mut.target.getAttribute("style")))return null;if(!desc||desc.ignoreMutation(mut))return null;if(mut.type=="childList"){for(let i=0;i<mut.addedNodes.length;i++){let node2=mut.addedNodes[i];added.push(node2);if(node2.nodeType==3)this.lastChangedTextNode=node2}if(desc.contentDOM&&desc.contentDOM!=desc.dom&&!desc.contentDOM.contains(mut.target))return{from:desc.posBefore,to:desc.posAfter};let prev2=mut.previousSibling,next2=mut.nextSibling;if(ie$1&&ie_version<=11&&mut.addedNodes.length){for(let i=0;i<mut.addedNodes.length;i++){let{previousSibling:previousSibling,nextSibling:nextSibling}=mut.addedNodes[i];if(!previousSibling||Array.prototype.indexOf.call(mut.addedNodes,previousSibling)<0)prev2=previousSibling;if(!nextSibling||Array.prototype.indexOf.call(mut.addedNodes,nextSibling)<0)next2=nextSibling}}let fromOffset=prev2&&prev2.parentNode==mut.target?domIndex(prev2)+1:0;let from3=desc.localPosFromDOM(mut.target,fromOffset,-1);let toOffset=next2&&next2.parentNode==mut.target?domIndex(next2):mut.target.childNodes.length;let to=desc.localPosFromDOM(mut.target,toOffset,1);return{from:from3,to:to}}else if(mut.type=="attributes"){return{from:desc.posAtStart-desc.border,to:desc.posAtEnd+desc.border}}else{this.lastChangedTextNode=mut.target;return{from:desc.posAtStart,to:desc.posAtEnd,typeOver:mut.target.nodeValue==mut.oldValue}}}}let cssChecked=new WeakMap;let cssCheckWarned=false;function checkCSS(view){if(cssChecked.has(view))return;cssChecked.set(view,null);if(["normal","nowrap","pre-line"].indexOf(getComputedStyle(view.dom).whiteSpace)!==-1){view.requiresGeckoHackNode=gecko;if(cssCheckWarned)return;console["warn"]("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.");cssCheckWarned=true}}function rangeToSelectionRange(view,range){let anchorNode=range.startContainer,anchorOffset=range.startOffset;let focusNode=range.endContainer,focusOffset=range.endOffset;let currentAnchor=view.domAtPos(view.state.selection.anchor);if(isEquivalentPosition(currentAnchor.node,currentAnchor.offset,focusNode,focusOffset))[anchorNode,anchorOffset,focusNode,focusOffset]=[focusNode,focusOffset,anchorNode,anchorOffset];return{anchorNode:anchorNode,anchorOffset:anchorOffset,focusNode:focusNode,focusOffset:focusOffset}}function safariShadowSelectionRange(view,selection){if(selection.getComposedRanges){let range=selection.getComposedRanges(view.root)[0];if(range)return rangeToSelectionRange(view,range)}let found2;function read(event2){event2.preventDefault();event2.stopImmediatePropagation();found2=event2.getTargetRanges()[0]}view.dom.addEventListener("beforeinput",read,true);document.execCommand("indent");view.dom.removeEventListener("beforeinput",read,true);return found2?rangeToSelectionRange(view,found2):null}function blockParent(view,node2){for(let p=node2.parentNode;p&&p!=view.dom;p=p.parentNode){let desc=view.docView.nearestDesc(p,true);if(desc&&desc.node.isBlock)return p}return null}function parseBetween(view,from_,to_){let{node:parent,fromOffset:fromOffset,toOffset:toOffset,from:from3,to:to}=view.docView.parseRange(from_,to_);let domSel=view.domSelectionRange();let find2;let anchor=domSel.anchorNode;if(anchor&&view.dom.contains(anchor.nodeType==1?anchor:anchor.parentNode)){find2=[{node:anchor,offset:domSel.anchorOffset}];if(!selectionCollapsed(domSel))find2.push({node:domSel.focusNode,offset:domSel.focusOffset})}if(chrome&&view.input.lastKeyCode===8){for(let off=toOffset;off>fromOffset;off--){let node2=parent.childNodes[off-1],desc=node2.pmViewDesc;if(node2.nodeName=="BR"&&!desc){toOffset=off;break}if(!desc||desc.size)break}}let startDoc=view.state.doc;let parser=view.someProp("domParser")||DOMParser$1.fromSchema(view.state.schema);let $from=startDoc.resolve(from3);let sel=null,doc2=parser.parse(parent,{topNode:$from.parent,topMatch:$from.parent.contentMatchAt($from.index()),topOpen:true,from:fromOffset,to:toOffset,preserveWhitespace:$from.parent.type.whitespace=="pre"?"full":true,findPositions:find2,ruleFromNode:ruleFromNode,context:$from});if(find2&&find2[0].pos!=null){let anchor2=find2[0].pos,head=find2[1]&&find2[1].pos;if(head==null)head=anchor2;sel={anchor:anchor2+from3,head:head+from3}}return{doc:doc2,sel:sel,from:from3,to:to}}function ruleFromNode(dom){let desc=dom.pmViewDesc;if(desc){return desc.parseRule()}else if(dom.nodeName=="BR"&&dom.parentNode){if(safari&&/^(ul|ol)$/i.test(dom.parentNode.nodeName)){let skip=document.createElement("div");skip.appendChild(document.createElement("li"));return{skip:skip}}else if(dom.parentNode.lastChild==dom||safari&&/^(tr|table)$/i.test(dom.parentNode.nodeName)){return{ignore:true}}}else if(dom.nodeName=="IMG"&&dom.getAttribute("mark-placeholder")){return{ignore:true}}return null}const isInline=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function readDOMChange(view,from3,to,typeOver,addedNodes){let compositionID=view.input.compositionPendingChanges||(view.composing?view.input.compositionID:0);view.input.compositionPendingChanges=0;if(from3<0){let origin=view.input.lastSelectionTime>Date.now()-50?view.input.lastSelectionOrigin:null;let newSel=selectionFromDOM(view,origin);if(newSel&&!view.state.selection.eq(newSel)){if(chrome&&android&&view.input.lastKeyCode===13&&Date.now()-100<view.input.lastKeyCodeTime&&view.someProp("handleKeyDown",(f=>f(view,keyEvent(13,"Enter")))))return;let tr3=view.state.tr.setSelection(newSel);if(origin=="pointer")tr3.setMeta("pointer",true);else if(origin=="key")tr3.scrollIntoView();if(compositionID)tr3.setMeta("composition",compositionID);view.dispatch(tr3)}return}let $before=view.state.doc.resolve(from3);let shared=$before.sharedDepth(to);from3=$before.before(shared+1);to=view.state.doc.resolve(to).after(shared+1);let sel=view.state.selection;let parse2=parseBetween(view,from3,to);let doc2=view.state.doc,compare=doc2.slice(parse2.from,parse2.to);let preferredPos,preferredSide;if(view.input.lastKeyCode===8&&Date.now()-100<view.input.lastKeyCodeTime){preferredPos=view.state.selection.to;preferredSide="end"}else{preferredPos=view.state.selection.from;preferredSide="start"}view.input.lastKeyCode=null;let change=findDiff(compare.content,parse2.doc.content,parse2.from,preferredPos,preferredSide);if(change)view.input.domChangeCount++;if((ios&&view.input.lastIOSEnter>Date.now()-225||android)&&addedNodes.some((n=>n.nodeType==1&&!isInline.test(n.nodeName)))&&(!change||change.endA>=change.endB)&&view.someProp("handleKeyDown",(f=>f(view,keyEvent(13,"Enter"))))){view.input.lastIOSEnter=0;return}if(!change){if(typeOver&&sel instanceof TextSelection&&!sel.empty&&sel.$head.sameParent(sel.$anchor)&&!view.composing&&!(parse2.sel&&parse2.sel.anchor!=parse2.sel.head)){change={start:sel.from,endA:sel.to,endB:sel.to}}else{if(parse2.sel){let sel2=resolveSelection(view,view.state.doc,parse2.sel);if(sel2&&!sel2.eq(view.state.selection)){let tr3=view.state.tr.setSelection(sel2);if(compositionID)tr3.setMeta("composition",compositionID);view.dispatch(tr3)}}return}}if(view.state.selection.from<view.state.selection.to&&change.start==change.endB&&view.state.selection instanceof TextSelection){if(change.start>view.state.selection.from&&change.start<=view.state.selection.from+2&&view.state.selection.from>=parse2.from){change.start=view.state.selection.from}else if(change.endA<view.state.selection.to&&change.endA>=view.state.selection.to-2&&view.state.selection.to<=parse2.to){change.endB+=view.state.selection.to-change.endA;change.endA=view.state.selection.to}}if(ie$1&&ie_version<=11&&change.endB==change.start+1&&change.endA==change.start&&change.start>parse2.from&&parse2.doc.textBetween(change.start-parse2.from-1,change.start-parse2.from+1)=="  "){change.start--;change.endA--;change.endB--}let $from=parse2.doc.resolveNoCache(change.start-parse2.from);let $to=parse2.doc.resolveNoCache(change.endB-parse2.from);let $fromA=doc2.resolve(change.start);let inlineChange=$from.sameParent($to)&&$from.parent.inlineContent&&$fromA.end()>=change.endA;let nextSel;if((ios&&view.input.lastIOSEnter>Date.now()-225&&(!inlineChange||addedNodes.some((n=>n.nodeName=="DIV"||n.nodeName=="P")))||!inlineChange&&$from.pos<parse2.doc.content.size&&(!$from.sameParent($to)||!$from.parent.inlineContent)&&(nextSel=Selection.findFrom(parse2.doc.resolve($from.pos+1),1,true))&&nextSel.head>$from.pos)&&view.someProp("handleKeyDown",(f=>f(view,keyEvent(13,"Enter"))))){view.input.lastIOSEnter=0;return}if(view.state.selection.anchor>change.start&&looksLikeBackspace(doc2,change.start,change.endA,$from,$to)&&view.someProp("handleKeyDown",(f=>f(view,keyEvent(8,"Backspace"))))){if(android&&chrome)view.domObserver.suppressSelectionUpdates();return}if(chrome&&change.endB==change.start)view.input.lastChromeDelete=Date.now();if(android&&!inlineChange&&$from.start()!=$to.start()&&$to.parentOffset==0&&$from.depth==$to.depth&&parse2.sel&&parse2.sel.anchor==parse2.sel.head&&parse2.sel.head==change.endA){change.endB-=2;$to=parse2.doc.resolveNoCache(change.endB-parse2.from);setTimeout((()=>{view.someProp("handleKeyDown",(function(f){return f(view,keyEvent(13,"Enter"))}))}),20)}let chFrom=change.start,chTo=change.endA;let tr2,storedMarks,markChange;if(inlineChange){if($from.pos==$to.pos){if(ie$1&&ie_version<=11&&$from.parentOffset==0){view.domObserver.suppressSelectionUpdates();setTimeout((()=>selectionToDOM(view)),20)}tr2=view.state.tr.delete(chFrom,chTo);storedMarks=doc2.resolve(change.start).marksAcross(doc2.resolve(change.endA))}else if(change.endA==change.endB&&(markChange=isMarkChange($from.parent.content.cut($from.parentOffset,$to.parentOffset),$fromA.parent.content.cut($fromA.parentOffset,change.endA-$fromA.start())))){tr2=view.state.tr;if(markChange.type=="add")tr2.addMark(chFrom,chTo,markChange.mark);else tr2.removeMark(chFrom,chTo,markChange.mark)}else if($from.parent.child($from.index()).isText&&$from.index()==$to.index()-($to.textOffset?0:1)){let text=$from.parent.textBetween($from.parentOffset,$to.parentOffset);if(view.someProp("handleTextInput",(f=>f(view,chFrom,chTo,text))))return;tr2=view.state.tr.insertText(text,chFrom,chTo)}}if(!tr2)tr2=view.state.tr.replace(chFrom,chTo,parse2.doc.slice(change.start-parse2.from,change.endB-parse2.from));if(parse2.sel){let sel2=resolveSelection(view,tr2.doc,parse2.sel);if(sel2&&!(chrome&&view.composing&&sel2.empty&&(change.start!=change.endB||view.input.lastChromeDelete<Date.now()-100)&&(sel2.head==chFrom||sel2.head==tr2.mapping.map(chTo)-1)||ie$1&&sel2.empty&&sel2.head==chFrom))tr2.setSelection(sel2)}if(storedMarks)tr2.ensureMarks(storedMarks);if(compositionID)tr2.setMeta("composition",compositionID);view.dispatch(tr2.scrollIntoView())}function resolveSelection(view,doc2,parsedSel){if(Math.max(parsedSel.anchor,parsedSel.head)>doc2.content.size)return null;return selectionBetween(view,doc2.resolve(parsedSel.anchor),doc2.resolve(parsedSel.head))}function isMarkChange(cur,prev2){let curMarks=cur.firstChild.marks,prevMarks=prev2.firstChild.marks;let added=curMarks,removed=prevMarks,type,mark,update;for(let i=0;i<prevMarks.length;i++)added=prevMarks[i].removeFromSet(added);for(let i=0;i<curMarks.length;i++)removed=curMarks[i].removeFromSet(removed);if(added.length==1&&removed.length==0){mark=added[0];type="add";update=node2=>node2.mark(mark.addToSet(node2.marks))}else if(added.length==0&&removed.length==1){mark=removed[0];type="remove";update=node2=>node2.mark(mark.removeFromSet(node2.marks))}else{return null}let updated=[];for(let i=0;i<prev2.childCount;i++)updated.push(update(prev2.child(i)));if(Fragment.from(updated).eq(cur))return{mark:mark,type:type}}function looksLikeBackspace(old,start,end,$newStart,$newEnd){if(end-start<=$newEnd.pos-$newStart.pos||skipClosingAndOpening($newStart,true,false)<$newEnd.pos)return false;let $start=old.resolve(start);if(!$newStart.parent.isTextblock){let after=$start.nodeAfter;return after!=null&&end==start+after.nodeSize}if($start.parentOffset<$start.parent.content.size||!$start.parent.isTextblock)return false;let $next=old.resolve(skipClosingAndOpening($start,true,true));if(!$next.parent.isTextblock||$next.pos>end||skipClosingAndOpening($next,true,false)<end)return false;return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content)}function skipClosingAndOpening($pos,fromEnd,mayOpen){let depth=$pos.depth,end=fromEnd?$pos.end():$pos.pos;while(depth>0&&(fromEnd||$pos.indexAfter(depth)==$pos.node(depth).childCount)){depth--;end++;fromEnd=false}if(mayOpen){let next2=$pos.node(depth).maybeChild($pos.indexAfter(depth));while(next2&&!next2.isLeaf){next2=next2.firstChild;end++}}return end}function findDiff(a,b,pos,preferredPos,preferredSide){let start=a.findDiffStart(b,pos);if(start==null)return null;let{a:endA,b:endB}=a.findDiffEnd(b,pos+a.size,pos+b.size);if(preferredSide=="end"){let adjust=Math.max(0,start-Math.min(endA,endB));preferredPos-=endA+adjust-start}if(endA<start&&a.size<b.size){let move=preferredPos<=start&&preferredPos>=endA?start-preferredPos:0;start-=move;if(start&&start<b.size&&isSurrogatePair(b.textBetween(start-1,start+1)))start+=move?1:-1;endB=start+(endB-endA);endA=start}else if(endB<start){let move=preferredPos<=start&&preferredPos>=endB?start-preferredPos:0;start-=move;if(start&&start<a.size&&isSurrogatePair(a.textBetween(start-1,start+1)))start+=move?1:-1;endA=start+(endA-endB);endB=start}return{start:start,endA:endA,endB:endB}}function isSurrogatePair(str){if(str.length!=2)return false;let a=str.charCodeAt(0),b=str.charCodeAt(1);return a>=56320&&a<=57343&&b>=55296&&b<=56319}class EditorView{constructor(place,props){this._root=null;this.focused=false;this.trackWrites=null;this.mounted=false;this.markCursor=null;this.cursorWrapper=null;this.lastSelectedViewDesc=void 0;this.input=new InputState;this.prevDirectPlugins=[];this.pluginViews=[];this.requiresGeckoHackNode=false;this.dragging=null;this._props=props;this.state=props.state;this.directPlugins=props.plugins||[];this.directPlugins.forEach(checkStateComponent);this.dispatch=this.dispatch.bind(this);this.dom=place&&place.mount||document.createElement("div");if(place){if(place.appendChild)place.appendChild(this.dom);else if(typeof place=="function")place(this.dom);else if(place.mount)this.mounted=true}this.editable=getEditable(this);updateCursorWrapper(this);this.nodeViews=buildNodeViews(this);this.docView=docViewDesc(this.state.doc,computeDocDeco(this),viewDecorations(this),this.dom,this);this.domObserver=new DOMObserver(this,((from3,to,typeOver,added)=>readDOMChange(this,from3,to,typeOver,added)));this.domObserver.start();initInput(this);this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let prev2=this._props;this._props={};for(let name in prev2)this._props[name]=prev2[name];this._props.state=this.state}return this._props}update(props){if(props.handleDOMEvents!=this._props.handleDOMEvents)ensureListeners(this);let prevProps=this._props;this._props=props;if(props.plugins){props.plugins.forEach(checkStateComponent);this.directPlugins=props.plugins}this.updateStateInner(props.state,prevProps)}setProps(props){let updated={};for(let name in this._props)updated[name]=this._props[name];updated.state=this.state;for(let name in props)updated[name]=props[name];this.update(updated)}updateState(state){this.updateStateInner(state,this._props)}updateStateInner(state,prevProps){var _a;let prev2=this.state,redraw=false,updateSel=false;if(state.storedMarks&&this.composing){clearComposition(this);updateSel=true}this.state=state;let pluginsChanged=prev2.plugins!=state.plugins||this._props.plugins!=prevProps.plugins;if(pluginsChanged||this._props.plugins!=prevProps.plugins||this._props.nodeViews!=prevProps.nodeViews){let nodeViews=buildNodeViews(this);if(changedNodeViews(nodeViews,this.nodeViews)){this.nodeViews=nodeViews;redraw=true}}if(pluginsChanged||prevProps.handleDOMEvents!=this._props.handleDOMEvents){ensureListeners(this)}this.editable=getEditable(this);updateCursorWrapper(this);let innerDeco=viewDecorations(this),outerDeco=computeDocDeco(this);let scroll=prev2.plugins!=state.plugins&&!prev2.doc.eq(state.doc)?"reset":state.scrollToSelection>prev2.scrollToSelection?"to selection":"preserve";let updateDoc=redraw||!this.docView.matchesNode(state.doc,outerDeco,innerDeco);if(updateDoc||!state.selection.eq(prev2.selection))updateSel=true;let oldScrollPos=scroll=="preserve"&&updateSel&&this.dom.style.overflowAnchor==null&&storeScrollPos(this);if(updateSel){this.domObserver.stop();let forceSelUpdate=updateDoc&&(ie$1||chrome)&&!this.composing&&!prev2.selection.empty&&!state.selection.empty&&selectionContextChanged(prev2.selection,state.selection);if(updateDoc){let chromeKludge=chrome?this.trackWrites=this.domSelectionRange().focusNode:null;if(this.composing)this.input.compositionNode=findCompositionNode(this);if(redraw||!this.docView.update(state.doc,outerDeco,innerDeco,this)){this.docView.updateOuterDeco(outerDeco);this.docView.destroy();this.docView=docViewDesc(state.doc,outerDeco,innerDeco,this.dom,this)}if(chromeKludge&&!this.trackWrites)forceSelUpdate=true}if(forceSelUpdate||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&anchorInRightPlace(this))){selectionToDOM(this,forceSelUpdate)}else{syncNodeSelection(this,state.selection);this.domObserver.setCurSelection()}this.domObserver.start()}this.updatePluginViews(prev2);if(((_a=this.dragging)===null||_a===void 0?void 0:_a.node)&&!prev2.doc.eq(state.doc))this.updateDraggedNode(this.dragging,prev2);if(scroll=="reset"){this.dom.scrollTop=0}else if(scroll=="to selection"){this.scrollToSelection()}else if(oldScrollPos){resetScrollPos(oldScrollPos)}}scrollToSelection(){let startDOM=this.domSelectionRange().focusNode;if(!startDOM||!this.dom.contains(startDOM.nodeType==1?startDOM:startDOM.parentNode));else if(this.someProp("handleScrollToSelection",(f=>f(this))));else if(this.state.selection instanceof NodeSelection){let target=this.docView.domAfterPos(this.state.selection.from);if(target.nodeType==1)scrollRectIntoView(this,target.getBoundingClientRect(),startDOM)}else{scrollRectIntoView(this,this.coordsAtPos(this.state.selection.head,1),startDOM)}}destroyPluginViews(){let view;while(view=this.pluginViews.pop())if(view.destroy)view.destroy()}updatePluginViews(prevState){if(!prevState||prevState.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins;this.destroyPluginViews();for(let i=0;i<this.directPlugins.length;i++){let plugin=this.directPlugins[i];if(plugin.spec.view)this.pluginViews.push(plugin.spec.view(this))}for(let i=0;i<this.state.plugins.length;i++){let plugin=this.state.plugins[i];if(plugin.spec.view)this.pluginViews.push(plugin.spec.view(this))}}else{for(let i=0;i<this.pluginViews.length;i++){let pluginView=this.pluginViews[i];if(pluginView.update)pluginView.update(this,prevState)}}}updateDraggedNode(dragging,prev2){let sel=dragging.node,found2=-1;if(this.state.doc.nodeAt(sel.from)==sel.node){found2=sel.from}else{let movedPos=sel.from+(this.state.doc.content.size-prev2.doc.content.size);let moved=movedPos>0&&this.state.doc.nodeAt(movedPos);if(moved==sel.node)found2=movedPos}this.dragging=new Dragging(dragging.slice,dragging.move,found2<0?void 0:NodeSelection.create(this.state.doc,found2))}someProp(propName,f){let prop=this._props&&this._props[propName],value;if(prop!=null&&(value=f?f(prop):prop))return value;for(let i=0;i<this.directPlugins.length;i++){let prop2=this.directPlugins[i].props[propName];if(prop2!=null&&(value=f?f(prop2):prop2))return value}let plugins=this.state.plugins;if(plugins)for(let i=0;i<plugins.length;i++){let prop2=plugins[i].props[propName];if(prop2!=null&&(value=f?f(prop2):prop2))return value}}hasFocus(){if(ie$1){let node2=this.root.activeElement;if(node2==this.dom)return true;if(!node2||!this.dom.contains(node2))return false;while(node2&&this.dom!=node2&&this.dom.contains(node2)){if(node2.contentEditable=="false")return false;node2=node2.parentElement}return true}return this.root.activeElement==this.dom}focus(){this.domObserver.stop();if(this.editable)focusPreventScroll(this.dom);selectionToDOM(this);this.domObserver.start()}get root(){let cached=this._root;if(cached==null)for(let search=this.dom.parentNode;search;search=search.parentNode){if(search.nodeType==9||search.nodeType==11&&search.host){if(!search.getSelection)Object.getPrototypeOf(search).getSelection=()=>search.ownerDocument.getSelection();return this._root=search}}return cached||document}updateRoot(){this._root=null}posAtCoords(coords){return posAtCoords(this,coords)}coordsAtPos(pos,side=1){return coordsAtPos(this,pos,side)}domAtPos(pos,side=0){return this.docView.domFromPos(pos,side)}nodeDOM(pos){let desc=this.docView.descAt(pos);return desc?desc.nodeDOM:null}posAtDOM(node2,offset2,bias=-1){let pos=this.docView.posFromDOM(node2,offset2,bias);if(pos==null)throw new RangeError("DOM position not inside the editor");return pos}endOfTextblock(dir,state){return endOfTextblock(this,state||this.state,dir)}pasteHTML(html,event2){return doPaste(this,"",html,false,event2||new ClipboardEvent("paste"))}pasteText(text,event2){return doPaste(this,text,null,true,event2||new ClipboardEvent("paste"))}serializeForClipboard(slice3){return serializeForClipboard(this,slice3)}destroy(){if(!this.docView)return;destroyInput(this);this.destroyPluginViews();if(this.mounted){this.docView.update(this.state.doc,[],viewDecorations(this),this);this.dom.textContent=""}else if(this.dom.parentNode){this.dom.parentNode.removeChild(this.dom)}this.docView.destroy();this.docView=null;clearReusedRange()}get isDestroyed(){return this.docView==null}dispatchEvent(event2){return dispatchEvent(this,event2)}dispatch(tr2){let dispatchTransaction=this._props.dispatchTransaction;if(dispatchTransaction)dispatchTransaction.call(this,tr2);else this.updateState(this.state.apply(tr2))}domSelectionRange(){let sel=this.domSelection();if(!sel)return{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0};return safari&&this.root.nodeType===11&&deepActiveElement(this.dom.ownerDocument)==this.dom&&safariShadowSelectionRange(this,sel)||sel}domSelection(){return this.root.getSelection()}}function computeDocDeco(view){let attrs=Object.create(null);attrs.class="ProseMirror";attrs.contenteditable=String(view.editable);view.someProp("attributes",(value=>{if(typeof value=="function")value=value(view.state);if(value)for(let attr in value){if(attr=="class")attrs.class+=" "+value[attr];else if(attr=="style")attrs.style=(attrs.style?attrs.style+";":"")+value[attr];else if(!attrs[attr]&&attr!="contenteditable"&&attr!="nodeName")attrs[attr]=String(value[attr])}}));if(!attrs.translate)attrs.translate="no";return[Decoration.node(0,view.state.doc.content.size,attrs)]}function updateCursorWrapper(view){if(view.markCursor){let dom=document.createElement("img");dom.className="ProseMirror-separator";dom.setAttribute("mark-placeholder","true");dom.setAttribute("alt","");view.cursorWrapper={dom:dom,deco:Decoration.widget(view.state.selection.from,dom,{raw:true,marks:view.markCursor})}}else{view.cursorWrapper=null}}function getEditable(view){return!view.someProp("editable",(value=>value(view.state)===false))}function selectionContextChanged(sel1,sel2){let depth=Math.min(sel1.$anchor.sharedDepth(sel1.head),sel2.$anchor.sharedDepth(sel2.head));return sel1.$anchor.start(depth)!=sel2.$anchor.start(depth)}function buildNodeViews(view){let result=Object.create(null);function add(obj){for(let prop in obj)if(!Object.prototype.hasOwnProperty.call(result,prop))result[prop]=obj[prop]}view.someProp("nodeViews",add);view.someProp("markViews",add);return result}function changedNodeViews(a,b){let nA=0,nB=0;for(let prop in a){if(a[prop]!=b[prop])return true;nA++}for(let _ in b)nB++;return nA!=nB}function checkStateComponent(plugin){if(plugin.spec.state||plugin.spec.filterTransaction||plugin.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var base={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"};var shift={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'};var mac$1=typeof navigator!="undefined"&&/Mac/.test(navigator.platform);var ie=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var i$1=0;i$1<10;i$1++)base[48+i$1]=base[96+i$1]=String(i$1);for(var i$1=1;i$1<=24;i$1++)base[i$1+111]="F"+i$1;for(var i$1=65;i$1<=90;i$1++){base[i$1]=String.fromCharCode(i$1+32);shift[i$1]=String.fromCharCode(i$1)}for(var code in base)if(!shift.hasOwnProperty(code))shift[code]=base[code];function keyName(event2){var ignoreKey=mac$1&&event2.metaKey&&event2.shiftKey&&!event2.ctrlKey&&!event2.altKey||ie&&event2.shiftKey&&event2.key&&event2.key.length==1||event2.key=="Unidentified";var name=!ignoreKey&&event2.key||(event2.shiftKey?shift:base)[event2.keyCode]||event2.key||"Unidentified";if(name=="Esc")name="Escape";if(name=="Del")name="Delete";if(name=="Left")name="ArrowLeft";if(name=="Up")name="ArrowUp";if(name=="Right")name="ArrowRight";if(name=="Down")name="ArrowDown";return name}const mac=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):false;function normalizeKeyName$1(name){let parts=name.split(/-(?!$)/),result=parts[parts.length-1];if(result=="Space")result=" ";let alt,ctrl,shift2,meta;for(let i=0;i<parts.length-1;i++){let mod=parts[i];if(/^(cmd|meta|m)$/i.test(mod))meta=true;else if(/^a(lt)?$/i.test(mod))alt=true;else if(/^(c|ctrl|control)$/i.test(mod))ctrl=true;else if(/^s(hift)?$/i.test(mod))shift2=true;else if(/^mod$/i.test(mod)){if(mac)meta=true;else ctrl=true}else throw new Error("Unrecognized modifier name: "+mod)}if(alt)result="Alt-"+result;if(ctrl)result="Ctrl-"+result;if(meta)result="Meta-"+result;if(shift2)result="Shift-"+result;return result}function normalize(map2){let copy2=Object.create(null);for(let prop in map2)copy2[normalizeKeyName$1(prop)]=map2[prop];return copy2}function modifiers(name,event2,shift2=true){if(event2.altKey)name="Alt-"+name;if(event2.ctrlKey)name="Ctrl-"+name;if(event2.metaKey)name="Meta-"+name;if(shift2&&event2.shiftKey)name="Shift-"+name;return name}function keymap(bindings){return new Plugin({props:{handleKeyDown:keydownHandler(bindings)}})}function keydownHandler(bindings){let map2=normalize(bindings);return function(view,event2){let name=keyName(event2),baseName,direct=map2[modifiers(name,event2)];if(direct&&direct(view.state,view.dispatch,view))return true;if(name.length==1&&name!=" "){if(event2.shiftKey){let noShift=map2[modifiers(name,event2,false)];if(noShift&&noShift(view.state,view.dispatch,view))return true}if((event2.shiftKey||event2.altKey||event2.metaKey||name.charCodeAt(0)>127)&&(baseName=base[event2.keyCode])&&baseName!=name){let fromCode=map2[modifiers(baseName,event2)];if(fromCode&&fromCode(view.state,view.dispatch,view))return true}}return false}}const deleteSelection$1=(state,dispatch)=>{if(state.selection.empty)return false;if(dispatch)dispatch(state.tr.deleteSelection().scrollIntoView());return true};function atBlockStart(state,view){let{$cursor:$cursor}=state.selection;if(!$cursor||(view?!view.endOfTextblock("backward",state):$cursor.parentOffset>0))return null;return $cursor}const joinBackward$1=(state,dispatch,view)=>{let $cursor=atBlockStart(state,view);if(!$cursor)return false;let $cut=findCutBefore($cursor);if(!$cut){let range=$cursor.blockRange(),target=range&&liftTarget(range);if(target==null)return false;if(dispatch)dispatch(state.tr.lift(range,target).scrollIntoView());return true}let before=$cut.nodeBefore;if(deleteBarrier(state,$cut,dispatch,-1))return true;if($cursor.parent.content.size==0&&(textblockAt(before,"end")||NodeSelection.isSelectable(before))){for(let depth=$cursor.depth;;depth--){let delStep=replaceStep(state.doc,$cursor.before(depth),$cursor.after(depth),Slice.empty);if(delStep&&delStep.slice.size<delStep.to-delStep.from){if(dispatch){let tr2=state.tr.step(delStep);tr2.setSelection(textblockAt(before,"end")?Selection.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos,-1)),-1):NodeSelection.create(tr2.doc,$cut.pos-before.nodeSize));dispatch(tr2.scrollIntoView())}return true}if(depth==1||$cursor.node(depth-1).childCount>1)break}}if(before.isAtom&&$cut.depth==$cursor.depth-1){if(dispatch)dispatch(state.tr.delete($cut.pos-before.nodeSize,$cut.pos).scrollIntoView());return true}return false};const joinTextblockBackward$1=(state,dispatch,view)=>{let $cursor=atBlockStart(state,view);if(!$cursor)return false;let $cut=findCutBefore($cursor);return $cut?joinTextblocksAround(state,$cut,dispatch):false};const joinTextblockForward$1=(state,dispatch,view)=>{let $cursor=atBlockEnd(state,view);if(!$cursor)return false;let $cut=findCutAfter($cursor);return $cut?joinTextblocksAround(state,$cut,dispatch):false};function joinTextblocksAround(state,$cut,dispatch){let before=$cut.nodeBefore,beforeText=before,beforePos=$cut.pos-1;for(;!beforeText.isTextblock;beforePos--){if(beforeText.type.spec.isolating)return false;let child=beforeText.lastChild;if(!child)return false;beforeText=child}let after=$cut.nodeAfter,afterText=after,afterPos=$cut.pos+1;for(;!afterText.isTextblock;afterPos++){if(afterText.type.spec.isolating)return false;let child=afterText.firstChild;if(!child)return false;afterText=child}let step=replaceStep(state.doc,beforePos,afterPos,Slice.empty);if(!step||step.from!=beforePos||step instanceof ReplaceStep&&step.slice.size>=afterPos-beforePos)return false;if(dispatch){let tr2=state.tr.step(step);tr2.setSelection(TextSelection.create(tr2.doc,beforePos));dispatch(tr2.scrollIntoView())}return true}function textblockAt(node2,side,only=false){for(let scan=node2;scan;scan=side=="start"?scan.firstChild:scan.lastChild){if(scan.isTextblock)return true;if(only&&scan.childCount!=1)return false}return false}const selectNodeBackward$1=(state,dispatch,view)=>{let{$head:$head,empty:empty2}=state.selection,$cut=$head;if(!empty2)return false;if($head.parent.isTextblock){if(view?!view.endOfTextblock("backward",state):$head.parentOffset>0)return false;$cut=findCutBefore($head)}let node2=$cut&&$cut.nodeBefore;if(!node2||!NodeSelection.isSelectable(node2))return false;if(dispatch)dispatch(state.tr.setSelection(NodeSelection.create(state.doc,$cut.pos-node2.nodeSize)).scrollIntoView());return true};function findCutBefore($pos){if(!$pos.parent.type.spec.isolating)for(let i=$pos.depth-1;i>=0;i--){if($pos.index(i)>0)return $pos.doc.resolve($pos.before(i+1));if($pos.node(i).type.spec.isolating)break}return null}function atBlockEnd(state,view){let{$cursor:$cursor}=state.selection;if(!$cursor||(view?!view.endOfTextblock("forward",state):$cursor.parentOffset<$cursor.parent.content.size))return null;return $cursor}const joinForward$1=(state,dispatch,view)=>{let $cursor=atBlockEnd(state,view);if(!$cursor)return false;let $cut=findCutAfter($cursor);if(!$cut)return false;let after=$cut.nodeAfter;if(deleteBarrier(state,$cut,dispatch,1))return true;if($cursor.parent.content.size==0&&(textblockAt(after,"start")||NodeSelection.isSelectable(after))){let delStep=replaceStep(state.doc,$cursor.before(),$cursor.after(),Slice.empty);if(delStep&&delStep.slice.size<delStep.to-delStep.from){if(dispatch){let tr2=state.tr.step(delStep);tr2.setSelection(textblockAt(after,"start")?Selection.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos)),1):NodeSelection.create(tr2.doc,tr2.mapping.map($cut.pos)));dispatch(tr2.scrollIntoView())}return true}}if(after.isAtom&&$cut.depth==$cursor.depth-1){if(dispatch)dispatch(state.tr.delete($cut.pos,$cut.pos+after.nodeSize).scrollIntoView());return true}return false};const selectNodeForward$1=(state,dispatch,view)=>{let{$head:$head,empty:empty2}=state.selection,$cut=$head;if(!empty2)return false;if($head.parent.isTextblock){if(view?!view.endOfTextblock("forward",state):$head.parentOffset<$head.parent.content.size)return false;$cut=findCutAfter($head)}let node2=$cut&&$cut.nodeAfter;if(!node2||!NodeSelection.isSelectable(node2))return false;if(dispatch)dispatch(state.tr.setSelection(NodeSelection.create(state.doc,$cut.pos)).scrollIntoView());return true};function findCutAfter($pos){if(!$pos.parent.type.spec.isolating)for(let i=$pos.depth-1;i>=0;i--){let parent=$pos.node(i);if($pos.index(i)+1<parent.childCount)return $pos.doc.resolve($pos.after(i+1));if(parent.type.spec.isolating)break}return null}const joinUp$1=(state,dispatch)=>{let sel=state.selection,nodeSel=sel instanceof NodeSelection,point;if(nodeSel){if(sel.node.isTextblock||!canJoin(state.doc,sel.from))return false;point=sel.from}else{point=joinPoint(state.doc,sel.from,-1);if(point==null)return false}if(dispatch){let tr2=state.tr.join(point);if(nodeSel)tr2.setSelection(NodeSelection.create(tr2.doc,point-state.doc.resolve(point).nodeBefore.nodeSize));dispatch(tr2.scrollIntoView())}return true};const joinDown$1=(state,dispatch)=>{let sel=state.selection,point;if(sel instanceof NodeSelection){if(sel.node.isTextblock||!canJoin(state.doc,sel.to))return false;point=sel.to}else{point=joinPoint(state.doc,sel.to,1);if(point==null)return false}if(dispatch)dispatch(state.tr.join(point).scrollIntoView());return true};const lift$1=(state,dispatch)=>{let{$from:$from,$to:$to}=state.selection;let range=$from.blockRange($to),target=range&&liftTarget(range);if(target==null)return false;if(dispatch)dispatch(state.tr.lift(range,target).scrollIntoView());return true};const newlineInCode$1=(state,dispatch)=>{let{$head:$head,$anchor:$anchor}=state.selection;if(!$head.parent.type.spec.code||!$head.sameParent($anchor))return false;if(dispatch)dispatch(state.tr.insertText("\n").scrollIntoView());return true};function defaultBlockAt$1(match2){for(let i=0;i<match2.edgeCount;i++){let{type:type}=match2.edge(i);if(type.isTextblock&&!type.hasRequiredAttrs())return type}return null}const exitCode$1=(state,dispatch)=>{let{$head:$head,$anchor:$anchor}=state.selection;if(!$head.parent.type.spec.code||!$head.sameParent($anchor))return false;let above=$head.node(-1),after=$head.indexAfter(-1),type=defaultBlockAt$1(above.contentMatchAt(after));if(!type||!above.canReplaceWith(after,after,type))return false;if(dispatch){let pos=$head.after(),tr2=state.tr.replaceWith(pos,pos,type.createAndFill());tr2.setSelection(Selection.near(tr2.doc.resolve(pos),1));dispatch(tr2.scrollIntoView())}return true};const createParagraphNear$1=(state,dispatch)=>{let sel=state.selection,{$from:$from,$to:$to}=sel;if(sel instanceof AllSelection||$from.parent.inlineContent||$to.parent.inlineContent)return false;let type=defaultBlockAt$1($to.parent.contentMatchAt($to.indexAfter()));if(!type||!type.isTextblock)return false;if(dispatch){let side=(!$from.parentOffset&&$to.index()<$to.parent.childCount?$from:$to).pos;let tr2=state.tr.insert(side,type.createAndFill());tr2.setSelection(TextSelection.create(tr2.doc,side+1));dispatch(tr2.scrollIntoView())}return true};const liftEmptyBlock$1=(state,dispatch)=>{let{$cursor:$cursor}=state.selection;if(!$cursor||$cursor.parent.content.size)return false;if($cursor.depth>1&&$cursor.after()!=$cursor.end(-1)){let before=$cursor.before();if(canSplit(state.doc,before)){if(dispatch)dispatch(state.tr.split(before).scrollIntoView());return true}}let range=$cursor.blockRange(),target=range&&liftTarget(range);if(target==null)return false;if(dispatch)dispatch(state.tr.lift(range,target).scrollIntoView());return true};function splitBlockAs(splitNode){return(state,dispatch)=>{let{$from:$from,$to:$to}=state.selection;if(state.selection instanceof NodeSelection&&state.selection.node.isBlock){if(!$from.parentOffset||!canSplit(state.doc,$from.pos))return false;if(dispatch)dispatch(state.tr.split($from.pos).scrollIntoView());return true}if(!$from.depth)return false;let types=[];let splitDepth,deflt,atEnd=false,atStart=false;for(let d=$from.depth;;d--){let node2=$from.node(d);if(node2.isBlock){atEnd=$from.end(d)==$from.pos+($from.depth-d);atStart=$from.start(d)==$from.pos-($from.depth-d);deflt=defaultBlockAt$1($from.node(d-1).contentMatchAt($from.indexAfter(d-1)));types.unshift(atEnd&&deflt?{type:deflt}:null);splitDepth=d;break}else{if(d==1)return false;types.unshift(null)}}let tr2=state.tr;if(state.selection instanceof TextSelection||state.selection instanceof AllSelection)tr2.deleteSelection();let splitPos=tr2.mapping.map($from.pos);let can=canSplit(tr2.doc,splitPos,types.length,types);if(!can){types[0]=deflt?{type:deflt}:null;can=canSplit(tr2.doc,splitPos,types.length,types)}if(!can)return false;tr2.split(splitPos,types.length,types);if(!atEnd&&atStart&&$from.node(splitDepth).type!=deflt){let first2=tr2.mapping.map($from.before(splitDepth)),$first=tr2.doc.resolve(first2);if(deflt&&$from.node(splitDepth-1).canReplaceWith($first.index(),$first.index()+1,deflt))tr2.setNodeMarkup(tr2.mapping.map($from.before(splitDepth)),deflt)}if(dispatch)dispatch(tr2.scrollIntoView());return true}}const splitBlock$1=splitBlockAs();const selectParentNode$1=(state,dispatch)=>{let{$from:$from,to:to}=state.selection,pos;let same=$from.sharedDepth(to);if(same==0)return false;pos=$from.before(same);if(dispatch)dispatch(state.tr.setSelection(NodeSelection.create(state.doc,pos)));return true};function joinMaybeClear(state,$pos,dispatch){let before=$pos.nodeBefore,after=$pos.nodeAfter,index2=$pos.index();if(!before||!after||!before.type.compatibleContent(after.type))return false;if(!before.content.size&&$pos.parent.canReplace(index2-1,index2)){if(dispatch)dispatch(state.tr.delete($pos.pos-before.nodeSize,$pos.pos).scrollIntoView());return true}if(!$pos.parent.canReplace(index2,index2+1)||!(after.isTextblock||canJoin(state.doc,$pos.pos)))return false;if(dispatch)dispatch(state.tr.join($pos.pos).scrollIntoView());return true}function deleteBarrier(state,$cut,dispatch,dir){let before=$cut.nodeBefore,after=$cut.nodeAfter,conn,match2;let isolated=before.type.spec.isolating||after.type.spec.isolating;if(!isolated&&joinMaybeClear(state,$cut,dispatch))return true;let canDelAfter=!isolated&&$cut.parent.canReplace($cut.index(),$cut.index()+1);if(canDelAfter&&(conn=(match2=before.contentMatchAt(before.childCount)).findWrapping(after.type))&&match2.matchType(conn[0]||after.type).validEnd){if(dispatch){let end=$cut.pos+after.nodeSize,wrap2=Fragment.empty;for(let i=conn.length-1;i>=0;i--)wrap2=Fragment.from(conn[i].create(null,wrap2));wrap2=Fragment.from(before.copy(wrap2));let tr2=state.tr.step(new ReplaceAroundStep($cut.pos-1,end,$cut.pos,end,new Slice(wrap2,1,0),conn.length,true));let $joinAt=tr2.doc.resolve(end+2*conn.length);if($joinAt.nodeAfter&&$joinAt.nodeAfter.type==before.type&&canJoin(tr2.doc,$joinAt.pos))tr2.join($joinAt.pos);dispatch(tr2.scrollIntoView())}return true}let selAfter=after.type.spec.isolating||dir>0&&isolated?null:Selection.findFrom($cut,1);let range=selAfter&&selAfter.$from.blockRange(selAfter.$to),target=range&&liftTarget(range);if(target!=null&&target>=$cut.depth){if(dispatch)dispatch(state.tr.lift(range,target).scrollIntoView());return true}if(canDelAfter&&textblockAt(after,"start",true)&&textblockAt(before,"end")){let at=before,wrap2=[];for(;;){wrap2.push(at);if(at.isTextblock)break;at=at.lastChild}let afterText=after,afterDepth=1;for(;!afterText.isTextblock;afterText=afterText.firstChild)afterDepth++;if(at.canReplace(at.childCount,at.childCount,afterText.content)){if(dispatch){let end=Fragment.empty;for(let i=wrap2.length-1;i>=0;i--)end=Fragment.from(wrap2[i].copy(end));let tr2=state.tr.step(new ReplaceAroundStep($cut.pos-wrap2.length,$cut.pos+after.nodeSize,$cut.pos+afterDepth,$cut.pos+after.nodeSize-afterDepth,new Slice(end,wrap2.length,0),0,true));dispatch(tr2.scrollIntoView())}return true}}return false}function selectTextblockSide(side){return function(state,dispatch){let sel=state.selection,$pos=side<0?sel.$from:sel.$to;let depth=$pos.depth;while($pos.node(depth).isInline){if(!depth)return false;depth--}if(!$pos.node(depth).isTextblock)return false;if(dispatch)dispatch(state.tr.setSelection(TextSelection.create(state.doc,side<0?$pos.start(depth):$pos.end(depth))));return true}}const selectTextblockStart$1=selectTextblockSide(-1);const selectTextblockEnd$1=selectTextblockSide(1);function wrapIn$1(nodeType,attrs=null){return function(state,dispatch){let{$from:$from,$to:$to}=state.selection;let range=$from.blockRange($to),wrapping=range&&findWrapping(range,nodeType,attrs);if(!wrapping)return false;if(dispatch)dispatch(state.tr.wrap(range,wrapping).scrollIntoView());return true}}function setBlockType(nodeType,attrs=null){return function(state,dispatch){let applicable=false;for(let i=0;i<state.selection.ranges.length&&!applicable;i++){let{$from:{pos:from3},$to:{pos:to}}=state.selection.ranges[i];state.doc.nodesBetween(from3,to,((node2,pos)=>{if(applicable)return false;if(!node2.isTextblock||node2.hasMarkup(nodeType,attrs))return;if(node2.type==nodeType){applicable=true}else{let $pos=state.doc.resolve(pos),index2=$pos.index();applicable=$pos.parent.canReplaceWith(index2,index2+1,nodeType)}}))}if(!applicable)return false;if(dispatch){let tr2=state.tr;for(let i=0;i<state.selection.ranges.length;i++){let{$from:{pos:from3},$to:{pos:to}}=state.selection.ranges[i];tr2.setBlockType(from3,to,nodeType,attrs)}dispatch(tr2.scrollIntoView())}return true}}function chainCommands(...commands2){return function(state,dispatch,view){for(let i=0;i<commands2.length;i++)if(commands2[i](state,dispatch,view))return true;return false}}chainCommands(deleteSelection$1,joinBackward$1,selectNodeBackward$1);chainCommands(deleteSelection$1,joinForward$1,selectNodeForward$1);({Enter:chainCommands(newlineInCode$1,createParagraphNear$1,liftEmptyBlock$1,splitBlock$1)});typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform?os.platform()=="darwin":false;function wrapInList$1(listType,attrs=null){return function(state,dispatch){let{$from:$from,$to:$to}=state.selection;let range=$from.blockRange($to);if(!range)return false;let tr2=dispatch?state.tr:null;if(!wrapRangeInList(tr2,range,listType,attrs))return false;if(dispatch)dispatch(tr2.scrollIntoView());return true}}function wrapRangeInList(tr2,range,listType,attrs=null){let doJoin=false,outerRange=range,doc2=range.$from.doc;if(range.depth>=2&&range.$from.node(range.depth-1).type.compatibleContent(listType)&&range.startIndex==0){if(range.$from.index(range.depth-1)==0)return false;let $insert=doc2.resolve(range.start-2);outerRange=new NodeRange($insert,$insert,range.depth);if(range.endIndex<range.parent.childCount)range=new NodeRange(range.$from,doc2.resolve(range.$to.end(range.depth)),range.depth);doJoin=true}let wrap2=findWrapping(outerRange,listType,attrs,range);if(!wrap2)return false;if(tr2)doWrapInList(tr2,range,wrap2,doJoin,listType);return true}function doWrapInList(tr2,range,wrappers,joinBefore,listType){let content=Fragment.empty;for(let i=wrappers.length-1;i>=0;i--)content=Fragment.from(wrappers[i].type.create(wrappers[i].attrs,content));tr2.step(new ReplaceAroundStep(range.start-(joinBefore?2:0),range.end,range.start,range.end,new Slice(content,0,0),wrappers.length,true));let found2=0;for(let i=0;i<wrappers.length;i++)if(wrappers[i].type==listType)found2=i+1;let splitDepth=wrappers.length-found2;let splitPos=range.start+wrappers.length-(joinBefore?2:0),parent=range.parent;for(let i=range.startIndex,e=range.endIndex,first2=true;i<e;i++,first2=false){if(!first2&&canSplit(tr2.doc,splitPos,splitDepth)){tr2.split(splitPos,splitDepth);splitPos+=2*splitDepth}splitPos+=parent.child(i).nodeSize}return tr2}function liftListItem$1(itemType){return function(state,dispatch){let{$from:$from,$to:$to}=state.selection;let range=$from.blockRange($to,(node2=>node2.childCount>0&&node2.firstChild.type==itemType));if(!range)return false;if(!dispatch)return true;if($from.node(range.depth-1).type==itemType)return liftToOuterList(state,dispatch,itemType,range);else return liftOutOfList(state,dispatch,range)}}function liftToOuterList(state,dispatch,itemType,range){let tr2=state.tr,end=range.end,endOfList=range.$to.end(range.depth);if(end<endOfList){tr2.step(new ReplaceAroundStep(end-1,endOfList,end,endOfList,new Slice(Fragment.from(itemType.create(null,range.parent.copy())),1,0),1,true));range=new NodeRange(tr2.doc.resolve(range.$from.pos),tr2.doc.resolve(endOfList),range.depth)}const target=liftTarget(range);if(target==null)return false;tr2.lift(range,target);let $after=tr2.doc.resolve(tr2.mapping.map(end,-1)-1);if(canJoin(tr2.doc,$after.pos)&&$after.nodeBefore.type==$after.nodeAfter.type)tr2.join($after.pos);dispatch(tr2.scrollIntoView());return true}function liftOutOfList(state,dispatch,range){let tr2=state.tr,list=range.parent;for(let pos=range.end,i=range.endIndex-1,e=range.startIndex;i>e;i--){pos-=list.child(i).nodeSize;tr2.delete(pos-1,pos+1)}let $start=tr2.doc.resolve(range.start),item=$start.nodeAfter;if(tr2.mapping.map(range.end)!=range.start+$start.nodeAfter.nodeSize)return false;let atStart=range.startIndex==0,atEnd=range.endIndex==list.childCount;let parent=$start.node(-1),indexBefore=$start.index(-1);if(!parent.canReplace(indexBefore+(atStart?0:1),indexBefore+1,item.content.append(atEnd?Fragment.empty:Fragment.from(list))))return false;let start=$start.pos,end=start+item.nodeSize;tr2.step(new ReplaceAroundStep(start-(atStart?1:0),end+(atEnd?1:0),start+1,end-1,new Slice((atStart?Fragment.empty:Fragment.from(list.copy(Fragment.empty))).append(atEnd?Fragment.empty:Fragment.from(list.copy(Fragment.empty))),atStart?0:1,atEnd?0:1),atStart?0:1));dispatch(tr2.scrollIntoView());return true}function sinkListItem$1(itemType){return function(state,dispatch){let{$from:$from,$to:$to}=state.selection;let range=$from.blockRange($to,(node2=>node2.childCount>0&&node2.firstChild.type==itemType));if(!range)return false;let startIndex=range.startIndex;if(startIndex==0)return false;let parent=range.parent,nodeBefore=parent.child(startIndex-1);if(nodeBefore.type!=itemType)return false;if(dispatch){let nestedBefore=nodeBefore.lastChild&&nodeBefore.lastChild.type==parent.type;let inner=Fragment.from(nestedBefore?itemType.create():null);let slice3=new Slice(Fragment.from(itemType.create(null,Fragment.from(parent.type.create(null,inner)))),nestedBefore?3:1,0);let before=range.start,after=range.end;dispatch(state.tr.step(new ReplaceAroundStep(before-(nestedBefore?3:1),after,before,after,slice3,1,true)).scrollIntoView())}return true}}function createChainableState(config){const{state:state,transaction:transaction}=config;let{selection:selection}=transaction;let{doc:doc2}=transaction;let{storedMarks:storedMarks}=transaction;return{...state,apply:state.apply.bind(state),applyTransaction:state.applyTransaction.bind(state),plugins:state.plugins,schema:state.schema,reconfigure:state.reconfigure.bind(state),toJSON:state.toJSON.bind(state),get storedMarks(){return storedMarks},get selection(){return selection},get doc(){return doc2},get tr(){selection=transaction.selection;doc2=transaction.doc;storedMarks=transaction.storedMarks;return transaction}}}class CommandManager{constructor(props){this.editor=props.editor;this.rawCommands=this.editor.extensionManager.commands;this.customState=props.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:rawCommands,editor:editor,state:state}=this;const{view:view}=editor;const{tr:tr2}=state;const props=this.buildProps(tr2);return Object.fromEntries(Object.entries(rawCommands).map((([name,command2])=>{const method=(...args)=>{const callback=command2(...args)(props);if(!tr2.getMeta("preventDispatch")&&!this.hasCustomState){view.dispatch(tr2)}return callback};return[name,method]})))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(startTr,shouldDispatch=true){const{rawCommands:rawCommands,editor:editor,state:state}=this;const{view:view}=editor;const callbacks=[];const hasStartTransaction=!!startTr;const tr2=startTr||state.tr;const run2=()=>{if(!hasStartTransaction&&shouldDispatch&&!tr2.getMeta("preventDispatch")&&!this.hasCustomState){view.dispatch(tr2)}return callbacks.every((callback=>callback===true))};const chain={...Object.fromEntries(Object.entries(rawCommands).map((([name,command2])=>{const chainedCommand=(...args)=>{const props=this.buildProps(tr2,shouldDispatch);const callback=command2(...args)(props);callbacks.push(callback);return chain};return[name,chainedCommand]}))),run:run2};return chain}createCan(startTr){const{rawCommands:rawCommands,state:state}=this;const dispatch=false;const tr2=startTr||state.tr;const props=this.buildProps(tr2,dispatch);const formattedCommands=Object.fromEntries(Object.entries(rawCommands).map((([name,command2])=>[name,(...args)=>command2(...args)({...props,dispatch:void 0})])));return{...formattedCommands,chain:()=>this.createChain(tr2,dispatch)}}buildProps(tr2,shouldDispatch=true){const{rawCommands:rawCommands,editor:editor,state:state}=this;const{view:view}=editor;const props={tr:tr2,editor:editor,view:view,state:createChainableState({state:state,transaction:tr2}),dispatch:shouldDispatch?()=>void 0:void 0,chain:()=>this.createChain(tr2,shouldDispatch),can:()=>this.createCan(tr2),get commands(){return Object.fromEntries(Object.entries(rawCommands).map((([name,command2])=>[name,(...args)=>command2(...args)(props)])))}};return props}}class EventEmitter{constructor(){this.callbacks={}}on(event2,fn){if(!this.callbacks[event2]){this.callbacks[event2]=[]}this.callbacks[event2].push(fn);return this}emit(event2,...args){const callbacks=this.callbacks[event2];if(callbacks){callbacks.forEach((callback=>callback.apply(this,args)))}return this}off(event2,fn){const callbacks=this.callbacks[event2];if(callbacks){if(fn){this.callbacks[event2]=callbacks.filter((callback=>callback!==fn))}else{delete this.callbacks[event2]}}return this}once(event2,fn){const onceFn=(...args)=>{this.off(event2,onceFn);fn.apply(this,args)};return this.on(event2,onceFn)}removeAllListeners(){this.callbacks={}}}function getExtensionField(extension,field,context){if(extension.config[field]===void 0&&extension.parent){return getExtensionField(extension.parent,field,context)}if(typeof extension.config[field]==="function"){const value=extension.config[field].bind({...context,parent:extension.parent?getExtensionField(extension.parent,field,context):null});return value}return extension.config[field]}function splitExtensions(extensions){const baseExtensions=extensions.filter((extension=>extension.type==="extension"));const nodeExtensions=extensions.filter((extension=>extension.type==="node"));const markExtensions=extensions.filter((extension=>extension.type==="mark"));return{baseExtensions:baseExtensions,nodeExtensions:nodeExtensions,markExtensions:markExtensions}}function getAttributesFromExtensions(extensions){const extensionAttributes=[];const{nodeExtensions:nodeExtensions,markExtensions:markExtensions}=splitExtensions(extensions);const nodeAndMarkExtensions=[...nodeExtensions,...markExtensions];const defaultAttribute={default:null,rendered:true,renderHTML:null,parseHTML:null,keepOnSplit:true,isRequired:false};extensions.forEach((extension=>{const context={name:extension.name,options:extension.options,storage:extension.storage,extensions:nodeAndMarkExtensions};const addGlobalAttributes=getExtensionField(extension,"addGlobalAttributes",context);if(!addGlobalAttributes){return}const globalAttributes=addGlobalAttributes();globalAttributes.forEach((globalAttribute=>{globalAttribute.types.forEach((type=>{Object.entries(globalAttribute.attributes).forEach((([name,attribute])=>{extensionAttributes.push({type:type,name:name,attribute:{...defaultAttribute,...attribute}})}))}))}))}));nodeAndMarkExtensions.forEach((extension=>{const context={name:extension.name,options:extension.options,storage:extension.storage};const addAttributes=getExtensionField(extension,"addAttributes",context);if(!addAttributes){return}const attributes=addAttributes();Object.entries(attributes).forEach((([name,attribute])=>{const mergedAttr={...defaultAttribute,...attribute};if(typeof(mergedAttr===null||mergedAttr===void 0?void 0:mergedAttr.default)==="function"){mergedAttr.default=mergedAttr.default()}if((mergedAttr===null||mergedAttr===void 0?void 0:mergedAttr.isRequired)&&(mergedAttr===null||mergedAttr===void 0?void 0:mergedAttr.default)===void 0){delete mergedAttr.default}extensionAttributes.push({type:extension.name,name:name,attribute:mergedAttr})}))}));return extensionAttributes}function getNodeType(nameOrType,schema){if(typeof nameOrType==="string"){if(!schema.nodes[nameOrType]){throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`)}return schema.nodes[nameOrType]}return nameOrType}function mergeAttributes(...objects){return objects.filter((item=>!!item)).reduce(((items,item)=>{const mergedAttributes={...items};Object.entries(item).forEach((([key,value])=>{const exists=mergedAttributes[key];if(!exists){mergedAttributes[key]=value;return}if(key==="class"){const valueClasses=value?String(value).split(" "):[];const existingClasses=mergedAttributes[key]?mergedAttributes[key].split(" "):[];const insertClasses=valueClasses.filter((valueClass=>!existingClasses.includes(valueClass)));mergedAttributes[key]=[...existingClasses,...insertClasses].join(" ")}else if(key==="style"){const newStyles=value?value.split(";").map((style2=>style2.trim())).filter(Boolean):[];const existingStyles=mergedAttributes[key]?mergedAttributes[key].split(";").map((style2=>style2.trim())).filter(Boolean):[];const styleMap=new Map;existingStyles.forEach((style2=>{const[property,val]=style2.split(":").map((part=>part.trim()));styleMap.set(property,val)}));newStyles.forEach((style2=>{const[property,val]=style2.split(":").map((part=>part.trim()));styleMap.set(property,val)}));mergedAttributes[key]=Array.from(styleMap.entries()).map((([property,val])=>`${property}: ${val}`)).join("; ")}else{mergedAttributes[key]=value}}));return mergedAttributes}),{})}function getRenderedAttributes(nodeOrMark,extensionAttributes){return extensionAttributes.filter((attribute=>attribute.type===nodeOrMark.type.name)).filter((item=>item.attribute.rendered)).map((item=>{if(!item.attribute.renderHTML){return{[item.name]:nodeOrMark.attrs[item.name]}}return item.attribute.renderHTML(nodeOrMark.attrs)||{}})).reduce(((attributes,attribute)=>mergeAttributes(attributes,attribute)),{})}function isFunction(value){return typeof value==="function"}function callOrReturn(value,context=void 0,...props){if(isFunction(value)){if(context){return value.bind(context)(...props)}return value(...props)}return value}function isEmptyObject(value={}){return Object.keys(value).length===0&&value.constructor===Object}function fromString(value){if(typeof value!=="string"){return value}if(value.match(/^[+-]?(?:\d*\.)?\d+$/)){return Number(value)}if(value==="true"){return true}if(value==="false"){return false}return value}function injectExtensionAttributesToParseRule(parseRule,extensionAttributes){if("style"in parseRule){return parseRule}return{...parseRule,getAttrs:node2=>{const oldAttributes=parseRule.getAttrs?parseRule.getAttrs(node2):parseRule.attrs;if(oldAttributes===false){return false}const newAttributes=extensionAttributes.reduce(((items,item)=>{const value=item.attribute.parseHTML?item.attribute.parseHTML(node2):fromString(node2.getAttribute(item.name));if(value===null||value===void 0){return items}return{...items,[item.name]:value}}),{});return{...oldAttributes,...newAttributes}}}}function cleanUpSchemaItem(data){return Object.fromEntries(Object.entries(data).filter((([key,value])=>{if(key==="attrs"&&isEmptyObject(value)){return false}return value!==null&&value!==void 0})))}function getSchemaByResolvedExtensions(extensions,editor){var _a;const allAttributes=getAttributesFromExtensions(extensions);const{nodeExtensions:nodeExtensions,markExtensions:markExtensions}=splitExtensions(extensions);const topNode=(_a=nodeExtensions.find((extension=>getExtensionField(extension,"topNode"))))===null||_a===void 0?void 0:_a.name;const nodes=Object.fromEntries(nodeExtensions.map((extension=>{const extensionAttributes=allAttributes.filter((attribute=>attribute.type===extension.name));const context={name:extension.name,options:extension.options,storage:extension.storage,editor:editor};const extraNodeFields=extensions.reduce(((fields,e)=>{const extendNodeSchema=getExtensionField(e,"extendNodeSchema",context);return{...fields,...extendNodeSchema?extendNodeSchema(extension):{}}}),{});const schema=cleanUpSchemaItem({...extraNodeFields,content:callOrReturn(getExtensionField(extension,"content",context)),marks:callOrReturn(getExtensionField(extension,"marks",context)),group:callOrReturn(getExtensionField(extension,"group",context)),inline:callOrReturn(getExtensionField(extension,"inline",context)),atom:callOrReturn(getExtensionField(extension,"atom",context)),selectable:callOrReturn(getExtensionField(extension,"selectable",context)),draggable:callOrReturn(getExtensionField(extension,"draggable",context)),code:callOrReturn(getExtensionField(extension,"code",context)),whitespace:callOrReturn(getExtensionField(extension,"whitespace",context)),linebreakReplacement:callOrReturn(getExtensionField(extension,"linebreakReplacement",context)),defining:callOrReturn(getExtensionField(extension,"defining",context)),isolating:callOrReturn(getExtensionField(extension,"isolating",context)),attrs:Object.fromEntries(extensionAttributes.map((extensionAttribute=>{var _a2;return[extensionAttribute.name,{default:(_a2=extensionAttribute===null||extensionAttribute===void 0?void 0:extensionAttribute.attribute)===null||_a2===void 0?void 0:_a2.default}]})))});const parseHTML=callOrReturn(getExtensionField(extension,"parseHTML",context));if(parseHTML){schema.parseDOM=parseHTML.map((parseRule=>injectExtensionAttributesToParseRule(parseRule,extensionAttributes)))}const renderHTML=getExtensionField(extension,"renderHTML",context);if(renderHTML){schema.toDOM=node2=>renderHTML({node:node2,HTMLAttributes:getRenderedAttributes(node2,extensionAttributes)})}const renderText=getExtensionField(extension,"renderText",context);if(renderText){schema.toText=renderText}return[extension.name,schema]})));const marks=Object.fromEntries(markExtensions.map((extension=>{const extensionAttributes=allAttributes.filter((attribute=>attribute.type===extension.name));const context={name:extension.name,options:extension.options,storage:extension.storage,editor:editor};const extraMarkFields=extensions.reduce(((fields,e)=>{const extendMarkSchema=getExtensionField(e,"extendMarkSchema",context);return{...fields,...extendMarkSchema?extendMarkSchema(extension):{}}}),{});const schema=cleanUpSchemaItem({...extraMarkFields,inclusive:callOrReturn(getExtensionField(extension,"inclusive",context)),excludes:callOrReturn(getExtensionField(extension,"excludes",context)),group:callOrReturn(getExtensionField(extension,"group",context)),spanning:callOrReturn(getExtensionField(extension,"spanning",context)),code:callOrReturn(getExtensionField(extension,"code",context)),attrs:Object.fromEntries(extensionAttributes.map((extensionAttribute=>{var _a2;return[extensionAttribute.name,{default:(_a2=extensionAttribute===null||extensionAttribute===void 0?void 0:extensionAttribute.attribute)===null||_a2===void 0?void 0:_a2.default}]})))});const parseHTML=callOrReturn(getExtensionField(extension,"parseHTML",context));if(parseHTML){schema.parseDOM=parseHTML.map((parseRule=>injectExtensionAttributesToParseRule(parseRule,extensionAttributes)))}const renderHTML=getExtensionField(extension,"renderHTML",context);if(renderHTML){schema.toDOM=mark=>renderHTML({mark:mark,HTMLAttributes:getRenderedAttributes(mark,extensionAttributes)})}return[extension.name,schema]})));return new Schema({topNode:topNode,nodes:nodes,marks:marks})}function getSchemaTypeByName(name,schema){return schema.nodes[name]||schema.marks[name]||null}function isExtensionRulesEnabled(extension,enabled){if(Array.isArray(enabled)){return enabled.some((enabledExtension=>{const name=typeof enabledExtension==="string"?enabledExtension:enabledExtension.name;return name===extension.name}))}return enabled}function getHTMLFromFragment(fragment,schema){const documentFragment=DOMSerializer.fromSchema(schema).serializeFragment(fragment);const temporaryDocument=document.implementation.createHTMLDocument();const container=temporaryDocument.createElement("div");container.appendChild(documentFragment);return container.innerHTML}const getTextContentFromNodes=($from,maxMatch=500)=>{let textBefore="";const sliceEndPos=$from.parentOffset;$from.parent.nodesBetween(Math.max(0,sliceEndPos-maxMatch),sliceEndPos,((node2,pos,parent,index2)=>{var _a,_b;const chunk=((_b=(_a=node2.type.spec).toText)===null||_b===void 0?void 0:_b.call(_a,{node:node2,pos:pos,parent:parent,index:index2}))||node2.textContent||"%leaf%";textBefore+=node2.isAtom&&!node2.isText?chunk:chunk.slice(0,Math.max(0,sliceEndPos-pos))}));return textBefore};function isRegExp(value){return Object.prototype.toString.call(value)==="[object RegExp]"}class InputRule{constructor(config){this.find=config.find;this.handler=config.handler}}const inputRuleMatcherHandler=(text,find2)=>{if(isRegExp(find2)){return find2.exec(text)}const inputRuleMatch=find2(text);if(!inputRuleMatch){return null}const result=[inputRuleMatch.text];result.index=inputRuleMatch.index;result.input=text;result.data=inputRuleMatch.data;if(inputRuleMatch.replaceWith){if(!inputRuleMatch.text.includes(inputRuleMatch.replaceWith)){console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".')}result.push(inputRuleMatch.replaceWith)}return result};function run$1$1(config){var _a;const{editor:editor,from:from3,to:to,text:text,rules:rules,plugin:plugin}=config;const{view:view}=editor;if(view.composing){return false}const $from=view.state.doc.resolve(from3);if($from.parent.type.spec.code||!!((_a=$from.nodeBefore||$from.nodeAfter)===null||_a===void 0?void 0:_a.marks.find((mark=>mark.type.spec.code)))){return false}let matched=false;const textBefore=getTextContentFromNodes($from)+text;rules.forEach((rule=>{if(matched){return}const match2=inputRuleMatcherHandler(textBefore,rule.find);if(!match2){return}const tr2=view.state.tr;const state=createChainableState({state:view.state,transaction:tr2});const range={from:from3-(match2[0].length-text.length),to:to};const{commands:commands2,chain:chain,can:can}=new CommandManager({editor:editor,state:state});const handler=rule.handler({state:state,range:range,match:match2,commands:commands2,chain:chain,can:can});if(handler===null||!tr2.steps.length){return}tr2.setMeta(plugin,{transform:tr2,from:from3,to:to,text:text});view.dispatch(tr2);matched=true}));return matched}function inputRulesPlugin(props){const{editor:editor,rules:rules}=props;const plugin=new Plugin({state:{init(){return null},apply(tr2,prev2,state){const stored=tr2.getMeta(plugin);if(stored){return stored}const simulatedInputMeta=tr2.getMeta("applyInputRules");const isSimulatedInput=!!simulatedInputMeta;if(isSimulatedInput){setTimeout((()=>{let{text:text}=simulatedInputMeta;if(typeof text==="string"){text=text}else{text=getHTMLFromFragment(Fragment.from(text),state.schema)}const{from:from3}=simulatedInputMeta;const to=from3+text.length;run$1$1({editor:editor,from:from3,to:to,text:text,rules:rules,plugin:plugin})}))}return tr2.selectionSet||tr2.docChanged?null:prev2}},props:{handleTextInput(view,from3,to,text){return run$1$1({editor:editor,from:from3,to:to,text:text,rules:rules,plugin:plugin})},handleDOMEvents:{compositionend:view=>{setTimeout((()=>{const{$cursor:$cursor}=view.state.selection;if($cursor){run$1$1({editor:editor,from:$cursor.pos,to:$cursor.pos,text:"",rules:rules,plugin:plugin})}}));return false}},handleKeyDown(view,event2){if(event2.key!=="Enter"){return false}const{$cursor:$cursor}=view.state.selection;if($cursor){return run$1$1({editor:editor,from:$cursor.pos,to:$cursor.pos,text:"\n",rules:rules,plugin:plugin})}return false}},isInputRules:true});return plugin}function getType(value){return Object.prototype.toString.call(value).slice(8,-1)}function isPlainObject(value){if(getType(value)!=="Object"){return false}return value.constructor===Object&&Object.getPrototypeOf(value)===Object.prototype}function mergeDeep(target,source){const output={...target};if(isPlainObject(target)&&isPlainObject(source)){Object.keys(source).forEach((key=>{if(isPlainObject(source[key])&&isPlainObject(target[key])){output[key]=mergeDeep(target[key],source[key])}else{output[key]=source[key]}}))}return output}class Mark2{constructor(config={}){this.type="mark";this.name="mark";this.parent=null;this.child=null;this.config={name:this.name,defaultOptions:{}};this.config={...this.config,...config};this.name=this.config.name;if(config.defaultOptions&&Object.keys(config.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`)}this.options=this.config.defaultOptions;if(this.config.addOptions){this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))}this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(config={}){return new Mark2(config)}configure(options2={}){const extension=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,options2)});extension.name=this.name;extension.parent=this.parent;return extension}extend(extendedConfig={}){const extension=new Mark2(extendedConfig);extension.parent=this;this.child=extension;extension.name=extendedConfig.name?extendedConfig.name:extension.parent.name;if(extendedConfig.defaultOptions&&Object.keys(extendedConfig.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`)}extension.options=callOrReturn(getExtensionField(extension,"addOptions",{name:extension.name}));extension.storage=callOrReturn(getExtensionField(extension,"addStorage",{name:extension.name,options:extension.options}));return extension}static handleExit({editor:editor,mark:mark}){const{tr:tr2}=editor.state;const currentPos=editor.state.selection.$from;const isAtEnd=currentPos.pos===currentPos.end();if(isAtEnd){const currentMarks=currentPos.marks();const isInMark=!!currentMarks.find((m=>(m===null||m===void 0?void 0:m.type.name)===mark.name));if(!isInMark){return false}const removeMark2=currentMarks.find((m=>(m===null||m===void 0?void 0:m.type.name)===mark.name));if(removeMark2){tr2.removeStoredMark(removeMark2)}tr2.insertText(" ",currentPos.pos);editor.view.dispatch(tr2);return true}return false}}function isNumber(value){return typeof value==="number"}class PasteRule{constructor(config){this.find=config.find;this.handler=config.handler}}const pasteRuleMatcherHandler=(text,find2,event2)=>{if(isRegExp(find2)){return[...text.matchAll(find2)]}const matches2=find2(text,event2);if(!matches2){return[]}return matches2.map((pasteRuleMatch=>{const result=[pasteRuleMatch.text];result.index=pasteRuleMatch.index;result.input=text;result.data=pasteRuleMatch.data;if(pasteRuleMatch.replaceWith){if(!pasteRuleMatch.text.includes(pasteRuleMatch.replaceWith)){console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".')}result.push(pasteRuleMatch.replaceWith)}return result}))};function run$2(config){const{editor:editor,state:state,from:from3,to:to,rule:rule,pasteEvent:pasteEvent,dropEvent:dropEvent}=config;const{commands:commands2,chain:chain,can:can}=new CommandManager({editor:editor,state:state});const handlers2=[];state.doc.nodesBetween(from3,to,((node2,pos)=>{if(!node2.isTextblock||node2.type.spec.code){return}const resolvedFrom=Math.max(from3,pos);const resolvedTo=Math.min(to,pos+node2.content.size);const textToMatch=node2.textBetween(resolvedFrom-pos,resolvedTo-pos,void 0,"");const matches2=pasteRuleMatcherHandler(textToMatch,rule.find,pasteEvent);matches2.forEach((match2=>{if(match2.index===void 0){return}const start=resolvedFrom+match2.index+1;const end=start+match2[0].length;const range={from:state.tr.mapping.map(start),to:state.tr.mapping.map(end)};const handler=rule.handler({state:state,range:range,match:match2,commands:commands2,chain:chain,can:can,pasteEvent:pasteEvent,dropEvent:dropEvent});handlers2.push(handler)}))}));const success=handlers2.every((handler=>handler!==null));return success}let tiptapDragFromOtherEditor=null;const createClipboardPasteEvent=text=>{var _a;const event2=new ClipboardEvent("paste",{clipboardData:new DataTransfer});(_a=event2.clipboardData)===null||_a===void 0?void 0:_a.setData("text/html",text);return event2};function pasteRulesPlugin(props){const{editor:editor,rules:rules}=props;let dragSourceElement=null;let isPastedFromProseMirror=false;let isDroppedFromProseMirror=false;let pasteEvent=typeof ClipboardEvent!=="undefined"?new ClipboardEvent("paste"):null;let dropEvent;try{dropEvent=typeof DragEvent!=="undefined"?new DragEvent("drop"):null}catch{dropEvent=null}const processEvent=({state:state,from:from3,to:to,rule:rule,pasteEvt:pasteEvt})=>{const tr2=state.tr;const chainableState=createChainableState({state:state,transaction:tr2});const handler=run$2({editor:editor,state:chainableState,from:Math.max(from3-1,0),to:to.b-1,rule:rule,pasteEvent:pasteEvt,dropEvent:dropEvent});if(!handler||!tr2.steps.length){return}try{dropEvent=typeof DragEvent!=="undefined"?new DragEvent("drop"):null}catch{dropEvent=null}pasteEvent=typeof ClipboardEvent!=="undefined"?new ClipboardEvent("paste"):null;return tr2};const plugins=rules.map((rule=>new Plugin({view(view){const handleDragstart=event2=>{var _a;dragSourceElement=((_a=view.dom.parentElement)===null||_a===void 0?void 0:_a.contains(event2.target))?view.dom.parentElement:null;if(dragSourceElement){tiptapDragFromOtherEditor=editor}};const handleDragend=()=>{if(tiptapDragFromOtherEditor){tiptapDragFromOtherEditor=null}};window.addEventListener("dragstart",handleDragstart);window.addEventListener("dragend",handleDragend);return{destroy(){window.removeEventListener("dragstart",handleDragstart);window.removeEventListener("dragend",handleDragend)}}},props:{handleDOMEvents:{drop:(view,event2)=>{isDroppedFromProseMirror=dragSourceElement===view.dom.parentElement;dropEvent=event2;if(!isDroppedFromProseMirror){const dragFromOtherEditor=tiptapDragFromOtherEditor;if(dragFromOtherEditor){setTimeout((()=>{const selection=dragFromOtherEditor.state.selection;if(selection){dragFromOtherEditor.commands.deleteRange({from:selection.from,to:selection.to})}}),10)}}return false},paste:(_view,event2)=>{var _a;const html=(_a=event2.clipboardData)===null||_a===void 0?void 0:_a.getData("text/html");pasteEvent=event2;isPastedFromProseMirror=!!(html===null||html===void 0?void 0:html.includes("data-pm-slice"));return false}}},appendTransaction:(transactions,oldState,state)=>{const transaction=transactions[0];const isPaste=transaction.getMeta("uiEvent")==="paste"&&!isPastedFromProseMirror;const isDrop=transaction.getMeta("uiEvent")==="drop"&&!isDroppedFromProseMirror;const simulatedPasteMeta=transaction.getMeta("applyPasteRules");const isSimulatedPaste=!!simulatedPasteMeta;if(!isPaste&&!isDrop&&!isSimulatedPaste){return}if(isSimulatedPaste){let{text:text}=simulatedPasteMeta;if(typeof text==="string"){text=text}else{text=getHTMLFromFragment(Fragment.from(text),state.schema)}const{from:from4}=simulatedPasteMeta;const to2=from4+text.length;const pasteEvt=createClipboardPasteEvent(text);return processEvent({rule:rule,state:state,from:from4,to:{b:to2},pasteEvt:pasteEvt})}const from3=oldState.doc.content.findDiffStart(state.doc.content);const to=oldState.doc.content.findDiffEnd(state.doc.content);if(!isNumber(from3)||!to||from3===to.b){return}return processEvent({rule:rule,state:state,from:from3,to:to,pasteEvt:pasteEvent})}})));return plugins}function findDuplicates(items){const filtered=items.filter(((el,index2)=>items.indexOf(el)!==index2));return Array.from(new Set(filtered))}class ExtensionManager{constructor(extensions,editor){this.splittableMarks=[];this.editor=editor;this.extensions=ExtensionManager.resolve(extensions);this.schema=getSchemaByResolvedExtensions(this.extensions,editor);this.setupExtensions()}static resolve(extensions){const resolvedExtensions=ExtensionManager.sort(ExtensionManager.flatten(extensions));const duplicatedNames=findDuplicates(resolvedExtensions.map((extension=>extension.name)));if(duplicatedNames.length){console.warn(`[tiptap warn]: Duplicate extension names found: [${duplicatedNames.map((item=>`'${item}'`)).join(", ")}]. This can lead to issues.`)}return resolvedExtensions}static flatten(extensions){return extensions.map((extension=>{const context={name:extension.name,options:extension.options,storage:extension.storage};const addExtensions=getExtensionField(extension,"addExtensions",context);if(addExtensions){return[extension,...this.flatten(addExtensions())]}return extension})).flat(10)}static sort(extensions){const defaultPriority=100;return extensions.sort(((a,b)=>{const priorityA=getExtensionField(a,"priority")||defaultPriority;const priorityB=getExtensionField(b,"priority")||defaultPriority;if(priorityA>priorityB){return-1}if(priorityA<priorityB){return 1}return 0}))}get commands(){return this.extensions.reduce(((commands2,extension)=>{const context={name:extension.name,options:extension.options,storage:extension.storage,editor:this.editor,type:getSchemaTypeByName(extension.name,this.schema)};const addCommands=getExtensionField(extension,"addCommands",context);if(!addCommands){return commands2}return{...commands2,...addCommands()}}),{})}get plugins(){const{editor:editor}=this;const extensions=ExtensionManager.sort([...this.extensions].reverse());const inputRules=[];const pasteRules=[];const allPlugins=extensions.map((extension=>{const context={name:extension.name,options:extension.options,storage:extension.storage,editor:editor,type:getSchemaTypeByName(extension.name,this.schema)};const plugins=[];const addKeyboardShortcuts=getExtensionField(extension,"addKeyboardShortcuts",context);let defaultBindings={};if(extension.type==="mark"&&getExtensionField(extension,"exitable",context)){defaultBindings.ArrowRight=()=>Mark2.handleExit({editor:editor,mark:extension})}if(addKeyboardShortcuts){const bindings=Object.fromEntries(Object.entries(addKeyboardShortcuts()).map((([shortcut,method])=>[shortcut,()=>method({editor:editor})])));defaultBindings={...defaultBindings,...bindings}}const keyMapPlugin=keymap(defaultBindings);plugins.push(keyMapPlugin);const addInputRules=getExtensionField(extension,"addInputRules",context);if(isExtensionRulesEnabled(extension,editor.options.enableInputRules)&&addInputRules){inputRules.push(...addInputRules())}const addPasteRules=getExtensionField(extension,"addPasteRules",context);if(isExtensionRulesEnabled(extension,editor.options.enablePasteRules)&&addPasteRules){pasteRules.push(...addPasteRules())}const addProseMirrorPlugins=getExtensionField(extension,"addProseMirrorPlugins",context);if(addProseMirrorPlugins){const proseMirrorPlugins=addProseMirrorPlugins();plugins.push(...proseMirrorPlugins)}return plugins})).flat();return[inputRulesPlugin({editor:editor,rules:inputRules}),...pasteRulesPlugin({editor:editor,rules:pasteRules}),...allPlugins]}get attributes(){return getAttributesFromExtensions(this.extensions)}get nodeViews(){const{editor:editor}=this;const{nodeExtensions:nodeExtensions}=splitExtensions(this.extensions);return Object.fromEntries(nodeExtensions.filter((extension=>!!getExtensionField(extension,"addNodeView"))).map((extension=>{const extensionAttributes=this.attributes.filter((attribute=>attribute.type===extension.name));const context={name:extension.name,options:extension.options,storage:extension.storage,editor:editor,type:getNodeType(extension.name,this.schema)};const addNodeView=getExtensionField(extension,"addNodeView",context);if(!addNodeView){return[]}const nodeview=(node2,view,getPos,decorations,innerDecorations)=>{const HTMLAttributes=getRenderedAttributes(node2,extensionAttributes);return addNodeView()({node:node2,view:view,getPos:getPos,decorations:decorations,innerDecorations:innerDecorations,editor:editor,extension:extension,HTMLAttributes:HTMLAttributes})};return[extension.name,nodeview]})))}setupExtensions(){this.extensions.forEach((extension=>{var _a;this.editor.extensionStorage[extension.name]=extension.storage;const context={name:extension.name,options:extension.options,storage:extension.storage,editor:this.editor,type:getSchemaTypeByName(extension.name,this.schema)};if(extension.type==="mark"){const keepOnSplit=(_a=callOrReturn(getExtensionField(extension,"keepOnSplit",context)))!==null&&_a!==void 0?_a:true;if(keepOnSplit){this.splittableMarks.push(extension.name)}}const onBeforeCreate=getExtensionField(extension,"onBeforeCreate",context);const onCreate=getExtensionField(extension,"onCreate",context);const onUpdate=getExtensionField(extension,"onUpdate",context);const onSelectionUpdate=getExtensionField(extension,"onSelectionUpdate",context);const onTransaction=getExtensionField(extension,"onTransaction",context);const onFocus2=getExtensionField(extension,"onFocus",context);const onBlur=getExtensionField(extension,"onBlur",context);const onDestroy=getExtensionField(extension,"onDestroy",context);if(onBeforeCreate){this.editor.on("beforeCreate",onBeforeCreate)}if(onCreate){this.editor.on("create",onCreate)}if(onUpdate){this.editor.on("update",onUpdate)}if(onSelectionUpdate){this.editor.on("selectionUpdate",onSelectionUpdate)}if(onTransaction){this.editor.on("transaction",onTransaction)}if(onFocus2){this.editor.on("focus",onFocus2)}if(onBlur){this.editor.on("blur",onBlur)}if(onDestroy){this.editor.on("destroy",onDestroy)}}))}}class Extension{constructor(config={}){this.type="extension";this.name="extension";this.parent=null;this.child=null;this.config={name:this.name,defaultOptions:{}};this.config={...this.config,...config};this.name=this.config.name;if(config.defaultOptions&&Object.keys(config.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`)}this.options=this.config.defaultOptions;if(this.config.addOptions){this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))}this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(config={}){return new Extension(config)}configure(options2={}){const extension=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,options2)});extension.name=this.name;extension.parent=this.parent;return extension}extend(extendedConfig={}){const extension=new Extension({...this.config,...extendedConfig});extension.parent=this;this.child=extension;extension.name=extendedConfig.name?extendedConfig.name:extension.parent.name;if(extendedConfig.defaultOptions&&Object.keys(extendedConfig.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`)}extension.options=callOrReturn(getExtensionField(extension,"addOptions",{name:extension.name}));extension.storage=callOrReturn(getExtensionField(extension,"addStorage",{name:extension.name,options:extension.options}));return extension}}function getTextBetween(startNode,range,options2){const{from:from3,to:to}=range;const{blockSeparator:blockSeparator="\n\n",textSerializers:textSerializers={}}=options2||{};let text="";startNode.nodesBetween(from3,to,((node2,pos,parent,index2)=>{var _a;if(node2.isBlock&&pos>from3){text+=blockSeparator}const textSerializer=textSerializers===null||textSerializers===void 0?void 0:textSerializers[node2.type.name];if(textSerializer){if(parent){text+=textSerializer({node:node2,pos:pos,parent:parent,index:index2,range:range})}return false}if(node2.isText){text+=(_a=node2===null||node2===void 0?void 0:node2.text)===null||_a===void 0?void 0:_a.slice(Math.max(from3,pos)-pos,to-pos)}}));return text}function getTextSerializersFromSchema(schema){return Object.fromEntries(Object.entries(schema.nodes).filter((([,node2])=>node2.spec.toText)).map((([name,node2])=>[name,node2.spec.toText])))}const ClipboardTextSerializer=Extension.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:editor}=this;const{state:state,schema:schema}=editor;const{doc:doc2,selection:selection}=state;const{ranges:ranges}=selection;const from3=Math.min(...ranges.map((range2=>range2.$from.pos)));const to=Math.max(...ranges.map((range2=>range2.$to.pos)));const textSerializers=getTextSerializersFromSchema(schema);const range={from:from3,to:to};return getTextBetween(doc2,range,{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:textSerializers})}}})]}});const blur=()=>({editor:editor,view:view})=>{requestAnimationFrame((()=>{var _a;if(!editor.isDestroyed){view.dom.blur();(_a=window===null||window===void 0?void 0:window.getSelection())===null||_a===void 0?void 0:_a.removeAllRanges()}}));return true};const clearContent=(emitUpdate=false)=>({commands:commands2})=>commands2.setContent("",emitUpdate);const clearNodes=()=>({state:state,tr:tr2,dispatch:dispatch})=>{const{selection:selection}=tr2;const{ranges:ranges}=selection;if(!dispatch){return true}ranges.forEach((({$from:$from,$to:$to})=>{state.doc.nodesBetween($from.pos,$to.pos,((node2,pos)=>{if(node2.type.isText){return}const{doc:doc2,mapping:mapping}=tr2;const $mappedFrom=doc2.resolve(mapping.map(pos));const $mappedTo=doc2.resolve(mapping.map(pos+node2.nodeSize));const nodeRange=$mappedFrom.blockRange($mappedTo);if(!nodeRange){return}const targetLiftDepth=liftTarget(nodeRange);if(node2.type.isTextblock){const{defaultType:defaultType}=$mappedFrom.parent.contentMatchAt($mappedFrom.index());tr2.setNodeMarkup(nodeRange.start,defaultType)}if(targetLiftDepth||targetLiftDepth===0){tr2.lift(nodeRange,targetLiftDepth)}}))}));return true};const command=fn=>props=>fn(props);const createParagraphNear=()=>({state:state,dispatch:dispatch})=>createParagraphNear$1(state,dispatch);const cut=(originRange,targetPos)=>({editor:editor,tr:tr2})=>{const{state:state}=editor;const contentSlice=state.doc.slice(originRange.from,originRange.to);tr2.deleteRange(originRange.from,originRange.to);const newPos=tr2.mapping.map(targetPos);tr2.insert(newPos,contentSlice.content);tr2.setSelection(new TextSelection(tr2.doc.resolve(newPos-1)));return true};const deleteCurrentNode=()=>({tr:tr2,dispatch:dispatch})=>{const{selection:selection}=tr2;const currentNode=selection.$anchor.node();if(currentNode.content.size>0){return false}const $pos=tr2.selection.$anchor;for(let depth=$pos.depth;depth>0;depth-=1){const node2=$pos.node(depth);if(node2.type===currentNode.type){if(dispatch){const from3=$pos.before(depth);const to=$pos.after(depth);tr2.delete(from3,to).scrollIntoView()}return true}}return false};const deleteNode=typeOrName=>({tr:tr2,state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);const $pos=tr2.selection.$anchor;for(let depth=$pos.depth;depth>0;depth-=1){const node2=$pos.node(depth);if(node2.type===type){if(dispatch){const from3=$pos.before(depth);const to=$pos.after(depth);tr2.delete(from3,to).scrollIntoView()}return true}}return false};const deleteRange=range=>({tr:tr2,dispatch:dispatch})=>{const{from:from3,to:to}=range;if(dispatch){tr2.delete(from3,to)}return true};const deleteSelection=()=>({state:state,dispatch:dispatch})=>deleteSelection$1(state,dispatch);const enter=()=>({commands:commands2})=>commands2.keyboardShortcut("Enter");const exitCode=()=>({state:state,dispatch:dispatch})=>exitCode$1(state,dispatch);function objectIncludes(object1,object2,options2={strict:true}){const keys2=Object.keys(object2);if(!keys2.length){return true}return keys2.every((key=>{if(options2.strict){return object2[key]===object1[key]}if(isRegExp(object2[key])){return object2[key].test(object1[key])}return object2[key]===object1[key]}))}function findMarkInSet(marks,type,attributes={}){return marks.find((item=>item.type===type&&objectIncludes(Object.fromEntries(Object.keys(attributes).map((k=>[k,item.attrs[k]]))),attributes)))}function isMarkInSet(marks,type,attributes={}){return!!findMarkInSet(marks,type,attributes)}function getMarkRange($pos,type,attributes){var _a;if(!$pos||!type){return}let start=$pos.parent.childAfter($pos.parentOffset);if(!start.node||!start.node.marks.some((mark2=>mark2.type===type))){start=$pos.parent.childBefore($pos.parentOffset)}if(!start.node||!start.node.marks.some((mark2=>mark2.type===type))){return}attributes=attributes||((_a=start.node.marks[0])===null||_a===void 0?void 0:_a.attrs);const mark=findMarkInSet([...start.node.marks],type,attributes);if(!mark){return}let startIndex=start.index;let startPos=$pos.start()+start.offset;let endIndex=startIndex+1;let endPos=startPos+start.node.nodeSize;while(startIndex>0&&isMarkInSet([...$pos.parent.child(startIndex-1).marks],type,attributes)){startIndex-=1;startPos-=$pos.parent.child(startIndex).nodeSize}while(endIndex<$pos.parent.childCount&&isMarkInSet([...$pos.parent.child(endIndex).marks],type,attributes)){endPos+=$pos.parent.child(endIndex).nodeSize;endIndex+=1}return{from:startPos,to:endPos}}function getMarkType(nameOrType,schema){if(typeof nameOrType==="string"){if(!schema.marks[nameOrType]){throw Error(`There is no mark type named '${nameOrType}'. Maybe you forgot to add the extension?`)}return schema.marks[nameOrType]}return nameOrType}const extendMarkRange=(typeOrName,attributes={})=>({tr:tr2,state:state,dispatch:dispatch})=>{const type=getMarkType(typeOrName,state.schema);const{doc:doc2,selection:selection}=tr2;const{$from:$from,from:from3,to:to}=selection;if(dispatch){const range=getMarkRange($from,type,attributes);if(range&&range.from<=from3&&range.to>=to){const newSelection=TextSelection.create(doc2,range.from,range.to);tr2.setSelection(newSelection)}}return true};const first=commands2=>props=>{const items=typeof commands2==="function"?commands2(props):commands2;for(let i=0;i<items.length;i+=1){if(items[i](props)){return true}}return false};function isTextSelection(value){return value instanceof TextSelection}function minMax(value=0,min2=0,max2=0){return Math.min(Math.max(value,min2),max2)}function resolveFocusPosition(doc2,position2=null){if(!position2){return null}const selectionAtStart=Selection.atStart(doc2);const selectionAtEnd=Selection.atEnd(doc2);if(position2==="start"||position2===true){return selectionAtStart}if(position2==="end"){return selectionAtEnd}const minPos=selectionAtStart.from;const maxPos=selectionAtEnd.to;if(position2==="all"){return TextSelection.create(doc2,minMax(0,minPos,maxPos),minMax(doc2.content.size,minPos,maxPos))}return TextSelection.create(doc2,minMax(position2,minPos,maxPos),minMax(position2,minPos,maxPos))}function isAndroid(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function isiOS(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const focus=(position2=null,options2={})=>({editor:editor,view:view,tr:tr2,dispatch:dispatch})=>{options2={scrollIntoView:true,...options2};const delayedFocus=()=>{if(isiOS()||isAndroid()){view.dom.focus()}requestAnimationFrame((()=>{if(!editor.isDestroyed){view.focus();if(options2===null||options2===void 0?void 0:options2.scrollIntoView){editor.commands.scrollIntoView()}}}))};if(view.hasFocus()&&position2===null||position2===false){return true}if(dispatch&&position2===null&&!isTextSelection(editor.state.selection)){delayedFocus();return true}const selection=resolveFocusPosition(tr2.doc,position2)||editor.state.selection;const isSameSelection=editor.state.selection.eq(selection);if(dispatch){if(!isSameSelection){tr2.setSelection(selection)}if(isSameSelection&&tr2.storedMarks){tr2.setStoredMarks(tr2.storedMarks)}delayedFocus()}return true};const forEach=(items,fn)=>props=>items.every(((item,index2)=>fn(item,{...props,index:index2})));const insertContent=(value,options2)=>({tr:tr2,commands:commands2})=>commands2.insertContentAt({from:tr2.selection.from,to:tr2.selection.to},value,options2);const removeWhitespaces=node2=>{const children=node2.childNodes;for(let i=children.length-1;i>=0;i-=1){const child=children[i];if(child.nodeType===3&&child.nodeValue&&/^(\n\s\s|\n)$/.test(child.nodeValue)){node2.removeChild(child)}else if(child.nodeType===1){removeWhitespaces(child)}}return node2};function elementFromString(value){const wrappedValue=`<body>${value}</body>`;const html=(new window.DOMParser).parseFromString(wrappedValue,"text/html").body;return removeWhitespaces(html)}function createNodeFromContent(content,schema,options2){if(content instanceof Node$2||content instanceof Fragment){return content}options2={slice:true,parseOptions:{},...options2};const isJSONContent=typeof content==="object"&&content!==null;const isTextContent=typeof content==="string";if(isJSONContent){try{const isArrayContent=Array.isArray(content)&&content.length>0;if(isArrayContent){return Fragment.fromArray(content.map((item=>schema.nodeFromJSON(item))))}const node2=schema.nodeFromJSON(content);if(options2.errorOnInvalidContent){node2.check()}return node2}catch(error){if(options2.errorOnInvalidContent){throw new Error("[tiptap error]: Invalid JSON content",{cause:error})}console.warn("[tiptap warn]: Invalid content.","Passed value:",content,"Error:",error);return createNodeFromContent("",schema,options2)}}if(isTextContent){if(options2.errorOnInvalidContent){let hasInvalidContent=false;let invalidContent="";const contentCheckSchema=new Schema({topNode:schema.spec.topNode,marks:schema.spec.marks,nodes:schema.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>{hasInvalidContent=true;invalidContent=typeof e==="string"?e:e.outerHTML;return null}}]}})});if(options2.slice){DOMParser$1.fromSchema(contentCheckSchema).parseSlice(elementFromString(content),options2.parseOptions)}else{DOMParser$1.fromSchema(contentCheckSchema).parse(elementFromString(content),options2.parseOptions)}if(options2.errorOnInvalidContent&&hasInvalidContent){throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${invalidContent}`)})}}const parser=DOMParser$1.fromSchema(schema);if(options2.slice){return parser.parseSlice(elementFromString(content),options2.parseOptions).content}return parser.parse(elementFromString(content),options2.parseOptions)}return createNodeFromContent("",schema,options2)}function selectionToInsertionEnd(tr2,startLen,bias){const last=tr2.steps.length-1;if(last<startLen){return}const step=tr2.steps[last];if(!(step instanceof ReplaceStep||step instanceof ReplaceAroundStep)){return}const map2=tr2.mapping.maps[last];let end=0;map2.forEach(((_from,_to,_newFrom,newTo)=>{if(end===0){end=newTo}}));tr2.setSelection(Selection.near(tr2.doc.resolve(end),bias))}const isFragment=nodeOrFragment=>!("type"in nodeOrFragment);const insertContentAt=(position2,value,options2)=>({tr:tr2,dispatch:dispatch,editor:editor})=>{var _a;if(dispatch){options2={parseOptions:editor.options.parseOptions,updateSelection:true,applyInputRules:false,applyPasteRules:false,...options2};let content;try{content=createNodeFromContent(value,editor.schema,{parseOptions:{preserveWhitespace:"full",...options2.parseOptions},errorOnInvalidContent:(_a=options2.errorOnInvalidContent)!==null&&_a!==void 0?_a:editor.options.enableContentCheck})}catch(e){editor.emit("contentError",{editor:editor,error:e,disableCollaboration:()=>{if(editor.storage.collaboration){editor.storage.collaboration.isDisabled=true}}});return false}let{from:from3,to:to}=typeof position2==="number"?{from:position2,to:position2}:{from:position2.from,to:position2.to};let isOnlyTextContent=true;let isOnlyBlockContent=true;const nodes=isFragment(content)?content:[content];nodes.forEach((node2=>{node2.check();isOnlyTextContent=isOnlyTextContent?node2.isText&&node2.marks.length===0:false;isOnlyBlockContent=isOnlyBlockContent?node2.isBlock:false}));if(from3===to&&isOnlyBlockContent){const{parent:parent}=tr2.doc.resolve(from3);const isEmptyTextBlock=parent.isTextblock&&!parent.type.spec.code&&!parent.childCount;if(isEmptyTextBlock){from3-=1;to+=1}}let newContent;if(isOnlyTextContent){if(Array.isArray(value)){newContent=value.map((v=>v.text||"")).join("")}else if(value instanceof Fragment){let text="";value.forEach((node2=>{if(node2.text){text+=node2.text}}));newContent=text}else if(typeof value==="object"&&!!value&&!!value.text){newContent=value.text}else{newContent=value}tr2.insertText(newContent,from3,to)}else{newContent=content;tr2.replaceWith(from3,to,newContent)}if(options2.updateSelection){selectionToInsertionEnd(tr2,tr2.steps.length-1,-1)}if(options2.applyInputRules){tr2.setMeta("applyInputRules",{from:from3,text:newContent})}if(options2.applyPasteRules){tr2.setMeta("applyPasteRules",{from:from3,text:newContent})}}return true};const joinUp=()=>({state:state,dispatch:dispatch})=>joinUp$1(state,dispatch);const joinDown=()=>({state:state,dispatch:dispatch})=>joinDown$1(state,dispatch);const joinBackward=()=>({state:state,dispatch:dispatch})=>joinBackward$1(state,dispatch);const joinForward=()=>({state:state,dispatch:dispatch})=>joinForward$1(state,dispatch);const joinItemBackward=()=>({state:state,dispatch:dispatch,tr:tr2})=>{try{const point=joinPoint(state.doc,state.selection.$from.pos,-1);if(point===null||point===void 0){return false}tr2.join(point,2);if(dispatch){dispatch(tr2)}return true}catch{return false}};const joinItemForward=()=>({state:state,dispatch:dispatch,tr:tr2})=>{try{const point=joinPoint(state.doc,state.selection.$from.pos,1);if(point===null||point===void 0){return false}tr2.join(point,2);if(dispatch){dispatch(tr2)}return true}catch{return false}};const joinTextblockBackward=()=>({state:state,dispatch:dispatch})=>joinTextblockBackward$1(state,dispatch);const joinTextblockForward=()=>({state:state,dispatch:dispatch})=>joinTextblockForward$1(state,dispatch);function isMacOS(){return typeof navigator!=="undefined"?/Mac/.test(navigator.platform):false}function normalizeKeyName(name){const parts=name.split(/-(?!$)/);let result=parts[parts.length-1];if(result==="Space"){result=" "}let alt;let ctrl;let shift2;let meta;for(let i=0;i<parts.length-1;i+=1){const mod=parts[i];if(/^(cmd|meta|m)$/i.test(mod)){meta=true}else if(/^a(lt)?$/i.test(mod)){alt=true}else if(/^(c|ctrl|control)$/i.test(mod)){ctrl=true}else if(/^s(hift)?$/i.test(mod)){shift2=true}else if(/^mod$/i.test(mod)){if(isiOS()||isMacOS()){meta=true}else{ctrl=true}}else{throw new Error(`Unrecognized modifier name: ${mod}`)}}if(alt){result=`Alt-${result}`}if(ctrl){result=`Ctrl-${result}`}if(meta){result=`Meta-${result}`}if(shift2){result=`Shift-${result}`}return result}const keyboardShortcut=name=>({editor:editor,view:view,tr:tr2,dispatch:dispatch})=>{const keys2=normalizeKeyName(name).split(/-(?!$)/);const key=keys2.find((item=>!["Alt","Ctrl","Meta","Shift"].includes(item)));const event2=new KeyboardEvent("keydown",{key:key==="Space"?" ":key,altKey:keys2.includes("Alt"),ctrlKey:keys2.includes("Ctrl"),metaKey:keys2.includes("Meta"),shiftKey:keys2.includes("Shift"),bubbles:true,cancelable:true});const capturedTransaction=editor.captureTransaction((()=>{view.someProp("handleKeyDown",(f=>f(view,event2)))}));capturedTransaction===null||capturedTransaction===void 0?void 0:capturedTransaction.steps.forEach((step=>{const newStep=step.map(tr2.mapping);if(newStep&&dispatch){tr2.maybeStep(newStep)}}));return true};function isNodeActive(state,typeOrName,attributes={}){const{from:from3,to:to,empty:empty2}=state.selection;const type=typeOrName?getNodeType(typeOrName,state.schema):null;const nodeRanges=[];state.doc.nodesBetween(from3,to,((node2,pos)=>{if(node2.isText){return}const relativeFrom=Math.max(from3,pos);const relativeTo=Math.min(to,pos+node2.nodeSize);nodeRanges.push({node:node2,from:relativeFrom,to:relativeTo})}));const selectionRange=to-from3;const matchedNodeRanges=nodeRanges.filter((nodeRange=>{if(!type){return true}return type.name===nodeRange.node.type.name})).filter((nodeRange=>objectIncludes(nodeRange.node.attrs,attributes,{strict:false})));if(empty2){return!!matchedNodeRanges.length}const range=matchedNodeRanges.reduce(((sum,nodeRange)=>sum+nodeRange.to-nodeRange.from),0);return range>=selectionRange}const lift=(typeOrName,attributes={})=>({state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);const isActive2=isNodeActive(state,type,attributes);if(!isActive2){return false}return lift$1(state,dispatch)};const liftEmptyBlock=()=>({state:state,dispatch:dispatch})=>liftEmptyBlock$1(state,dispatch);const liftListItem=typeOrName=>({state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);return liftListItem$1(type)(state,dispatch)};const newlineInCode=()=>({state:state,dispatch:dispatch})=>newlineInCode$1(state,dispatch);function getSchemaTypeNameByName(name,schema){if(schema.nodes[name]){return"node"}if(schema.marks[name]){return"mark"}return null}function deleteProps(obj,propOrProps){const props=typeof propOrProps==="string"?[propOrProps]:propOrProps;return Object.keys(obj).reduce(((newObj,prop)=>{if(!props.includes(prop)){newObj[prop]=obj[prop]}return newObj}),{})}const resetAttributes=(typeOrName,attributes)=>({tr:tr2,state:state,dispatch:dispatch})=>{let nodeType=null;let markType=null;const schemaType=getSchemaTypeNameByName(typeof typeOrName==="string"?typeOrName:typeOrName.name,state.schema);if(!schemaType){return false}if(schemaType==="node"){nodeType=getNodeType(typeOrName,state.schema)}if(schemaType==="mark"){markType=getMarkType(typeOrName,state.schema)}if(dispatch){tr2.selection.ranges.forEach((range=>{state.doc.nodesBetween(range.$from.pos,range.$to.pos,((node2,pos)=>{if(nodeType&&nodeType===node2.type){tr2.setNodeMarkup(pos,void 0,deleteProps(node2.attrs,attributes))}if(markType&&node2.marks.length){node2.marks.forEach((mark=>{if(markType===mark.type){tr2.addMark(pos,pos+node2.nodeSize,markType.create(deleteProps(mark.attrs,attributes)))}}))}}))}))}return true};const scrollIntoView$1=()=>({tr:tr2,dispatch:dispatch})=>{if(dispatch){tr2.scrollIntoView()}return true};const selectAll=()=>({tr:tr2,dispatch:dispatch})=>{if(dispatch){const selection=new AllSelection(tr2.doc);tr2.setSelection(selection)}return true};const selectNodeBackward=()=>({state:state,dispatch:dispatch})=>selectNodeBackward$1(state,dispatch);const selectNodeForward=()=>({state:state,dispatch:dispatch})=>selectNodeForward$1(state,dispatch);const selectParentNode=()=>({state:state,dispatch:dispatch})=>selectParentNode$1(state,dispatch);const selectTextblockEnd=()=>({state:state,dispatch:dispatch})=>selectTextblockEnd$1(state,dispatch);const selectTextblockStart=()=>({state:state,dispatch:dispatch})=>selectTextblockStart$1(state,dispatch);function createDocument(content,schema,parseOptions={},options2={}){return createNodeFromContent(content,schema,{slice:false,parseOptions:parseOptions,errorOnInvalidContent:options2.errorOnInvalidContent})}const setContent=(content,emitUpdate=false,parseOptions={},options2={})=>({editor:editor,tr:tr2,dispatch:dispatch,commands:commands2})=>{var _a,_b;const{doc:doc2}=tr2;if(parseOptions.preserveWhitespace!=="full"){const document2=createDocument(content,editor.schema,parseOptions,{errorOnInvalidContent:(_a=options2.errorOnInvalidContent)!==null&&_a!==void 0?_a:editor.options.enableContentCheck});if(dispatch){tr2.replaceWith(0,doc2.content.size,document2).setMeta("preventUpdate",!emitUpdate)}return true}if(dispatch){tr2.setMeta("preventUpdate",!emitUpdate)}return commands2.insertContentAt({from:0,to:doc2.content.size},content,{parseOptions:parseOptions,errorOnInvalidContent:(_b=options2.errorOnInvalidContent)!==null&&_b!==void 0?_b:editor.options.enableContentCheck})};function getMarkAttributes(state,typeOrName){const type=getMarkType(typeOrName,state.schema);const{from:from3,to:to,empty:empty2}=state.selection;const marks=[];if(empty2){if(state.storedMarks){marks.push(...state.storedMarks)}marks.push(...state.selection.$head.marks())}else{state.doc.nodesBetween(from3,to,(node2=>{marks.push(...node2.marks)}))}const mark=marks.find((markItem=>markItem.type.name===type.name));if(!mark){return{}}return{...mark.attrs}}function combineTransactionSteps(oldDoc,transactions){const transform=new Transform(oldDoc);transactions.forEach((transaction=>{transaction.steps.forEach((step=>{transform.step(step)}))}));return transform}function defaultBlockAt(match2){for(let i=0;i<match2.edgeCount;i+=1){const{type:type}=match2.edge(i);if(type.isTextblock&&!type.hasRequiredAttrs()){return type}}return null}function findChildrenInRange(node2,range,predicate){const nodesWithPos=[];node2.nodesBetween(range.from,range.to,((child,pos)=>{if(predicate(child)){nodesWithPos.push({node:child,pos:pos})}}));return nodesWithPos}function findParentNodeClosestToPos($pos,predicate){for(let i=$pos.depth;i>0;i-=1){const node2=$pos.node(i);if(predicate(node2)){return{pos:i>0?$pos.before(i):0,start:$pos.start(i),depth:i,node:node2}}}}function findParentNode(predicate){return selection=>findParentNodeClosestToPos(selection.$from,predicate)}function getText(node2,options2){const range={from:0,to:node2.content.size};return getTextBetween(node2,range,options2)}function getNodeAttributes(state,typeOrName){const type=getNodeType(typeOrName,state.schema);const{from:from3,to:to}=state.selection;const nodes=[];state.doc.nodesBetween(from3,to,(node3=>{nodes.push(node3)}));const node2=nodes.reverse().find((nodeItem=>nodeItem.type.name===type.name));if(!node2){return{}}return{...node2.attrs}}function getAttributes(state,typeOrName){const schemaType=getSchemaTypeNameByName(typeof typeOrName==="string"?typeOrName:typeOrName.name,state.schema);if(schemaType==="node"){return getNodeAttributes(state,typeOrName)}if(schemaType==="mark"){return getMarkAttributes(state,typeOrName)}return{}}function removeDuplicates(array,by=JSON.stringify){const seen={};return array.filter((item=>{const key=by(item);return Object.prototype.hasOwnProperty.call(seen,key)?false:seen[key]=true}))}function simplifyChangedRanges(changes){const uniqueChanges=removeDuplicates(changes);return uniqueChanges.length===1?uniqueChanges:uniqueChanges.filter(((change,index2)=>{const rest=uniqueChanges.filter(((_,i)=>i!==index2));return!rest.some((otherChange=>change.oldRange.from>=otherChange.oldRange.from&&change.oldRange.to<=otherChange.oldRange.to&&change.newRange.from>=otherChange.newRange.from&&change.newRange.to<=otherChange.newRange.to))}))}function getChangedRanges(transform){const{mapping:mapping,steps:steps}=transform;const changes=[];mapping.maps.forEach(((stepMap,index2)=>{const ranges=[];if(!stepMap.ranges.length){const{from:from3,to:to}=steps[index2];if(from3===void 0||to===void 0){return}ranges.push({from:from3,to:to})}else{stepMap.forEach(((from3,to)=>{ranges.push({from:from3,to:to})}))}ranges.forEach((({from:from3,to:to})=>{const newStart=mapping.slice(index2).map(from3,-1);const newEnd=mapping.slice(index2).map(to);const oldStart=mapping.invert().map(newStart,-1);const oldEnd=mapping.invert().map(newEnd);changes.push({oldRange:{from:oldStart,to:oldEnd},newRange:{from:newStart,to:newEnd}})}))}));return simplifyChangedRanges(changes)}function getMarksBetween(from3,to,doc2){const marks=[];if(from3===to){doc2.resolve(from3).marks().forEach((mark=>{const $pos=doc2.resolve(from3);const range=getMarkRange($pos,mark.type);if(!range){return}marks.push({mark:mark,...range})}))}else{doc2.nodesBetween(from3,to,((node2,pos)=>{if(!node2||(node2===null||node2===void 0?void 0:node2.nodeSize)===void 0){return}marks.push(...node2.marks.map((mark=>({from:pos,to:pos+node2.nodeSize,mark:mark}))))}))}return marks}function getSplittedAttributes(extensionAttributes,typeName,attributes){return Object.fromEntries(Object.entries(attributes).filter((([name])=>{const extensionAttribute=extensionAttributes.find((item=>item.type===typeName&&item.name===name));if(!extensionAttribute){return false}return extensionAttribute.attribute.keepOnSplit})))}function isMarkActive(state,typeOrName,attributes={}){const{empty:empty2,ranges:ranges}=state.selection;const type=typeOrName?getMarkType(typeOrName,state.schema):null;if(empty2){return!!(state.storedMarks||state.selection.$from.marks()).filter((mark=>{if(!type){return true}return type.name===mark.type.name})).find((mark=>objectIncludes(mark.attrs,attributes,{strict:false})))}let selectionRange=0;const markRanges=[];ranges.forEach((({$from:$from,$to:$to})=>{const from3=$from.pos;const to=$to.pos;state.doc.nodesBetween(from3,to,((node2,pos)=>{if(!node2.isText&&!node2.marks.length){return}const relativeFrom=Math.max(from3,pos);const relativeTo=Math.min(to,pos+node2.nodeSize);const range2=relativeTo-relativeFrom;selectionRange+=range2;markRanges.push(...node2.marks.map((mark=>({mark:mark,from:relativeFrom,to:relativeTo}))))}))}));if(selectionRange===0){return false}const matchedRange=markRanges.filter((markRange=>{if(!type){return true}return type.name===markRange.mark.type.name})).filter((markRange=>objectIncludes(markRange.mark.attrs,attributes,{strict:false}))).reduce(((sum,markRange)=>sum+markRange.to-markRange.from),0);const excludedRange=markRanges.filter((markRange=>{if(!type){return true}return markRange.mark.type!==type&&markRange.mark.type.excludes(type)})).reduce(((sum,markRange)=>sum+markRange.to-markRange.from),0);const range=matchedRange>0?matchedRange+excludedRange:matchedRange;return range>=selectionRange}function isActive(state,name,attributes={}){if(!name){return isNodeActive(state,null,attributes)||isMarkActive(state,null,attributes)}const schemaType=getSchemaTypeNameByName(name,state.schema);if(schemaType==="node"){return isNodeActive(state,name,attributes)}if(schemaType==="mark"){return isMarkActive(state,name,attributes)}return false}function isList(name,extensions){const{nodeExtensions:nodeExtensions}=splitExtensions(extensions);const extension=nodeExtensions.find((item=>item.name===name));if(!extension){return false}const context={name:extension.name,options:extension.options,storage:extension.storage};const group=callOrReturn(getExtensionField(extension,"group",context));if(typeof group!=="string"){return false}return group.split(" ").includes("list")}function isNodeEmpty(node2,{checkChildren:checkChildren=true,ignoreWhitespace:ignoreWhitespace=false}={}){var _a;if(ignoreWhitespace){if(node2.type.name==="hardBreak"){return true}if(node2.isText){return/^\s*$/m.test((_a=node2.text)!==null&&_a!==void 0?_a:"")}}if(node2.isText){return!node2.text}if(node2.isAtom||node2.isLeaf){return false}if(node2.content.childCount===0){return true}if(checkChildren){let isContentEmpty=true;node2.content.forEach((childNode=>{if(isContentEmpty===false){return}if(!isNodeEmpty(childNode,{ignoreWhitespace:ignoreWhitespace,checkChildren:checkChildren})){isContentEmpty=false}}));return isContentEmpty}return false}function isNodeSelection(value){return value instanceof NodeSelection}function canSetMark(state,tr2,newMarkType){var _a;const{selection:selection}=tr2;let cursor2=null;if(isTextSelection(selection)){cursor2=selection.$cursor}if(cursor2){const currentMarks=(_a=state.storedMarks)!==null&&_a!==void 0?_a:cursor2.marks();return!!newMarkType.isInSet(currentMarks)||!currentMarks.some((mark=>mark.type.excludes(newMarkType)))}const{ranges:ranges}=selection;return ranges.some((({$from:$from,$to:$to})=>{let someNodeSupportsMark=$from.depth===0?state.doc.inlineContent&&state.doc.type.allowsMarkType(newMarkType):false;state.doc.nodesBetween($from.pos,$to.pos,((node2,_pos,parent)=>{if(someNodeSupportsMark){return false}if(node2.isInline){const parentAllowsMarkType=!parent||parent.type.allowsMarkType(newMarkType);const currentMarksAllowMarkType=!!newMarkType.isInSet(node2.marks)||!node2.marks.some((otherMark=>otherMark.type.excludes(newMarkType)));someNodeSupportsMark=parentAllowsMarkType&¤tMarksAllowMarkType}return!someNodeSupportsMark}));return someNodeSupportsMark}))}const setMark=(typeOrName,attributes={})=>({tr:tr2,state:state,dispatch:dispatch})=>{const{selection:selection}=tr2;const{empty:empty2,ranges:ranges}=selection;const type=getMarkType(typeOrName,state.schema);if(dispatch){if(empty2){const oldAttributes=getMarkAttributes(state,type);tr2.addStoredMark(type.create({...oldAttributes,...attributes}))}else{ranges.forEach((range=>{const from3=range.$from.pos;const to=range.$to.pos;state.doc.nodesBetween(from3,to,((node2,pos)=>{const trimmedFrom=Math.max(pos,from3);const trimmedTo=Math.min(pos+node2.nodeSize,to);const someHasMark=node2.marks.find((mark=>mark.type===type));if(someHasMark){node2.marks.forEach((mark=>{if(type===mark.type){tr2.addMark(trimmedFrom,trimmedTo,type.create({...mark.attrs,...attributes}))}}))}else{tr2.addMark(trimmedFrom,trimmedTo,type.create(attributes))}}))}))}}return canSetMark(state,tr2,type)};const setMeta=(key,value)=>({tr:tr2})=>{tr2.setMeta(key,value);return true};const setNode=(typeOrName,attributes={})=>({state:state,dispatch:dispatch,chain:chain})=>{const type=getNodeType(typeOrName,state.schema);let attributesToCopy;if(state.selection.$anchor.sameParent(state.selection.$head)){attributesToCopy=state.selection.$anchor.parent.attrs}if(!type.isTextblock){console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.');return false}return chain().command((({commands:commands2})=>{const canSetBlock=setBlockType(type,{...attributesToCopy,...attributes})(state);if(canSetBlock){return true}return commands2.clearNodes()})).command((({state:updatedState})=>setBlockType(type,{...attributesToCopy,...attributes})(updatedState,dispatch))).run()};const setNodeSelection=position2=>({tr:tr2,dispatch:dispatch})=>{if(dispatch){const{doc:doc2}=tr2;const from3=minMax(position2,0,doc2.content.size);const selection=NodeSelection.create(doc2,from3);tr2.setSelection(selection)}return true};const setTextSelection=position2=>({tr:tr2,dispatch:dispatch})=>{if(dispatch){const{doc:doc2}=tr2;const{from:from3,to:to}=typeof position2==="number"?{from:position2,to:position2}:position2;const minPos=TextSelection.atStart(doc2).from;const maxPos=TextSelection.atEnd(doc2).to;const resolvedFrom=minMax(from3,minPos,maxPos);const resolvedEnd=minMax(to,minPos,maxPos);const selection=TextSelection.create(doc2,resolvedFrom,resolvedEnd);tr2.setSelection(selection)}return true};const sinkListItem=typeOrName=>({state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);return sinkListItem$1(type)(state,dispatch)};function ensureMarks(state,splittableMarks){const marks=state.storedMarks||state.selection.$to.parentOffset&&state.selection.$from.marks();if(marks){const filteredMarks=marks.filter((mark=>splittableMarks===null||splittableMarks===void 0?void 0:splittableMarks.includes(mark.type.name)));state.tr.ensureMarks(filteredMarks)}}const splitBlock=({keepMarks:keepMarks=true}={})=>({tr:tr2,state:state,dispatch:dispatch,editor:editor})=>{const{selection:selection,doc:doc2}=tr2;const{$from:$from,$to:$to}=selection;const extensionAttributes=editor.extensionManager.attributes;const newAttributes=getSplittedAttributes(extensionAttributes,$from.node().type.name,$from.node().attrs);if(selection instanceof NodeSelection&&selection.node.isBlock){if(!$from.parentOffset||!canSplit(doc2,$from.pos)){return false}if(dispatch){if(keepMarks){ensureMarks(state,editor.extensionManager.splittableMarks)}tr2.split($from.pos).scrollIntoView()}return true}if(!$from.parent.isBlock){return false}const atEnd=$to.parentOffset===$to.parent.content.size;const deflt=$from.depth===0?void 0:defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));let types=atEnd&&deflt?[{type:deflt,attrs:newAttributes}]:void 0;let can=canSplit(tr2.doc,tr2.mapping.map($from.pos),1,types);if(!types&&!can&&canSplit(tr2.doc,tr2.mapping.map($from.pos),1,deflt?[{type:deflt}]:void 0)){can=true;types=deflt?[{type:deflt,attrs:newAttributes}]:void 0}if(dispatch){if(can){if(selection instanceof TextSelection){tr2.deleteSelection()}tr2.split(tr2.mapping.map($from.pos),1,types);if(deflt&&!atEnd&&!$from.parentOffset&&$from.parent.type!==deflt){const first2=tr2.mapping.map($from.before());const $first=tr2.doc.resolve(first2);if($from.node(-1).canReplaceWith($first.index(),$first.index()+1,deflt)){tr2.setNodeMarkup(tr2.mapping.map($from.before()),deflt)}}}if(keepMarks){ensureMarks(state,editor.extensionManager.splittableMarks)}tr2.scrollIntoView()}return can};const splitListItem=(typeOrName,overrideAttrs={})=>({tr:tr2,state:state,dispatch:dispatch,editor:editor})=>{var _a;const type=getNodeType(typeOrName,state.schema);const{$from:$from,$to:$to}=state.selection;const node2=state.selection.node;if(node2&&node2.isBlock||$from.depth<2||!$from.sameParent($to)){return false}const grandParent=$from.node(-1);if(grandParent.type!==type){return false}const extensionAttributes=editor.extensionManager.attributes;if($from.parent.content.size===0&&$from.node(-1).childCount===$from.indexAfter(-1)){if($from.depth===2||$from.node(-3).type!==type||$from.index(-2)!==$from.node(-2).childCount-1){return false}if(dispatch){let wrap2=Fragment.empty;const depthBefore=$from.index(-1)?1:$from.index(-2)?2:3;for(let d=$from.depth-depthBefore;d>=$from.depth-3;d-=1){wrap2=Fragment.from($from.node(d).copy(wrap2))}const depthAfter=$from.indexAfter(-1)<$from.node(-2).childCount?1:$from.indexAfter(-2)<$from.node(-3).childCount?2:3;const newNextTypeAttributes2={...getSplittedAttributes(extensionAttributes,$from.node().type.name,$from.node().attrs),...overrideAttrs};const nextType2=((_a=type.contentMatch.defaultType)===null||_a===void 0?void 0:_a.createAndFill(newNextTypeAttributes2))||void 0;wrap2=wrap2.append(Fragment.from(type.createAndFill(null,nextType2)||void 0));const start=$from.before($from.depth-(depthBefore-1));tr2.replace(start,$from.after(-depthAfter),new Slice(wrap2,4-depthBefore,0));let sel=-1;tr2.doc.nodesBetween(start,tr2.doc.content.size,((n,pos)=>{if(sel>-1){return false}if(n.isTextblock&&n.content.size===0){sel=pos+1}}));if(sel>-1){tr2.setSelection(TextSelection.near(tr2.doc.resolve(sel)))}tr2.scrollIntoView()}return true}const nextType=$to.pos===$from.end()?grandParent.contentMatchAt(0).defaultType:null;const newTypeAttributes={...getSplittedAttributes(extensionAttributes,grandParent.type.name,grandParent.attrs),...overrideAttrs};const newNextTypeAttributes={...getSplittedAttributes(extensionAttributes,$from.node().type.name,$from.node().attrs),...overrideAttrs};tr2.delete($from.pos,$to.pos);const types=nextType?[{type:type,attrs:newTypeAttributes},{type:nextType,attrs:newNextTypeAttributes}]:[{type:type,attrs:newTypeAttributes}];if(!canSplit(tr2.doc,$from.pos,2)){return false}if(dispatch){const{selection:selection,storedMarks:storedMarks}=state;const{splittableMarks:splittableMarks}=editor.extensionManager;const marks=storedMarks||selection.$to.parentOffset&&selection.$from.marks();tr2.split($from.pos,2,types).scrollIntoView();if(!marks||!dispatch){return true}const filteredMarks=marks.filter((mark=>splittableMarks.includes(mark.type.name)));tr2.ensureMarks(filteredMarks)}return true};const joinListBackwards=(tr2,listType)=>{const list=findParentNode((node2=>node2.type===listType))(tr2.selection);if(!list){return true}const before=tr2.doc.resolve(Math.max(0,list.pos-1)).before(list.depth);if(before===void 0){return true}const nodeBefore=tr2.doc.nodeAt(before);const canJoinBackwards=list.node.type===(nodeBefore===null||nodeBefore===void 0?void 0:nodeBefore.type)&&canJoin(tr2.doc,list.pos);if(!canJoinBackwards){return true}tr2.join(list.pos);return true};const joinListForwards=(tr2,listType)=>{const list=findParentNode((node2=>node2.type===listType))(tr2.selection);if(!list){return true}const after=tr2.doc.resolve(list.start).after(list.depth);if(after===void 0){return true}const nodeAfter=tr2.doc.nodeAt(after);const canJoinForwards=list.node.type===(nodeAfter===null||nodeAfter===void 0?void 0:nodeAfter.type)&&canJoin(tr2.doc,after);if(!canJoinForwards){return true}tr2.join(after);return true};const toggleList=(listTypeOrName,itemTypeOrName,keepMarks,attributes={})=>({editor:editor,tr:tr2,state:state,dispatch:dispatch,chain:chain,commands:commands2,can:can})=>{const{extensions:extensions,splittableMarks:splittableMarks}=editor.extensionManager;const listType=getNodeType(listTypeOrName,state.schema);const itemType=getNodeType(itemTypeOrName,state.schema);const{selection:selection,storedMarks:storedMarks}=state;const{$from:$from,$to:$to}=selection;const range=$from.blockRange($to);const marks=storedMarks||selection.$to.parentOffset&&selection.$from.marks();if(!range){return false}const parentList=findParentNode((node2=>isList(node2.type.name,extensions)))(selection);if(range.depth>=1&&parentList&&range.depth-parentList.depth<=1){if(parentList.node.type===listType){return commands2.liftListItem(itemType)}if(isList(parentList.node.type.name,extensions)&&listType.validContent(parentList.node.content)&&dispatch){return chain().command((()=>{tr2.setNodeMarkup(parentList.pos,listType);return true})).command((()=>joinListBackwards(tr2,listType))).command((()=>joinListForwards(tr2,listType))).run()}}if(!keepMarks||!marks||!dispatch){return chain().command((()=>{const canWrapInList=can().wrapInList(listType,attributes);if(canWrapInList){return true}return commands2.clearNodes()})).wrapInList(listType,attributes).command((()=>joinListBackwards(tr2,listType))).command((()=>joinListForwards(tr2,listType))).run()}return chain().command((()=>{const canWrapInList=can().wrapInList(listType,attributes);const filteredMarks=marks.filter((mark=>splittableMarks.includes(mark.type.name)));tr2.ensureMarks(filteredMarks);if(canWrapInList){return true}return commands2.clearNodes()})).wrapInList(listType,attributes).command((()=>joinListBackwards(tr2,listType))).command((()=>joinListForwards(tr2,listType))).run()};const toggleMark=(typeOrName,attributes={},options2={})=>({state:state,commands:commands2})=>{const{extendEmptyMarkRange:extendEmptyMarkRange=false}=options2;const type=getMarkType(typeOrName,state.schema);const isActive2=isMarkActive(state,type,attributes);if(isActive2){return commands2.unsetMark(type,{extendEmptyMarkRange:extendEmptyMarkRange})}return commands2.setMark(type,attributes)};const toggleNode=(typeOrName,toggleTypeOrName,attributes={})=>({state:state,commands:commands2})=>{const type=getNodeType(typeOrName,state.schema);const toggleType=getNodeType(toggleTypeOrName,state.schema);const isActive2=isNodeActive(state,type,attributes);let attributesToCopy;if(state.selection.$anchor.sameParent(state.selection.$head)){attributesToCopy=state.selection.$anchor.parent.attrs}if(isActive2){return commands2.setNode(toggleType,attributesToCopy)}return commands2.setNode(type,{...attributesToCopy,...attributes})};const toggleWrap=(typeOrName,attributes={})=>({state:state,commands:commands2})=>{const type=getNodeType(typeOrName,state.schema);const isActive2=isNodeActive(state,type,attributes);if(isActive2){return commands2.lift(type)}return commands2.wrapIn(type,attributes)};const undoInputRule=()=>({state:state,dispatch:dispatch})=>{const plugins=state.plugins;for(let i=0;i<plugins.length;i+=1){const plugin=plugins[i];let undoable;if(plugin.spec.isInputRules&&(undoable=plugin.getState(state))){if(dispatch){const tr2=state.tr;const toUndo=undoable.transform;for(let j=toUndo.steps.length-1;j>=0;j-=1){tr2.step(toUndo.steps[j].invert(toUndo.docs[j]))}if(undoable.text){const marks=tr2.doc.resolve(undoable.from).marks();tr2.replaceWith(undoable.from,undoable.to,state.schema.text(undoable.text,marks))}else{tr2.delete(undoable.from,undoable.to)}}return true}}return false};const unsetAllMarks=()=>({tr:tr2,dispatch:dispatch})=>{const{selection:selection}=tr2;const{empty:empty2,ranges:ranges}=selection;if(empty2){return true}if(dispatch){ranges.forEach((range=>{tr2.removeMark(range.$from.pos,range.$to.pos)}))}return true};const unsetMark=(typeOrName,options2={})=>({tr:tr2,state:state,dispatch:dispatch})=>{var _a;const{extendEmptyMarkRange:extendEmptyMarkRange=false}=options2;const{selection:selection}=tr2;const type=getMarkType(typeOrName,state.schema);const{$from:$from,empty:empty2,ranges:ranges}=selection;if(!dispatch){return true}if(empty2&&extendEmptyMarkRange){let{from:from3,to:to}=selection;const attrs=(_a=$from.marks().find((mark=>mark.type===type)))===null||_a===void 0?void 0:_a.attrs;const range=getMarkRange($from,type,attrs);if(range){from3=range.from;to=range.to}tr2.removeMark(from3,to,type)}else{ranges.forEach((range=>{tr2.removeMark(range.$from.pos,range.$to.pos,type)}))}tr2.removeStoredMark(type);return true};const updateAttributes=(typeOrName,attributes={})=>({tr:tr2,state:state,dispatch:dispatch})=>{let nodeType=null;let markType=null;const schemaType=getSchemaTypeNameByName(typeof typeOrName==="string"?typeOrName:typeOrName.name,state.schema);if(!schemaType){return false}if(schemaType==="node"){nodeType=getNodeType(typeOrName,state.schema)}if(schemaType==="mark"){markType=getMarkType(typeOrName,state.schema)}if(dispatch){tr2.selection.ranges.forEach((range=>{const from3=range.$from.pos;const to=range.$to.pos;let lastPos;let lastNode;let trimmedFrom;let trimmedTo;if(tr2.selection.empty){state.doc.nodesBetween(from3,to,((node2,pos)=>{if(nodeType&&nodeType===node2.type){trimmedFrom=Math.max(pos,from3);trimmedTo=Math.min(pos+node2.nodeSize,to);lastPos=pos;lastNode=node2}}))}else{state.doc.nodesBetween(from3,to,((node2,pos)=>{if(pos<from3&&nodeType&&nodeType===node2.type){trimmedFrom=Math.max(pos,from3);trimmedTo=Math.min(pos+node2.nodeSize,to);lastPos=pos;lastNode=node2}if(pos>=from3&&pos<=to){if(nodeType&&nodeType===node2.type){tr2.setNodeMarkup(pos,void 0,{...node2.attrs,...attributes})}if(markType&&node2.marks.length){node2.marks.forEach((mark=>{if(markType===mark.type){const trimmedFrom2=Math.max(pos,from3);const trimmedTo2=Math.min(pos+node2.nodeSize,to);tr2.addMark(trimmedFrom2,trimmedTo2,markType.create({...mark.attrs,...attributes}))}}))}}}))}if(lastNode){if(lastPos!==void 0){tr2.setNodeMarkup(lastPos,void 0,{...lastNode.attrs,...attributes})}if(markType&&lastNode.marks.length){lastNode.marks.forEach((mark=>{if(markType===mark.type){tr2.addMark(trimmedFrom,trimmedTo,markType.create({...mark.attrs,...attributes}))}}))}}}))}return true};const wrapIn=(typeOrName,attributes={})=>({state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);return wrapIn$1(type,attributes)(state,dispatch)};const wrapInList=(typeOrName,attributes={})=>({state:state,dispatch:dispatch})=>{const type=getNodeType(typeOrName,state.schema);return wrapInList$1(type,attributes)(state,dispatch)};var commands=Object.freeze({__proto__:null,blur:blur,clearContent:clearContent,clearNodes:clearNodes,command:command,createParagraphNear:createParagraphNear,cut:cut,deleteCurrentNode:deleteCurrentNode,deleteNode:deleteNode,deleteRange:deleteRange,deleteSelection:deleteSelection,enter:enter,exitCode:exitCode,extendMarkRange:extendMarkRange,first:first,focus:focus,forEach:forEach,insertContent:insertContent,insertContentAt:insertContentAt,joinBackward:joinBackward,joinDown:joinDown,joinForward:joinForward,joinItemBackward:joinItemBackward,joinItemForward:joinItemForward,joinTextblockBackward:joinTextblockBackward,joinTextblockForward:joinTextblockForward,joinUp:joinUp,keyboardShortcut:keyboardShortcut,lift:lift,liftEmptyBlock:liftEmptyBlock,liftListItem:liftListItem,newlineInCode:newlineInCode,resetAttributes:resetAttributes,scrollIntoView:scrollIntoView$1,selectAll:selectAll,selectNodeBackward:selectNodeBackward,selectNodeForward:selectNodeForward,selectParentNode:selectParentNode,selectTextblockEnd:selectTextblockEnd,selectTextblockStart:selectTextblockStart,setContent:setContent,setMark:setMark,setMeta:setMeta,setNode:setNode,setNodeSelection:setNodeSelection,setTextSelection:setTextSelection,sinkListItem:sinkListItem,splitBlock:splitBlock,splitListItem:splitListItem,toggleList:toggleList,toggleMark:toggleMark,toggleNode:toggleNode,toggleWrap:toggleWrap,undoInputRule:undoInputRule,unsetAllMarks:unsetAllMarks,unsetMark:unsetMark,updateAttributes:updateAttributes,wrapIn:wrapIn,wrapInList:wrapInList});const Commands=Extension.create({name:"commands",addCommands(){return{...commands}}});const Drop=Extension.create({name:"drop",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tiptapDrop"),props:{handleDrop:(_,e,slice3,moved)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:slice3,moved:moved})}}})]}});const Editable=Extension.create({name:"editable",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}});const focusEventsPluginKey=new PluginKey("focusEvents");const FocusEvents=Extension.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:editor}=this;return[new Plugin({key:focusEventsPluginKey,props:{handleDOMEvents:{focus:(view,event2)=>{editor.isFocused=true;const transaction=editor.state.tr.setMeta("focus",{event:event2}).setMeta("addToHistory",false);view.dispatch(transaction);return false},blur:(view,event2)=>{editor.isFocused=false;const transaction=editor.state.tr.setMeta("blur",{event:event2}).setMeta("addToHistory",false);view.dispatch(transaction);return false}}}})]}});const Keymap=Extension.create({name:"keymap",addKeyboardShortcuts(){const handleBackspace=()=>this.editor.commands.first((({commands:commands2})=>[()=>commands2.undoInputRule(),()=>commands2.command((({tr:tr2})=>{const{selection:selection,doc:doc2}=tr2;const{empty:empty2,$anchor:$anchor}=selection;const{pos:pos,parent:parent}=$anchor;const $parentPos=$anchor.parent.isTextblock&&pos>0?tr2.doc.resolve(pos-1):$anchor;const parentIsIsolating=$parentPos.parent.type.spec.isolating;const parentPos=$anchor.pos-$anchor.parentOffset;const isAtStart=parentIsIsolating&&$parentPos.parent.childCount===1?parentPos===$anchor.pos:Selection.atStart(doc2).from===pos;if(!empty2||!parent.type.isTextblock||parent.textContent.length||!isAtStart||isAtStart&&$anchor.parent.type.name==="paragraph"){return false}return commands2.clearNodes()})),()=>commands2.deleteSelection(),()=>commands2.joinBackward(),()=>commands2.selectNodeBackward()]));const handleDelete=()=>this.editor.commands.first((({commands:commands2})=>[()=>commands2.deleteSelection(),()=>commands2.deleteCurrentNode(),()=>commands2.joinForward(),()=>commands2.selectNodeForward()]));const handleEnter=()=>this.editor.commands.first((({commands:commands2})=>[()=>commands2.newlineInCode(),()=>commands2.createParagraphNear(),()=>commands2.liftEmptyBlock(),()=>commands2.splitBlock()]));const baseKeymap={Enter:handleEnter,"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:handleBackspace,"Mod-Backspace":handleBackspace,"Shift-Backspace":handleBackspace,Delete:handleDelete,"Mod-Delete":handleDelete,"Mod-a":()=>this.editor.commands.selectAll()};const pcKeymap={...baseKeymap};const macKeymap={...baseKeymap,"Ctrl-h":handleBackspace,"Alt-Backspace":handleBackspace,"Ctrl-d":handleDelete,"Ctrl-Alt-Backspace":handleDelete,"Alt-Delete":handleDelete,"Alt-d":handleDelete,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};if(isiOS()||isMacOS()){return macKeymap}return pcKeymap},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("clearDocument"),appendTransaction:(transactions,oldState,newState)=>{if(transactions.some((tr3=>tr3.getMeta("composition")))){return}const docChanges=transactions.some((transaction=>transaction.docChanged))&&!oldState.doc.eq(newState.doc);const ignoreTr=transactions.some((transaction=>transaction.getMeta("preventClearDocument")));if(!docChanges||ignoreTr){return}const{empty:empty2,from:from3,to:to}=oldState.selection;const allFrom=Selection.atStart(oldState.doc).from;const allEnd=Selection.atEnd(oldState.doc).to;const allWasSelected=from3===allFrom&&to===allEnd;if(empty2||!allWasSelected){return}const isEmpty2=isNodeEmpty(newState.doc);if(!isEmpty2){return}const tr2=newState.tr;const state=createChainableState({state:newState,transaction:tr2});const{commands:commands2}=new CommandManager({editor:this.editor,state:state});commands2.clearNodes();if(!tr2.steps.length){return}return tr2}})]}});const Paste=Extension.create({name:"paste",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tiptapPaste"),props:{handlePaste:(_view,e,slice3)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:slice3})}}})]}});const Tabindex=Extension.create({name:"tabindex",addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class NodePos{get name(){return this.node.type.name}constructor(pos,editor,isBlock=false,node2=null){this.currentNode=null;this.actualDepth=null;this.isBlock=isBlock;this.resolvedPos=pos;this.editor=editor;this.currentNode=node2}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var _a;return(_a=this.actualDepth)!==null&&_a!==void 0?_a:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(content){let from3=this.from;let to=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}from3=this.from+1;to=this.to-1}this.editor.commands.insertContentAt({from:from3,to:to},content)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){if(this.isBlock){return this.pos}return this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){if(this.isBlock){return this.pos+this.size}return this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0){return null}const parentPos=this.resolvedPos.start(this.resolvedPos.depth-1);const $pos=this.resolvedPos.doc.resolve(parentPos);return new NodePos($pos,this.editor)}get before(){let $pos=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));if($pos.depth!==this.depth){$pos=this.resolvedPos.doc.resolve(this.from-3)}return new NodePos($pos,this.editor)}get after(){let $pos=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));if($pos.depth!==this.depth){$pos=this.resolvedPos.doc.resolve(this.to+3)}return new NodePos($pos,this.editor)}get children(){const children=[];this.node.content.forEach(((node2,offset2)=>{const isBlock=node2.isBlock&&!node2.isTextblock;const isNonTextAtom=node2.isAtom&&!node2.isText;const targetPos=this.pos+offset2+(isNonTextAtom?0:1);const $pos=this.resolvedPos.doc.resolve(targetPos);if(!isBlock&&$pos.depth<=this.depth){return}const childNodePos=new NodePos($pos,this.editor,isBlock,isBlock?node2:null);if(isBlock){childNodePos.actualDepth=this.depth+1}children.push(new NodePos($pos,this.editor,isBlock,isBlock?node2:null))}));return children}get firstChild(){return this.children[0]||null}get lastChild(){const children=this.children;return children[children.length-1]||null}closest(selector,attributes={}){let node2=null;let currentNode=this.parent;while(currentNode&&!node2){if(currentNode.node.type.name===selector){if(Object.keys(attributes).length>0){const nodeAttributes=currentNode.node.attrs;const attrKeys=Object.keys(attributes);for(let index2=0;index2<attrKeys.length;index2+=1){const key=attrKeys[index2];if(nodeAttributes[key]!==attributes[key]){break}}}else{node2=currentNode}}currentNode=currentNode.parent}return node2}querySelector(selector,attributes={}){return this.querySelectorAll(selector,attributes,true)[0]||null}querySelectorAll(selector,attributes={},firstItemOnly=false){let nodes=[];if(!this.children||this.children.length===0){return nodes}const attrKeys=Object.keys(attributes);this.children.forEach((childPos=>{if(firstItemOnly&&nodes.length>0){return}if(childPos.node.type.name===selector){const doesAllAttributesMatch=attrKeys.every((key=>attributes[key]===childPos.node.attrs[key]));if(doesAllAttributesMatch){nodes.push(childPos)}}if(firstItemOnly&&nodes.length>0){return}nodes=nodes.concat(childPos.querySelectorAll(selector,attributes,firstItemOnly))}));return nodes}setAttribute(attributes){const{tr:tr2}=this.editor.state;tr2.setNodeMarkup(this.from,void 0,{...this.node.attrs,...attributes});this.editor.view.dispatch(tr2)}}const style=`.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 0 !important;\n  height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}`;function createStyleTag(style2,nonce,suffix){const tiptapStyleTag=document.querySelector(`style[data-tiptap-style${""}]`);if(tiptapStyleTag!==null){return tiptapStyleTag}const styleNode=document.createElement("style");if(nonce){styleNode.setAttribute("nonce",nonce)}styleNode.setAttribute(`data-tiptap-style${""}`,"");styleNode.innerHTML=style2;document.getElementsByTagName("head")[0].appendChild(styleNode);return styleNode}class Editor extends EventEmitter{constructor(options2={}){super();this.isFocused=false;this.isInitialized=false;this.extensionStorage={};this.options={element:document.createElement("div"),content:"",injectCSS:true,injectNonce:void 0,extensions:[],autofocus:false,editable:true,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:true,enablePasteRules:true,enableCoreExtensions:true,enableContentCheck:false,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:error})=>{throw error},onPaste:()=>null,onDrop:()=>null};this.isCapturingTransaction=false;this.capturedTransaction=null;this.setOptions(options2);this.createExtensionManager();this.createCommandManager();this.createSchema();this.on("beforeCreate",this.options.onBeforeCreate);this.emit("beforeCreate",{editor:this});this.on("contentError",this.options.onContentError);this.createView();this.injectCSS();this.on("create",this.options.onCreate);this.on("update",this.options.onUpdate);this.on("selectionUpdate",this.options.onSelectionUpdate);this.on("transaction",this.options.onTransaction);this.on("focus",this.options.onFocus);this.on("blur",this.options.onBlur);this.on("destroy",this.options.onDestroy);this.on("drop",(({event:event2,slice:slice3,moved:moved})=>this.options.onDrop(event2,slice3,moved)));this.on("paste",(({event:event2,slice:slice3})=>this.options.onPaste(event2,slice3)));window.setTimeout((()=>{if(this.isDestroyed){return}this.commands.focus(this.options.autofocus);this.emit("create",{editor:this});this.isInitialized=true}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){if(this.options.injectCSS&&document){this.css=createStyleTag(style,this.options.injectNonce)}}setOptions(options2={}){this.options={...this.options,...options2};if(!this.view||!this.state||this.isDestroyed){return}if(this.options.editorProps){this.view.setProps(this.options.editorProps)}this.view.updateState(this.state)}setEditable(editable,emitUpdate=true){this.setOptions({editable:editable});if(emitUpdate){this.emit("update",{editor:this,transaction:this.state.tr})}}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(plugin,handlePlugins){const plugins=isFunction(handlePlugins)?handlePlugins(plugin,[...this.state.plugins]):[...this.state.plugins,plugin];const state=this.state.reconfigure({plugins:plugins});this.view.updateState(state);return state}unregisterPlugin(nameOrPluginKeyToRemove){if(this.isDestroyed){return void 0}const prevPlugins=this.state.plugins;let plugins=prevPlugins;[].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey=>{const name=typeof nameOrPluginKey==="string"?`${nameOrPluginKey}$`:nameOrPluginKey.key;plugins=prevPlugins.filter((plugin=>!plugin.key.startsWith(name)))}));if(prevPlugins.length===plugins.length){return void 0}const state=this.state.reconfigure({plugins:plugins});this.view.updateState(state);return state}createExtensionManager(){var _a,_b;const coreExtensions=this.options.enableCoreExtensions?[Editable,ClipboardTextSerializer.configure({blockSeparator:(_b=(_a=this.options.coreExtensionOptions)===null||_a===void 0?void 0:_a.clipboardTextSerializer)===null||_b===void 0?void 0:_b.blockSeparator}),Commands,FocusEvents,Keymap,Tabindex,Drop,Paste].filter((ext=>{if(typeof this.options.enableCoreExtensions==="object"){return this.options.enableCoreExtensions[ext.name]!==false}return true})):[];const allExtensions=[...coreExtensions,...this.options.extensions].filter((extension=>["extension","node","mark"].includes(extension===null||extension===void 0?void 0:extension.type)));this.extensionManager=new ExtensionManager(allExtensions,this)}createCommandManager(){this.commandManager=new CommandManager({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var _a;let doc2;try{doc2=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message)){throw e}this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{if(this.storage.collaboration){this.storage.collaboration.isDisabled=true}this.options.extensions=this.options.extensions.filter((extension=>extension.name!=="collaboration"));this.createExtensionManager()}});doc2=createDocument(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:false})}const selection=resolveFocusPosition(doc2,this.options.autofocus);this.view=new EditorView(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(_a=this.options.editorProps)===null||_a===void 0?void 0:_a.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:EditorState.create({doc:doc2,selection:selection||void 0})});const newState=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(newState);this.createNodeViews();this.prependClass();const dom=this.view.dom;dom.editor=this}createNodeViews(){if(this.view.isDestroyed){return}this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(fn){this.isCapturingTransaction=true;fn();this.isCapturingTransaction=false;const tr2=this.capturedTransaction;this.capturedTransaction=null;return tr2}dispatchTransaction(transaction){if(this.view.isDestroyed){return}if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=transaction;return}transaction.steps.forEach((step=>{var _a;return(_a=this.capturedTransaction)===null||_a===void 0?void 0:_a.step(step)}));return}const state=this.state.apply(transaction);const selectionHasChanged=!this.state.selection.eq(state.selection);this.emit("beforeTransaction",{editor:this,transaction:transaction,nextState:state});this.view.updateState(state);this.emit("transaction",{editor:this,transaction:transaction});if(selectionHasChanged){this.emit("selectionUpdate",{editor:this,transaction:transaction})}const focus2=transaction.getMeta("focus");const blur2=transaction.getMeta("blur");if(focus2){this.emit("focus",{editor:this,event:focus2.event,transaction:transaction})}if(blur2){this.emit("blur",{editor:this,event:blur2.event,transaction:transaction})}if(!transaction.docChanged||transaction.getMeta("preventUpdate")){return}this.emit("update",{editor:this,transaction:transaction})}getAttributes(nameOrType){return getAttributes(this.state,nameOrType)}isActive(nameOrAttributes,attributesOrUndefined){const name=typeof nameOrAttributes==="string"?nameOrAttributes:null;const attributes=typeof nameOrAttributes==="string"?attributesOrUndefined:nameOrAttributes;return isActive(this.state,name,attributes)}getJSON(){return this.state.doc.toJSON()}getHTML(){return getHTMLFromFragment(this.state.doc.content,this.schema)}getText(options2){const{blockSeparator:blockSeparator="\n\n",textSerializers:textSerializers={}}=options2||{};return getText(this.state.doc,{blockSeparator:blockSeparator,textSerializers:{...getTextSerializersFromSchema(this.schema),...textSerializers}})}get isEmpty(){return isNodeEmpty(this.state.doc)}getCharacterCount(){console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.');return this.state.doc.content.size-2}destroy(){this.emit("destroy");if(this.view){const dom=this.view.dom;if(dom&&dom.editor){delete dom.editor}this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var _a;return!((_a=this.view)===null||_a===void 0?void 0:_a.docView)}$node(selector,attributes){var _a;return((_a=this.$doc)===null||_a===void 0?void 0:_a.querySelector(selector,attributes))||null}$nodes(selector,attributes){var _a;return((_a=this.$doc)===null||_a===void 0?void 0:_a.querySelectorAll(selector,attributes))||null}$pos(pos){const $pos=this.state.doc.resolve(pos);return new NodePos($pos,this)}get $doc(){return this.$pos(0)}}function markInputRule(config){return new InputRule({find:config.find,handler:({state:state,range:range,match:match2})=>{const attributes=callOrReturn(config.getAttributes,void 0,match2);if(attributes===false||attributes===null){return null}const{tr:tr2}=state;const captureGroup=match2[match2.length-1];const fullMatch=match2[0];if(captureGroup){const startSpaces=fullMatch.search(/\S/);const textStart=range.from+fullMatch.indexOf(captureGroup);const textEnd=textStart+captureGroup.length;const excludedMarks=getMarksBetween(range.from,range.to,state.doc).filter((item=>{const excluded=item.mark.type.excluded;return excluded.find((type=>type===config.type&&type!==item.mark.type))})).filter((item=>item.to>textStart));if(excludedMarks.length){return null}if(textEnd<range.to){tr2.delete(textEnd,range.to)}if(textStart>range.from){tr2.delete(range.from+startSpaces,textStart)}const markEnd=range.from+startSpaces+captureGroup.length;tr2.addMark(range.from+startSpaces,markEnd,config.type.create(attributes||{}));tr2.removeStoredMark(config.type)}}})}function nodeInputRule(config){return new InputRule({find:config.find,handler:({state:state,range:range,match:match2})=>{const attributes=callOrReturn(config.getAttributes,void 0,match2)||{};const{tr:tr2}=state;const start=range.from;let end=range.to;const newNode=config.type.create(attributes);if(match2[1]){const offset2=match2[0].lastIndexOf(match2[1]);let matchStart=start+offset2;if(matchStart>end){matchStart=end}else{end=matchStart+match2[1].length}const lastChar=match2[0][match2[0].length-1];tr2.insertText(lastChar,start+match2[0].length-1);tr2.replaceWith(matchStart,end,newNode)}else if(match2[0]){const insertionStart=config.type.isInline?start:start-1;tr2.insert(insertionStart,config.type.create(attributes)).delete(tr2.mapping.map(start),tr2.mapping.map(end))}tr2.scrollIntoView()}})}function textblockTypeInputRule(config){return new InputRule({find:config.find,handler:({state:state,range:range,match:match2})=>{const $start=state.doc.resolve(range.from);const attributes=callOrReturn(config.getAttributes,void 0,match2)||{};if(!$start.node(-1).canReplaceWith($start.index(-1),$start.indexAfter(-1),config.type)){return null}state.tr.delete(range.from,range.to).setBlockType(range.from,range.from,config.type,attributes)}})}function wrappingInputRule(config){return new InputRule({find:config.find,handler:({state:state,range:range,match:match2,chain:chain})=>{const attributes=callOrReturn(config.getAttributes,void 0,match2)||{};const tr2=state.tr.delete(range.from,range.to);const $start=tr2.doc.resolve(range.from);const blockRange=$start.blockRange();const wrapping=blockRange&&findWrapping(blockRange,config.type,attributes);if(!wrapping){return null}tr2.wrap(blockRange,wrapping);if(config.keepMarks&&config.editor){const{selection:selection,storedMarks:storedMarks}=state;const{splittableMarks:splittableMarks}=config.editor.extensionManager;const marks=storedMarks||selection.$to.parentOffset&&selection.$from.marks();if(marks){const filteredMarks=marks.filter((mark=>splittableMarks.includes(mark.type.name)));tr2.ensureMarks(filteredMarks)}}if(config.keepAttributes){const nodeType=config.type.name==="bulletList"||config.type.name==="orderedList"?"listItem":"taskList";chain().updateAttributes(nodeType,attributes).run()}const before=tr2.doc.resolve(range.from-1).nodeBefore;if(before&&before.type===config.type&&canJoin(tr2.doc,range.from-1)&&(!config.joinPredicate||config.joinPredicate(match2,before))){tr2.join(range.from-1)}}})}let Node$1=class Node3{constructor(config={}){this.type="node";this.name="node";this.parent=null;this.child=null;this.config={name:this.name,defaultOptions:{}};this.config={...this.config,...config};this.name=this.config.name;if(config.defaultOptions&&Object.keys(config.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`)}this.options=this.config.defaultOptions;if(this.config.addOptions){this.options=callOrReturn(getExtensionField(this,"addOptions",{name:this.name}))}this.storage=callOrReturn(getExtensionField(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(config={}){return new Node3(config)}configure(options2={}){const extension=this.extend({...this.config,addOptions:()=>mergeDeep(this.options,options2)});extension.name=this.name;extension.parent=this.parent;return extension}extend(extendedConfig={}){const extension=new Node3(extendedConfig);extension.parent=this;this.child=extension;extension.name=extendedConfig.name?extendedConfig.name:extension.parent.name;if(extendedConfig.defaultOptions&&Object.keys(extendedConfig.defaultOptions).length>0){console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`)}extension.options=callOrReturn(getExtensionField(extension,"addOptions",{name:extension.name}));extension.storage=callOrReturn(getExtensionField(extension,"addStorage",{name:extension.name,options:extension.options}));return extension}};function markPasteRule(config){return new PasteRule({find:config.find,handler:({state:state,range:range,match:match2,pasteEvent:pasteEvent})=>{const attributes=callOrReturn(config.getAttributes,void 0,match2,pasteEvent);if(attributes===false||attributes===null){return null}const{tr:tr2}=state;const captureGroup=match2[match2.length-1];const fullMatch=match2[0];let markEnd=range.to;if(captureGroup){const startSpaces=fullMatch.search(/\S/);const textStart=range.from+fullMatch.indexOf(captureGroup);const textEnd=textStart+captureGroup.length;const excludedMarks=getMarksBetween(range.from,range.to,state.doc).filter((item=>{const excluded=item.mark.type.excluded;return excluded.find((type=>type===config.type&&type!==item.mark.type))})).filter((item=>item.to>textStart));if(excludedMarks.length){return null}if(textEnd<range.to){tr2.delete(textEnd,range.to)}if(textStart>range.from){tr2.delete(range.from+startSpaces,textStart)}markEnd=range.from+startSpaces+captureGroup.length;tr2.addMark(range.from+startSpaces,markEnd,config.type.create(attributes||{}));tr2.removeStoredMark(config.type)}}})}function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}var shim={exports:{}};var useSyncExternalStoreShim_production_min={};
         | 
| 7 | 
            +
            /**
         | 
| 8 | 
            +
             * @license React
         | 
| 9 | 
            +
             * use-sync-external-store-shim.production.min.js
         | 
| 10 | 
            +
             *
         | 
| 11 | 
            +
             * Copyright (c) Facebook, Inc. and its affiliates.
         | 
| 12 | 
            +
             *
         | 
| 13 | 
            +
             * This source code is licensed under the MIT license found in the
         | 
| 14 | 
            +
             * LICENSE file in the root directory of this source tree.
         | 
| 15 | 
            +
             */var hasRequiredUseSyncExternalStoreShim_production_min;function requireUseSyncExternalStoreShim_production_min(){if(hasRequiredUseSyncExternalStoreShim_production_min)return useSyncExternalStoreShim_production_min;hasRequiredUseSyncExternalStoreShim_production_min=1;var e=React__default;function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n((function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})}),[a,d,b]);m((function(){r(c)&&g({inst:c});return a((function(){r(c)&&g({inst:c})}))}),[a]);p(d);return d}function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return true}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;useSyncExternalStoreShim_production_min.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;return useSyncExternalStoreShim_production_min}{shim.exports=requireUseSyncExternalStoreShim_production_min()}var shimExports=shim.exports;const mergeRefs=(...refs)=>node2=>{refs.forEach((ref=>{if(typeof ref==="function"){ref(node2)}else if(ref){ref.current=node2}}))};const Portals=({contentComponent:contentComponent})=>{const renderers=shimExports.useSyncExternalStore(contentComponent.subscribe,contentComponent.getSnapshot,contentComponent.getServerSnapshot);return React__default.createElement(React__default.Fragment,null,Object.values(renderers))};function getInstance(){const subscribers=new Set;let renderers={};return{subscribe(callback){subscribers.add(callback);return()=>{subscribers.delete(callback)}},getSnapshot(){return renderers},getServerSnapshot(){return renderers},setRenderer(id,renderer){renderers={...renderers,[id]:ReactDOM__default.createPortal(renderer.reactElement,renderer.element,id)};subscribers.forEach((subscriber=>subscriber()))},removeRenderer(id){const nextRenderers={...renderers};delete nextRenderers[id];renderers=nextRenderers;subscribers.forEach((subscriber=>subscriber()))}}}class PureEditorContent extends React__default.Component{constructor(props){var _a;super(props);this.editorContentRef=React__default.createRef();this.initialized=false;this.state={hasContentComponentInitialized:Boolean((_a=props.editor)===null||_a===void 0?void 0:_a.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const editor=this.props.editor;if(editor&&!editor.isDestroyed&&editor.options.element){if(editor.contentComponent){return}const element=this.editorContentRef.current;element.append(...editor.options.element.childNodes);editor.setOptions({element:element});editor.contentComponent=getInstance();if(!this.state.hasContentComponentInitialized){this.unsubscribeToContentComponent=editor.contentComponent.subscribe((()=>{this.setState((prevState=>{if(!prevState.hasContentComponentInitialized){return{hasContentComponentInitialized:true}}return prevState}));if(this.unsubscribeToContentComponent){this.unsubscribeToContentComponent()}}))}editor.createNodeViews();this.initialized=true}}componentWillUnmount(){const editor=this.props.editor;if(!editor){return}this.initialized=false;if(!editor.isDestroyed){editor.view.setProps({nodeViews:{}})}if(this.unsubscribeToContentComponent){this.unsubscribeToContentComponent()}editor.contentComponent=null;if(!editor.options.element.firstChild){return}const newElement=document.createElement("div");newElement.append(...editor.options.element.childNodes);editor.setOptions({element:newElement})}render(){const{editor:editor,innerRef:innerRef,...rest}=this.props;return React__default.createElement(React__default.Fragment,null,React__default.createElement("div",{ref:mergeRefs(innerRef,this.editorContentRef),...rest}),(editor===null||editor===void 0?void 0:editor.contentComponent)&&React__default.createElement(Portals,{contentComponent:editor.contentComponent}))}}const EditorContentWithKey=forwardRef(((props,ref)=>{const key=React__default.useMemo((()=>Math.floor(Math.random()*4294967295).toString()),[props.editor]);return React__default.createElement(PureEditorContent,{key:key,innerRef:ref,...props})}));const EditorContent=React__default.memo(EditorContentWithKey);var react=function equal(a,b){if(a===b)return true;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return false;var length2,i,keys2;if(Array.isArray(a)){length2=a.length;if(length2!=b.length)return false;for(i=length2;i--!==0;)if(!equal(a[i],b[i]))return false;return true}if(a instanceof Map&&b instanceof Map){if(a.size!==b.size)return false;for(i of a.entries())if(!b.has(i[0]))return false;for(i of a.entries())if(!equal(i[1],b.get(i[0])))return false;return true}if(a instanceof Set&&b instanceof Set){if(a.size!==b.size)return false;for(i of a.entries())if(!b.has(i[0]))return false;return true}if(ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){length2=a.length;if(length2!=b.length)return false;for(i=length2;i--!==0;)if(a[i]!==b[i])return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys2=Object.keys(a);length2=keys2.length;if(length2!==Object.keys(b).length)return false;for(i=length2;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys2[i]))return false;for(i=length2;i--!==0;){var key=keys2[i];if(key==="_owner"&&a.$$typeof){continue}if(!equal(a[key],b[key]))return false}return true}return a!==a&&b!==b};var deepEqual=getDefaultExportFromCjs(react);var withSelector={exports:{}};var withSelector_production_min={};
         | 
| 16 | 
            +
            /**
         | 
| 17 | 
            +
             * @license React
         | 
| 18 | 
            +
             * use-sync-external-store-shim/with-selector.production.min.js
         | 
| 19 | 
            +
             *
         | 
| 20 | 
            +
             * Copyright (c) Facebook, Inc. and its affiliates.
         | 
| 21 | 
            +
             *
         | 
| 22 | 
            +
             * This source code is licensed under the MIT license found in the
         | 
| 23 | 
            +
             * LICENSE file in the root directory of this source tree.
         | 
| 24 | 
            +
             */var hasRequiredWithSelector_production_min;function requireWithSelector_production_min(){if(hasRequiredWithSelector_production_min)return withSelector_production_min;hasRequiredWithSelector_production_min=1;var h=React__default,n=shimExports;function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w2=h.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:false,value:null};c.current=f}else f=c.current;c=v((function(){function a2(a3){if(!c2){c2=true;d2=a3;a3=l(a3);if(void 0!==g&&f.hasValue){var b2=f.value;if(g(b2,a3))return k=b2}return k=a3}b2=k;if(q(d2,a3))return b2;var e2=l(a3);if(void 0!==g&&g(b2,e2))return b2;d2=a3;return k=e2}var c2=false,d2,k,m=void 0===e?null:e;return[function(){return a2(b())},null===m?void 0:function(){return a2(m())}]}),[b,e,l,g]);var d=r(a,c[0],c[1]);u((function(){f.hasValue=true;f.value=d}),[d]);w2(d);return d};return withSelector_production_min}{withSelector.exports=requireWithSelector_production_min()}var withSelectorExports=withSelector.exports;const useIsomorphicLayoutEffect=typeof window!=="undefined"?useLayoutEffect:useEffect;class EditorStateManager{constructor(initialEditor){this.transactionNumber=0;this.lastTransactionNumber=0;this.subscribers=new Set;this.editor=initialEditor;this.lastSnapshot={editor:initialEditor,transactionNumber:0};this.getSnapshot=this.getSnapshot.bind(this);this.getServerSnapshot=this.getServerSnapshot.bind(this);this.watch=this.watch.bind(this);this.subscribe=this.subscribe.bind(this)}getSnapshot(){if(this.transactionNumber===this.lastTransactionNumber){return this.lastSnapshot}this.lastTransactionNumber=this.transactionNumber;this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber};return this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(callback){this.subscribers.add(callback);return()=>{this.subscribers.delete(callback)}}watch(nextEditor){this.editor=nextEditor;if(this.editor){const fn=()=>{this.transactionNumber+=1;this.subscribers.forEach((callback=>callback()))};const currentEditor=this.editor;currentEditor.on("transaction",fn);return()=>{currentEditor.off("transaction",fn)}}return void 0}}function useEditorState(options2){var _a;const[editorStateManager]=useState((()=>new EditorStateManager(options2.editor)));const selectedState=withSelectorExports.useSyncExternalStoreWithSelector(editorStateManager.subscribe,editorStateManager.getSnapshot,editorStateManager.getServerSnapshot,options2.selector,(_a=options2.equalityFn)!==null&&_a!==void 0?_a:deepEqual);useIsomorphicLayoutEffect((()=>editorStateManager.watch(options2.editor)),[options2.editor,editorStateManager]);useDebugValue(selectedState);return selectedState}const isDev=false;const isSSR=typeof window==="undefined";const isNext=isSSR||Boolean(typeof window!=="undefined"&&window.next);class EditorInstanceManager{constructor(options2){this.editor=null;this.subscriptions=new Set;this.isComponentMounted=false;this.previousDeps=null;this.instanceId="";this.options=options2;this.subscriptions=new Set;this.setEditor(this.getInitialEditor());this.scheduleDestroy();this.getEditor=this.getEditor.bind(this);this.getServerSnapshot=this.getServerSnapshot.bind(this);this.subscribe=this.subscribe.bind(this);this.refreshEditorInstance=this.refreshEditorInstance.bind(this);this.scheduleDestroy=this.scheduleDestroy.bind(this);this.onRender=this.onRender.bind(this);this.createEditor=this.createEditor.bind(this)}setEditor(editor){this.editor=editor;this.instanceId=Math.random().toString(36).slice(2,9);this.subscriptions.forEach((cb=>cb()))}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(isSSR||isNext){return null}return this.createEditor()}if(this.options.current.immediatelyRender&&isSSR&&isDev);if(this.options.current.immediatelyRender){return this.createEditor()}return null}createEditor(){const optionsToApply={...this.options.current,onBeforeCreate:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onBeforeCreate)===null||_b===void 0?void 0:_b.call(_a,...args)},onBlur:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onBlur)===null||_b===void 0?void 0:_b.call(_a,...args)},onCreate:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onCreate)===null||_b===void 0?void 0:_b.call(_a,...args)},onDestroy:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onDestroy)===null||_b===void 0?void 0:_b.call(_a,...args)},onFocus:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onFocus)===null||_b===void 0?void 0:_b.call(_a,...args)},onSelectionUpdate:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onSelectionUpdate)===null||_b===void 0?void 0:_b.call(_a,...args)},onTransaction:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onTransaction)===null||_b===void 0?void 0:_b.call(_a,...args)},onUpdate:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onUpdate)===null||_b===void 0?void 0:_b.call(_a,...args)},onContentError:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onContentError)===null||_b===void 0?void 0:_b.call(_a,...args)},onDrop:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onDrop)===null||_b===void 0?void 0:_b.call(_a,...args)},onPaste:(...args)=>{var _a,_b;return(_b=(_a=this.options.current).onPaste)===null||_b===void 0?void 0:_b.call(_a,...args)}};const editor=new Editor(optionsToApply);return editor}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(onStoreChange){this.subscriptions.add(onStoreChange);return()=>{this.subscriptions.delete(onStoreChange)}}static compareOptions(a,b){return Object.keys(a).every((key=>{if(["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(key)){return true}if(key==="extensions"&&a.extensions&&b.extensions){if(a.extensions.length!==b.extensions.length){return false}return a.extensions.every(((extension,index2)=>{var _a;if(extension!==((_a=b.extensions)===null||_a===void 0?void 0:_a[index2])){return false}return true}))}if(a[key]!==b[key]){return false}return true}))}onRender(deps){return()=>{this.isComponentMounted=true;clearTimeout(this.scheduledDestructionTimeout);if(this.editor&&!this.editor.isDestroyed&&deps.length===0){if(!EditorInstanceManager.compareOptions(this.options.current,this.editor.options)){this.editor.setOptions({...this.options.current,editable:this.editor.isEditable})}}else{this.refreshEditorInstance(deps)}return()=>{this.isComponentMounted=false;this.scheduleDestroy()}}}refreshEditorInstance(deps){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=deps;return}const depsAreEqual=this.previousDeps.length===deps.length&&this.previousDeps.every(((dep,index2)=>dep===deps[index2]));if(depsAreEqual){return}}if(this.editor&&!this.editor.isDestroyed){this.editor.destroy()}this.setEditor(this.createEditor());this.previousDeps=deps}scheduleDestroy(){const currentInstanceId=this.instanceId;const currentEditor=this.editor;this.scheduledDestructionTimeout=setTimeout((()=>{if(this.isComponentMounted&&this.instanceId===currentInstanceId){if(currentEditor){currentEditor.setOptions(this.options.current)}return}if(currentEditor&&!currentEditor.isDestroyed){currentEditor.destroy();if(this.instanceId===currentInstanceId){this.setEditor(null)}}}),1)}}function useEditor(options2={},deps=[]){const mostRecentOptions=useRef(options2);mostRecentOptions.current=options2;const[instanceManager]=useState((()=>new EditorInstanceManager(mostRecentOptions)));const editor=shimExports.useSyncExternalStore(instanceManager.subscribe,instanceManager.getEditor,instanceManager.getServerSnapshot);useDebugValue(editor);useEffect(instanceManager.onRender(deps));useEditorState({editor:editor,selector:({transactionNumber:transactionNumber})=>{if(options2.shouldRerenderOnTransaction===false){return null}if(options2.immediatelyRender&&transactionNumber===0){return 0}return transactionNumber+1}});return editor}const EditorContext=createContext({editor:null});EditorContext.Consumer;const ReactNodeViewContext=createContext({onDragStart:void 0});const useReactNodeView=()=>useContext(ReactNodeViewContext);React__default.forwardRef(((props,ref)=>{const{onDragStart:onDragStart}=useReactNodeView();const Tag=props.as||"div";return React__default.createElement(Tag,{...props,ref:ref,"data-node-view-wrapper":"",onDragStart:onDragStart,style:{whiteSpace:"normal",...props.style}})}));const inputRegex$4=/^\s*>\s$/;const Blockquote=Node$1.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:true,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["blockquote",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setBlockquote:()=>({commands:commands2})=>commands2.wrapIn(this.name),toggleBlockquote:()=>({commands:commands2})=>commands2.toggleWrap(this.name),unsetBlockquote:()=>({commands:commands2})=>commands2.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[wrappingInputRule({find:inputRegex$4,type:this.type})]}});const starInputRegex$1=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;const starPasteRegex$1=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;const underscoreInputRegex$1=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;const underscorePasteRegex$1=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;const Bold=Mark2.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:node2=>node2.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:mark=>mark.type.name===this.name},{style:"font-weight",getAttrs:value=>/^(bold(er)?|[5-9]\d{2,})$/.test(value)&&null}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["strong",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setBold:()=>({commands:commands2})=>commands2.setMark(this.name),toggleBold:()=>({commands:commands2})=>commands2.toggleMark(this.name),unsetBold:()=>({commands:commands2})=>commands2.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[markInputRule({find:starInputRegex$1,type:this.type}),markInputRule({find:underscoreInputRegex$1,type:this.type})]},addPasteRules(){return[markPasteRule({find:starPasteRegex$1,type:this.type}),markPasteRule({find:underscorePasteRegex$1,type:this.type})]}});const ListItemName$1="listItem";const TextStyleName$1="textStyle";const inputRegex$3=/^\s*([-+*])\s$/;const BulletList=Node$1.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:false,keepAttributes:false}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["ul",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{toggleBulletList:()=>({commands:commands2,chain:chain})=>{if(this.options.keepAttributes){return chain().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ListItemName$1,this.editor.getAttributes(TextStyleName$1)).run()}return commands2.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let inputRule=wrappingInputRule({find:inputRegex$3,type:this.type});if(this.options.keepMarks||this.options.keepAttributes){inputRule=wrappingInputRule({find:inputRegex$3,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(TextStyleName$1),editor:this.editor})}return[inputRule]}});const inputRegex$2=/(^|[^`])`([^`]+)`(?!`)/;const pasteRegex$1=/(^|[^`])`([^`]+)`(?!`)/g;const Code=Mark2.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:true,exitable:true,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["code",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setCode:()=>({commands:commands2})=>commands2.setMark(this.name),toggleCode:()=>({commands:commands2})=>commands2.toggleMark(this.name),unsetCode:()=>({commands:commands2})=>commands2.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[markInputRule({find:inputRegex$2,type:this.type})]},addPasteRules(){return[markPasteRule({find:pasteRegex$1,type:this.type})]}});const backtickInputRegex=/^```([a-z]+)?[\s\n]$/;const tildeInputRegex=/^~~~([a-z]+)?[\s\n]$/;const CodeBlock=Node$1.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:true,exitOnArrowDown:true,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:true,defining:true,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:element=>{var _a;const{languageClassPrefix:languageClassPrefix}=this.options;const classNames2=[...((_a=element.firstElementChild)===null||_a===void 0?void 0:_a.classList)||[]];const languages=classNames2.filter((className=>className.startsWith(languageClassPrefix))).map((className=>className.replace(languageClassPrefix,"")));const language=languages[0];if(!language){return null}return language},rendered:false}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:node2,HTMLAttributes:HTMLAttributes}){return["pre",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),["code",{class:node2.attrs.language?this.options.languageClassPrefix+node2.attrs.language:null},0]]},addCommands(){return{setCodeBlock:attributes=>({commands:commands2})=>commands2.setNode(this.name,attributes),toggleCodeBlock:attributes=>({commands:commands2})=>commands2.toggleNode(this.name,"paragraph",attributes)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:empty2,$anchor:$anchor}=this.editor.state.selection;const isAtStart=$anchor.pos===1;if(!empty2||$anchor.parent.type.name!==this.name){return false}if(isAtStart||!$anchor.parent.textContent.length){return this.editor.commands.clearNodes()}return false},Enter:({editor:editor})=>{if(!this.options.exitOnTripleEnter){return false}const{state:state}=editor;const{selection:selection}=state;const{$from:$from,empty:empty2}=selection;if(!empty2||$from.parent.type!==this.type){return false}const isAtEnd=$from.parentOffset===$from.parent.nodeSize-2;const endsWithDoubleNewline=$from.parent.textContent.endsWith("\n\n");if(!isAtEnd||!endsWithDoubleNewline){return false}return editor.chain().command((({tr:tr2})=>{tr2.delete($from.pos-2,$from.pos);return true})).exitCode().run()},ArrowDown:({editor:editor})=>{if(!this.options.exitOnArrowDown){return false}const{state:state}=editor;const{selection:selection,doc:doc2}=state;const{$from:$from,empty:empty2}=selection;if(!empty2||$from.parent.type!==this.type){return false}const isAtEnd=$from.parentOffset===$from.parent.nodeSize-2;if(!isAtEnd){return false}const after=$from.after();if(after===void 0){return false}const nodeAfter=doc2.nodeAt(after);if(nodeAfter){return editor.commands.command((({tr:tr2})=>{tr2.setSelection(Selection.near(doc2.resolve(after)));return true}))}return editor.commands.exitCode()}}},addInputRules(){return[textblockTypeInputRule({find:backtickInputRegex,type:this.type,getAttributes:match2=>({language:match2[1]})}),textblockTypeInputRule({find:tildeInputRegex,type:this.type,getAttributes:match2=>({language:match2[1]})})]},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(view,event2)=>{if(!event2.clipboardData){return false}if(this.editor.isActive(this.type.name)){return false}const text=event2.clipboardData.getData("text/plain");const vscode=event2.clipboardData.getData("vscode-editor-data");const vscodeData=vscode?JSON.parse(vscode):void 0;const language=vscodeData===null||vscodeData===void 0?void 0:vscodeData.mode;if(!text||!language){return false}const{tr:tr2,schema:schema}=view.state;const textNode=schema.text(text.replace(/\r\n?/g,"\n"));tr2.replaceSelectionWith(this.type.create({language:language},textNode));if(tr2.selection.$from.parent.type!==this.type){tr2.setSelection(TextSelection.near(tr2.doc.resolve(Math.max(0,tr2.selection.from-2))))}tr2.setMeta("paste",true);view.dispatch(tr2);return true}}})]}});const Document=Node$1.create({name:"doc",topNode:true,content:"block+"});function dropCursor(options2={}){return new Plugin({view(editorView){return new DropCursorView(editorView,options2)}})}class DropCursorView{constructor(editorView,options2){var _a;this.editorView=editorView;this.cursorPos=null;this.element=null;this.timeout=-1;this.width=(_a=options2.width)!==null&&_a!==void 0?_a:1;this.color=options2.color===false?void 0:options2.color||"black";this.class=options2.class;this.handlers=["dragover","dragend","drop","dragleave"].map((name=>{let handler=e=>{this[name](e)};editorView.dom.addEventListener(name,handler);return{name:name,handler:handler}}))}destroy(){this.handlers.forEach((({name:name,handler:handler})=>this.editorView.dom.removeEventListener(name,handler)))}update(editorView,prevState){if(this.cursorPos!=null&&prevState.doc!=editorView.state.doc){if(this.cursorPos>editorView.state.doc.content.size)this.setCursor(null);else this.updateOverlay()}}setCursor(pos){if(pos==this.cursorPos)return;this.cursorPos=pos;if(pos==null){this.element.parentNode.removeChild(this.element);this.element=null}else{this.updateOverlay()}}updateOverlay(){let $pos=this.editorView.state.doc.resolve(this.cursorPos);let isBlock=!$pos.parent.inlineContent,rect;if(isBlock){let before=$pos.nodeBefore,after=$pos.nodeAfter;if(before||after){let node2=this.editorView.nodeDOM(this.cursorPos-(before?before.nodeSize:0));if(node2){let nodeRect=node2.getBoundingClientRect();let top=before?nodeRect.bottom:nodeRect.top;if(before&&after)top=(top+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2;rect={left:nodeRect.left,right:nodeRect.right,top:top-this.width/2,bottom:top+this.width/2}}}}if(!rect){let coords=this.editorView.coordsAtPos(this.cursorPos);rect={left:coords.left-this.width/2,right:coords.left+this.width/2,top:coords.top,bottom:coords.bottom}}let parent=this.editorView.dom.offsetParent;if(!this.element){this.element=parent.appendChild(document.createElement("div"));if(this.class)this.element.className=this.class;this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;";if(this.color){this.element.style.backgroundColor=this.color}}this.element.classList.toggle("prosemirror-dropcursor-block",isBlock);this.element.classList.toggle("prosemirror-dropcursor-inline",!isBlock);let parentLeft,parentTop;if(!parent||parent==document.body&&getComputedStyle(parent).position=="static"){parentLeft=-pageXOffset;parentTop=-pageYOffset}else{let rect2=parent.getBoundingClientRect();parentLeft=rect2.left-parent.scrollLeft;parentTop=rect2.top-parent.scrollTop}this.element.style.left=rect.left-parentLeft+"px";this.element.style.top=rect.top-parentTop+"px";this.element.style.width=rect.right-rect.left+"px";this.element.style.height=rect.bottom-rect.top+"px"}scheduleRemoval(timeout){clearTimeout(this.timeout);this.timeout=setTimeout((()=>this.setCursor(null)),timeout)}dragover(event2){if(!this.editorView.editable)return;let pos=this.editorView.posAtCoords({left:event2.clientX,top:event2.clientY});let node2=pos&&pos.inside>=0&&this.editorView.state.doc.nodeAt(pos.inside);let disableDropCursor=node2&&node2.type.spec.disableDropCursor;let disabled=typeof disableDropCursor=="function"?disableDropCursor(this.editorView,pos,event2):disableDropCursor;if(pos&&!disabled){let target=pos.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let point=dropPoint(this.editorView.state.doc,target,this.editorView.dragging.slice);if(point!=null)target=point}this.setCursor(target);this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(event2){if(event2.target==this.editorView.dom||!this.editorView.dom.contains(event2.relatedTarget))this.setCursor(null)}}const Dropcursor=Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[dropCursor(this.options)]}});class GapCursor extends Selection{constructor($pos){super($pos,$pos)}map(doc2,mapping){let $pos=doc2.resolve(mapping.map(this.head));return GapCursor.valid($pos)?new GapCursor($pos):Selection.near($pos)}content(){return Slice.empty}eq(other){return other instanceof GapCursor&&other.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(doc2,json){if(typeof json.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new GapCursor(doc2.resolve(json.pos))}getBookmark(){return new GapBookmark(this.anchor)}static valid($pos){let parent=$pos.parent;if(parent.isTextblock||!closedBefore($pos)||!closedAfter($pos))return false;let override=parent.type.spec.allowGapCursor;if(override!=null)return override;let deflt=parent.contentMatchAt($pos.index()).defaultType;return deflt&&deflt.isTextblock}static findGapCursorFrom($pos,dir,mustMove=false){search:for(;;){if(!mustMove&&GapCursor.valid($pos))return $pos;let pos=$pos.pos,next2=null;for(let d=$pos.depth;;d--){let parent=$pos.node(d);if(dir>0?$pos.indexAfter(d)<parent.childCount:$pos.index(d)>0){next2=parent.child(dir>0?$pos.indexAfter(d):$pos.index(d)-1);break}else if(d==0){return null}pos+=dir;let $cur=$pos.doc.resolve(pos);if(GapCursor.valid($cur))return $cur}for(;;){let inside=dir>0?next2.firstChild:next2.lastChild;if(!inside){if(next2.isAtom&&!next2.isText&&!NodeSelection.isSelectable(next2)){$pos=$pos.doc.resolve(pos+next2.nodeSize*dir);mustMove=false;continue search}break}next2=inside;pos+=dir;let $cur=$pos.doc.resolve(pos);if(GapCursor.valid($cur))return $cur}return null}}}GapCursor.prototype.visible=false;GapCursor.findFrom=GapCursor.findGapCursorFrom;Selection.jsonID("gapcursor",GapCursor);class GapBookmark{constructor(pos){this.pos=pos}map(mapping){return new GapBookmark(mapping.map(this.pos))}resolve(doc2){let $pos=doc2.resolve(this.pos);return GapCursor.valid($pos)?new GapCursor($pos):Selection.near($pos)}}function closedBefore($pos){for(let d=$pos.depth;d>=0;d--){let index2=$pos.index(d),parent=$pos.node(d);if(index2==0){if(parent.type.spec.isolating)return true;continue}for(let before=parent.child(index2-1);;before=before.lastChild){if(before.childCount==0&&!before.inlineContent||before.isAtom||before.type.spec.isolating)return true;if(before.inlineContent)return false}}return true}function closedAfter($pos){for(let d=$pos.depth;d>=0;d--){let index2=$pos.indexAfter(d),parent=$pos.node(d);if(index2==parent.childCount){if(parent.type.spec.isolating)return true;continue}for(let after=parent.child(index2);;after=after.firstChild){if(after.childCount==0&&!after.inlineContent||after.isAtom||after.type.spec.isolating)return true;if(after.inlineContent)return false}}return true}function gapCursor(){return new Plugin({props:{decorations:drawGapCursor,createSelectionBetween(_view,$anchor,$head){return $anchor.pos==$head.pos&&GapCursor.valid($head)?new GapCursor($head):null},handleClick:handleClick,handleKeyDown:handleKeyDown,handleDOMEvents:{beforeinput:beforeinput}}})}const handleKeyDown=keydownHandler({ArrowLeft:arrow("horiz",-1),ArrowRight:arrow("horiz",1),ArrowUp:arrow("vert",-1),ArrowDown:arrow("vert",1)});function arrow(axis,dir){const dirStr=axis=="vert"?dir>0?"down":"up":dir>0?"right":"left";return function(state,dispatch,view){let sel=state.selection;let $start=dir>0?sel.$to:sel.$from,mustMove=sel.empty;if(sel instanceof TextSelection){if(!view.endOfTextblock(dirStr)||$start.depth==0)return false;mustMove=false;$start=state.doc.resolve(dir>0?$start.after():$start.before())}let $found=GapCursor.findGapCursorFrom($start,dir,mustMove);if(!$found)return false;if(dispatch)dispatch(state.tr.setSelection(new GapCursor($found)));return true}}function handleClick(view,pos,event2){if(!view||!view.editable)return false;let $pos=view.state.doc.resolve(pos);if(!GapCursor.valid($pos))return false;let clickPos=view.posAtCoords({left:event2.clientX,top:event2.clientY});if(clickPos&&clickPos.inside>-1&&NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside)))return false;view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));return true}function beforeinput(view,event2){if(event2.inputType!="insertCompositionText"||!(view.state.selection instanceof GapCursor))return false;let{$from:$from}=view.state.selection;let insert=$from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);if(!insert)return false;let frag=Fragment.empty;for(let i=insert.length-1;i>=0;i--)frag=Fragment.from(insert[i].createAndFill(null,frag));let tr2=view.state.tr.replace($from.pos,$from.pos,new Slice(frag,0,0));tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos+1)));view.dispatch(tr2);return false}function drawGapCursor(state){if(!(state.selection instanceof GapCursor))return null;let node2=document.createElement("div");node2.className="ProseMirror-gapcursor";return DecorationSet.create(state.doc,[Decoration.widget(state.selection.head,node2,{key:"gapcursor"})])}const Gapcursor=Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[gapCursor()]},extendNodeSchema(extension){var _a;const context={name:extension.name,options:extension.options,storage:extension.storage};return{allowGapCursor:(_a=callOrReturn(getExtensionField(extension,"allowGapCursor",context)))!==null&&_a!==void 0?_a:null}}});const HardBreak=Node$1.create({name:"hardBreak",addOptions(){return{keepMarks:true,HTMLAttributes:{}}},inline:true,group:"inline",selectable:false,linebreakReplacement:true,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["br",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes)]},renderText(){return"\n"},addCommands(){return{setHardBreak:()=>({commands:commands2,chain:chain,state:state,editor:editor})=>commands2.first([()=>commands2.exitCode(),()=>commands2.command((()=>{const{selection:selection,storedMarks:storedMarks}=state;if(selection.$from.parent.type.spec.isolating){return false}const{keepMarks:keepMarks}=this.options;const{splittableMarks:splittableMarks}=editor.extensionManager;const marks=storedMarks||selection.$to.parentOffset&&selection.$from.marks();return chain().insertContent({type:this.name}).command((({tr:tr2,dispatch:dispatch})=>{if(dispatch&&marks&&keepMarks){const filteredMarks=marks.filter((mark=>splittableMarks.includes(mark.type.name)));tr2.ensureMarks(filteredMarks)}return true})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});const Heading=Node$1.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:true,addAttributes(){return{level:{default:1,rendered:false}}},parseHTML(){return this.options.levels.map((level=>({tag:`h${level}`,attrs:{level:level}})))},renderHTML({node:node2,HTMLAttributes:HTMLAttributes}){const hasLevel=this.options.levels.includes(node2.attrs.level);const level=hasLevel?node2.attrs.level:this.options.levels[0];return[`h${level}`,mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setHeading:attributes=>({commands:commands2})=>{if(!this.options.levels.includes(attributes.level)){return false}return commands2.setNode(this.name,attributes)},toggleHeading:attributes=>({commands:commands2})=>{if(!this.options.levels.includes(attributes.level)){return false}return commands2.toggleNode(this.name,"paragraph",attributes)}}},addKeyboardShortcuts(){return this.options.levels.reduce(((items,level)=>({...items,...{[`Mod-Alt-${level}`]:()=>this.editor.commands.toggleHeading({level:level})}})),{})},addInputRules(){return this.options.levels.map((level=>textblockTypeInputRule({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\s$`),type:this.type,getAttributes:{level:level}})))}});var GOOD_LEAF_SIZE=200;var RopeSequence=function RopeSequence2(){};RopeSequence.prototype.append=function append(other){if(!other.length){return this}other=RopeSequence.from(other);return!this.length&&other||other.length<GOOD_LEAF_SIZE&&this.leafAppend(other)||this.length<GOOD_LEAF_SIZE&&other.leafPrepend(this)||this.appendInner(other)};RopeSequence.prototype.prepend=function prepend(other){if(!other.length){return this}return RopeSequence.from(other).append(this)};RopeSequence.prototype.appendInner=function appendInner(other){return new Append(this,other)};RopeSequence.prototype.slice=function slice(from3,to){if(from3===void 0)from3=0;if(to===void 0)to=this.length;if(from3>=to){return RopeSequence.empty}return this.sliceInner(Math.max(0,from3),Math.min(this.length,to))};RopeSequence.prototype.get=function get2(i){if(i<0||i>=this.length){return void 0}return this.getInner(i)};RopeSequence.prototype.forEach=function forEach2(f,from3,to){if(from3===void 0)from3=0;if(to===void 0)to=this.length;if(from3<=to){this.forEachInner(f,from3,to,0)}else{this.forEachInvertedInner(f,from3,to,0)}};RopeSequence.prototype.map=function map(f,from3,to){if(from3===void 0)from3=0;if(to===void 0)to=this.length;var result=[];this.forEach((function(elt,i){return result.push(f(elt,i))}),from3,to);return result};RopeSequence.from=function from(values){if(values instanceof RopeSequence){return values}return values&&values.length?new Leaf(values):RopeSequence.empty};var Leaf=function(RopeSequence3){function Leaf2(values){RopeSequence3.call(this);this.values=values}if(RopeSequence3)Leaf2.__proto__=RopeSequence3;Leaf2.prototype=Object.create(RopeSequence3&&RopeSequence3.prototype);Leaf2.prototype.constructor=Leaf2;var prototypeAccessors={length:{configurable:true},depth:{configurable:true}};Leaf2.prototype.flatten=function flatten(){return this.values};Leaf2.prototype.sliceInner=function sliceInner(from3,to){if(from3==0&&to==this.length){return this}return new Leaf2(this.values.slice(from3,to))};Leaf2.prototype.getInner=function getInner(i){return this.values[i]};Leaf2.prototype.forEachInner=function forEachInner(f,from3,to,start){for(var i=from3;i<to;i++){if(f(this.values[i],start+i)===false){return false}}};Leaf2.prototype.forEachInvertedInner=function forEachInvertedInner(f,from3,to,start){for(var i=from3-1;i>=to;i--){if(f(this.values[i],start+i)===false){return false}}};Leaf2.prototype.leafAppend=function leafAppend(other){if(this.length+other.length<=GOOD_LEAF_SIZE){return new Leaf2(this.values.concat(other.flatten()))}};Leaf2.prototype.leafPrepend=function leafPrepend(other){if(this.length+other.length<=GOOD_LEAF_SIZE){return new Leaf2(other.flatten().concat(this.values))}};prototypeAccessors.length.get=function(){return this.values.length};prototypeAccessors.depth.get=function(){return 0};Object.defineProperties(Leaf2.prototype,prototypeAccessors);return Leaf2}(RopeSequence);RopeSequence.empty=new Leaf([]);var Append=function(RopeSequence3){function Append2(left,right){RopeSequence3.call(this);this.left=left;this.right=right;this.length=left.length+right.length;this.depth=Math.max(left.depth,right.depth)+1}if(RopeSequence3)Append2.__proto__=RopeSequence3;Append2.prototype=Object.create(RopeSequence3&&RopeSequence3.prototype);Append2.prototype.constructor=Append2;Append2.prototype.flatten=function flatten(){return this.left.flatten().concat(this.right.flatten())};Append2.prototype.getInner=function getInner(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)};Append2.prototype.forEachInner=function forEachInner(f,from3,to,start){var leftLen=this.left.length;if(from3<leftLen&&this.left.forEachInner(f,from3,Math.min(to,leftLen),start)===false){return false}if(to>leftLen&&this.right.forEachInner(f,Math.max(from3-leftLen,0),Math.min(this.length,to)-leftLen,start+leftLen)===false){return false}};Append2.prototype.forEachInvertedInner=function forEachInvertedInner(f,from3,to,start){var leftLen=this.left.length;if(from3>leftLen&&this.right.forEachInvertedInner(f,from3-leftLen,Math.max(to,leftLen)-leftLen,start+leftLen)===false){return false}if(to<leftLen&&this.left.forEachInvertedInner(f,Math.min(from3,leftLen),to,start)===false){return false}};Append2.prototype.sliceInner=function sliceInner(from3,to){if(from3==0&&to==this.length){return this}var leftLen=this.left.length;if(to<=leftLen){return this.left.slice(from3,to)}if(from3>=leftLen){return this.right.slice(from3-leftLen,to-leftLen)}return this.left.slice(from3,leftLen).append(this.right.slice(0,to-leftLen))};Append2.prototype.leafAppend=function leafAppend(other){var inner=this.right.leafAppend(other);if(inner){return new Append2(this.left,inner)}};Append2.prototype.leafPrepend=function leafPrepend(other){var inner=this.left.leafPrepend(other);if(inner){return new Append2(inner,this.right)}};Append2.prototype.appendInner=function appendInner2(other){if(this.left.depth>=Math.max(this.right.depth,other.depth)+1){return new Append2(this.left,new Append2(this.right,other))}return new Append2(this,other)};return Append2}(RopeSequence);const max_empty_items=500;class Branch{constructor(items,eventCount){this.items=items;this.eventCount=eventCount}popEvent(state,preserveItems){if(this.eventCount==0)return null;let end=this.items.length;for(;;end--){let next2=this.items.get(end-1);if(next2.selection){--end;break}}let remap,mapFrom;if(preserveItems){remap=this.remapping(end,this.items.length);mapFrom=remap.maps.length}let transform=state.tr;let selection,remaining;let addAfter=[],addBefore=[];this.items.forEach(((item,i)=>{if(!item.step){if(!remap){remap=this.remapping(end,i+1);mapFrom=remap.maps.length}mapFrom--;addBefore.push(item);return}if(remap){addBefore.push(new Item(item.map));let step=item.step.map(remap.slice(mapFrom)),map2;if(step&&transform.maybeStep(step).doc){map2=transform.mapping.maps[transform.mapping.maps.length-1];addAfter.push(new Item(map2,void 0,void 0,addAfter.length+addBefore.length))}mapFrom--;if(map2)remap.appendMap(map2,mapFrom)}else{transform.maybeStep(item.step)}if(item.selection){selection=remap?item.selection.map(remap.slice(mapFrom)):item.selection;remaining=new Branch(this.items.slice(0,end).append(addBefore.reverse().concat(addAfter)),this.eventCount-1);return false}}),this.items.length,0);return{remaining:remaining,transform:transform,selection:selection}}addTransform(transform,selection,histOptions,preserveItems){let newItems=[],eventCount=this.eventCount;let oldItems=this.items,lastItem=!preserveItems&&oldItems.length?oldItems.get(oldItems.length-1):null;for(let i=0;i<transform.steps.length;i++){let step=transform.steps[i].invert(transform.docs[i]);let item=new Item(transform.mapping.maps[i],step,selection),merged;if(merged=lastItem&&lastItem.merge(item)){item=merged;if(i)newItems.pop();else oldItems=oldItems.slice(0,oldItems.length-1)}newItems.push(item);if(selection){eventCount++;selection=void 0}if(!preserveItems)lastItem=item}let overflow=eventCount-histOptions.depth;if(overflow>DEPTH_OVERFLOW){oldItems=cutOffEvents(oldItems,overflow);eventCount-=overflow}return new Branch(oldItems.append(newItems),eventCount)}remapping(from3,to){let maps=new Mapping;this.items.forEach(((item,i)=>{let mirrorPos=item.mirrorOffset!=null&&i-item.mirrorOffset>=from3?maps.maps.length-item.mirrorOffset:void 0;maps.appendMap(item.map,mirrorPos)}),from3,to);return maps}addMaps(array){if(this.eventCount==0)return this;return new Branch(this.items.append(array.map((map2=>new Item(map2)))),this.eventCount)}rebased(rebasedTransform,rebasedCount){if(!this.eventCount)return this;let rebasedItems=[],start=Math.max(0,this.items.length-rebasedCount);let mapping=rebasedTransform.mapping;let newUntil=rebasedTransform.steps.length;let eventCount=this.eventCount;this.items.forEach((item=>{if(item.selection)eventCount--}),start);let iRebased=rebasedCount;this.items.forEach((item=>{let pos=mapping.getMirror(--iRebased);if(pos==null)return;newUntil=Math.min(newUntil,pos);let map2=mapping.maps[pos];if(item.step){let step=rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);let selection=item.selection&&item.selection.map(mapping.slice(iRebased+1,pos));if(selection)eventCount++;rebasedItems.push(new Item(map2,step,selection))}else{rebasedItems.push(new Item(map2))}}),start);let newMaps=[];for(let i=rebasedCount;i<newUntil;i++)newMaps.push(new Item(mapping.maps[i]));let items=this.items.slice(0,start).append(newMaps).append(rebasedItems);let branch=new Branch(items,eventCount);if(branch.emptyItemCount()>max_empty_items)branch=branch.compress(this.items.length-rebasedItems.length);return branch}emptyItemCount(){let count2=0;this.items.forEach((item=>{if(!item.step)count2++}));return count2}compress(upto=this.items.length){let remap=this.remapping(0,upto),mapFrom=remap.maps.length;let items=[],events=0;this.items.forEach(((item,i)=>{if(i>=upto){items.push(item);if(item.selection)events++}else if(item.step){let step=item.step.map(remap.slice(mapFrom)),map2=step&&step.getMap();mapFrom--;if(map2)remap.appendMap(map2,mapFrom);if(step){let selection=item.selection&&item.selection.map(remap.slice(mapFrom));if(selection)events++;let newItem=new Item(map2.invert(),step,selection),merged,last=items.length-1;if(merged=items.length&&items[last].merge(newItem))items[last]=merged;else items.push(newItem)}}else if(item.map){mapFrom--}}),this.items.length,0);return new Branch(RopeSequence.from(items.reverse()),events)}}Branch.empty=new Branch(RopeSequence.empty,0);function cutOffEvents(items,n){let cutPoint;items.forEach(((item,i)=>{if(item.selection&&n--==0){cutPoint=i;return false}}));return items.slice(cutPoint)}class Item{constructor(map2,step,selection,mirrorOffset){this.map=map2;this.step=step;this.selection=selection;this.mirrorOffset=mirrorOffset}merge(other){if(this.step&&other.step&&!other.selection){let step=other.step.merge(this.step);if(step)return new Item(step.getMap().invert(),step,this.selection)}}}class HistoryState{constructor(done,undone,prevRanges,prevTime,prevComposition){this.done=done;this.undone=undone;this.prevRanges=prevRanges;this.prevTime=prevTime;this.prevComposition=prevComposition}}const DEPTH_OVERFLOW=20;function applyTransaction(history2,state,tr2,options2){let historyTr=tr2.getMeta(historyKey),rebased;if(historyTr)return historyTr.historyState;if(tr2.getMeta(closeHistoryKey))history2=new HistoryState(history2.done,history2.undone,null,0,-1);let appended=tr2.getMeta("appendedTransaction");if(tr2.steps.length==0){return history2}else if(appended&&appended.getMeta(historyKey)){if(appended.getMeta(historyKey).redo)return new HistoryState(history2.done.addTransform(tr2,void 0,options2,mustPreserveItems(state)),history2.undone,rangesFor(tr2.mapping.maps),history2.prevTime,history2.prevComposition);else return new HistoryState(history2.done,history2.undone.addTransform(tr2,void 0,options2,mustPreserveItems(state)),null,history2.prevTime,history2.prevComposition)}else if(tr2.getMeta("addToHistory")!==false&&!(appended&&appended.getMeta("addToHistory")===false)){let composition=tr2.getMeta("composition");let newGroup=history2.prevTime==0||!appended&&history2.prevComposition!=composition&&(history2.prevTime<(tr2.time||0)-options2.newGroupDelay||!isAdjacentTo(tr2,history2.prevRanges));let prevRanges=appended?mapRanges(history2.prevRanges,tr2.mapping):rangesFor(tr2.mapping.maps);return new HistoryState(history2.done.addTransform(tr2,newGroup?state.selection.getBookmark():void 0,options2,mustPreserveItems(state)),Branch.empty,prevRanges,tr2.time,composition==null?history2.prevComposition:composition)}else if(rebased=tr2.getMeta("rebased")){return new HistoryState(history2.done.rebased(tr2,rebased),history2.undone.rebased(tr2,rebased),mapRanges(history2.prevRanges,tr2.mapping),history2.prevTime,history2.prevComposition)}else{return new HistoryState(history2.done.addMaps(tr2.mapping.maps),history2.undone.addMaps(tr2.mapping.maps),mapRanges(history2.prevRanges,tr2.mapping),history2.prevTime,history2.prevComposition)}}function isAdjacentTo(transform,prevRanges){if(!prevRanges)return false;if(!transform.docChanged)return true;let adjacent=false;transform.mapping.maps[0].forEach(((start,end)=>{for(let i=0;i<prevRanges.length;i+=2)if(start<=prevRanges[i+1]&&end>=prevRanges[i])adjacent=true}));return adjacent}function rangesFor(maps){let result=[];for(let i=maps.length-1;i>=0&&result.length==0;i--)maps[i].forEach(((_from,_to,from3,to)=>result.push(from3,to)));return result}function mapRanges(ranges,mapping){if(!ranges)return null;let result=[];for(let i=0;i<ranges.length;i+=2){let from3=mapping.map(ranges[i],1),to=mapping.map(ranges[i+1],-1);if(from3<=to)result.push(from3,to)}return result}function histTransaction(history2,state,redo2){let preserveItems=mustPreserveItems(state);let histOptions=historyKey.get(state).spec.config;let pop=(redo2?history2.undone:history2.done).popEvent(state,preserveItems);if(!pop)return null;let selection=pop.selection.resolve(pop.transform.doc);let added=(redo2?history2.done:history2.undone).addTransform(pop.transform,state.selection.getBookmark(),histOptions,preserveItems);let newHist=new HistoryState(redo2?added:pop.remaining,redo2?pop.remaining:added,null,0,-1);return pop.transform.setSelection(selection).setMeta(historyKey,{redo:redo2,historyState:newHist})}let cachedPreserveItems=false,cachedPreserveItemsPlugins=null;function mustPreserveItems(state){let plugins=state.plugins;if(cachedPreserveItemsPlugins!=plugins){cachedPreserveItems=false;cachedPreserveItemsPlugins=plugins;for(let i=0;i<plugins.length;i++)if(plugins[i].spec.historyPreserveItems){cachedPreserveItems=true;break}}return cachedPreserveItems}const historyKey=new PluginKey("history");const closeHistoryKey=new PluginKey("closeHistory");function history(config={}){config={depth:config.depth||100,newGroupDelay:config.newGroupDelay||500};return new Plugin({key:historyKey,state:{init(){return new HistoryState(Branch.empty,Branch.empty,null,0,-1)},apply(tr2,hist,state){return applyTransaction(hist,state,tr2,config)}},config:config,props:{handleDOMEvents:{beforeinput(view,e){let inputType=e.inputType;let command2=inputType=="historyUndo"?undo:inputType=="historyRedo"?redo:null;if(!command2)return false;e.preventDefault();return command2(view.state,view.dispatch)}}}})}function buildCommand(redo2,scroll){return(state,dispatch)=>{let hist=historyKey.getState(state);if(!hist||(redo2?hist.undone:hist.done).eventCount==0)return false;if(dispatch){let tr2=histTransaction(hist,state,redo2);if(tr2)dispatch(scroll?tr2.scrollIntoView():tr2)}return true}}const undo=buildCommand(false,true);const redo=buildCommand(true,true);const History=Extension.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:state,dispatch:dispatch})=>undo(state,dispatch),redo:()=>({state:state,dispatch:dispatch})=>redo(state,dispatch)}},addProseMirrorPlugins(){return[history(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});const HorizontalRule=Node$1.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["hr",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes)]},addCommands(){return{setHorizontalRule:()=>({chain:chain,state:state})=>{const{selection:selection}=state;const{$from:$originFrom,$to:$originTo}=selection;const currentChain=chain();if($originFrom.parentOffset===0){currentChain.insertContentAt({from:Math.max($originFrom.pos-1,0),to:$originTo.pos},{type:this.name})}else if(isNodeSelection(selection)){currentChain.insertContentAt($originTo.pos,{type:this.name})}else{currentChain.insertContent({type:this.name})}return currentChain.command((({tr:tr2,dispatch:dispatch})=>{var _a;if(dispatch){const{$to:$to}=tr2.selection;const posAfter=$to.end();if($to.nodeAfter){if($to.nodeAfter.isTextblock){tr2.setSelection(TextSelection.create(tr2.doc,$to.pos+1))}else if($to.nodeAfter.isBlock){tr2.setSelection(NodeSelection.create(tr2.doc,$to.pos))}else{tr2.setSelection(TextSelection.create(tr2.doc,$to.pos))}}else{const node2=(_a=$to.parent.type.contentMatch.defaultType)===null||_a===void 0?void 0:_a.create();if(node2){tr2.insert(posAfter,node2);tr2.setSelection(TextSelection.create(tr2.doc,posAfter+1))}}tr2.scrollIntoView()}return true})).run()}}},addInputRules(){return[nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});const starInputRegex=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;const starPasteRegex=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;const underscoreInputRegex=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;const underscorePasteRegex=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;const Italic=Mark2.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:node2=>node2.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:mark=>mark.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["em",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setItalic:()=>({commands:commands2})=>commands2.setMark(this.name),toggleItalic:()=>({commands:commands2})=>commands2.toggleMark(this.name),unsetItalic:()=>({commands:commands2})=>commands2.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[markInputRule({find:starInputRegex,type:this.type}),markInputRule({find:underscoreInputRegex,type:this.type})]},addPasteRules(){return[markPasteRule({find:starPasteRegex,type:this.type}),markPasteRule({find:underscorePasteRegex,type:this.type})]}});const ListItem=Node$1.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:true,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["li",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});const ListItemName="listItem";const TextStyleName="textStyle";const inputRegex$1=/^(\d+)\.\s$/;const OrderedList=Node$1.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:false,keepAttributes:false}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:element=>element.hasAttribute("start")?parseInt(element.getAttribute("start")||"",10):1},type:{default:null,parseHTML:element=>element.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:HTMLAttributes}){const{start:start,...attributesWithoutStart}=HTMLAttributes;return start===1?["ol",mergeAttributes(this.options.HTMLAttributes,attributesWithoutStart),0]:["ol",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{toggleOrderedList:()=>({commands:commands2,chain:chain})=>{if(this.options.keepAttributes){return chain().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ListItemName,this.editor.getAttributes(TextStyleName)).run()}return commands2.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let inputRule=wrappingInputRule({find:inputRegex$1,type:this.type,getAttributes:match2=>({start:+match2[1]}),joinPredicate:(match2,node2)=>node2.childCount+node2.attrs.start===+match2[1]});if(this.options.keepMarks||this.options.keepAttributes){inputRule=wrappingInputRule({find:inputRegex$1,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:match2=>({start:+match2[1],...this.editor.getAttributes(TextStyleName)}),joinPredicate:(match2,node2)=>node2.childCount+node2.attrs.start===+match2[1],editor:this.editor})}return[inputRule]}});const Paragraph=Node$1.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["p",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setParagraph:()=>({commands:commands2})=>commands2.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});const inputRegex=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;const pasteRegex=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;const Strike=Mark2.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:false,getAttrs:style2=>style2.includes("line-through")?{}:false}]},renderHTML({HTMLAttributes:HTMLAttributes}){return["s",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setStrike:()=>({commands:commands2})=>commands2.setMark(this.name),toggleStrike:()=>({commands:commands2})=>commands2.toggleMark(this.name),unsetStrike:()=>({commands:commands2})=>commands2.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[markInputRule({find:inputRegex,type:this.type})]},addPasteRules(){return[markPasteRule({find:pasteRegex,type:this.type})]}});const Text$1=Node$1.create({name:"text",group:"inline"});const StarterKit=Extension.create({name:"starterKit",addExtensions(){const extensions=[];if(this.options.bold!==false){extensions.push(Bold.configure(this.options.bold))}if(this.options.blockquote!==false){extensions.push(Blockquote.configure(this.options.blockquote))}if(this.options.bulletList!==false){extensions.push(BulletList.configure(this.options.bulletList))}if(this.options.code!==false){extensions.push(Code.configure(this.options.code))}if(this.options.codeBlock!==false){extensions.push(CodeBlock.configure(this.options.codeBlock))}if(this.options.document!==false){extensions.push(Document.configure(this.options.document))}if(this.options.dropcursor!==false){extensions.push(Dropcursor.configure(this.options.dropcursor))}if(this.options.gapcursor!==false){extensions.push(Gapcursor.configure(this.options.gapcursor))}if(this.options.hardBreak!==false){extensions.push(HardBreak.configure(this.options.hardBreak))}if(this.options.heading!==false){extensions.push(Heading.configure(this.options.heading))}if(this.options.history!==false){extensions.push(History.configure(this.options.history))}if(this.options.horizontalRule!==false){extensions.push(HorizontalRule.configure(this.options.horizontalRule))}if(this.options.italic!==false){extensions.push(Italic.configure(this.options.italic))}if(this.options.listItem!==false){extensions.push(ListItem.configure(this.options.listItem))}if(this.options.orderedList!==false){extensions.push(OrderedList.configure(this.options.orderedList))}if(this.options.paragraph!==false){extensions.push(Paragraph.configure(this.options.paragraph))}if(this.options.strike!==false){extensions.push(Strike.configure(this.options.strike))}if(this.options.text!==false){extensions.push(Text$1.configure(this.options.text))}return extensions}});const encodedTlds="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";const encodedUtlds="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";const assign$1=(target,properties)=>{for(const key in properties){target[key]=properties[key]}return target};const numeric="numeric";const ascii="ascii";const alpha="alpha";const asciinumeric="asciinumeric";const alphanumeric="alphanumeric";const domain="domain";const emoji="emoji";const scheme="scheme";const slashscheme="slashscheme";const whitespace$1="whitespace";function registerGroup(name,groups){if(!(name in groups)){groups[name]=[]}return groups[name]}function addToGroups(t,flags,groups){if(flags[numeric]){flags[asciinumeric]=true;flags[alphanumeric]=true}if(flags[ascii]){flags[asciinumeric]=true;flags[alpha]=true}if(flags[asciinumeric]){flags[alphanumeric]=true}if(flags[alpha]){flags[alphanumeric]=true}if(flags[alphanumeric]){flags[domain]=true}if(flags[emoji]){flags[domain]=true}for(const k in flags){const group=registerGroup(k,groups);if(group.indexOf(t)<0){group.push(t)}}}function flagsForToken(t,groups){const result={};for(const c in groups){if(groups[c].indexOf(t)>=0){result[c]=true}}return result}function State(token2=null){this.j={};this.jr=[];this.jd=null;this.t=token2}State.groups={};State.prototype={accepts(){return!!this.t},go(input){const state=this;const nextState=state.j[input];if(nextState){return nextState}for(let i=0;i<state.jr.length;i++){const regex=state.jr[i][0];const nextState2=state.jr[i][1];if(nextState2&®ex.test(input)){return nextState2}}return state.jd},has(input,exactOnly=false){return exactOnly?input in this.j:!!this.go(input)},ta(inputs,next2,flags,groups){for(let i=0;i<inputs.length;i++){this.tt(inputs[i],next2,flags,groups)}},tr(regexp,next2,flags,groups){groups=groups||State.groups;let nextState;if(next2&&next2.j){nextState=next2}else{nextState=new State(next2);if(flags&&groups){addToGroups(next2,flags,groups)}}this.jr.push([regexp,nextState]);return nextState},ts(input,next2,flags,groups){let state=this;const len=input.length;if(!len){return state}for(let i=0;i<len-1;i++){state=state.tt(input[i])}return state.tt(input[len-1],next2,flags,groups)},tt(input,next2,flags,groups){groups=groups||State.groups;const state=this;if(next2&&next2.j){state.j[input]=next2;return next2}const t=next2;let nextState,templateState=state.go(input);if(templateState){nextState=new State;assign$1(nextState.j,templateState.j);nextState.jr.push.apply(nextState.jr,templateState.jr);nextState.jd=templateState.jd;nextState.t=templateState.t}else{nextState=new State}if(t){if(groups){if(nextState.t&&typeof nextState.t==="string"){const allFlags=assign$1(flagsForToken(nextState.t,groups),flags);addToGroups(t,allFlags,groups)}else if(flags){addToGroups(t,flags,groups)}}nextState.t=t}state.j[input]=nextState;return nextState}};const ta=(state,input,next2,flags,groups)=>state.ta(input,next2,flags,groups);const tr=(state,regexp,next2,flags,groups)=>state.tr(regexp,next2,flags,groups);const ts=(state,input,next2,flags,groups)=>state.ts(input,next2,flags,groups);const tt=(state,input,next2,flags,groups)=>state.tt(input,next2,flags,groups);const WORD="WORD";const UWORD="UWORD";const ASCIINUMERICAL="ASCIINUMERICAL";const ALPHANUMERICAL="ALPHANUMERICAL";const LOCALHOST="LOCALHOST";const TLD="TLD";const UTLD="UTLD";const SCHEME="SCHEME";const SLASH_SCHEME="SLASH_SCHEME";const NUM="NUM";const WS="WS";const NL="NL";const OPENBRACE="OPENBRACE";const CLOSEBRACE="CLOSEBRACE";const OPENBRACKET="OPENBRACKET";const CLOSEBRACKET="CLOSEBRACKET";const OPENPAREN="OPENPAREN";const CLOSEPAREN="CLOSEPAREN";const OPENANGLEBRACKET="OPENANGLEBRACKET";const CLOSEANGLEBRACKET="CLOSEANGLEBRACKET";const FULLWIDTHLEFTPAREN="FULLWIDTHLEFTPAREN";const FULLWIDTHRIGHTPAREN="FULLWIDTHRIGHTPAREN";const LEFTCORNERBRACKET="LEFTCORNERBRACKET";const RIGHTCORNERBRACKET="RIGHTCORNERBRACKET";const LEFTWHITECORNERBRACKET="LEFTWHITECORNERBRACKET";const RIGHTWHITECORNERBRACKET="RIGHTWHITECORNERBRACKET";const FULLWIDTHLESSTHAN="FULLWIDTHLESSTHAN";const FULLWIDTHGREATERTHAN="FULLWIDTHGREATERTHAN";const AMPERSAND="AMPERSAND";const APOSTROPHE="APOSTROPHE";const ASTERISK="ASTERISK";const AT="AT";const BACKSLASH="BACKSLASH";const BACKTICK="BACKTICK";const CARET="CARET";const COLON="COLON";const COMMA="COMMA";const DOLLAR="DOLLAR";const DOT="DOT";const EQUALS="EQUALS";const EXCLAMATION="EXCLAMATION";const HYPHEN="HYPHEN";const PERCENT="PERCENT";const PIPE="PIPE";const PLUS="PLUS";const POUND="POUND";const QUERY="QUERY";const QUOTE="QUOTE";const FULLWIDTHMIDDLEDOT="FULLWIDTHMIDDLEDOT";const SEMI="SEMI";const SLASH="SLASH";const TILDE="TILDE";const UNDERSCORE="UNDERSCORE";const EMOJI$1="EMOJI";const SYM="SYM";var tk=Object.freeze({__proto__:null,WORD:WORD,UWORD:UWORD,ASCIINUMERICAL:ASCIINUMERICAL,ALPHANUMERICAL:ALPHANUMERICAL,LOCALHOST:LOCALHOST,TLD:TLD,UTLD:UTLD,SCHEME:SCHEME,SLASH_SCHEME:SLASH_SCHEME,NUM:NUM,WS:WS,NL:NL,OPENBRACE:OPENBRACE,CLOSEBRACE:CLOSEBRACE,OPENBRACKET:OPENBRACKET,CLOSEBRACKET:CLOSEBRACKET,OPENPAREN:OPENPAREN,CLOSEPAREN:CLOSEPAREN,OPENANGLEBRACKET:OPENANGLEBRACKET,CLOSEANGLEBRACKET:CLOSEANGLEBRACKET,FULLWIDTHLEFTPAREN:FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN:FULLWIDTHRIGHTPAREN,LEFTCORNERBRACKET:LEFTCORNERBRACKET,RIGHTCORNERBRACKET:RIGHTCORNERBRACKET,LEFTWHITECORNERBRACKET:LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET:RIGHTWHITECORNERBRACKET,FULLWIDTHLESSTHAN:FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN:FULLWIDTHGREATERTHAN,AMPERSAND:AMPERSAND,APOSTROPHE:APOSTROPHE,ASTERISK:ASTERISK,AT:AT,BACKSLASH:BACKSLASH,BACKTICK:BACKTICK,CARET:CARET,COLON:COLON,COMMA:COMMA,DOLLAR:DOLLAR,DOT:DOT,EQUALS:EQUALS,EXCLAMATION:EXCLAMATION,HYPHEN:HYPHEN,PERCENT:PERCENT,PIPE:PIPE,PLUS:PLUS,POUND:POUND,QUERY:QUERY,QUOTE:QUOTE,FULLWIDTHMIDDLEDOT:FULLWIDTHMIDDLEDOT,SEMI:SEMI,SLASH:SLASH,TILDE:TILDE,UNDERSCORE:UNDERSCORE,EMOJI:EMOJI$1,SYM:SYM});const ASCII_LETTER=/[a-z]/;const LETTER=new RegExp("\\p{L}","u");const EMOJI=new RegExp("\\p{Emoji}","u");const DIGIT=/\d/;const SPACE=/\s/;const CR="\r";const LF="\n";const EMOJI_VARIATION="️";const EMOJI_JOINER="";const OBJECT_REPLACEMENT="";let tlds=null,utlds=null;function init$2(customSchemes=[]){const groups={};State.groups=groups;const Start=new State;if(tlds==null){tlds=decodeTlds(encodedTlds)}if(utlds==null){utlds=decodeTlds(encodedUtlds)}tt(Start,"'",APOSTROPHE);tt(Start,"{",OPENBRACE);tt(Start,"}",CLOSEBRACE);tt(Start,"[",OPENBRACKET);tt(Start,"]",CLOSEBRACKET);tt(Start,"(",OPENPAREN);tt(Start,")",CLOSEPAREN);tt(Start,"<",OPENANGLEBRACKET);tt(Start,">",CLOSEANGLEBRACKET);tt(Start,"(",FULLWIDTHLEFTPAREN);tt(Start,")",FULLWIDTHRIGHTPAREN);tt(Start,"「",LEFTCORNERBRACKET);tt(Start,"」",RIGHTCORNERBRACKET);tt(Start,"『",LEFTWHITECORNERBRACKET);tt(Start,"』",RIGHTWHITECORNERBRACKET);tt(Start,"<",FULLWIDTHLESSTHAN);tt(Start,">",FULLWIDTHGREATERTHAN);tt(Start,"&",AMPERSAND);tt(Start,"*",ASTERISK);tt(Start,"@",AT);tt(Start,"`",BACKTICK);tt(Start,"^",CARET);tt(Start,":",COLON);tt(Start,",",COMMA);tt(Start,"$",DOLLAR);tt(Start,".",DOT);tt(Start,"=",EQUALS);tt(Start,"!",EXCLAMATION);tt(Start,"-",HYPHEN);tt(Start,"%",PERCENT);tt(Start,"|",PIPE);tt(Start,"+",PLUS);tt(Start,"#",POUND);tt(Start,"?",QUERY);tt(Start,'"',QUOTE);tt(Start,"/",SLASH);tt(Start,";",SEMI);tt(Start,"~",TILDE);tt(Start,"_",UNDERSCORE);tt(Start,"\\",BACKSLASH);tt(Start,"・",FULLWIDTHMIDDLEDOT);const Num=tr(Start,DIGIT,NUM,{[numeric]:true});tr(Num,DIGIT,Num);const Asciinumeric=tr(Num,ASCII_LETTER,ASCIINUMERICAL,{[asciinumeric]:true});const Alphanumeric=tr(Num,LETTER,ALPHANUMERICAL,{[alphanumeric]:true});const Word=tr(Start,ASCII_LETTER,WORD,{[ascii]:true});tr(Word,DIGIT,Asciinumeric);tr(Word,ASCII_LETTER,Word);tr(Asciinumeric,DIGIT,Asciinumeric);tr(Asciinumeric,ASCII_LETTER,Asciinumeric);const UWord=tr(Start,LETTER,UWORD,{[alpha]:true});tr(UWord,ASCII_LETTER);tr(UWord,DIGIT,Alphanumeric);tr(UWord,LETTER,UWord);tr(Alphanumeric,DIGIT,Alphanumeric);tr(Alphanumeric,ASCII_LETTER);tr(Alphanumeric,LETTER,Alphanumeric);const Nl2=tt(Start,LF,NL,{[whitespace$1]:true});const Cr=tt(Start,CR,WS,{[whitespace$1]:true});const Ws=tr(Start,SPACE,WS,{[whitespace$1]:true});tt(Start,OBJECT_REPLACEMENT,Ws);tt(Cr,LF,Nl2);tt(Cr,OBJECT_REPLACEMENT,Ws);tr(Cr,SPACE,Ws);tt(Ws,CR);tt(Ws,LF);tr(Ws,SPACE,Ws);tt(Ws,OBJECT_REPLACEMENT,Ws);const Emoji=tr(Start,EMOJI,EMOJI$1,{[emoji]:true});tt(Emoji,"#");tr(Emoji,EMOJI,Emoji);tt(Emoji,EMOJI_VARIATION,Emoji);const EmojiJoiner=tt(Emoji,EMOJI_JOINER);tt(EmojiJoiner,"#");tr(EmojiJoiner,EMOJI,Emoji);const wordjr=[[ASCII_LETTER,Word],[DIGIT,Asciinumeric]];const uwordjr=[[ASCII_LETTER,null],[LETTER,UWord],[DIGIT,Alphanumeric]];for(let i=0;i<tlds.length;i++){fastts(Start,tlds[i],TLD,WORD,wordjr)}for(let i=0;i<utlds.length;i++){fastts(Start,utlds[i],UTLD,UWORD,uwordjr)}addToGroups(TLD,{tld:true,ascii:true},groups);addToGroups(UTLD,{utld:true,alpha:true},groups);fastts(Start,"file",SCHEME,WORD,wordjr);fastts(Start,"mailto",SCHEME,WORD,wordjr);fastts(Start,"http",SLASH_SCHEME,WORD,wordjr);fastts(Start,"https",SLASH_SCHEME,WORD,wordjr);fastts(Start,"ftp",SLASH_SCHEME,WORD,wordjr);fastts(Start,"ftps",SLASH_SCHEME,WORD,wordjr);addToGroups(SCHEME,{scheme:true,ascii:true},groups);addToGroups(SLASH_SCHEME,{slashscheme:true,ascii:true},groups);customSchemes=customSchemes.sort(((a,b)=>a[0]>b[0]?1:-1));for(let i=0;i<customSchemes.length;i++){const sch=customSchemes[i][0];const optionalSlashSlash=customSchemes[i][1];const flags=optionalSlashSlash?{[scheme]:true}:{[slashscheme]:true};if(sch.indexOf("-")>=0){flags[domain]=true}else if(!ASCII_LETTER.test(sch)){flags[numeric]=true}else if(DIGIT.test(sch)){flags[asciinumeric]=true}else{flags[ascii]=true}ts(Start,sch,sch,flags)}ts(Start,"localhost",LOCALHOST,{ascii:true});Start.jd=new State(SYM);return{start:Start,tokens:assign$1({groups:groups},tk)}}function run$1(start,str){const iterable=stringToArray(str.replace(/[A-Z]/g,(c=>c.toLowerCase())));const charCount=iterable.length;const tokens=[];let cursor2=0;let charCursor=0;while(charCursor<charCount){let state=start;let nextState=null;let tokenLength=0;let latestAccepting=null;let sinceAccepts=-1;let charsSinceAccepts=-1;while(charCursor<charCount&&(nextState=state.go(iterable[charCursor]))){state=nextState;if(state.accepts()){sinceAccepts=0;charsSinceAccepts=0;latestAccepting=state}else if(sinceAccepts>=0){sinceAccepts+=iterable[charCursor].length;charsSinceAccepts++}tokenLength+=iterable[charCursor].length;cursor2+=iterable[charCursor].length;charCursor++}cursor2-=sinceAccepts;charCursor-=charsSinceAccepts;tokenLength-=sinceAccepts;tokens.push({t:latestAccepting.t,v:str.slice(cursor2-tokenLength,cursor2),s:cursor2-tokenLength,e:cursor2})}return tokens}function stringToArray(str){const result=[];const len=str.length;let index2=0;while(index2<len){let first2=str.charCodeAt(index2);let second;let char2=first2<55296||first2>56319||index2+1===len||(second=str.charCodeAt(index2+1))<56320||second>57343?str[index2]:str.slice(index2,index2+2);result.push(char2);index2+=char2.length}return result}function fastts(state,input,t,defaultt,jr){let next2;const len=input.length;for(let i=0;i<len-1;i++){const char2=input[i];if(state.j[char2]){next2=state.j[char2]}else{next2=new State(defaultt);next2.jr=jr.slice();state.j[char2]=next2}state=next2}next2=new State(t);next2.jr=jr.slice();state.j[input[len-1]]=next2;return next2}function decodeTlds(encoded){const words=[];const stack=[];let i=0;let digits="0123456789";while(i<encoded.length){let popDigitCount=0;while(digits.indexOf(encoded[i+popDigitCount])>=0){popDigitCount++}if(popDigitCount>0){words.push(stack.join(""));for(let popCount=parseInt(encoded.substring(i,i+popDigitCount),10);popCount>0;popCount--){stack.pop()}i+=popDigitCount}else{stack.push(encoded[i]);i++}}return words}const defaults={defaultProtocol:"http",events:null,format:noop$1,formatHref:noop$1,nl2br:false,tagName:"a",target:null,rel:null,validate:true,truncate:Infinity,className:null,attributes:null,ignoreTags:[],render:null};function Options(opts,defaultRender=null){let o=assign$1({},defaults);if(opts){o=assign$1(o,opts instanceof Options?opts.o:opts)}const ignoredTags=o.ignoreTags;const uppercaseIgnoredTags=[];for(let i=0;i<ignoredTags.length;i++){uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase())}this.o=o;if(defaultRender){this.defaultRender=defaultRender}this.ignoreTags=uppercaseIgnoredTags}Options.prototype={o:defaults,ignoreTags:[],defaultRender(ir){return ir},check(token2){return this.get("validate",token2.toString(),token2)},get(key,operator,token2){const isCallable=operator!=null;let option=this.o[key];if(!option){return option}if(typeof option==="object"){option=token2.t in option?option[token2.t]:defaults[key];if(typeof option==="function"&&isCallable){option=option(operator,token2)}}else if(typeof option==="function"&&isCallable){option=option(operator,token2.t,token2)}return option},getObj(key,operator,token2){let obj=this.o[key];if(typeof obj==="function"&&operator!=null){obj=obj(operator,token2.t,token2)}return obj},render(token2){const ir=token2.render(this);const renderFn=this.get("render",null,token2)||this.defaultRender;return renderFn(ir,token2.t,token2)}};function noop$1(val){return val}function MultiToken(value,tokens){this.t="token";this.v=value;this.tk=tokens}MultiToken.prototype={isLink:false,toString(){return this.v},toHref(scheme2){return this.toString()},toFormattedString(options2){const val=this.toString();const truncate=options2.get("truncate",val,this);const formatted=options2.get("format",val,this);return truncate&&formatted.length>truncate?formatted.substring(0,truncate)+"…":formatted},toFormattedHref(options2){return options2.get("formatHref",this.toHref(options2.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(protocol=defaults.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(protocol),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(options2){return{type:this.t,value:this.toFormattedString(options2),isLink:this.isLink,href:this.toFormattedHref(options2),start:this.startIndex(),end:this.endIndex()}},validate(options2){return options2.get("validate",this.toString(),this)},render(options2){const token2=this;const href=this.toHref(options2.get("defaultProtocol"));const formattedHref=options2.get("formatHref",href,this);const tagName=options2.get("tagName",href,token2);const content=this.toFormattedString(options2);const attributes={};const className=options2.get("className",href,token2);const target=options2.get("target",href,token2);const rel=options2.get("rel",href,token2);const attrs=options2.getObj("attributes",href,token2);const eventListeners=options2.getObj("events",href,token2);attributes.href=formattedHref;if(className){attributes.class=className}if(target){attributes.target=target}if(rel){attributes.rel=rel}if(attrs){assign$1(attributes,attrs)}return{tagName:tagName,attributes:attributes,content:content,eventListeners:eventListeners}}};function createTokenClass(type,props){class Token extends MultiToken{constructor(value,tokens){super(value,tokens);this.t=type}}for(const p in props){Token.prototype[p]=props[p]}Token.t=type;return Token}const Email=createTokenClass("email",{isLink:true,toHref(){return"mailto:"+this.toString()}});const Text=createTokenClass("text");const Nl=createTokenClass("nl");const Url=createTokenClass("url",{isLink:true,toHref(scheme2=defaults.defaultProtocol){return this.hasProtocol()?this.v:`${scheme2}://${this.v}`},hasProtocol(){const tokens=this.tk;return tokens.length>=2&&tokens[0].t!==LOCALHOST&&tokens[1].t===COLON}});const makeState=arg=>new State(arg);function init$1({groups:groups}){const qsAccepting=groups.domain.concat([AMPERSAND,ASTERISK,AT,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,NUM,PERCENT,PIPE,PLUS,POUND,SLASH,SYM,TILDE,UNDERSCORE]);const qsNonAccepting=[COLON,COMMA,DOT,EXCLAMATION,PERCENT,QUERY,QUOTE,SEMI,OPENANGLEBRACKET,CLOSEANGLEBRACKET,OPENBRACE,CLOSEBRACE,CLOSEBRACKET,OPENBRACKET,OPENPAREN,CLOSEPAREN,FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN,LEFTCORNERBRACKET,RIGHTCORNERBRACKET,LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET,FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN];const localpartAccepting=[AMPERSAND,APOSTROPHE,ASTERISK,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,OPENBRACE,CLOSEBRACE,PERCENT,PIPE,PLUS,POUND,QUERY,SLASH,SYM,TILDE,UNDERSCORE];const Start=makeState();const Localpart=tt(Start,TILDE);ta(Localpart,localpartAccepting,Localpart);ta(Localpart,groups.domain,Localpart);const Domain=makeState(),Scheme=makeState(),SlashScheme=makeState();ta(Start,groups.domain,Domain);ta(Start,groups.scheme,Scheme);ta(Start,groups.slashscheme,SlashScheme);ta(Domain,localpartAccepting,Localpart);ta(Domain,groups.domain,Domain);const LocalpartAt=tt(Domain,AT);tt(Localpart,AT,LocalpartAt);tt(Scheme,AT,LocalpartAt);tt(SlashScheme,AT,LocalpartAt);const LocalpartDot=tt(Localpart,DOT);ta(LocalpartDot,localpartAccepting,Localpart);ta(LocalpartDot,groups.domain,Localpart);const EmailDomain=makeState();ta(LocalpartAt,groups.domain,EmailDomain);ta(EmailDomain,groups.domain,EmailDomain);const EmailDomainDot=tt(EmailDomain,DOT);ta(EmailDomainDot,groups.domain,EmailDomain);const Email$1=makeState(Email);ta(EmailDomainDot,groups.tld,Email$1);ta(EmailDomainDot,groups.utld,Email$1);tt(LocalpartAt,LOCALHOST,Email$1);const EmailDomainHyphen=tt(EmailDomain,HYPHEN);tt(EmailDomainHyphen,HYPHEN,EmailDomainHyphen);ta(EmailDomainHyphen,groups.domain,EmailDomain);ta(Email$1,groups.domain,EmailDomain);tt(Email$1,DOT,EmailDomainDot);tt(Email$1,HYPHEN,EmailDomainHyphen);const EmailColon=tt(Email$1,COLON);ta(EmailColon,groups.numeric,Email);const DomainHyphen=tt(Domain,HYPHEN);const DomainDot=tt(Domain,DOT);tt(DomainHyphen,HYPHEN,DomainHyphen);ta(DomainHyphen,groups.domain,Domain);ta(DomainDot,localpartAccepting,Localpart);ta(DomainDot,groups.domain,Domain);const DomainDotTld=makeState(Url);ta(DomainDot,groups.tld,DomainDotTld);ta(DomainDot,groups.utld,DomainDotTld);ta(DomainDotTld,groups.domain,Domain);ta(DomainDotTld,localpartAccepting,Localpart);tt(DomainDotTld,DOT,DomainDot);tt(DomainDotTld,HYPHEN,DomainHyphen);tt(DomainDotTld,AT,LocalpartAt);const DomainDotTldColon=tt(DomainDotTld,COLON);const DomainDotTldColonPort=makeState(Url);ta(DomainDotTldColon,groups.numeric,DomainDotTldColonPort);const Url$1=makeState(Url);const UrlNonaccept=makeState();ta(Url$1,qsAccepting,Url$1);ta(Url$1,qsNonAccepting,UrlNonaccept);ta(UrlNonaccept,qsAccepting,Url$1);ta(UrlNonaccept,qsNonAccepting,UrlNonaccept);tt(DomainDotTld,SLASH,Url$1);tt(DomainDotTldColonPort,SLASH,Url$1);const SchemeColon=tt(Scheme,COLON);const SlashSchemeColon=tt(SlashScheme,COLON);const SlashSchemeColonSlash=tt(SlashSchemeColon,SLASH);const UriPrefix=tt(SlashSchemeColonSlash,SLASH);ta(Scheme,groups.domain,Domain);tt(Scheme,DOT,DomainDot);tt(Scheme,HYPHEN,DomainHyphen);ta(SlashScheme,groups.domain,Domain);tt(SlashScheme,DOT,DomainDot);tt(SlashScheme,HYPHEN,DomainHyphen);ta(SchemeColon,groups.domain,Url$1);tt(SchemeColon,SLASH,Url$1);tt(SchemeColon,QUERY,Url$1);ta(UriPrefix,groups.domain,Url$1);ta(UriPrefix,qsAccepting,Url$1);tt(UriPrefix,SLASH,Url$1);const bracketPairs=[[OPENBRACE,CLOSEBRACE],[OPENBRACKET,CLOSEBRACKET],[OPENPAREN,CLOSEPAREN],[OPENANGLEBRACKET,CLOSEANGLEBRACKET],[FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN],[LEFTCORNERBRACKET,RIGHTCORNERBRACKET],[LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET],[FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN]];for(let i=0;i<bracketPairs.length;i++){const[OPEN,CLOSE]=bracketPairs[i];const UrlOpen=tt(Url$1,OPEN);tt(UrlNonaccept,OPEN,UrlOpen);tt(UrlOpen,CLOSE,Url$1);const UrlOpenQ=makeState(Url);ta(UrlOpen,qsAccepting,UrlOpenQ);const UrlOpenSyms=makeState();ta(UrlOpen,qsNonAccepting);ta(UrlOpenQ,qsAccepting,UrlOpenQ);ta(UrlOpenQ,qsNonAccepting,UrlOpenSyms);ta(UrlOpenSyms,qsAccepting,UrlOpenQ);ta(UrlOpenSyms,qsNonAccepting,UrlOpenSyms);tt(UrlOpenQ,CLOSE,Url$1);tt(UrlOpenSyms,CLOSE,Url$1)}tt(Start,LOCALHOST,DomainDotTld);tt(Start,NL,Nl);return{start:Start,tokens:tk}}function run(start,input,tokens){let len=tokens.length;let cursor2=0;let multis=[];let textTokens=[];while(cursor2<len){let state=start;let secondState=null;let nextState=null;let multiLength=0;let latestAccepting=null;let sinceAccepts=-1;while(cursor2<len&&!(secondState=state.go(tokens[cursor2].t))){textTokens.push(tokens[cursor2++])}while(cursor2<len&&(nextState=secondState||state.go(tokens[cursor2].t))){secondState=null;state=nextState;if(state.accepts()){sinceAccepts=0;latestAccepting=state}else if(sinceAccepts>=0){sinceAccepts++}cursor2++;multiLength++}if(sinceAccepts<0){cursor2-=multiLength;if(cursor2<len){textTokens.push(tokens[cursor2]);cursor2++}}else{if(textTokens.length>0){multis.push(initMultiToken(Text,input,textTokens));textTokens=[]}cursor2-=sinceAccepts;multiLength-=sinceAccepts;const Multi=latestAccepting.t;const subtokens=tokens.slice(cursor2-multiLength,cursor2);multis.push(initMultiToken(Multi,input,subtokens))}}if(textTokens.length>0){multis.push(initMultiToken(Text,input,textTokens))}return multis}function initMultiToken(Multi,input,tokens){const startIdx=tokens[0].s;const endIdx=tokens[tokens.length-1].e;const value=input.slice(startIdx,endIdx);return new Multi(value,tokens)}const warn=typeof console!=="undefined"&&console&&console.warn||(()=>{});const warnAdvice="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.";const INIT={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:false};function reset(){State.groups={};INIT.scanner=null;INIT.parser=null;INIT.tokenQueue=[];INIT.pluginQueue=[];INIT.customSchemes=[];INIT.initialized=false;return INIT}function registerCustomProtocol(scheme2,optionalSlashSlash=false){if(INIT.initialized){warn(`linkifyjs: already initialized - will not register custom scheme "${scheme2}" ${warnAdvice}`)}if(!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme2)){throw new Error(`linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat`)}INIT.customSchemes.push([scheme2,optionalSlashSlash])}function init(){INIT.scanner=init$2(INIT.customSchemes);for(let i=0;i<INIT.tokenQueue.length;i++){INIT.tokenQueue[i][1]({scanner:INIT.scanner})}INIT.parser=init$1(INIT.scanner.tokens);for(let i=0;i<INIT.pluginQueue.length;i++){INIT.pluginQueue[i][1]({scanner:INIT.scanner,parser:INIT.parser})}INIT.initialized=true;return INIT}function tokenize(str){if(!INIT.initialized){init()}return run(INIT.parser.start,str,run$1(INIT.scanner.start,str))}tokenize.scan=run$1;function find(str,type=null,opts=null){if(type&&typeof type==="object"){if(opts){throw Error(`linkifyjs: Invalid link type ${type}; must be a string`)}opts=type;type=null}const options2=new Options(opts);const tokens=tokenize(str);const filtered=[];for(let i=0;i<tokens.length;i++){const token2=tokens[i];if(token2.isLink&&(!type||token2.t===type)&&options2.check(token2)){filtered.push(token2.toFormattedObject(options2))}}return filtered}function isValidLinkStructure(tokens){if(tokens.length===1){return tokens[0].isLink}if(tokens.length===3&&tokens[1].isLink){return["()","[]"].includes(tokens[0].value+tokens[2].value)}return false}function autolink(options2){return new Plugin({key:new PluginKey("autolink"),appendTransaction:(transactions,oldState,newState)=>{const docChanges=transactions.some((transaction=>transaction.docChanged))&&!oldState.doc.eq(newState.doc);const preventAutolink=transactions.some((transaction=>transaction.getMeta("preventAutolink")));if(!docChanges||preventAutolink){return}const{tr:tr2}=newState;const transform=combineTransactionSteps(oldState.doc,[...transactions]);const changes=getChangedRanges(transform);changes.forEach((({newRange:newRange})=>{const nodesInChangedRanges=findChildrenInRange(newState.doc,newRange,(node2=>node2.isTextblock));let textBlock;let textBeforeWhitespace;if(nodesInChangedRanges.length>1){textBlock=nodesInChangedRanges[0];textBeforeWhitespace=newState.doc.textBetween(textBlock.pos,textBlock.pos+textBlock.node.nodeSize,void 0," ")}else if(nodesInChangedRanges.length&&newState.doc.textBetween(newRange.from,newRange.to," "," ").endsWith(" ")){textBlock=nodesInChangedRanges[0];textBeforeWhitespace=newState.doc.textBetween(textBlock.pos,newRange.to,void 0," ")}if(textBlock&&textBeforeWhitespace){const wordsBeforeWhitespace=textBeforeWhitespace.split(" ").filter((s=>s!==""));if(wordsBeforeWhitespace.length<=0){return false}const lastWordBeforeSpace=wordsBeforeWhitespace[wordsBeforeWhitespace.length-1];const lastWordAndBlockOffset=textBlock.pos+textBeforeWhitespace.lastIndexOf(lastWordBeforeSpace);if(!lastWordBeforeSpace){return false}const linksBeforeSpace=tokenize(lastWordBeforeSpace).map((t=>t.toObject(options2.defaultProtocol)));if(!isValidLinkStructure(linksBeforeSpace)){return false}linksBeforeSpace.filter((link=>link.isLink)).map((link=>({...link,from:lastWordAndBlockOffset+link.start+1,to:lastWordAndBlockOffset+link.end+1}))).filter((link=>{if(!newState.schema.marks.code){return true}return!newState.doc.rangeHasMark(link.from,link.to,newState.schema.marks.code)})).filter((link=>options2.validate(link.value))).filter((link=>options2.shouldAutoLink(link.value))).forEach((link=>{if(getMarksBetween(link.from,link.to,newState.doc).some((item=>item.mark.type===options2.type))){return}tr2.addMark(link.from,link.to,options2.type.create({href:link.href}))}))}}));if(!tr2.steps.length){return}return tr2}})}function clickHandler(options2){return new Plugin({key:new PluginKey("handleClickLink"),props:{handleClick:(view,pos,event2)=>{var _a,_b;if(event2.button!==0){return false}if(!view.editable){return false}let a=event2.target;const els=[];while(a.nodeName!=="DIV"){els.push(a);a=a.parentNode}if(!els.find((value=>value.nodeName==="A"))){return false}const attrs=getAttributes(view.state,options2.type.name);const link=event2.target;const href=(_a=link===null||link===void 0?void 0:link.href)!==null&&_a!==void 0?_a:attrs.href;const target=(_b=link===null||link===void 0?void 0:link.target)!==null&&_b!==void 0?_b:attrs.target;if(link&&href){window.open(href,target);return true}return false}}})}function pasteHandler(options2){return new Plugin({key:new PluginKey("handlePasteLink"),props:{handlePaste:(view,event2,slice3)=>{const{state:state}=view;const{selection:selection}=state;const{empty:empty2}=selection;if(empty2){return false}let textContent="";slice3.content.forEach((node2=>{textContent+=node2.textContent}));const link=find(textContent,{defaultProtocol:options2.defaultProtocol}).find((item=>item.isLink&&item.value===textContent));if(!textContent||!link){return false}return options2.editor.commands.setMark(options2.type,{href:link.href})}}})}const ATTR_WHITESPACE=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function isAllowedUri(uri,protocols){const allowedProtocols=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];if(protocols){protocols.forEach((protocol=>{const nextProtocol=typeof protocol==="string"?protocol:protocol.scheme;if(nextProtocol){allowedProtocols.push(nextProtocol)}}))}return!uri||uri.replace(ATTR_WHITESPACE,"").match(new RegExp(`^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Link=Mark2.create({name:"link",priority:1e3,keepOnSplit:false,exitable:true,onCreate(){if(this.options.validate&&!this.options.shouldAutoLink){this.options.shouldAutoLink=this.options.validate;console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")}this.options.protocols.forEach((protocol=>{if(typeof protocol==="string"){registerCustomProtocol(protocol);return}registerCustomProtocol(protocol.scheme,protocol.optionalSlashes)}))},onDestroy(){reset()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:true,linkOnPaste:true,autolink:true,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(url,ctx)=>!!isAllowedUri(url,ctx.protocols),validate:url=>!!url,shouldAutoLink:url=>!!url}},addAttributes(){return{href:{default:null,parseHTML(element){return element.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:dom=>{const href=dom.getAttribute("href");if(!href||!this.options.isAllowedUri(href,{defaultValidate:url=>!!isAllowedUri(url,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})){return false}return null}}]},renderHTML({HTMLAttributes:HTMLAttributes}){if(!this.options.isAllowedUri(HTMLAttributes.href,{defaultValidate:href=>!!isAllowedUri(href,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})){return["a",mergeAttributes(this.options.HTMLAttributes,{...HTMLAttributes,href:""}),0]}return["a",mergeAttributes(this.options.HTMLAttributes,HTMLAttributes),0]},addCommands(){return{setLink:attributes=>({chain:chain})=>{const{href:href}=attributes;if(!this.options.isAllowedUri(href,{defaultValidate:url=>!!isAllowedUri(url,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})){return false}return chain().setMark(this.name,attributes).setMeta("preventAutolink",true).run()},toggleLink:attributes=>({chain:chain})=>{const{href:href}=attributes;if(!this.options.isAllowedUri(href,{defaultValidate:url=>!!isAllowedUri(url,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})){return false}return chain().toggleMark(this.name,attributes,{extendEmptyMarkRange:true}).setMeta("preventAutolink",true).run()},unsetLink:()=>({chain:chain})=>chain().unsetMark(this.name,{extendEmptyMarkRange:true}).setMeta("preventAutolink",true).run()}},addPasteRules(){return[markPasteRule({find:text=>{const foundLinks=[];if(text){const{protocols:protocols,defaultProtocol:defaultProtocol}=this.options;const links=find(text).filter((item=>item.isLink&&this.options.isAllowedUri(item.value,{defaultValidate:href=>!!isAllowedUri(href,protocols),protocols:protocols,defaultProtocol:defaultProtocol})));if(links.length){links.forEach((link=>foundLinks.push({text:link.value,data:{href:link.href},index:link.start})))}}return foundLinks},type:this.type,getAttributes:match2=>{var _a;return{href:(_a=match2.data)===null||_a===void 0?void 0:_a.href}}})]},addProseMirrorPlugins(){const plugins=[];const{protocols:protocols,defaultProtocol:defaultProtocol}=this.options;if(this.options.autolink){plugins.push(autolink({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:url=>this.options.isAllowedUri(url,{defaultValidate:href=>!!isAllowedUri(href,protocols),protocols:protocols,defaultProtocol:defaultProtocol}),shouldAutoLink:this.options.shouldAutoLink}))}if(this.options.openOnClick===true){plugins.push(clickHandler({type:this.type}))}if(this.options.linkOnPaste){plugins.push(pasteHandler({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type}))}return plugins}});const inlineFocus=()=>{const trixEditorElement=event.target;const trixEditorContainer=trixEditorElement.closest(".pb_rich_text_editor_kit");if(!trixEditorContainer.classList.contains("inline"))return;trixEditorContainer.classList.toggle("focused")};const useFocus=()=>{const allTrixEditors=document.querySelectorAll(".focus-editor-targets trix-editor");allTrixEditors.forEach((editorElement=>{const toolbarElement=editorElement.toolbarElement;if(editorElement==document.activeElement){editorElement.classList.add("focused-editor");toolbarElement.style.display="block"}else{if(!toolbarElement.contains(document.activeElement)){editorElement.classList.remove("focused-editor");toolbarElement.style.display="none"}}}))};if(window==null?void 0:window.customElements){const customElemDef=window.customElements.define;window.customElements.define=(name,cl,conf)=>{if(!customElements.get(name))customElemDef.call(window.customElements,name,cl,conf)}}const EditorButton=({classname:classname,disable:disable,onclick:onclick,icon:icon,text:text})=>jsx$1(Tooltip,{delay:{open:2e3},interaction:true,placement:"top",text:text,children:jsx$1("button",{className:classname,disabled:disable,onClick:onclick,role:"button",type:"button",children:jsx$1(Flex,{align:"center",className:"toolbar_button_icon",justify:"center",children:jsx$1(Icon,{icon:icon,size:"lg"})})})});const ToolbarDropdown=({editor:editor})=>{const[showPopover,setShowPopover]=useState(false);const toolbarDropdownItems=[{node:"paragraph",icon:"paragraph",isActive:editor.isActive("paragraph"),text:"Paragraph",onclick:()=>editor.chain().focus().setParagraph().run()},{node:"heading-1",icon:"h1",isActive:editor.isActive("heading",{level:1}),text:"Heading 1",onclick:()=>editor.chain().focus().toggleHeading({level:1}).run()},{node:"heading-2",icon:"h2",isActive:editor.isActive("heading",{level:2}),text:"Heading 2",onclick:()=>editor.chain().focus().toggleHeading({level:2}).run()},{node:"heading-3",icon:"h3",isActive:editor.isActive("heading",{level:3}),text:"Heading 3",onclick:()=>editor.chain().focus().toggleHeading({level:3}).run()},{node:"bulletList",icon:"list",isActive:editor.isActive("bulletList"),text:"Bullet List",onclick:()=>editor.chain().focus().toggleBulletList().run()},{node:"orderedList",icon:"list-ol",isActive:editor.isActive("orderedList"),text:"Ordered List",onclick:()=>editor.chain().focus().toggleOrderedList().run()},{node:"blockquote",icon:"block-quote",isActive:editor.isActive("blockquote"),text:"Block Quote",onclick:()=>editor.chain().focus().toggleBlockquote().run()}];const angleDown=getAllIcons()["angleDown"].icon;const handleTogglePopover=()=>{setShowPopover(!showPopover)};const handlePopoverClose=shouldClosePopover=>{setShowPopover(!shouldClosePopover)};let activeCount=0;const activeItems=[];for(const{text:text,isActive:isActive2,icon:icon}of toolbarDropdownItems){if(isActive2){activeCount++;activeItems.push(jsxs(Flex,{align:"center",gap:"xs",children:[jsx$1(Icon,{icon:icon,size:"lg"}),jsx$1("div",{children:text}),jsx$1(Flex,{className:showPopover?"fa-flip-vertical":"",display:"inline_flex",children:jsx$1(Icon,{className:"svg-inline--fa",customIcon:angleDown,fixedWidth:true,"margin-left":"xs"})})]},icon))}}const popoverReference=jsx$1(Button,{className:"editor-dropdown-button",onClick:handleTogglePopover,variant:"secondary",children:activeCount===2?activeItems[1]:activeCount===1?activeItems[0]||null:jsxs(Flex,{align:"center",gap:"xs",children:[jsx$1(Icon,{icon:"paragraph",size:"lg"}),jsx$1("div",{children:"Paragraph"}),jsx$1(Flex,{className:showPopover?"fa-flip-vertical":"",display:"inline_flex",children:jsx$1(Icon,{className:"svg-inline--fa",customIcon:angleDown,fixedWidth:true,"margin-left":"xs"})})]},"paragraph")});return jsx$1(PbReactPopover,{className:"pb_tiptap_toolbar_dropdown_popover",closeOnClick:"outside",padding:"none",placement:"bottom",reference:popoverReference,shouldClosePopover:handlePopoverClose,show:showPopover,children:jsx$1(Nav,{paddingBottom:"xs",paddingTop:"xs",variant:"subtle",children:toolbarDropdownItems.map((({icon:icon,text:text,onclick:onclick,isActive:isActive2},index2)=>jsx$1(NavItem,{className:`pb_tiptap_toolbar_dropdown_list_item ${isActive2?"is-active":""}`,cursor:"pointer",iconLeft:icon,margin:"none",onClick:()=>{onclick();setShowPopover(false)},paddingBottom:"xxs",paddingTop:"xxs",text:text},`${text}_${index2}`)))})})};const ToolbarNodes=({editor:editor})=>{const setLink=useCallback((()=>{const previousUrl=editor.getAttributes("link").href;const url=window.prompt("URL",previousUrl);if(url===null){return}if(url===""){editor.chain().focus().extendMarkRange("link").unsetLink().run();return}editor.chain().focus().extendMarkRange("link").setLink({href:url}).run()}),[editor]);const toolbarNodesItems=[{onclick:()=>editor.chain().focus().toggleCodeBlock().run(),icon:"code",isActive:editor.isActive("codeBlock"),text:"Codeblock"},{onclick:setLink,icon:"link",isActive:editor.isActive("link"),text:"Link"}];return jsx$1(Fragment$1,{children:toolbarNodesItems.map((({onclick:onclick,icon:icon,text:text,isActive:isActive2},index2)=>jsx$1(EditorButton,{classname:`toolbar_button ${isActive2?"is-active":""}`,icon:icon,onclick:onclick,text:text},index2)))})};const ToolbarHistoryItems=({editor:editor})=>{const toolbarHistoryItems=[{classname:`toolbar_button`,icon:"undo",text:"Undo",onclick:()=>editor.chain().focus().undo().run(),disable:!editor.can().chain().focus().undo().run()},{classname:`toolbar_button`,icon:"redo",text:"Redo",onclick:()=>editor.chain().focus().redo().run(),disable:!editor.can().chain().focus().redo().run()}];return jsx$1(Fragment$1,{children:jsx$1(FlexItem,{displayFlex:true,children:toolbarHistoryItems.map((({onclick:onclick,classname:classname,disable:disable,icon:icon,text:text},index2)=>jsx$1(EditorButton,{classname:classname,disable:disable,icon:icon,onclick:onclick,text:text},index2)))})})};const MoreExtensionsDropdown=({extensions:extensions})=>{const[showPopover,setShowPopover]=useState(false);const handleTogglePopover=()=>{setShowPopover(!showPopover)};const handlePopoverClose=shouldClosePopover=>{setShowPopover(!shouldClosePopover)};const popoverReference=jsx$1("button",{className:"toolbar_button",onClick:handleTogglePopover,role:"button",type:"button",children:jsx$1(Flex,{align:"center",className:"toolbar_button_icon",justify:"center",children:jsx$1(Icon,{icon:"ellipsis",size:"lg"})})});return jsx$1(PbReactPopover,{closeOnClick:"outside",padding:"none",placement:"bottom",reference:popoverReference,shouldClosePopover:handlePopoverClose,show:showPopover,children:jsx$1(Nav,{paddingBottom:extensions.length>1?"xs":"none",paddingTop:extensions.length>1?"xs":"none",variant:"subtle",children:extensions&&extensions.map((({icon:icon,text:text,onclick:onclick,isActive:isActive2},index2)=>jsx$1(NavItem,{className:`pb_tiptap_toolbar_dropdown_list_item ${isActive2?"is-active":""}`,cursor:"pointer",iconLeft:icon,margin:"none",onClick:()=>{onclick();setShowPopover(false)},paddingBottom:"xxs",paddingTop:"xxs",text:text},`${text}_${index2}`)))})})};const EditorToolbar=({editor:editor,extensions:extensions,simple:simple,sticky:sticky})=>{const toolbaritems=[{icon:"bold",text:"Bold",classname:`toolbar_button ${editor.isActive("bold")?"is-active":""}`,onclick:()=>editor.chain().focus().toggleBold().run()},{icon:"italic",text:"Italic",classname:`toolbar_button ${editor.isActive("italic")?"is-active":""}`,onclick:()=>editor.chain().focus().toggleItalic().run()},{icon:"strikethrough",text:"Strikethrough",classname:`toolbar_button ${editor.isActive("strike")?"is-active":""}`,onclick:()=>editor.chain().focus().toggleStrike().run()}];const simpleToolbaritems=[{icon:"bold",text:"Bold",classname:`toolbar_button ${editor.isActive("bold")?"is-active":""}`,onclick:()=>editor.chain().focus().toggleBold().run()},{icon:"italic",text:"Italic",classname:`toolbar_button ${editor.isActive("italic")?"is-active":""}`,onclick:()=>editor.chain().focus().toggleItalic().run()}];return jsx$1(Background,{backgroundColor:"white",className:`toolbar ${sticky?"pb_rich_text_editor_tiptap_toolbar_sticky":""}`,children:jsx$1(Flex,{flex:"0",justify:"between",paddingX:"sm",paddingY:"xxs",children:simple?jsx$1(Fragment$1,{children:jsx$1(Flex,{className:"toolbar_block",children:simpleToolbaritems&&simpleToolbaritems.map((({icon:icon,text:text,classname:classname,onclick:onclick},index2)=>jsx$1(EditorButton,{classname:classname,icon:icon,onclick:onclick,text:text},index2)))})}):jsxs(Fragment$1,{children:[jsxs(FlexItem,{className:"toolbar_block",displayFlex:true,children:[jsx$1(ToolbarDropdown,{editor:editor}),jsx$1(SectionSeparator,{orientation:"vertical"}),toolbaritems&&toolbaritems.map((({icon:icon,text:text,classname:classname,onclick:onclick},index2)=>jsx$1(EditorButton,{classname:classname,icon:icon,onclick:onclick,text:text},index2))),jsx$1(SectionSeparator,{orientation:"vertical"}),jsx$1(ToolbarNodes,{editor:editor}),extensions&&extensions.length>0&&jsx$1(Fragment$1,{children:jsx$1(MoreExtensionsDropdown,{extensions:extensions})})]}),jsx$1(ToolbarHistoryItems,{editor:editor})]})})})};Trix.config.textAttributes.inlineCode={tagName:"code",inheritable:true};const RichTextEditor=props=>{const{aria:aria={},advancedEditor:advancedEditor,railsAdvancedEditor:railsAdvancedEditor,advancedEditorToolbar:advancedEditorToolbar=true,toolbarBottom:toolbarBottom=false,children:children,className:className,data:data={},focus:focus2=false,htmlOptions:htmlOptions={},inputOptions:inputOptions={},inline:inline=false,extensions:extensions,name:name,onChange:onChange2=noop$2,placeholder:placeholder,simple:simple=false,sticky:sticky=false,template:template="",value:value="",maxWidth:maxWidth="md",tipTapOptions:tipTapOptions={}}=props;const ariaProps=buildAriaProps(aria),dataProps=buildDataProps(data),[editor,setEditor]=useState(),[showToolbarOnFocus,setShowToolbarOnFocus]=useState(false),containerRef=useRef(null);const buildExtensions=extensionNames=>{const defaultExtensions=[StarterKit,Link];if(!extensionNames||extensionNames.length===0){return defaultExtensions}return defaultExtensions};const internalDependencyTiptapEditor=useEditor({extensions:buildExtensions(tipTapOptions==null?void 0:tipTapOptions.extensions),content:value||"",onUpdate:({editor:editor2})=>{const html=editor2.getHTML();const text=editor2.getText();onChange2(html,text);if(railsAdvancedEditor){const hiddenInput=document.getElementById(`hidden-input-${props.id||"rich-text-editor"}`);if(hiddenInput){hiddenInput.value=html??""}}}},[railsAdvancedEditor]);const currentEditor=railsAdvancedEditor?internalDependencyTiptapEditor:advancedEditor;const htmlProps=buildHtmlProps(htmlOptions);const handleOnEditorReady=editorInstance=>{setEditor(editorInstance);setTimeout((()=>{const oldId=editorInstance.element.getAttribute("input");if(oldId){const hiddenInput=document.getElementById(oldId);if(hiddenInput){const newId=inputOptions.id||oldId;hiddenInput.id=newId;editorInstance.element.setAttribute("input",newId);if(inputOptions.name){hiddenInput.setAttribute("name",inputOptions.name)}}}}))};if(editor&&editor.element){const toolbarElement=editor.element.parentElement.querySelector("trix-toolbar"),blockCodeButton=toolbarElement.querySelector("[data-trix-attribute=code]");let inlineCodeButton=toolbarElement.querySelector("[data-trix-attribute=inlineCode]");if(!inlineCodeButton){inlineCodeButton=blockCodeButton.cloneNode(true);blockCodeButton.hidden=true;inlineCodeButton.dataset.trixAttribute="inlineCode";blockCodeButton.insertAdjacentElement("afterend",inlineCodeButton)}if(toolbarBottom)editor.element.after(toolbarElement);focus2?(document.addEventListener("trix-focus",useFocus),document.addEventListener("trix-blur",useFocus),useFocus()):null;document.addEventListener("trix-focus",inlineFocus);document.addEventListener("trix-blur",inlineFocus)}const isClickInPopover=event2=>!!event2.target.closest(".pb_tiptap_toolbar_dropdown_popover");const isClickInContainer=event2=>!!(containerRef.current&&containerRef.current.contains(event2.target));useEffect((()=>{var _a;if(!currentEditor||!focus2)return;const handleFocus=()=>setShowToolbarOnFocus(true);const handleClickOutside=event2=>{if(isClickInContainer(event2)||isClickInPopover(event2))return;setShowToolbarOnFocus(false)};const editorElement=(_a=currentEditor==null?void 0:currentEditor.view)==null?void 0:_a.dom;if(editorElement){editorElement.addEventListener("focus",handleFocus)}document.addEventListener("mousedown",handleClickOutside);return()=>{if(editorElement){editorElement.removeEventListener("focus",handleFocus)}document.removeEventListener("mousedown",handleClickOutside)}}),[currentEditor,focus2]);useEffect((()=>{if(!editor||!template)return;editor.loadHTML("");editor.setSelectedRange([0,0]);editor.insertHTML(template)}),[editor,template]);useEffect((()=>{if(!(editor==null?void 0:editor.element))return;editor.element.addEventListener("click",(({target:target})=>{const trixEditorContainer=target.closest(".pb_rich_text_editor_kit");if(!trixEditorContainer)return;const anchorElement=target.closest("a");if(!anchorElement)return;if(anchorElement.hasAttribute("href"))window.open(anchorElement.href)}))}),[editor]);const css4=classnames("pb_rich_text_editor_kit",{simple:simple,"focus-editor-targets":focus2,sticky:sticky,inline:inline,"toolbar-bottom":toolbarBottom},globalProps(props,{maxWidth:maxWidth}),className);const shouldShowToolbar=focus2&¤tEditor?showToolbarOnFocus:advancedEditorToolbar;return jsx$1("div",{...ariaProps,...dataProps,...htmlProps,className:css4,ref:focus2?containerRef:void 0,children:currentEditor?jsxs("div",{className:classnames("pb_rich_text_editor_advanced_container",{["toolbar-active"]:shouldShowToolbar}),children:[shouldShowToolbar&&jsx$1(EditorToolbar,{editor:currentEditor,extensions:extensions,simple:simple,sticky:sticky}),railsAdvancedEditor?jsx$1(EditorContent,{editor:currentEditor}):jsx$1(Fragment$1,{children:children}),railsAdvancedEditor&&jsx$1("input",{id:`hidden-input-${props.id||"rich-text-editor"}`,name:name||"content",type:"hidden",value:(currentEditor==null?void 0:currentEditor.getHTML())??""})]}):jsx$1(TrixEditor,{className:"",fileParamName:name,mergeTags:[],onChange:onChange2,onEditorReady:handleOnEditorReady,placeholder:placeholder,value:value})})};function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o2){return typeof o2}:function(o2){return o2&&"function"==typeof Symbol&&o2.constructor===Symbol&&o2!==Symbol.prototype?"symbol":typeof o2},_typeof(o)}function toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function toPropertyKey(t){var i=toPrimitive(t,"string");return"symbol"==_typeof(i)?i:String(i)}function _defineProperty(obj,key,value){key=toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),true).forEach((function(r2){_defineProperty(e,r2,t[r2])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))}))}return e}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=true,o=false;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=false}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=true);}catch(r2){o=true,n=r2}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}var _excluded$6=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function useStateManager(_ref3){var _ref$defaultInputValu=_ref3.defaultInputValue,defaultInputValue=_ref$defaultInputValu===void 0?"":_ref$defaultInputValu,_ref$defaultMenuIsOpe=_ref3.defaultMenuIsOpen,defaultMenuIsOpen=_ref$defaultMenuIsOpe===void 0?false:_ref$defaultMenuIsOpe,_ref$defaultValue=_ref3.defaultValue,defaultValue=_ref$defaultValue===void 0?null:_ref$defaultValue,propsInputValue=_ref3.inputValue,propsMenuIsOpen=_ref3.menuIsOpen,propsOnChange=_ref3.onChange,propsOnInputChange=_ref3.onInputChange,propsOnMenuClose=_ref3.onMenuClose,propsOnMenuOpen=_ref3.onMenuOpen,propsValue=_ref3.value,restSelectProps=_objectWithoutProperties(_ref3,_excluded$6);var _useState=useState(propsInputValue!==void 0?propsInputValue:defaultInputValue),_useState2=_slicedToArray(_useState,2),stateInputValue=_useState2[0],setStateInputValue=_useState2[1];var _useState3=useState(propsMenuIsOpen!==void 0?propsMenuIsOpen:defaultMenuIsOpen),_useState4=_slicedToArray(_useState3,2),stateMenuIsOpen=_useState4[0],setStateMenuIsOpen=_useState4[1];var _useState5=useState(propsValue!==void 0?propsValue:defaultValue),_useState6=_slicedToArray(_useState5,2),stateValue=_useState6[0],setStateValue=_useState6[1];var onChange2=useCallback((function(value2,actionMeta){if(typeof propsOnChange==="function"){propsOnChange(value2,actionMeta)}setStateValue(value2)}),[propsOnChange]);var onInputChange=useCallback((function(value2,actionMeta){var newValue;if(typeof propsOnInputChange==="function"){newValue=propsOnInputChange(value2,actionMeta)}setStateInputValue(newValue!==void 0?newValue:value2)}),[propsOnInputChange]);var onMenuOpen=useCallback((function(){if(typeof propsOnMenuOpen==="function"){propsOnMenuOpen()}setStateMenuIsOpen(true)}),[propsOnMenuOpen]);var onMenuClose=useCallback((function(){if(typeof propsOnMenuClose==="function"){propsOnMenuClose()}setStateMenuIsOpen(false)}),[propsOnMenuClose]);var inputValue=propsInputValue!==void 0?propsInputValue:stateInputValue;var menuIsOpen=propsMenuIsOpen!==void 0?propsMenuIsOpen:stateMenuIsOpen;var value=propsValue!==void 0?propsValue:stateValue;return _objectSpread2(_objectSpread2({},restSelectProps),{},{inputValue:inputValue,menuIsOpen:menuIsOpen,onChange:onChange2,onInputChange:onInputChange,onMenuClose:onMenuClose,onMenuOpen:onMenuOpen,value:value})}function _extends(){_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};return _extends.apply(this,arguments)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf2(o2,p2){o2.__proto__=p2;return o2};return _setPrototypeOf(o,p)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf2(o2){return o2.__proto__||Object.getPrototypeOf(o2)};return _getPrototypeOf(o)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t2){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct2(){return!!t})()}function _assertThisInitialized(self2){if(self2===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self2}function _possibleConstructorReturn(self2,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self2)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function sheetForTag(tag){if(tag.sheet){return tag.sheet}for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].ownerNode===tag){return document.styleSheets[i]}}}function createStyleElement(options2){var tag=document.createElement("style");tag.setAttribute("data-emotion",options2.key);if(options2.nonce!==void 0){tag.setAttribute("nonce",options2.nonce)}tag.appendChild(document.createTextNode(""));tag.setAttribute("data-s","");return tag}var StyleSheet=function(){function StyleSheet2(options2){var _this=this;this._insertTag=function(tag){var before;if(_this.tags.length===0){if(_this.insertionPoint){before=_this.insertionPoint.nextSibling}else if(_this.prepend){before=_this.container.firstChild}else{before=_this.before}}else{before=_this.tags[_this.tags.length-1].nextSibling}_this.container.insertBefore(tag,before);_this.tags.push(tag)};this.isSpeedy=options2.speedy===void 0?true:options2.speedy;this.tags=[];this.ctr=0;this.nonce=options2.nonce;this.key=options2.key;this.container=options2.container;this.prepend=options2.prepend;this.insertionPoint=options2.insertionPoint;this.before=null}var _proto=StyleSheet2.prototype;_proto.hydrate=function hydrate(nodes){nodes.forEach(this._insertTag)};_proto.insert=function insert(rule){if(this.ctr%(this.isSpeedy?65e3:1)===0){this._insertTag(createStyleElement(this))}var tag=this.tags[this.tags.length-1];if(this.isSpeedy){var sheet=sheetForTag(tag);try{sheet.insertRule(rule,sheet.cssRules.length)}catch(e){}}else{tag.appendChild(document.createTextNode(rule))}this.ctr++};_proto.flush=function flush(){this.tags.forEach((function(tag){return tag.parentNode&&tag.parentNode.removeChild(tag)}));this.tags=[];this.ctr=0};return StyleSheet2}();var MS="-ms-";var MOZ="-moz-";var WEBKIT="-webkit-";var COMMENT="comm";var RULESET="rule";var DECLARATION="decl";var IMPORT="@import";var KEYFRAMES="@keyframes";var LAYER="@layer";var abs=Math.abs;var from2=String.fromCharCode;var assign=Object.assign;function hash(value,length2){return charat(value,0)^45?(((length2<<2^charat(value,0))<<2^charat(value,1))<<2^charat(value,2))<<2^charat(value,3):0}function trim(value){return value.trim()}function match(value,pattern){return(value=pattern.exec(value))?value[0]:value}function replace(value,pattern,replacement){return value.replace(pattern,replacement)}function indexof(value,search){return value.indexOf(search)}function charat(value,index2){return value.charCodeAt(index2)|0}function substr(value,begin,end){return value.slice(begin,end)}function strlen(value){return value.length}function sizeof(value){return value.length}function append2(value,array){return array.push(value),value}function combine(array,callback){return array.map(callback).join("")}var line=1;var column=1;var length=0;var position=0;var character=0;var characters="";function node(value,root,parent,type,props,children,length2){return{value:value,root:root,parent:parent,type:type,props:props,children:children,line:line,column:column,length:length2,return:""}}function copy(root,props){return assign(node("",null,null,"",null,null,0),root,{length:-root.length},props)}function char(){return character}function prev(){character=position>0?charat(characters,--position):0;if(column--,character===10)column=1,line--;return character}function next(){character=position<length?charat(characters,position++):0;if(column++,character===10)column=1,line++;return character}function peek(){return charat(characters,position)}function caret(){return position}function slice2(begin,end){return substr(characters,begin,end)}function token(type){switch(type){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(value){return line=column=1,length=strlen(characters=value),position=0,[]}function dealloc(value){return characters="",value}function delimit(type){return trim(slice2(position-1,delimiter(type===91?type+2:type===40?type+1:type)))}function whitespace(type){while(character=peek())if(character<33)next();else break;return token(type)>2||token(character)>3?"":" "}function escaping(index2,count2){while(--count2&&next())if(character<48||character>102||character>57&&character<65||character>70&&character<97)break;return slice2(index2,caret()+(count2<6&&peek()==32&&next()==32))}function delimiter(type){while(next())switch(character){case type:return position;case 34:case 39:if(type!==34&&type!==39)delimiter(character);break;case 40:if(type===41)delimiter(type);break;case 92:next();break}return position}function commenter(type,index2){while(next())if(type+character===47+10)break;else if(type+character===42+42&&peek()===47)break;return"/*"+slice2(index2,position-1)+"*"+from2(type===47?type:next())}function identifier(index2){while(!token(peek()))next();return slice2(index2,position)}function compile(value){return dealloc(parse("",null,null,null,[""],value=alloc(value),0,[0],value))}function parse(value,root,parent,rule,rules,rulesets,pseudo,points,declarations){var index2=0;var offset2=0;var length2=pseudo;var atrule=0;var property=0;var previous=0;var variable=1;var scanning=1;var ampersand=1;var character2=0;var type="";var props=rules;var children=rulesets;var reference=rule;var characters2=type;while(scanning)switch(previous=character2,character2=next()){case 40:if(previous!=108&&charat(characters2,length2-1)==58){if(indexof(characters2+=replace(delimit(character2),"&","&\f"),"&\f")!=-1)ampersand=-1;break}case 34:case 39:case 91:characters2+=delimit(character2);break;case 9:case 10:case 13:case 32:characters2+=whitespace(previous);break;case 92:characters2+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append2(comment(commenter(next(),caret()),root,parent),declarations);break;default:characters2+="/"}break;case 123*variable:points[index2++]=strlen(characters2)*ampersand;case 125*variable:case 59:case 0:switch(character2){case 0:case 125:scanning=0;case 59+offset2:if(ampersand==-1)characters2=replace(characters2,/\f/g,"");if(property>0&&strlen(characters2)-length2)append2(property>32?declaration(characters2+";",rule,parent,length2-1):declaration(replace(characters2," ","")+";",rule,parent,length2-2),declarations);break;case 59:characters2+=";";default:append2(reference=ruleset(characters2,root,parent,index2,offset2,rules,points,type,props=[],children=[],length2),rulesets);if(character2===123)if(offset2===0)parse(characters2,root,reference,reference,props,rulesets,length2,points,children);else switch(atrule===99&&charat(characters2,3)===110?100:atrule){case 100:case 108:case 109:case 115:parse(value,reference,reference,rule&&append2(ruleset(value,reference,reference,0,0,rules,points,type,rules,props=[],length2),children),rules,children,length2,points,rule?props:children);break;default:parse(characters2,reference,reference,reference,[""],children,0,points,children)}}index2=offset2=property=0,variable=ampersand=1,type=characters2="",length2=pseudo;break;case 58:length2=1+strlen(characters2),property=previous;default:if(variable<1){if(character2==123)--variable;else if(character2==125&&variable++==0&&prev()==125)continue}switch(characters2+=from2(character2),character2*variable){case 38:ampersand=offset2>0?1:(characters2+="\f",-1);break;case 44:points[index2++]=(strlen(characters2)-1)*ampersand,ampersand=1;break;case 64:if(peek()===45)characters2+=delimit(next());atrule=peek(),offset2=length2=strlen(type=characters2+=identifier(caret())),character2++;break;case 45:if(previous===45&&strlen(characters2)==2)variable=0}}return rulesets}function ruleset(value,root,parent,index2,offset2,rules,points,type,props,children,length2){var post=offset2-1;var rule=offset2===0?rules:[""];var size=sizeof(rule);for(var i=0,j=0,k=0;i<index2;++i)for(var x=0,y=substr(value,post+1,post=abs(j=points[i])),z=value;x<size;++x)if(z=trim(j>0?rule[x]+" "+y:replace(y,/&\f/g,rule[x])))props[k++]=z;return node(value,root,parent,offset2===0?RULESET:type,props,children,length2)}function comment(value,root,parent){return node(value,root,parent,COMMENT,from2(char()),substr(value,2,-2),0)}function declaration(value,root,parent,length2){return node(value,root,parent,DECLARATION,substr(value,0,length2),substr(value,length2+1,-1),length2)}function serialize(children,callback){var output="";var length2=sizeof(children);for(var i=0;i<length2;i++)output+=callback(children[i],i,children,callback)||"";return output}function stringify(element,index2,children,callback){switch(element.type){case LAYER:if(element.children.length)break;case IMPORT:case DECLARATION:return element.return=element.return||element.value;case COMMENT:return"";case KEYFRAMES:return element.return=element.value+"{"+serialize(element.children,callback)+"}";case RULESET:element.value=element.props.join(",")}return strlen(children=serialize(element.children,callback))?element.return=element.value+"{"+children+"}":""}function middleware(collection){var length2=sizeof(collection);return function(element,index2,children,callback){var output="";for(var i=0;i<length2;i++)output+=collection[i](element,index2,children,callback)||"";return output}}function rulesheet(callback){return function(element){if(!element.root){if(element=element.return)callback(element)}}}function memoize(fn){var cache=Object.create(null);return function(arg){if(cache[arg]===void 0)cache[arg]=fn(arg);return cache[arg]}}var identifierWithPointTracking=function identifierWithPointTracking2(begin,points,index2){var previous=0;var character2=0;while(true){previous=character2;character2=peek();if(previous===38&&character2===12){points[index2]=1}if(token(character2)){break}next()}return slice2(begin,position)};var toRules=function toRules2(parsed,points){var index2=-1;var character2=44;do{switch(token(character2)){case 0:if(character2===38&&peek()===12){points[index2]=1}parsed[index2]+=identifierWithPointTracking(position-1,points,index2);break;case 2:parsed[index2]+=delimit(character2);break;case 4:if(character2===44){parsed[++index2]=peek()===58?"&\f":"";points[index2]=parsed[index2].length;break}default:parsed[index2]+=from2(character2)}}while(character2=next());return parsed};var getRules=function getRules2(value,points){return dealloc(toRules(alloc(value),points))};var fixedElements=new WeakMap;var compat=function compat2(element){if(element.type!=="rule"||!element.parent||element.length<1){return}var value=element.value,parent=element.parent;var isImplicitRule=element.column===parent.column&&element.line===parent.line;while(parent.type!=="rule"){parent=parent.parent;if(!parent)return}if(element.props.length===1&&value.charCodeAt(0)!==58&&!fixedElements.get(parent)){return}if(isImplicitRule){return}fixedElements.set(element,true);var points=[];var rules=getRules(value,points);var parentRules=parent.props;for(var i=0,k=0;i<rules.length;i++){for(var j=0;j<parentRules.length;j++,k++){element.props[k]=points[i]?rules[i].replace(/&\f/g,parentRules[j]):parentRules[j]+" "+rules[i]}}};var removeLabel=function removeLabel2(element){if(element.type==="decl"){var value=element.value;if(value.charCodeAt(0)===108&&value.charCodeAt(2)===98){element["return"]="";element.value=""}}};function prefix(value,length2){switch(hash(value,length2)){case 5103:return WEBKIT+"print-"+value+value;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+value+value;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+value+MOZ+value+MS+value+value;case 6828:case 4268:return WEBKIT+value+MS+value+value;case 6165:return WEBKIT+value+MS+"flex-"+value+value;case 5187:return WEBKIT+value+replace(value,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+value;case 5443:return WEBKIT+value+MS+"flex-item-"+replace(value,/flex-|-self/,"")+value;case 4675:return WEBKIT+value+MS+"flex-line-pack"+replace(value,/align-content|flex-|-self/,"")+value;case 5548:return WEBKIT+value+MS+replace(value,"shrink","negative")+value;case 5292:return WEBKIT+value+MS+replace(value,"basis","preferred-size")+value;case 6060:return WEBKIT+"box-"+replace(value,"-grow","")+WEBKIT+value+MS+replace(value,"grow","positive")+value;case 4554:return WEBKIT+replace(value,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+value;case 6187:return replace(replace(replace(value,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),value,"")+value;case 5495:case 3959:return replace(value,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace(replace(value,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+value+value;case 4095:case 3583:case 4068:case 2532:return replace(value,/(.+)-inline(.+)/,WEBKIT+"$1$2")+value;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(value)-1-length2>6)switch(charat(value,length2+1)){case 109:if(charat(value,length2+4)!==45)break;case 102:return replace(value,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(value,length2+3)==108?"$3":"$2-$3"))+value;case 115:return~indexof(value,"stretch")?prefix(replace(value,"stretch","fill-available"),length2)+value:value}break;case 4949:if(charat(value,length2+1)!==115)break;case 6444:switch(charat(value,strlen(value)-3-(~indexof(value,"!important")&&10))){case 107:return replace(value,":",":"+WEBKIT)+value;case 101:return replace(value,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(value,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+value}break;case 5936:switch(charat(value,length2+11)){case 114:return WEBKIT+value+MS+replace(value,/[svh]\w+-[tblr]{2}/,"tb")+value;case 108:return WEBKIT+value+MS+replace(value,/[svh]\w+-[tblr]{2}/,"tb-rl")+value;case 45:return WEBKIT+value+MS+replace(value,/[svh]\w+-[tblr]{2}/,"lr")+value}return WEBKIT+value+MS+value+value}return value}var prefixer=function prefixer2(element,index2,children,callback){if(element.length>-1){if(!element["return"])switch(element.type){case DECLARATION:element["return"]=prefix(element.value,element.length);break;case KEYFRAMES:return serialize([copy(element,{value:replace(element.value,"@","@"+WEBKIT)})],callback);case RULESET:if(element.length)return combine(element.props,(function(value){switch(match(value,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(element,{props:[replace(value,/:(read-\w+)/,":"+MOZ+"$1")]})],callback);case"::placeholder":return serialize([copy(element,{props:[replace(value,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(element,{props:[replace(value,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(element,{props:[replace(value,/:(plac\w+)/,MS+"input-$1")]})],callback)}return""}))}}};var defaultStylisPlugins=[prefixer];var createCache=function createCache2(options2){var key=options2.key;if(key==="css"){var ssrStyles=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(ssrStyles,(function(node2){var dataEmotionAttribute=node2.getAttribute("data-emotion");if(dataEmotionAttribute.indexOf(" ")===-1){return}document.head.appendChild(node2);node2.setAttribute("data-s","")}))}var stylisPlugins=options2.stylisPlugins||defaultStylisPlugins;var inserted={};var container;var nodesToHydrate=[];{container=options2.container||document.head;Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+key+' "]'),(function(node2){var attrib=node2.getAttribute("data-emotion").split(" ");for(var i=1;i<attrib.length;i++){inserted[attrib[i]]=true}nodesToHydrate.push(node2)}))}var _insert;var omnipresentPlugins=[compat,removeLabel];{var currentSheet;var finalizingPlugins=[stringify,rulesheet((function(rule){currentSheet.insert(rule)}))];var serializer=middleware(omnipresentPlugins.concat(stylisPlugins,finalizingPlugins));var stylis=function stylis2(styles){return serialize(compile(styles),serializer)};_insert=function insert(selector,serialized,sheet,shouldCache){currentSheet=sheet;stylis(selector?selector+"{"+serialized.styles+"}":serialized.styles);if(shouldCache){cache.inserted[serialized.name]=true}}}var cache={key:key,sheet:new StyleSheet({key:key,container:container,nonce:options2.nonce,speedy:options2.speedy,prepend:options2.prepend,insertionPoint:options2.insertionPoint}),nonce:options2.nonce,inserted:inserted,registered:{},insert:_insert};cache.sheet.hydrate(nodesToHydrate);return cache};var hoistNonReactStatics_cjs;var hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var reactIs=require$$0;var REACT_STATICS={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true};var KNOWN_STATICS={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var FORWARD_REF_STATICS={$$typeof:true,render:true,defaultProps:true,displayName:true,propTypes:true};var MEMO_STATICS={$$typeof:true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true};var TYPE_STATICS={};TYPE_STATICS[reactIs.ForwardRef]=FORWARD_REF_STATICS;TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;function getStatics(component){if(reactIs.isMemo(component)){return MEMO_STATICS}return TYPE_STATICS[component["$$typeof"]]||REACT_STATICS}var defineProperty=Object.defineProperty;var getOwnPropertyNames=Object.getOwnPropertyNames;var getOwnPropertySymbols=Object.getOwnPropertySymbols;var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;var getPrototypeOf=Object.getPrototypeOf;var objectPrototype=Object.prototype;function hoistNonReactStatics(targetComponent,sourceComponent,blacklist){if(typeof sourceComponent!=="string"){if(objectPrototype){var inheritedComponent=getPrototypeOf(sourceComponent);if(inheritedComponent&&inheritedComponent!==objectPrototype){hoistNonReactStatics(targetComponent,inheritedComponent,blacklist)}}var keys2=getOwnPropertyNames(sourceComponent);if(getOwnPropertySymbols){keys2=keys2.concat(getOwnPropertySymbols(sourceComponent))}var targetStatics=getStatics(targetComponent);var sourceStatics=getStatics(sourceComponent);for(var i=0;i<keys2.length;++i){var key=keys2[i];if(!KNOWN_STATICS[key]&&!(blacklist&&blacklist[key])&&!(sourceStatics&&sourceStatics[key])&&!(targetStatics&&targetStatics[key])){var descriptor=getOwnPropertyDescriptor(sourceComponent,key);try{defineProperty(targetComponent,key,descriptor)}catch(e){}}}}return targetComponent}hoistNonReactStatics_cjs=hoistNonReactStatics;return hoistNonReactStatics_cjs}requireHoistNonReactStatics_cjs();var isBrowser=true;function getRegisteredStyles(registered,registeredStyles,classNames2){var rawClassName="";classNames2.split(" ").forEach((function(className){if(registered[className]!==void 0){registeredStyles.push(registered[className]+";")}else{rawClassName+=className+" "}}));return rawClassName}var registerStyles=function registerStyles2(cache,serialized,isStringTag){var className=cache.key+"-"+serialized.name;if((isStringTag===false||isBrowser===false)&&cache.registered[className]===void 0){cache.registered[className]=serialized.styles}};var insertStyles=function insertStyles2(cache,serialized,isStringTag){registerStyles(cache,serialized,isStringTag);var className=cache.key+"-"+serialized.name;if(cache.inserted[serialized.name]===void 0){var current=serialized;do{cache.insert(serialized===current?"."+className:"",current,cache.sheet,true);current=current.next}while(current!==void 0)}};function murmur2(str){var h=0;var k,i=0,len=str.length;for(;len>=4;++i,len-=4){k=str.charCodeAt(i)&255|(str.charCodeAt(++i)&255)<<8|(str.charCodeAt(++i)&255)<<16|(str.charCodeAt(++i)&255)<<24;k=(k&65535)*1540483477+((k>>>16)*59797<<16);k^=k>>>24;h=(k&65535)*1540483477+((k>>>16)*59797<<16)^(h&65535)*1540483477+((h>>>16)*59797<<16)}switch(len){case 3:h^=(str.charCodeAt(i+2)&255)<<16;case 2:h^=(str.charCodeAt(i+1)&255)<<8;case 1:h^=str.charCodeAt(i)&255;h=(h&65535)*1540483477+((h>>>16)*59797<<16)}h^=h>>>13;h=(h&65535)*1540483477+((h>>>16)*59797<<16);return((h^h>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var hyphenateRegex=/[A-Z]|^ms/g;var animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g;var isCustomProperty=function isCustomProperty2(property){return property.charCodeAt(1)===45};var isProcessableValue=function isProcessableValue2(value){return value!=null&&typeof value!=="boolean"};var processStyleName=memoize((function(styleName){return isCustomProperty(styleName)?styleName:styleName.replace(hyphenateRegex,"-$&").toLowerCase()}));var processStyleValue=function processStyleValue2(key,value){switch(key){case"animation":case"animationName":{if(typeof value==="string"){return value.replace(animationRegex,(function(match2,p1,p2){cursor={name:p1,styles:p2,next:cursor};return p1}))}}}if(unitlessKeys[key]!==1&&!isCustomProperty(key)&&typeof value==="number"&&value!==0){return value+"px"}return value};function handleInterpolation(mergedProps,registered,interpolation){if(interpolation==null){return""}if(interpolation.__emotion_styles!==void 0){return interpolation}switch(typeof interpolation){case"boolean":{return""}case"object":{if(interpolation.anim===1){cursor={name:interpolation.name,styles:interpolation.styles,next:cursor};return interpolation.name}if(interpolation.styles!==void 0){var next2=interpolation.next;if(next2!==void 0){while(next2!==void 0){cursor={name:next2.name,styles:next2.styles,next:cursor};next2=next2.next}}var styles=interpolation.styles+";";return styles}return createStringFromObject(mergedProps,registered,interpolation)}case"function":{if(mergedProps!==void 0){var previousCursor=cursor;var result=interpolation(mergedProps);cursor=previousCursor;return handleInterpolation(mergedProps,registered,result)}break}}{return interpolation}}function createStringFromObject(mergedProps,registered,obj){var string="";if(Array.isArray(obj)){for(var i=0;i<obj.length;i++){string+=handleInterpolation(mergedProps,registered,obj[i])+";"}}else{for(var _key in obj){var value=obj[_key];if(typeof value!=="object"){if(isProcessableValue(value)){string+=processStyleName(_key)+":"+processStyleValue(_key,value)+";"}}else{if(Array.isArray(value)&&typeof value[0]==="string"&®istered==null){for(var _i=0;_i<value.length;_i++){if(isProcessableValue(value[_i])){string+=processStyleName(_key)+":"+processStyleValue(_key,value[_i])+";"}}}else{var interpolated=handleInterpolation(mergedProps,registered,value);switch(_key){case"animation":case"animationName":{string+=processStyleName(_key)+":"+interpolated+";";break}default:{string+=_key+"{"+interpolated+"}"}}}}}}return string}var labelPattern=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var cursor;var serializeStyles=function serializeStyles2(args,registered,mergedProps){if(args.length===1&&typeof args[0]==="object"&&args[0]!==null&&args[0].styles!==void 0){return args[0]}var stringMode=true;var styles="";cursor=void 0;var strings=args[0];if(strings==null||strings.raw===void 0){stringMode=false;styles+=handleInterpolation(mergedProps,registered,strings)}else{styles+=strings[0]}for(var i=1;i<args.length;i++){styles+=handleInterpolation(mergedProps,registered,args[i]);if(stringMode){styles+=strings[i]}}labelPattern.lastIndex=0;var identifierName="";var match2;while((match2=labelPattern.exec(styles))!==null){identifierName+="-"+match2[1]}var name=murmur2(styles)+identifierName;return{name:name,styles:styles,next:cursor}};var syncFallback=function syncFallback2(create){return create()};var useInsertionEffect=React["useInsertionEffect"]?React["useInsertionEffect"]:false;var useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback;var hasOwnProperty={}.hasOwnProperty;var EmotionCacheContext=React.createContext(typeof HTMLElement!=="undefined"?createCache({key:"css"}):null);EmotionCacheContext.Provider;var withEmotionCache=function withEmotionCache2(func){return forwardRef((function(props,ref){var cache=useContext(EmotionCacheContext);return func(props,cache,ref)}))};var ThemeContext=React.createContext({});var typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__";var createEmotionProps=function createEmotionProps2(type,props){var newProps={};for(var key in props){if(hasOwnProperty.call(props,key)){newProps[key]=props[key]}}newProps[typePropName]=type;return newProps};var Insertion=function Insertion2(_ref3){var cache=_ref3.cache,serialized=_ref3.serialized,isStringTag=_ref3.isStringTag;registerStyles(cache,serialized,isStringTag);useInsertionEffectAlwaysWithSyncFallback((function(){return insertStyles(cache,serialized,isStringTag)}));return null};var Emotion=withEmotionCache((function(props,cache,ref){var cssProp=props.css;if(typeof cssProp==="string"&&cache.registered[cssProp]!==void 0){cssProp=cache.registered[cssProp]}var WrappedComponent=props[typePropName];var registeredStyles=[cssProp];var className="";if(typeof props.className==="string"){className=getRegisteredStyles(cache.registered,registeredStyles,props.className)}else if(props.className!=null){className=props.className+" "}var serialized=serializeStyles(registeredStyles,void 0,React.useContext(ThemeContext));className+=cache.key+"-"+serialized.name;var newProps={};for(var key in props){if(hasOwnProperty.call(props,key)&&key!=="css"&&key!==typePropName&&true){newProps[key]=props[key]}}newProps.ref=ref;newProps.className=className;return React.createElement(React.Fragment,null,React.createElement(Insertion,{cache:cache,serialized:serialized,isStringTag:typeof WrappedComponent==="string"}),React.createElement(WrappedComponent,newProps))}));var Emotion$1=Emotion;var jsx=function jsx2(type,props){var args=arguments;if(props==null||!hasOwnProperty.call(props,"css")){return React.createElement.apply(void 0,args)}var argsLength=args.length;var createElementArgArray=new Array(argsLength);createElementArgArray[0]=Emotion$1;createElementArgArray[1]=createEmotionProps(type,props);for(var i=2;i<argsLength;i++){createElementArgArray[i]=args[i]}return React.createElement.apply(null,createElementArgArray)};function css(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return serializeStyles(args)}var keyframes=function keyframes2(){var insertable=css.apply(void 0,arguments);var name="animation-"+insertable.name;return{name:name,styles:"@keyframes "+name+"{"+insertable.styles+"}",anim:1,toString:function toString(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0)}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}const min=Math.min;const max=Math.max;const round=Math.round;const floor=Math.floor;const createCoords=v=>({x:v,y:v});function rectToClientRect(rect){return{...rect,top:rect.y,left:rect.x,right:rect.x+rect.width,bottom:rect.y+rect.height}}function getNodeName(node2){if(isNode(node2)){return(node2.nodeName||"").toLowerCase()}return"#document"}function getWindow(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument=node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node2){var _ref3;return(_ref3=(isNode(node2)?node2.ownerDocument:node2.document)||window.document)==null?void 0:_ref3.documentElement}function isNode(value){return value instanceof Node||value instanceof getWindow(value).Node}function isElement(value){return value instanceof Element||value instanceof getWindow(value).Element}function isHTMLElement(value){return value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement}function isShadowRoot(value){if(typeof ShadowRoot==="undefined"){return false}return value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}function isOverflowElement(element){const{overflow:overflow,overflowX:overflowX,overflowY:overflowY,display:display}=getComputedStyle$1(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!["inline","contents"].includes(display)}function isWebKit(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(node2){return["html","body","#document"].includes(getNodeName(node2))}function getComputedStyle$1(element){return getWindow(element).getComputedStyle(element)}function getParentNode(node2){if(getNodeName(node2)==="html"){return node2}const result=node2.assignedSlot||node2.parentNode||isShadowRoot(node2)&&node2.host||getDocumentElement(node2);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node2){const parentNode2=getParentNode(node2);if(isLastTraversableNode(parentNode2)){return node2.ownerDocument?node2.ownerDocument.body:node2.body}if(isHTMLElement(parentNode2)&&isOverflowElement(parentNode2)){return parentNode2}return getNearestOverflowAncestor(parentNode2)}function getOverflowAncestors(node2,list,traverseIframes){var _node$ownerDocument2;if(list===void 0){list=[]}if(traverseIframes===void 0){traverseIframes=true}const scrollableAncestor=getNearestOverflowAncestor(node2);const isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body);const win=getWindow(scrollableAncestor);if(isBody){return list.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],win.frameElement&&traverseIframes?getOverflowAncestors(win.frameElement):[])}return list.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getCssDimensions(element){const css4=getComputedStyle$1(element);let width=parseFloat(css4.width)||0;let height=parseFloat(css4.height)||0;const hasOffset=isHTMLElement(element);const offsetWidth=hasOffset?element.offsetWidth:width;const offsetHeight=hasOffset?element.offsetHeight:height;const shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;if(shouldFallback){width=offsetWidth;height=offsetHeight}return{width:width,height:height,$:shouldFallback}}function unwrapElement(element){return!isElement(element)?element.contextElement:element}function getScale(element){const domElement=unwrapElement(element);if(!isHTMLElement(domElement)){return createCoords(1)}const rect=domElement.getBoundingClientRect();const{width:width,height:height,$:$}=getCssDimensions(domElement);let x=($?round(rect.width):rect.width)/width;let y=($?round(rect.height):rect.height)/height;if(!x||!Number.isFinite(x)){x=1}if(!y||!Number.isFinite(y)){y=1}return{x:x,y:y}}const noOffsets=createCoords(0);function getVisualOffsets(element){const win=getWindow(element);if(!isWebKit()||!win.visualViewport){return noOffsets}return{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element,isFixed,floatingOffsetParent){{return false}}function getBoundingClientRect(element,includeScale,isFixedStrategy,offsetParent){if(includeScale===void 0){includeScale=false}const clientRect2=element.getBoundingClientRect();const domElement=unwrapElement(element);let scale=createCoords(1);if(includeScale){{scale=getScale(element)}}const visualOffsets=shouldAddVisualOffsets()?getVisualOffsets(domElement):createCoords(0);let x=(clientRect2.left+visualOffsets.x)/scale.x;let y=(clientRect2.top+visualOffsets.y)/scale.y;let width=clientRect2.width/scale.x;let height=clientRect2.height/scale.y;if(domElement){const win=getWindow(domElement);const offsetWin=offsetParent;let currentIFrame=win.frameElement;while(currentIFrame&&offsetParent&&offsetWin!==win){const iframeScale=getScale(currentIFrame);const iframeRect=currentIFrame.getBoundingClientRect();const css4=getComputedStyle$1(currentIFrame);const left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css4.paddingLeft))*iframeScale.x;const top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css4.paddingTop))*iframeScale.y;x*=iframeScale.x;y*=iframeScale.y;width*=iframeScale.x;height*=iframeScale.y;x+=left;y+=top;currentIFrame=getWindow(currentIFrame).frameElement}}return rectToClientRect({width:width,height:height,x:x,y:y})}function observeMove(element,onMove){let io=null;let timeoutId;const root=getDocumentElement(element);function cleanup(){clearTimeout(timeoutId);io&&io.disconnect();io=null}function refresh(skip,threshold){if(skip===void 0){skip=false}if(threshold===void 0){threshold=1}cleanup();const{left:left,top:top,width:width,height:height}=element.getBoundingClientRect();if(!skip){onMove()}if(!width||!height){return}const insetTop=floor(top);const insetRight=floor(root.clientWidth-(left+width));const insetBottom=floor(root.clientHeight-(top+height));const insetLeft=floor(left);const rootMargin=-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px";const options2={rootMargin:rootMargin,threshold:max(0,min(1,threshold))||1};let isFirstUpdate=true;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate){return refresh()}if(!ratio){timeoutId=setTimeout((()=>{refresh(false,1e-7)}),100)}else{refresh(false,ratio)}}isFirstUpdate=false}try{io=new IntersectionObserver(handleObserve,{...options2,root:root.ownerDocument})}catch(e){io=new IntersectionObserver(handleObserve,options2)}io.observe(element)}refresh(true);return cleanup}function autoUpdate(reference,floating,update,options2){if(options2===void 0){options2={}}const{ancestorScroll:ancestorScroll=true,ancestorResize:ancestorResize=true,elementResize:elementResize=typeof ResizeObserver==="function",layoutShift:layoutShift=typeof IntersectionObserver==="function",animationFrame:animationFrame=false}=options2;const referenceEl=unwrapElement(reference);const ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach((ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update,{passive:true});ancestorResize&&ancestor.addEventListener("resize",update)}));const cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null;let reobserveFrame=-1;let resizeObserver=null;if(elementResize){resizeObserver=new ResizeObserver((_ref3=>{let[firstEntry]=_ref3;if(firstEntry&&firstEntry.target===referenceEl&&resizeObserver){resizeObserver.unobserve(floating);cancelAnimationFrame(reobserveFrame);reobserveFrame=requestAnimationFrame((()=>{resizeObserver&&resizeObserver.observe(floating)}))}update()}));if(referenceEl&&!animationFrame){resizeObserver.observe(referenceEl)}resizeObserver.observe(floating)}let frameId;let prevRefRect=animationFrame?getBoundingClientRect(reference):null;if(animationFrame){frameLoop()}function frameLoop(){const nextRefRect=getBoundingClientRect(reference);if(prevRefRect&&(nextRefRect.x!==prevRefRect.x||nextRefRect.y!==prevRefRect.y||nextRefRect.width!==prevRefRect.width||nextRefRect.height!==prevRefRect.height)){update()}prevRefRect=nextRefRect;frameId=requestAnimationFrame(frameLoop)}update();return()=>{ancestors.forEach((ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update);ancestorResize&&ancestor.removeEventListener("resize",update)}));cleanupIo&&cleanupIo();resizeObserver&&resizeObserver.disconnect();resizeObserver=null;if(animationFrame){cancelAnimationFrame(frameId)}}}var index=useLayoutEffect;var _excluded$4=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"];var noop=function noop2(){};function applyPrefixToName(prefix2,name){if(!name){return prefix2}else if(name[0]==="-"){return prefix2+name}else{return prefix2+"__"+name}}function classNames(prefix2,state){for(var _len=arguments.length,classNameList=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){classNameList[_key-2]=arguments[_key]}var arr=[].concat(classNameList);if(state&&prefix2){for(var key in state){if(state.hasOwnProperty(key)&&state[key]){arr.push("".concat(applyPrefixToName(prefix2,key)))}}}return arr.filter((function(i){return i})).map((function(i){return String(i).trim()})).join(" ")}var cleanValue=function cleanValue2(value){if(isArray(value))return value.filter(Boolean);if(_typeof(value)==="object"&&value!==null)return[value];return[]};var cleanCommonProps=function cleanCommonProps2(props){props.className;props.clearValue;props.cx;props.getStyles;props.getClassNames;props.getValue;props.hasValue;props.isMulti;props.isRtl;props.options;props.selectOption;props.selectProps;props.setValue;props.theme;var innerProps=_objectWithoutProperties(props,_excluded$4);return _objectSpread2({},innerProps)};var getStyleProps=function getStyleProps2(props,name,classNamesState){var cx=props.cx,getStyles=props.getStyles,getClassNames=props.getClassNames,className=props.className;return{css:getStyles(name,props),className:cx(classNamesState!==null&&classNamesState!==void 0?classNamesState:{},getClassNames(name,props),className)}};function handleInputChange(inputValue,actionMeta,onInputChange){if(onInputChange){var _newValue=onInputChange(inputValue,actionMeta);if(typeof _newValue==="string")return _newValue}return inputValue}function isDocumentElement(el){return[document.documentElement,document.body,window].indexOf(el)>-1}function normalizedHeight(el){if(isDocumentElement(el)){return window.innerHeight}return el.clientHeight}function getScrollTop(el){if(isDocumentElement(el)){return window.pageYOffset}return el.scrollTop}function scrollTo(el,top){if(isDocumentElement(el)){window.scrollTo(0,top);return}el.scrollTop=top}function getScrollParent(element){var style2=getComputedStyle(element);var excludeStaticParent=style2.position==="absolute";var overflowRx=/(auto|scroll)/;if(style2.position==="fixed")return document.documentElement;for(var parent=element;parent=parent.parentElement;){style2=getComputedStyle(parent);if(excludeStaticParent&&style2.position==="static"){continue}if(overflowRx.test(style2.overflow+style2.overflowY+style2.overflowX)){return parent}}return document.documentElement}function easeOutCubic(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b}function animatedScrollTo(element,to){var duration=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200;var callback=arguments.length>3&&arguments[3]!==void 0?arguments[3]:noop;var start=getScrollTop(element);var change=to-start;var increment=10;var currentTime=0;function animateScroll(){currentTime+=increment;var val=easeOutCubic(currentTime,start,change,duration);scrollTo(element,val);if(currentTime<duration){window.requestAnimationFrame(animateScroll)}else{callback(element)}}animateScroll()}function scrollIntoView(menuEl,focusedEl){var menuRect=menuEl.getBoundingClientRect();var focusedRect=focusedEl.getBoundingClientRect();var overScroll=focusedEl.offsetHeight/3;if(focusedRect.bottom+overScroll>menuRect.bottom){scrollTo(menuEl,Math.min(focusedEl.offsetTop+focusedEl.clientHeight-menuEl.offsetHeight+overScroll,menuEl.scrollHeight))}else if(focusedRect.top-overScroll<menuRect.top){scrollTo(menuEl,Math.max(focusedEl.offsetTop-overScroll,0))}}function getBoundingClientObj(element){var rect=element.getBoundingClientRect();return{bottom:rect.bottom,height:rect.height,left:rect.left,right:rect.right,top:rect.top,width:rect.width}}function isTouchCapable(){try{document.createEvent("TouchEvent");return true}catch(e){return false}}function isMobileDevice(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return false}}var passiveOptionAccessed=false;var options={get passive(){return passiveOptionAccessed=true}};var w=typeof window!=="undefined"?window:{};if(w.addEventListener&&w.removeEventListener){w.addEventListener("p",noop,options);w.removeEventListener("p",noop,false)}var supportsPassiveEvents=passiveOptionAccessed;function notNullish(item){return item!=null}function isArray(arg){return Array.isArray(arg)}function valueTernary(isMulti,multiValue,singleValue){return isMulti?multiValue:singleValue}function singleValueAsValue(singleValue){return singleValue}function multiValueAsValue(multiValue){return multiValue}var removeProps=function removeProps2(propsObj){for(var _len2=arguments.length,properties=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){properties[_key2-1]=arguments[_key2]}var propsMap=Object.entries(propsObj).filter((function(_ref3){var _ref22=_slicedToArray(_ref3,1),key=_ref22[0];return!properties.includes(key)}));return propsMap.reduce((function(newProps,_ref3){var _ref4=_slicedToArray(_ref3,2),key=_ref4[0],val=_ref4[1];newProps[key]=val;return newProps}),{})};var _excluded$3=["children","innerProps"],_excluded2$1=["children","innerProps"];function getMenuPlacement(_ref3){var preferredMaxHeight=_ref3.maxHeight,menuEl=_ref3.menuEl,minHeight=_ref3.minHeight,preferredPlacement=_ref3.placement,shouldScroll=_ref3.shouldScroll,isFixedPosition=_ref3.isFixedPosition,controlHeight2=_ref3.controlHeight;var scrollParent=getScrollParent(menuEl);var defaultState={placement:"bottom",maxHeight:preferredMaxHeight};if(!menuEl||!menuEl.offsetParent)return defaultState;var _scrollParent$getBoun=scrollParent.getBoundingClientRect(),scrollHeight=_scrollParent$getBoun.height;var _menuEl$getBoundingCl=menuEl.getBoundingClientRect(),menuBottom=_menuEl$getBoundingCl.bottom,menuHeight=_menuEl$getBoundingCl.height,menuTop=_menuEl$getBoundingCl.top;var _menuEl$offsetParent$=menuEl.offsetParent.getBoundingClientRect(),containerTop=_menuEl$offsetParent$.top;var viewHeight=isFixedPosition?window.innerHeight:normalizedHeight(scrollParent);var scrollTop=getScrollTop(scrollParent);var marginBottom=parseInt(getComputedStyle(menuEl).marginBottom,10);var marginTop=parseInt(getComputedStyle(menuEl).marginTop,10);var viewSpaceAbove=containerTop-marginTop;var viewSpaceBelow=viewHeight-menuTop;var scrollSpaceAbove=viewSpaceAbove+scrollTop;var scrollSpaceBelow=scrollHeight-scrollTop-menuTop;var scrollDown=menuBottom-viewHeight+scrollTop+marginBottom;var scrollUp=scrollTop+menuTop-marginTop;var scrollDuration=160;switch(preferredPlacement){case"auto":case"bottom":if(viewSpaceBelow>=menuHeight){return{placement:"bottom",maxHeight:preferredMaxHeight}}if(scrollSpaceBelow>=menuHeight&&!isFixedPosition){if(shouldScroll){animatedScrollTo(scrollParent,scrollDown,scrollDuration)}return{placement:"bottom",maxHeight:preferredMaxHeight}}if(!isFixedPosition&&scrollSpaceBelow>=minHeight||isFixedPosition&&viewSpaceBelow>=minHeight){if(shouldScroll){animatedScrollTo(scrollParent,scrollDown,scrollDuration)}var constrainedHeight=isFixedPosition?viewSpaceBelow-marginBottom:scrollSpaceBelow-marginBottom;return{placement:"bottom",maxHeight:constrainedHeight}}if(preferredPlacement==="auto"||isFixedPosition){var _constrainedHeight=preferredMaxHeight;var spaceAbove=isFixedPosition?viewSpaceAbove:scrollSpaceAbove;if(spaceAbove>=minHeight){_constrainedHeight=Math.min(spaceAbove-marginBottom-controlHeight2,preferredMaxHeight)}return{placement:"top",maxHeight:_constrainedHeight}}if(preferredPlacement==="bottom"){if(shouldScroll){scrollTo(scrollParent,scrollDown)}return{placement:"bottom",maxHeight:preferredMaxHeight}}break;case"top":if(viewSpaceAbove>=menuHeight){return{placement:"top",maxHeight:preferredMaxHeight}}if(scrollSpaceAbove>=menuHeight&&!isFixedPosition){if(shouldScroll){animatedScrollTo(scrollParent,scrollUp,scrollDuration)}return{placement:"top",maxHeight:preferredMaxHeight}}if(!isFixedPosition&&scrollSpaceAbove>=minHeight||isFixedPosition&&viewSpaceAbove>=minHeight){var _constrainedHeight2=preferredMaxHeight;if(!isFixedPosition&&scrollSpaceAbove>=minHeight||isFixedPosition&&viewSpaceAbove>=minHeight){_constrainedHeight2=isFixedPosition?viewSpaceAbove-marginTop:scrollSpaceAbove-marginTop}if(shouldScroll){animatedScrollTo(scrollParent,scrollUp,scrollDuration)}return{placement:"top",maxHeight:_constrainedHeight2}}return{placement:"bottom",maxHeight:preferredMaxHeight};default:throw new Error('Invalid placement provided "'.concat(preferredPlacement,'".'))}return defaultState}function alignToControl(placement){var placementToCSSProp={bottom:"top",top:"bottom"};return placement?placementToCSSProp[placement]:"bottom"}var coercePlacement=function coercePlacement2(p){return p==="auto"?"bottom":p};var menuCSS=function menuCSS2(_ref22,unstyled){var _objectSpread2$1;var placement=_ref22.placement,_ref2$theme=_ref22.theme,borderRadius2=_ref2$theme.borderRadius,spacing2=_ref2$theme.spacing,colors2=_ref2$theme.colors;return _objectSpread2((_objectSpread2$1={label:"menu"},_defineProperty(_objectSpread2$1,alignToControl(placement),"100%"),_defineProperty(_objectSpread2$1,"position","absolute"),_defineProperty(_objectSpread2$1,"width","100%"),_defineProperty(_objectSpread2$1,"zIndex",1),_objectSpread2$1),unstyled?{}:{backgroundColor:colors2.neutral0,borderRadius:borderRadius2,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:spacing2.menuGutter,marginTop:spacing2.menuGutter})};var PortalPlacementContext=createContext(null);var MenuPlacer=function MenuPlacer2(props){var children=props.children,minMenuHeight=props.minMenuHeight,maxMenuHeight=props.maxMenuHeight,menuPlacement=props.menuPlacement,menuPosition=props.menuPosition,menuShouldScrollIntoView=props.menuShouldScrollIntoView,theme=props.theme;var _ref3=useContext(PortalPlacementContext)||{},setPortalPlacement=_ref3.setPortalPlacement;var ref=useRef(null);var _useState=useState(maxMenuHeight),_useState2=_slicedToArray(_useState,2),maxHeight=_useState2[0],setMaxHeight=_useState2[1];var _useState3=useState(null),_useState4=_slicedToArray(_useState3,2),placement=_useState4[0],setPlacement=_useState4[1];var controlHeight2=theme.spacing.controlHeight;index((function(){var menuEl=ref.current;if(!menuEl)return;var isFixedPosition=menuPosition==="fixed";var shouldScroll=menuShouldScrollIntoView&&!isFixedPosition;var state=getMenuPlacement({maxHeight:maxMenuHeight,menuEl:menuEl,minHeight:minMenuHeight,placement:menuPlacement,shouldScroll:shouldScroll,isFixedPosition:isFixedPosition,controlHeight:controlHeight2});setMaxHeight(state.maxHeight);setPlacement(state.placement);setPortalPlacement===null||setPortalPlacement===void 0?void 0:setPortalPlacement(state.placement)}),[maxMenuHeight,menuPlacement,menuPosition,menuShouldScrollIntoView,minMenuHeight,setPortalPlacement,controlHeight2]);return children({ref:ref,placerProps:_objectSpread2(_objectSpread2({},props),{},{placement:placement||coercePlacement(menuPlacement),maxHeight:maxHeight})})};var Menu=function Menu2(props){var children=props.children,innerRef=props.innerRef,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"menu",{menu:true}),{ref:innerRef},innerProps),children)};var Menu$1=Menu;var menuListCSS=function menuListCSS2(_ref4,unstyled){var maxHeight=_ref4.maxHeight,baseUnit2=_ref4.theme.spacing.baseUnit;return _objectSpread2({maxHeight:maxHeight,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},unstyled?{}:{paddingBottom:baseUnit2,paddingTop:baseUnit2})};var MenuList$1=function MenuList2(props){var children=props.children,innerProps=props.innerProps,innerRef=props.innerRef,isMulti=props.isMulti;return jsx("div",_extends({},getStyleProps(props,"menuList",{"menu-list":true,"menu-list--is-multi":isMulti}),{ref:innerRef},innerProps),children)};var noticeCSS=function noticeCSS2(_ref5,unstyled){var _ref5$theme=_ref5.theme,baseUnit2=_ref5$theme.spacing.baseUnit,colors2=_ref5$theme.colors;return _objectSpread2({textAlign:"center"},unstyled?{}:{color:colors2.neutral40,padding:"".concat(baseUnit2*2,"px ").concat(baseUnit2*3,"px")})};var noOptionsMessageCSS=noticeCSS;var loadingMessageCSS=noticeCSS;var NoOptionsMessage=function NoOptionsMessage2(_ref6){var _ref6$children=_ref6.children,children=_ref6$children===void 0?"No options":_ref6$children,innerProps=_ref6.innerProps,restProps=_objectWithoutProperties(_ref6,_excluded$3);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},restProps),{},{children:children,innerProps:innerProps}),"noOptionsMessage",{"menu-notice":true,"menu-notice--no-options":true}),innerProps),children)};var LoadingMessage=function LoadingMessage2(_ref7){var _ref7$children=_ref7.children,children=_ref7$children===void 0?"Loading...":_ref7$children,innerProps=_ref7.innerProps,restProps=_objectWithoutProperties(_ref7,_excluded2$1);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},restProps),{},{children:children,innerProps:innerProps}),"loadingMessage",{"menu-notice":true,"menu-notice--loading":true}),innerProps),children)};var menuPortalCSS=function menuPortalCSS2(_ref8){var rect=_ref8.rect,offset2=_ref8.offset,position2=_ref8.position;return{left:rect.left,position:position2,top:offset2,width:rect.width,zIndex:1}};var MenuPortal=function MenuPortal2(props){var appendTo=props.appendTo,children=props.children,controlElement=props.controlElement,innerProps=props.innerProps,menuPlacement=props.menuPlacement,menuPosition=props.menuPosition;var menuPortalRef=useRef(null);var cleanupRef=useRef(null);var _useState5=useState(coercePlacement(menuPlacement)),_useState6=_slicedToArray(_useState5,2),placement=_useState6[0],setPortalPlacement=_useState6[1];var portalPlacementContext=useMemo((function(){return{setPortalPlacement:setPortalPlacement}}),[]);var _useState7=useState(null),_useState8=_slicedToArray(_useState7,2),computedPosition=_useState8[0],setComputedPosition=_useState8[1];var updateComputedPosition=useCallback((function(){if(!controlElement)return;var rect=getBoundingClientObj(controlElement);var scrollDistance=menuPosition==="fixed"?0:window.pageYOffset;var offset2=rect[placement]+scrollDistance;if(offset2!==(computedPosition===null||computedPosition===void 0?void 0:computedPosition.offset)||rect.left!==(computedPosition===null||computedPosition===void 0?void 0:computedPosition.rect.left)||rect.width!==(computedPosition===null||computedPosition===void 0?void 0:computedPosition.rect.width)){setComputedPosition({offset:offset2,rect:rect})}}),[controlElement,menuPosition,placement,computedPosition===null||computedPosition===void 0?void 0:computedPosition.offset,computedPosition===null||computedPosition===void 0?void 0:computedPosition.rect.left,computedPosition===null||computedPosition===void 0?void 0:computedPosition.rect.width]);index((function(){updateComputedPosition()}),[updateComputedPosition]);var runAutoUpdate=useCallback((function(){if(typeof cleanupRef.current==="function"){cleanupRef.current();cleanupRef.current=null}if(controlElement&&menuPortalRef.current){cleanupRef.current=autoUpdate(controlElement,menuPortalRef.current,updateComputedPosition,{elementResize:"ResizeObserver"in window})}}),[controlElement,updateComputedPosition]);index((function(){runAutoUpdate()}),[runAutoUpdate]);var setMenuPortalElement=useCallback((function(menuPortalElement){menuPortalRef.current=menuPortalElement;runAutoUpdate()}),[runAutoUpdate]);if(!appendTo&&menuPosition!=="fixed"||!computedPosition)return null;var menuWrapper=jsx("div",_extends({ref:setMenuPortalElement},getStyleProps(_objectSpread2(_objectSpread2({},props),{},{offset:computedPosition.offset,position:menuPosition,rect:computedPosition.rect}),"menuPortal",{"menu-portal":true}),innerProps),children);return jsx(PortalPlacementContext.Provider,{value:portalPlacementContext},appendTo?createPortal(menuWrapper,appendTo):menuWrapper)};var containerCSS=function containerCSS2(_ref3){var isDisabled=_ref3.isDisabled,isRtl=_ref3.isRtl;return{label:"container",direction:isRtl?"rtl":void 0,pointerEvents:isDisabled?"none":void 0,position:"relative"}};var SelectContainer=function SelectContainer2(props){var children=props.children,innerProps=props.innerProps,isDisabled=props.isDisabled,isRtl=props.isRtl;return jsx("div",_extends({},getStyleProps(props,"container",{"--is-disabled":isDisabled,"--is-rtl":isRtl}),innerProps),children)};var valueContainerCSS=function valueContainerCSS2(_ref22,unstyled){var spacing2=_ref22.theme.spacing,isMulti=_ref22.isMulti,hasValue=_ref22.hasValue,controlShouldRenderValue=_ref22.selectProps.controlShouldRenderValue;return _objectSpread2({alignItems:"center",display:isMulti&&hasValue&&controlShouldRenderValue?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},unstyled?{}:{padding:"".concat(spacing2.baseUnit/2,"px ").concat(spacing2.baseUnit*2,"px")})};var ValueContainer$1=function ValueContainer2(props){var children=props.children,innerProps=props.innerProps,isMulti=props.isMulti,hasValue=props.hasValue;return jsx("div",_extends({},getStyleProps(props,"valueContainer",{"value-container":true,"value-container--is-multi":isMulti,"value-container--has-value":hasValue}),innerProps),children)};var indicatorsContainerCSS=function indicatorsContainerCSS2(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}};var IndicatorsContainer$1=function IndicatorsContainer2(props){var children=props.children,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"indicatorsContainer",{indicators:true}),innerProps),children)};var _templateObject;var _excluded$2$1=["size"],_excluded2=["innerProps","isRtl","size"];var _ref2$2={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"};var Svg=function Svg2(_ref3){var size=_ref3.size,props=_objectWithoutProperties(_ref3,_excluded$2$1);return jsx("svg",_extends({height:size,width:size,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_ref2$2},props))};var CrossIcon=function CrossIcon2(props){return jsx(Svg,_extends({size:20},props),jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))};var DownChevron=function DownChevron2(props){return jsx(Svg,_extends({size:20},props),jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))};var baseCSS=function baseCSS2(_ref3,unstyled){var isFocused=_ref3.isFocused,_ref3$theme=_ref3.theme,baseUnit2=_ref3$theme.spacing.baseUnit,colors2=_ref3$theme.colors;return _objectSpread2({label:"indicatorContainer",display:"flex",transition:"color 150ms"},unstyled?{}:{color:isFocused?colors2.neutral60:colors2.neutral20,padding:baseUnit2*2,":hover":{color:isFocused?colors2.neutral80:colors2.neutral40}})};var dropdownIndicatorCSS=baseCSS;var DropdownIndicator=function DropdownIndicator2(props){var children=props.children,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"dropdownIndicator",{indicator:true,"dropdown-indicator":true}),innerProps),children||jsx(DownChevron,null))};var clearIndicatorCSS=baseCSS;var ClearIndicator=function ClearIndicator2(props){var children=props.children,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"clearIndicator",{indicator:true,"clear-indicator":true}),innerProps),children||jsx(CrossIcon,null))};var indicatorSeparatorCSS=function indicatorSeparatorCSS2(_ref4,unstyled){var isDisabled=_ref4.isDisabled,_ref4$theme=_ref4.theme,baseUnit2=_ref4$theme.spacing.baseUnit,colors2=_ref4$theme.colors;return _objectSpread2({label:"indicatorSeparator",alignSelf:"stretch",width:1},unstyled?{}:{backgroundColor:isDisabled?colors2.neutral10:colors2.neutral20,marginBottom:baseUnit2*2,marginTop:baseUnit2*2})};var IndicatorSeparator=function IndicatorSeparator2(props){var innerProps=props.innerProps;return jsx("span",_extends({},innerProps,getStyleProps(props,"indicatorSeparator",{"indicator-separator":true})))};var loadingDotAnimations=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"])));var loadingIndicatorCSS=function loadingIndicatorCSS2(_ref5,unstyled){var isFocused=_ref5.isFocused,size=_ref5.size,_ref5$theme=_ref5.theme,colors2=_ref5$theme.colors,baseUnit2=_ref5$theme.spacing.baseUnit;return _objectSpread2({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:size,lineHeight:1,marginRight:size,textAlign:"center",verticalAlign:"middle"},unstyled?{}:{color:isFocused?colors2.neutral60:colors2.neutral20,padding:baseUnit2*2})};var LoadingDot=function LoadingDot2(_ref6){var delay=_ref6.delay,offset2=_ref6.offset;return jsx("span",{css:css({animation:"".concat(loadingDotAnimations," 1s ease-in-out ").concat(delay,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:offset2?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})};var LoadingIndicator=function LoadingIndicator2(_ref7){var innerProps=_ref7.innerProps,isRtl=_ref7.isRtl,_ref7$size=_ref7.size,size=_ref7$size===void 0?4:_ref7$size,restProps=_objectWithoutProperties(_ref7,_excluded2);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},restProps),{},{innerProps:innerProps,isRtl:isRtl,size:size}),"loadingIndicator",{indicator:true,"loading-indicator":true}),innerProps),jsx(LoadingDot,{delay:0,offset:isRtl}),jsx(LoadingDot,{delay:160,offset:true}),jsx(LoadingDot,{delay:320,offset:!isRtl}))};var css$1=function css2(_ref3,unstyled){var isDisabled=_ref3.isDisabled,isFocused=_ref3.isFocused,_ref$theme=_ref3.theme,colors2=_ref$theme.colors,borderRadius2=_ref$theme.borderRadius,spacing2=_ref$theme.spacing;return _objectSpread2({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:spacing2.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},unstyled?{}:{backgroundColor:isDisabled?colors2.neutral5:colors2.neutral0,borderColor:isDisabled?colors2.neutral10:isFocused?colors2.primary:colors2.neutral20,borderRadius:borderRadius2,borderStyle:"solid",borderWidth:1,boxShadow:isFocused?"0 0 0 1px ".concat(colors2.primary):void 0,"&:hover":{borderColor:isFocused?colors2.primary:colors2.neutral30}})};var Control=function Control2(props){var children=props.children,isDisabled=props.isDisabled,isFocused=props.isFocused,innerRef=props.innerRef,innerProps=props.innerProps,menuIsOpen=props.menuIsOpen;return jsx("div",_extends({ref:innerRef},getStyleProps(props,"control",{control:true,"control--is-disabled":isDisabled,"control--is-focused":isFocused,"control--menu-is-open":menuIsOpen}),innerProps,{"aria-disabled":isDisabled||void 0}),children)};var Control$1=Control;var _excluded$1$1=["data"];var groupCSS=function groupCSS2(_ref3,unstyled){var spacing2=_ref3.theme.spacing;return unstyled?{}:{paddingBottom:spacing2.baseUnit*2,paddingTop:spacing2.baseUnit*2}};var Group=function Group2(props){var children=props.children,cx=props.cx,getStyles=props.getStyles,getClassNames=props.getClassNames,Heading2=props.Heading,headingProps=props.headingProps,innerProps=props.innerProps,label=props.label,theme=props.theme,selectProps=props.selectProps;return jsx("div",_extends({},getStyleProps(props,"group",{group:true}),innerProps),jsx(Heading2,_extends({},headingProps,{selectProps:selectProps,theme:theme,getStyles:getStyles,getClassNames:getClassNames,cx:cx}),label),jsx("div",null,children))};var groupHeadingCSS=function groupHeadingCSS2(_ref22,unstyled){var _ref2$theme=_ref22.theme,colors2=_ref2$theme.colors,spacing2=_ref2$theme.spacing;return _objectSpread2({label:"group",cursor:"default",display:"block"},unstyled?{}:{color:colors2.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:spacing2.baseUnit*3,paddingRight:spacing2.baseUnit*3,textTransform:"uppercase"})};var GroupHeading=function GroupHeading2(props){var _cleanCommonProps=cleanCommonProps(props);_cleanCommonProps.data;var innerProps=_objectWithoutProperties(_cleanCommonProps,_excluded$1$1);return jsx("div",_extends({},getStyleProps(props,"groupHeading",{"group-heading":true}),innerProps))};var Group$1=Group;var _excluded$5=["innerRef","isDisabled","isHidden","inputClassName"];var inputCSS=function inputCSS2(_ref3,unstyled){var isDisabled=_ref3.isDisabled,value=_ref3.value,_ref$theme=_ref3.theme,spacing2=_ref$theme.spacing,colors2=_ref$theme.colors;return _objectSpread2(_objectSpread2({visibility:isDisabled?"hidden":"visible",transform:value?"translateZ(0)":""},containerStyle),unstyled?{}:{margin:spacing2.baseUnit/2,paddingBottom:spacing2.baseUnit/2,paddingTop:spacing2.baseUnit/2,color:colors2.neutral80})};var spacingStyle={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0};var containerStyle={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_objectSpread2({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},spacingStyle)};var inputStyle=function inputStyle2(isHidden){return _objectSpread2({label:"input",color:"inherit",background:0,opacity:isHidden?0:1,width:"100%"},spacingStyle)};var Input=function Input2(props){var cx=props.cx,value=props.value;var _cleanCommonProps=cleanCommonProps(props),innerRef=_cleanCommonProps.innerRef,isDisabled=_cleanCommonProps.isDisabled,isHidden=_cleanCommonProps.isHidden,inputClassName=_cleanCommonProps.inputClassName,innerProps=_objectWithoutProperties(_cleanCommonProps,_excluded$5);return jsx("div",_extends({},getStyleProps(props,"input",{"input-container":true}),{"data-value":value||""}),jsx("input",_extends({className:cx({input:true},inputClassName),ref:innerRef,style:inputStyle(isHidden),disabled:isDisabled},innerProps)))};var Input$1=Input;var multiValueCSS=function multiValueCSS2(_ref3,unstyled){var _ref$theme=_ref3.theme,spacing2=_ref$theme.spacing,borderRadius2=_ref$theme.borderRadius,colors2=_ref$theme.colors;return _objectSpread2({label:"multiValue",display:"flex",minWidth:0},unstyled?{}:{backgroundColor:colors2.neutral10,borderRadius:borderRadius2/2,margin:spacing2.baseUnit/2})};var multiValueLabelCSS=function multiValueLabelCSS2(_ref22,unstyled){var _ref2$theme=_ref22.theme,borderRadius2=_ref2$theme.borderRadius,colors2=_ref2$theme.colors,cropWithEllipsis=_ref22.cropWithEllipsis;return _objectSpread2({overflow:"hidden",textOverflow:cropWithEllipsis||cropWithEllipsis===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},unstyled?{}:{borderRadius:borderRadius2/2,color:colors2.neutral80,fontSize:"85%",padding:3,paddingLeft:6})};var multiValueRemoveCSS=function multiValueRemoveCSS2(_ref3,unstyled){var _ref3$theme=_ref3.theme,spacing2=_ref3$theme.spacing,borderRadius2=_ref3$theme.borderRadius,colors2=_ref3$theme.colors,isFocused=_ref3.isFocused;return _objectSpread2({alignItems:"center",display:"flex"},unstyled?{}:{borderRadius:borderRadius2/2,backgroundColor:isFocused?colors2.dangerLight:void 0,paddingLeft:spacing2.baseUnit,paddingRight:spacing2.baseUnit,":hover":{backgroundColor:colors2.dangerLight,color:colors2.danger}})};var MultiValueGeneric=function MultiValueGeneric2(_ref4){var children=_ref4.children,innerProps=_ref4.innerProps;return jsx("div",innerProps,children)};var MultiValueContainer=MultiValueGeneric;var MultiValueLabel=MultiValueGeneric;function MultiValueRemove(_ref5){var children=_ref5.children,innerProps=_ref5.innerProps;return jsx("div",_extends({role:"button"},innerProps),children||jsx(CrossIcon,{size:14}))}var MultiValue$1=function MultiValue2(props){var children=props.children,components2=props.components,data=props.data,innerProps=props.innerProps,isDisabled=props.isDisabled,removeProps3=props.removeProps,selectProps=props.selectProps;var Container=components2.Container,Label=components2.Label,Remove=components2.Remove;return jsx(Container,{data:data,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(props,"multiValue",{"multi-value":true,"multi-value--is-disabled":isDisabled})),innerProps),selectProps:selectProps},jsx(Label,{data:data,innerProps:_objectSpread2({},getStyleProps(props,"multiValueLabel",{"multi-value__label":true})),selectProps:selectProps},children),jsx(Remove,{data:data,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(props,"multiValueRemove",{"multi-value__remove":true})),{},{"aria-label":"Remove ".concat(children||"option")},removeProps3),selectProps:selectProps}))};var MultiValue$1$1=MultiValue$1;var optionCSS=function optionCSS2(_ref3,unstyled){var isDisabled=_ref3.isDisabled,isFocused=_ref3.isFocused,isSelected=_ref3.isSelected,_ref$theme=_ref3.theme,spacing2=_ref$theme.spacing,colors2=_ref$theme.colors;return _objectSpread2({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},unstyled?{}:{backgroundColor:isSelected?colors2.primary:isFocused?colors2.primary25:"transparent",color:isDisabled?colors2.neutral20:isSelected?colors2.neutral0:"inherit",padding:"".concat(spacing2.baseUnit*2,"px ").concat(spacing2.baseUnit*3,"px"),":active":{backgroundColor:!isDisabled?isSelected?colors2.primary:colors2.primary50:void 0}})};var Option$1=function Option2(props){var children=props.children,isDisabled=props.isDisabled,isFocused=props.isFocused,isSelected=props.isSelected,innerRef=props.innerRef,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"option",{option:true,"option--is-disabled":isDisabled,"option--is-focused":isFocused,"option--is-selected":isSelected}),{ref:innerRef,"aria-disabled":isDisabled},innerProps),children)};var Option$1$1=Option$1;var placeholderCSS=function placeholderCSS2(_ref3,unstyled){var _ref$theme=_ref3.theme,spacing2=_ref$theme.spacing,colors2=_ref$theme.colors;return _objectSpread2({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},unstyled?{}:{color:colors2.neutral50,marginLeft:spacing2.baseUnit/2,marginRight:spacing2.baseUnit/2})};var Placeholder$1=function Placeholder2(props){var children=props.children,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"placeholder",{placeholder:true}),innerProps),children)};var Placeholder$1$1=Placeholder$1;var css22=function css3(_ref3,unstyled){var isDisabled=_ref3.isDisabled,_ref$theme=_ref3.theme,spacing2=_ref$theme.spacing,colors2=_ref$theme.colors;return _objectSpread2({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},unstyled?{}:{color:isDisabled?colors2.neutral40:colors2.neutral80,marginLeft:spacing2.baseUnit/2,marginRight:spacing2.baseUnit/2})};var SingleValue=function SingleValue2(props){var children=props.children,isDisabled=props.isDisabled,innerProps=props.innerProps;return jsx("div",_extends({},getStyleProps(props,"singleValue",{"single-value":true,"single-value--is-disabled":isDisabled}),innerProps),children)};var SingleValue$1=SingleValue;var components={ClearIndicator:ClearIndicator,Control:Control$1,DropdownIndicator:DropdownIndicator,DownChevron:DownChevron,CrossIcon:CrossIcon,Group:Group$1,GroupHeading:GroupHeading,IndicatorsContainer:IndicatorsContainer$1,IndicatorSeparator:IndicatorSeparator,Input:Input$1,LoadingIndicator:LoadingIndicator,Menu:Menu$1,MenuList:MenuList$1,MenuPortal:MenuPortal,LoadingMessage:LoadingMessage,NoOptionsMessage:NoOptionsMessage,MultiValue:MultiValue$1$1,MultiValueContainer:MultiValueContainer,MultiValueLabel:MultiValueLabel,MultiValueRemove:MultiValueRemove,Option:Option$1$1,Placeholder:Placeholder$1$1,SelectContainer:SelectContainer,SingleValue:SingleValue$1,ValueContainer:ValueContainer$1};var defaultComponents=function defaultComponents2(props){return _objectSpread2(_objectSpread2({},components),props.components)};var safeIsNaN=Number.isNaN||function ponyfill(value){return typeof value==="number"&&value!==value};function isEqual(first2,second){if(first2===second){return true}if(safeIsNaN(first2)&&safeIsNaN(second)){return true}return false}function areInputsEqual(newInputs,lastInputs){if(newInputs.length!==lastInputs.length){return false}for(var i=0;i<newInputs.length;i++){if(!isEqual(newInputs[i],lastInputs[i])){return false}}return true}function memoizeOne(resultFn,isEqual2){if(isEqual2===void 0){isEqual2=areInputsEqual}var cache=null;function memoized(){var newArgs=[];for(var _i=0;_i<arguments.length;_i++){newArgs[_i]=arguments[_i]}if(cache&&cache.lastThis===this&&isEqual2(newArgs,cache.lastArgs)){return cache.lastResult}var lastResult=resultFn.apply(this,newArgs);cache={lastResult:lastResult,lastArgs:newArgs,lastThis:this};return lastResult}memoized.clear=function clear(){cache=null};return memoized}var _ref={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"};var A11yText=function A11yText2(props){return jsx("span",_extends({css:_ref},props))};var A11yText$1=A11yText;var defaultAriaLiveMessages={guidance:function guidance(props){var isSearchable=props.isSearchable,isMulti=props.isMulti,tabSelectsValue=props.tabSelectsValue,context=props.context,isInitialFocus=props.isInitialFocus;switch(context){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(tabSelectsValue?", press Tab to select the option and exit the menu":"",".");case"input":return isInitialFocus?"".concat(props["aria-label"]||"Select"," is focused ").concat(isSearchable?",type to refine list":"",", press Down to open the menu, ").concat(isMulti?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function onChange(props){var action=props.action,_props$label=props.label,label=_props$label===void 0?"":_props$label,labels=props.labels,isDisabled=props.isDisabled;switch(action){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(label,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(labels.length>1?"s":""," ").concat(labels.join(","),", selected.");case"select-option":return isDisabled?"option ".concat(label," is disabled. Select another option."):"option ".concat(label,", selected.");default:return""}},onFocus:function onFocus(props){var context=props.context,focused=props.focused,options2=props.options,_props$label2=props.label,label=_props$label2===void 0?"":_props$label2,selectValue=props.selectValue,isDisabled=props.isDisabled,isSelected=props.isSelected,isAppleDevice2=props.isAppleDevice;var getArrayIndex=function getArrayIndex2(arr,item){return arr&&arr.length?"".concat(arr.indexOf(item)+1," of ").concat(arr.length):""};if(context==="value"&&selectValue){return"value ".concat(label," focused, ").concat(getArrayIndex(selectValue,focused),".")}if(context==="menu"&&isAppleDevice2){var disabled=isDisabled?" disabled":"";var status="".concat(isSelected?" selected":"").concat(disabled);return"".concat(label).concat(status,", ").concat(getArrayIndex(options2,focused),".")}return""},onFilter:function onFilter(props){var inputValue=props.inputValue,resultsMessage=props.resultsMessage;return"".concat(resultsMessage).concat(inputValue?" for search term "+inputValue:"",".")}};var LiveRegion=function LiveRegion2(props){var ariaSelection=props.ariaSelection,focusedOption=props.focusedOption,focusedValue=props.focusedValue,focusableOptions=props.focusableOptions,isFocused=props.isFocused,selectValue=props.selectValue,selectProps=props.selectProps,id=props.id,isAppleDevice2=props.isAppleDevice;var ariaLiveMessages=selectProps.ariaLiveMessages,getOptionLabel4=selectProps.getOptionLabel,inputValue=selectProps.inputValue,isMulti=selectProps.isMulti,isOptionDisabled3=selectProps.isOptionDisabled,isSearchable=selectProps.isSearchable,menuIsOpen=selectProps.menuIsOpen,options2=selectProps.options,screenReaderStatus2=selectProps.screenReaderStatus,tabSelectsValue=selectProps.tabSelectsValue,isLoading=selectProps.isLoading;var ariaLabel=selectProps["aria-label"];var ariaLive=selectProps["aria-live"];var messages=useMemo((function(){return _objectSpread2(_objectSpread2({},defaultAriaLiveMessages),ariaLiveMessages||{})}),[ariaLiveMessages]);var ariaSelected=useMemo((function(){var message="";if(ariaSelection&&messages.onChange){var option=ariaSelection.option,selectedOptions=ariaSelection.options,removedValue=ariaSelection.removedValue,removedValues=ariaSelection.removedValues,value=ariaSelection.value;var asOption=function asOption2(val){return!Array.isArray(val)?val:null};var selected=removedValue||option||asOption(value);var label=selected?getOptionLabel4(selected):"";var multiSelected=selectedOptions||removedValues||void 0;var labels=multiSelected?multiSelected.map(getOptionLabel4):[];var onChangeProps=_objectSpread2({isDisabled:selected&&isOptionDisabled3(selected,selectValue),label:label,labels:labels},ariaSelection);message=messages.onChange(onChangeProps)}return message}),[ariaSelection,messages,isOptionDisabled3,selectValue,getOptionLabel4]);var ariaFocused=useMemo((function(){var focusMsg="";var focused=focusedOption||focusedValue;var isSelected=!!(focusedOption&&selectValue&&selectValue.includes(focusedOption));if(focused&&messages.onFocus){var onFocusProps={focused:focused,label:getOptionLabel4(focused),isDisabled:isOptionDisabled3(focused,selectValue),isSelected:isSelected,options:focusableOptions,context:focused===focusedOption?"menu":"value",selectValue:selectValue,isAppleDevice:isAppleDevice2};focusMsg=messages.onFocus(onFocusProps)}return focusMsg}),[focusedOption,focusedValue,getOptionLabel4,isOptionDisabled3,messages,focusableOptions,selectValue,isAppleDevice2]);var ariaResults=useMemo((function(){var resultsMsg="";if(menuIsOpen&&options2.length&&!isLoading&&messages.onFilter){var resultsMessage=screenReaderStatus2({count:focusableOptions.length});resultsMsg=messages.onFilter({inputValue:inputValue,resultsMessage:resultsMessage})}return resultsMsg}),[focusableOptions,inputValue,menuIsOpen,messages,options2,screenReaderStatus2,isLoading]);var isInitialFocus=(ariaSelection===null||ariaSelection===void 0?void 0:ariaSelection.action)==="initial-input-focus";var ariaGuidance=useMemo((function(){var guidanceMsg="";if(messages.guidance){var context=focusedValue?"value":menuIsOpen?"menu":"input";guidanceMsg=messages.guidance({"aria-label":ariaLabel,context:context,isDisabled:focusedOption&&isOptionDisabled3(focusedOption,selectValue),isMulti:isMulti,isSearchable:isSearchable,tabSelectsValue:tabSelectsValue,isInitialFocus:isInitialFocus})}return guidanceMsg}),[ariaLabel,focusedOption,focusedValue,isMulti,isOptionDisabled3,isSearchable,menuIsOpen,messages,selectValue,tabSelectsValue,isInitialFocus]);var ScreenReaderText=jsx(Fragment$2,null,jsx("span",{id:"aria-selection"},ariaSelected),jsx("span",{id:"aria-focused"},ariaFocused),jsx("span",{id:"aria-results"},ariaResults),jsx("span",{id:"aria-guidance"},ariaGuidance));return jsx(Fragment$2,null,jsx(A11yText$1,{id:id},isInitialFocus&&ScreenReaderText),jsx(A11yText$1,{"aria-live":ariaLive,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},isFocused&&!isInitialFocus&&ScreenReaderText))};var LiveRegion$1=LiveRegion;var diacritics=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}];var anyDiacritic=new RegExp("["+diacritics.map((function(d){return d.letters})).join("")+"]","g");var diacriticToBase={};for(var i=0;i<diacritics.length;i++){var diacritic=diacritics[i];for(var j=0;j<diacritic.letters.length;j++){diacriticToBase[diacritic.letters[j]]=diacritic.base}}var stripDiacritics=function stripDiacritics2(str){return str.replace(anyDiacritic,(function(match2){return diacriticToBase[match2]}))};var memoizedStripDiacriticsForInput=memoizeOne(stripDiacritics);var trimString=function trimString2(str){return str.replace(/^\s+|\s+$/g,"")};var defaultStringify=function defaultStringify2(option){return"".concat(option.label," ").concat(option.value)};var createFilter=function createFilter2(config){return function(option,rawInput){if(option.data.__isNew__)return true;var _ignoreCase$ignoreAcc=_objectSpread2({ignoreCase:true,ignoreAccents:true,stringify:defaultStringify,trim:true,matchFrom:"any"},config),ignoreCase=_ignoreCase$ignoreAcc.ignoreCase,ignoreAccents=_ignoreCase$ignoreAcc.ignoreAccents,stringify2=_ignoreCase$ignoreAcc.stringify,trim2=_ignoreCase$ignoreAcc.trim,matchFrom=_ignoreCase$ignoreAcc.matchFrom;var input=trim2?trimString(rawInput):rawInput;var candidate=trim2?trimString(stringify2(option)):stringify2(option);if(ignoreCase){input=input.toLowerCase();candidate=candidate.toLowerCase()}if(ignoreAccents){input=memoizedStripDiacriticsForInput(input);candidate=stripDiacritics(candidate)}return matchFrom==="start"?candidate.substr(0,input.length)===input:candidate.indexOf(input)>-1}};var _excluded$2=["innerRef"];function DummyInput(_ref3){var innerRef=_ref3.innerRef,props=_objectWithoutProperties(_ref3,_excluded$2);var filteredProps=removeProps(props,"onExited","in","enter","exit","appear");return jsx("input",_extends({ref:innerRef},filteredProps,{css:css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var cancelScroll=function cancelScroll2(event2){if(event2.cancelable)event2.preventDefault();event2.stopPropagation()};function useScrollCapture(_ref3){var isEnabled=_ref3.isEnabled,onBottomArrive=_ref3.onBottomArrive,onBottomLeave=_ref3.onBottomLeave,onTopArrive=_ref3.onTopArrive,onTopLeave=_ref3.onTopLeave;var isBottom=useRef(false);var isTop=useRef(false);var touchStart=useRef(0);var scrollTarget=useRef(null);var handleEventDelta=useCallback((function(event2,delta){if(scrollTarget.current===null)return;var _scrollTarget$current=scrollTarget.current,scrollTop=_scrollTarget$current.scrollTop,scrollHeight=_scrollTarget$current.scrollHeight,clientHeight=_scrollTarget$current.clientHeight;var target=scrollTarget.current;var isDeltaPositive=delta>0;var availableScroll=scrollHeight-clientHeight-scrollTop;var shouldCancelScroll=false;if(availableScroll>delta&&isBottom.current){if(onBottomLeave)onBottomLeave(event2);isBottom.current=false}if(isDeltaPositive&&isTop.current){if(onTopLeave)onTopLeave(event2);isTop.current=false}if(isDeltaPositive&&delta>availableScroll){if(onBottomArrive&&!isBottom.current){onBottomArrive(event2)}target.scrollTop=scrollHeight;shouldCancelScroll=true;isBottom.current=true}else if(!isDeltaPositive&&-delta>scrollTop){if(onTopArrive&&!isTop.current){onTopArrive(event2)}target.scrollTop=0;shouldCancelScroll=true;isTop.current=true}if(shouldCancelScroll){cancelScroll(event2)}}),[onBottomArrive,onBottomLeave,onTopArrive,onTopLeave]);var onWheel=useCallback((function(event2){handleEventDelta(event2,event2.deltaY)}),[handleEventDelta]);var onTouchStart=useCallback((function(event2){touchStart.current=event2.changedTouches[0].clientY}),[]);var onTouchMove=useCallback((function(event2){var deltaY=touchStart.current-event2.changedTouches[0].clientY;handleEventDelta(event2,deltaY)}),[handleEventDelta]);var startListening=useCallback((function(el){if(!el)return;var notPassive=supportsPassiveEvents?{passive:false}:false;el.addEventListener("wheel",onWheel,notPassive);el.addEventListener("touchstart",onTouchStart,notPassive);el.addEventListener("touchmove",onTouchMove,notPassive)}),[onTouchMove,onTouchStart,onWheel]);var stopListening=useCallback((function(el){if(!el)return;el.removeEventListener("wheel",onWheel,false);el.removeEventListener("touchstart",onTouchStart,false);el.removeEventListener("touchmove",onTouchMove,false)}),[onTouchMove,onTouchStart,onWheel]);useEffect((function(){if(!isEnabled)return;var element=scrollTarget.current;startListening(element);return function(){stopListening(element)}}),[isEnabled,startListening,stopListening]);return function(element){scrollTarget.current=element}}var STYLE_KEYS=["boxSizing","height","overflow","paddingRight","position"];var LOCK_STYLES={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function preventTouchMove(e){e.preventDefault()}function allowTouchMove(e){e.stopPropagation()}function preventInertiaScroll(){var top=this.scrollTop;var totalScroll=this.scrollHeight;var currentScroll=top+this.offsetHeight;if(top===0){this.scrollTop=1}else if(currentScroll===totalScroll){this.scrollTop=top-1}}function isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints}var canUseDOM=!!(typeof window!=="undefined"&&window.document&&window.document.createElement);var activeScrollLocks=0;var listenerOptions={capture:false,passive:false};function useScrollLock(_ref3){var isEnabled=_ref3.isEnabled,_ref$accountForScroll=_ref3.accountForScrollbars,accountForScrollbars=_ref$accountForScroll===void 0?true:_ref$accountForScroll;var originalStyles=useRef({});var scrollTarget=useRef(null);var addScrollLock=useCallback((function(touchScrollTarget){if(!canUseDOM)return;var target=document.body;var targetStyle=target&&target.style;if(accountForScrollbars){STYLE_KEYS.forEach((function(key){var val=targetStyle&&targetStyle[key];originalStyles.current[key]=val}))}if(accountForScrollbars&&activeScrollLocks<1){var currentPadding=parseInt(originalStyles.current.paddingRight,10)||0;var clientWidth=document.body?document.body.clientWidth:0;var adjustedPadding=window.innerWidth-clientWidth+currentPadding||0;Object.keys(LOCK_STYLES).forEach((function(key){var val=LOCK_STYLES[key];if(targetStyle){targetStyle[key]=val}}));if(targetStyle){targetStyle.paddingRight="".concat(adjustedPadding,"px")}}if(target&&isTouchDevice()){target.addEventListener("touchmove",preventTouchMove,listenerOptions);if(touchScrollTarget){touchScrollTarget.addEventListener("touchstart",preventInertiaScroll,listenerOptions);touchScrollTarget.addEventListener("touchmove",allowTouchMove,listenerOptions)}}activeScrollLocks+=1}),[accountForScrollbars]);var removeScrollLock=useCallback((function(touchScrollTarget){if(!canUseDOM)return;var target=document.body;var targetStyle=target&&target.style;activeScrollLocks=Math.max(activeScrollLocks-1,0);if(accountForScrollbars&&activeScrollLocks<1){STYLE_KEYS.forEach((function(key){var val=originalStyles.current[key];if(targetStyle){targetStyle[key]=val}}))}if(target&&isTouchDevice()){target.removeEventListener("touchmove",preventTouchMove,listenerOptions);if(touchScrollTarget){touchScrollTarget.removeEventListener("touchstart",preventInertiaScroll,listenerOptions);touchScrollTarget.removeEventListener("touchmove",allowTouchMove,listenerOptions)}}}),[accountForScrollbars]);useEffect((function(){if(!isEnabled)return;var element=scrollTarget.current;addScrollLock(element);return function(){removeScrollLock(element)}}),[isEnabled,addScrollLock,removeScrollLock]);return function(element){scrollTarget.current=element}}var blurSelectInput=function blurSelectInput2(event2){var element=event2.target;return element.ownerDocument.activeElement&&element.ownerDocument.activeElement.blur()};var _ref2$1={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ScrollManager(_ref3){var children=_ref3.children,lockEnabled=_ref3.lockEnabled,_ref$captureEnabled=_ref3.captureEnabled,captureEnabled=_ref$captureEnabled===void 0?true:_ref$captureEnabled,onBottomArrive=_ref3.onBottomArrive,onBottomLeave=_ref3.onBottomLeave,onTopArrive=_ref3.onTopArrive,onTopLeave=_ref3.onTopLeave;var setScrollCaptureTarget=useScrollCapture({isEnabled:captureEnabled,onBottomArrive:onBottomArrive,onBottomLeave:onBottomLeave,onTopArrive:onTopArrive,onTopLeave:onTopLeave});var setScrollLockTarget=useScrollLock({isEnabled:lockEnabled});var targetRef=function targetRef2(element){setScrollCaptureTarget(element);setScrollLockTarget(element)};return jsx(Fragment$2,null,lockEnabled&&jsx("div",{onClick:blurSelectInput,css:_ref2$1}),children(targetRef))}var _ref2={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"};var RequiredInput=function RequiredInput2(_ref3){var name=_ref3.name,onFocus2=_ref3.onFocus;return jsx("input",{required:true,name:name,tabIndex:-1,"aria-hidden":"true",onFocus:onFocus2,css:_ref2,value:"",onChange:function onChange2(){}})};var RequiredInput$1=RequiredInput;function testPlatform(re){var _window$navigator$use;return typeof window!=="undefined"&&window.navigator!=null?re.test(((_window$navigator$use=window.navigator["userAgentData"])===null||_window$navigator$use===void 0?void 0:_window$navigator$use.platform)||window.navigator.platform):false}function isIPhone(){return testPlatform(/^iPhone/i)}function isMac(){return testPlatform(/^Mac/i)}function isIPad(){return testPlatform(/^iPad/i)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function isAppleDevice(){return isMac()||isIOS()}var formatGroupLabel=function formatGroupLabel2(group){return group.label};var getOptionLabel$1=function getOptionLabel(option){return option.label};var getOptionValue$1=function getOptionValue(option){return option.value};var isOptionDisabled=function isOptionDisabled2(option){return!!option.isDisabled};var defaultStyles={clearIndicator:clearIndicatorCSS,container:containerCSS,control:css$1,dropdownIndicator:dropdownIndicatorCSS,group:groupCSS,groupHeading:groupHeadingCSS,indicatorsContainer:indicatorsContainerCSS,indicatorSeparator:indicatorSeparatorCSS,input:inputCSS,loadingIndicator:loadingIndicatorCSS,loadingMessage:loadingMessageCSS,menu:menuCSS,menuList:menuListCSS,menuPortal:menuPortalCSS,multiValue:multiValueCSS,multiValueLabel:multiValueLabelCSS,multiValueRemove:multiValueRemoveCSS,noOptionsMessage:noOptionsMessageCSS,option:optionCSS,placeholder:placeholderCSS,singleValue:css22,valueContainer:valueContainerCSS};var colors={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"};var borderRadius=4;var baseUnit=4;var controlHeight=38;var menuGutter=baseUnit*2;var spacing={baseUnit:baseUnit,controlHeight:controlHeight,menuGutter:menuGutter};var defaultTheme={borderRadius:borderRadius,colors:colors,spacing:spacing};var defaultProps={"aria-live":"polite",backspaceRemovesValue:true,blurInputOnSelect:isTouchCapable(),captureMenuScroll:!isTouchCapable(),classNames:{},closeMenuOnSelect:true,closeMenuOnScroll:false,components:{},controlShouldRenderValue:true,escapeClearsValue:false,filterOption:createFilter(),formatGroupLabel:formatGroupLabel,getOptionLabel:getOptionLabel$1,getOptionValue:getOptionValue$1,isDisabled:false,isLoading:false,isMulti:false,isRtl:false,isSearchable:true,isOptionDisabled:isOptionDisabled,loadingMessage:function loadingMessage(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:false,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:false,menuShouldScrollIntoView:!isMobileDevice(),noOptionsMessage:function noOptionsMessage(){return"No options"},openMenuOnFocus:false,openMenuOnClick:true,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function screenReaderStatus(_ref3){var count2=_ref3.count;return"".concat(count2," result").concat(count2!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:true,unstyled:false};function toCategorizedOption(props,option,selectValue,index2){var isDisabled=_isOptionDisabled(props,option,selectValue);var isSelected=_isOptionSelected(props,option,selectValue);var label=getOptionLabel2(props,option);var value=getOptionValue2(props,option);return{type:"option",data:option,isDisabled:isDisabled,isSelected:isSelected,label:label,value:value,index:index2}}function buildCategorizedOptions(props,selectValue){return props.options.map((function(groupOrOption,groupOrOptionIndex){if("options"in groupOrOption){var categorizedOptions=groupOrOption.options.map((function(option,optionIndex){return toCategorizedOption(props,option,selectValue,optionIndex)})).filter((function(categorizedOption2){return isFocusable(props,categorizedOption2)}));return categorizedOptions.length>0?{type:"group",data:groupOrOption,options:categorizedOptions,index:groupOrOptionIndex}:void 0}var categorizedOption=toCategorizedOption(props,groupOrOption,selectValue,groupOrOptionIndex);return isFocusable(props,categorizedOption)?categorizedOption:void 0})).filter(notNullish)}function buildFocusableOptionsFromCategorizedOptions(categorizedOptions){return categorizedOptions.reduce((function(optionsAccumulator,categorizedOption){if(categorizedOption.type==="group"){optionsAccumulator.push.apply(optionsAccumulator,_toConsumableArray(categorizedOption.options.map((function(option){return option.data}))))}else{optionsAccumulator.push(categorizedOption.data)}return optionsAccumulator}),[])}function buildFocusableOptionsWithIds(categorizedOptions,optionId){return categorizedOptions.reduce((function(optionsAccumulator,categorizedOption){if(categorizedOption.type==="group"){optionsAccumulator.push.apply(optionsAccumulator,_toConsumableArray(categorizedOption.options.map((function(option){return{data:option.data,id:"".concat(optionId,"-").concat(categorizedOption.index,"-").concat(option.index)}}))))}else{optionsAccumulator.push({data:categorizedOption.data,id:"".concat(optionId,"-").concat(categorizedOption.index)})}return optionsAccumulator}),[])}function buildFocusableOptions(props,selectValue){return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props,selectValue))}function isFocusable(props,categorizedOption){var _props$inputValue=props.inputValue,inputValue=_props$inputValue===void 0?"":_props$inputValue;var data=categorizedOption.data,isSelected=categorizedOption.isSelected,label=categorizedOption.label,value=categorizedOption.value;return(!shouldHideSelectedOptions(props)||!isSelected)&&_filterOption(props,{label:label,value:value,data:data},inputValue)}function getNextFocusedValue(state,nextSelectValue){var focusedValue=state.focusedValue,lastSelectValue=state.selectValue;var lastFocusedIndex=lastSelectValue.indexOf(focusedValue);if(lastFocusedIndex>-1){var nextFocusedIndex=nextSelectValue.indexOf(focusedValue);if(nextFocusedIndex>-1){return focusedValue}else if(lastFocusedIndex<nextSelectValue.length){return nextSelectValue[lastFocusedIndex]}}return null}function getNextFocusedOption(state,options2){var lastFocusedOption=state.focusedOption;return lastFocusedOption&&options2.indexOf(lastFocusedOption)>-1?lastFocusedOption:options2[0]}var getFocusedOptionId=function getFocusedOptionId2(focusableOptionsWithIds,focusedOption){var _focusableOptionsWith;var focusedOptionId=(_focusableOptionsWith=focusableOptionsWithIds.find((function(option){return option.data===focusedOption})))===null||_focusableOptionsWith===void 0?void 0:_focusableOptionsWith.id;return focusedOptionId||null};var getOptionLabel2=function getOptionLabel3(props,data){return props.getOptionLabel(data)};var getOptionValue2=function getOptionValue3(props,data){return props.getOptionValue(data)};function _isOptionDisabled(props,option,selectValue){return typeof props.isOptionDisabled==="function"?props.isOptionDisabled(option,selectValue):false}function _isOptionSelected(props,option,selectValue){if(selectValue.indexOf(option)>-1)return true;if(typeof props.isOptionSelected==="function"){return props.isOptionSelected(option,selectValue)}var candidate=getOptionValue2(props,option);return selectValue.some((function(i){return getOptionValue2(props,i)===candidate}))}function _filterOption(props,option,inputValue){return props.filterOption?props.filterOption(option,inputValue):true}var shouldHideSelectedOptions=function shouldHideSelectedOptions2(props){var hideSelectedOptions=props.hideSelectedOptions,isMulti=props.isMulti;if(hideSelectedOptions===void 0)return isMulti;return hideSelectedOptions};var instanceId=1;var Select=function(_Component){_inherits(Select2,_Component);var _super=_createSuper(Select2);function Select2(_props){var _this;_classCallCheck(this,Select2);_this=_super.call(this,_props);_this.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:false,isFocused:false,selectValue:[],clearFocusValueOnUpdate:false,prevWasFocused:false,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""};_this.blockOptionHover=false;_this.isComposing=false;_this.commonProps=void 0;_this.initialTouchX=0;_this.initialTouchY=0;_this.openAfterFocus=false;_this.scrollToFocusedOptionOnUpdate=false;_this.userIsDragging=void 0;_this.isAppleDevice=isAppleDevice();_this.controlRef=null;_this.getControlRef=function(ref){_this.controlRef=ref};_this.focusedOptionRef=null;_this.getFocusedOptionRef=function(ref){_this.focusedOptionRef=ref};_this.menuListRef=null;_this.getMenuListRef=function(ref){_this.menuListRef=ref};_this.inputRef=null;_this.getInputRef=function(ref){_this.inputRef=ref};_this.focus=_this.focusInput;_this.blur=_this.blurInput;_this.onChange=function(newValue,actionMeta){var _this$props=_this.props,onChange2=_this$props.onChange,name=_this$props.name;actionMeta.name=name;_this.ariaOnChange(newValue,actionMeta);onChange2(newValue,actionMeta)};_this.setValue=function(newValue,action,option){var _this$props2=_this.props,closeMenuOnSelect=_this$props2.closeMenuOnSelect,isMulti=_this$props2.isMulti,inputValue=_this$props2.inputValue;_this.onInputChange("",{action:"set-value",prevInputValue:inputValue});if(closeMenuOnSelect){_this.setState({inputIsHiddenAfterUpdate:!isMulti});_this.onMenuClose()}_this.setState({clearFocusValueOnUpdate:true});_this.onChange(newValue,{action:action,option:option})};_this.selectOption=function(newValue){var _this$props3=_this.props,blurInputOnSelect=_this$props3.blurInputOnSelect,isMulti=_this$props3.isMulti,name=_this$props3.name;var selectValue=_this.state.selectValue;var deselected=isMulti&&_this.isOptionSelected(newValue,selectValue);var isDisabled=_this.isOptionDisabled(newValue,selectValue);if(deselected){var candidate=_this.getOptionValue(newValue);_this.setValue(multiValueAsValue(selectValue.filter((function(i){return _this.getOptionValue(i)!==candidate}))),"deselect-option",newValue)}else if(!isDisabled){if(isMulti){_this.setValue(multiValueAsValue([].concat(_toConsumableArray(selectValue),[newValue])),"select-option",newValue)}else{_this.setValue(singleValueAsValue(newValue),"select-option")}}else{_this.ariaOnChange(singleValueAsValue(newValue),{action:"select-option",option:newValue,name:name});return}if(blurInputOnSelect){_this.blurInput()}};_this.removeValue=function(removedValue){var isMulti=_this.props.isMulti;var selectValue=_this.state.selectValue;var candidate=_this.getOptionValue(removedValue);var newValueArray=selectValue.filter((function(i){return _this.getOptionValue(i)!==candidate}));var newValue=valueTernary(isMulti,newValueArray,newValueArray[0]||null);_this.onChange(newValue,{action:"remove-value",removedValue:removedValue});_this.focusInput()};_this.clearValue=function(){var selectValue=_this.state.selectValue;_this.onChange(valueTernary(_this.props.isMulti,[],null),{action:"clear",removedValues:selectValue})};_this.popValue=function(){var isMulti=_this.props.isMulti;var selectValue=_this.state.selectValue;var lastSelectedValue=selectValue[selectValue.length-1];var newValueArray=selectValue.slice(0,selectValue.length-1);var newValue=valueTernary(isMulti,newValueArray,newValueArray[0]||null);_this.onChange(newValue,{action:"pop-value",removedValue:lastSelectedValue})};_this.getFocusedOptionId=function(focusedOption){return getFocusedOptionId(_this.state.focusableOptionsWithIds,focusedOption)};_this.getFocusableOptionsWithIds=function(){return buildFocusableOptionsWithIds(buildCategorizedOptions(_this.props,_this.state.selectValue),_this.getElementId("option"))};_this.getValue=function(){return _this.state.selectValue};_this.cx=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return classNames.apply(void 0,[_this.props.classNamePrefix].concat(args))};_this.getOptionLabel=function(data){return getOptionLabel2(_this.props,data)};_this.getOptionValue=function(data){return getOptionValue2(_this.props,data)};_this.getStyles=function(key,props){var unstyled=_this.props.unstyled;var base2=defaultStyles[key](props,unstyled);base2.boxSizing="border-box";var custom=_this.props.styles[key];return custom?custom(base2,props):base2};_this.getClassNames=function(key,props){var _this$props$className,_this$props$className2;return(_this$props$className=(_this$props$className2=_this.props.classNames)[key])===null||_this$props$className===void 0?void 0:_this$props$className.call(_this$props$className2,props)};_this.getElementId=function(element){return"".concat(_this.state.instancePrefix,"-").concat(element)};_this.getComponents=function(){return defaultComponents(_this.props)};_this.buildCategorizedOptions=function(){return buildCategorizedOptions(_this.props,_this.state.selectValue)};_this.getCategorizedOptions=function(){return _this.props.menuIsOpen?_this.buildCategorizedOptions():[]};_this.buildFocusableOptions=function(){return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions())};_this.getFocusableOptions=function(){return _this.props.menuIsOpen?_this.buildFocusableOptions():[]};_this.ariaOnChange=function(value,actionMeta){_this.setState({ariaSelection:_objectSpread2({value:value},actionMeta)})};_this.onMenuMouseDown=function(event2){if(event2.button!==0){return}event2.stopPropagation();event2.preventDefault();_this.focusInput()};_this.onMenuMouseMove=function(event2){_this.blockOptionHover=false};_this.onControlMouseDown=function(event2){if(event2.defaultPrevented){return}var openMenuOnClick=_this.props.openMenuOnClick;if(!_this.state.isFocused){if(openMenuOnClick){_this.openAfterFocus=true}_this.focusInput()}else if(!_this.props.menuIsOpen){if(openMenuOnClick){_this.openMenu("first")}}else{if(event2.target.tagName!=="INPUT"&&event2.target.tagName!=="TEXTAREA"){_this.onMenuClose()}}if(event2.target.tagName!=="INPUT"&&event2.target.tagName!=="TEXTAREA"){event2.preventDefault()}};_this.onDropdownIndicatorMouseDown=function(event2){if(event2&&event2.type==="mousedown"&&event2.button!==0){return}if(_this.props.isDisabled)return;var _this$props4=_this.props,isMulti=_this$props4.isMulti,menuIsOpen=_this$props4.menuIsOpen;_this.focusInput();if(menuIsOpen){_this.setState({inputIsHiddenAfterUpdate:!isMulti});_this.onMenuClose()}else{_this.openMenu("first")}event2.preventDefault()};_this.onClearIndicatorMouseDown=function(event2){if(event2&&event2.type==="mousedown"&&event2.button!==0){return}_this.clearValue();event2.preventDefault();_this.openAfterFocus=false;if(event2.type==="touchend"){_this.focusInput()}else{setTimeout((function(){return _this.focusInput()}))}};_this.onScroll=function(event2){if(typeof _this.props.closeMenuOnScroll==="boolean"){if(event2.target instanceof HTMLElement&&isDocumentElement(event2.target)){_this.props.onMenuClose()}}else if(typeof _this.props.closeMenuOnScroll==="function"){if(_this.props.closeMenuOnScroll(event2)){_this.props.onMenuClose()}}};_this.onCompositionStart=function(){_this.isComposing=true};_this.onCompositionEnd=function(){_this.isComposing=false};_this.onTouchStart=function(_ref22){var touches=_ref22.touches;var touch=touches&&touches.item(0);if(!touch){return}_this.initialTouchX=touch.clientX;_this.initialTouchY=touch.clientY;_this.userIsDragging=false};_this.onTouchMove=function(_ref3){var touches=_ref3.touches;var touch=touches&&touches.item(0);if(!touch){return}var deltaX=Math.abs(touch.clientX-_this.initialTouchX);var deltaY=Math.abs(touch.clientY-_this.initialTouchY);var moveThreshold=5;_this.userIsDragging=deltaX>moveThreshold||deltaY>moveThreshold};_this.onTouchEnd=function(event2){if(_this.userIsDragging)return;if(_this.controlRef&&!_this.controlRef.contains(event2.target)&&_this.menuListRef&&!_this.menuListRef.contains(event2.target)){_this.blurInput()}_this.initialTouchX=0;_this.initialTouchY=0};_this.onControlTouchEnd=function(event2){if(_this.userIsDragging)return;_this.onControlMouseDown(event2)};_this.onClearIndicatorTouchEnd=function(event2){if(_this.userIsDragging)return;_this.onClearIndicatorMouseDown(event2)};_this.onDropdownIndicatorTouchEnd=function(event2){if(_this.userIsDragging)return;_this.onDropdownIndicatorMouseDown(event2)};_this.handleInputChange=function(event2){var prevInputValue=_this.props.inputValue;var inputValue=event2.currentTarget.value;_this.setState({inputIsHiddenAfterUpdate:false});_this.onInputChange(inputValue,{action:"input-change",prevInputValue:prevInputValue});if(!_this.props.menuIsOpen){_this.onMenuOpen()}};_this.onInputFocus=function(event2){if(_this.props.onFocus){_this.props.onFocus(event2)}_this.setState({inputIsHiddenAfterUpdate:false,isFocused:true});if(_this.openAfterFocus||_this.props.openMenuOnFocus){_this.openMenu("first")}_this.openAfterFocus=false};_this.onInputBlur=function(event2){var prevInputValue=_this.props.inputValue;if(_this.menuListRef&&_this.menuListRef.contains(document.activeElement)){_this.inputRef.focus();return}if(_this.props.onBlur){_this.props.onBlur(event2)}_this.onInputChange("",{action:"input-blur",prevInputValue:prevInputValue});_this.onMenuClose();_this.setState({focusedValue:null,isFocused:false})};_this.onOptionHover=function(focusedOption){if(_this.blockOptionHover||_this.state.focusedOption===focusedOption){return}var options2=_this.getFocusableOptions();var focusedOptionIndex=options2.indexOf(focusedOption);_this.setState({focusedOption:focusedOption,focusedOptionId:focusedOptionIndex>-1?_this.getFocusedOptionId(focusedOption):null})};_this.shouldHideSelectedOptions=function(){return shouldHideSelectedOptions(_this.props)};_this.onValueInputFocus=function(e){e.preventDefault();e.stopPropagation();_this.focus()};_this.onKeyDown=function(event2){var _this$props5=_this.props,isMulti=_this$props5.isMulti,backspaceRemovesValue=_this$props5.backspaceRemovesValue,escapeClearsValue=_this$props5.escapeClearsValue,inputValue=_this$props5.inputValue,isClearable=_this$props5.isClearable,isDisabled=_this$props5.isDisabled,menuIsOpen=_this$props5.menuIsOpen,onKeyDown=_this$props5.onKeyDown,tabSelectsValue=_this$props5.tabSelectsValue,openMenuOnFocus=_this$props5.openMenuOnFocus;var _this$state=_this.state,focusedOption=_this$state.focusedOption,focusedValue=_this$state.focusedValue,selectValue=_this$state.selectValue;if(isDisabled)return;if(typeof onKeyDown==="function"){onKeyDown(event2);if(event2.defaultPrevented){return}}_this.blockOptionHover=true;switch(event2.key){case"ArrowLeft":if(!isMulti||inputValue)return;_this.focusValue("previous");break;case"ArrowRight":if(!isMulti||inputValue)return;_this.focusValue("next");break;case"Delete":case"Backspace":if(inputValue)return;if(focusedValue){_this.removeValue(focusedValue)}else{if(!backspaceRemovesValue)return;if(isMulti){_this.popValue()}else if(isClearable){_this.clearValue()}}break;case"Tab":if(_this.isComposing)return;if(event2.shiftKey||!menuIsOpen||!tabSelectsValue||!focusedOption||openMenuOnFocus&&_this.isOptionSelected(focusedOption,selectValue)){return}_this.selectOption(focusedOption);break;case"Enter":if(event2.keyCode===229){break}if(menuIsOpen){if(!focusedOption)return;if(_this.isComposing)return;_this.selectOption(focusedOption);break}return;case"Escape":if(menuIsOpen){_this.setState({inputIsHiddenAfterUpdate:false});_this.onInputChange("",{action:"menu-close",prevInputValue:inputValue});_this.onMenuClose()}else if(isClearable&&escapeClearsValue){_this.clearValue()}break;case" ":if(inputValue){return}if(!menuIsOpen){_this.openMenu("first");break}if(!focusedOption)return;_this.selectOption(focusedOption);break;case"ArrowUp":if(menuIsOpen){_this.focusOption("up")}else{_this.openMenu("last")}break;case"ArrowDown":if(menuIsOpen){_this.focusOption("down")}else{_this.openMenu("first")}break;case"PageUp":if(!menuIsOpen)return;_this.focusOption("pageup");break;case"PageDown":if(!menuIsOpen)return;_this.focusOption("pagedown");break;case"Home":if(!menuIsOpen)return;_this.focusOption("first");break;case"End":if(!menuIsOpen)return;_this.focusOption("last");break;default:return}event2.preventDefault()};_this.state.instancePrefix="react-select-"+(_this.props.instanceId||++instanceId);_this.state.selectValue=cleanValue(_props.value);if(_props.menuIsOpen&&_this.state.selectValue.length){var focusableOptionsWithIds=_this.getFocusableOptionsWithIds();var focusableOptions=_this.buildFocusableOptions();var optionIndex=focusableOptions.indexOf(_this.state.selectValue[0]);_this.state.focusableOptionsWithIds=focusableOptionsWithIds;_this.state.focusedOption=focusableOptions[optionIndex];_this.state.focusedOptionId=getFocusedOptionId(focusableOptionsWithIds,focusableOptions[optionIndex])}return _this}_createClass(Select2,[{key:"componentDidMount",value:function componentDidMount(){this.startListeningComposition();this.startListeningToTouch();if(this.props.closeMenuOnScroll&&document&&document.addEventListener){document.addEventListener("scroll",this.onScroll,true)}if(this.props.autoFocus){this.focusInput()}if(this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef){scrollIntoView(this.menuListRef,this.focusedOptionRef)}}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props6=this.props,isDisabled=_this$props6.isDisabled,menuIsOpen=_this$props6.menuIsOpen;var isFocused=this.state.isFocused;if(isFocused&&!isDisabled&&prevProps.isDisabled||isFocused&&menuIsOpen&&!prevProps.menuIsOpen){this.focusInput()}if(isFocused&&isDisabled&&!prevProps.isDisabled){this.setState({isFocused:false},this.onMenuClose)}else if(!isFocused&&!isDisabled&&prevProps.isDisabled&&this.inputRef===document.activeElement){this.setState({isFocused:true})}if(this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate){scrollIntoView(this.menuListRef,this.focusedOptionRef);this.scrollToFocusedOptionOnUpdate=false}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.stopListeningComposition();this.stopListeningToTouch();document.removeEventListener("scroll",this.onScroll,true)}},{key:"onMenuOpen",value:function onMenuOpen(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function onMenuClose(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue});this.props.onMenuClose()}},{key:"onInputChange",value:function onInputChange(newValue,actionMeta){this.props.onInputChange(newValue,actionMeta)}},{key:"focusInput",value:function focusInput(){if(!this.inputRef)return;this.inputRef.focus()}},{key:"blurInput",value:function blurInput(){if(!this.inputRef)return;this.inputRef.blur()}},{key:"openMenu",value:function openMenu(focusOption){var _this2=this;var _this$state2=this.state,selectValue=_this$state2.selectValue,isFocused=_this$state2.isFocused;var focusableOptions=this.buildFocusableOptions();var openAtIndex=focusOption==="first"?0:focusableOptions.length-1;if(!this.props.isMulti){var selectedIndex=focusableOptions.indexOf(selectValue[0]);if(selectedIndex>-1){openAtIndex=selectedIndex}}this.scrollToFocusedOptionOnUpdate=!(isFocused&&this.menuListRef);this.setState({inputIsHiddenAfterUpdate:false,focusedValue:null,focusedOption:focusableOptions[openAtIndex],focusedOptionId:this.getFocusedOptionId(focusableOptions[openAtIndex])},(function(){return _this2.onMenuOpen()}))}},{key:"focusValue",value:function focusValue(direction){var _this$state3=this.state,selectValue=_this$state3.selectValue,focusedValue=_this$state3.focusedValue;if(!this.props.isMulti)return;this.setState({focusedOption:null});var focusedIndex=selectValue.indexOf(focusedValue);if(!focusedValue){focusedIndex=-1}var lastIndex=selectValue.length-1;var nextFocus=-1;if(!selectValue.length)return;switch(direction){case"previous":if(focusedIndex===0){nextFocus=0}else if(focusedIndex===-1){nextFocus=lastIndex}else{nextFocus=focusedIndex-1}break;case"next":if(focusedIndex>-1&&focusedIndex<lastIndex){nextFocus=focusedIndex+1}break}this.setState({inputIsHidden:nextFocus!==-1,focusedValue:selectValue[nextFocus]})}},{key:"focusOption",value:function focusOption(){var direction=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first";var pageSize=this.props.pageSize;var focusedOption=this.state.focusedOption;var options2=this.getFocusableOptions();if(!options2.length)return;var nextFocus=0;var focusedIndex=options2.indexOf(focusedOption);if(!focusedOption){focusedIndex=-1}if(direction==="up"){nextFocus=focusedIndex>0?focusedIndex-1:options2.length-1}else if(direction==="down"){nextFocus=(focusedIndex+1)%options2.length}else if(direction==="pageup"){nextFocus=focusedIndex-pageSize;if(nextFocus<0)nextFocus=0}else if(direction==="pagedown"){nextFocus=focusedIndex+pageSize;if(nextFocus>options2.length-1)nextFocus=options2.length-1}else if(direction==="last"){nextFocus=options2.length-1}this.scrollToFocusedOptionOnUpdate=true;this.setState({focusedOption:options2[nextFocus],focusedValue:null,focusedOptionId:this.getFocusedOptionId(options2[nextFocus])})}},{key:"getTheme",value:function getTheme(){if(!this.props.theme){return defaultTheme}if(typeof this.props.theme==="function"){return this.props.theme(defaultTheme)}return _objectSpread2(_objectSpread2({},defaultTheme),this.props.theme)}},{key:"getCommonProps",value:function getCommonProps(){var clearValue=this.clearValue,cx=this.cx,getStyles=this.getStyles,getClassNames=this.getClassNames,getValue=this.getValue,selectOption=this.selectOption,setValue=this.setValue,props=this.props;var isMulti=props.isMulti,isRtl=props.isRtl,options2=props.options;var hasValue=this.hasValue();return{clearValue:clearValue,cx:cx,getStyles:getStyles,getClassNames:getClassNames,getValue:getValue,hasValue:hasValue,isMulti:isMulti,isRtl:isRtl,options:options2,selectOption:selectOption,selectProps:props,setValue:setValue,theme:this.getTheme()}}},{key:"hasValue",value:function hasValue(){var selectValue=this.state.selectValue;return selectValue.length>0}},{key:"hasOptions",value:function hasOptions(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function isClearable(){var _this$props7=this.props,isClearable2=_this$props7.isClearable,isMulti=_this$props7.isMulti;if(isClearable2===void 0)return isMulti;return isClearable2}},{key:"isOptionDisabled",value:function isOptionDisabled3(option,selectValue){return _isOptionDisabled(this.props,option,selectValue)}},{key:"isOptionSelected",value:function isOptionSelected(option,selectValue){return _isOptionSelected(this.props,option,selectValue)}},{key:"filterOption",value:function filterOption(option,inputValue){return _filterOption(this.props,option,inputValue)}},{key:"formatOptionLabel",value:function formatOptionLabel(data,context){if(typeof this.props.formatOptionLabel==="function"){var _inputValue=this.props.inputValue;var _selectValue=this.state.selectValue;return this.props.formatOptionLabel(data,{context:context,inputValue:_inputValue,selectValue:_selectValue})}else{return this.getOptionLabel(data)}}},{key:"formatGroupLabel",value:function formatGroupLabel3(data){return this.props.formatGroupLabel(data)}},{key:"startListeningComposition",value:function startListeningComposition(){if(document&&document.addEventListener){document.addEventListener("compositionstart",this.onCompositionStart,false);document.addEventListener("compositionend",this.onCompositionEnd,false)}}},{key:"stopListeningComposition",value:function stopListeningComposition(){if(document&&document.removeEventListener){document.removeEventListener("compositionstart",this.onCompositionStart);document.removeEventListener("compositionend",this.onCompositionEnd)}}},{key:"startListeningToTouch",value:function startListeningToTouch(){if(document&&document.addEventListener){document.addEventListener("touchstart",this.onTouchStart,false);document.addEventListener("touchmove",this.onTouchMove,false);document.addEventListener("touchend",this.onTouchEnd,false)}}},{key:"stopListeningToTouch",value:function stopListeningToTouch(){if(document&&document.removeEventListener){document.removeEventListener("touchstart",this.onTouchStart);document.removeEventListener("touchmove",this.onTouchMove);document.removeEventListener("touchend",this.onTouchEnd)}}},{key:"renderInput",value:function renderInput(){var _this$props8=this.props,isDisabled=_this$props8.isDisabled,isSearchable=_this$props8.isSearchable,inputId=_this$props8.inputId,inputValue=_this$props8.inputValue,tabIndex=_this$props8.tabIndex,form=_this$props8.form,menuIsOpen=_this$props8.menuIsOpen,required=_this$props8.required;var _this$getComponents=this.getComponents(),Input3=_this$getComponents.Input;var _this$state4=this.state,inputIsHidden=_this$state4.inputIsHidden,ariaSelection=_this$state4.ariaSelection;var commonProps=this.commonProps;var id=inputId||this.getElementId("input");var ariaAttributes=_objectSpread2(_objectSpread2(_objectSpread2({"aria-autocomplete":"list","aria-expanded":menuIsOpen,"aria-haspopup":true,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":required,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},menuIsOpen&&{"aria-controls":this.getElementId("listbox")}),!isSearchable&&{"aria-readonly":true}),this.hasValue()?(ariaSelection===null||ariaSelection===void 0?void 0:ariaSelection.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});if(!isSearchable){return React.createElement(DummyInput,_extends({id:id,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:noop,onFocus:this.onInputFocus,disabled:isDisabled,tabIndex:tabIndex,inputMode:"none",form:form,value:""},ariaAttributes))}return React.createElement(Input3,_extends({},commonProps,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:id,innerRef:this.getInputRef,isDisabled:isDisabled,isHidden:inputIsHidden,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:tabIndex,form:form,type:"text",value:inputValue},ariaAttributes))}},{key:"renderPlaceholderOrValue",value:function renderPlaceholderOrValue(){var _this3=this;var _this$getComponents2=this.getComponents(),MultiValue3=_this$getComponents2.MultiValue,MultiValueContainer2=_this$getComponents2.MultiValueContainer,MultiValueLabel2=_this$getComponents2.MultiValueLabel,MultiValueRemove2=_this$getComponents2.MultiValueRemove,SingleValue3=_this$getComponents2.SingleValue,Placeholder3=_this$getComponents2.Placeholder;var commonProps=this.commonProps;var _this$props9=this.props,controlShouldRenderValue=_this$props9.controlShouldRenderValue,isDisabled=_this$props9.isDisabled,isMulti=_this$props9.isMulti,inputValue=_this$props9.inputValue,placeholder=_this$props9.placeholder;var _this$state5=this.state,selectValue=_this$state5.selectValue,focusedValue=_this$state5.focusedValue,isFocused=_this$state5.isFocused;if(!this.hasValue()||!controlShouldRenderValue){return inputValue?null:React.createElement(Placeholder3,_extends({},commonProps,{key:"placeholder",isDisabled:isDisabled,isFocused:isFocused,innerProps:{id:this.getElementId("placeholder")}}),placeholder)}if(isMulti){return selectValue.map((function(opt,index2){var isOptionFocused=opt===focusedValue;var key="".concat(_this3.getOptionLabel(opt),"-").concat(_this3.getOptionValue(opt));return React.createElement(MultiValue3,_extends({},commonProps,{components:{Container:MultiValueContainer2,Label:MultiValueLabel2,Remove:MultiValueRemove2},isFocused:isOptionFocused,isDisabled:isDisabled,key:key,index:index2,removeProps:{onClick:function onClick(){return _this3.removeValue(opt)},onTouchEnd:function onTouchEnd(){return _this3.removeValue(opt)},onMouseDown:function onMouseDown(e){e.preventDefault()}},data:opt}),_this3.formatOptionLabel(opt,"value"))}))}if(inputValue){return null}var singleValue=selectValue[0];return React.createElement(SingleValue3,_extends({},commonProps,{data:singleValue,isDisabled:isDisabled}),this.formatOptionLabel(singleValue,"value"))}},{key:"renderClearIndicator",value:function renderClearIndicator(){var _this$getComponents3=this.getComponents(),ClearIndicator3=_this$getComponents3.ClearIndicator;var commonProps=this.commonProps;var _this$props10=this.props,isDisabled=_this$props10.isDisabled,isLoading=_this$props10.isLoading;var isFocused=this.state.isFocused;if(!this.isClearable()||!ClearIndicator3||isDisabled||!this.hasValue()||isLoading){return null}var innerProps={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return React.createElement(ClearIndicator3,_extends({},commonProps,{innerProps:innerProps,isFocused:isFocused}))}},{key:"renderLoadingIndicator",value:function renderLoadingIndicator(){var _this$getComponents4=this.getComponents(),LoadingIndicator3=_this$getComponents4.LoadingIndicator;var commonProps=this.commonProps;var _this$props11=this.props,isDisabled=_this$props11.isDisabled,isLoading=_this$props11.isLoading;var isFocused=this.state.isFocused;if(!LoadingIndicator3||!isLoading)return null;var innerProps={"aria-hidden":"true"};return React.createElement(LoadingIndicator3,_extends({},commonProps,{innerProps:innerProps,isDisabled:isDisabled,isFocused:isFocused}))}},{key:"renderIndicatorSeparator",value:function renderIndicatorSeparator(){var _this$getComponents5=this.getComponents(),DropdownIndicator3=_this$getComponents5.DropdownIndicator,IndicatorSeparator3=_this$getComponents5.IndicatorSeparator;if(!DropdownIndicator3||!IndicatorSeparator3)return null;var commonProps=this.commonProps;var isDisabled=this.props.isDisabled;var isFocused=this.state.isFocused;return React.createElement(IndicatorSeparator3,_extends({},commonProps,{isDisabled:isDisabled,isFocused:isFocused}))}},{key:"renderDropdownIndicator",value:function renderDropdownIndicator(){var _this$getComponents6=this.getComponents(),DropdownIndicator3=_this$getComponents6.DropdownIndicator;if(!DropdownIndicator3)return null;var commonProps=this.commonProps;var isDisabled=this.props.isDisabled;var isFocused=this.state.isFocused;var innerProps={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return React.createElement(DropdownIndicator3,_extends({},commonProps,{innerProps:innerProps,isDisabled:isDisabled,isFocused:isFocused}))}},{key:"renderMenu",value:function renderMenu(){var _this4=this;var _this$getComponents7=this.getComponents(),Group3=_this$getComponents7.Group,GroupHeading3=_this$getComponents7.GroupHeading,Menu3=_this$getComponents7.Menu,MenuList3=_this$getComponents7.MenuList,MenuPortal3=_this$getComponents7.MenuPortal,LoadingMessage3=_this$getComponents7.LoadingMessage,NoOptionsMessage3=_this$getComponents7.NoOptionsMessage,Option3=_this$getComponents7.Option;var commonProps=this.commonProps;var focusedOption=this.state.focusedOption;var _this$props12=this.props,captureMenuScroll=_this$props12.captureMenuScroll,inputValue=_this$props12.inputValue,isLoading=_this$props12.isLoading,loadingMessage2=_this$props12.loadingMessage,minMenuHeight=_this$props12.minMenuHeight,maxMenuHeight=_this$props12.maxMenuHeight,menuIsOpen=_this$props12.menuIsOpen,menuPlacement=_this$props12.menuPlacement,menuPosition=_this$props12.menuPosition,menuPortalTarget=_this$props12.menuPortalTarget,menuShouldBlockScroll=_this$props12.menuShouldBlockScroll,menuShouldScrollIntoView=_this$props12.menuShouldScrollIntoView,noOptionsMessage2=_this$props12.noOptionsMessage,onMenuScrollToTop=_this$props12.onMenuScrollToTop,onMenuScrollToBottom=_this$props12.onMenuScrollToBottom;if(!menuIsOpen)return null;var render=function render2(props,id){var type=props.type,data=props.data,isDisabled=props.isDisabled,isSelected=props.isSelected,label=props.label,value=props.value;var isFocused=focusedOption===data;var onHover=isDisabled?void 0:function(){return _this4.onOptionHover(data)};var onSelect=isDisabled?void 0:function(){return _this4.selectOption(data)};var optionId="".concat(_this4.getElementId("option"),"-").concat(id);var innerProps={id:optionId,onClick:onSelect,onMouseMove:onHover,onMouseOver:onHover,tabIndex:-1,role:"option","aria-selected":_this4.isAppleDevice?void 0:isSelected};return React.createElement(Option3,_extends({},commonProps,{innerProps:innerProps,data:data,isDisabled:isDisabled,isSelected:isSelected,key:optionId,label:label,type:type,value:value,isFocused:isFocused,innerRef:isFocused?_this4.getFocusedOptionRef:void 0}),_this4.formatOptionLabel(props.data,"menu"))};var menuUI;if(this.hasOptions()){menuUI=this.getCategorizedOptions().map((function(item){if(item.type==="group"){var _data=item.data,options2=item.options,groupIndex=item.index;var groupId="".concat(_this4.getElementId("group"),"-").concat(groupIndex);var headingId="".concat(groupId,"-heading");return React.createElement(Group3,_extends({},commonProps,{key:groupId,data:_data,options:options2,Heading:GroupHeading3,headingProps:{id:headingId,data:item.data},label:_this4.formatGroupLabel(item.data)}),item.options.map((function(option){return render(option,"".concat(groupIndex,"-").concat(option.index))})))}else if(item.type==="option"){return render(item,"".concat(item.index))}}))}else if(isLoading){var message=loadingMessage2({inputValue:inputValue});if(message===null)return null;menuUI=React.createElement(LoadingMessage3,commonProps,message)}else{var _message=noOptionsMessage2({inputValue:inputValue});if(_message===null)return null;menuUI=React.createElement(NoOptionsMessage3,commonProps,_message)}var menuPlacementProps={minMenuHeight:minMenuHeight,maxMenuHeight:maxMenuHeight,menuPlacement:menuPlacement,menuPosition:menuPosition,menuShouldScrollIntoView:menuShouldScrollIntoView};var menuElement=React.createElement(MenuPlacer,_extends({},commonProps,menuPlacementProps),(function(_ref4){var ref=_ref4.ref,_ref4$placerProps=_ref4.placerProps,placement=_ref4$placerProps.placement,maxHeight=_ref4$placerProps.maxHeight;return React.createElement(Menu3,_extends({},commonProps,menuPlacementProps,{innerRef:ref,innerProps:{onMouseDown:_this4.onMenuMouseDown,onMouseMove:_this4.onMenuMouseMove},isLoading:isLoading,placement:placement}),React.createElement(ScrollManager,{captureEnabled:captureMenuScroll,onTopArrive:onMenuScrollToTop,onBottomArrive:onMenuScrollToBottom,lockEnabled:menuShouldBlockScroll},(function(scrollTargetRef){return React.createElement(MenuList3,_extends({},commonProps,{innerRef:function innerRef(instance){_this4.getMenuListRef(instance);scrollTargetRef(instance)},innerProps:{role:"listbox","aria-multiselectable":commonProps.isMulti,id:_this4.getElementId("listbox")},isLoading:isLoading,maxHeight:maxHeight,focusedOption:focusedOption}),menuUI)})))}));return menuPortalTarget||menuPosition==="fixed"?React.createElement(MenuPortal3,_extends({},commonProps,{appendTo:menuPortalTarget,controlElement:this.controlRef,menuPlacement:menuPlacement,menuPosition:menuPosition}),menuElement):menuElement}},{key:"renderFormField",value:function renderFormField(){var _this5=this;var _this$props13=this.props,delimiter2=_this$props13.delimiter,isDisabled=_this$props13.isDisabled,isMulti=_this$props13.isMulti,name=_this$props13.name,required=_this$props13.required;var selectValue=this.state.selectValue;if(required&&!this.hasValue()&&!isDisabled){return React.createElement(RequiredInput$1,{name:name,onFocus:this.onValueInputFocus})}if(!name||isDisabled)return;if(isMulti){if(delimiter2){var value=selectValue.map((function(opt){return _this5.getOptionValue(opt)})).join(delimiter2);return React.createElement("input",{name:name,type:"hidden",value:value})}else{var input=selectValue.length>0?selectValue.map((function(opt,i){return React.createElement("input",{key:"i-".concat(i),name:name,type:"hidden",value:_this5.getOptionValue(opt)})})):React.createElement("input",{name:name,type:"hidden",value:""});return React.createElement("div",null,input)}}else{var _value=selectValue[0]?this.getOptionValue(selectValue[0]):"";return React.createElement("input",{name:name,type:"hidden",value:_value})}}},{key:"renderLiveRegion",value:function renderLiveRegion(){var commonProps=this.commonProps;var _this$state6=this.state,ariaSelection=_this$state6.ariaSelection,focusedOption=_this$state6.focusedOption,focusedValue=_this$state6.focusedValue,isFocused=_this$state6.isFocused,selectValue=_this$state6.selectValue;var focusableOptions=this.getFocusableOptions();return React.createElement(LiveRegion$1,_extends({},commonProps,{id:this.getElementId("live-region"),ariaSelection:ariaSelection,focusedOption:focusedOption,focusedValue:focusedValue,isFocused:isFocused,selectValue:selectValue,focusableOptions:focusableOptions,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function render(){var _this$getComponents8=this.getComponents(),Control3=_this$getComponents8.Control,IndicatorsContainer3=_this$getComponents8.IndicatorsContainer,SelectContainer3=_this$getComponents8.SelectContainer,ValueContainer3=_this$getComponents8.ValueContainer;var _this$props14=this.props,className=_this$props14.className,id=_this$props14.id,isDisabled=_this$props14.isDisabled,menuIsOpen=_this$props14.menuIsOpen;var isFocused=this.state.isFocused;var commonProps=this.commonProps=this.getCommonProps();return React.createElement(SelectContainer3,_extends({},commonProps,{className:className,innerProps:{id:id,onKeyDown:this.onKeyDown},isDisabled:isDisabled,isFocused:isFocused}),this.renderLiveRegion(),React.createElement(Control3,_extends({},commonProps,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:isDisabled,isFocused:isFocused,menuIsOpen:menuIsOpen}),React.createElement(ValueContainer3,_extends({},commonProps,{isDisabled:isDisabled}),this.renderPlaceholderOrValue(),this.renderInput()),React.createElement(IndicatorsContainer3,_extends({},commonProps,{isDisabled:isDisabled}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(props,state){var prevProps=state.prevProps,clearFocusValueOnUpdate=state.clearFocusValueOnUpdate,inputIsHiddenAfterUpdate=state.inputIsHiddenAfterUpdate,ariaSelection=state.ariaSelection,isFocused=state.isFocused,prevWasFocused=state.prevWasFocused,instancePrefix=state.instancePrefix;var options2=props.options,value=props.value,menuIsOpen=props.menuIsOpen,inputValue=props.inputValue,isMulti=props.isMulti;var selectValue=cleanValue(value);var newMenuOptionsState={};if(prevProps&&(value!==prevProps.value||options2!==prevProps.options||menuIsOpen!==prevProps.menuIsOpen||inputValue!==prevProps.inputValue)){var focusableOptions=menuIsOpen?buildFocusableOptions(props,selectValue):[];var focusableOptionsWithIds=menuIsOpen?buildFocusableOptionsWithIds(buildCategorizedOptions(props,selectValue),"".concat(instancePrefix,"-option")):[];var focusedValue=clearFocusValueOnUpdate?getNextFocusedValue(state,selectValue):null;var focusedOption=getNextFocusedOption(state,focusableOptions);var focusedOptionId=getFocusedOptionId(focusableOptionsWithIds,focusedOption);newMenuOptionsState={selectValue:selectValue,focusedOption:focusedOption,focusedOptionId:focusedOptionId,focusableOptionsWithIds:focusableOptionsWithIds,focusedValue:focusedValue,clearFocusValueOnUpdate:false}}var newInputIsHiddenState=inputIsHiddenAfterUpdate!=null&&props!==prevProps?{inputIsHidden:inputIsHiddenAfterUpdate,inputIsHiddenAfterUpdate:void 0}:{};var newAriaSelection=ariaSelection;var hasKeptFocus=isFocused&&prevWasFocused;if(isFocused&&!hasKeptFocus){newAriaSelection={value:valueTernary(isMulti,selectValue,selectValue[0]||null),options:selectValue,action:"initial-input-focus"};hasKeptFocus=!prevWasFocused}if((ariaSelection===null||ariaSelection===void 0?void 0:ariaSelection.action)==="initial-input-focus"){newAriaSelection=null}return _objectSpread2(_objectSpread2(_objectSpread2({},newMenuOptionsState),newInputIsHiddenState),{},{prevProps:props,ariaSelection:newAriaSelection,prevWasFocused:hasKeptFocus})}}]);return Select2}(Component);Select.defaultProps=defaultProps;var StateManagedSelect=forwardRef((function(props,ref){var baseSelectProps=useStateManager(props);return React.createElement(Select,_extends({ref:ref},baseSelectProps))}));var StateManagedSelect$1=StateManagedSelect;var _excluded$1=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function useAsync(_ref3){var _ref$defaultOptions=_ref3.defaultOptions,propsDefaultOptions=_ref$defaultOptions===void 0?false:_ref$defaultOptions,_ref$cacheOptions=_ref3.cacheOptions,cacheOptions=_ref$cacheOptions===void 0?false:_ref$cacheOptions,propsLoadOptions=_ref3.loadOptions;_ref3.options;var _ref$isLoading=_ref3.isLoading,propsIsLoading=_ref$isLoading===void 0?false:_ref$isLoading,propsOnInputChange=_ref3.onInputChange,_ref$filterOption=_ref3.filterOption,filterOption=_ref$filterOption===void 0?null:_ref$filterOption,restSelectProps=_objectWithoutProperties(_ref3,_excluded$1);var propsInputValue=restSelectProps.inputValue;var lastRequest=useRef(void 0);var mounted=useRef(false);var _useState=useState(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0),_useState2=_slicedToArray(_useState,2),defaultOptions=_useState2[0],setDefaultOptions=_useState2[1];var _useState3=useState(typeof propsInputValue!=="undefined"?propsInputValue:""),_useState4=_slicedToArray(_useState3,2),stateInputValue=_useState4[0],setStateInputValue=_useState4[1];var _useState5=useState(propsDefaultOptions===true),_useState6=_slicedToArray(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];var _useState7=useState(void 0),_useState8=_slicedToArray(_useState7,2),loadedInputValue=_useState8[0],setLoadedInputValue=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),loadedOptions=_useState10[0],setLoadedOptions=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),passEmptyOptions=_useState12[0],setPassEmptyOptions=_useState12[1];var _useState13=useState({}),_useState14=_slicedToArray(_useState13,2),optionsCache=_useState14[0],setOptionsCache=_useState14[1];var _useState15=useState(void 0),_useState16=_slicedToArray(_useState15,2),prevDefaultOptions=_useState16[0],setPrevDefaultOptions=_useState16[1];var _useState17=useState(void 0),_useState18=_slicedToArray(_useState17,2),prevCacheOptions=_useState18[0],setPrevCacheOptions=_useState18[1];if(cacheOptions!==prevCacheOptions){setOptionsCache({});setPrevCacheOptions(cacheOptions)}if(propsDefaultOptions!==prevDefaultOptions){setDefaultOptions(Array.isArray(propsDefaultOptions)?propsDefaultOptions:void 0);setPrevDefaultOptions(propsDefaultOptions)}useEffect((function(){mounted.current=true;return function(){mounted.current=false}}),[]);var loadOptions=useCallback((function(inputValue,callback){if(!propsLoadOptions)return callback();var loader=propsLoadOptions(inputValue,callback);if(loader&&typeof loader.then==="function"){loader.then(callback,(function(){return callback()}))}}),[propsLoadOptions]);useEffect((function(){if(propsDefaultOptions===true){loadOptions(stateInputValue,(function(options3){if(!mounted.current)return;setDefaultOptions(options3||[]);setIsLoading(!!lastRequest.current)}))}}),[]);var onInputChange=useCallback((function(newValue,actionMeta){var inputValue=handleInputChange(newValue,actionMeta,propsOnInputChange);if(!inputValue){lastRequest.current=void 0;setStateInputValue("");setLoadedInputValue("");setLoadedOptions([]);setIsLoading(false);setPassEmptyOptions(false);return}if(cacheOptions&&optionsCache[inputValue]){setStateInputValue(inputValue);setLoadedInputValue(inputValue);setLoadedOptions(optionsCache[inputValue]);setIsLoading(false);setPassEmptyOptions(false)}else{var request=lastRequest.current={};setStateInputValue(inputValue);setIsLoading(true);setPassEmptyOptions(!loadedInputValue);loadOptions(inputValue,(function(options3){if(!mounted)return;if(request!==lastRequest.current)return;lastRequest.current=void 0;setIsLoading(false);setLoadedInputValue(inputValue);setLoadedOptions(options3||[]);setPassEmptyOptions(false);setOptionsCache(options3?_objectSpread2(_objectSpread2({},optionsCache),{},_defineProperty({},inputValue,options3)):optionsCache)}))}}),[cacheOptions,loadOptions,loadedInputValue,optionsCache,propsOnInputChange]);var options2=passEmptyOptions?[]:stateInputValue&&loadedInputValue?loadedOptions:defaultOptions||[];return _objectSpread2(_objectSpread2({},restSelectProps),{},{options:options2,isLoading:isLoading||propsIsLoading,onInputChange:onInputChange,filterOption:filterOption})}var AsyncSelect=forwardRef((function(props,ref){var stateManagedProps=useAsync(props);var selectProps=useStateManager(stateManagedProps);return React.createElement(Select,_extends({ref:ref},selectProps))}));var AsyncSelect$1=AsyncSelect;var _excluded=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"];var compareOption=function compareOption2(){var inputValue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var option=arguments.length>1?arguments[1]:void 0;var accessors=arguments.length>2?arguments[2]:void 0;var candidate=String(inputValue).toLowerCase();var optionValue=String(accessors.getOptionValue(option)).toLowerCase();var optionLabel=String(accessors.getOptionLabel(option)).toLowerCase();return optionValue===candidate||optionLabel===candidate};var builtins={formatCreateLabel:function formatCreateLabel(inputValue){return'Create "'.concat(inputValue,'"')},isValidNewOption:function isValidNewOption(inputValue,selectValue,selectOptions,accessors){return!(!inputValue||selectValue.some((function(option){return compareOption(inputValue,option,accessors)}))||selectOptions.some((function(option){return compareOption(inputValue,option,accessors)})))},getNewOptionData:function getNewOptionData(inputValue,optionLabel){return{label:optionLabel,value:inputValue,__isNew__:true}}};function useCreatable(_ref3){var _ref$allowCreateWhile=_ref3.allowCreateWhileLoading,allowCreateWhileLoading=_ref$allowCreateWhile===void 0?false:_ref$allowCreateWhile,_ref$createOptionPosi=_ref3.createOptionPosition,createOptionPosition=_ref$createOptionPosi===void 0?"last":_ref$createOptionPosi,_ref$formatCreateLabe=_ref3.formatCreateLabel,formatCreateLabel2=_ref$formatCreateLabe===void 0?builtins.formatCreateLabel:_ref$formatCreateLabe,_ref$isValidNewOption=_ref3.isValidNewOption,isValidNewOption2=_ref$isValidNewOption===void 0?builtins.isValidNewOption:_ref$isValidNewOption,_ref$getNewOptionData=_ref3.getNewOptionData,getNewOptionData2=_ref$getNewOptionData===void 0?builtins.getNewOptionData:_ref$getNewOptionData,onCreateOption=_ref3.onCreateOption,_ref$options=_ref3.options,propsOptions=_ref$options===void 0?[]:_ref$options,propsOnChange=_ref3.onChange,restSelectProps=_objectWithoutProperties(_ref3,_excluded);var _restSelectProps$getO=restSelectProps.getOptionValue,getOptionValue$1$1=_restSelectProps$getO===void 0?getOptionValue$1:_restSelectProps$getO,_restSelectProps$getO2=restSelectProps.getOptionLabel,getOptionLabel$1$1=_restSelectProps$getO2===void 0?getOptionLabel$1:_restSelectProps$getO2,inputValue=restSelectProps.inputValue,isLoading=restSelectProps.isLoading,isMulti=restSelectProps.isMulti,value=restSelectProps.value,name=restSelectProps.name;var newOption=useMemo((function(){return isValidNewOption2(inputValue,cleanValue(value),propsOptions,{getOptionValue:getOptionValue$1$1,getOptionLabel:getOptionLabel$1$1})?getNewOptionData2(inputValue,formatCreateLabel2(inputValue)):void 0}),[formatCreateLabel2,getNewOptionData2,getOptionLabel$1$1,getOptionValue$1$1,inputValue,isValidNewOption2,propsOptions,value]);var options2=useMemo((function(){return(allowCreateWhileLoading||!isLoading)&&newOption?createOptionPosition==="first"?[newOption].concat(_toConsumableArray(propsOptions)):[].concat(_toConsumableArray(propsOptions),[newOption]):propsOptions}),[allowCreateWhileLoading,createOptionPosition,isLoading,newOption,propsOptions]);var onChange2=useCallback((function(newValue,actionMeta){if(actionMeta.action!=="select-option"){return propsOnChange(newValue,actionMeta)}var valueArray=Array.isArray(newValue)?newValue:[newValue];if(valueArray[valueArray.length-1]===newOption){if(onCreateOption)onCreateOption(inputValue);else{var newOptionData=getNewOptionData2(inputValue,inputValue);var newActionMeta={action:"create-option",name:name,option:newOptionData};propsOnChange(valueTernary(isMulti,[].concat(_toConsumableArray(cleanValue(value)),[newOptionData]),newOptionData),newActionMeta)}return}propsOnChange(newValue,actionMeta)}),[getNewOptionData2,inputValue,isMulti,name,newOption,onCreateOption,propsOnChange,value]);return _objectSpread2(_objectSpread2({},restSelectProps),{},{options:options2,onChange:onChange2})}var CreatableSelect=forwardRef((function(props,ref){var creatableProps=useStateManager(props);var selectProps=useCreatable(creatableProps);return React.createElement(Select,_extends({ref:ref},selectProps))}));var CreatableSelect$1=CreatableSelect;var AsyncCreatableSelect=forwardRef((function(props,ref){var stateManagerProps=useAsync(props);var creatableProps=useStateManager(stateManagerProps);var selectProps=useCreatable(creatableProps);return React.createElement(Select,_extends({ref:ref},selectProps))}));var AsyncCreatableSelect$1=AsyncCreatableSelect;const TypeaheadControl=props=>jsx$1("div",{className:"pb_typeahead_wrapper",children:jsx$1(TextInput$1,{dark:props.selectProps.dark,error:props.selectProps.error,label:props.selectProps.label,marginBottom:"none",children:jsx$1(Flex,{children:jsx$1(components.Control,{className:"text_input",...props})})})});const ClearContainer=props=>{const{selectProps:selectProps,clearValue:clearValue}=props;useEffect((()=>{document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`,clearValue)}),[clearValue,selectProps.id]);return jsx$1(components.ClearIndicator,{className:"clear_indicator",...props})};const IndicatorsContainer=props=>jsx$1(components.IndicatorsContainer,{className:"text_input_indicators",...props});const MenuList=props=>jsxs(components.MenuList,{...props,children:[props.children,props.footer]});const MultiValue=props=>{const{removeProps:removeProps3}=props;const{imageUrl:imageUrl,label:label}=props.data;const{dark:dark,multiKit:multiKit,pillColor:pillColor,truncate:truncate,wrapped:wrapped}=props.selectProps;return jsxs(components.MultiValueContainer,{className:"text_input_multivalue_container",...props,children:[multiKit==="badge"&&jsx$1(Badge,{closeProps:removeProps3,removeIcon:true,text:label,variant:"primary"}),multiKit!=="badge"&&imageUrl&&jsx$1(FormPill,{avatarUrl:imageUrl,closeProps:removeProps3,color:pillColor,dark:dark,marginRight:"xs",name:label,size:multiKit==="smallPill"?"small":"",text:"",truncate:truncate,wrapped:wrapped,...props}),multiKit!=="badge"&&!imageUrl&&jsx$1(FormPill,{closeProps:removeProps3,color:pillColor,dark:dark,marginRight:"xs",name:"",size:multiKit==="smallPill"?"small":"",text:label,truncate:truncate,wrapped:wrapped,...props})]})};const User=props=>{const{align:align="left",aria:aria={},avatar:avatar=false,avatarUrl:avatarUrl,bold:bold=true,className:className,dark:dark=false,data:data={},avatarGrayscale:avatarGrayscale=false,htmlOptions:htmlOptions={},id:id,name:name,nameStyle:nameStyle="title",orientation:orientation="horizontal",size:size="sm",subtitle:subtitle,territory:territory="",title:title="",titleStyle:titleStyle="body"}=props;const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_user_kit",align,orientation,size),globalProps(props),className);const avatarPresent=avatar||avatarUrl;const titleText=territory===""?title:`${territory} • ${title}`;const renderNameComponent=()=>{switch(nameStyle){case"title":return jsx$1(Title,{bold:bold,dark:dark,size:size==="lg"?3:4,text:name});case"body":return jsx$1(Body$1,{dark:dark,text:name});case"caption":return jsx$1(Caption,{dark:dark,size:size==="sm"?"xs":size,text:name});case"detail":return jsx$1(Detail,{dark:dark,text:name});default:return null}};const renderTitleComponent=()=>{switch(titleStyle){case"body":return jsx$1(Body$1,{color:"light",dark:dark,text:titleText,variant:null});case"caption":return jsx$1(Caption,{dark:dark,size:size==="sm"?"xs":size,text:titleText});case"detail":return jsx$1(Detail,{dark:dark,text:titleText});default:return null}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[avatarPresent&&jsx$1(Avatar,{grayscale:avatarGrayscale,imageUrl:avatarUrl,name:name,size:size,status:null}),jsxs("div",{className:"content_wrapper",children:[renderNameComponent(),renderTitleComponent(),typeof subtitle==="string"&&jsx$1(Body$1,{color:"light",dark:dark,text:subtitle,variant:null}),typeof subtitle!=="string"&&jsx$1(Fragment$1,{children:subtitle})]})]})};const Option=props=>{const{imageUrl:imageUrl}=props.data;const{valueComponent:valueComponent}=props.selectProps;return jsx$1(components.Option,{...props,children:jsxs(Fragment$1,{children:[!valueComponent&&imageUrl&&jsx$1(User,{align:"left",avatarUrl:imageUrl,dark:props.selectProps.dark,name:props.label,orientation:"horizontal"}),valueComponent&&valueComponent(props.data),!valueComponent&&!imageUrl&&props.label]})})};const Placeholder=props=>jsx$1(Fragment$1,{children:jsxs(Flex,{align:"center",className:"placeholder",children:[jsx$1(components.IndicatorsContainer,{...props}),props.selectProps.plusIcon&&jsx$1(Icon,{className:"typeahead-plus-icon",icon:"plus"})]})});const ValueContainer=props=>jsx$1(components.ValueContainer,{className:"text_input_value_container",...props});const kitComponents=Object.freeze(Object.defineProperty({__proto__:null,ClearIndicator:ClearContainer,Control:TypeaheadControl,IndicatorsContainer:IndicatorsContainer,MenuList:MenuList,MultiValue:MultiValue,Option:Option,Placeholder:Placeholder,ValueContainer:ValueContainer},Symbol.toStringTag,{value:"Module"}));const Typeahead=forwardRef((({async:async,className:className,components:components2={},createable:createable,error:error="",data:data={},disabled:disabled=false,getOptionLabel:getOptionLabel4,getOptionValue:getOptionValue4,htmlOptions:htmlOptions={},id:id,name:name,loadOptions:loadOptions=noop$2,marginBottom:marginBottom="sm",pillColor:pillColor,onChange:onChange2,optionsByContext:optionsByContext={},searchContextSelector:searchContextSelector,required:required=false,validation:validation,clearOnContextChange:clearOnContextChange=false,preserveSearchInput:preserveSearchInput=false,...props})=>{const[inputValue,setInputValue]=useState("");const[formSubmitted,setFormSubmitted]=useState(false);const[hasUserSelected,setHasUserSelected]=useState(false);const handleInputChange2=preserveSearchInput?(newValue,actionMeta)=>{if(actionMeta.action==="input-change"){setInputValue(newValue)}else if(actionMeta.action==="menu-close"&&!props.value);else if(actionMeta.action==="set-value"){setInputValue("")}if(props.onInputChange){return props.onInputChange(newValue,actionMeta)}return newValue}:props.onInputChange;const handleBlur=preserveSearchInput?event2=>{if(props.onBlur){props.onBlur(event2)}}:props.onBlur;const selectRef=useRef(null);const handleMenuOpen=()=>{setTimeout((()=>{let currentValue=props.value||props.defaultValue;if(Array.isArray(currentValue)&¤tValue.length>0){currentValue=currentValue[0]}if(currentValue&&selectRef.current&&!hasUserSelected&&!props.isMulti){const options2=props.options;if(options2){const focusedIndex=options2.findIndex((option=>{const optionValue=props.getOptionValue?props.getOptionValue(option):option.value;const currentOptionValue=props.getOptionValue?props.getOptionValue(currentValue):currentValue.value;return optionValue===currentOptionValue}));if(focusedIndex>=0&&options2[focusedIndex]){if(selectRef.current&&selectRef.current.setState){const targetOption=options2[focusedIndex];selectRef.current.setState({focusedOption:targetOption,focusedValue:null});setTimeout((()=>{if(selectRef.current&&selectRef.current.menuListRef){const menuElement=selectRef.current.menuListRef;if(menuElement&&menuElement.children&&menuElement.children[focusedIndex]){const optionElement=menuElement.children[focusedIndex];const optionTop=optionElement.offsetTop;const optionHeight=optionElement.offsetHeight;const menuHeight=menuElement.clientHeight;const scrollToMiddle=optionTop-menuHeight/2+optionHeight/2;menuElement.scrollTop=Math.max(0,scrollToMiddle)}}}),20)}}}}}),0);if(props.onMenuOpen){props.onMenuOpen()}};const selectProps={cacheOptions:true,required:required,components:{Control:TypeaheadControl,ClearIndicator:ClearContainer,IndicatorsContainer:IndicatorsContainer,IndicatorSeparator:null,MenuList:MenuList,MultiValue:MultiValue,Option:Option,Placeholder:Placeholder,ValueContainer:ValueContainer,...components2},loadOptions:isString(loadOptions)?get(window,loadOptions):loadOptions,getOptionLabel:isString(getOptionLabel4)?get(window,getOptionLabel4):getOptionLabel4,getOptionValue:isString(getOptionValue4)?get(window,getOptionValue4):getOptionValue4,defaultOptions:true,id:id||uniqueId(),inline:false,isClearable:true,isSearchable:true,name:name,multiKit:"",onCreateOption:null,plusIcon:false,onMultiValueClick:_option=>void 0,pillColor:pillColor,...preserveSearchInput?{inputValue:inputValue}:{},onInputChange:handleInputChange2,onBlur:handleBlur,onMenuOpen:handleMenuOpen,...props};const[contextValue,setContextValue]=useState("");useEffect((()=>{const handleInvalid=event2=>{const target=event2.target;const typeaheadContainer=target.closest('[data-pb-react-component="Typeahead"]');if(typeaheadContainer){const invalidInputName=target.name||target.getAttribute("name");if(invalidInputName===name){setFormSubmitted(true)}}};document.addEventListener("invalid",handleInvalid,true);return()=>{document.removeEventListener("invalid",handleInvalid,true)}}),[name]);useEffect((()=>{const handleClear=()=>{if(preserveSearchInput){setInputValue("")}};document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`,handleClear);return()=>{document.removeEventListener(`pb-typeahead-kit-${selectProps.id}:clear`,handleClear)}}),[selectProps.id,preserveSearchInput]);useEffect((()=>{if(searchContextSelector){const searchContextElement=document.getElementById(searchContextSelector);setContextValue(searchContextElement==null?void 0:searchContextElement.value);const handleContextChange=e=>{const target=e.target;setContextValue(target.value);if(clearOnContextChange){document.dispatchEvent(new CustomEvent(`pb-typeahead-kit-${selectProps.id}:clear`));if(preserveSearchInput){setInputValue("")}}};if(searchContextElement)searchContextElement.addEventListener("change",handleContextChange);return()=>{if(searchContextElement)searchContextElement.removeEventListener("change",handleContextChange)}}}),[searchContextSelector,clearOnContextChange,selectProps.id,preserveSearchInput]);const contextArray=optionsByContext[contextValue];if(Array.isArray(contextArray)&&contextArray.length>0){selectProps.options=contextArray}const Tag=createable?async?AsyncCreatableSelect$1:CreatableSelect$1:async?AsyncSelect$1:StateManagedSelect$1;const handleOnChange=(_data,{action:action,option:option,removedValue:removedValue})=>{if(onChange2){const isReactHookForm=onChange2.toString().includes("target");if(isReactHookForm){onChange2({target:{name:name,value:_data}})}else{onChange2(_data)}}if(action==="select-option"){setFormSubmitted(false);setHasUserSelected(true)}if(action==="select-option"&&preserveSearchInput){setInputValue("")}if(action==="select-option"){if(selectProps.onMultiValueClick&&option)selectProps.onMultiValueClick(option);const multiValueClearEvent=new CustomEvent(`pb-typeahead-kit-${selectProps.id}-result-option-select`,{detail:option?option:_data});document.dispatchEvent(multiValueClearEvent)}if(action==="remove-value"||action==="pop-value"){const multiValueRemoveEvent=new CustomEvent(`pb-typeahead-kit-${selectProps.id}-result-option-remove`,{detail:removedValue});document.dispatchEvent(multiValueRemoveEvent)}if(action==="clear"){const multiValueClearEvent=new CustomEvent(`pb-typeahead-kit-${selectProps.id}-result-clear`);document.dispatchEvent(multiValueClearEvent);if(preserveSearchInput){setInputValue("")}}};const filteredProps={...props};delete filteredProps.truncate;const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_typeahead_kit react-select",`mb_${marginBottom}`,globalProps(filteredProps),className);const inlineClass=selectProps.inline?"inline":null;const shouldShowValidationError=required&&formSubmitted;const errorDisplay=error||(shouldShowValidationError?(validation==null?void 0:validation.message)||"Please fill out this field.":"");return jsx$1("div",{...dataProps,...htmlProps,className:classnames(classes,inlineClass),children:jsx$1(Tag,{classNamePrefix:"typeahead-kit-select",error:errorDisplay,isDisabled:disabled,onChange:handleOnChange,ref:selectRef,...selectProps})})}));Object.keys(kitComponents).forEach((k=>{Typeahead[k]=kitComponents[k]}));Typeahead.displayName="Typeahead";export{DraggableProvider as $,Title as A,Body$1 as B,Collapsible as C,DistributionBar as D,camelToSnakeCase as E,Flex as F,requireWarning as G,HighchartsReact as H,INPUTMASKS as I,IconCircle as J,TextInput$1 as K,Legend as L,MultiLevelSelect as M,FormPill as N,Image as O,PbGaugeChart as P,noop$2 as Q,RichTextEditor as R,SolidGauge as S,Typeahead as T,CircleIconButton as U,Badge as V,joinPresent as W,titleize as X,Background as Y,Avatar as Z,Radio as _,PbLineGraph as a,User as a0,Highlight as a1,Nav as a2,NavItem as a3,OnlineStatus as a4,useEditor as a5,EditorContent as a6,StarterKit as a7,Link as a8,Mark2 as a9,markPasteRule as aa,markInputRule as ab,mergeAttributes as ac,HorizontalRule as ad,Document as ae,Paragraph as af,Text$1 as ag,components as ah,PbCircleChart as b,PbBarGraph as c,PhoneNumberInput$1 as d,Passphrase as e,buildAriaProps as f,buildDataProps as g,buildHtmlProps as h,Highcharts$1 as i,classnames as j,globalProps as k,HighchartsMore as l,buildCss as m,Draggable as n,globalInlineProps as o,Icon as p,Checkbox as q,PbReactPopover as r,SectionSeparator as s,Caption as t,Detail as u,Card as v,FlexItem as w,Tooltip as x,domSafeProps as y,Button as z};
         |